From 774ed982935b5a6c6eb5fc19d531d497cd6b20fc Mon Sep 17 00:00:00 2001 From: cloud-java-bot <122572305+cloud-java-bot@users.noreply.github.com> Date: Thu, 12 Sep 2024 13:21:51 -0400 Subject: [PATCH] feat: [maps-area-insights] new module for maps-area-insights (#11138) * feat: [maps-area-insights] new module for maps-area-insights * chore: generate libraries at Thu Sep 12 17:01:30 UTC 2024 --- generation_config.yaml | 15 + java-maps-area-insights/.OwlBot-hermetic.yaml | 35 + java-maps-area-insights/.repo-metadata.json | 16 + java-maps-area-insights/README.md | 225 + .../google-maps-area-insights-bom/pom.xml | 43 + .../google-maps-area-insights/pom.xml | 113 + .../areainsights/v1/AreaInsightsClient.java | 282 + .../areainsights/v1/AreaInsightsSettings.java | 203 + .../maps/areainsights/v1/gapic_metadata.json | 21 + .../maps/areainsights/v1/package-info.java | 47 + .../v1/stub/AreaInsightsStub.java | 40 + .../v1/stub/AreaInsightsStubSettings.java | 333 ++ .../stub/GrpcAreaInsightsCallableFactory.java | 113 + .../v1/stub/GrpcAreaInsightsStub.java | 156 + .../HttpJsonAreaInsightsCallableFactory.java | 101 + .../v1/stub/HttpJsonAreaInsightsStub.java | 194 + .../reflect-config.json | 1388 +++++ .../v1/AreaInsightsClientHttpJsonTest.java | 127 + .../v1/AreaInsightsClientTest.java | 126 + .../areainsights/v1/MockAreaInsights.java | 59 + .../areainsights/v1/MockAreaInsightsImpl.java | 81 + .../grpc-google-maps-area-insights-v1/pom.xml | 45 + .../areainsights/v1/AreaInsightsGrpc.java | 414 ++ java-maps-area-insights/owlbot.py | 36 + java-maps-area-insights/pom.xml | 55 + .../clirr-ignored-differences.xml | 19 + .../pom.xml | 37 + .../v1/AreaInsightsServiceProto.java | 278 + .../v1/ComputeInsightsRequest.java | 1176 ++++ .../v1/ComputeInsightsRequestOrBuilder.java | 142 + .../v1/ComputeInsightsResponse.java | 1076 ++++ .../v1/ComputeInsightsResponseOrBuilder.java | 103 + .../google/maps/areainsights/v1/Filter.java | 2278 +++++++ .../maps/areainsights/v1/FilterOrBuilder.java | 324 + .../google/maps/areainsights/v1/Insight.java | 287 + .../maps/areainsights/v1/LocationFilter.java | 5284 +++++++++++++++++ .../v1/LocationFilterOrBuilder.java | 133 + .../maps/areainsights/v1/OperatingStatus.java | 201 + .../maps/areainsights/v1/PlaceInsight.java | 638 ++ .../v1/PlaceInsightOrBuilder.java | 55 + .../maps/areainsights/v1/PriceLevel.java | 245 + .../maps/areainsights/v1/RatingFilter.java | 716 +++ .../v1/RatingFilterOrBuilder.java | 80 + .../maps/areainsights/v1/TypeFilter.java | 1634 +++++ .../areainsights/v1/TypeFilterOrBuilder.java | 238 + .../v1/area_insights_service.proto | 339 ++ .../computeinsights/AsyncComputeInsights.java | 53 + .../computeinsights/SyncComputeInsights.java | 49 + .../SyncCreateSetCredentialsProvider.java | 44 + .../SyncCreateSetCredentialsProvider1.java | 39 + .../create/SyncCreateSetEndpoint.java | 41 + .../computeinsights/SyncComputeInsights.java | 48 + .../computeinsights/SyncComputeInsights.java | 49 + pom.xml | 1 + versions.txt | 3 + 55 files changed, 19878 insertions(+) create mode 100644 java-maps-area-insights/.OwlBot-hermetic.yaml create mode 100644 java-maps-area-insights/.repo-metadata.json create mode 100644 java-maps-area-insights/README.md create mode 100644 java-maps-area-insights/google-maps-area-insights-bom/pom.xml create mode 100644 java-maps-area-insights/google-maps-area-insights/pom.xml create mode 100644 java-maps-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/AreaInsightsClient.java create mode 100644 java-maps-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/AreaInsightsSettings.java create mode 100644 java-maps-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/gapic_metadata.json create mode 100644 java-maps-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/package-info.java create mode 100644 java-maps-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/stub/AreaInsightsStub.java create mode 100644 java-maps-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/stub/AreaInsightsStubSettings.java create mode 100644 java-maps-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/stub/GrpcAreaInsightsCallableFactory.java create mode 100644 java-maps-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/stub/GrpcAreaInsightsStub.java create mode 100644 java-maps-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/stub/HttpJsonAreaInsightsCallableFactory.java create mode 100644 java-maps-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/stub/HttpJsonAreaInsightsStub.java create mode 100644 java-maps-area-insights/google-maps-area-insights/src/main/resources/META-INF/native-image/com.google.maps.areainsights.v1/reflect-config.json create mode 100644 java-maps-area-insights/google-maps-area-insights/src/test/java/com/google/maps/areainsights/v1/AreaInsightsClientHttpJsonTest.java create mode 100644 java-maps-area-insights/google-maps-area-insights/src/test/java/com/google/maps/areainsights/v1/AreaInsightsClientTest.java create mode 100644 java-maps-area-insights/google-maps-area-insights/src/test/java/com/google/maps/areainsights/v1/MockAreaInsights.java create mode 100644 java-maps-area-insights/google-maps-area-insights/src/test/java/com/google/maps/areainsights/v1/MockAreaInsightsImpl.java create mode 100644 java-maps-area-insights/grpc-google-maps-area-insights-v1/pom.xml create mode 100644 java-maps-area-insights/grpc-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/AreaInsightsGrpc.java create mode 100644 java-maps-area-insights/owlbot.py create mode 100644 java-maps-area-insights/pom.xml create mode 100644 java-maps-area-insights/proto-google-maps-area-insights-v1/clirr-ignored-differences.xml create mode 100644 java-maps-area-insights/proto-google-maps-area-insights-v1/pom.xml create mode 100644 java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/AreaInsightsServiceProto.java create mode 100644 java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/ComputeInsightsRequest.java create mode 100644 java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/ComputeInsightsRequestOrBuilder.java create mode 100644 java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/ComputeInsightsResponse.java create mode 100644 java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/ComputeInsightsResponseOrBuilder.java create mode 100644 java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/Filter.java create mode 100644 java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/FilterOrBuilder.java create mode 100644 java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/Insight.java create mode 100644 java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/LocationFilter.java create mode 100644 java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/LocationFilterOrBuilder.java create mode 100644 java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/OperatingStatus.java create mode 100644 java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/PlaceInsight.java create mode 100644 java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/PlaceInsightOrBuilder.java create mode 100644 java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/PriceLevel.java create mode 100644 java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/RatingFilter.java create mode 100644 java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/RatingFilterOrBuilder.java create mode 100644 java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/TypeFilter.java create mode 100644 java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/TypeFilterOrBuilder.java create mode 100644 java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/proto/google/maps/areainsights/v1/area_insights_service.proto create mode 100644 java-maps-area-insights/samples/snippets/generated/com/google/maps/areainsights/v1/areainsights/computeinsights/AsyncComputeInsights.java create mode 100644 java-maps-area-insights/samples/snippets/generated/com/google/maps/areainsights/v1/areainsights/computeinsights/SyncComputeInsights.java create mode 100644 java-maps-area-insights/samples/snippets/generated/com/google/maps/areainsights/v1/areainsights/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-maps-area-insights/samples/snippets/generated/com/google/maps/areainsights/v1/areainsights/create/SyncCreateSetCredentialsProvider1.java create mode 100644 java-maps-area-insights/samples/snippets/generated/com/google/maps/areainsights/v1/areainsights/create/SyncCreateSetEndpoint.java create mode 100644 java-maps-area-insights/samples/snippets/generated/com/google/maps/areainsights/v1/areainsightssettings/computeinsights/SyncComputeInsights.java create mode 100644 java-maps-area-insights/samples/snippets/generated/com/google/maps/areainsights/v1/stub/areainsightsstubsettings/computeinsights/SyncComputeInsights.java diff --git a/generation_config.yaml b/generation_config.yaml index 86c6733d431a..b147c9f7c5dc 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1260,6 +1260,21 @@ libraries: GAPICs: - proto_path: google/maps/addressvalidation/v1 +- api_shortname: maps-area-insights + name_pretty: Places Insights API + product_documentation: https://developers.google.com/maps/documentation/places-insights + api_description: Places Insights API. + client_documentation: + https://cloud.google.com/java/docs/reference/google-maps-area-insights/latest/overview + release_level: preview + distribution_name: com.google.maps:google-maps-area-insights + api_id: maps-area-insights.googleapis.com + library_type: GAPIC_AUTO + group_id: com.google.maps + cloud_api: false + GAPICs: + - proto_path: google/maps/areainsights/v1 + requires_billing: true - api_shortname: maps-mapsplatformdatasets name_pretty: Maps Platform Datasets API product_documentation: https://developers.google.com/maps/documentation diff --git a/java-maps-area-insights/.OwlBot-hermetic.yaml b/java-maps-area-insights/.OwlBot-hermetic.yaml new file mode 100644 index 000000000000..3fbcb9bee13b --- /dev/null +++ b/java-maps-area-insights/.OwlBot-hermetic.yaml @@ -0,0 +1,35 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +deep-remove-regex: +- "/java-maps-area-insights/grpc-google-.*/src" +- "/java-maps-area-insights/proto-google-.*/src" +- "/java-maps-area-insights/google-.*/src" +- "/java-maps-area-insights/samples/snippets/generated" + +deep-preserve-regex: +- "/java-maps-area-insights/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" + +deep-copy-regex: +- source: "/google/maps/areainsights/(v.*)/.*-java/proto-google-.*/src" + dest: "/owl-bot-staging/java-maps-area-insights/$1/proto-google-maps-area-insights-$1/src" +- source: "/google/maps/areainsights/(v.*)/.*-java/grpc-google-.*/src" + dest: "/owl-bot-staging/java-maps-area-insights/$1/grpc-google-maps-area-insights-$1/src" +- source: "/google/maps/areainsights/(v.*)/.*-java/gapic-google-.*/src" + dest: "/owl-bot-staging/java-maps-area-insights/$1/google-maps-area-insights/src" +- source: "/google/maps/areainsights/(v.*)/.*-java/samples/snippets/generated" + dest: "/owl-bot-staging/java-maps-area-insights/$1/samples/snippets/generated" + +api-name: maps-area-insights \ No newline at end of file diff --git a/java-maps-area-insights/.repo-metadata.json b/java-maps-area-insights/.repo-metadata.json new file mode 100644 index 000000000000..8cbacd51c5f5 --- /dev/null +++ b/java-maps-area-insights/.repo-metadata.json @@ -0,0 +1,16 @@ +{ + "api_shortname": "maps-area-insights", + "name_pretty": "Places Insights API", + "product_documentation": "https://developers.google.com/maps/documentation/places-insights", + "api_description": "Places Insights API.", + "client_documentation": "https://cloud.google.com/java/docs/reference/google-maps-area-insights/latest/overview", + "release_level": "preview", + "transport": "both", + "language": "java", + "repo": "googleapis/google-cloud-java", + "repo_short": "java-maps-area-insights", + "distribution_name": "com.google.maps:google-maps-area-insights", + "api_id": "maps-area-insights.googleapis.com", + "library_type": "GAPIC_AUTO", + "requires_billing": true +} \ No newline at end of file diff --git a/java-maps-area-insights/README.md b/java-maps-area-insights/README.md new file mode 100644 index 000000000000..89decc234083 --- /dev/null +++ b/java-maps-area-insights/README.md @@ -0,0 +1,225 @@ +# Google Places Insights API Client for Java + +Java idiomatic client for [Places Insights API][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.44.0 + pom + import + + + + + + + com.google.maps + google-maps-area-insights + +``` + +If you are using Maven without the BOM, add this to your dependencies: + + + +```xml + + com.google.maps + google-maps-area-insights + 0.0.0 + +``` + +If you are using Gradle without BOM, add this to your dependencies: + +```Groovy +implementation 'com.google.maps:google-maps-area-insights:0.0.0' +``` + +If you are using SBT, add this to your dependencies: + +```Scala +libraryDependencies += "com.google.maps" % "google-maps-area-insights" % "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 Insights API APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the Places Insights API API calls. + +## Getting Started + +### Prerequisites + +You will need a [Google Cloud Platform Console][developer-console] project with the Places Insights API [API enabled][enable-api]. +You will need to [enable billing][enable-billing] to use Google Places Insights API. +[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-area-insights` library. See the [Quickstart](#quickstart) section +to add `google-maps-area-insights` as a dependency in your code. + +## About Places Insights API + + +[Places Insights API][product-docs] Places Insights API. + +See the [Places Insights API client library docs][javadocs] to learn how to +use this Places Insights API Client Library. + + + + + + +## Troubleshooting + +To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. + +## Transport + +Places Insights API uses both gRPC and HTTP/JSON 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-insights +[javadocs]: https://cloud.google.com/java/docs/reference/google-maps-area-insights/latest/overview +[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java7.svg +[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java7.html +[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8.svg +[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8.html +[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-osx.svg +[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-osx.html +[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-win.svg +[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-win.html +[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.svg +[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/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-area-insights.svg +[maven-version-link]: https://central.sonatype.com/artifact/com.google.maps/google-maps-area-insights/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/google-cloud-java/blob/main/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/google-cloud-java/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/google-cloud-java/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=maps-area-insights.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-area-insights/google-maps-area-insights-bom/pom.xml b/java-maps-area-insights/google-maps-area-insights-bom/pom.xml new file mode 100644 index 000000000000..cfb0a05cf099 --- /dev/null +++ b/java-maps-area-insights/google-maps-area-insights-bom/pom.xml @@ -0,0 +1,43 @@ + + + 4.0.0 + com.google.maps + google-maps-area-insights-bom + 0.0.1-SNAPSHOT + pom + + com.google.cloud + google-cloud-pom-parent + 1.43.0-SNAPSHOT + ../../google-cloud-pom-parent/pom.xml + + + Google Places Insights API BOM + + BOM for Places Insights API + + + + true + + + + + + com.google.maps + google-maps-area-insights + 0.0.1-SNAPSHOT + + + com.google.maps.api.grpc + grpc-google-maps-area-insights-v1 + 0.0.1-SNAPSHOT + + + com.google.maps.api.grpc + proto-google-maps-area-insights-v1 + 0.0.1-SNAPSHOT + + + + diff --git a/java-maps-area-insights/google-maps-area-insights/pom.xml b/java-maps-area-insights/google-maps-area-insights/pom.xml new file mode 100644 index 000000000000..bc98e8f7fc20 --- /dev/null +++ b/java-maps-area-insights/google-maps-area-insights/pom.xml @@ -0,0 +1,113 @@ + + + 4.0.0 + com.google.maps + google-maps-area-insights + 0.0.1-SNAPSHOT + jar + Google Places Insights API + Places Insights API Places Insights API. + + com.google.maps + google-maps-area-insights-parent + 0.0.1-SNAPSHOT + + + google-maps-area-insights + + + + 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-area-insights-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-area-insights-v1 + test + + + + com.google.api + gax + testlib + test + + + com.google.api + gax-grpc + testlib + test + + + com.google.api + gax-httpjson + testlib + test + + + diff --git a/java-maps-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/AreaInsightsClient.java b/java-maps-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/AreaInsightsClient.java new file mode 100644 index 000000000000..2950ce02c8a4 --- /dev/null +++ b/java-maps-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/AreaInsightsClient.java @@ -0,0 +1,282 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.areainsights.v1; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.maps.areainsights.v1.stub.AreaInsightsStub; +import com.google.maps.areainsights.v1.stub.AreaInsightsStubSettings; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service definition for the Area Insights 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 (AreaInsightsClient areaInsightsClient = AreaInsightsClient.create()) {
+ *   ComputeInsightsRequest request =
+ *       ComputeInsightsRequest.newBuilder()
+ *           .addAllInsights(new ArrayList())
+ *           .setFilter(Filter.newBuilder().build())
+ *           .build();
+ *   ComputeInsightsResponse response = areaInsightsClient.computeInsights(request);
+ * }
+ * }
+ * + *

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

ComputeInsights

Compute Insights RPC + *

This method lets you retrieve insights about areas using a variaty of filter such as: area, place type, operating status, price level and ratings. Currently "count" and "places" insights are supported. With "count" insights you can answer questions such as "How many restaurant are located in California that are operational, are inexpensive and have an average rating of at least 4 stars" (see `insight` enum for more details). With "places" insights, you can determine which places match the requested filter. Clients can then use those place resource names to fetch more details about each individual place using the Places API.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • computeInsights(ComputeInsightsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • computeInsightsCallable() + *

+ *
+ * + *

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 AreaInsightsSettings 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
+ * AreaInsightsSettings areaInsightsSettings =
+ *     AreaInsightsSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * AreaInsightsClient areaInsightsClient = AreaInsightsClient.create(areaInsightsSettings);
+ * }
+ * + *

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
+ * AreaInsightsSettings areaInsightsSettings =
+ *     AreaInsightsSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * AreaInsightsClient areaInsightsClient = AreaInsightsClient.create(areaInsightsSettings);
+ * }
+ * + *

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
+ * AreaInsightsSettings areaInsightsSettings = AreaInsightsSettings.newHttpJsonBuilder().build();
+ * AreaInsightsClient areaInsightsClient = AreaInsightsClient.create(areaInsightsSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class AreaInsightsClient implements BackgroundResource { + private final AreaInsightsSettings settings; + private final AreaInsightsStub stub; + + /** Constructs an instance of AreaInsightsClient with default settings. */ + public static final AreaInsightsClient create() throws IOException { + return create(AreaInsightsSettings.newBuilder().build()); + } + + /** + * Constructs an instance of AreaInsightsClient, 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 AreaInsightsClient create(AreaInsightsSettings settings) throws IOException { + return new AreaInsightsClient(settings); + } + + /** + * Constructs an instance of AreaInsightsClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(AreaInsightsSettings). + */ + public static final AreaInsightsClient create(AreaInsightsStub stub) { + return new AreaInsightsClient(stub); + } + + /** + * Constructs an instance of AreaInsightsClient, 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 AreaInsightsClient(AreaInsightsSettings settings) throws IOException { + this.settings = settings; + this.stub = ((AreaInsightsStubSettings) settings.getStubSettings()).createStub(); + } + + protected AreaInsightsClient(AreaInsightsStub stub) { + this.settings = null; + this.stub = stub; + } + + public final AreaInsightsSettings getSettings() { + return settings; + } + + public AreaInsightsStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Compute Insights RPC + * + *

This method lets you retrieve insights about areas using a variaty of filter such as: area, + * place type, operating status, price level and ratings. Currently "count" and "places" insights + * are supported. With "count" insights you can answer questions such as "How many restaurant are + * located in California that are operational, are inexpensive and have an average rating of at + * least 4 stars" (see `insight` enum for more details). With "places" insights, you can determine + * which places match the requested filter. Clients can then use those place resource names to + * fetch more details about each individual place using the Places API. + * + *

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 (AreaInsightsClient areaInsightsClient = AreaInsightsClient.create()) {
+   *   ComputeInsightsRequest request =
+   *       ComputeInsightsRequest.newBuilder()
+   *           .addAllInsights(new ArrayList())
+   *           .setFilter(Filter.newBuilder().build())
+   *           .build();
+   *   ComputeInsightsResponse response = areaInsightsClient.computeInsights(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 ComputeInsightsResponse computeInsights(ComputeInsightsRequest request) { + return computeInsightsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Compute Insights RPC + * + *

This method lets you retrieve insights about areas using a variaty of filter such as: area, + * place type, operating status, price level and ratings. Currently "count" and "places" insights + * are supported. With "count" insights you can answer questions such as "How many restaurant are + * located in California that are operational, are inexpensive and have an average rating of at + * least 4 stars" (see `insight` enum for more details). With "places" insights, you can determine + * which places match the requested filter. Clients can then use those place resource names to + * fetch more details about each individual place using the Places API. + * + *

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 (AreaInsightsClient areaInsightsClient = AreaInsightsClient.create()) {
+   *   ComputeInsightsRequest request =
+   *       ComputeInsightsRequest.newBuilder()
+   *           .addAllInsights(new ArrayList())
+   *           .setFilter(Filter.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       areaInsightsClient.computeInsightsCallable().futureCall(request);
+   *   // Do something.
+   *   ComputeInsightsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + computeInsightsCallable() { + return stub.computeInsightsCallable(); + } + + @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-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/AreaInsightsSettings.java b/java-maps-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/AreaInsightsSettings.java new file mode 100644 index 000000000000..8bdedfea8907 --- /dev/null +++ b/java-maps-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/AreaInsightsSettings.java @@ -0,0 +1,203 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.areainsights.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.areainsights.v1.stub.AreaInsightsStubSettings; +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 AreaInsightsClient}. + * + *

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

+ * + *

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 computeInsights 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
+ * AreaInsightsSettings.Builder areaInsightsSettingsBuilder = AreaInsightsSettings.newBuilder();
+ * areaInsightsSettingsBuilder
+ *     .computeInsightsSettings()
+ *     .setRetrySettings(
+ *         areaInsightsSettingsBuilder
+ *             .computeInsightsSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * AreaInsightsSettings areaInsightsSettings = areaInsightsSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class AreaInsightsSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to computeInsights. */ + public UnaryCallSettings + computeInsightsSettings() { + return ((AreaInsightsStubSettings) getStubSettings()).computeInsightsSettings(); + } + + public static final AreaInsightsSettings create(AreaInsightsStubSettings stub) + throws IOException { + return new AreaInsightsSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return AreaInsightsStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return AreaInsightsStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return AreaInsightsStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return AreaInsightsStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return AreaInsightsStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return AreaInsightsStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return AreaInsightsStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return AreaInsightsStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** 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 AreaInsightsSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for AreaInsightsSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(AreaInsightsStubSettings.newBuilder(clientContext)); + } + + protected Builder(AreaInsightsSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(AreaInsightsStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(AreaInsightsStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(AreaInsightsStubSettings.newHttpJsonBuilder()); + } + + public AreaInsightsStubSettings.Builder getStubSettingsBuilder() { + return ((AreaInsightsStubSettings.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 computeInsights. */ + public UnaryCallSettings.Builder + computeInsightsSettings() { + return getStubSettingsBuilder().computeInsightsSettings(); + } + + @Override + public AreaInsightsSettings build() throws IOException { + return new AreaInsightsSettings(this); + } + } +} diff --git a/java-maps-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/gapic_metadata.json b/java-maps-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/gapic_metadata.json new file mode 100644 index 000000000000..f810b901cb4f --- /dev/null +++ b/java-maps-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/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.areainsights.v1", + "libraryPackage": "com.google.maps.areainsights.v1", + "services": { + "AreaInsights": { + "clients": { + "grpc": { + "libraryClient": "AreaInsightsClient", + "rpcs": { + "ComputeInsights": { + "methods": ["computeInsights", "computeInsightsCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-maps-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/package-info.java b/java-maps-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/package-info.java new file mode 100644 index 000000000000..95b6bc9e04f3 --- /dev/null +++ b/java-maps-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/package-info.java @@ -0,0 +1,47 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * A client to Area Insights API + * + *

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

======================= AreaInsightsClient ======================= + * + *

Service Description: Service definition for the Area Insights API. + * + *

Sample for AreaInsightsClient: + * + *

{@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 (AreaInsightsClient areaInsightsClient = AreaInsightsClient.create()) {
+ *   ComputeInsightsRequest request =
+ *       ComputeInsightsRequest.newBuilder()
+ *           .addAllInsights(new ArrayList())
+ *           .setFilter(Filter.newBuilder().build())
+ *           .build();
+ *   ComputeInsightsResponse response = areaInsightsClient.computeInsights(request);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.maps.areainsights.v1; + +import javax.annotation.Generated; diff --git a/java-maps-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/stub/AreaInsightsStub.java b/java-maps-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/stub/AreaInsightsStub.java new file mode 100644 index 000000000000..7ace2f9d0103 --- /dev/null +++ b/java-maps-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/stub/AreaInsightsStub.java @@ -0,0 +1,40 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.areainsights.v1.stub; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.maps.areainsights.v1.ComputeInsightsRequest; +import com.google.maps.areainsights.v1.ComputeInsightsResponse; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the AreaInsights service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class AreaInsightsStub implements BackgroundResource { + + public UnaryCallable computeInsightsCallable() { + throw new UnsupportedOperationException("Not implemented: computeInsightsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-maps-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/stub/AreaInsightsStubSettings.java b/java-maps-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/stub/AreaInsightsStubSettings.java new file mode 100644 index 000000000000..1ab8d6ae1605 --- /dev/null +++ b/java-maps-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/stub/AreaInsightsStubSettings.java @@ -0,0 +1,333 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.areainsights.v1.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +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.areainsights.v1.ComputeInsightsRequest; +import com.google.maps.areainsights.v1.ComputeInsightsResponse; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link AreaInsightsStub}. + * + *

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

    + *
  • The default service address (areainsights.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 computeInsights 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
+ * AreaInsightsStubSettings.Builder areaInsightsSettingsBuilder =
+ *     AreaInsightsStubSettings.newBuilder();
+ * areaInsightsSettingsBuilder
+ *     .computeInsightsSettings()
+ *     .setRetrySettings(
+ *         areaInsightsSettingsBuilder
+ *             .computeInsightsSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * AreaInsightsStubSettings areaInsightsSettings = areaInsightsSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class AreaInsightsStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings + computeInsightsSettings; + + /** Returns the object with the settings used for calls to computeInsights. */ + public UnaryCallSettings + computeInsightsSettings() { + return computeInsightsSettings; + } + + public AreaInsightsStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcAreaInsightsStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonAreaInsightsStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "areainsights"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "areainsights.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "areainsights.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(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(AreaInsightsStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(AreaInsightsStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return AreaInsightsStubSettings.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 AreaInsightsStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + computeInsightsSettings = settingsBuilder.computeInsightsSettings().build(); + } + + /** Builder for AreaInsightsStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + computeInsightsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(10000L)) + .setInitialRpcTimeout(Duration.ofMillis(120000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(120000L)) + .setTotalTimeout(Duration.ofMillis(120000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + computeInsightsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(computeInsightsSettings); + initDefaults(this); + } + + protected Builder(AreaInsightsStubSettings settings) { + super(settings); + + computeInsightsSettings = settings.computeInsightsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(computeInsightsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + 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.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .computeInsightsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_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 computeInsights. */ + public UnaryCallSettings.Builder + computeInsightsSettings() { + return computeInsightsSettings; + } + + @Override + public AreaInsightsStubSettings build() throws IOException { + return new AreaInsightsStubSettings(this); + } + } +} diff --git a/java-maps-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/stub/GrpcAreaInsightsCallableFactory.java b/java-maps-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/stub/GrpcAreaInsightsCallableFactory.java new file mode 100644 index 000000000000..ef3684d7bd6c --- /dev/null +++ b/java-maps-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/stub/GrpcAreaInsightsCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.areainsights.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 AreaInsights service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcAreaInsightsCallableFactory 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-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/stub/GrpcAreaInsightsStub.java b/java-maps-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/stub/GrpcAreaInsightsStub.java new file mode 100644 index 000000000000..f25f038cbb6b --- /dev/null +++ b/java-maps-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/stub/GrpcAreaInsightsStub.java @@ -0,0 +1,156 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.areainsights.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.areainsights.v1.ComputeInsightsRequest; +import com.google.maps.areainsights.v1.ComputeInsightsResponse; +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 AreaInsights service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcAreaInsightsStub extends AreaInsightsStub { + private static final MethodDescriptor + computeInsightsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.maps.areainsights.v1.AreaInsights/ComputeInsights") + .setRequestMarshaller( + ProtoUtils.marshaller(ComputeInsightsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ComputeInsightsResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable + computeInsightsCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcAreaInsightsStub create(AreaInsightsStubSettings settings) + throws IOException { + return new GrpcAreaInsightsStub(settings, ClientContext.create(settings)); + } + + public static final GrpcAreaInsightsStub create(ClientContext clientContext) throws IOException { + return new GrpcAreaInsightsStub(AreaInsightsStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcAreaInsightsStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcAreaInsightsStub( + AreaInsightsStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcAreaInsightsStub, 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 GrpcAreaInsightsStub(AreaInsightsStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcAreaInsightsCallableFactory()); + } + + /** + * Constructs an instance of GrpcAreaInsightsStub, 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 GrpcAreaInsightsStub( + AreaInsightsStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + computeInsightsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(computeInsightsMethodDescriptor) + .build(); + + this.computeInsightsCallable = + callableFactory.createUnaryCallable( + computeInsightsTransportSettings, settings.computeInsightsSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable computeInsightsCallable() { + return computeInsightsCallable; + } + + @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-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/stub/HttpJsonAreaInsightsCallableFactory.java b/java-maps-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/stub/HttpJsonAreaInsightsCallableFactory.java new file mode 100644 index 000000000000..299642d893c6 --- /dev/null +++ b/java-maps-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/stub/HttpJsonAreaInsightsCallableFactory.java @@ -0,0 +1,101 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.areainsights.v1.stub; + +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 AreaInsights service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class HttpJsonAreaInsightsCallableFactory + 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); + } + + @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-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/stub/HttpJsonAreaInsightsStub.java b/java-maps-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/stub/HttpJsonAreaInsightsStub.java new file mode 100644 index 000000000000..1cfec3fe2ac4 --- /dev/null +++ b/java-maps-area-insights/google-maps-area-insights/src/main/java/com/google/maps/areainsights/v1/stub/HttpJsonAreaInsightsStub.java @@ -0,0 +1,194 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.areainsights.v1.stub; + +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.areainsights.v1.ComputeInsightsRequest; +import com.google.maps.areainsights.v1.ComputeInsightsResponse; +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 AreaInsights service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class HttpJsonAreaInsightsStub extends AreaInsightsStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor + computeInsightsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.maps.areainsights.v1.AreaInsights/ComputeInsights") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1:computeInsights", + 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(ComputeInsightsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable + computeInsightsCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonAreaInsightsStub create(AreaInsightsStubSettings settings) + throws IOException { + return new HttpJsonAreaInsightsStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonAreaInsightsStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonAreaInsightsStub( + AreaInsightsStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonAreaInsightsStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonAreaInsightsStub( + AreaInsightsStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonAreaInsightsStub, 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 HttpJsonAreaInsightsStub(AreaInsightsStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonAreaInsightsCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonAreaInsightsStub, 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 HttpJsonAreaInsightsStub( + AreaInsightsStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings + computeInsightsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(computeInsightsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.computeInsightsCallable = + callableFactory.createUnaryCallable( + computeInsightsTransportSettings, settings.computeInsightsSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(computeInsightsMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable computeInsightsCallable() { + return computeInsightsCallable; + } + + @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-area-insights/google-maps-area-insights/src/main/resources/META-INF/native-image/com.google.maps.areainsights.v1/reflect-config.json b/java-maps-area-insights/google-maps-area-insights/src/main/resources/META-INF/native-image/com.google.maps.areainsights.v1/reflect-config.json new file mode 100644 index 000000000000..d3034919973d --- /dev/null +++ b/java-maps-area-insights/google-maps-area-insights/src/main/resources/META-INF/native-image/com.google.maps.areainsights.v1/reflect-config.json @@ -0,0 +1,1388 @@ +[ + { + "name": "com.google.api.ClientLibraryDestination", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibraryOrganization", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldBehavior", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.LaunchStage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$ExperimentalFeatures", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$ExperimentalFeatures$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$History", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Style", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.areainsights.v1.ComputeInsightsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.areainsights.v1.ComputeInsightsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.areainsights.v1.ComputeInsightsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.areainsights.v1.ComputeInsightsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.areainsights.v1.Filter", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.areainsights.v1.Filter$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.areainsights.v1.Insight", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.areainsights.v1.LocationFilter", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.areainsights.v1.LocationFilter$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.areainsights.v1.LocationFilter$Circle", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.areainsights.v1.LocationFilter$Circle$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.areainsights.v1.LocationFilter$CustomArea", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.areainsights.v1.LocationFilter$CustomArea$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.areainsights.v1.LocationFilter$CustomArea$Polygon", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.areainsights.v1.LocationFilter$CustomArea$Polygon$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.areainsights.v1.LocationFilter$Region", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.areainsights.v1.LocationFilter$Region$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.areainsights.v1.OperatingStatus", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.areainsights.v1.PlaceInsight", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.areainsights.v1.PlaceInsight$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.areainsights.v1.PriceLevel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.areainsights.v1.RatingFilter", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.areainsights.v1.RatingFilter$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.areainsights.v1.TypeFilter", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.areainsights.v1.TypeFilter$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$Edition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$VerificationState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnumType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$FieldPresence", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$JsonFormat", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$MessageEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$RepeatedFieldEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Utf8Validation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Label", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$CType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$JSType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionRetention", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionTargetType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$OptimizeMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Semantic", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$IdempotencyLevel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.LatLng", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.LatLng$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + } +] \ No newline at end of file diff --git a/java-maps-area-insights/google-maps-area-insights/src/test/java/com/google/maps/areainsights/v1/AreaInsightsClientHttpJsonTest.java b/java-maps-area-insights/google-maps-area-insights/src/test/java/com/google/maps/areainsights/v1/AreaInsightsClientHttpJsonTest.java new file mode 100644 index 000000000000..9094cbd9a573 --- /dev/null +++ b/java-maps-area-insights/google-maps-area-insights/src/test/java/com/google/maps/areainsights/v1/AreaInsightsClientHttpJsonTest.java @@ -0,0 +1,127 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.areainsights.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.areainsights.v1.stub.HttpJsonAreaInsightsStub; +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 AreaInsightsClientHttpJsonTest { + private static MockHttpService mockService; + private static AreaInsightsClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonAreaInsightsStub.getMethodDescriptors(), + AreaInsightsSettings.getDefaultEndpoint()); + AreaInsightsSettings settings = + AreaInsightsSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + AreaInsightsSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = AreaInsightsClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void computeInsightsTest() throws Exception { + ComputeInsightsResponse expectedResponse = + ComputeInsightsResponse.newBuilder() + .setCount(94851343) + .addAllPlaceInsights(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + ComputeInsightsRequest request = + ComputeInsightsRequest.newBuilder() + .addAllInsights(new ArrayList()) + .setFilter(Filter.newBuilder().build()) + .build(); + + ComputeInsightsResponse actualResponse = client.computeInsights(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 computeInsightsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ComputeInsightsRequest request = + ComputeInsightsRequest.newBuilder() + .addAllInsights(new ArrayList()) + .setFilter(Filter.newBuilder().build()) + .build(); + client.computeInsights(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-maps-area-insights/google-maps-area-insights/src/test/java/com/google/maps/areainsights/v1/AreaInsightsClientTest.java b/java-maps-area-insights/google-maps-area-insights/src/test/java/com/google/maps/areainsights/v1/AreaInsightsClientTest.java new file mode 100644 index 000000000000..24fe3c8f4754 --- /dev/null +++ b/java-maps-area-insights/google-maps-area-insights/src/test/java/com/google/maps/areainsights/v1/AreaInsightsClientTest.java @@ -0,0 +1,126 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.areainsights.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 AreaInsightsClientTest { + private static MockAreaInsights mockAreaInsights; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private AreaInsightsClient client; + + @BeforeClass + public static void startStaticServer() { + mockAreaInsights = new MockAreaInsights(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockAreaInsights)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + AreaInsightsSettings settings = + AreaInsightsSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = AreaInsightsClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void computeInsightsTest() throws Exception { + ComputeInsightsResponse expectedResponse = + ComputeInsightsResponse.newBuilder() + .setCount(94851343) + .addAllPlaceInsights(new ArrayList()) + .build(); + mockAreaInsights.addResponse(expectedResponse); + + ComputeInsightsRequest request = + ComputeInsightsRequest.newBuilder() + .addAllInsights(new ArrayList()) + .setFilter(Filter.newBuilder().build()) + .build(); + + ComputeInsightsResponse actualResponse = client.computeInsights(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAreaInsights.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ComputeInsightsRequest actualRequest = ((ComputeInsightsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getInsightsList(), actualRequest.getInsightsList()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void computeInsightsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAreaInsights.addException(exception); + + try { + ComputeInsightsRequest request = + ComputeInsightsRequest.newBuilder() + .addAllInsights(new ArrayList()) + .setFilter(Filter.newBuilder().build()) + .build(); + client.computeInsights(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-maps-area-insights/google-maps-area-insights/src/test/java/com/google/maps/areainsights/v1/MockAreaInsights.java b/java-maps-area-insights/google-maps-area-insights/src/test/java/com/google/maps/areainsights/v1/MockAreaInsights.java new file mode 100644 index 000000000000..cce5bc77f025 --- /dev/null +++ b/java-maps-area-insights/google-maps-area-insights/src/test/java/com/google/maps/areainsights/v1/MockAreaInsights.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.areainsights.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 MockAreaInsights implements MockGrpcService { + private final MockAreaInsightsImpl serviceImpl; + + public MockAreaInsights() { + serviceImpl = new MockAreaInsightsImpl(); + } + + @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-area-insights/google-maps-area-insights/src/test/java/com/google/maps/areainsights/v1/MockAreaInsightsImpl.java b/java-maps-area-insights/google-maps-area-insights/src/test/java/com/google/maps/areainsights/v1/MockAreaInsightsImpl.java new file mode 100644 index 000000000000..9024d88fe247 --- /dev/null +++ b/java-maps-area-insights/google-maps-area-insights/src/test/java/com/google/maps/areainsights/v1/MockAreaInsightsImpl.java @@ -0,0 +1,81 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.areainsights.v1; + +import com.google.api.core.BetaApi; +import com.google.maps.areainsights.v1.AreaInsightsGrpc.AreaInsightsImplBase; +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 MockAreaInsightsImpl extends AreaInsightsImplBase { + private List requests; + private Queue responses; + + public MockAreaInsightsImpl() { + 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 computeInsights( + ComputeInsightsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ComputeInsightsResponse) { + requests.add(request); + responseObserver.onNext(((ComputeInsightsResponse) 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 ComputeInsights, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ComputeInsightsResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-maps-area-insights/grpc-google-maps-area-insights-v1/pom.xml b/java-maps-area-insights/grpc-google-maps-area-insights-v1/pom.xml new file mode 100644 index 000000000000..256382e31bcc --- /dev/null +++ b/java-maps-area-insights/grpc-google-maps-area-insights-v1/pom.xml @@ -0,0 +1,45 @@ + + 4.0.0 + com.google.maps.api.grpc + grpc-google-maps-area-insights-v1 + 0.0.1-SNAPSHOT + grpc-google-maps-area-insights-v1 + GRPC library for google-maps-area-insights + + com.google.maps + google-maps-area-insights-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-area-insights-v1 + + + com.google.guava + guava + + + diff --git a/java-maps-area-insights/grpc-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/AreaInsightsGrpc.java b/java-maps-area-insights/grpc-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/AreaInsightsGrpc.java new file mode 100644 index 000000000000..31a22e8ea9c2 --- /dev/null +++ b/java-maps-area-insights/grpc-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/AreaInsightsGrpc.java @@ -0,0 +1,414 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.maps.areainsights.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service definition for the Area Insights API.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/maps/areainsights/v1/area_insights_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class AreaInsightsGrpc { + + private AreaInsightsGrpc() {} + + public static final java.lang.String SERVICE_NAME = "google.maps.areainsights.v1.AreaInsights"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.maps.areainsights.v1.ComputeInsightsRequest, + com.google.maps.areainsights.v1.ComputeInsightsResponse> + getComputeInsightsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ComputeInsights", + requestType = com.google.maps.areainsights.v1.ComputeInsightsRequest.class, + responseType = com.google.maps.areainsights.v1.ComputeInsightsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.maps.areainsights.v1.ComputeInsightsRequest, + com.google.maps.areainsights.v1.ComputeInsightsResponse> + getComputeInsightsMethod() { + io.grpc.MethodDescriptor< + com.google.maps.areainsights.v1.ComputeInsightsRequest, + com.google.maps.areainsights.v1.ComputeInsightsResponse> + getComputeInsightsMethod; + if ((getComputeInsightsMethod = AreaInsightsGrpc.getComputeInsightsMethod) == null) { + synchronized (AreaInsightsGrpc.class) { + if ((getComputeInsightsMethod = AreaInsightsGrpc.getComputeInsightsMethod) == null) { + AreaInsightsGrpc.getComputeInsightsMethod = + getComputeInsightsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ComputeInsights")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.maps.areainsights.v1.ComputeInsightsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.maps.areainsights.v1.ComputeInsightsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AreaInsightsMethodDescriptorSupplier("ComputeInsights")) + .build(); + } + } + } + return getComputeInsightsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static AreaInsightsStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AreaInsightsStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AreaInsightsStub(channel, callOptions); + } + }; + return AreaInsightsStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static AreaInsightsBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AreaInsightsBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AreaInsightsBlockingStub(channel, callOptions); + } + }; + return AreaInsightsBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static AreaInsightsFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AreaInsightsFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AreaInsightsFutureStub(channel, callOptions); + } + }; + return AreaInsightsFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service definition for the Area Insights API.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Compute Insights RPC
+     * This method lets you retrieve insights about areas using a variaty of
+     * filter such as: area, place type, operating status, price level
+     * and ratings. Currently "count" and "places" insights are supported. With
+     * "count" insights you can answer questions such as "How many restaurant are
+     * located in California that are operational, are inexpensive and have an
+     * average rating of at least 4 stars" (see `insight` enum for more details).
+     * With "places" insights, you can determine which places match the
+     * requested filter. Clients can then use those place resource names to fetch
+     * more details about each individual place using the Places API.
+     * 
+ */ + default void computeInsights( + com.google.maps.areainsights.v1.ComputeInsightsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getComputeInsightsMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service AreaInsights. + * + *
+   * Service definition for the Area Insights API.
+   * 
+ */ + public abstract static class AreaInsightsImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return AreaInsightsGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service AreaInsights. + * + *
+   * Service definition for the Area Insights API.
+   * 
+ */ + public static final class AreaInsightsStub + extends io.grpc.stub.AbstractAsyncStub { + private AreaInsightsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AreaInsightsStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AreaInsightsStub(channel, callOptions); + } + + /** + * + * + *
+     * Compute Insights RPC
+     * This method lets you retrieve insights about areas using a variaty of
+     * filter such as: area, place type, operating status, price level
+     * and ratings. Currently "count" and "places" insights are supported. With
+     * "count" insights you can answer questions such as "How many restaurant are
+     * located in California that are operational, are inexpensive and have an
+     * average rating of at least 4 stars" (see `insight` enum for more details).
+     * With "places" insights, you can determine which places match the
+     * requested filter. Clients can then use those place resource names to fetch
+     * more details about each individual place using the Places API.
+     * 
+ */ + public void computeInsights( + com.google.maps.areainsights.v1.ComputeInsightsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getComputeInsightsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service AreaInsights. + * + *
+   * Service definition for the Area Insights API.
+   * 
+ */ + public static final class AreaInsightsBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private AreaInsightsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AreaInsightsBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AreaInsightsBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Compute Insights RPC
+     * This method lets you retrieve insights about areas using a variaty of
+     * filter such as: area, place type, operating status, price level
+     * and ratings. Currently "count" and "places" insights are supported. With
+     * "count" insights you can answer questions such as "How many restaurant are
+     * located in California that are operational, are inexpensive and have an
+     * average rating of at least 4 stars" (see `insight` enum for more details).
+     * With "places" insights, you can determine which places match the
+     * requested filter. Clients can then use those place resource names to fetch
+     * more details about each individual place using the Places API.
+     * 
+ */ + public com.google.maps.areainsights.v1.ComputeInsightsResponse computeInsights( + com.google.maps.areainsights.v1.ComputeInsightsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getComputeInsightsMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service AreaInsights. + * + *
+   * Service definition for the Area Insights API.
+   * 
+ */ + public static final class AreaInsightsFutureStub + extends io.grpc.stub.AbstractFutureStub { + private AreaInsightsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AreaInsightsFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AreaInsightsFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Compute Insights RPC
+     * This method lets you retrieve insights about areas using a variaty of
+     * filter such as: area, place type, operating status, price level
+     * and ratings. Currently "count" and "places" insights are supported. With
+     * "count" insights you can answer questions such as "How many restaurant are
+     * located in California that are operational, are inexpensive and have an
+     * average rating of at least 4 stars" (see `insight` enum for more details).
+     * With "places" insights, you can determine which places match the
+     * requested filter. Clients can then use those place resource names to fetch
+     * more details about each individual place using the Places API.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.maps.areainsights.v1.ComputeInsightsResponse> + computeInsights(com.google.maps.areainsights.v1.ComputeInsightsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getComputeInsightsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_COMPUTE_INSIGHTS = 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_COMPUTE_INSIGHTS: + serviceImpl.computeInsights( + (com.google.maps.areainsights.v1.ComputeInsightsRequest) 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( + getComputeInsightsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.maps.areainsights.v1.ComputeInsightsRequest, + com.google.maps.areainsights.v1.ComputeInsightsResponse>( + service, METHODID_COMPUTE_INSIGHTS))) + .build(); + } + + private abstract static class AreaInsightsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + AreaInsightsBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("AreaInsights"); + } + } + + private static final class AreaInsightsFileDescriptorSupplier + extends AreaInsightsBaseDescriptorSupplier { + AreaInsightsFileDescriptorSupplier() {} + } + + private static final class AreaInsightsMethodDescriptorSupplier + extends AreaInsightsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + AreaInsightsMethodDescriptorSupplier(java.lang.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 (AreaInsightsGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new AreaInsightsFileDescriptorSupplier()) + .addMethod(getComputeInsightsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-maps-area-insights/owlbot.py b/java-maps-area-insights/owlbot.py new file mode 100644 index 000000000000..2ba11e6bba67 --- /dev/null +++ b/java-maps-area-insights/owlbot.py @@ -0,0 +1,36 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +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-area-insights/pom.xml b/java-maps-area-insights/pom.xml new file mode 100644 index 000000000000..96d47841bd0a --- /dev/null +++ b/java-maps-area-insights/pom.xml @@ -0,0 +1,55 @@ + + + 4.0.0 + com.google.maps + google-maps-area-insights-parent + pom + 0.0.1-SNAPSHOT + Google Places Insights API Parent + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-jar-parent + 1.43.0-SNAPSHOT + ../google-cloud-jar-parent/pom.xml + + + + UTF-8 + UTF-8 + github + google-maps-area-insights-parent + + + + + + com.google.maps + google-maps-area-insights + 0.0.1-SNAPSHOT + + + com.google.maps.api.grpc + grpc-google-maps-area-insights-v1 + 0.0.1-SNAPSHOT + + + com.google.maps.api.grpc + proto-google-maps-area-insights-v1 + 0.0.1-SNAPSHOT + + + + + + + google-maps-area-insights + grpc-google-maps-area-insights-v1 + proto-google-maps-area-insights-v1 + google-maps-area-insights-bom + + + diff --git a/java-maps-area-insights/proto-google-maps-area-insights-v1/clirr-ignored-differences.xml b/java-maps-area-insights/proto-google-maps-area-insights-v1/clirr-ignored-differences.xml new file mode 100644 index 000000000000..9c402de4c8c2 --- /dev/null +++ b/java-maps-area-insights/proto-google-maps-area-insights-v1/clirr-ignored-differences.xml @@ -0,0 +1,19 @@ + + + + + 7012 + com/google/maps/areainsights/v1/*OrBuilder + * get*(*) + + + 7012 + com/google/maps/areainsights/v1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/maps/areainsights/v1/*OrBuilder + boolean has*(*) + + diff --git a/java-maps-area-insights/proto-google-maps-area-insights-v1/pom.xml b/java-maps-area-insights/proto-google-maps-area-insights-v1/pom.xml new file mode 100644 index 000000000000..049e5d0746fe --- /dev/null +++ b/java-maps-area-insights/proto-google-maps-area-insights-v1/pom.xml @@ -0,0 +1,37 @@ + + 4.0.0 + com.google.maps.api.grpc + proto-google-maps-area-insights-v1 + 0.0.1-SNAPSHOT + proto-google-maps-area-insights-v1 + Proto library for google-maps-area-insights + + com.google.maps + google-maps-area-insights-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-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/AreaInsightsServiceProto.java b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/AreaInsightsServiceProto.java new file mode 100644 index 000000000000..e269619d59fe --- /dev/null +++ b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/AreaInsightsServiceProto.java @@ -0,0 +1,278 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/areainsights/v1/area_insights_service.proto + +// Protobuf Java Version: 3.25.4 +package com.google.maps.areainsights.v1; + +public final class AreaInsightsServiceProto { + private AreaInsightsServiceProto() {} + + 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_areainsights_v1_ComputeInsightsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_maps_areainsights_v1_ComputeInsightsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_areainsights_v1_ComputeInsightsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_maps_areainsights_v1_ComputeInsightsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_areainsights_v1_PlaceInsight_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_maps_areainsights_v1_PlaceInsight_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_areainsights_v1_Filter_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_maps_areainsights_v1_Filter_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_areainsights_v1_LocationFilter_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_maps_areainsights_v1_LocationFilter_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_areainsights_v1_LocationFilter_Circle_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_maps_areainsights_v1_LocationFilter_Circle_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_areainsights_v1_LocationFilter_Region_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_maps_areainsights_v1_LocationFilter_Region_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_areainsights_v1_LocationFilter_CustomArea_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_maps_areainsights_v1_LocationFilter_CustomArea_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_areainsights_v1_LocationFilter_CustomArea_Polygon_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_maps_areainsights_v1_LocationFilter_CustomArea_Polygon_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_areainsights_v1_TypeFilter_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_maps_areainsights_v1_TypeFilter_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_areainsights_v1_RatingFilter_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_maps_areainsights_v1_RatingFilter_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n7google/maps/areainsights/v1/area_insig" + + "hts_service.proto\022\033google.maps.areainsig" + + "hts.v1\032\034google/api/annotations.proto\032\027go" + + "ogle/api/client.proto\032\037google/api/field_" + + "behavior.proto\032\031google/api/resource.prot" + + "o\032\030google/type/latlng.proto\"\217\001\n\026ComputeI" + + "nsightsRequest\022;\n\010insights\030\004 \003(\0162$.googl" + + "e.maps.areainsights.v1.InsightB\003\340A\002\0228\n\006f" + + "ilter\030\005 \001(\0132#.google.maps.areainsights.v" + + "1.FilterB\003\340A\002\"z\n\027ComputeInsightsResponse" + + "\022\022\n\005count\030\001 \001(\003H\000\210\001\001\022A\n\016place_insights\030\005" + + " \003(\0132).google.maps.areainsights.v1.Place" + + "InsightB\010\n\006_count\"?\n\014PlaceInsight\022/\n\005pla" + + "ce\030\001 \001(\tB \372A\035\n\033places.googleapis.com/Pla" + + "ce\"\356\002\n\006Filter\022I\n\017location_filter\030\001 \001(\0132+" + + ".google.maps.areainsights.v1.LocationFil" + + "terB\003\340A\002\022A\n\013type_filter\030\002 \001(\0132\'.google.m" + + "aps.areainsights.v1.TypeFilterB\003\340A\002\022K\n\020o" + + "perating_status\030\003 \003(\0162,.google.maps.area" + + "insights.v1.OperatingStatusB\003\340A\001\022B\n\014pric" + + "e_levels\030\004 \003(\0162\'.google.maps.areainsight" + + "s.v1.PriceLevelB\003\340A\001\022E\n\rrating_filter\030\005 " + + "\001(\0132).google.maps.areainsights.v1.Rating" + + "FilterB\003\340A\001\"\336\004\n\016LocationFilter\022D\n\006circle" + + "\030\001 \001(\01322.google.maps.areainsights.v1.Loc" + + "ationFilter.CircleH\000\022D\n\006region\030\002 \001(\01322.g" + + "oogle.maps.areainsights.v1.LocationFilte" + + "r.RegionH\000\022M\n\013custom_area\030\003 \001(\01326.google" + + ".maps.areainsights.v1.LocationFilter.Cus" + + "tomAreaH\000\032\202\001\n\006Circle\022&\n\007lat_lng\030\001 \001(\0132\023." + + "google.type.LatLngH\000\0221\n\005place\030\002 \001(\tB \372A\035" + + "\n\033places.googleapis.com/PlaceH\000\022\023\n\006radiu" + + "s\030\003 \001(\005B\003\340A\001B\010\n\006center\032E\n\006Region\0221\n\005plac" + + "e\030\001 \001(\tB \372A\035\n\033places.googleapis.com/Plac" + + "eH\000B\010\n\006region\032\234\001\n\nCustomArea\022T\n\007polygon\030" + + "\001 \001(\0132>.google.maps.areainsights.v1.Loca" + + "tionFilter.CustomArea.PolygonB\003\340A\002\0328\n\007Po" + + "lygon\022-\n\013coordinates\030\001 \003(\0132\023.google.type" + + ".LatLngB\003\340A\001B\006\n\004area\"\220\001\n\nTypeFilter\022\033\n\016i" + + "ncluded_types\030\001 \003(\tB\003\340A\001\022\033\n\016excluded_typ" + + "es\030\002 \003(\tB\003\340A\001\022#\n\026included_primary_types\030" + + "\003 \003(\tB\003\340A\001\022#\n\026excluded_primary_types\030\004 \003" + + "(\tB\003\340A\001\"h\n\014RatingFilter\022\034\n\nmin_rating\030\005 " + + "\001(\002B\003\340A\001H\000\210\001\001\022\034\n\nmax_rating\030\006 \001(\002B\003\340A\001H\001" + + "\210\001\001B\r\n\013_min_ratingB\r\n\013_max_rating*I\n\007Ins" + + "ight\022\027\n\023INSIGHT_UNSPECIFIED\020\000\022\021\n\rINSIGHT" + + "_COUNT\020\001\022\022\n\016INSIGHT_PLACES\020\002*\247\001\n\017Operati" + + "ngStatus\022 \n\034OPERATING_STATUS_UNSPECIFIED" + + "\020\000\022 \n\034OPERATING_STATUS_OPERATIONAL\020\001\022\'\n#" + + "OPERATING_STATUS_PERMANENTLY_CLOSED\020\003\022\'\n" + + "#OPERATING_STATUS_TEMPORARILY_CLOSED\020\004*\261" + + "\001\n\nPriceLevel\022\033\n\027PRICE_LEVEL_UNSPECIFIED" + + "\020\000\022\024\n\020PRICE_LEVEL_FREE\020\001\022\033\n\027PRICE_LEVEL_" + + "INEXPENSIVE\020\002\022\030\n\024PRICE_LEVEL_MODERATE\020\003\022" + + "\031\n\025PRICE_LEVEL_EXPENSIVE\020\004\022\036\n\032PRICE_LEVE" + + "L_VERY_EXPENSIVE\020\0052\376\001\n\014AreaInsights\022\234\001\n\017" + + "ComputeInsights\0223.google.maps.areainsigh" + + "ts.v1.ComputeInsightsRequest\0324.google.ma" + + "ps.areainsights.v1.ComputeInsightsRespon" + + "se\"\036\202\323\344\223\002\030\"\023/v1:computeInsights:\001*\032O\312A\033a" + + "reainsights.googleapis.com\322A.https://www" + + ".googleapis.com/auth/cloud-platformB\375\001\n\037" + + "com.google.maps.areainsights.v1B\030AreaIns" + + "ightsServiceProtoP\001ZIcloud.google.com/go" + + "/maps/areainsights/apiv1/areainsightspb;" + + "areainsightspb\242\002\003MAI\252\002\033Google.Maps.AreaI" + + "nsights.V1\312\002\033Google\\Maps\\AreaInsights\\V1" + + "\352A0\n\033places.googleapis.com/Place\022\021places" + + "/{place_id}b\006proto3" + }; + 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.api.ResourceProto.getDescriptor(), + com.google.type.LatLngProto.getDescriptor(), + }); + internal_static_google_maps_areainsights_v1_ComputeInsightsRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_maps_areainsights_v1_ComputeInsightsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_maps_areainsights_v1_ComputeInsightsRequest_descriptor, + new java.lang.String[] { + "Insights", "Filter", + }); + internal_static_google_maps_areainsights_v1_ComputeInsightsResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_maps_areainsights_v1_ComputeInsightsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_maps_areainsights_v1_ComputeInsightsResponse_descriptor, + new java.lang.String[] { + "Count", "PlaceInsights", + }); + internal_static_google_maps_areainsights_v1_PlaceInsight_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_maps_areainsights_v1_PlaceInsight_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_maps_areainsights_v1_PlaceInsight_descriptor, + new java.lang.String[] { + "Place", + }); + internal_static_google_maps_areainsights_v1_Filter_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_maps_areainsights_v1_Filter_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_maps_areainsights_v1_Filter_descriptor, + new java.lang.String[] { + "LocationFilter", "TypeFilter", "OperatingStatus", "PriceLevels", "RatingFilter", + }); + internal_static_google_maps_areainsights_v1_LocationFilter_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_maps_areainsights_v1_LocationFilter_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_maps_areainsights_v1_LocationFilter_descriptor, + new java.lang.String[] { + "Circle", "Region", "CustomArea", "Area", + }); + internal_static_google_maps_areainsights_v1_LocationFilter_Circle_descriptor = + internal_static_google_maps_areainsights_v1_LocationFilter_descriptor + .getNestedTypes() + .get(0); + internal_static_google_maps_areainsights_v1_LocationFilter_Circle_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_maps_areainsights_v1_LocationFilter_Circle_descriptor, + new java.lang.String[] { + "LatLng", "Place", "Radius", "Center", + }); + internal_static_google_maps_areainsights_v1_LocationFilter_Region_descriptor = + internal_static_google_maps_areainsights_v1_LocationFilter_descriptor + .getNestedTypes() + .get(1); + internal_static_google_maps_areainsights_v1_LocationFilter_Region_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_maps_areainsights_v1_LocationFilter_Region_descriptor, + new java.lang.String[] { + "Place", "Region", + }); + internal_static_google_maps_areainsights_v1_LocationFilter_CustomArea_descriptor = + internal_static_google_maps_areainsights_v1_LocationFilter_descriptor + .getNestedTypes() + .get(2); + internal_static_google_maps_areainsights_v1_LocationFilter_CustomArea_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_maps_areainsights_v1_LocationFilter_CustomArea_descriptor, + new java.lang.String[] { + "Polygon", + }); + internal_static_google_maps_areainsights_v1_LocationFilter_CustomArea_Polygon_descriptor = + internal_static_google_maps_areainsights_v1_LocationFilter_CustomArea_descriptor + .getNestedTypes() + .get(0); + internal_static_google_maps_areainsights_v1_LocationFilter_CustomArea_Polygon_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_maps_areainsights_v1_LocationFilter_CustomArea_Polygon_descriptor, + new java.lang.String[] { + "Coordinates", + }); + internal_static_google_maps_areainsights_v1_TypeFilter_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_maps_areainsights_v1_TypeFilter_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_maps_areainsights_v1_TypeFilter_descriptor, + new java.lang.String[] { + "IncludedTypes", "ExcludedTypes", "IncludedPrimaryTypes", "ExcludedPrimaryTypes", + }); + internal_static_google_maps_areainsights_v1_RatingFilter_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_maps_areainsights_v1_RatingFilter_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_maps_areainsights_v1_RatingFilter_descriptor, + new java.lang.String[] { + "MinRating", "MaxRating", + }); + 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); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceDefinition); + registry.add(com.google.api.ResourceProto.resourceReference); + 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.api.ResourceProto.getDescriptor(); + com.google.type.LatLngProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/ComputeInsightsRequest.java b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/ComputeInsightsRequest.java new file mode 100644 index 000000000000..3daa585afd71 --- /dev/null +++ b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/ComputeInsightsRequest.java @@ -0,0 +1,1176 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/areainsights/v1/area_insights_service.proto + +// Protobuf Java Version: 3.25.4 +package com.google.maps.areainsights.v1; + +/** + * + * + *
+ * Request for the ComputeInsights RPC.
+ * 
+ * + * Protobuf type {@code google.maps.areainsights.v1.ComputeInsightsRequest} + */ +public final class ComputeInsightsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.maps.areainsights.v1.ComputeInsightsRequest) + ComputeInsightsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ComputeInsightsRequest.newBuilder() to construct. + private ComputeInsightsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ComputeInsightsRequest() { + insights_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ComputeInsightsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_ComputeInsightsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_ComputeInsightsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.areainsights.v1.ComputeInsightsRequest.class, + com.google.maps.areainsights.v1.ComputeInsightsRequest.Builder.class); + } + + private int bitField0_; + public static final int INSIGHTS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List insights_; + + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.maps.areainsights.v1.Insight> + insights_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.maps.areainsights.v1.Insight>() { + public com.google.maps.areainsights.v1.Insight convert(java.lang.Integer from) { + com.google.maps.areainsights.v1.Insight result = + com.google.maps.areainsights.v1.Insight.forNumber(from); + return result == null ? com.google.maps.areainsights.v1.Insight.UNRECOGNIZED : result; + } + }; + /** + * + * + *
+   * Required. Insights to compute. Currently only INSIGHT_COUNT and
+   * INSIGHT_PLACES are supported.
+   * 
+ * + * + * repeated .google.maps.areainsights.v1.Insight insights = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the insights. + */ + @java.lang.Override + public java.util.List getInsightsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.maps.areainsights.v1.Insight>(insights_, insights_converter_); + } + /** + * + * + *
+   * Required. Insights to compute. Currently only INSIGHT_COUNT and
+   * INSIGHT_PLACES are supported.
+   * 
+ * + * + * repeated .google.maps.areainsights.v1.Insight insights = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of insights. + */ + @java.lang.Override + public int getInsightsCount() { + return insights_.size(); + } + /** + * + * + *
+   * Required. Insights to compute. Currently only INSIGHT_COUNT and
+   * INSIGHT_PLACES are supported.
+   * 
+ * + * + * repeated .google.maps.areainsights.v1.Insight insights = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The insights at the given index. + */ + @java.lang.Override + public com.google.maps.areainsights.v1.Insight getInsights(int index) { + return insights_converter_.convert(insights_.get(index)); + } + /** + * + * + *
+   * Required. Insights to compute. Currently only INSIGHT_COUNT and
+   * INSIGHT_PLACES are supported.
+   * 
+ * + * + * repeated .google.maps.areainsights.v1.Insight insights = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the enum numeric values on the wire for insights. + */ + @java.lang.Override + public java.util.List getInsightsValueList() { + return insights_; + } + /** + * + * + *
+   * Required. Insights to compute. Currently only INSIGHT_COUNT and
+   * INSIGHT_PLACES are supported.
+   * 
+ * + * + * repeated .google.maps.areainsights.v1.Insight insights = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of insights at the given index. + */ + @java.lang.Override + public int getInsightsValue(int index) { + return insights_.get(index); + } + + private int insightsMemoizedSerializedSize; + + public static final int FILTER_FIELD_NUMBER = 5; + private com.google.maps.areainsights.v1.Filter filter_; + /** + * + * + *
+   * Required. Insight filter.
+   * 
+ * + * .google.maps.areainsights.v1.Filter filter = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the filter field is set. + */ + @java.lang.Override + public boolean hasFilter() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. Insight filter.
+   * 
+ * + * .google.maps.areainsights.v1.Filter filter = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The filter. + */ + @java.lang.Override + public com.google.maps.areainsights.v1.Filter getFilter() { + return filter_ == null ? com.google.maps.areainsights.v1.Filter.getDefaultInstance() : filter_; + } + /** + * + * + *
+   * Required. Insight filter.
+   * 
+ * + * .google.maps.areainsights.v1.Filter filter = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.maps.areainsights.v1.FilterOrBuilder getFilterOrBuilder() { + return filter_ == null ? com.google.maps.areainsights.v1.Filter.getDefaultInstance() : filter_; + } + + 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 (getInsightsList().size() > 0) { + output.writeUInt32NoTag(34); + output.writeUInt32NoTag(insightsMemoizedSerializedSize); + } + for (int i = 0; i < insights_.size(); i++) { + output.writeEnumNoTag(insights_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getFilter()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < insights_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(insights_.get(i)); + } + size += dataSize; + if (!getInsightsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + insightsMemoizedSerializedSize = dataSize; + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getFilter()); + } + 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.areainsights.v1.ComputeInsightsRequest)) { + return super.equals(obj); + } + com.google.maps.areainsights.v1.ComputeInsightsRequest other = + (com.google.maps.areainsights.v1.ComputeInsightsRequest) obj; + + if (!insights_.equals(other.insights_)) return false; + if (hasFilter() != other.hasFilter()) return false; + if (hasFilter()) { + if (!getFilter().equals(other.getFilter())) 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 (getInsightsCount() > 0) { + hash = (37 * hash) + INSIGHTS_FIELD_NUMBER; + hash = (53 * hash) + insights_.hashCode(); + } + if (hasFilter()) { + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.areainsights.v1.ComputeInsightsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.areainsights.v1.ComputeInsightsRequest 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.areainsights.v1.ComputeInsightsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.areainsights.v1.ComputeInsightsRequest 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.areainsights.v1.ComputeInsightsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.areainsights.v1.ComputeInsightsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.areainsights.v1.ComputeInsightsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.areainsights.v1.ComputeInsightsRequest 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.areainsights.v1.ComputeInsightsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.areainsights.v1.ComputeInsightsRequest 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.areainsights.v1.ComputeInsightsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.areainsights.v1.ComputeInsightsRequest 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.areainsights.v1.ComputeInsightsRequest 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 for the ComputeInsights RPC.
+   * 
+ * + * Protobuf type {@code google.maps.areainsights.v1.ComputeInsightsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.areainsights.v1.ComputeInsightsRequest) + com.google.maps.areainsights.v1.ComputeInsightsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_ComputeInsightsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_ComputeInsightsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.areainsights.v1.ComputeInsightsRequest.class, + com.google.maps.areainsights.v1.ComputeInsightsRequest.Builder.class); + } + + // Construct using com.google.maps.areainsights.v1.ComputeInsightsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getFilterFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + insights_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + filter_ = null; + if (filterBuilder_ != null) { + filterBuilder_.dispose(); + filterBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_ComputeInsightsRequest_descriptor; + } + + @java.lang.Override + public com.google.maps.areainsights.v1.ComputeInsightsRequest getDefaultInstanceForType() { + return com.google.maps.areainsights.v1.ComputeInsightsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.areainsights.v1.ComputeInsightsRequest build() { + com.google.maps.areainsights.v1.ComputeInsightsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.areainsights.v1.ComputeInsightsRequest buildPartial() { + com.google.maps.areainsights.v1.ComputeInsightsRequest result = + new com.google.maps.areainsights.v1.ComputeInsightsRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.maps.areainsights.v1.ComputeInsightsRequest result) { + if (((bitField0_ & 0x00000001) != 0)) { + insights_ = java.util.Collections.unmodifiableList(insights_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.insights_ = insights_; + } + + private void buildPartial0(com.google.maps.areainsights.v1.ComputeInsightsRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.filter_ = filterBuilder_ == null ? filter_ : filterBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + 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.areainsights.v1.ComputeInsightsRequest) { + return mergeFrom((com.google.maps.areainsights.v1.ComputeInsightsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.areainsights.v1.ComputeInsightsRequest other) { + if (other == com.google.maps.areainsights.v1.ComputeInsightsRequest.getDefaultInstance()) + return this; + if (!other.insights_.isEmpty()) { + if (insights_.isEmpty()) { + insights_ = other.insights_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInsightsIsMutable(); + insights_.addAll(other.insights_); + } + onChanged(); + } + if (other.hasFilter()) { + mergeFilter(other.getFilter()); + } + 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 32: + { + int tmpRaw = input.readEnum(); + ensureInsightsIsMutable(); + insights_.add(tmpRaw); + break; + } // case 32 + case 34: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureInsightsIsMutable(); + insights_.add(tmpRaw); + } + input.popLimit(oldLimit); + break; + } // case 34 + case 42: + { + input.readMessage(getFilterFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + 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 java.util.List insights_ = java.util.Collections.emptyList(); + + private void ensureInsightsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + insights_ = new java.util.ArrayList(insights_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Required. Insights to compute. Currently only INSIGHT_COUNT and
+     * INSIGHT_PLACES are supported.
+     * 
+ * + * + * repeated .google.maps.areainsights.v1.Insight insights = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the insights. + */ + public java.util.List getInsightsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.maps.areainsights.v1.Insight>( + insights_, insights_converter_); + } + /** + * + * + *
+     * Required. Insights to compute. Currently only INSIGHT_COUNT and
+     * INSIGHT_PLACES are supported.
+     * 
+ * + * + * repeated .google.maps.areainsights.v1.Insight insights = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of insights. + */ + public int getInsightsCount() { + return insights_.size(); + } + /** + * + * + *
+     * Required. Insights to compute. Currently only INSIGHT_COUNT and
+     * INSIGHT_PLACES are supported.
+     * 
+ * + * + * repeated .google.maps.areainsights.v1.Insight insights = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The insights at the given index. + */ + public com.google.maps.areainsights.v1.Insight getInsights(int index) { + return insights_converter_.convert(insights_.get(index)); + } + /** + * + * + *
+     * Required. Insights to compute. Currently only INSIGHT_COUNT and
+     * INSIGHT_PLACES are supported.
+     * 
+ * + * + * repeated .google.maps.areainsights.v1.Insight insights = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index to set the value at. + * @param value The insights to set. + * @return This builder for chaining. + */ + public Builder setInsights(int index, com.google.maps.areainsights.v1.Insight value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInsightsIsMutable(); + insights_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Insights to compute. Currently only INSIGHT_COUNT and
+     * INSIGHT_PLACES are supported.
+     * 
+ * + * + * repeated .google.maps.areainsights.v1.Insight insights = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The insights to add. + * @return This builder for chaining. + */ + public Builder addInsights(com.google.maps.areainsights.v1.Insight value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInsightsIsMutable(); + insights_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Insights to compute. Currently only INSIGHT_COUNT and
+     * INSIGHT_PLACES are supported.
+     * 
+ * + * + * repeated .google.maps.areainsights.v1.Insight insights = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param values The insights to add. + * @return This builder for chaining. + */ + public Builder addAllInsights( + java.lang.Iterable values) { + ensureInsightsIsMutable(); + for (com.google.maps.areainsights.v1.Insight value : values) { + insights_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Insights to compute. Currently only INSIGHT_COUNT and
+     * INSIGHT_PLACES are supported.
+     * 
+ * + * + * repeated .google.maps.areainsights.v1.Insight insights = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearInsights() { + insights_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Insights to compute. Currently only INSIGHT_COUNT and
+     * INSIGHT_PLACES are supported.
+     * 
+ * + * + * repeated .google.maps.areainsights.v1.Insight insights = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the enum numeric values on the wire for insights. + */ + public java.util.List getInsightsValueList() { + return java.util.Collections.unmodifiableList(insights_); + } + /** + * + * + *
+     * Required. Insights to compute. Currently only INSIGHT_COUNT and
+     * INSIGHT_PLACES are supported.
+     * 
+ * + * + * repeated .google.maps.areainsights.v1.Insight insights = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of insights at the given index. + */ + public int getInsightsValue(int index) { + return insights_.get(index); + } + /** + * + * + *
+     * Required. Insights to compute. Currently only INSIGHT_COUNT and
+     * INSIGHT_PLACES are supported.
+     * 
+ * + * + * repeated .google.maps.areainsights.v1.Insight insights = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for insights to set. + * @return This builder for chaining. + */ + public Builder setInsightsValue(int index, int value) { + ensureInsightsIsMutable(); + insights_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Insights to compute. Currently only INSIGHT_COUNT and
+     * INSIGHT_PLACES are supported.
+     * 
+ * + * + * repeated .google.maps.areainsights.v1.Insight insights = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for insights to add. + * @return This builder for chaining. + */ + public Builder addInsightsValue(int value) { + ensureInsightsIsMutable(); + insights_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Insights to compute. Currently only INSIGHT_COUNT and
+     * INSIGHT_PLACES are supported.
+     * 
+ * + * + * repeated .google.maps.areainsights.v1.Insight insights = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param values The enum numeric values on the wire for insights to add. + * @return This builder for chaining. + */ + public Builder addAllInsightsValue(java.lang.Iterable values) { + ensureInsightsIsMutable(); + for (int value : values) { + insights_.add(value); + } + onChanged(); + return this; + } + + private com.google.maps.areainsights.v1.Filter filter_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.areainsights.v1.Filter, + com.google.maps.areainsights.v1.Filter.Builder, + com.google.maps.areainsights.v1.FilterOrBuilder> + filterBuilder_; + /** + * + * + *
+     * Required. Insight filter.
+     * 
+ * + * + * .google.maps.areainsights.v1.Filter filter = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the filter field is set. + */ + public boolean hasFilter() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. Insight filter.
+     * 
+ * + * + * .google.maps.areainsights.v1.Filter filter = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The filter. + */ + public com.google.maps.areainsights.v1.Filter getFilter() { + if (filterBuilder_ == null) { + return filter_ == null + ? com.google.maps.areainsights.v1.Filter.getDefaultInstance() + : filter_; + } else { + return filterBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Insight filter.
+     * 
+ * + * + * .google.maps.areainsights.v1.Filter filter = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFilter(com.google.maps.areainsights.v1.Filter value) { + if (filterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + } else { + filterBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Insight filter.
+     * 
+ * + * + * .google.maps.areainsights.v1.Filter filter = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFilter(com.google.maps.areainsights.v1.Filter.Builder builderForValue) { + if (filterBuilder_ == null) { + filter_ = builderForValue.build(); + } else { + filterBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Insight filter.
+     * 
+ * + * + * .google.maps.areainsights.v1.Filter filter = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeFilter(com.google.maps.areainsights.v1.Filter value) { + if (filterBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && filter_ != null + && filter_ != com.google.maps.areainsights.v1.Filter.getDefaultInstance()) { + getFilterBuilder().mergeFrom(value); + } else { + filter_ = value; + } + } else { + filterBuilder_.mergeFrom(value); + } + if (filter_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. Insight filter.
+     * 
+ * + * + * .google.maps.areainsights.v1.Filter filter = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearFilter() { + bitField0_ = (bitField0_ & ~0x00000002); + filter_ = null; + if (filterBuilder_ != null) { + filterBuilder_.dispose(); + filterBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Insight filter.
+     * 
+ * + * + * .google.maps.areainsights.v1.Filter filter = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.maps.areainsights.v1.Filter.Builder getFilterBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getFilterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Insight filter.
+     * 
+ * + * + * .google.maps.areainsights.v1.Filter filter = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.maps.areainsights.v1.FilterOrBuilder getFilterOrBuilder() { + if (filterBuilder_ != null) { + return filterBuilder_.getMessageOrBuilder(); + } else { + return filter_ == null + ? com.google.maps.areainsights.v1.Filter.getDefaultInstance() + : filter_; + } + } + /** + * + * + *
+     * Required. Insight filter.
+     * 
+ * + * + * .google.maps.areainsights.v1.Filter filter = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.areainsights.v1.Filter, + com.google.maps.areainsights.v1.Filter.Builder, + com.google.maps.areainsights.v1.FilterOrBuilder> + getFilterFieldBuilder() { + if (filterBuilder_ == null) { + filterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.areainsights.v1.Filter, + com.google.maps.areainsights.v1.Filter.Builder, + com.google.maps.areainsights.v1.FilterOrBuilder>( + getFilter(), getParentForChildren(), isClean()); + filter_ = null; + } + return filterBuilder_; + } + + @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.areainsights.v1.ComputeInsightsRequest) + } + + // @@protoc_insertion_point(class_scope:google.maps.areainsights.v1.ComputeInsightsRequest) + private static final com.google.maps.areainsights.v1.ComputeInsightsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.areainsights.v1.ComputeInsightsRequest(); + } + + public static com.google.maps.areainsights.v1.ComputeInsightsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ComputeInsightsRequest 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.areainsights.v1.ComputeInsightsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/ComputeInsightsRequestOrBuilder.java b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/ComputeInsightsRequestOrBuilder.java new file mode 100644 index 000000000000..dbfe0646815b --- /dev/null +++ b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/ComputeInsightsRequestOrBuilder.java @@ -0,0 +1,142 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/areainsights/v1/area_insights_service.proto + +// Protobuf Java Version: 3.25.4 +package com.google.maps.areainsights.v1; + +public interface ComputeInsightsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.areainsights.v1.ComputeInsightsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Insights to compute. Currently only INSIGHT_COUNT and
+   * INSIGHT_PLACES are supported.
+   * 
+ * + * + * repeated .google.maps.areainsights.v1.Insight insights = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the insights. + */ + java.util.List getInsightsList(); + /** + * + * + *
+   * Required. Insights to compute. Currently only INSIGHT_COUNT and
+   * INSIGHT_PLACES are supported.
+   * 
+ * + * + * repeated .google.maps.areainsights.v1.Insight insights = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of insights. + */ + int getInsightsCount(); + /** + * + * + *
+   * Required. Insights to compute. Currently only INSIGHT_COUNT and
+   * INSIGHT_PLACES are supported.
+   * 
+ * + * + * repeated .google.maps.areainsights.v1.Insight insights = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The insights at the given index. + */ + com.google.maps.areainsights.v1.Insight getInsights(int index); + /** + * + * + *
+   * Required. Insights to compute. Currently only INSIGHT_COUNT and
+   * INSIGHT_PLACES are supported.
+   * 
+ * + * + * repeated .google.maps.areainsights.v1.Insight insights = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the enum numeric values on the wire for insights. + */ + java.util.List getInsightsValueList(); + /** + * + * + *
+   * Required. Insights to compute. Currently only INSIGHT_COUNT and
+   * INSIGHT_PLACES are supported.
+   * 
+ * + * + * repeated .google.maps.areainsights.v1.Insight insights = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of insights at the given index. + */ + int getInsightsValue(int index); + + /** + * + * + *
+   * Required. Insight filter.
+   * 
+ * + * .google.maps.areainsights.v1.Filter filter = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the filter field is set. + */ + boolean hasFilter(); + /** + * + * + *
+   * Required. Insight filter.
+   * 
+ * + * .google.maps.areainsights.v1.Filter filter = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The filter. + */ + com.google.maps.areainsights.v1.Filter getFilter(); + /** + * + * + *
+   * Required. Insight filter.
+   * 
+ * + * .google.maps.areainsights.v1.Filter filter = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.maps.areainsights.v1.FilterOrBuilder getFilterOrBuilder(); +} diff --git a/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/ComputeInsightsResponse.java b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/ComputeInsightsResponse.java new file mode 100644 index 000000000000..c2757a5f0084 --- /dev/null +++ b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/ComputeInsightsResponse.java @@ -0,0 +1,1076 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/areainsights/v1/area_insights_service.proto + +// Protobuf Java Version: 3.25.4 +package com.google.maps.areainsights.v1; + +/** + * + * + *
+ * Response for the ComputeInsights RPC.
+ * 
+ * + * Protobuf type {@code google.maps.areainsights.v1.ComputeInsightsResponse} + */ +public final class ComputeInsightsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.maps.areainsights.v1.ComputeInsightsResponse) + ComputeInsightsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ComputeInsightsResponse.newBuilder() to construct. + private ComputeInsightsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ComputeInsightsResponse() { + placeInsights_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ComputeInsightsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_ComputeInsightsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_ComputeInsightsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.areainsights.v1.ComputeInsightsResponse.class, + com.google.maps.areainsights.v1.ComputeInsightsResponse.Builder.class); + } + + private int bitField0_; + public static final int COUNT_FIELD_NUMBER = 1; + private long count_ = 0L; + /** + * + * + *
+   * Result for Insights.INSIGHT_COUNT.
+   * 
+ * + * optional int64 count = 1; + * + * @return Whether the count field is set. + */ + @java.lang.Override + public boolean hasCount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Result for Insights.INSIGHT_COUNT.
+   * 
+ * + * optional int64 count = 1; + * + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + + public static final int PLACE_INSIGHTS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List placeInsights_; + /** + * + * + *
+   * Result for Insights.INSIGHT_PLACES.
+   * 
+ * + * repeated .google.maps.areainsights.v1.PlaceInsight place_insights = 5; + */ + @java.lang.Override + public java.util.List getPlaceInsightsList() { + return placeInsights_; + } + /** + * + * + *
+   * Result for Insights.INSIGHT_PLACES.
+   * 
+ * + * repeated .google.maps.areainsights.v1.PlaceInsight place_insights = 5; + */ + @java.lang.Override + public java.util.List + getPlaceInsightsOrBuilderList() { + return placeInsights_; + } + /** + * + * + *
+   * Result for Insights.INSIGHT_PLACES.
+   * 
+ * + * repeated .google.maps.areainsights.v1.PlaceInsight place_insights = 5; + */ + @java.lang.Override + public int getPlaceInsightsCount() { + return placeInsights_.size(); + } + /** + * + * + *
+   * Result for Insights.INSIGHT_PLACES.
+   * 
+ * + * repeated .google.maps.areainsights.v1.PlaceInsight place_insights = 5; + */ + @java.lang.Override + public com.google.maps.areainsights.v1.PlaceInsight getPlaceInsights(int index) { + return placeInsights_.get(index); + } + /** + * + * + *
+   * Result for Insights.INSIGHT_PLACES.
+   * 
+ * + * repeated .google.maps.areainsights.v1.PlaceInsight place_insights = 5; + */ + @java.lang.Override + public com.google.maps.areainsights.v1.PlaceInsightOrBuilder getPlaceInsightsOrBuilder( + int index) { + return placeInsights_.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 (((bitField0_ & 0x00000001) != 0)) { + output.writeInt64(1, count_); + } + for (int i = 0; i < placeInsights_.size(); i++) { + output.writeMessage(5, placeInsights_.get(i)); + } + 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.computeInt64Size(1, count_); + } + for (int i = 0; i < placeInsights_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, placeInsights_.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.areainsights.v1.ComputeInsightsResponse)) { + return super.equals(obj); + } + com.google.maps.areainsights.v1.ComputeInsightsResponse other = + (com.google.maps.areainsights.v1.ComputeInsightsResponse) obj; + + if (hasCount() != other.hasCount()) return false; + if (hasCount()) { + if (getCount() != other.getCount()) return false; + } + if (!getPlaceInsightsList().equals(other.getPlaceInsightsList())) 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 (hasCount()) { + hash = (37 * hash) + COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCount()); + } + if (getPlaceInsightsCount() > 0) { + hash = (37 * hash) + PLACE_INSIGHTS_FIELD_NUMBER; + hash = (53 * hash) + getPlaceInsightsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.areainsights.v1.ComputeInsightsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.areainsights.v1.ComputeInsightsResponse 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.areainsights.v1.ComputeInsightsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.areainsights.v1.ComputeInsightsResponse 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.areainsights.v1.ComputeInsightsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.areainsights.v1.ComputeInsightsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.areainsights.v1.ComputeInsightsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.areainsights.v1.ComputeInsightsResponse 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.areainsights.v1.ComputeInsightsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.areainsights.v1.ComputeInsightsResponse 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.areainsights.v1.ComputeInsightsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.areainsights.v1.ComputeInsightsResponse 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.areainsights.v1.ComputeInsightsResponse 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 for the ComputeInsights RPC.
+   * 
+ * + * Protobuf type {@code google.maps.areainsights.v1.ComputeInsightsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.areainsights.v1.ComputeInsightsResponse) + com.google.maps.areainsights.v1.ComputeInsightsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_ComputeInsightsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_ComputeInsightsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.areainsights.v1.ComputeInsightsResponse.class, + com.google.maps.areainsights.v1.ComputeInsightsResponse.Builder.class); + } + + // Construct using com.google.maps.areainsights.v1.ComputeInsightsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + count_ = 0L; + if (placeInsightsBuilder_ == null) { + placeInsights_ = java.util.Collections.emptyList(); + } else { + placeInsights_ = null; + placeInsightsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_ComputeInsightsResponse_descriptor; + } + + @java.lang.Override + public com.google.maps.areainsights.v1.ComputeInsightsResponse getDefaultInstanceForType() { + return com.google.maps.areainsights.v1.ComputeInsightsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.areainsights.v1.ComputeInsightsResponse build() { + com.google.maps.areainsights.v1.ComputeInsightsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.areainsights.v1.ComputeInsightsResponse buildPartial() { + com.google.maps.areainsights.v1.ComputeInsightsResponse result = + new com.google.maps.areainsights.v1.ComputeInsightsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.maps.areainsights.v1.ComputeInsightsResponse result) { + if (placeInsightsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + placeInsights_ = java.util.Collections.unmodifiableList(placeInsights_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.placeInsights_ = placeInsights_; + } else { + result.placeInsights_ = placeInsightsBuilder_.build(); + } + } + + private void buildPartial0(com.google.maps.areainsights.v1.ComputeInsightsResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.count_ = count_; + to_bitField0_ |= 0x00000001; + } + 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.areainsights.v1.ComputeInsightsResponse) { + return mergeFrom((com.google.maps.areainsights.v1.ComputeInsightsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.areainsights.v1.ComputeInsightsResponse other) { + if (other == com.google.maps.areainsights.v1.ComputeInsightsResponse.getDefaultInstance()) + return this; + if (other.hasCount()) { + setCount(other.getCount()); + } + if (placeInsightsBuilder_ == null) { + if (!other.placeInsights_.isEmpty()) { + if (placeInsights_.isEmpty()) { + placeInsights_ = other.placeInsights_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePlaceInsightsIsMutable(); + placeInsights_.addAll(other.placeInsights_); + } + onChanged(); + } + } else { + if (!other.placeInsights_.isEmpty()) { + if (placeInsightsBuilder_.isEmpty()) { + placeInsightsBuilder_.dispose(); + placeInsightsBuilder_ = null; + placeInsights_ = other.placeInsights_; + bitField0_ = (bitField0_ & ~0x00000002); + placeInsightsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPlaceInsightsFieldBuilder() + : null; + } else { + placeInsightsBuilder_.addAllMessages(other.placeInsights_); + } + } + } + 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: + { + count_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 42: + { + com.google.maps.areainsights.v1.PlaceInsight m = + input.readMessage( + com.google.maps.areainsights.v1.PlaceInsight.parser(), extensionRegistry); + if (placeInsightsBuilder_ == null) { + ensurePlaceInsightsIsMutable(); + placeInsights_.add(m); + } else { + placeInsightsBuilder_.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 long count_; + /** + * + * + *
+     * Result for Insights.INSIGHT_COUNT.
+     * 
+ * + * optional int64 count = 1; + * + * @return Whether the count field is set. + */ + @java.lang.Override + public boolean hasCount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Result for Insights.INSIGHT_COUNT.
+     * 
+ * + * optional int64 count = 1; + * + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + /** + * + * + *
+     * Result for Insights.INSIGHT_COUNT.
+     * 
+ * + * optional int64 count = 1; + * + * @param value The count to set. + * @return This builder for chaining. + */ + public Builder setCount(long value) { + + count_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Result for Insights.INSIGHT_COUNT.
+     * 
+ * + * optional int64 count = 1; + * + * @return This builder for chaining. + */ + public Builder clearCount() { + bitField0_ = (bitField0_ & ~0x00000001); + count_ = 0L; + onChanged(); + return this; + } + + private java.util.List placeInsights_ = + java.util.Collections.emptyList(); + + private void ensurePlaceInsightsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + placeInsights_ = + new java.util.ArrayList(placeInsights_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.areainsights.v1.PlaceInsight, + com.google.maps.areainsights.v1.PlaceInsight.Builder, + com.google.maps.areainsights.v1.PlaceInsightOrBuilder> + placeInsightsBuilder_; + + /** + * + * + *
+     * Result for Insights.INSIGHT_PLACES.
+     * 
+ * + * repeated .google.maps.areainsights.v1.PlaceInsight place_insights = 5; + */ + public java.util.List getPlaceInsightsList() { + if (placeInsightsBuilder_ == null) { + return java.util.Collections.unmodifiableList(placeInsights_); + } else { + return placeInsightsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Result for Insights.INSIGHT_PLACES.
+     * 
+ * + * repeated .google.maps.areainsights.v1.PlaceInsight place_insights = 5; + */ + public int getPlaceInsightsCount() { + if (placeInsightsBuilder_ == null) { + return placeInsights_.size(); + } else { + return placeInsightsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Result for Insights.INSIGHT_PLACES.
+     * 
+ * + * repeated .google.maps.areainsights.v1.PlaceInsight place_insights = 5; + */ + public com.google.maps.areainsights.v1.PlaceInsight getPlaceInsights(int index) { + if (placeInsightsBuilder_ == null) { + return placeInsights_.get(index); + } else { + return placeInsightsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Result for Insights.INSIGHT_PLACES.
+     * 
+ * + * repeated .google.maps.areainsights.v1.PlaceInsight place_insights = 5; + */ + public Builder setPlaceInsights(int index, com.google.maps.areainsights.v1.PlaceInsight value) { + if (placeInsightsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePlaceInsightsIsMutable(); + placeInsights_.set(index, value); + onChanged(); + } else { + placeInsightsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Result for Insights.INSIGHT_PLACES.
+     * 
+ * + * repeated .google.maps.areainsights.v1.PlaceInsight place_insights = 5; + */ + public Builder setPlaceInsights( + int index, com.google.maps.areainsights.v1.PlaceInsight.Builder builderForValue) { + if (placeInsightsBuilder_ == null) { + ensurePlaceInsightsIsMutable(); + placeInsights_.set(index, builderForValue.build()); + onChanged(); + } else { + placeInsightsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Result for Insights.INSIGHT_PLACES.
+     * 
+ * + * repeated .google.maps.areainsights.v1.PlaceInsight place_insights = 5; + */ + public Builder addPlaceInsights(com.google.maps.areainsights.v1.PlaceInsight value) { + if (placeInsightsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePlaceInsightsIsMutable(); + placeInsights_.add(value); + onChanged(); + } else { + placeInsightsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Result for Insights.INSIGHT_PLACES.
+     * 
+ * + * repeated .google.maps.areainsights.v1.PlaceInsight place_insights = 5; + */ + public Builder addPlaceInsights(int index, com.google.maps.areainsights.v1.PlaceInsight value) { + if (placeInsightsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePlaceInsightsIsMutable(); + placeInsights_.add(index, value); + onChanged(); + } else { + placeInsightsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Result for Insights.INSIGHT_PLACES.
+     * 
+ * + * repeated .google.maps.areainsights.v1.PlaceInsight place_insights = 5; + */ + public Builder addPlaceInsights( + com.google.maps.areainsights.v1.PlaceInsight.Builder builderForValue) { + if (placeInsightsBuilder_ == null) { + ensurePlaceInsightsIsMutable(); + placeInsights_.add(builderForValue.build()); + onChanged(); + } else { + placeInsightsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Result for Insights.INSIGHT_PLACES.
+     * 
+ * + * repeated .google.maps.areainsights.v1.PlaceInsight place_insights = 5; + */ + public Builder addPlaceInsights( + int index, com.google.maps.areainsights.v1.PlaceInsight.Builder builderForValue) { + if (placeInsightsBuilder_ == null) { + ensurePlaceInsightsIsMutable(); + placeInsights_.add(index, builderForValue.build()); + onChanged(); + } else { + placeInsightsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Result for Insights.INSIGHT_PLACES.
+     * 
+ * + * repeated .google.maps.areainsights.v1.PlaceInsight place_insights = 5; + */ + public Builder addAllPlaceInsights( + java.lang.Iterable values) { + if (placeInsightsBuilder_ == null) { + ensurePlaceInsightsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, placeInsights_); + onChanged(); + } else { + placeInsightsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Result for Insights.INSIGHT_PLACES.
+     * 
+ * + * repeated .google.maps.areainsights.v1.PlaceInsight place_insights = 5; + */ + public Builder clearPlaceInsights() { + if (placeInsightsBuilder_ == null) { + placeInsights_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + placeInsightsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Result for Insights.INSIGHT_PLACES.
+     * 
+ * + * repeated .google.maps.areainsights.v1.PlaceInsight place_insights = 5; + */ + public Builder removePlaceInsights(int index) { + if (placeInsightsBuilder_ == null) { + ensurePlaceInsightsIsMutable(); + placeInsights_.remove(index); + onChanged(); + } else { + placeInsightsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Result for Insights.INSIGHT_PLACES.
+     * 
+ * + * repeated .google.maps.areainsights.v1.PlaceInsight place_insights = 5; + */ + public com.google.maps.areainsights.v1.PlaceInsight.Builder getPlaceInsightsBuilder(int index) { + return getPlaceInsightsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Result for Insights.INSIGHT_PLACES.
+     * 
+ * + * repeated .google.maps.areainsights.v1.PlaceInsight place_insights = 5; + */ + public com.google.maps.areainsights.v1.PlaceInsightOrBuilder getPlaceInsightsOrBuilder( + int index) { + if (placeInsightsBuilder_ == null) { + return placeInsights_.get(index); + } else { + return placeInsightsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Result for Insights.INSIGHT_PLACES.
+     * 
+ * + * repeated .google.maps.areainsights.v1.PlaceInsight place_insights = 5; + */ + public java.util.List + getPlaceInsightsOrBuilderList() { + if (placeInsightsBuilder_ != null) { + return placeInsightsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(placeInsights_); + } + } + /** + * + * + *
+     * Result for Insights.INSIGHT_PLACES.
+     * 
+ * + * repeated .google.maps.areainsights.v1.PlaceInsight place_insights = 5; + */ + public com.google.maps.areainsights.v1.PlaceInsight.Builder addPlaceInsightsBuilder() { + return getPlaceInsightsFieldBuilder() + .addBuilder(com.google.maps.areainsights.v1.PlaceInsight.getDefaultInstance()); + } + /** + * + * + *
+     * Result for Insights.INSIGHT_PLACES.
+     * 
+ * + * repeated .google.maps.areainsights.v1.PlaceInsight place_insights = 5; + */ + public com.google.maps.areainsights.v1.PlaceInsight.Builder addPlaceInsightsBuilder(int index) { + return getPlaceInsightsFieldBuilder() + .addBuilder(index, com.google.maps.areainsights.v1.PlaceInsight.getDefaultInstance()); + } + /** + * + * + *
+     * Result for Insights.INSIGHT_PLACES.
+     * 
+ * + * repeated .google.maps.areainsights.v1.PlaceInsight place_insights = 5; + */ + public java.util.List + getPlaceInsightsBuilderList() { + return getPlaceInsightsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.areainsights.v1.PlaceInsight, + com.google.maps.areainsights.v1.PlaceInsight.Builder, + com.google.maps.areainsights.v1.PlaceInsightOrBuilder> + getPlaceInsightsFieldBuilder() { + if (placeInsightsBuilder_ == null) { + placeInsightsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.areainsights.v1.PlaceInsight, + com.google.maps.areainsights.v1.PlaceInsight.Builder, + com.google.maps.areainsights.v1.PlaceInsightOrBuilder>( + placeInsights_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + placeInsights_ = null; + } + return placeInsightsBuilder_; + } + + @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.areainsights.v1.ComputeInsightsResponse) + } + + // @@protoc_insertion_point(class_scope:google.maps.areainsights.v1.ComputeInsightsResponse) + private static final com.google.maps.areainsights.v1.ComputeInsightsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.areainsights.v1.ComputeInsightsResponse(); + } + + public static com.google.maps.areainsights.v1.ComputeInsightsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ComputeInsightsResponse 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.areainsights.v1.ComputeInsightsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/ComputeInsightsResponseOrBuilder.java b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/ComputeInsightsResponseOrBuilder.java new file mode 100644 index 000000000000..16b166c9c267 --- /dev/null +++ b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/ComputeInsightsResponseOrBuilder.java @@ -0,0 +1,103 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/areainsights/v1/area_insights_service.proto + +// Protobuf Java Version: 3.25.4 +package com.google.maps.areainsights.v1; + +public interface ComputeInsightsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.areainsights.v1.ComputeInsightsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Result for Insights.INSIGHT_COUNT.
+   * 
+ * + * optional int64 count = 1; + * + * @return Whether the count field is set. + */ + boolean hasCount(); + /** + * + * + *
+   * Result for Insights.INSIGHT_COUNT.
+   * 
+ * + * optional int64 count = 1; + * + * @return The count. + */ + long getCount(); + + /** + * + * + *
+   * Result for Insights.INSIGHT_PLACES.
+   * 
+ * + * repeated .google.maps.areainsights.v1.PlaceInsight place_insights = 5; + */ + java.util.List getPlaceInsightsList(); + /** + * + * + *
+   * Result for Insights.INSIGHT_PLACES.
+   * 
+ * + * repeated .google.maps.areainsights.v1.PlaceInsight place_insights = 5; + */ + com.google.maps.areainsights.v1.PlaceInsight getPlaceInsights(int index); + /** + * + * + *
+   * Result for Insights.INSIGHT_PLACES.
+   * 
+ * + * repeated .google.maps.areainsights.v1.PlaceInsight place_insights = 5; + */ + int getPlaceInsightsCount(); + /** + * + * + *
+   * Result for Insights.INSIGHT_PLACES.
+   * 
+ * + * repeated .google.maps.areainsights.v1.PlaceInsight place_insights = 5; + */ + java.util.List + getPlaceInsightsOrBuilderList(); + /** + * + * + *
+   * Result for Insights.INSIGHT_PLACES.
+   * 
+ * + * repeated .google.maps.areainsights.v1.PlaceInsight place_insights = 5; + */ + com.google.maps.areainsights.v1.PlaceInsightOrBuilder getPlaceInsightsOrBuilder(int index); +} diff --git a/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/Filter.java b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/Filter.java new file mode 100644 index 000000000000..22c6ab56328a --- /dev/null +++ b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/Filter.java @@ -0,0 +1,2278 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/areainsights/v1/area_insights_service.proto + +// Protobuf Java Version: 3.25.4 +package com.google.maps.areainsights.v1; + +/** + * + * + *
+ * Filters for the ComputeInsights RPC.
+ * 
+ * + * Protobuf type {@code google.maps.areainsights.v1.Filter} + */ +public final class Filter extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.maps.areainsights.v1.Filter) + FilterOrBuilder { + private static final long serialVersionUID = 0L; + // Use Filter.newBuilder() to construct. + private Filter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Filter() { + operatingStatus_ = java.util.Collections.emptyList(); + priceLevels_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Filter(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_Filter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_Filter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.areainsights.v1.Filter.class, + com.google.maps.areainsights.v1.Filter.Builder.class); + } + + private int bitField0_; + public static final int LOCATION_FILTER_FIELD_NUMBER = 1; + private com.google.maps.areainsights.v1.LocationFilter locationFilter_; + /** + * + * + *
+   * Required. Restricts results to places which are located in the area
+   * specified by location filters.
+   * 
+ * + * + * .google.maps.areainsights.v1.LocationFilter location_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the locationFilter field is set. + */ + @java.lang.Override + public boolean hasLocationFilter() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. Restricts results to places which are located in the area
+   * specified by location filters.
+   * 
+ * + * + * .google.maps.areainsights.v1.LocationFilter location_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The locationFilter. + */ + @java.lang.Override + public com.google.maps.areainsights.v1.LocationFilter getLocationFilter() { + return locationFilter_ == null + ? com.google.maps.areainsights.v1.LocationFilter.getDefaultInstance() + : locationFilter_; + } + /** + * + * + *
+   * Required. Restricts results to places which are located in the area
+   * specified by location filters.
+   * 
+ * + * + * .google.maps.areainsights.v1.LocationFilter location_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.maps.areainsights.v1.LocationFilterOrBuilder getLocationFilterOrBuilder() { + return locationFilter_ == null + ? com.google.maps.areainsights.v1.LocationFilter.getDefaultInstance() + : locationFilter_; + } + + public static final int TYPE_FILTER_FIELD_NUMBER = 2; + private com.google.maps.areainsights.v1.TypeFilter typeFilter_; + /** + * + * + *
+   * Required. Place type filters.
+   * 
+ * + * + * .google.maps.areainsights.v1.TypeFilter type_filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the typeFilter field is set. + */ + @java.lang.Override + public boolean hasTypeFilter() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Required. Place type filters.
+   * 
+ * + * + * .google.maps.areainsights.v1.TypeFilter type_filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The typeFilter. + */ + @java.lang.Override + public com.google.maps.areainsights.v1.TypeFilter getTypeFilter() { + return typeFilter_ == null + ? com.google.maps.areainsights.v1.TypeFilter.getDefaultInstance() + : typeFilter_; + } + /** + * + * + *
+   * Required. Place type filters.
+   * 
+ * + * + * .google.maps.areainsights.v1.TypeFilter type_filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.maps.areainsights.v1.TypeFilterOrBuilder getTypeFilterOrBuilder() { + return typeFilter_ == null + ? com.google.maps.areainsights.v1.TypeFilter.getDefaultInstance() + : typeFilter_; + } + + public static final int OPERATING_STATUS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List operatingStatus_; + + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.maps.areainsights.v1.OperatingStatus> + operatingStatus_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.maps.areainsights.v1.OperatingStatus>() { + public com.google.maps.areainsights.v1.OperatingStatus convert(java.lang.Integer from) { + com.google.maps.areainsights.v1.OperatingStatus result = + com.google.maps.areainsights.v1.OperatingStatus.forNumber(from); + return result == null + ? com.google.maps.areainsights.v1.OperatingStatus.UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+   * Optional. Restricts results to places whose operating status is included on
+   * this list. If operating_status is not set, OPERATING_STATUS_OPERATIONAL is
+   * used as default.
+   * 
+ * + * + * repeated .google.maps.areainsights.v1.OperatingStatus operating_status = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the operatingStatus. + */ + @java.lang.Override + public java.util.List getOperatingStatusList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.maps.areainsights.v1.OperatingStatus>( + operatingStatus_, operatingStatus_converter_); + } + /** + * + * + *
+   * Optional. Restricts results to places whose operating status is included on
+   * this list. If operating_status is not set, OPERATING_STATUS_OPERATIONAL is
+   * used as default.
+   * 
+ * + * + * repeated .google.maps.areainsights.v1.OperatingStatus operating_status = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of operatingStatus. + */ + @java.lang.Override + public int getOperatingStatusCount() { + return operatingStatus_.size(); + } + /** + * + * + *
+   * Optional. Restricts results to places whose operating status is included on
+   * this list. If operating_status is not set, OPERATING_STATUS_OPERATIONAL is
+   * used as default.
+   * 
+ * + * + * repeated .google.maps.areainsights.v1.OperatingStatus operating_status = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The operatingStatus at the given index. + */ + @java.lang.Override + public com.google.maps.areainsights.v1.OperatingStatus getOperatingStatus(int index) { + return operatingStatus_converter_.convert(operatingStatus_.get(index)); + } + /** + * + * + *
+   * Optional. Restricts results to places whose operating status is included on
+   * this list. If operating_status is not set, OPERATING_STATUS_OPERATIONAL is
+   * used as default.
+   * 
+ * + * + * repeated .google.maps.areainsights.v1.OperatingStatus operating_status = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for operatingStatus. + */ + @java.lang.Override + public java.util.List getOperatingStatusValueList() { + return operatingStatus_; + } + /** + * + * + *
+   * Optional. Restricts results to places whose operating status is included on
+   * this list. If operating_status is not set, OPERATING_STATUS_OPERATIONAL is
+   * used as default.
+   * 
+ * + * + * repeated .google.maps.areainsights.v1.OperatingStatus operating_status = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of operatingStatus at the given index. + */ + @java.lang.Override + public int getOperatingStatusValue(int index) { + return operatingStatus_.get(index); + } + + private int operatingStatusMemoizedSerializedSize; + + public static final int PRICE_LEVELS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List priceLevels_; + + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.maps.areainsights.v1.PriceLevel> + priceLevels_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.maps.areainsights.v1.PriceLevel>() { + public com.google.maps.areainsights.v1.PriceLevel convert(java.lang.Integer from) { + com.google.maps.areainsights.v1.PriceLevel result = + com.google.maps.areainsights.v1.PriceLevel.forNumber(from); + return result == null + ? com.google.maps.areainsights.v1.PriceLevel.UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+   * Optional. Restricts results to places whose price level is included on this
+   * list. If price_level is not set, all price levels are included in the
+   * results.
+   * 
+ * + * + * repeated .google.maps.areainsights.v1.PriceLevel price_levels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @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.areainsights.v1.PriceLevel>( + priceLevels_, priceLevels_converter_); + } + /** + * + * + *
+   * Optional. Restricts results to places whose price level is included on this
+   * list. If price_level is not set, all price levels are included in the
+   * results.
+   * 
+ * + * + * repeated .google.maps.areainsights.v1.PriceLevel price_levels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of priceLevels. + */ + @java.lang.Override + public int getPriceLevelsCount() { + return priceLevels_.size(); + } + /** + * + * + *
+   * Optional. Restricts results to places whose price level is included on this
+   * list. If price_level is not set, all price levels are included in the
+   * results.
+   * 
+ * + * + * repeated .google.maps.areainsights.v1.PriceLevel price_levels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The priceLevels at the given index. + */ + @java.lang.Override + public com.google.maps.areainsights.v1.PriceLevel getPriceLevels(int index) { + return priceLevels_converter_.convert(priceLevels_.get(index)); + } + /** + * + * + *
+   * Optional. Restricts results to places whose price level is included on this
+   * list. If price_level is not set, all price levels are included in the
+   * results.
+   * 
+ * + * + * repeated .google.maps.areainsights.v1.PriceLevel price_levels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for priceLevels. + */ + @java.lang.Override + public java.util.List getPriceLevelsValueList() { + return priceLevels_; + } + /** + * + * + *
+   * Optional. Restricts results to places whose price level is included on this
+   * list. If price_level is not set, all price levels are included in the
+   * results.
+   * 
+ * + * + * repeated .google.maps.areainsights.v1.PriceLevel price_levels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @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 RATING_FILTER_FIELD_NUMBER = 5; + private com.google.maps.areainsights.v1.RatingFilter ratingFilter_; + /** + * + * + *
+   * Optional. Restricts results to places whose average user ratings are in the
+   * range specified by rating_filter. If rating_filter is not set, all ratings
+   * are included in the result.
+   * 
+ * + * + * .google.maps.areainsights.v1.RatingFilter rating_filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the ratingFilter field is set. + */ + @java.lang.Override + public boolean hasRatingFilter() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Optional. Restricts results to places whose average user ratings are in the
+   * range specified by rating_filter. If rating_filter is not set, all ratings
+   * are included in the result.
+   * 
+ * + * + * .google.maps.areainsights.v1.RatingFilter rating_filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The ratingFilter. + */ + @java.lang.Override + public com.google.maps.areainsights.v1.RatingFilter getRatingFilter() { + return ratingFilter_ == null + ? com.google.maps.areainsights.v1.RatingFilter.getDefaultInstance() + : ratingFilter_; + } + /** + * + * + *
+   * Optional. Restricts results to places whose average user ratings are in the
+   * range specified by rating_filter. If rating_filter is not set, all ratings
+   * are included in the result.
+   * 
+ * + * + * .google.maps.areainsights.v1.RatingFilter rating_filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.maps.areainsights.v1.RatingFilterOrBuilder getRatingFilterOrBuilder() { + return ratingFilter_ == null + ? com.google.maps.areainsights.v1.RatingFilter.getDefaultInstance() + : ratingFilter_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getLocationFilter()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getTypeFilter()); + } + if (getOperatingStatusList().size() > 0) { + output.writeUInt32NoTag(26); + output.writeUInt32NoTag(operatingStatusMemoizedSerializedSize); + } + for (int i = 0; i < operatingStatus_.size(); i++) { + output.writeEnumNoTag(operatingStatus_.get(i)); + } + if (getPriceLevelsList().size() > 0) { + output.writeUInt32NoTag(34); + output.writeUInt32NoTag(priceLevelsMemoizedSerializedSize); + } + for (int i = 0; i < priceLevels_.size(); i++) { + output.writeEnumNoTag(priceLevels_.get(i)); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(5, getRatingFilter()); + } + 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.computeMessageSize(1, getLocationFilter()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTypeFilter()); + } + { + int dataSize = 0; + for (int i = 0; i < operatingStatus_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(operatingStatus_.get(i)); + } + size += dataSize; + if (!getOperatingStatusList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + operatingStatusMemoizedSerializedSize = dataSize; + } + { + 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 (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getRatingFilter()); + } + 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.areainsights.v1.Filter)) { + return super.equals(obj); + } + com.google.maps.areainsights.v1.Filter other = (com.google.maps.areainsights.v1.Filter) obj; + + if (hasLocationFilter() != other.hasLocationFilter()) return false; + if (hasLocationFilter()) { + if (!getLocationFilter().equals(other.getLocationFilter())) return false; + } + if (hasTypeFilter() != other.hasTypeFilter()) return false; + if (hasTypeFilter()) { + if (!getTypeFilter().equals(other.getTypeFilter())) return false; + } + if (!operatingStatus_.equals(other.operatingStatus_)) return false; + if (!priceLevels_.equals(other.priceLevels_)) return false; + if (hasRatingFilter() != other.hasRatingFilter()) return false; + if (hasRatingFilter()) { + if (!getRatingFilter().equals(other.getRatingFilter())) 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 (hasLocationFilter()) { + hash = (37 * hash) + LOCATION_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getLocationFilter().hashCode(); + } + if (hasTypeFilter()) { + hash = (37 * hash) + TYPE_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getTypeFilter().hashCode(); + } + if (getOperatingStatusCount() > 0) { + hash = (37 * hash) + OPERATING_STATUS_FIELD_NUMBER; + hash = (53 * hash) + operatingStatus_.hashCode(); + } + if (getPriceLevelsCount() > 0) { + hash = (37 * hash) + PRICE_LEVELS_FIELD_NUMBER; + hash = (53 * hash) + priceLevels_.hashCode(); + } + if (hasRatingFilter()) { + hash = (37 * hash) + RATING_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getRatingFilter().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.areainsights.v1.Filter parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.areainsights.v1.Filter 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.areainsights.v1.Filter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.areainsights.v1.Filter 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.areainsights.v1.Filter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.areainsights.v1.Filter parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.areainsights.v1.Filter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.areainsights.v1.Filter 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.areainsights.v1.Filter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.areainsights.v1.Filter 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.areainsights.v1.Filter parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.areainsights.v1.Filter 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.areainsights.v1.Filter 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; + } + /** + * + * + *
+   * Filters for the ComputeInsights RPC.
+   * 
+ * + * Protobuf type {@code google.maps.areainsights.v1.Filter} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.areainsights.v1.Filter) + com.google.maps.areainsights.v1.FilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_Filter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_Filter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.areainsights.v1.Filter.class, + com.google.maps.areainsights.v1.Filter.Builder.class); + } + + // Construct using com.google.maps.areainsights.v1.Filter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getLocationFilterFieldBuilder(); + getTypeFilterFieldBuilder(); + getRatingFilterFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + locationFilter_ = null; + if (locationFilterBuilder_ != null) { + locationFilterBuilder_.dispose(); + locationFilterBuilder_ = null; + } + typeFilter_ = null; + if (typeFilterBuilder_ != null) { + typeFilterBuilder_.dispose(); + typeFilterBuilder_ = null; + } + operatingStatus_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + priceLevels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ratingFilter_ = null; + if (ratingFilterBuilder_ != null) { + ratingFilterBuilder_.dispose(); + ratingFilterBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_Filter_descriptor; + } + + @java.lang.Override + public com.google.maps.areainsights.v1.Filter getDefaultInstanceForType() { + return com.google.maps.areainsights.v1.Filter.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.areainsights.v1.Filter build() { + com.google.maps.areainsights.v1.Filter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.areainsights.v1.Filter buildPartial() { + com.google.maps.areainsights.v1.Filter result = + new com.google.maps.areainsights.v1.Filter(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.maps.areainsights.v1.Filter result) { + if (((bitField0_ & 0x00000004) != 0)) { + operatingStatus_ = java.util.Collections.unmodifiableList(operatingStatus_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.operatingStatus_ = operatingStatus_; + if (((bitField0_ & 0x00000008) != 0)) { + priceLevels_ = java.util.Collections.unmodifiableList(priceLevels_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.priceLevels_ = priceLevels_; + } + + private void buildPartial0(com.google.maps.areainsights.v1.Filter result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.locationFilter_ = + locationFilterBuilder_ == null ? locationFilter_ : locationFilterBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.typeFilter_ = typeFilterBuilder_ == null ? typeFilter_ : typeFilterBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.ratingFilter_ = + ratingFilterBuilder_ == null ? ratingFilter_ : ratingFilterBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + 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.areainsights.v1.Filter) { + return mergeFrom((com.google.maps.areainsights.v1.Filter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.areainsights.v1.Filter other) { + if (other == com.google.maps.areainsights.v1.Filter.getDefaultInstance()) return this; + if (other.hasLocationFilter()) { + mergeLocationFilter(other.getLocationFilter()); + } + if (other.hasTypeFilter()) { + mergeTypeFilter(other.getTypeFilter()); + } + if (!other.operatingStatus_.isEmpty()) { + if (operatingStatus_.isEmpty()) { + operatingStatus_ = other.operatingStatus_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureOperatingStatusIsMutable(); + operatingStatus_.addAll(other.operatingStatus_); + } + onChanged(); + } + if (!other.priceLevels_.isEmpty()) { + if (priceLevels_.isEmpty()) { + priceLevels_ = other.priceLevels_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensurePriceLevelsIsMutable(); + priceLevels_.addAll(other.priceLevels_); + } + onChanged(); + } + if (other.hasRatingFilter()) { + mergeRatingFilter(other.getRatingFilter()); + } + 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(getLocationFilterFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getTypeFilterFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + int tmpRaw = input.readEnum(); + ensureOperatingStatusIsMutable(); + operatingStatus_.add(tmpRaw); + break; + } // case 24 + case 26: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureOperatingStatusIsMutable(); + operatingStatus_.add(tmpRaw); + } + input.popLimit(oldLimit); + break; + } // case 26 + case 32: + { + int tmpRaw = input.readEnum(); + ensurePriceLevelsIsMutable(); + priceLevels_.add(tmpRaw); + break; + } // case 32 + case 34: + { + 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 34 + case 42: + { + input.readMessage(getRatingFilterFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + 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 com.google.maps.areainsights.v1.LocationFilter locationFilter_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.areainsights.v1.LocationFilter, + com.google.maps.areainsights.v1.LocationFilter.Builder, + com.google.maps.areainsights.v1.LocationFilterOrBuilder> + locationFilterBuilder_; + /** + * + * + *
+     * Required. Restricts results to places which are located in the area
+     * specified by location filters.
+     * 
+ * + * + * .google.maps.areainsights.v1.LocationFilter location_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the locationFilter field is set. + */ + public boolean hasLocationFilter() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. Restricts results to places which are located in the area
+     * specified by location filters.
+     * 
+ * + * + * .google.maps.areainsights.v1.LocationFilter location_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The locationFilter. + */ + public com.google.maps.areainsights.v1.LocationFilter getLocationFilter() { + if (locationFilterBuilder_ == null) { + return locationFilter_ == null + ? com.google.maps.areainsights.v1.LocationFilter.getDefaultInstance() + : locationFilter_; + } else { + return locationFilterBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Restricts results to places which are located in the area
+     * specified by location filters.
+     * 
+ * + * + * .google.maps.areainsights.v1.LocationFilter location_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setLocationFilter(com.google.maps.areainsights.v1.LocationFilter value) { + if (locationFilterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + locationFilter_ = value; + } else { + locationFilterBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Restricts results to places which are located in the area
+     * specified by location filters.
+     * 
+ * + * + * .google.maps.areainsights.v1.LocationFilter location_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setLocationFilter( + com.google.maps.areainsights.v1.LocationFilter.Builder builderForValue) { + if (locationFilterBuilder_ == null) { + locationFilter_ = builderForValue.build(); + } else { + locationFilterBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Restricts results to places which are located in the area
+     * specified by location filters.
+     * 
+ * + * + * .google.maps.areainsights.v1.LocationFilter location_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeLocationFilter(com.google.maps.areainsights.v1.LocationFilter value) { + if (locationFilterBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && locationFilter_ != null + && locationFilter_ + != com.google.maps.areainsights.v1.LocationFilter.getDefaultInstance()) { + getLocationFilterBuilder().mergeFrom(value); + } else { + locationFilter_ = value; + } + } else { + locationFilterBuilder_.mergeFrom(value); + } + if (locationFilter_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. Restricts results to places which are located in the area
+     * specified by location filters.
+     * 
+ * + * + * .google.maps.areainsights.v1.LocationFilter location_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearLocationFilter() { + bitField0_ = (bitField0_ & ~0x00000001); + locationFilter_ = null; + if (locationFilterBuilder_ != null) { + locationFilterBuilder_.dispose(); + locationFilterBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Restricts results to places which are located in the area
+     * specified by location filters.
+     * 
+ * + * + * .google.maps.areainsights.v1.LocationFilter location_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.maps.areainsights.v1.LocationFilter.Builder getLocationFilterBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getLocationFilterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Restricts results to places which are located in the area
+     * specified by location filters.
+     * 
+ * + * + * .google.maps.areainsights.v1.LocationFilter location_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.maps.areainsights.v1.LocationFilterOrBuilder getLocationFilterOrBuilder() { + if (locationFilterBuilder_ != null) { + return locationFilterBuilder_.getMessageOrBuilder(); + } else { + return locationFilter_ == null + ? com.google.maps.areainsights.v1.LocationFilter.getDefaultInstance() + : locationFilter_; + } + } + /** + * + * + *
+     * Required. Restricts results to places which are located in the area
+     * specified by location filters.
+     * 
+ * + * + * .google.maps.areainsights.v1.LocationFilter location_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.areainsights.v1.LocationFilter, + com.google.maps.areainsights.v1.LocationFilter.Builder, + com.google.maps.areainsights.v1.LocationFilterOrBuilder> + getLocationFilterFieldBuilder() { + if (locationFilterBuilder_ == null) { + locationFilterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.areainsights.v1.LocationFilter, + com.google.maps.areainsights.v1.LocationFilter.Builder, + com.google.maps.areainsights.v1.LocationFilterOrBuilder>( + getLocationFilter(), getParentForChildren(), isClean()); + locationFilter_ = null; + } + return locationFilterBuilder_; + } + + private com.google.maps.areainsights.v1.TypeFilter typeFilter_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.areainsights.v1.TypeFilter, + com.google.maps.areainsights.v1.TypeFilter.Builder, + com.google.maps.areainsights.v1.TypeFilterOrBuilder> + typeFilterBuilder_; + /** + * + * + *
+     * Required. Place type filters.
+     * 
+ * + * + * .google.maps.areainsights.v1.TypeFilter type_filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the typeFilter field is set. + */ + public boolean hasTypeFilter() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. Place type filters.
+     * 
+ * + * + * .google.maps.areainsights.v1.TypeFilter type_filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The typeFilter. + */ + public com.google.maps.areainsights.v1.TypeFilter getTypeFilter() { + if (typeFilterBuilder_ == null) { + return typeFilter_ == null + ? com.google.maps.areainsights.v1.TypeFilter.getDefaultInstance() + : typeFilter_; + } else { + return typeFilterBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Place type filters.
+     * 
+ * + * + * .google.maps.areainsights.v1.TypeFilter type_filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTypeFilter(com.google.maps.areainsights.v1.TypeFilter value) { + if (typeFilterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + typeFilter_ = value; + } else { + typeFilterBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Place type filters.
+     * 
+ * + * + * .google.maps.areainsights.v1.TypeFilter type_filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTypeFilter( + com.google.maps.areainsights.v1.TypeFilter.Builder builderForValue) { + if (typeFilterBuilder_ == null) { + typeFilter_ = builderForValue.build(); + } else { + typeFilterBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Place type filters.
+     * 
+ * + * + * .google.maps.areainsights.v1.TypeFilter type_filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTypeFilter(com.google.maps.areainsights.v1.TypeFilter value) { + if (typeFilterBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && typeFilter_ != null + && typeFilter_ != com.google.maps.areainsights.v1.TypeFilter.getDefaultInstance()) { + getTypeFilterBuilder().mergeFrom(value); + } else { + typeFilter_ = value; + } + } else { + typeFilterBuilder_.mergeFrom(value); + } + if (typeFilter_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. Place type filters.
+     * 
+ * + * + * .google.maps.areainsights.v1.TypeFilter type_filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTypeFilter() { + bitField0_ = (bitField0_ & ~0x00000002); + typeFilter_ = null; + if (typeFilterBuilder_ != null) { + typeFilterBuilder_.dispose(); + typeFilterBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Place type filters.
+     * 
+ * + * + * .google.maps.areainsights.v1.TypeFilter type_filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.maps.areainsights.v1.TypeFilter.Builder getTypeFilterBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getTypeFilterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Place type filters.
+     * 
+ * + * + * .google.maps.areainsights.v1.TypeFilter type_filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.maps.areainsights.v1.TypeFilterOrBuilder getTypeFilterOrBuilder() { + if (typeFilterBuilder_ != null) { + return typeFilterBuilder_.getMessageOrBuilder(); + } else { + return typeFilter_ == null + ? com.google.maps.areainsights.v1.TypeFilter.getDefaultInstance() + : typeFilter_; + } + } + /** + * + * + *
+     * Required. Place type filters.
+     * 
+ * + * + * .google.maps.areainsights.v1.TypeFilter type_filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.areainsights.v1.TypeFilter, + com.google.maps.areainsights.v1.TypeFilter.Builder, + com.google.maps.areainsights.v1.TypeFilterOrBuilder> + getTypeFilterFieldBuilder() { + if (typeFilterBuilder_ == null) { + typeFilterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.areainsights.v1.TypeFilter, + com.google.maps.areainsights.v1.TypeFilter.Builder, + com.google.maps.areainsights.v1.TypeFilterOrBuilder>( + getTypeFilter(), getParentForChildren(), isClean()); + typeFilter_ = null; + } + return typeFilterBuilder_; + } + + private java.util.List operatingStatus_ = java.util.Collections.emptyList(); + + private void ensureOperatingStatusIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + operatingStatus_ = new java.util.ArrayList(operatingStatus_); + bitField0_ |= 0x00000004; + } + } + /** + * + * + *
+     * Optional. Restricts results to places whose operating status is included on
+     * this list. If operating_status is not set, OPERATING_STATUS_OPERATIONAL is
+     * used as default.
+     * 
+ * + * + * repeated .google.maps.areainsights.v1.OperatingStatus operating_status = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the operatingStatus. + */ + public java.util.List + getOperatingStatusList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.maps.areainsights.v1.OperatingStatus>( + operatingStatus_, operatingStatus_converter_); + } + /** + * + * + *
+     * Optional. Restricts results to places whose operating status is included on
+     * this list. If operating_status is not set, OPERATING_STATUS_OPERATIONAL is
+     * used as default.
+     * 
+ * + * + * repeated .google.maps.areainsights.v1.OperatingStatus operating_status = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of operatingStatus. + */ + public int getOperatingStatusCount() { + return operatingStatus_.size(); + } + /** + * + * + *
+     * Optional. Restricts results to places whose operating status is included on
+     * this list. If operating_status is not set, OPERATING_STATUS_OPERATIONAL is
+     * used as default.
+     * 
+ * + * + * repeated .google.maps.areainsights.v1.OperatingStatus operating_status = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The operatingStatus at the given index. + */ + public com.google.maps.areainsights.v1.OperatingStatus getOperatingStatus(int index) { + return operatingStatus_converter_.convert(operatingStatus_.get(index)); + } + /** + * + * + *
+     * Optional. Restricts results to places whose operating status is included on
+     * this list. If operating_status is not set, OPERATING_STATUS_OPERATIONAL is
+     * used as default.
+     * 
+ * + * + * repeated .google.maps.areainsights.v1.OperatingStatus operating_status = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The operatingStatus to set. + * @return This builder for chaining. + */ + public Builder setOperatingStatus( + int index, com.google.maps.areainsights.v1.OperatingStatus value) { + if (value == null) { + throw new NullPointerException(); + } + ensureOperatingStatusIsMutable(); + operatingStatus_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Restricts results to places whose operating status is included on
+     * this list. If operating_status is not set, OPERATING_STATUS_OPERATIONAL is
+     * used as default.
+     * 
+ * + * + * repeated .google.maps.areainsights.v1.OperatingStatus operating_status = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The operatingStatus to add. + * @return This builder for chaining. + */ + public Builder addOperatingStatus(com.google.maps.areainsights.v1.OperatingStatus value) { + if (value == null) { + throw new NullPointerException(); + } + ensureOperatingStatusIsMutable(); + operatingStatus_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Restricts results to places whose operating status is included on
+     * this list. If operating_status is not set, OPERATING_STATUS_OPERATIONAL is
+     * used as default.
+     * 
+ * + * + * repeated .google.maps.areainsights.v1.OperatingStatus operating_status = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The operatingStatus to add. + * @return This builder for chaining. + */ + public Builder addAllOperatingStatus( + java.lang.Iterable values) { + ensureOperatingStatusIsMutable(); + for (com.google.maps.areainsights.v1.OperatingStatus value : values) { + operatingStatus_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Restricts results to places whose operating status is included on
+     * this list. If operating_status is not set, OPERATING_STATUS_OPERATIONAL is
+     * used as default.
+     * 
+ * + * + * repeated .google.maps.areainsights.v1.OperatingStatus operating_status = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearOperatingStatus() { + operatingStatus_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Restricts results to places whose operating status is included on
+     * this list. If operating_status is not set, OPERATING_STATUS_OPERATIONAL is
+     * used as default.
+     * 
+ * + * + * repeated .google.maps.areainsights.v1.OperatingStatus operating_status = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for operatingStatus. + */ + public java.util.List getOperatingStatusValueList() { + return java.util.Collections.unmodifiableList(operatingStatus_); + } + /** + * + * + *
+     * Optional. Restricts results to places whose operating status is included on
+     * this list. If operating_status is not set, OPERATING_STATUS_OPERATIONAL is
+     * used as default.
+     * 
+ * + * + * repeated .google.maps.areainsights.v1.OperatingStatus operating_status = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of operatingStatus at the given index. + */ + public int getOperatingStatusValue(int index) { + return operatingStatus_.get(index); + } + /** + * + * + *
+     * Optional. Restricts results to places whose operating status is included on
+     * this list. If operating_status is not set, OPERATING_STATUS_OPERATIONAL is
+     * used as default.
+     * 
+ * + * + * repeated .google.maps.areainsights.v1.OperatingStatus operating_status = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for operatingStatus to set. + * @return This builder for chaining. + */ + public Builder setOperatingStatusValue(int index, int value) { + ensureOperatingStatusIsMutable(); + operatingStatus_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Restricts results to places whose operating status is included on
+     * this list. If operating_status is not set, OPERATING_STATUS_OPERATIONAL is
+     * used as default.
+     * 
+ * + * + * repeated .google.maps.areainsights.v1.OperatingStatus operating_status = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for operatingStatus to add. + * @return This builder for chaining. + */ + public Builder addOperatingStatusValue(int value) { + ensureOperatingStatusIsMutable(); + operatingStatus_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Restricts results to places whose operating status is included on
+     * this list. If operating_status is not set, OPERATING_STATUS_OPERATIONAL is
+     * used as default.
+     * 
+ * + * + * repeated .google.maps.areainsights.v1.OperatingStatus operating_status = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The enum numeric values on the wire for operatingStatus to add. + * @return This builder for chaining. + */ + public Builder addAllOperatingStatusValue(java.lang.Iterable values) { + ensureOperatingStatusIsMutable(); + for (int value : values) { + operatingStatus_.add(value); + } + onChanged(); + return this; + } + + private java.util.List priceLevels_ = java.util.Collections.emptyList(); + + private void ensurePriceLevelsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + priceLevels_ = new java.util.ArrayList(priceLevels_); + bitField0_ |= 0x00000008; + } + } + /** + * + * + *
+     * Optional. Restricts results to places whose price level is included on this
+     * list. If price_level is not set, all price levels are included in the
+     * results.
+     * 
+ * + * + * repeated .google.maps.areainsights.v1.PriceLevel price_levels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the priceLevels. + */ + public java.util.List getPriceLevelsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.maps.areainsights.v1.PriceLevel>( + priceLevels_, priceLevels_converter_); + } + /** + * + * + *
+     * Optional. Restricts results to places whose price level is included on this
+     * list. If price_level is not set, all price levels are included in the
+     * results.
+     * 
+ * + * + * repeated .google.maps.areainsights.v1.PriceLevel price_levels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of priceLevels. + */ + public int getPriceLevelsCount() { + return priceLevels_.size(); + } + /** + * + * + *
+     * Optional. Restricts results to places whose price level is included on this
+     * list. If price_level is not set, all price levels are included in the
+     * results.
+     * 
+ * + * + * repeated .google.maps.areainsights.v1.PriceLevel price_levels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The priceLevels at the given index. + */ + public com.google.maps.areainsights.v1.PriceLevel getPriceLevels(int index) { + return priceLevels_converter_.convert(priceLevels_.get(index)); + } + /** + * + * + *
+     * Optional. Restricts results to places whose price level is included on this
+     * list. If price_level is not set, all price levels are included in the
+     * results.
+     * 
+ * + * + * repeated .google.maps.areainsights.v1.PriceLevel price_levels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @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.areainsights.v1.PriceLevel value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePriceLevelsIsMutable(); + priceLevels_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Restricts results to places whose price level is included on this
+     * list. If price_level is not set, all price levels are included in the
+     * results.
+     * 
+ * + * + * repeated .google.maps.areainsights.v1.PriceLevel price_levels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The priceLevels to add. + * @return This builder for chaining. + */ + public Builder addPriceLevels(com.google.maps.areainsights.v1.PriceLevel value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePriceLevelsIsMutable(); + priceLevels_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Restricts results to places whose price level is included on this
+     * list. If price_level is not set, all price levels are included in the
+     * results.
+     * 
+ * + * + * repeated .google.maps.areainsights.v1.PriceLevel price_levels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The priceLevels to add. + * @return This builder for chaining. + */ + public Builder addAllPriceLevels( + java.lang.Iterable values) { + ensurePriceLevelsIsMutable(); + for (com.google.maps.areainsights.v1.PriceLevel value : values) { + priceLevels_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Restricts results to places whose price level is included on this
+     * list. If price_level is not set, all price levels are included in the
+     * results.
+     * 
+ * + * + * repeated .google.maps.areainsights.v1.PriceLevel price_levels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearPriceLevels() { + priceLevels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Restricts results to places whose price level is included on this
+     * list. If price_level is not set, all price levels are included in the
+     * results.
+     * 
+ * + * + * repeated .google.maps.areainsights.v1.PriceLevel price_levels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for priceLevels. + */ + public java.util.List getPriceLevelsValueList() { + return java.util.Collections.unmodifiableList(priceLevels_); + } + /** + * + * + *
+     * Optional. Restricts results to places whose price level is included on this
+     * list. If price_level is not set, all price levels are included in the
+     * results.
+     * 
+ * + * + * repeated .google.maps.areainsights.v1.PriceLevel price_levels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @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); + } + /** + * + * + *
+     * Optional. Restricts results to places whose price level is included on this
+     * list. If price_level is not set, all price levels are included in the
+     * results.
+     * 
+ * + * + * repeated .google.maps.areainsights.v1.PriceLevel price_levels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @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; + } + /** + * + * + *
+     * Optional. Restricts results to places whose price level is included on this
+     * list. If price_level is not set, all price levels are included in the
+     * results.
+     * 
+ * + * + * repeated .google.maps.areainsights.v1.PriceLevel price_levels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @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; + } + /** + * + * + *
+     * Optional. Restricts results to places whose price level is included on this
+     * list. If price_level is not set, all price levels are included in the
+     * results.
+     * 
+ * + * + * repeated .google.maps.areainsights.v1.PriceLevel price_levels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @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 com.google.maps.areainsights.v1.RatingFilter ratingFilter_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.areainsights.v1.RatingFilter, + com.google.maps.areainsights.v1.RatingFilter.Builder, + com.google.maps.areainsights.v1.RatingFilterOrBuilder> + ratingFilterBuilder_; + /** + * + * + *
+     * Optional. Restricts results to places whose average user ratings are in the
+     * range specified by rating_filter. If rating_filter is not set, all ratings
+     * are included in the result.
+     * 
+ * + * + * .google.maps.areainsights.v1.RatingFilter rating_filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the ratingFilter field is set. + */ + public boolean hasRatingFilter() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Optional. Restricts results to places whose average user ratings are in the
+     * range specified by rating_filter. If rating_filter is not set, all ratings
+     * are included in the result.
+     * 
+ * + * + * .google.maps.areainsights.v1.RatingFilter rating_filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The ratingFilter. + */ + public com.google.maps.areainsights.v1.RatingFilter getRatingFilter() { + if (ratingFilterBuilder_ == null) { + return ratingFilter_ == null + ? com.google.maps.areainsights.v1.RatingFilter.getDefaultInstance() + : ratingFilter_; + } else { + return ratingFilterBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Restricts results to places whose average user ratings are in the
+     * range specified by rating_filter. If rating_filter is not set, all ratings
+     * are included in the result.
+     * 
+ * + * + * .google.maps.areainsights.v1.RatingFilter rating_filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRatingFilter(com.google.maps.areainsights.v1.RatingFilter value) { + if (ratingFilterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ratingFilter_ = value; + } else { + ratingFilterBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Restricts results to places whose average user ratings are in the
+     * range specified by rating_filter. If rating_filter is not set, all ratings
+     * are included in the result.
+     * 
+ * + * + * .google.maps.areainsights.v1.RatingFilter rating_filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRatingFilter( + com.google.maps.areainsights.v1.RatingFilter.Builder builderForValue) { + if (ratingFilterBuilder_ == null) { + ratingFilter_ = builderForValue.build(); + } else { + ratingFilterBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Restricts results to places whose average user ratings are in the
+     * range specified by rating_filter. If rating_filter is not set, all ratings
+     * are included in the result.
+     * 
+ * + * + * .google.maps.areainsights.v1.RatingFilter rating_filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRatingFilter(com.google.maps.areainsights.v1.RatingFilter value) { + if (ratingFilterBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && ratingFilter_ != null + && ratingFilter_ != com.google.maps.areainsights.v1.RatingFilter.getDefaultInstance()) { + getRatingFilterBuilder().mergeFrom(value); + } else { + ratingFilter_ = value; + } + } else { + ratingFilterBuilder_.mergeFrom(value); + } + if (ratingFilter_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Restricts results to places whose average user ratings are in the
+     * range specified by rating_filter. If rating_filter is not set, all ratings
+     * are included in the result.
+     * 
+ * + * + * .google.maps.areainsights.v1.RatingFilter rating_filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRatingFilter() { + bitField0_ = (bitField0_ & ~0x00000010); + ratingFilter_ = null; + if (ratingFilterBuilder_ != null) { + ratingFilterBuilder_.dispose(); + ratingFilterBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Restricts results to places whose average user ratings are in the
+     * range specified by rating_filter. If rating_filter is not set, all ratings
+     * are included in the result.
+     * 
+ * + * + * .google.maps.areainsights.v1.RatingFilter rating_filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.maps.areainsights.v1.RatingFilter.Builder getRatingFilterBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getRatingFilterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Restricts results to places whose average user ratings are in the
+     * range specified by rating_filter. If rating_filter is not set, all ratings
+     * are included in the result.
+     * 
+ * + * + * .google.maps.areainsights.v1.RatingFilter rating_filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.maps.areainsights.v1.RatingFilterOrBuilder getRatingFilterOrBuilder() { + if (ratingFilterBuilder_ != null) { + return ratingFilterBuilder_.getMessageOrBuilder(); + } else { + return ratingFilter_ == null + ? com.google.maps.areainsights.v1.RatingFilter.getDefaultInstance() + : ratingFilter_; + } + } + /** + * + * + *
+     * Optional. Restricts results to places whose average user ratings are in the
+     * range specified by rating_filter. If rating_filter is not set, all ratings
+     * are included in the result.
+     * 
+ * + * + * .google.maps.areainsights.v1.RatingFilter rating_filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.areainsights.v1.RatingFilter, + com.google.maps.areainsights.v1.RatingFilter.Builder, + com.google.maps.areainsights.v1.RatingFilterOrBuilder> + getRatingFilterFieldBuilder() { + if (ratingFilterBuilder_ == null) { + ratingFilterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.areainsights.v1.RatingFilter, + com.google.maps.areainsights.v1.RatingFilter.Builder, + com.google.maps.areainsights.v1.RatingFilterOrBuilder>( + getRatingFilter(), getParentForChildren(), isClean()); + ratingFilter_ = null; + } + return ratingFilterBuilder_; + } + + @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.areainsights.v1.Filter) + } + + // @@protoc_insertion_point(class_scope:google.maps.areainsights.v1.Filter) + private static final com.google.maps.areainsights.v1.Filter DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.areainsights.v1.Filter(); + } + + public static com.google.maps.areainsights.v1.Filter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Filter 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.areainsights.v1.Filter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/FilterOrBuilder.java b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/FilterOrBuilder.java new file mode 100644 index 000000000000..34b86ce2f341 --- /dev/null +++ b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/FilterOrBuilder.java @@ -0,0 +1,324 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/areainsights/v1/area_insights_service.proto + +// Protobuf Java Version: 3.25.4 +package com.google.maps.areainsights.v1; + +public interface FilterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.areainsights.v1.Filter) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Restricts results to places which are located in the area
+   * specified by location filters.
+   * 
+ * + * + * .google.maps.areainsights.v1.LocationFilter location_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the locationFilter field is set. + */ + boolean hasLocationFilter(); + /** + * + * + *
+   * Required. Restricts results to places which are located in the area
+   * specified by location filters.
+   * 
+ * + * + * .google.maps.areainsights.v1.LocationFilter location_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The locationFilter. + */ + com.google.maps.areainsights.v1.LocationFilter getLocationFilter(); + /** + * + * + *
+   * Required. Restricts results to places which are located in the area
+   * specified by location filters.
+   * 
+ * + * + * .google.maps.areainsights.v1.LocationFilter location_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.maps.areainsights.v1.LocationFilterOrBuilder getLocationFilterOrBuilder(); + + /** + * + * + *
+   * Required. Place type filters.
+   * 
+ * + * + * .google.maps.areainsights.v1.TypeFilter type_filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the typeFilter field is set. + */ + boolean hasTypeFilter(); + /** + * + * + *
+   * Required. Place type filters.
+   * 
+ * + * + * .google.maps.areainsights.v1.TypeFilter type_filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The typeFilter. + */ + com.google.maps.areainsights.v1.TypeFilter getTypeFilter(); + /** + * + * + *
+   * Required. Place type filters.
+   * 
+ * + * + * .google.maps.areainsights.v1.TypeFilter type_filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.maps.areainsights.v1.TypeFilterOrBuilder getTypeFilterOrBuilder(); + + /** + * + * + *
+   * Optional. Restricts results to places whose operating status is included on
+   * this list. If operating_status is not set, OPERATING_STATUS_OPERATIONAL is
+   * used as default.
+   * 
+ * + * + * repeated .google.maps.areainsights.v1.OperatingStatus operating_status = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the operatingStatus. + */ + java.util.List getOperatingStatusList(); + /** + * + * + *
+   * Optional. Restricts results to places whose operating status is included on
+   * this list. If operating_status is not set, OPERATING_STATUS_OPERATIONAL is
+   * used as default.
+   * 
+ * + * + * repeated .google.maps.areainsights.v1.OperatingStatus operating_status = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of operatingStatus. + */ + int getOperatingStatusCount(); + /** + * + * + *
+   * Optional. Restricts results to places whose operating status is included on
+   * this list. If operating_status is not set, OPERATING_STATUS_OPERATIONAL is
+   * used as default.
+   * 
+ * + * + * repeated .google.maps.areainsights.v1.OperatingStatus operating_status = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The operatingStatus at the given index. + */ + com.google.maps.areainsights.v1.OperatingStatus getOperatingStatus(int index); + /** + * + * + *
+   * Optional. Restricts results to places whose operating status is included on
+   * this list. If operating_status is not set, OPERATING_STATUS_OPERATIONAL is
+   * used as default.
+   * 
+ * + * + * repeated .google.maps.areainsights.v1.OperatingStatus operating_status = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for operatingStatus. + */ + java.util.List getOperatingStatusValueList(); + /** + * + * + *
+   * Optional. Restricts results to places whose operating status is included on
+   * this list. If operating_status is not set, OPERATING_STATUS_OPERATIONAL is
+   * used as default.
+   * 
+ * + * + * repeated .google.maps.areainsights.v1.OperatingStatus operating_status = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of operatingStatus at the given index. + */ + int getOperatingStatusValue(int index); + + /** + * + * + *
+   * Optional. Restricts results to places whose price level is included on this
+   * list. If price_level is not set, all price levels are included in the
+   * results.
+   * 
+ * + * + * repeated .google.maps.areainsights.v1.PriceLevel price_levels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the priceLevels. + */ + java.util.List getPriceLevelsList(); + /** + * + * + *
+   * Optional. Restricts results to places whose price level is included on this
+   * list. If price_level is not set, all price levels are included in the
+   * results.
+   * 
+ * + * + * repeated .google.maps.areainsights.v1.PriceLevel price_levels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of priceLevels. + */ + int getPriceLevelsCount(); + /** + * + * + *
+   * Optional. Restricts results to places whose price level is included on this
+   * list. If price_level is not set, all price levels are included in the
+   * results.
+   * 
+ * + * + * repeated .google.maps.areainsights.v1.PriceLevel price_levels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The priceLevels at the given index. + */ + com.google.maps.areainsights.v1.PriceLevel getPriceLevels(int index); + /** + * + * + *
+   * Optional. Restricts results to places whose price level is included on this
+   * list. If price_level is not set, all price levels are included in the
+   * results.
+   * 
+ * + * + * repeated .google.maps.areainsights.v1.PriceLevel price_levels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for priceLevels. + */ + java.util.List getPriceLevelsValueList(); + /** + * + * + *
+   * Optional. Restricts results to places whose price level is included on this
+   * list. If price_level is not set, all price levels are included in the
+   * results.
+   * 
+ * + * + * repeated .google.maps.areainsights.v1.PriceLevel price_levels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @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); + + /** + * + * + *
+   * Optional. Restricts results to places whose average user ratings are in the
+   * range specified by rating_filter. If rating_filter is not set, all ratings
+   * are included in the result.
+   * 
+ * + * + * .google.maps.areainsights.v1.RatingFilter rating_filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the ratingFilter field is set. + */ + boolean hasRatingFilter(); + /** + * + * + *
+   * Optional. Restricts results to places whose average user ratings are in the
+   * range specified by rating_filter. If rating_filter is not set, all ratings
+   * are included in the result.
+   * 
+ * + * + * .google.maps.areainsights.v1.RatingFilter rating_filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The ratingFilter. + */ + com.google.maps.areainsights.v1.RatingFilter getRatingFilter(); + /** + * + * + *
+   * Optional. Restricts results to places whose average user ratings are in the
+   * range specified by rating_filter. If rating_filter is not set, all ratings
+   * are included in the result.
+   * 
+ * + * + * .google.maps.areainsights.v1.RatingFilter rating_filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.maps.areainsights.v1.RatingFilterOrBuilder getRatingFilterOrBuilder(); +} diff --git a/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/Insight.java b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/Insight.java new file mode 100644 index 000000000000..31b56942ebac --- /dev/null +++ b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/Insight.java @@ -0,0 +1,287 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/areainsights/v1/area_insights_service.proto + +// Protobuf Java Version: 3.25.4 +package com.google.maps.areainsights.v1; + +/** + * + * + *
+ * Supported insights.
+ * 
+ * + * Protobuf enum {@code google.maps.areainsights.v1.Insight} + */ +public enum Insight implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Not Specified.
+   * 
+ * + * INSIGHT_UNSPECIFIED = 0; + */ + INSIGHT_UNSPECIFIED(0), + /** + * + * + *
+   * Count insight.
+   *
+   * When this insight is specified ComputeInsights returns the number of
+   * places that match the specified filter criteria.
+   * ```
+   * For example if the request is:
+   * ComputeInsightsRequest {
+   *   insights: INSIGHT_COUNT
+   *   filter {
+   *     location_filter {region: <PlaceId of state of CA>}
+   *     type_filter {included_types: "restaurant"}
+   *     operating_status: OPERATING_STATUS_OPERATIONAL
+   *     price_levels: PRICE_LEVEL_FREE
+   *     price_levels: PRICE_LEVEL_INEXPENSIVE
+   *     min_rating: 4.0
+   *   }
+   * }
+   *
+   * The method will return the count of restaurants in California that are
+   * operational, with price level free or inexpensive and have an average
+   * rating of at least 4 starts.
+   *
+   * Example response:
+   * ComputeInsightsResponse {
+   *   count: <number of places>
+   * }
+   * ```
+   * 
+ * + * INSIGHT_COUNT = 1; + */ + INSIGHT_COUNT(1), + /** + * + * + *
+   * Return Places
+   *
+   * When this insight is specified ComputeInsights returns Places
+   * that match the specified filter criteria.
+   * ```
+   * For example if the request is:
+   * ComputeInsightsRequest {
+   *   insights: INSIGHT_PLACES
+   *   filter {
+   *     location_filter {region: <PlaceId of state of CA>}
+   *     type_filter {included_types: "restaurant"}
+   *     operating_status: OPERATING_STATUS_OPERATIONAL
+   *     price_levels: PRICE_LEVEL_FREE
+   *     price_levels: PRICE_LEVEL_INEXPENSIVE
+   *     min_rating: 4.0
+   *   }
+   * }
+   *
+   * The method will return list of places of restaurants in
+   * California that are operational, with price level free or inexpensive and
+   * have an average rating of at least 4 stars.
+   *
+   * Example response:
+   * ComputeInsightsResponse {
+   *   place_insights { place: "places/ABC" }
+   *   place_insights { place: "places/PQR" }
+   *   place_insights { place: "places/XYZ" }
+   * }
+   * ```
+   * 
+ * + * INSIGHT_PLACES = 2; + */ + INSIGHT_PLACES(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Not Specified.
+   * 
+ * + * INSIGHT_UNSPECIFIED = 0; + */ + public static final int INSIGHT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Count insight.
+   *
+   * When this insight is specified ComputeInsights returns the number of
+   * places that match the specified filter criteria.
+   * ```
+   * For example if the request is:
+   * ComputeInsightsRequest {
+   *   insights: INSIGHT_COUNT
+   *   filter {
+   *     location_filter {region: <PlaceId of state of CA>}
+   *     type_filter {included_types: "restaurant"}
+   *     operating_status: OPERATING_STATUS_OPERATIONAL
+   *     price_levels: PRICE_LEVEL_FREE
+   *     price_levels: PRICE_LEVEL_INEXPENSIVE
+   *     min_rating: 4.0
+   *   }
+   * }
+   *
+   * The method will return the count of restaurants in California that are
+   * operational, with price level free or inexpensive and have an average
+   * rating of at least 4 starts.
+   *
+   * Example response:
+   * ComputeInsightsResponse {
+   *   count: <number of places>
+   * }
+   * ```
+   * 
+ * + * INSIGHT_COUNT = 1; + */ + public static final int INSIGHT_COUNT_VALUE = 1; + /** + * + * + *
+   * Return Places
+   *
+   * When this insight is specified ComputeInsights returns Places
+   * that match the specified filter criteria.
+   * ```
+   * For example if the request is:
+   * ComputeInsightsRequest {
+   *   insights: INSIGHT_PLACES
+   *   filter {
+   *     location_filter {region: <PlaceId of state of CA>}
+   *     type_filter {included_types: "restaurant"}
+   *     operating_status: OPERATING_STATUS_OPERATIONAL
+   *     price_levels: PRICE_LEVEL_FREE
+   *     price_levels: PRICE_LEVEL_INEXPENSIVE
+   *     min_rating: 4.0
+   *   }
+   * }
+   *
+   * The method will return list of places of restaurants in
+   * California that are operational, with price level free or inexpensive and
+   * have an average rating of at least 4 stars.
+   *
+   * Example response:
+   * ComputeInsightsResponse {
+   *   place_insights { place: "places/ABC" }
+   *   place_insights { place: "places/PQR" }
+   *   place_insights { place: "places/XYZ" }
+   * }
+   * ```
+   * 
+ * + * INSIGHT_PLACES = 2; + */ + public static final int INSIGHT_PLACES_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 Insight 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 Insight forNumber(int value) { + switch (value) { + case 0: + return INSIGHT_UNSPECIFIED; + case 1: + return INSIGHT_COUNT; + case 2: + return INSIGHT_PLACES; + 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 Insight findValueByNumber(int number) { + return Insight.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.areainsights.v1.AreaInsightsServiceProto.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Insight[] VALUES = values(); + + public static Insight 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 Insight(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.maps.areainsights.v1.Insight) +} diff --git a/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/LocationFilter.java b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/LocationFilter.java new file mode 100644 index 000000000000..87b99f91e21a --- /dev/null +++ b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/LocationFilter.java @@ -0,0 +1,5284 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/areainsights/v1/area_insights_service.proto + +// Protobuf Java Version: 3.25.4 +package com.google.maps.areainsights.v1; + +/** + * + * + *
+ * Location filters.
+ *
+ * Specifies the area of interest for the insight.
+ * 
+ * + * Protobuf type {@code google.maps.areainsights.v1.LocationFilter} + */ +public final class LocationFilter extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.maps.areainsights.v1.LocationFilter) + LocationFilterOrBuilder { + private static final long serialVersionUID = 0L; + // Use LocationFilter.newBuilder() to construct. + private LocationFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LocationFilter() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LocationFilter(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_LocationFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_LocationFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.areainsights.v1.LocationFilter.class, + com.google.maps.areainsights.v1.LocationFilter.Builder.class); + } + + public interface CircleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.areainsights.v1.LocationFilter.Circle) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The latitude and longitude of the center of the circle.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + * + * @return Whether the latLng field is set. + */ + boolean hasLatLng(); + /** + * + * + *
+     * The latitude and longitude of the center of the circle.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + * + * @return The latLng. + */ + com.google.type.LatLng getLatLng(); + /** + * + * + *
+     * The latitude and longitude of the center of the circle.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + com.google.type.LatLngOrBuilder getLatLngOrBuilder(); + + /** + * + * + *
+     * The Place resource name of the center of the circle. Only point places
+     * are supported.
+     * 
+ * + * string place = 2 [(.google.api.resource_reference) = { ... } + * + * @return Whether the place field is set. + */ + boolean hasPlace(); + /** + * + * + *
+     * The Place resource name of the center of the circle. Only point places
+     * are supported.
+     * 
+ * + * string place = 2 [(.google.api.resource_reference) = { ... } + * + * @return The place. + */ + java.lang.String getPlace(); + /** + * + * + *
+     * The Place resource name of the center of the circle. Only point places
+     * are supported.
+     * 
+ * + * string place = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for place. + */ + com.google.protobuf.ByteString getPlaceBytes(); + + /** + * + * + *
+     * Optional. The radius of the circle in meters
+     * 
+ * + * int32 radius = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The radius. + */ + int getRadius(); + + com.google.maps.areainsights.v1.LocationFilter.Circle.CenterCase getCenterCase(); + } + /** + * + * + *
+   * A circle is defined by a center point and radius in meters.
+   * 
+ * + * Protobuf type {@code google.maps.areainsights.v1.LocationFilter.Circle} + */ + public static final class Circle extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.maps.areainsights.v1.LocationFilter.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(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_LocationFilter_Circle_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_LocationFilter_Circle_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.areainsights.v1.LocationFilter.Circle.class, + com.google.maps.areainsights.v1.LocationFilter.Circle.Builder.class); + } + + private int centerCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object center_; + + public enum CenterCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + LAT_LNG(1), + PLACE(2), + CENTER_NOT_SET(0); + private final int value; + + private CenterCase(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 CenterCase valueOf(int value) { + return forNumber(value); + } + + public static CenterCase forNumber(int value) { + switch (value) { + case 1: + return LAT_LNG; + case 2: + return PLACE; + case 0: + return CENTER_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public CenterCase getCenterCase() { + return CenterCase.forNumber(centerCase_); + } + + public static final int LAT_LNG_FIELD_NUMBER = 1; + /** + * + * + *
+     * The latitude and longitude of the center of the circle.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + * + * @return Whether the latLng field is set. + */ + @java.lang.Override + public boolean hasLatLng() { + return centerCase_ == 1; + } + /** + * + * + *
+     * The latitude and longitude of the center of the circle.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + * + * @return The latLng. + */ + @java.lang.Override + public com.google.type.LatLng getLatLng() { + if (centerCase_ == 1) { + return (com.google.type.LatLng) center_; + } + return com.google.type.LatLng.getDefaultInstance(); + } + /** + * + * + *
+     * The latitude and longitude of the center of the circle.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getLatLngOrBuilder() { + if (centerCase_ == 1) { + return (com.google.type.LatLng) center_; + } + return com.google.type.LatLng.getDefaultInstance(); + } + + public static final int PLACE_FIELD_NUMBER = 2; + /** + * + * + *
+     * The Place resource name of the center of the circle. Only point places
+     * are supported.
+     * 
+ * + * string place = 2 [(.google.api.resource_reference) = { ... } + * + * @return Whether the place field is set. + */ + public boolean hasPlace() { + return centerCase_ == 2; + } + /** + * + * + *
+     * The Place resource name of the center of the circle. Only point places
+     * are supported.
+     * 
+ * + * string place = 2 [(.google.api.resource_reference) = { ... } + * + * @return The place. + */ + public java.lang.String getPlace() { + java.lang.Object ref = ""; + if (centerCase_ == 2) { + ref = center_; + } + 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(); + if (centerCase_ == 2) { + center_ = s; + } + return s; + } + } + /** + * + * + *
+     * The Place resource name of the center of the circle. Only point places
+     * are supported.
+     * 
+ * + * string place = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for place. + */ + public com.google.protobuf.ByteString getPlaceBytes() { + java.lang.Object ref = ""; + if (centerCase_ == 2) { + ref = center_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (centerCase_ == 2) { + center_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RADIUS_FIELD_NUMBER = 3; + private int radius_ = 0; + /** + * + * + *
+     * Optional. The radius of the circle in meters
+     * 
+ * + * int32 radius = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The radius. + */ + @java.lang.Override + public int 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 (centerCase_ == 1) { + output.writeMessage(1, (com.google.type.LatLng) center_); + } + if (centerCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, center_); + } + if (radius_ != 0) { + output.writeInt32(3, radius_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (centerCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.type.LatLng) center_); + } + if (centerCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, center_); + } + if (radius_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, 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.areainsights.v1.LocationFilter.Circle)) { + return super.equals(obj); + } + com.google.maps.areainsights.v1.LocationFilter.Circle other = + (com.google.maps.areainsights.v1.LocationFilter.Circle) obj; + + if (getRadius() != other.getRadius()) return false; + if (!getCenterCase().equals(other.getCenterCase())) return false; + switch (centerCase_) { + case 1: + if (!getLatLng().equals(other.getLatLng())) return false; + break; + case 2: + if (!getPlace().equals(other.getPlace())) 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) + RADIUS_FIELD_NUMBER; + hash = (53 * hash) + getRadius(); + switch (centerCase_) { + case 1: + hash = (37 * hash) + LAT_LNG_FIELD_NUMBER; + hash = (53 * hash) + getLatLng().hashCode(); + break; + case 2: + hash = (37 * hash) + PLACE_FIELD_NUMBER; + hash = (53 * hash) + getPlace().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.areainsights.v1.LocationFilter.Circle parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.areainsights.v1.LocationFilter.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.areainsights.v1.LocationFilter.Circle parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.areainsights.v1.LocationFilter.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.areainsights.v1.LocationFilter.Circle parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.areainsights.v1.LocationFilter.Circle parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.areainsights.v1.LocationFilter.Circle parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.areainsights.v1.LocationFilter.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.areainsights.v1.LocationFilter.Circle parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.areainsights.v1.LocationFilter.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.areainsights.v1.LocationFilter.Circle parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.areainsights.v1.LocationFilter.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.areainsights.v1.LocationFilter.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; + } + /** + * + * + *
+     * A circle is defined by a center point and radius in meters.
+     * 
+ * + * Protobuf type {@code google.maps.areainsights.v1.LocationFilter.Circle} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.areainsights.v1.LocationFilter.Circle) + com.google.maps.areainsights.v1.LocationFilter.CircleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_LocationFilter_Circle_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_LocationFilter_Circle_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.areainsights.v1.LocationFilter.Circle.class, + com.google.maps.areainsights.v1.LocationFilter.Circle.Builder.class); + } + + // Construct using com.google.maps.areainsights.v1.LocationFilter.Circle.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (latLngBuilder_ != null) { + latLngBuilder_.clear(); + } + radius_ = 0; + centerCase_ = 0; + center_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_LocationFilter_Circle_descriptor; + } + + @java.lang.Override + public com.google.maps.areainsights.v1.LocationFilter.Circle getDefaultInstanceForType() { + return com.google.maps.areainsights.v1.LocationFilter.Circle.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.areainsights.v1.LocationFilter.Circle build() { + com.google.maps.areainsights.v1.LocationFilter.Circle result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.areainsights.v1.LocationFilter.Circle buildPartial() { + com.google.maps.areainsights.v1.LocationFilter.Circle result = + new com.google.maps.areainsights.v1.LocationFilter.Circle(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.areainsights.v1.LocationFilter.Circle result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.radius_ = radius_; + } + } + + private void buildPartialOneofs( + com.google.maps.areainsights.v1.LocationFilter.Circle result) { + result.centerCase_ = centerCase_; + result.center_ = this.center_; + if (centerCase_ == 1 && latLngBuilder_ != null) { + result.center_ = latLngBuilder_.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.areainsights.v1.LocationFilter.Circle) { + return mergeFrom((com.google.maps.areainsights.v1.LocationFilter.Circle) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.areainsights.v1.LocationFilter.Circle other) { + if (other == com.google.maps.areainsights.v1.LocationFilter.Circle.getDefaultInstance()) + return this; + if (other.getRadius() != 0) { + setRadius(other.getRadius()); + } + switch (other.getCenterCase()) { + case LAT_LNG: + { + mergeLatLng(other.getLatLng()); + break; + } + case PLACE: + { + centerCase_ = 2; + center_ = other.center_; + onChanged(); + break; + } + case CENTER_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(getLatLngFieldBuilder().getBuilder(), extensionRegistry); + centerCase_ = 1; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + centerCase_ = 2; + center_ = s; + break; + } // case 18 + case 24: + { + radius_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + 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 centerCase_ = 0; + private java.lang.Object center_; + + public CenterCase getCenterCase() { + return CenterCase.forNumber(centerCase_); + } + + public Builder clearCenter() { + centerCase_ = 0; + center_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, + com.google.type.LatLng.Builder, + com.google.type.LatLngOrBuilder> + latLngBuilder_; + /** + * + * + *
+       * The latitude and longitude of the center of the circle.
+       * 
+ * + * .google.type.LatLng lat_lng = 1; + * + * @return Whether the latLng field is set. + */ + @java.lang.Override + public boolean hasLatLng() { + return centerCase_ == 1; + } + /** + * + * + *
+       * The latitude and longitude of the center of the circle.
+       * 
+ * + * .google.type.LatLng lat_lng = 1; + * + * @return The latLng. + */ + @java.lang.Override + public com.google.type.LatLng getLatLng() { + if (latLngBuilder_ == null) { + if (centerCase_ == 1) { + return (com.google.type.LatLng) center_; + } + return com.google.type.LatLng.getDefaultInstance(); + } else { + if (centerCase_ == 1) { + return latLngBuilder_.getMessage(); + } + return com.google.type.LatLng.getDefaultInstance(); + } + } + /** + * + * + *
+       * The latitude and longitude of the center of the circle.
+       * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + public Builder setLatLng(com.google.type.LatLng value) { + if (latLngBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + center_ = value; + onChanged(); + } else { + latLngBuilder_.setMessage(value); + } + centerCase_ = 1; + return this; + } + /** + * + * + *
+       * The latitude and longitude of the center of the circle.
+       * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + public Builder setLatLng(com.google.type.LatLng.Builder builderForValue) { + if (latLngBuilder_ == null) { + center_ = builderForValue.build(); + onChanged(); + } else { + latLngBuilder_.setMessage(builderForValue.build()); + } + centerCase_ = 1; + return this; + } + /** + * + * + *
+       * The latitude and longitude of the center of the circle.
+       * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + public Builder mergeLatLng(com.google.type.LatLng value) { + if (latLngBuilder_ == null) { + if (centerCase_ == 1 && center_ != com.google.type.LatLng.getDefaultInstance()) { + center_ = + com.google.type.LatLng.newBuilder((com.google.type.LatLng) center_) + .mergeFrom(value) + .buildPartial(); + } else { + center_ = value; + } + onChanged(); + } else { + if (centerCase_ == 1) { + latLngBuilder_.mergeFrom(value); + } else { + latLngBuilder_.setMessage(value); + } + } + centerCase_ = 1; + return this; + } + /** + * + * + *
+       * The latitude and longitude of the center of the circle.
+       * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + public Builder clearLatLng() { + if (latLngBuilder_ == null) { + if (centerCase_ == 1) { + centerCase_ = 0; + center_ = null; + onChanged(); + } + } else { + if (centerCase_ == 1) { + centerCase_ = 0; + center_ = null; + } + latLngBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The latitude and longitude of the center of the circle.
+       * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + public com.google.type.LatLng.Builder getLatLngBuilder() { + return getLatLngFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The latitude and longitude of the center of the circle.
+       * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getLatLngOrBuilder() { + if ((centerCase_ == 1) && (latLngBuilder_ != null)) { + return latLngBuilder_.getMessageOrBuilder(); + } else { + if (centerCase_ == 1) { + return (com.google.type.LatLng) center_; + } + return com.google.type.LatLng.getDefaultInstance(); + } + } + /** + * + * + *
+       * The latitude and longitude of the center of the circle.
+       * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, + com.google.type.LatLng.Builder, + com.google.type.LatLngOrBuilder> + getLatLngFieldBuilder() { + if (latLngBuilder_ == null) { + if (!(centerCase_ == 1)) { + center_ = com.google.type.LatLng.getDefaultInstance(); + } + latLngBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, + com.google.type.LatLng.Builder, + com.google.type.LatLngOrBuilder>( + (com.google.type.LatLng) center_, getParentForChildren(), isClean()); + center_ = null; + } + centerCase_ = 1; + onChanged(); + return latLngBuilder_; + } + + /** + * + * + *
+       * The Place resource name of the center of the circle. Only point places
+       * are supported.
+       * 
+ * + * string place = 2 [(.google.api.resource_reference) = { ... } + * + * @return Whether the place field is set. + */ + @java.lang.Override + public boolean hasPlace() { + return centerCase_ == 2; + } + /** + * + * + *
+       * The Place resource name of the center of the circle. Only point places
+       * are supported.
+       * 
+ * + * string place = 2 [(.google.api.resource_reference) = { ... } + * + * @return The place. + */ + @java.lang.Override + public java.lang.String getPlace() { + java.lang.Object ref = ""; + if (centerCase_ == 2) { + ref = center_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (centerCase_ == 2) { + center_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The Place resource name of the center of the circle. Only point places
+       * are supported.
+       * 
+ * + * string place = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for place. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPlaceBytes() { + java.lang.Object ref = ""; + if (centerCase_ == 2) { + ref = center_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (centerCase_ == 2) { + center_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The Place resource name of the center of the circle. Only point places
+       * are supported.
+       * 
+ * + * string place = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The place to set. + * @return This builder for chaining. + */ + public Builder setPlace(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + centerCase_ = 2; + center_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The Place resource name of the center of the circle. Only point places
+       * are supported.
+       * 
+ * + * string place = 2 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearPlace() { + if (centerCase_ == 2) { + centerCase_ = 0; + center_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+       * The Place resource name of the center of the circle. Only point places
+       * are supported.
+       * 
+ * + * string place = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for place to set. + * @return This builder for chaining. + */ + public Builder setPlaceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + centerCase_ = 2; + center_ = value; + onChanged(); + return this; + } + + private int radius_; + /** + * + * + *
+       * Optional. The radius of the circle in meters
+       * 
+ * + * int32 radius = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The radius. + */ + @java.lang.Override + public int getRadius() { + return radius_; + } + /** + * + * + *
+       * Optional. The radius of the circle in meters
+       * 
+ * + * int32 radius = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The radius to set. + * @return This builder for chaining. + */ + public Builder setRadius(int value) { + + radius_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. The radius of the circle in meters
+       * 
+ * + * int32 radius = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRadius() { + bitField0_ = (bitField0_ & ~0x00000004); + radius_ = 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.areainsights.v1.LocationFilter.Circle) + } + + // @@protoc_insertion_point(class_scope:google.maps.areainsights.v1.LocationFilter.Circle) + private static final com.google.maps.areainsights.v1.LocationFilter.Circle DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.areainsights.v1.LocationFilter.Circle(); + } + + public static com.google.maps.areainsights.v1.LocationFilter.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.areainsights.v1.LocationFilter.Circle getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface RegionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.areainsights.v1.LocationFilter.Region) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The Place resource name of a region.
+     * 
+ * + * string place = 1 [(.google.api.resource_reference) = { ... } + * + * @return Whether the place field is set. + */ + boolean hasPlace(); + /** + * + * + *
+     * The Place resource name of a region.
+     * 
+ * + * string place = 1 [(.google.api.resource_reference) = { ... } + * + * @return The place. + */ + java.lang.String getPlace(); + /** + * + * + *
+     * The Place resource name of a region.
+     * 
+ * + * string place = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for place. + */ + com.google.protobuf.ByteString getPlaceBytes(); + + com.google.maps.areainsights.v1.LocationFilter.Region.RegionCase getRegionCase(); + } + /** + * + * + *
+   * A region is a geographic boundary such as: cities, postal codes, counties,
+   * states, etc.
+   * 
+ * + * Protobuf type {@code google.maps.areainsights.v1.LocationFilter.Region} + */ + public static final class Region extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.maps.areainsights.v1.LocationFilter.Region) + RegionOrBuilder { + private static final long serialVersionUID = 0L; + // Use Region.newBuilder() to construct. + private Region(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Region() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Region(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_LocationFilter_Region_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_LocationFilter_Region_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.areainsights.v1.LocationFilter.Region.class, + com.google.maps.areainsights.v1.LocationFilter.Region.Builder.class); + } + + private int regionCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object region_; + + public enum RegionCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PLACE(1), + REGION_NOT_SET(0); + private final int value; + + private RegionCase(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 RegionCase valueOf(int value) { + return forNumber(value); + } + + public static RegionCase forNumber(int value) { + switch (value) { + case 1: + return PLACE; + case 0: + return REGION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public RegionCase getRegionCase() { + return RegionCase.forNumber(regionCase_); + } + + public static final int PLACE_FIELD_NUMBER = 1; + /** + * + * + *
+     * The Place resource name of a region.
+     * 
+ * + * string place = 1 [(.google.api.resource_reference) = { ... } + * + * @return Whether the place field is set. + */ + public boolean hasPlace() { + return regionCase_ == 1; + } + /** + * + * + *
+     * The Place resource name of a region.
+     * 
+ * + * string place = 1 [(.google.api.resource_reference) = { ... } + * + * @return The place. + */ + public java.lang.String getPlace() { + java.lang.Object ref = ""; + if (regionCase_ == 1) { + ref = region_; + } + 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(); + if (regionCase_ == 1) { + region_ = s; + } + return s; + } + } + /** + * + * + *
+     * The Place resource name of a region.
+     * 
+ * + * string place = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for place. + */ + public com.google.protobuf.ByteString getPlaceBytes() { + java.lang.Object ref = ""; + if (regionCase_ == 1) { + ref = region_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (regionCase_ == 1) { + region_ = 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 (regionCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, region_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (regionCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, region_); + } + 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.areainsights.v1.LocationFilter.Region)) { + return super.equals(obj); + } + com.google.maps.areainsights.v1.LocationFilter.Region other = + (com.google.maps.areainsights.v1.LocationFilter.Region) obj; + + if (!getRegionCase().equals(other.getRegionCase())) return false; + switch (regionCase_) { + case 1: + if (!getPlace().equals(other.getPlace())) 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 (regionCase_) { + case 1: + hash = (37 * hash) + PLACE_FIELD_NUMBER; + hash = (53 * hash) + getPlace().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.areainsights.v1.LocationFilter.Region parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.areainsights.v1.LocationFilter.Region 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.areainsights.v1.LocationFilter.Region parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.areainsights.v1.LocationFilter.Region 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.areainsights.v1.LocationFilter.Region parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.areainsights.v1.LocationFilter.Region parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.areainsights.v1.LocationFilter.Region parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.areainsights.v1.LocationFilter.Region 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.areainsights.v1.LocationFilter.Region parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.areainsights.v1.LocationFilter.Region 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.areainsights.v1.LocationFilter.Region parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.areainsights.v1.LocationFilter.Region 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.areainsights.v1.LocationFilter.Region 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 region is a geographic boundary such as: cities, postal codes, counties,
+     * states, etc.
+     * 
+ * + * Protobuf type {@code google.maps.areainsights.v1.LocationFilter.Region} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.areainsights.v1.LocationFilter.Region) + com.google.maps.areainsights.v1.LocationFilter.RegionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_LocationFilter_Region_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_LocationFilter_Region_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.areainsights.v1.LocationFilter.Region.class, + com.google.maps.areainsights.v1.LocationFilter.Region.Builder.class); + } + + // Construct using com.google.maps.areainsights.v1.LocationFilter.Region.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + regionCase_ = 0; + region_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_LocationFilter_Region_descriptor; + } + + @java.lang.Override + public com.google.maps.areainsights.v1.LocationFilter.Region getDefaultInstanceForType() { + return com.google.maps.areainsights.v1.LocationFilter.Region.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.areainsights.v1.LocationFilter.Region build() { + com.google.maps.areainsights.v1.LocationFilter.Region result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.areainsights.v1.LocationFilter.Region buildPartial() { + com.google.maps.areainsights.v1.LocationFilter.Region result = + new com.google.maps.areainsights.v1.LocationFilter.Region(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.areainsights.v1.LocationFilter.Region result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.maps.areainsights.v1.LocationFilter.Region result) { + result.regionCase_ = regionCase_; + result.region_ = this.region_; + } + + @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.areainsights.v1.LocationFilter.Region) { + return mergeFrom((com.google.maps.areainsights.v1.LocationFilter.Region) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.areainsights.v1.LocationFilter.Region other) { + if (other == com.google.maps.areainsights.v1.LocationFilter.Region.getDefaultInstance()) + return this; + switch (other.getRegionCase()) { + case PLACE: + { + regionCase_ = 1; + region_ = other.region_; + onChanged(); + break; + } + case REGION_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: + { + java.lang.String s = input.readStringRequireUtf8(); + regionCase_ = 1; + region_ = s; + 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 regionCase_ = 0; + private java.lang.Object region_; + + public RegionCase getRegionCase() { + return RegionCase.forNumber(regionCase_); + } + + public Builder clearRegion() { + regionCase_ = 0; + region_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+       * The Place resource name of a region.
+       * 
+ * + * string place = 1 [(.google.api.resource_reference) = { ... } + * + * @return Whether the place field is set. + */ + @java.lang.Override + public boolean hasPlace() { + return regionCase_ == 1; + } + /** + * + * + *
+       * The Place resource name of a region.
+       * 
+ * + * string place = 1 [(.google.api.resource_reference) = { ... } + * + * @return The place. + */ + @java.lang.Override + public java.lang.String getPlace() { + java.lang.Object ref = ""; + if (regionCase_ == 1) { + ref = region_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (regionCase_ == 1) { + region_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The Place resource name of a region.
+       * 
+ * + * string place = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for place. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPlaceBytes() { + java.lang.Object ref = ""; + if (regionCase_ == 1) { + ref = region_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (regionCase_ == 1) { + region_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The Place resource name of a region.
+       * 
+ * + * string place = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The place to set. + * @return This builder for chaining. + */ + public Builder setPlace(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + regionCase_ = 1; + region_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The Place resource name of a region.
+       * 
+ * + * string place = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearPlace() { + if (regionCase_ == 1) { + regionCase_ = 0; + region_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+       * The Place resource name of a region.
+       * 
+ * + * string place = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for place to set. + * @return This builder for chaining. + */ + public Builder setPlaceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + regionCase_ = 1; + region_ = value; + 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.areainsights.v1.LocationFilter.Region) + } + + // @@protoc_insertion_point(class_scope:google.maps.areainsights.v1.LocationFilter.Region) + private static final com.google.maps.areainsights.v1.LocationFilter.Region DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.areainsights.v1.LocationFilter.Region(); + } + + public static com.google.maps.areainsights.v1.LocationFilter.Region getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Region 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.areainsights.v1.LocationFilter.Region getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CustomAreaOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.areainsights.v1.LocationFilter.CustomArea) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The custom area represented as a polygon
+     * 
+ * + * + * .google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon polygon = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the polygon field is set. + */ + boolean hasPolygon(); + /** + * + * + *
+     * Required. The custom area represented as a polygon
+     * 
+ * + * + * .google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon polygon = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The polygon. + */ + com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon getPolygon(); + /** + * + * + *
+     * Required. The custom area represented as a polygon
+     * 
+ * + * + * .google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon polygon = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.maps.areainsights.v1.LocationFilter.CustomArea.PolygonOrBuilder + getPolygonOrBuilder(); + } + /** + * + * + *
+   * Custom Area.
+   * 
+ * + * Protobuf type {@code google.maps.areainsights.v1.LocationFilter.CustomArea} + */ + public static final class CustomArea extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.maps.areainsights.v1.LocationFilter.CustomArea) + CustomAreaOrBuilder { + private static final long serialVersionUID = 0L; + // Use CustomArea.newBuilder() to construct. + private CustomArea(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CustomArea() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CustomArea(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_LocationFilter_CustomArea_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_LocationFilter_CustomArea_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.areainsights.v1.LocationFilter.CustomArea.class, + com.google.maps.areainsights.v1.LocationFilter.CustomArea.Builder.class); + } + + public interface PolygonOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Optional. The coordinates that define the polygon.
+       * 
+ * + * + * repeated .google.type.LatLng coordinates = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getCoordinatesList(); + /** + * + * + *
+       * Optional. The coordinates that define the polygon.
+       * 
+ * + * + * repeated .google.type.LatLng coordinates = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.type.LatLng getCoordinates(int index); + /** + * + * + *
+       * Optional. The coordinates that define the polygon.
+       * 
+ * + * + * repeated .google.type.LatLng coordinates = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getCoordinatesCount(); + /** + * + * + *
+       * Optional. The coordinates that define the polygon.
+       * 
+ * + * + * repeated .google.type.LatLng coordinates = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getCoordinatesOrBuilderList(); + /** + * + * + *
+       * Optional. The coordinates that define the polygon.
+       * 
+ * + * + * repeated .google.type.LatLng coordinates = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.type.LatLngOrBuilder getCoordinatesOrBuilder(int index); + } + /** + * + * + *
+     * A polygon is represented by a series of connected coordinates in an
+     * counterclockwise ordered sequence. The coordinates form a closed loop and
+     * define a filled region. The first and last coordinates are equivalent,
+     * and they must contain identical values. The format is a simplified
+     * version of GeoJSON polygons (we only support one counterclockwise
+     * exterior ring).
+     * 
+ * + * Protobuf type {@code google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon} + */ + public static final class Polygon extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon) + PolygonOrBuilder { + private static final long serialVersionUID = 0L; + // Use Polygon.newBuilder() to construct. + private Polygon(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Polygon() { + coordinates_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Polygon(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_LocationFilter_CustomArea_Polygon_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_LocationFilter_CustomArea_Polygon_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon.class, + com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon.Builder.class); + } + + public static final int COORDINATES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List coordinates_; + /** + * + * + *
+       * Optional. The coordinates that define the polygon.
+       * 
+ * + * + * repeated .google.type.LatLng coordinates = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getCoordinatesList() { + return coordinates_; + } + /** + * + * + *
+       * Optional. The coordinates that define the polygon.
+       * 
+ * + * + * repeated .google.type.LatLng coordinates = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getCoordinatesOrBuilderList() { + return coordinates_; + } + /** + * + * + *
+       * Optional. The coordinates that define the polygon.
+       * 
+ * + * + * repeated .google.type.LatLng coordinates = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getCoordinatesCount() { + return coordinates_.size(); + } + /** + * + * + *
+       * Optional. The coordinates that define the polygon.
+       * 
+ * + * + * repeated .google.type.LatLng coordinates = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.type.LatLng getCoordinates(int index) { + return coordinates_.get(index); + } + /** + * + * + *
+       * Optional. The coordinates that define the polygon.
+       * 
+ * + * + * repeated .google.type.LatLng coordinates = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getCoordinatesOrBuilder(int index) { + return coordinates_.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 < coordinates_.size(); i++) { + output.writeMessage(1, coordinates_.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 < coordinates_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, coordinates_.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.areainsights.v1.LocationFilter.CustomArea.Polygon)) { + return super.equals(obj); + } + com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon other = + (com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon) obj; + + if (!getCoordinatesList().equals(other.getCoordinatesList())) 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 (getCoordinatesCount() > 0) { + hash = (37 * hash) + COORDINATES_FIELD_NUMBER; + hash = (53 * hash) + getCoordinatesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon 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.areainsights.v1.LocationFilter.CustomArea.Polygon parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon 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.areainsights.v1.LocationFilter.CustomArea.Polygon parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon 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.areainsights.v1.LocationFilter.CustomArea.Polygon + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon + 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.areainsights.v1.LocationFilter.CustomArea.Polygon parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon 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.areainsights.v1.LocationFilter.CustomArea.Polygon 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 polygon is represented by a series of connected coordinates in an
+       * counterclockwise ordered sequence. The coordinates form a closed loop and
+       * define a filled region. The first and last coordinates are equivalent,
+       * and they must contain identical values. The format is a simplified
+       * version of GeoJSON polygons (we only support one counterclockwise
+       * exterior ring).
+       * 
+ * + * Protobuf type {@code google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon) + com.google.maps.areainsights.v1.LocationFilter.CustomArea.PolygonOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_LocationFilter_CustomArea_Polygon_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_LocationFilter_CustomArea_Polygon_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon.class, + com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon.Builder.class); + } + + // Construct using + // com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (coordinatesBuilder_ == null) { + coordinates_ = java.util.Collections.emptyList(); + } else { + coordinates_ = null; + coordinatesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_LocationFilter_CustomArea_Polygon_descriptor; + } + + @java.lang.Override + public com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon + getDefaultInstanceForType() { + return com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon build() { + com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon buildPartial() { + com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon result = + new com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon result) { + if (coordinatesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + coordinates_ = java.util.Collections.unmodifiableList(coordinates_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.coordinates_ = coordinates_; + } else { + result.coordinates_ = coordinatesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon 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.areainsights.v1.LocationFilter.CustomArea.Polygon) { + return mergeFrom( + (com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon other) { + if (other + == com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon + .getDefaultInstance()) return this; + if (coordinatesBuilder_ == null) { + if (!other.coordinates_.isEmpty()) { + if (coordinates_.isEmpty()) { + coordinates_ = other.coordinates_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCoordinatesIsMutable(); + coordinates_.addAll(other.coordinates_); + } + onChanged(); + } + } else { + if (!other.coordinates_.isEmpty()) { + if (coordinatesBuilder_.isEmpty()) { + coordinatesBuilder_.dispose(); + coordinatesBuilder_ = null; + coordinates_ = other.coordinates_; + bitField0_ = (bitField0_ & ~0x00000001); + coordinatesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCoordinatesFieldBuilder() + : null; + } else { + coordinatesBuilder_.addAllMessages(other.coordinates_); + } + } + } + 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.type.LatLng m = + input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); + if (coordinatesBuilder_ == null) { + ensureCoordinatesIsMutable(); + coordinates_.add(m); + } else { + coordinatesBuilder_.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 coordinates_ = + java.util.Collections.emptyList(); + + private void ensureCoordinatesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + coordinates_ = new java.util.ArrayList(coordinates_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.type.LatLng, + com.google.type.LatLng.Builder, + com.google.type.LatLngOrBuilder> + coordinatesBuilder_; + + /** + * + * + *
+         * Optional. The coordinates that define the polygon.
+         * 
+ * + * + * repeated .google.type.LatLng coordinates = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getCoordinatesList() { + if (coordinatesBuilder_ == null) { + return java.util.Collections.unmodifiableList(coordinates_); + } else { + return coordinatesBuilder_.getMessageList(); + } + } + /** + * + * + *
+         * Optional. The coordinates that define the polygon.
+         * 
+ * + * + * repeated .google.type.LatLng coordinates = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getCoordinatesCount() { + if (coordinatesBuilder_ == null) { + return coordinates_.size(); + } else { + return coordinatesBuilder_.getCount(); + } + } + /** + * + * + *
+         * Optional. The coordinates that define the polygon.
+         * 
+ * + * + * repeated .google.type.LatLng coordinates = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.type.LatLng getCoordinates(int index) { + if (coordinatesBuilder_ == null) { + return coordinates_.get(index); + } else { + return coordinatesBuilder_.getMessage(index); + } + } + /** + * + * + *
+         * Optional. The coordinates that define the polygon.
+         * 
+ * + * + * repeated .google.type.LatLng coordinates = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCoordinates(int index, com.google.type.LatLng value) { + if (coordinatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCoordinatesIsMutable(); + coordinates_.set(index, value); + onChanged(); + } else { + coordinatesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+         * Optional. The coordinates that define the polygon.
+         * 
+ * + * + * repeated .google.type.LatLng coordinates = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCoordinates(int index, com.google.type.LatLng.Builder builderForValue) { + if (coordinatesBuilder_ == null) { + ensureCoordinatesIsMutable(); + coordinates_.set(index, builderForValue.build()); + onChanged(); + } else { + coordinatesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * Optional. The coordinates that define the polygon.
+         * 
+ * + * + * repeated .google.type.LatLng coordinates = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addCoordinates(com.google.type.LatLng value) { + if (coordinatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCoordinatesIsMutable(); + coordinates_.add(value); + onChanged(); + } else { + coordinatesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+         * Optional. The coordinates that define the polygon.
+         * 
+ * + * + * repeated .google.type.LatLng coordinates = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addCoordinates(int index, com.google.type.LatLng value) { + if (coordinatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCoordinatesIsMutable(); + coordinates_.add(index, value); + onChanged(); + } else { + coordinatesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+         * Optional. The coordinates that define the polygon.
+         * 
+ * + * + * repeated .google.type.LatLng coordinates = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addCoordinates(com.google.type.LatLng.Builder builderForValue) { + if (coordinatesBuilder_ == null) { + ensureCoordinatesIsMutable(); + coordinates_.add(builderForValue.build()); + onChanged(); + } else { + coordinatesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * Optional. The coordinates that define the polygon.
+         * 
+ * + * + * repeated .google.type.LatLng coordinates = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addCoordinates(int index, com.google.type.LatLng.Builder builderForValue) { + if (coordinatesBuilder_ == null) { + ensureCoordinatesIsMutable(); + coordinates_.add(index, builderForValue.build()); + onChanged(); + } else { + coordinatesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * Optional. The coordinates that define the polygon.
+         * 
+ * + * + * repeated .google.type.LatLng coordinates = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllCoordinates( + java.lang.Iterable values) { + if (coordinatesBuilder_ == null) { + ensureCoordinatesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, coordinates_); + onChanged(); + } else { + coordinatesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+         * Optional. The coordinates that define the polygon.
+         * 
+ * + * + * repeated .google.type.LatLng coordinates = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearCoordinates() { + if (coordinatesBuilder_ == null) { + coordinates_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + coordinatesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * Optional. The coordinates that define the polygon.
+         * 
+ * + * + * repeated .google.type.LatLng coordinates = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeCoordinates(int index) { + if (coordinatesBuilder_ == null) { + ensureCoordinatesIsMutable(); + coordinates_.remove(index); + onChanged(); + } else { + coordinatesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+         * Optional. The coordinates that define the polygon.
+         * 
+ * + * + * repeated .google.type.LatLng coordinates = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.type.LatLng.Builder getCoordinatesBuilder(int index) { + return getCoordinatesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+         * Optional. The coordinates that define the polygon.
+         * 
+ * + * + * repeated .google.type.LatLng coordinates = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.type.LatLngOrBuilder getCoordinatesOrBuilder(int index) { + if (coordinatesBuilder_ == null) { + return coordinates_.get(index); + } else { + return coordinatesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+         * Optional. The coordinates that define the polygon.
+         * 
+ * + * + * repeated .google.type.LatLng coordinates = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getCoordinatesOrBuilderList() { + if (coordinatesBuilder_ != null) { + return coordinatesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(coordinates_); + } + } + /** + * + * + *
+         * Optional. The coordinates that define the polygon.
+         * 
+ * + * + * repeated .google.type.LatLng coordinates = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.type.LatLng.Builder addCoordinatesBuilder() { + return getCoordinatesFieldBuilder() + .addBuilder(com.google.type.LatLng.getDefaultInstance()); + } + /** + * + * + *
+         * Optional. The coordinates that define the polygon.
+         * 
+ * + * + * repeated .google.type.LatLng coordinates = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.type.LatLng.Builder addCoordinatesBuilder(int index) { + return getCoordinatesFieldBuilder() + .addBuilder(index, com.google.type.LatLng.getDefaultInstance()); + } + /** + * + * + *
+         * Optional. The coordinates that define the polygon.
+         * 
+ * + * + * repeated .google.type.LatLng coordinates = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getCoordinatesBuilderList() { + return getCoordinatesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.type.LatLng, + com.google.type.LatLng.Builder, + com.google.type.LatLngOrBuilder> + getCoordinatesFieldBuilder() { + if (coordinatesBuilder_ == null) { + coordinatesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.type.LatLng, + com.google.type.LatLng.Builder, + com.google.type.LatLngOrBuilder>( + coordinates_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + coordinates_ = null; + } + return coordinatesBuilder_; + } + + @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.areainsights.v1.LocationFilter.CustomArea.Polygon) + } + + // @@protoc_insertion_point(class_scope:google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon) + private static final com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon(); + } + + public static com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Polygon 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.areainsights.v1.LocationFilter.CustomArea.Polygon + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int POLYGON_FIELD_NUMBER = 1; + private com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon polygon_; + /** + * + * + *
+     * Required. The custom area represented as a polygon
+     * 
+ * + * + * .google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon polygon = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the polygon field is set. + */ + @java.lang.Override + public boolean hasPolygon() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. The custom area represented as a polygon
+     * 
+ * + * + * .google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon polygon = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The polygon. + */ + @java.lang.Override + public com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon getPolygon() { + return polygon_ == null + ? com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon.getDefaultInstance() + : polygon_; + } + /** + * + * + *
+     * Required. The custom area represented as a polygon
+     * 
+ * + * + * .google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon polygon = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.maps.areainsights.v1.LocationFilter.CustomArea.PolygonOrBuilder + getPolygonOrBuilder() { + return polygon_ == null + ? com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon.getDefaultInstance() + : polygon_; + } + + 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.writeMessage(1, getPolygon()); + } + 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.computeMessageSize(1, getPolygon()); + } + 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.areainsights.v1.LocationFilter.CustomArea)) { + return super.equals(obj); + } + com.google.maps.areainsights.v1.LocationFilter.CustomArea other = + (com.google.maps.areainsights.v1.LocationFilter.CustomArea) obj; + + if (hasPolygon() != other.hasPolygon()) return false; + if (hasPolygon()) { + if (!getPolygon().equals(other.getPolygon())) 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 (hasPolygon()) { + hash = (37 * hash) + POLYGON_FIELD_NUMBER; + hash = (53 * hash) + getPolygon().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.areainsights.v1.LocationFilter.CustomArea parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.areainsights.v1.LocationFilter.CustomArea 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.areainsights.v1.LocationFilter.CustomArea parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.areainsights.v1.LocationFilter.CustomArea 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.areainsights.v1.LocationFilter.CustomArea parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.areainsights.v1.LocationFilter.CustomArea parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.areainsights.v1.LocationFilter.CustomArea parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.areainsights.v1.LocationFilter.CustomArea 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.areainsights.v1.LocationFilter.CustomArea parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.areainsights.v1.LocationFilter.CustomArea 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.areainsights.v1.LocationFilter.CustomArea parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.areainsights.v1.LocationFilter.CustomArea 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.areainsights.v1.LocationFilter.CustomArea 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; + } + /** + * + * + *
+     * Custom Area.
+     * 
+ * + * Protobuf type {@code google.maps.areainsights.v1.LocationFilter.CustomArea} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.areainsights.v1.LocationFilter.CustomArea) + com.google.maps.areainsights.v1.LocationFilter.CustomAreaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_LocationFilter_CustomArea_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_LocationFilter_CustomArea_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.areainsights.v1.LocationFilter.CustomArea.class, + com.google.maps.areainsights.v1.LocationFilter.CustomArea.Builder.class); + } + + // Construct using com.google.maps.areainsights.v1.LocationFilter.CustomArea.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPolygonFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + polygon_ = null; + if (polygonBuilder_ != null) { + polygonBuilder_.dispose(); + polygonBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_LocationFilter_CustomArea_descriptor; + } + + @java.lang.Override + public com.google.maps.areainsights.v1.LocationFilter.CustomArea getDefaultInstanceForType() { + return com.google.maps.areainsights.v1.LocationFilter.CustomArea.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.areainsights.v1.LocationFilter.CustomArea build() { + com.google.maps.areainsights.v1.LocationFilter.CustomArea result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.areainsights.v1.LocationFilter.CustomArea buildPartial() { + com.google.maps.areainsights.v1.LocationFilter.CustomArea result = + new com.google.maps.areainsights.v1.LocationFilter.CustomArea(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.areainsights.v1.LocationFilter.CustomArea result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.polygon_ = polygonBuilder_ == null ? polygon_ : polygonBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + 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.areainsights.v1.LocationFilter.CustomArea) { + return mergeFrom((com.google.maps.areainsights.v1.LocationFilter.CustomArea) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.areainsights.v1.LocationFilter.CustomArea other) { + if (other == com.google.maps.areainsights.v1.LocationFilter.CustomArea.getDefaultInstance()) + return this; + if (other.hasPolygon()) { + mergePolygon(other.getPolygon()); + } + 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(getPolygonFieldBuilder().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.maps.areainsights.v1.LocationFilter.CustomArea.Polygon polygon_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon, + com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon.Builder, + com.google.maps.areainsights.v1.LocationFilter.CustomArea.PolygonOrBuilder> + polygonBuilder_; + /** + * + * + *
+       * Required. The custom area represented as a polygon
+       * 
+ * + * + * .google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon polygon = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the polygon field is set. + */ + public boolean hasPolygon() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Required. The custom area represented as a polygon
+       * 
+ * + * + * .google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon polygon = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The polygon. + */ + public com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon getPolygon() { + if (polygonBuilder_ == null) { + return polygon_ == null + ? com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon + .getDefaultInstance() + : polygon_; + } else { + return polygonBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Required. The custom area represented as a polygon
+       * 
+ * + * + * .google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon polygon = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPolygon( + com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon value) { + if (polygonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + polygon_ = value; + } else { + polygonBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The custom area represented as a polygon
+       * 
+ * + * + * .google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon polygon = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPolygon( + com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon.Builder + builderForValue) { + if (polygonBuilder_ == null) { + polygon_ = builderForValue.build(); + } else { + polygonBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The custom area represented as a polygon
+       * 
+ * + * + * .google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon polygon = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePolygon( + com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon value) { + if (polygonBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && polygon_ != null + && polygon_ + != com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon + .getDefaultInstance()) { + getPolygonBuilder().mergeFrom(value); + } else { + polygon_ = value; + } + } else { + polygonBuilder_.mergeFrom(value); + } + if (polygon_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Required. The custom area represented as a polygon
+       * 
+ * + * + * .google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon polygon = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPolygon() { + bitField0_ = (bitField0_ & ~0x00000001); + polygon_ = null; + if (polygonBuilder_ != null) { + polygonBuilder_.dispose(); + polygonBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The custom area represented as a polygon
+       * 
+ * + * + * .google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon polygon = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon.Builder + getPolygonBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getPolygonFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. The custom area represented as a polygon
+       * 
+ * + * + * .google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon polygon = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.maps.areainsights.v1.LocationFilter.CustomArea.PolygonOrBuilder + getPolygonOrBuilder() { + if (polygonBuilder_ != null) { + return polygonBuilder_.getMessageOrBuilder(); + } else { + return polygon_ == null + ? com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon + .getDefaultInstance() + : polygon_; + } + } + /** + * + * + *
+       * Required. The custom area represented as a polygon
+       * 
+ * + * + * .google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon polygon = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon, + com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon.Builder, + com.google.maps.areainsights.v1.LocationFilter.CustomArea.PolygonOrBuilder> + getPolygonFieldBuilder() { + if (polygonBuilder_ == null) { + polygonBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon, + com.google.maps.areainsights.v1.LocationFilter.CustomArea.Polygon.Builder, + com.google.maps.areainsights.v1.LocationFilter.CustomArea.PolygonOrBuilder>( + getPolygon(), getParentForChildren(), isClean()); + polygon_ = null; + } + return polygonBuilder_; + } + + @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.areainsights.v1.LocationFilter.CustomArea) + } + + // @@protoc_insertion_point(class_scope:google.maps.areainsights.v1.LocationFilter.CustomArea) + private static final com.google.maps.areainsights.v1.LocationFilter.CustomArea DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.areainsights.v1.LocationFilter.CustomArea(); + } + + public static com.google.maps.areainsights.v1.LocationFilter.CustomArea getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CustomArea 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.areainsights.v1.LocationFilter.CustomArea getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int areaCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object area_; + + public enum AreaCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CIRCLE(1), + REGION(2), + CUSTOM_AREA(3), + AREA_NOT_SET(0); + private final int value; + + private AreaCase(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 AreaCase valueOf(int value) { + return forNumber(value); + } + + public static AreaCase forNumber(int value) { + switch (value) { + case 1: + return CIRCLE; + case 2: + return REGION; + case 3: + return CUSTOM_AREA; + case 0: + return AREA_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public AreaCase getAreaCase() { + return AreaCase.forNumber(areaCase_); + } + + public static final int CIRCLE_FIELD_NUMBER = 1; + /** + * + * + *
+   * Area as a circle.
+   * 
+ * + * .google.maps.areainsights.v1.LocationFilter.Circle circle = 1; + * + * @return Whether the circle field is set. + */ + @java.lang.Override + public boolean hasCircle() { + return areaCase_ == 1; + } + /** + * + * + *
+   * Area as a circle.
+   * 
+ * + * .google.maps.areainsights.v1.LocationFilter.Circle circle = 1; + * + * @return The circle. + */ + @java.lang.Override + public com.google.maps.areainsights.v1.LocationFilter.Circle getCircle() { + if (areaCase_ == 1) { + return (com.google.maps.areainsights.v1.LocationFilter.Circle) area_; + } + return com.google.maps.areainsights.v1.LocationFilter.Circle.getDefaultInstance(); + } + /** + * + * + *
+   * Area as a circle.
+   * 
+ * + * .google.maps.areainsights.v1.LocationFilter.Circle circle = 1; + */ + @java.lang.Override + public com.google.maps.areainsights.v1.LocationFilter.CircleOrBuilder getCircleOrBuilder() { + if (areaCase_ == 1) { + return (com.google.maps.areainsights.v1.LocationFilter.Circle) area_; + } + return com.google.maps.areainsights.v1.LocationFilter.Circle.getDefaultInstance(); + } + + public static final int REGION_FIELD_NUMBER = 2; + /** + * + * + *
+   * Area as region.
+   * 
+ * + * .google.maps.areainsights.v1.LocationFilter.Region region = 2; + * + * @return Whether the region field is set. + */ + @java.lang.Override + public boolean hasRegion() { + return areaCase_ == 2; + } + /** + * + * + *
+   * Area as region.
+   * 
+ * + * .google.maps.areainsights.v1.LocationFilter.Region region = 2; + * + * @return The region. + */ + @java.lang.Override + public com.google.maps.areainsights.v1.LocationFilter.Region getRegion() { + if (areaCase_ == 2) { + return (com.google.maps.areainsights.v1.LocationFilter.Region) area_; + } + return com.google.maps.areainsights.v1.LocationFilter.Region.getDefaultInstance(); + } + /** + * + * + *
+   * Area as region.
+   * 
+ * + * .google.maps.areainsights.v1.LocationFilter.Region region = 2; + */ + @java.lang.Override + public com.google.maps.areainsights.v1.LocationFilter.RegionOrBuilder getRegionOrBuilder() { + if (areaCase_ == 2) { + return (com.google.maps.areainsights.v1.LocationFilter.Region) area_; + } + return com.google.maps.areainsights.v1.LocationFilter.Region.getDefaultInstance(); + } + + public static final int CUSTOM_AREA_FIELD_NUMBER = 3; + /** + * + * + *
+   * Custom area specified by a polygon.
+   * 
+ * + * .google.maps.areainsights.v1.LocationFilter.CustomArea custom_area = 3; + * + * @return Whether the customArea field is set. + */ + @java.lang.Override + public boolean hasCustomArea() { + return areaCase_ == 3; + } + /** + * + * + *
+   * Custom area specified by a polygon.
+   * 
+ * + * .google.maps.areainsights.v1.LocationFilter.CustomArea custom_area = 3; + * + * @return The customArea. + */ + @java.lang.Override + public com.google.maps.areainsights.v1.LocationFilter.CustomArea getCustomArea() { + if (areaCase_ == 3) { + return (com.google.maps.areainsights.v1.LocationFilter.CustomArea) area_; + } + return com.google.maps.areainsights.v1.LocationFilter.CustomArea.getDefaultInstance(); + } + /** + * + * + *
+   * Custom area specified by a polygon.
+   * 
+ * + * .google.maps.areainsights.v1.LocationFilter.CustomArea custom_area = 3; + */ + @java.lang.Override + public com.google.maps.areainsights.v1.LocationFilter.CustomAreaOrBuilder + getCustomAreaOrBuilder() { + if (areaCase_ == 3) { + return (com.google.maps.areainsights.v1.LocationFilter.CustomArea) area_; + } + return com.google.maps.areainsights.v1.LocationFilter.CustomArea.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 (areaCase_ == 1) { + output.writeMessage(1, (com.google.maps.areainsights.v1.LocationFilter.Circle) area_); + } + if (areaCase_ == 2) { + output.writeMessage(2, (com.google.maps.areainsights.v1.LocationFilter.Region) area_); + } + if (areaCase_ == 3) { + output.writeMessage(3, (com.google.maps.areainsights.v1.LocationFilter.CustomArea) area_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (areaCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.maps.areainsights.v1.LocationFilter.Circle) area_); + } + if (areaCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.maps.areainsights.v1.LocationFilter.Region) area_); + } + if (areaCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.maps.areainsights.v1.LocationFilter.CustomArea) area_); + } + 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.areainsights.v1.LocationFilter)) { + return super.equals(obj); + } + com.google.maps.areainsights.v1.LocationFilter other = + (com.google.maps.areainsights.v1.LocationFilter) obj; + + if (!getAreaCase().equals(other.getAreaCase())) return false; + switch (areaCase_) { + case 1: + if (!getCircle().equals(other.getCircle())) return false; + break; + case 2: + if (!getRegion().equals(other.getRegion())) return false; + break; + case 3: + if (!getCustomArea().equals(other.getCustomArea())) 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 (areaCase_) { + case 1: + hash = (37 * hash) + CIRCLE_FIELD_NUMBER; + hash = (53 * hash) + getCircle().hashCode(); + break; + case 2: + hash = (37 * hash) + REGION_FIELD_NUMBER; + hash = (53 * hash) + getRegion().hashCode(); + break; + case 3: + hash = (37 * hash) + CUSTOM_AREA_FIELD_NUMBER; + hash = (53 * hash) + getCustomArea().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.areainsights.v1.LocationFilter parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.areainsights.v1.LocationFilter 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.areainsights.v1.LocationFilter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.areainsights.v1.LocationFilter 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.areainsights.v1.LocationFilter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.areainsights.v1.LocationFilter parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.areainsights.v1.LocationFilter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.areainsights.v1.LocationFilter 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.areainsights.v1.LocationFilter parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.areainsights.v1.LocationFilter 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.areainsights.v1.LocationFilter parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.areainsights.v1.LocationFilter 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.areainsights.v1.LocationFilter 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; + } + /** + * + * + *
+   * Location filters.
+   *
+   * Specifies the area of interest for the insight.
+   * 
+ * + * Protobuf type {@code google.maps.areainsights.v1.LocationFilter} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.areainsights.v1.LocationFilter) + com.google.maps.areainsights.v1.LocationFilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_LocationFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_LocationFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.areainsights.v1.LocationFilter.class, + com.google.maps.areainsights.v1.LocationFilter.Builder.class); + } + + // Construct using com.google.maps.areainsights.v1.LocationFilter.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (circleBuilder_ != null) { + circleBuilder_.clear(); + } + if (regionBuilder_ != null) { + regionBuilder_.clear(); + } + if (customAreaBuilder_ != null) { + customAreaBuilder_.clear(); + } + areaCase_ = 0; + area_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_LocationFilter_descriptor; + } + + @java.lang.Override + public com.google.maps.areainsights.v1.LocationFilter getDefaultInstanceForType() { + return com.google.maps.areainsights.v1.LocationFilter.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.areainsights.v1.LocationFilter build() { + com.google.maps.areainsights.v1.LocationFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.areainsights.v1.LocationFilter buildPartial() { + com.google.maps.areainsights.v1.LocationFilter result = + new com.google.maps.areainsights.v1.LocationFilter(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.areainsights.v1.LocationFilter result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.maps.areainsights.v1.LocationFilter result) { + result.areaCase_ = areaCase_; + result.area_ = this.area_; + if (areaCase_ == 1 && circleBuilder_ != null) { + result.area_ = circleBuilder_.build(); + } + if (areaCase_ == 2 && regionBuilder_ != null) { + result.area_ = regionBuilder_.build(); + } + if (areaCase_ == 3 && customAreaBuilder_ != null) { + result.area_ = customAreaBuilder_.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.areainsights.v1.LocationFilter) { + return mergeFrom((com.google.maps.areainsights.v1.LocationFilter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.areainsights.v1.LocationFilter other) { + if (other == com.google.maps.areainsights.v1.LocationFilter.getDefaultInstance()) return this; + switch (other.getAreaCase()) { + case CIRCLE: + { + mergeCircle(other.getCircle()); + break; + } + case REGION: + { + mergeRegion(other.getRegion()); + break; + } + case CUSTOM_AREA: + { + mergeCustomArea(other.getCustomArea()); + break; + } + case AREA_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(getCircleFieldBuilder().getBuilder(), extensionRegistry); + areaCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(getRegionFieldBuilder().getBuilder(), extensionRegistry); + areaCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getCustomAreaFieldBuilder().getBuilder(), extensionRegistry); + areaCase_ = 3; + break; + } // case 26 + 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 areaCase_ = 0; + private java.lang.Object area_; + + public AreaCase getAreaCase() { + return AreaCase.forNumber(areaCase_); + } + + public Builder clearArea() { + areaCase_ = 0; + area_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.areainsights.v1.LocationFilter.Circle, + com.google.maps.areainsights.v1.LocationFilter.Circle.Builder, + com.google.maps.areainsights.v1.LocationFilter.CircleOrBuilder> + circleBuilder_; + /** + * + * + *
+     * Area as a circle.
+     * 
+ * + * .google.maps.areainsights.v1.LocationFilter.Circle circle = 1; + * + * @return Whether the circle field is set. + */ + @java.lang.Override + public boolean hasCircle() { + return areaCase_ == 1; + } + /** + * + * + *
+     * Area as a circle.
+     * 
+ * + * .google.maps.areainsights.v1.LocationFilter.Circle circle = 1; + * + * @return The circle. + */ + @java.lang.Override + public com.google.maps.areainsights.v1.LocationFilter.Circle getCircle() { + if (circleBuilder_ == null) { + if (areaCase_ == 1) { + return (com.google.maps.areainsights.v1.LocationFilter.Circle) area_; + } + return com.google.maps.areainsights.v1.LocationFilter.Circle.getDefaultInstance(); + } else { + if (areaCase_ == 1) { + return circleBuilder_.getMessage(); + } + return com.google.maps.areainsights.v1.LocationFilter.Circle.getDefaultInstance(); + } + } + /** + * + * + *
+     * Area as a circle.
+     * 
+ * + * .google.maps.areainsights.v1.LocationFilter.Circle circle = 1; + */ + public Builder setCircle(com.google.maps.areainsights.v1.LocationFilter.Circle value) { + if (circleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + area_ = value; + onChanged(); + } else { + circleBuilder_.setMessage(value); + } + areaCase_ = 1; + return this; + } + /** + * + * + *
+     * Area as a circle.
+     * 
+ * + * .google.maps.areainsights.v1.LocationFilter.Circle circle = 1; + */ + public Builder setCircle( + com.google.maps.areainsights.v1.LocationFilter.Circle.Builder builderForValue) { + if (circleBuilder_ == null) { + area_ = builderForValue.build(); + onChanged(); + } else { + circleBuilder_.setMessage(builderForValue.build()); + } + areaCase_ = 1; + return this; + } + /** + * + * + *
+     * Area as a circle.
+     * 
+ * + * .google.maps.areainsights.v1.LocationFilter.Circle circle = 1; + */ + public Builder mergeCircle(com.google.maps.areainsights.v1.LocationFilter.Circle value) { + if (circleBuilder_ == null) { + if (areaCase_ == 1 + && area_ + != com.google.maps.areainsights.v1.LocationFilter.Circle.getDefaultInstance()) { + area_ = + com.google.maps.areainsights.v1.LocationFilter.Circle.newBuilder( + (com.google.maps.areainsights.v1.LocationFilter.Circle) area_) + .mergeFrom(value) + .buildPartial(); + } else { + area_ = value; + } + onChanged(); + } else { + if (areaCase_ == 1) { + circleBuilder_.mergeFrom(value); + } else { + circleBuilder_.setMessage(value); + } + } + areaCase_ = 1; + return this; + } + /** + * + * + *
+     * Area as a circle.
+     * 
+ * + * .google.maps.areainsights.v1.LocationFilter.Circle circle = 1; + */ + public Builder clearCircle() { + if (circleBuilder_ == null) { + if (areaCase_ == 1) { + areaCase_ = 0; + area_ = null; + onChanged(); + } + } else { + if (areaCase_ == 1) { + areaCase_ = 0; + area_ = null; + } + circleBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Area as a circle.
+     * 
+ * + * .google.maps.areainsights.v1.LocationFilter.Circle circle = 1; + */ + public com.google.maps.areainsights.v1.LocationFilter.Circle.Builder getCircleBuilder() { + return getCircleFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Area as a circle.
+     * 
+ * + * .google.maps.areainsights.v1.LocationFilter.Circle circle = 1; + */ + @java.lang.Override + public com.google.maps.areainsights.v1.LocationFilter.CircleOrBuilder getCircleOrBuilder() { + if ((areaCase_ == 1) && (circleBuilder_ != null)) { + return circleBuilder_.getMessageOrBuilder(); + } else { + if (areaCase_ == 1) { + return (com.google.maps.areainsights.v1.LocationFilter.Circle) area_; + } + return com.google.maps.areainsights.v1.LocationFilter.Circle.getDefaultInstance(); + } + } + /** + * + * + *
+     * Area as a circle.
+     * 
+ * + * .google.maps.areainsights.v1.LocationFilter.Circle circle = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.areainsights.v1.LocationFilter.Circle, + com.google.maps.areainsights.v1.LocationFilter.Circle.Builder, + com.google.maps.areainsights.v1.LocationFilter.CircleOrBuilder> + getCircleFieldBuilder() { + if (circleBuilder_ == null) { + if (!(areaCase_ == 1)) { + area_ = com.google.maps.areainsights.v1.LocationFilter.Circle.getDefaultInstance(); + } + circleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.areainsights.v1.LocationFilter.Circle, + com.google.maps.areainsights.v1.LocationFilter.Circle.Builder, + com.google.maps.areainsights.v1.LocationFilter.CircleOrBuilder>( + (com.google.maps.areainsights.v1.LocationFilter.Circle) area_, + getParentForChildren(), + isClean()); + area_ = null; + } + areaCase_ = 1; + onChanged(); + return circleBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.areainsights.v1.LocationFilter.Region, + com.google.maps.areainsights.v1.LocationFilter.Region.Builder, + com.google.maps.areainsights.v1.LocationFilter.RegionOrBuilder> + regionBuilder_; + /** + * + * + *
+     * Area as region.
+     * 
+ * + * .google.maps.areainsights.v1.LocationFilter.Region region = 2; + * + * @return Whether the region field is set. + */ + @java.lang.Override + public boolean hasRegion() { + return areaCase_ == 2; + } + /** + * + * + *
+     * Area as region.
+     * 
+ * + * .google.maps.areainsights.v1.LocationFilter.Region region = 2; + * + * @return The region. + */ + @java.lang.Override + public com.google.maps.areainsights.v1.LocationFilter.Region getRegion() { + if (regionBuilder_ == null) { + if (areaCase_ == 2) { + return (com.google.maps.areainsights.v1.LocationFilter.Region) area_; + } + return com.google.maps.areainsights.v1.LocationFilter.Region.getDefaultInstance(); + } else { + if (areaCase_ == 2) { + return regionBuilder_.getMessage(); + } + return com.google.maps.areainsights.v1.LocationFilter.Region.getDefaultInstance(); + } + } + /** + * + * + *
+     * Area as region.
+     * 
+ * + * .google.maps.areainsights.v1.LocationFilter.Region region = 2; + */ + public Builder setRegion(com.google.maps.areainsights.v1.LocationFilter.Region value) { + if (regionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + area_ = value; + onChanged(); + } else { + regionBuilder_.setMessage(value); + } + areaCase_ = 2; + return this; + } + /** + * + * + *
+     * Area as region.
+     * 
+ * + * .google.maps.areainsights.v1.LocationFilter.Region region = 2; + */ + public Builder setRegion( + com.google.maps.areainsights.v1.LocationFilter.Region.Builder builderForValue) { + if (regionBuilder_ == null) { + area_ = builderForValue.build(); + onChanged(); + } else { + regionBuilder_.setMessage(builderForValue.build()); + } + areaCase_ = 2; + return this; + } + /** + * + * + *
+     * Area as region.
+     * 
+ * + * .google.maps.areainsights.v1.LocationFilter.Region region = 2; + */ + public Builder mergeRegion(com.google.maps.areainsights.v1.LocationFilter.Region value) { + if (regionBuilder_ == null) { + if (areaCase_ == 2 + && area_ + != com.google.maps.areainsights.v1.LocationFilter.Region.getDefaultInstance()) { + area_ = + com.google.maps.areainsights.v1.LocationFilter.Region.newBuilder( + (com.google.maps.areainsights.v1.LocationFilter.Region) area_) + .mergeFrom(value) + .buildPartial(); + } else { + area_ = value; + } + onChanged(); + } else { + if (areaCase_ == 2) { + regionBuilder_.mergeFrom(value); + } else { + regionBuilder_.setMessage(value); + } + } + areaCase_ = 2; + return this; + } + /** + * + * + *
+     * Area as region.
+     * 
+ * + * .google.maps.areainsights.v1.LocationFilter.Region region = 2; + */ + public Builder clearRegion() { + if (regionBuilder_ == null) { + if (areaCase_ == 2) { + areaCase_ = 0; + area_ = null; + onChanged(); + } + } else { + if (areaCase_ == 2) { + areaCase_ = 0; + area_ = null; + } + regionBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Area as region.
+     * 
+ * + * .google.maps.areainsights.v1.LocationFilter.Region region = 2; + */ + public com.google.maps.areainsights.v1.LocationFilter.Region.Builder getRegionBuilder() { + return getRegionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Area as region.
+     * 
+ * + * .google.maps.areainsights.v1.LocationFilter.Region region = 2; + */ + @java.lang.Override + public com.google.maps.areainsights.v1.LocationFilter.RegionOrBuilder getRegionOrBuilder() { + if ((areaCase_ == 2) && (regionBuilder_ != null)) { + return regionBuilder_.getMessageOrBuilder(); + } else { + if (areaCase_ == 2) { + return (com.google.maps.areainsights.v1.LocationFilter.Region) area_; + } + return com.google.maps.areainsights.v1.LocationFilter.Region.getDefaultInstance(); + } + } + /** + * + * + *
+     * Area as region.
+     * 
+ * + * .google.maps.areainsights.v1.LocationFilter.Region region = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.areainsights.v1.LocationFilter.Region, + com.google.maps.areainsights.v1.LocationFilter.Region.Builder, + com.google.maps.areainsights.v1.LocationFilter.RegionOrBuilder> + getRegionFieldBuilder() { + if (regionBuilder_ == null) { + if (!(areaCase_ == 2)) { + area_ = com.google.maps.areainsights.v1.LocationFilter.Region.getDefaultInstance(); + } + regionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.areainsights.v1.LocationFilter.Region, + com.google.maps.areainsights.v1.LocationFilter.Region.Builder, + com.google.maps.areainsights.v1.LocationFilter.RegionOrBuilder>( + (com.google.maps.areainsights.v1.LocationFilter.Region) area_, + getParentForChildren(), + isClean()); + area_ = null; + } + areaCase_ = 2; + onChanged(); + return regionBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.areainsights.v1.LocationFilter.CustomArea, + com.google.maps.areainsights.v1.LocationFilter.CustomArea.Builder, + com.google.maps.areainsights.v1.LocationFilter.CustomAreaOrBuilder> + customAreaBuilder_; + /** + * + * + *
+     * Custom area specified by a polygon.
+     * 
+ * + * .google.maps.areainsights.v1.LocationFilter.CustomArea custom_area = 3; + * + * @return Whether the customArea field is set. + */ + @java.lang.Override + public boolean hasCustomArea() { + return areaCase_ == 3; + } + /** + * + * + *
+     * Custom area specified by a polygon.
+     * 
+ * + * .google.maps.areainsights.v1.LocationFilter.CustomArea custom_area = 3; + * + * @return The customArea. + */ + @java.lang.Override + public com.google.maps.areainsights.v1.LocationFilter.CustomArea getCustomArea() { + if (customAreaBuilder_ == null) { + if (areaCase_ == 3) { + return (com.google.maps.areainsights.v1.LocationFilter.CustomArea) area_; + } + return com.google.maps.areainsights.v1.LocationFilter.CustomArea.getDefaultInstance(); + } else { + if (areaCase_ == 3) { + return customAreaBuilder_.getMessage(); + } + return com.google.maps.areainsights.v1.LocationFilter.CustomArea.getDefaultInstance(); + } + } + /** + * + * + *
+     * Custom area specified by a polygon.
+     * 
+ * + * .google.maps.areainsights.v1.LocationFilter.CustomArea custom_area = 3; + */ + public Builder setCustomArea(com.google.maps.areainsights.v1.LocationFilter.CustomArea value) { + if (customAreaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + area_ = value; + onChanged(); + } else { + customAreaBuilder_.setMessage(value); + } + areaCase_ = 3; + return this; + } + /** + * + * + *
+     * Custom area specified by a polygon.
+     * 
+ * + * .google.maps.areainsights.v1.LocationFilter.CustomArea custom_area = 3; + */ + public Builder setCustomArea( + com.google.maps.areainsights.v1.LocationFilter.CustomArea.Builder builderForValue) { + if (customAreaBuilder_ == null) { + area_ = builderForValue.build(); + onChanged(); + } else { + customAreaBuilder_.setMessage(builderForValue.build()); + } + areaCase_ = 3; + return this; + } + /** + * + * + *
+     * Custom area specified by a polygon.
+     * 
+ * + * .google.maps.areainsights.v1.LocationFilter.CustomArea custom_area = 3; + */ + public Builder mergeCustomArea( + com.google.maps.areainsights.v1.LocationFilter.CustomArea value) { + if (customAreaBuilder_ == null) { + if (areaCase_ == 3 + && area_ + != com.google.maps.areainsights.v1.LocationFilter.CustomArea.getDefaultInstance()) { + area_ = + com.google.maps.areainsights.v1.LocationFilter.CustomArea.newBuilder( + (com.google.maps.areainsights.v1.LocationFilter.CustomArea) area_) + .mergeFrom(value) + .buildPartial(); + } else { + area_ = value; + } + onChanged(); + } else { + if (areaCase_ == 3) { + customAreaBuilder_.mergeFrom(value); + } else { + customAreaBuilder_.setMessage(value); + } + } + areaCase_ = 3; + return this; + } + /** + * + * + *
+     * Custom area specified by a polygon.
+     * 
+ * + * .google.maps.areainsights.v1.LocationFilter.CustomArea custom_area = 3; + */ + public Builder clearCustomArea() { + if (customAreaBuilder_ == null) { + if (areaCase_ == 3) { + areaCase_ = 0; + area_ = null; + onChanged(); + } + } else { + if (areaCase_ == 3) { + areaCase_ = 0; + area_ = null; + } + customAreaBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Custom area specified by a polygon.
+     * 
+ * + * .google.maps.areainsights.v1.LocationFilter.CustomArea custom_area = 3; + */ + public com.google.maps.areainsights.v1.LocationFilter.CustomArea.Builder + getCustomAreaBuilder() { + return getCustomAreaFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Custom area specified by a polygon.
+     * 
+ * + * .google.maps.areainsights.v1.LocationFilter.CustomArea custom_area = 3; + */ + @java.lang.Override + public com.google.maps.areainsights.v1.LocationFilter.CustomAreaOrBuilder + getCustomAreaOrBuilder() { + if ((areaCase_ == 3) && (customAreaBuilder_ != null)) { + return customAreaBuilder_.getMessageOrBuilder(); + } else { + if (areaCase_ == 3) { + return (com.google.maps.areainsights.v1.LocationFilter.CustomArea) area_; + } + return com.google.maps.areainsights.v1.LocationFilter.CustomArea.getDefaultInstance(); + } + } + /** + * + * + *
+     * Custom area specified by a polygon.
+     * 
+ * + * .google.maps.areainsights.v1.LocationFilter.CustomArea custom_area = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.areainsights.v1.LocationFilter.CustomArea, + com.google.maps.areainsights.v1.LocationFilter.CustomArea.Builder, + com.google.maps.areainsights.v1.LocationFilter.CustomAreaOrBuilder> + getCustomAreaFieldBuilder() { + if (customAreaBuilder_ == null) { + if (!(areaCase_ == 3)) { + area_ = com.google.maps.areainsights.v1.LocationFilter.CustomArea.getDefaultInstance(); + } + customAreaBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.areainsights.v1.LocationFilter.CustomArea, + com.google.maps.areainsights.v1.LocationFilter.CustomArea.Builder, + com.google.maps.areainsights.v1.LocationFilter.CustomAreaOrBuilder>( + (com.google.maps.areainsights.v1.LocationFilter.CustomArea) area_, + getParentForChildren(), + isClean()); + area_ = null; + } + areaCase_ = 3; + onChanged(); + return customAreaBuilder_; + } + + @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.areainsights.v1.LocationFilter) + } + + // @@protoc_insertion_point(class_scope:google.maps.areainsights.v1.LocationFilter) + private static final com.google.maps.areainsights.v1.LocationFilter DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.areainsights.v1.LocationFilter(); + } + + public static com.google.maps.areainsights.v1.LocationFilter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LocationFilter 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.areainsights.v1.LocationFilter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/LocationFilterOrBuilder.java b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/LocationFilterOrBuilder.java new file mode 100644 index 000000000000..555368f4b1c0 --- /dev/null +++ b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/LocationFilterOrBuilder.java @@ -0,0 +1,133 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/areainsights/v1/area_insights_service.proto + +// Protobuf Java Version: 3.25.4 +package com.google.maps.areainsights.v1; + +public interface LocationFilterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.areainsights.v1.LocationFilter) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Area as a circle.
+   * 
+ * + * .google.maps.areainsights.v1.LocationFilter.Circle circle = 1; + * + * @return Whether the circle field is set. + */ + boolean hasCircle(); + /** + * + * + *
+   * Area as a circle.
+   * 
+ * + * .google.maps.areainsights.v1.LocationFilter.Circle circle = 1; + * + * @return The circle. + */ + com.google.maps.areainsights.v1.LocationFilter.Circle getCircle(); + /** + * + * + *
+   * Area as a circle.
+   * 
+ * + * .google.maps.areainsights.v1.LocationFilter.Circle circle = 1; + */ + com.google.maps.areainsights.v1.LocationFilter.CircleOrBuilder getCircleOrBuilder(); + + /** + * + * + *
+   * Area as region.
+   * 
+ * + * .google.maps.areainsights.v1.LocationFilter.Region region = 2; + * + * @return Whether the region field is set. + */ + boolean hasRegion(); + /** + * + * + *
+   * Area as region.
+   * 
+ * + * .google.maps.areainsights.v1.LocationFilter.Region region = 2; + * + * @return The region. + */ + com.google.maps.areainsights.v1.LocationFilter.Region getRegion(); + /** + * + * + *
+   * Area as region.
+   * 
+ * + * .google.maps.areainsights.v1.LocationFilter.Region region = 2; + */ + com.google.maps.areainsights.v1.LocationFilter.RegionOrBuilder getRegionOrBuilder(); + + /** + * + * + *
+   * Custom area specified by a polygon.
+   * 
+ * + * .google.maps.areainsights.v1.LocationFilter.CustomArea custom_area = 3; + * + * @return Whether the customArea field is set. + */ + boolean hasCustomArea(); + /** + * + * + *
+   * Custom area specified by a polygon.
+   * 
+ * + * .google.maps.areainsights.v1.LocationFilter.CustomArea custom_area = 3; + * + * @return The customArea. + */ + com.google.maps.areainsights.v1.LocationFilter.CustomArea getCustomArea(); + /** + * + * + *
+   * Custom area specified by a polygon.
+   * 
+ * + * .google.maps.areainsights.v1.LocationFilter.CustomArea custom_area = 3; + */ + com.google.maps.areainsights.v1.LocationFilter.CustomAreaOrBuilder getCustomAreaOrBuilder(); + + com.google.maps.areainsights.v1.LocationFilter.AreaCase getAreaCase(); +} diff --git a/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/OperatingStatus.java b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/OperatingStatus.java new file mode 100644 index 000000000000..8a2fd8e6a039 --- /dev/null +++ b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/OperatingStatus.java @@ -0,0 +1,201 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/areainsights/v1/area_insights_service.proto + +// Protobuf Java Version: 3.25.4 +package com.google.maps.areainsights.v1; + +/** + * + * + *
+ * Operating status of the place.
+ * 
+ * + * Protobuf enum {@code google.maps.areainsights.v1.OperatingStatus} + */ +public enum OperatingStatus implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Not Specified.
+   * 
+ * + * OPERATING_STATUS_UNSPECIFIED = 0; + */ + OPERATING_STATUS_UNSPECIFIED(0), + /** + * + * + *
+   * The place is operational and its open during its defined hours.
+   * 
+ * + * OPERATING_STATUS_OPERATIONAL = 1; + */ + OPERATING_STATUS_OPERATIONAL(1), + /** + * + * + *
+   * The Place is no longer in business.
+   * 
+ * + * OPERATING_STATUS_PERMANENTLY_CLOSED = 3; + */ + OPERATING_STATUS_PERMANENTLY_CLOSED(3), + /** + * + * + *
+   * The Place is temporarily closed and expected to reopen in the future.
+   * 
+ * + * OPERATING_STATUS_TEMPORARILY_CLOSED = 4; + */ + OPERATING_STATUS_TEMPORARILY_CLOSED(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Not Specified.
+   * 
+ * + * OPERATING_STATUS_UNSPECIFIED = 0; + */ + public static final int OPERATING_STATUS_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * The place is operational and its open during its defined hours.
+   * 
+ * + * OPERATING_STATUS_OPERATIONAL = 1; + */ + public static final int OPERATING_STATUS_OPERATIONAL_VALUE = 1; + /** + * + * + *
+   * The Place is no longer in business.
+   * 
+ * + * OPERATING_STATUS_PERMANENTLY_CLOSED = 3; + */ + public static final int OPERATING_STATUS_PERMANENTLY_CLOSED_VALUE = 3; + /** + * + * + *
+   * The Place is temporarily closed and expected to reopen in the future.
+   * 
+ * + * OPERATING_STATUS_TEMPORARILY_CLOSED = 4; + */ + public static final int OPERATING_STATUS_TEMPORARILY_CLOSED_VALUE = 4; + + 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 OperatingStatus 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 OperatingStatus forNumber(int value) { + switch (value) { + case 0: + return OPERATING_STATUS_UNSPECIFIED; + case 1: + return OPERATING_STATUS_OPERATIONAL; + case 3: + return OPERATING_STATUS_PERMANENTLY_CLOSED; + case 4: + return OPERATING_STATUS_TEMPORARILY_CLOSED; + 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 OperatingStatus findValueByNumber(int number) { + return OperatingStatus.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.areainsights.v1.AreaInsightsServiceProto.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final OperatingStatus[] VALUES = values(); + + public static OperatingStatus 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 OperatingStatus(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.maps.areainsights.v1.OperatingStatus) +} diff --git a/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/PlaceInsight.java b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/PlaceInsight.java new file mode 100644 index 000000000000..8345e3b05bb2 --- /dev/null +++ b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/PlaceInsight.java @@ -0,0 +1,638 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/areainsights/v1/area_insights_service.proto + +// Protobuf Java Version: 3.25.4 +package com.google.maps.areainsights.v1; + +/** + * + * + *
+ * Holds information about a place
+ * 
+ * + * Protobuf type {@code google.maps.areainsights.v1.PlaceInsight} + */ +public final class PlaceInsight extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.maps.areainsights.v1.PlaceInsight) + PlaceInsightOrBuilder { + private static final long serialVersionUID = 0L; + // Use PlaceInsight.newBuilder() to construct. + private PlaceInsight(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PlaceInsight() { + place_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PlaceInsight(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_PlaceInsight_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_PlaceInsight_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.areainsights.v1.PlaceInsight.class, + com.google.maps.areainsights.v1.PlaceInsight.Builder.class); + } + + public static final int PLACE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object place_ = ""; + /** + * + * + *
+   * The resource name of a place. This resource name can be used to retrieve
+   * details about the place using the [Places
+   * API](https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places/get).
+   * 
+ * + * string place = 1 [(.google.api.resource_reference) = { ... } + * + * @return The place. + */ + @java.lang.Override + public java.lang.String getPlace() { + java.lang.Object ref = place_; + 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(); + place_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name of a place. This resource name can be used to retrieve
+   * details about the place using the [Places
+   * API](https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places/get).
+   * 
+ * + * string place = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for place. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPlaceBytes() { + java.lang.Object ref = place_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + place_ = 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(place_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, place_); + } + 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(place_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, place_); + } + 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.areainsights.v1.PlaceInsight)) { + return super.equals(obj); + } + com.google.maps.areainsights.v1.PlaceInsight other = + (com.google.maps.areainsights.v1.PlaceInsight) obj; + + if (!getPlace().equals(other.getPlace())) 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) + PLACE_FIELD_NUMBER; + hash = (53 * hash) + getPlace().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.areainsights.v1.PlaceInsight parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.areainsights.v1.PlaceInsight 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.areainsights.v1.PlaceInsight parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.areainsights.v1.PlaceInsight 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.areainsights.v1.PlaceInsight parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.areainsights.v1.PlaceInsight parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.areainsights.v1.PlaceInsight parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.areainsights.v1.PlaceInsight 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.areainsights.v1.PlaceInsight parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.areainsights.v1.PlaceInsight 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.areainsights.v1.PlaceInsight parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.areainsights.v1.PlaceInsight 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.areainsights.v1.PlaceInsight 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; + } + /** + * + * + *
+   * Holds information about a place
+   * 
+ * + * Protobuf type {@code google.maps.areainsights.v1.PlaceInsight} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.areainsights.v1.PlaceInsight) + com.google.maps.areainsights.v1.PlaceInsightOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_PlaceInsight_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_PlaceInsight_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.areainsights.v1.PlaceInsight.class, + com.google.maps.areainsights.v1.PlaceInsight.Builder.class); + } + + // Construct using com.google.maps.areainsights.v1.PlaceInsight.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + place_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_PlaceInsight_descriptor; + } + + @java.lang.Override + public com.google.maps.areainsights.v1.PlaceInsight getDefaultInstanceForType() { + return com.google.maps.areainsights.v1.PlaceInsight.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.areainsights.v1.PlaceInsight build() { + com.google.maps.areainsights.v1.PlaceInsight result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.areainsights.v1.PlaceInsight buildPartial() { + com.google.maps.areainsights.v1.PlaceInsight result = + new com.google.maps.areainsights.v1.PlaceInsight(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.areainsights.v1.PlaceInsight result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.place_ = place_; + } + } + + @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.areainsights.v1.PlaceInsight) { + return mergeFrom((com.google.maps.areainsights.v1.PlaceInsight) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.areainsights.v1.PlaceInsight other) { + if (other == com.google.maps.areainsights.v1.PlaceInsight.getDefaultInstance()) return this; + if (!other.getPlace().isEmpty()) { + place_ = other.place_; + bitField0_ |= 0x00000001; + 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: + { + place_ = input.readStringRequireUtf8(); + 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 java.lang.Object place_ = ""; + /** + * + * + *
+     * The resource name of a place. This resource name can be used to retrieve
+     * details about the place using the [Places
+     * API](https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places/get).
+     * 
+ * + * string place = 1 [(.google.api.resource_reference) = { ... } + * + * @return The place. + */ + public java.lang.String getPlace() { + java.lang.Object ref = place_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + place_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name of a place. This resource name can be used to retrieve
+     * details about the place using the [Places
+     * API](https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places/get).
+     * 
+ * + * string place = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for place. + */ + public com.google.protobuf.ByteString getPlaceBytes() { + java.lang.Object ref = place_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + place_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name of a place. This resource name can be used to retrieve
+     * details about the place using the [Places
+     * API](https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places/get).
+     * 
+ * + * string place = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The place to set. + * @return This builder for chaining. + */ + public Builder setPlace(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + place_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of a place. This resource name can be used to retrieve
+     * details about the place using the [Places
+     * API](https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places/get).
+     * 
+ * + * string place = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearPlace() { + place_ = getDefaultInstance().getPlace(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of a place. This resource name can be used to retrieve
+     * details about the place using the [Places
+     * API](https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places/get).
+     * 
+ * + * string place = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for place to set. + * @return This builder for chaining. + */ + public Builder setPlaceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + place_ = value; + bitField0_ |= 0x00000001; + 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.areainsights.v1.PlaceInsight) + } + + // @@protoc_insertion_point(class_scope:google.maps.areainsights.v1.PlaceInsight) + private static final com.google.maps.areainsights.v1.PlaceInsight DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.areainsights.v1.PlaceInsight(); + } + + public static com.google.maps.areainsights.v1.PlaceInsight getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PlaceInsight 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.areainsights.v1.PlaceInsight getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/PlaceInsightOrBuilder.java b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/PlaceInsightOrBuilder.java new file mode 100644 index 000000000000..b876e9f37e35 --- /dev/null +++ b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/PlaceInsightOrBuilder.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/areainsights/v1/area_insights_service.proto + +// Protobuf Java Version: 3.25.4 +package com.google.maps.areainsights.v1; + +public interface PlaceInsightOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.areainsights.v1.PlaceInsight) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of a place. This resource name can be used to retrieve
+   * details about the place using the [Places
+   * API](https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places/get).
+   * 
+ * + * string place = 1 [(.google.api.resource_reference) = { ... } + * + * @return The place. + */ + java.lang.String getPlace(); + /** + * + * + *
+   * The resource name of a place. This resource name can be used to retrieve
+   * details about the place using the [Places
+   * API](https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places/get).
+   * 
+ * + * string place = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for place. + */ + com.google.protobuf.ByteString getPlaceBytes(); +} diff --git a/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/PriceLevel.java b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/PriceLevel.java new file mode 100644 index 000000000000..810b931c914d --- /dev/null +++ b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/PriceLevel.java @@ -0,0 +1,245 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/areainsights/v1/area_insights_service.proto + +// Protobuf Java Version: 3.25.4 +package com.google.maps.areainsights.v1; + +/** + * + * + *
+ * Price level of the place.
+ * 
+ * + * Protobuf enum {@code google.maps.areainsights.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), + /** + * + * + *
+   * Place provides free services.
+   * 
+ * + * PRICE_LEVEL_FREE = 1; + */ + PRICE_LEVEL_FREE(1), + /** + * + * + *
+   * Place provides inexpensive services.
+   * 
+ * + * PRICE_LEVEL_INEXPENSIVE = 2; + */ + PRICE_LEVEL_INEXPENSIVE(2), + /** + * + * + *
+   * Place provides moderately priced services.
+   * 
+ * + * PRICE_LEVEL_MODERATE = 3; + */ + PRICE_LEVEL_MODERATE(3), + /** + * + * + *
+   * Place provides expensive services.
+   * 
+ * + * PRICE_LEVEL_EXPENSIVE = 4; + */ + PRICE_LEVEL_EXPENSIVE(4), + /** + * + * + *
+   * Place provides very expensive services.
+   * 
+ * + * PRICE_LEVEL_VERY_EXPENSIVE = 5; + */ + PRICE_LEVEL_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; + /** + * + * + *
+   * Place provides free services.
+   * 
+ * + * PRICE_LEVEL_FREE = 1; + */ + public static final int PRICE_LEVEL_FREE_VALUE = 1; + /** + * + * + *
+   * Place provides inexpensive services.
+   * 
+ * + * PRICE_LEVEL_INEXPENSIVE = 2; + */ + public static final int PRICE_LEVEL_INEXPENSIVE_VALUE = 2; + /** + * + * + *
+   * Place provides moderately priced services.
+   * 
+ * + * PRICE_LEVEL_MODERATE = 3; + */ + public static final int PRICE_LEVEL_MODERATE_VALUE = 3; + /** + * + * + *
+   * Place provides expensive services.
+   * 
+ * + * PRICE_LEVEL_EXPENSIVE = 4; + */ + public static final int PRICE_LEVEL_EXPENSIVE_VALUE = 4; + /** + * + * + *
+   * Place provides very expensive services.
+   * 
+ * + * PRICE_LEVEL_VERY_EXPENSIVE = 5; + */ + public static final int PRICE_LEVEL_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 PRICE_LEVEL_FREE; + case 2: + return PRICE_LEVEL_INEXPENSIVE; + case 3: + return PRICE_LEVEL_MODERATE; + case 4: + return PRICE_LEVEL_EXPENSIVE; + case 5: + return PRICE_LEVEL_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.areainsights.v1.AreaInsightsServiceProto.getDescriptor() + .getEnumTypes() + .get(2); + } + + 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.areainsights.v1.PriceLevel) +} diff --git a/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/RatingFilter.java b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/RatingFilter.java new file mode 100644 index 000000000000..47205b362fe6 --- /dev/null +++ b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/RatingFilter.java @@ -0,0 +1,716 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/areainsights/v1/area_insights_service.proto + +// Protobuf Java Version: 3.25.4 +package com.google.maps.areainsights.v1; + +/** + * + * + *
+ * Average user rating filters.
+ * 
+ * + * Protobuf type {@code google.maps.areainsights.v1.RatingFilter} + */ +public final class RatingFilter extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.maps.areainsights.v1.RatingFilter) + RatingFilterOrBuilder { + private static final long serialVersionUID = 0L; + // Use RatingFilter.newBuilder() to construct. + private RatingFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RatingFilter() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RatingFilter(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_RatingFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_RatingFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.areainsights.v1.RatingFilter.class, + com.google.maps.areainsights.v1.RatingFilter.Builder.class); + } + + private int bitField0_; + public static final int MIN_RATING_FIELD_NUMBER = 5; + private float minRating_ = 0F; + /** + * + * + *
+   * Optional. Restricts results to places whose average user rating is greater
+   * than or equal to min_rating. Values must be between 1.0 and 5.0.
+   * 
+ * + * optional float min_rating = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the minRating field is set. + */ + @java.lang.Override + public boolean hasMinRating() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. Restricts results to places whose average user rating is greater
+   * than or equal to min_rating. Values must be between 1.0 and 5.0.
+   * 
+ * + * optional float min_rating = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minRating. + */ + @java.lang.Override + public float getMinRating() { + return minRating_; + } + + public static final int MAX_RATING_FIELD_NUMBER = 6; + private float maxRating_ = 0F; + /** + * + * + *
+   * Optional. Restricts results to places whose average user rating is strictly
+   * less than or equal to max_rating. Values must be between 1.0 and 5.0.
+   * 
+ * + * optional float max_rating = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the maxRating field is set. + */ + @java.lang.Override + public boolean hasMaxRating() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Optional. Restricts results to places whose average user rating is strictly
+   * less than or equal to max_rating. Values must be between 1.0 and 5.0.
+   * 
+ * + * optional float max_rating = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxRating. + */ + @java.lang.Override + public float getMaxRating() { + return maxRating_; + } + + 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.writeFloat(5, minRating_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeFloat(6, maxRating_); + } + 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.computeFloatSize(5, minRating_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(6, maxRating_); + } + 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.areainsights.v1.RatingFilter)) { + return super.equals(obj); + } + com.google.maps.areainsights.v1.RatingFilter other = + (com.google.maps.areainsights.v1.RatingFilter) obj; + + if (hasMinRating() != other.hasMinRating()) return false; + if (hasMinRating()) { + if (java.lang.Float.floatToIntBits(getMinRating()) + != java.lang.Float.floatToIntBits(other.getMinRating())) return false; + } + if (hasMaxRating() != other.hasMaxRating()) return false; + if (hasMaxRating()) { + if (java.lang.Float.floatToIntBits(getMaxRating()) + != java.lang.Float.floatToIntBits(other.getMaxRating())) 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 (hasMinRating()) { + hash = (37 * hash) + MIN_RATING_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getMinRating()); + } + if (hasMaxRating()) { + hash = (37 * hash) + MAX_RATING_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getMaxRating()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.areainsights.v1.RatingFilter parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.areainsights.v1.RatingFilter 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.areainsights.v1.RatingFilter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.areainsights.v1.RatingFilter 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.areainsights.v1.RatingFilter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.areainsights.v1.RatingFilter parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.areainsights.v1.RatingFilter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.areainsights.v1.RatingFilter 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.areainsights.v1.RatingFilter parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.areainsights.v1.RatingFilter 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.areainsights.v1.RatingFilter parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.areainsights.v1.RatingFilter 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.areainsights.v1.RatingFilter 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; + } + /** + * + * + *
+   * Average user rating filters.
+   * 
+ * + * Protobuf type {@code google.maps.areainsights.v1.RatingFilter} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.areainsights.v1.RatingFilter) + com.google.maps.areainsights.v1.RatingFilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_RatingFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_RatingFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.areainsights.v1.RatingFilter.class, + com.google.maps.areainsights.v1.RatingFilter.Builder.class); + } + + // Construct using com.google.maps.areainsights.v1.RatingFilter.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + minRating_ = 0F; + maxRating_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_RatingFilter_descriptor; + } + + @java.lang.Override + public com.google.maps.areainsights.v1.RatingFilter getDefaultInstanceForType() { + return com.google.maps.areainsights.v1.RatingFilter.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.areainsights.v1.RatingFilter build() { + com.google.maps.areainsights.v1.RatingFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.areainsights.v1.RatingFilter buildPartial() { + com.google.maps.areainsights.v1.RatingFilter result = + new com.google.maps.areainsights.v1.RatingFilter(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.areainsights.v1.RatingFilter result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.minRating_ = minRating_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.maxRating_ = maxRating_; + 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.areainsights.v1.RatingFilter) { + return mergeFrom((com.google.maps.areainsights.v1.RatingFilter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.areainsights.v1.RatingFilter other) { + if (other == com.google.maps.areainsights.v1.RatingFilter.getDefaultInstance()) return this; + if (other.hasMinRating()) { + setMinRating(other.getMinRating()); + } + if (other.hasMaxRating()) { + setMaxRating(other.getMaxRating()); + } + 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 45: + { + minRating_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 45 + case 53: + { + maxRating_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 53 + 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 float minRating_; + /** + * + * + *
+     * Optional. Restricts results to places whose average user rating is greater
+     * than or equal to min_rating. Values must be between 1.0 and 5.0.
+     * 
+ * + * optional float min_rating = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the minRating field is set. + */ + @java.lang.Override + public boolean hasMinRating() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Optional. Restricts results to places whose average user rating is greater
+     * than or equal to min_rating. Values must be between 1.0 and 5.0.
+     * 
+ * + * optional float min_rating = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minRating. + */ + @java.lang.Override + public float getMinRating() { + return minRating_; + } + /** + * + * + *
+     * Optional. Restricts results to places whose average user rating is greater
+     * than or equal to min_rating. Values must be between 1.0 and 5.0.
+     * 
+ * + * optional float min_rating = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The minRating to set. + * @return This builder for chaining. + */ + public Builder setMinRating(float value) { + + minRating_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Restricts results to places whose average user rating is greater
+     * than or equal to min_rating. Values must be between 1.0 and 5.0.
+     * 
+ * + * optional float min_rating = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMinRating() { + bitField0_ = (bitField0_ & ~0x00000001); + minRating_ = 0F; + onChanged(); + return this; + } + + private float maxRating_; + /** + * + * + *
+     * Optional. Restricts results to places whose average user rating is strictly
+     * less than or equal to max_rating. Values must be between 1.0 and 5.0.
+     * 
+ * + * optional float max_rating = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the maxRating field is set. + */ + @java.lang.Override + public boolean hasMaxRating() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Optional. Restricts results to places whose average user rating is strictly
+     * less than or equal to max_rating. Values must be between 1.0 and 5.0.
+     * 
+ * + * optional float max_rating = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxRating. + */ + @java.lang.Override + public float getMaxRating() { + return maxRating_; + } + /** + * + * + *
+     * Optional. Restricts results to places whose average user rating is strictly
+     * less than or equal to max_rating. Values must be between 1.0 and 5.0.
+     * 
+ * + * optional float max_rating = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The maxRating to set. + * @return This builder for chaining. + */ + public Builder setMaxRating(float value) { + + maxRating_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Restricts results to places whose average user rating is strictly
+     * less than or equal to max_rating. Values must be between 1.0 and 5.0.
+     * 
+ * + * optional float max_rating = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMaxRating() { + bitField0_ = (bitField0_ & ~0x00000002); + maxRating_ = 0F; + 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.areainsights.v1.RatingFilter) + } + + // @@protoc_insertion_point(class_scope:google.maps.areainsights.v1.RatingFilter) + private static final com.google.maps.areainsights.v1.RatingFilter DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.areainsights.v1.RatingFilter(); + } + + public static com.google.maps.areainsights.v1.RatingFilter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RatingFilter 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.areainsights.v1.RatingFilter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/RatingFilterOrBuilder.java b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/RatingFilterOrBuilder.java new file mode 100644 index 000000000000..ccdf69b28503 --- /dev/null +++ b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/RatingFilterOrBuilder.java @@ -0,0 +1,80 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/areainsights/v1/area_insights_service.proto + +// Protobuf Java Version: 3.25.4 +package com.google.maps.areainsights.v1; + +public interface RatingFilterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.areainsights.v1.RatingFilter) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Restricts results to places whose average user rating is greater
+   * than or equal to min_rating. Values must be between 1.0 and 5.0.
+   * 
+ * + * optional float min_rating = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the minRating field is set. + */ + boolean hasMinRating(); + /** + * + * + *
+   * Optional. Restricts results to places whose average user rating is greater
+   * than or equal to min_rating. Values must be between 1.0 and 5.0.
+   * 
+ * + * optional float min_rating = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minRating. + */ + float getMinRating(); + + /** + * + * + *
+   * Optional. Restricts results to places whose average user rating is strictly
+   * less than or equal to max_rating. Values must be between 1.0 and 5.0.
+   * 
+ * + * optional float max_rating = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the maxRating field is set. + */ + boolean hasMaxRating(); + /** + * + * + *
+   * Optional. Restricts results to places whose average user rating is strictly
+   * less than or equal to max_rating. Values must be between 1.0 and 5.0.
+   * 
+ * + * optional float max_rating = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxRating. + */ + float getMaxRating(); +} diff --git a/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/TypeFilter.java b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/TypeFilter.java new file mode 100644 index 000000000000..e87016b0055d --- /dev/null +++ b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/TypeFilter.java @@ -0,0 +1,1634 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/areainsights/v1/area_insights_service.proto + +// Protobuf Java Version: 3.25.4 +package com.google.maps.areainsights.v1; + +/** + * + * + *
+ * Place type filters.
+ *
+ * Only Place types from
+ * [Table
+ * a](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a)
+ * are supported.
+ *
+ * A place can only have a single primary type associated with it. For example,
+ * the primary type might be "mexican_restaurant" or "steak_house". Use
+ * included_primary_types and excluded_primary_types to filter the results on a
+ * place's primary type.
+ *
+ * A place can also have multiple type values associated with it. For example a
+ * restaurant might have the following types: "seafood_restaurant",
+ * "restaurant", "food", "point_of_interest", "establishment". Use
+ * included_types and excluded_types to filter the results on the list of types
+ * associated with a place.
+ *
+ * If a search is specified with multiple type restrictions, only places that
+ * satisfy all of the restrictions are returned. For example, if you specify
+ * {"included_types": ["restaurant"], "excluded_primary_types":
+ * ["steak_house"]}, the returned places provide "restaurant" related services
+ * but do not operate primarily as a "steak_house".
+ *
+ * If there are any conflicting types, i.e. a type appears in both
+ * included_types and excluded_types types or included_primary_types and
+ * excluded_primary_types, an INVALID_ARGUMENT error is returned.
+ *
+ * One of included_types or included_primary_types must be set.
+ * 
+ * + * Protobuf type {@code google.maps.areainsights.v1.TypeFilter} + */ +public final class TypeFilter extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.maps.areainsights.v1.TypeFilter) + TypeFilterOrBuilder { + private static final long serialVersionUID = 0L; + // Use TypeFilter.newBuilder() to construct. + private TypeFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TypeFilter() { + includedTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + excludedTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + includedPrimaryTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + excludedPrimaryTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TypeFilter(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_TypeFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_TypeFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.areainsights.v1.TypeFilter.class, + com.google.maps.areainsights.v1.TypeFilter.Builder.class); + } + + public static final int INCLUDED_TYPES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList includedTypes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Optional. Included Place types.
+   * 
+ * + * repeated string included_types = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the includedTypes. + */ + public com.google.protobuf.ProtocolStringList getIncludedTypesList() { + return includedTypes_; + } + /** + * + * + *
+   * Optional. Included Place types.
+   * 
+ * + * repeated string included_types = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of includedTypes. + */ + public int getIncludedTypesCount() { + return includedTypes_.size(); + } + /** + * + * + *
+   * Optional. Included Place types.
+   * 
+ * + * repeated string included_types = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The includedTypes at the given index. + */ + public java.lang.String getIncludedTypes(int index) { + return includedTypes_.get(index); + } + /** + * + * + *
+   * Optional. Included Place types.
+   * 
+ * + * repeated string included_types = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the includedTypes at the given index. + */ + public com.google.protobuf.ByteString getIncludedTypesBytes(int index) { + return includedTypes_.getByteString(index); + } + + public static final int EXCLUDED_TYPES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList excludedTypes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Optional. Excluded Place types.
+   * 
+ * + * repeated string excluded_types = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the excludedTypes. + */ + public com.google.protobuf.ProtocolStringList getExcludedTypesList() { + return excludedTypes_; + } + /** + * + * + *
+   * Optional. Excluded Place types.
+   * 
+ * + * repeated string excluded_types = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of excludedTypes. + */ + public int getExcludedTypesCount() { + return excludedTypes_.size(); + } + /** + * + * + *
+   * Optional. Excluded Place types.
+   * 
+ * + * repeated string excluded_types = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The excludedTypes at the given index. + */ + public java.lang.String getExcludedTypes(int index) { + return excludedTypes_.get(index); + } + /** + * + * + *
+   * Optional. Excluded Place types.
+   * 
+ * + * repeated string excluded_types = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the excludedTypes at the given index. + */ + public com.google.protobuf.ByteString getExcludedTypesBytes(int index) { + return excludedTypes_.getByteString(index); + } + + public static final int INCLUDED_PRIMARY_TYPES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList includedPrimaryTypes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Optional. Included primary Place types.
+   * 
+ * + * repeated string included_primary_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the includedPrimaryTypes. + */ + public com.google.protobuf.ProtocolStringList getIncludedPrimaryTypesList() { + return includedPrimaryTypes_; + } + /** + * + * + *
+   * Optional. Included primary Place types.
+   * 
+ * + * repeated string included_primary_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of includedPrimaryTypes. + */ + public int getIncludedPrimaryTypesCount() { + return includedPrimaryTypes_.size(); + } + /** + * + * + *
+   * Optional. Included primary Place types.
+   * 
+ * + * repeated string included_primary_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The includedPrimaryTypes at the given index. + */ + public java.lang.String getIncludedPrimaryTypes(int index) { + return includedPrimaryTypes_.get(index); + } + /** + * + * + *
+   * Optional. Included primary Place types.
+   * 
+ * + * repeated string included_primary_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the includedPrimaryTypes at the given index. + */ + public com.google.protobuf.ByteString getIncludedPrimaryTypesBytes(int index) { + return includedPrimaryTypes_.getByteString(index); + } + + public static final int EXCLUDED_PRIMARY_TYPES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList excludedPrimaryTypes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Optional. Excluded primary Place types.
+   * 
+ * + * repeated string excluded_primary_types = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the excludedPrimaryTypes. + */ + public com.google.protobuf.ProtocolStringList getExcludedPrimaryTypesList() { + return excludedPrimaryTypes_; + } + /** + * + * + *
+   * Optional. Excluded primary Place types.
+   * 
+ * + * repeated string excluded_primary_types = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of excludedPrimaryTypes. + */ + public int getExcludedPrimaryTypesCount() { + return excludedPrimaryTypes_.size(); + } + /** + * + * + *
+   * Optional. Excluded primary Place types.
+   * 
+ * + * repeated string excluded_primary_types = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The excludedPrimaryTypes at the given index. + */ + public java.lang.String getExcludedPrimaryTypes(int index) { + return excludedPrimaryTypes_.get(index); + } + /** + * + * + *
+   * Optional. Excluded primary Place types.
+   * 
+ * + * repeated string excluded_primary_types = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the excludedPrimaryTypes at the given index. + */ + public com.google.protobuf.ByteString getExcludedPrimaryTypesBytes(int index) { + return excludedPrimaryTypes_.getByteString(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 < includedTypes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, includedTypes_.getRaw(i)); + } + for (int i = 0; i < excludedTypes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, excludedTypes_.getRaw(i)); + } + for (int i = 0; i < includedPrimaryTypes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 3, includedPrimaryTypes_.getRaw(i)); + } + for (int i = 0; i < excludedPrimaryTypes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 4, excludedPrimaryTypes_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < includedTypes_.size(); i++) { + dataSize += computeStringSizeNoTag(includedTypes_.getRaw(i)); + } + size += dataSize; + size += 1 * getIncludedTypesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < excludedTypes_.size(); i++) { + dataSize += computeStringSizeNoTag(excludedTypes_.getRaw(i)); + } + size += dataSize; + size += 1 * getExcludedTypesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < includedPrimaryTypes_.size(); i++) { + dataSize += computeStringSizeNoTag(includedPrimaryTypes_.getRaw(i)); + } + size += dataSize; + size += 1 * getIncludedPrimaryTypesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < excludedPrimaryTypes_.size(); i++) { + dataSize += computeStringSizeNoTag(excludedPrimaryTypes_.getRaw(i)); + } + size += dataSize; + size += 1 * getExcludedPrimaryTypesList().size(); + } + 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.areainsights.v1.TypeFilter)) { + return super.equals(obj); + } + com.google.maps.areainsights.v1.TypeFilter other = + (com.google.maps.areainsights.v1.TypeFilter) obj; + + if (!getIncludedTypesList().equals(other.getIncludedTypesList())) return false; + if (!getExcludedTypesList().equals(other.getExcludedTypesList())) return false; + if (!getIncludedPrimaryTypesList().equals(other.getIncludedPrimaryTypesList())) return false; + if (!getExcludedPrimaryTypesList().equals(other.getExcludedPrimaryTypesList())) 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 (getIncludedTypesCount() > 0) { + hash = (37 * hash) + INCLUDED_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getIncludedTypesList().hashCode(); + } + if (getExcludedTypesCount() > 0) { + hash = (37 * hash) + EXCLUDED_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getExcludedTypesList().hashCode(); + } + if (getIncludedPrimaryTypesCount() > 0) { + hash = (37 * hash) + INCLUDED_PRIMARY_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getIncludedPrimaryTypesList().hashCode(); + } + if (getExcludedPrimaryTypesCount() > 0) { + hash = (37 * hash) + EXCLUDED_PRIMARY_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getExcludedPrimaryTypesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.areainsights.v1.TypeFilter parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.areainsights.v1.TypeFilter 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.areainsights.v1.TypeFilter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.areainsights.v1.TypeFilter 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.areainsights.v1.TypeFilter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.areainsights.v1.TypeFilter parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.areainsights.v1.TypeFilter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.areainsights.v1.TypeFilter 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.areainsights.v1.TypeFilter parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.areainsights.v1.TypeFilter 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.areainsights.v1.TypeFilter parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.areainsights.v1.TypeFilter 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.areainsights.v1.TypeFilter 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; + } + /** + * + * + *
+   * Place type filters.
+   *
+   * Only Place types from
+   * [Table
+   * a](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a)
+   * are supported.
+   *
+   * A place can only have a single primary type associated with it. For example,
+   * the primary type might be "mexican_restaurant" or "steak_house". Use
+   * included_primary_types and excluded_primary_types to filter the results on a
+   * place's primary type.
+   *
+   * A place can also have multiple type values associated with it. For example a
+   * restaurant might have the following types: "seafood_restaurant",
+   * "restaurant", "food", "point_of_interest", "establishment". Use
+   * included_types and excluded_types to filter the results on the list of types
+   * associated with a place.
+   *
+   * If a search is specified with multiple type restrictions, only places that
+   * satisfy all of the restrictions are returned. For example, if you specify
+   * {"included_types": ["restaurant"], "excluded_primary_types":
+   * ["steak_house"]}, the returned places provide "restaurant" related services
+   * but do not operate primarily as a "steak_house".
+   *
+   * If there are any conflicting types, i.e. a type appears in both
+   * included_types and excluded_types types or included_primary_types and
+   * excluded_primary_types, an INVALID_ARGUMENT error is returned.
+   *
+   * One of included_types or included_primary_types must be set.
+   * 
+ * + * Protobuf type {@code google.maps.areainsights.v1.TypeFilter} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.areainsights.v1.TypeFilter) + com.google.maps.areainsights.v1.TypeFilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_TypeFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_TypeFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.areainsights.v1.TypeFilter.class, + com.google.maps.areainsights.v1.TypeFilter.Builder.class); + } + + // Construct using com.google.maps.areainsights.v1.TypeFilter.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + includedTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + excludedTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + includedPrimaryTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + excludedPrimaryTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.areainsights.v1.AreaInsightsServiceProto + .internal_static_google_maps_areainsights_v1_TypeFilter_descriptor; + } + + @java.lang.Override + public com.google.maps.areainsights.v1.TypeFilter getDefaultInstanceForType() { + return com.google.maps.areainsights.v1.TypeFilter.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.areainsights.v1.TypeFilter build() { + com.google.maps.areainsights.v1.TypeFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.areainsights.v1.TypeFilter buildPartial() { + com.google.maps.areainsights.v1.TypeFilter result = + new com.google.maps.areainsights.v1.TypeFilter(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.areainsights.v1.TypeFilter result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + includedTypes_.makeImmutable(); + result.includedTypes_ = includedTypes_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + excludedTypes_.makeImmutable(); + result.excludedTypes_ = excludedTypes_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + includedPrimaryTypes_.makeImmutable(); + result.includedPrimaryTypes_ = includedPrimaryTypes_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + excludedPrimaryTypes_.makeImmutable(); + result.excludedPrimaryTypes_ = excludedPrimaryTypes_; + } + } + + @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.areainsights.v1.TypeFilter) { + return mergeFrom((com.google.maps.areainsights.v1.TypeFilter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.areainsights.v1.TypeFilter other) { + if (other == com.google.maps.areainsights.v1.TypeFilter.getDefaultInstance()) return this; + if (!other.includedTypes_.isEmpty()) { + if (includedTypes_.isEmpty()) { + includedTypes_ = other.includedTypes_; + bitField0_ |= 0x00000001; + } else { + ensureIncludedTypesIsMutable(); + includedTypes_.addAll(other.includedTypes_); + } + onChanged(); + } + if (!other.excludedTypes_.isEmpty()) { + if (excludedTypes_.isEmpty()) { + excludedTypes_ = other.excludedTypes_; + bitField0_ |= 0x00000002; + } else { + ensureExcludedTypesIsMutable(); + excludedTypes_.addAll(other.excludedTypes_); + } + onChanged(); + } + if (!other.includedPrimaryTypes_.isEmpty()) { + if (includedPrimaryTypes_.isEmpty()) { + includedPrimaryTypes_ = other.includedPrimaryTypes_; + bitField0_ |= 0x00000004; + } else { + ensureIncludedPrimaryTypesIsMutable(); + includedPrimaryTypes_.addAll(other.includedPrimaryTypes_); + } + onChanged(); + } + if (!other.excludedPrimaryTypes_.isEmpty()) { + if (excludedPrimaryTypes_.isEmpty()) { + excludedPrimaryTypes_ = other.excludedPrimaryTypes_; + bitField0_ |= 0x00000008; + } else { + ensureExcludedPrimaryTypesIsMutable(); + excludedPrimaryTypes_.addAll(other.excludedPrimaryTypes_); + } + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureIncludedTypesIsMutable(); + includedTypes_.add(s); + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExcludedTypesIsMutable(); + excludedTypes_.add(s); + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureIncludedPrimaryTypesIsMutable(); + includedPrimaryTypes_.add(s); + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExcludedPrimaryTypesIsMutable(); + excludedPrimaryTypes_.add(s); + 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 com.google.protobuf.LazyStringArrayList includedTypes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureIncludedTypesIsMutable() { + if (!includedTypes_.isModifiable()) { + includedTypes_ = new com.google.protobuf.LazyStringArrayList(includedTypes_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+     * Optional. Included Place types.
+     * 
+ * + * repeated string included_types = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the includedTypes. + */ + public com.google.protobuf.ProtocolStringList getIncludedTypesList() { + includedTypes_.makeImmutable(); + return includedTypes_; + } + /** + * + * + *
+     * Optional. Included Place types.
+     * 
+ * + * repeated string included_types = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of includedTypes. + */ + public int getIncludedTypesCount() { + return includedTypes_.size(); + } + /** + * + * + *
+     * Optional. Included Place types.
+     * 
+ * + * repeated string included_types = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The includedTypes at the given index. + */ + public java.lang.String getIncludedTypes(int index) { + return includedTypes_.get(index); + } + /** + * + * + *
+     * Optional. Included Place types.
+     * 
+ * + * repeated string included_types = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the includedTypes at the given index. + */ + public com.google.protobuf.ByteString getIncludedTypesBytes(int index) { + return includedTypes_.getByteString(index); + } + /** + * + * + *
+     * Optional. Included Place types.
+     * 
+ * + * repeated string included_types = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The includedTypes to set. + * @return This builder for chaining. + */ + public Builder setIncludedTypes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIncludedTypesIsMutable(); + includedTypes_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Included Place types.
+     * 
+ * + * repeated string included_types = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The includedTypes to add. + * @return This builder for chaining. + */ + public Builder addIncludedTypes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIncludedTypesIsMutable(); + includedTypes_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Included Place types.
+     * 
+ * + * repeated string included_types = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The includedTypes to add. + * @return This builder for chaining. + */ + public Builder addAllIncludedTypes(java.lang.Iterable values) { + ensureIncludedTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, includedTypes_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Included Place types.
+     * 
+ * + * repeated string included_types = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearIncludedTypes() { + includedTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Included Place types.
+     * 
+ * + * repeated string included_types = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the includedTypes to add. + * @return This builder for chaining. + */ + public Builder addIncludedTypesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureIncludedTypesIsMutable(); + includedTypes_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList excludedTypes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureExcludedTypesIsMutable() { + if (!excludedTypes_.isModifiable()) { + excludedTypes_ = new com.google.protobuf.LazyStringArrayList(excludedTypes_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * Optional. Excluded Place types.
+     * 
+ * + * repeated string excluded_types = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the excludedTypes. + */ + public com.google.protobuf.ProtocolStringList getExcludedTypesList() { + excludedTypes_.makeImmutable(); + return excludedTypes_; + } + /** + * + * + *
+     * Optional. Excluded Place types.
+     * 
+ * + * repeated string excluded_types = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of excludedTypes. + */ + public int getExcludedTypesCount() { + return excludedTypes_.size(); + } + /** + * + * + *
+     * Optional. Excluded Place types.
+     * 
+ * + * repeated string excluded_types = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The excludedTypes at the given index. + */ + public java.lang.String getExcludedTypes(int index) { + return excludedTypes_.get(index); + } + /** + * + * + *
+     * Optional. Excluded Place types.
+     * 
+ * + * repeated string excluded_types = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the excludedTypes at the given index. + */ + public com.google.protobuf.ByteString getExcludedTypesBytes(int index) { + return excludedTypes_.getByteString(index); + } + /** + * + * + *
+     * Optional. Excluded Place types.
+     * 
+ * + * repeated string excluded_types = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The excludedTypes to set. + * @return This builder for chaining. + */ + public Builder setExcludedTypes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludedTypesIsMutable(); + excludedTypes_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Excluded Place types.
+     * 
+ * + * repeated string excluded_types = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The excludedTypes to add. + * @return This builder for chaining. + */ + public Builder addExcludedTypes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludedTypesIsMutable(); + excludedTypes_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Excluded Place types.
+     * 
+ * + * repeated string excluded_types = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The excludedTypes to add. + * @return This builder for chaining. + */ + public Builder addAllExcludedTypes(java.lang.Iterable values) { + ensureExcludedTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, excludedTypes_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Excluded Place types.
+     * 
+ * + * repeated string excluded_types = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearExcludedTypes() { + excludedTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Excluded Place types.
+     * 
+ * + * repeated string excluded_types = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the excludedTypes to add. + * @return This builder for chaining. + */ + public Builder addExcludedTypesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureExcludedTypesIsMutable(); + excludedTypes_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList includedPrimaryTypes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureIncludedPrimaryTypesIsMutable() { + if (!includedPrimaryTypes_.isModifiable()) { + includedPrimaryTypes_ = new com.google.protobuf.LazyStringArrayList(includedPrimaryTypes_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Optional. Included primary Place types.
+     * 
+ * + * repeated string included_primary_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the includedPrimaryTypes. + */ + public com.google.protobuf.ProtocolStringList getIncludedPrimaryTypesList() { + includedPrimaryTypes_.makeImmutable(); + return includedPrimaryTypes_; + } + /** + * + * + *
+     * Optional. Included primary Place types.
+     * 
+ * + * repeated string included_primary_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of includedPrimaryTypes. + */ + public int getIncludedPrimaryTypesCount() { + return includedPrimaryTypes_.size(); + } + /** + * + * + *
+     * Optional. Included primary Place types.
+     * 
+ * + * repeated string included_primary_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The includedPrimaryTypes at the given index. + */ + public java.lang.String getIncludedPrimaryTypes(int index) { + return includedPrimaryTypes_.get(index); + } + /** + * + * + *
+     * Optional. Included primary Place types.
+     * 
+ * + * repeated string included_primary_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the includedPrimaryTypes at the given index. + */ + public com.google.protobuf.ByteString getIncludedPrimaryTypesBytes(int index) { + return includedPrimaryTypes_.getByteString(index); + } + /** + * + * + *
+     * Optional. Included primary Place types.
+     * 
+ * + * repeated string included_primary_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The includedPrimaryTypes to set. + * @return This builder for chaining. + */ + public Builder setIncludedPrimaryTypes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIncludedPrimaryTypesIsMutable(); + includedPrimaryTypes_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Included primary Place types.
+     * 
+ * + * repeated string included_primary_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The includedPrimaryTypes to add. + * @return This builder for chaining. + */ + public Builder addIncludedPrimaryTypes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIncludedPrimaryTypesIsMutable(); + includedPrimaryTypes_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Included primary Place types.
+     * 
+ * + * repeated string included_primary_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The includedPrimaryTypes to add. + * @return This builder for chaining. + */ + public Builder addAllIncludedPrimaryTypes(java.lang.Iterable values) { + ensureIncludedPrimaryTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, includedPrimaryTypes_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Included primary Place types.
+     * 
+ * + * repeated string included_primary_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearIncludedPrimaryTypes() { + includedPrimaryTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Included primary Place types.
+     * 
+ * + * repeated string included_primary_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the includedPrimaryTypes to add. + * @return This builder for chaining. + */ + public Builder addIncludedPrimaryTypesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureIncludedPrimaryTypesIsMutable(); + includedPrimaryTypes_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList excludedPrimaryTypes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureExcludedPrimaryTypesIsMutable() { + if (!excludedPrimaryTypes_.isModifiable()) { + excludedPrimaryTypes_ = new com.google.protobuf.LazyStringArrayList(excludedPrimaryTypes_); + } + bitField0_ |= 0x00000008; + } + /** + * + * + *
+     * Optional. Excluded primary Place types.
+     * 
+ * + * repeated string excluded_primary_types = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the excludedPrimaryTypes. + */ + public com.google.protobuf.ProtocolStringList getExcludedPrimaryTypesList() { + excludedPrimaryTypes_.makeImmutable(); + return excludedPrimaryTypes_; + } + /** + * + * + *
+     * Optional. Excluded primary Place types.
+     * 
+ * + * repeated string excluded_primary_types = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of excludedPrimaryTypes. + */ + public int getExcludedPrimaryTypesCount() { + return excludedPrimaryTypes_.size(); + } + /** + * + * + *
+     * Optional. Excluded primary Place types.
+     * 
+ * + * repeated string excluded_primary_types = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The excludedPrimaryTypes at the given index. + */ + public java.lang.String getExcludedPrimaryTypes(int index) { + return excludedPrimaryTypes_.get(index); + } + /** + * + * + *
+     * Optional. Excluded primary Place types.
+     * 
+ * + * repeated string excluded_primary_types = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the excludedPrimaryTypes at the given index. + */ + public com.google.protobuf.ByteString getExcludedPrimaryTypesBytes(int index) { + return excludedPrimaryTypes_.getByteString(index); + } + /** + * + * + *
+     * Optional. Excluded primary Place types.
+     * 
+ * + * repeated string excluded_primary_types = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The excludedPrimaryTypes to set. + * @return This builder for chaining. + */ + public Builder setExcludedPrimaryTypes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludedPrimaryTypesIsMutable(); + excludedPrimaryTypes_.set(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Excluded primary Place types.
+     * 
+ * + * repeated string excluded_primary_types = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The excludedPrimaryTypes to add. + * @return This builder for chaining. + */ + public Builder addExcludedPrimaryTypes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludedPrimaryTypesIsMutable(); + excludedPrimaryTypes_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Excluded primary Place types.
+     * 
+ * + * repeated string excluded_primary_types = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The excludedPrimaryTypes to add. + * @return This builder for chaining. + */ + public Builder addAllExcludedPrimaryTypes(java.lang.Iterable values) { + ensureExcludedPrimaryTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, excludedPrimaryTypes_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Excluded primary Place types.
+     * 
+ * + * repeated string excluded_primary_types = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearExcludedPrimaryTypes() { + excludedPrimaryTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Excluded primary Place types.
+     * 
+ * + * repeated string excluded_primary_types = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the excludedPrimaryTypes to add. + * @return This builder for chaining. + */ + public Builder addExcludedPrimaryTypesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureExcludedPrimaryTypesIsMutable(); + excludedPrimaryTypes_.add(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.areainsights.v1.TypeFilter) + } + + // @@protoc_insertion_point(class_scope:google.maps.areainsights.v1.TypeFilter) + private static final com.google.maps.areainsights.v1.TypeFilter DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.areainsights.v1.TypeFilter(); + } + + public static com.google.maps.areainsights.v1.TypeFilter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TypeFilter 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.areainsights.v1.TypeFilter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/TypeFilterOrBuilder.java b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/TypeFilterOrBuilder.java new file mode 100644 index 000000000000..ab9aa81a8e8a --- /dev/null +++ b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/java/com/google/maps/areainsights/v1/TypeFilterOrBuilder.java @@ -0,0 +1,238 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/areainsights/v1/area_insights_service.proto + +// Protobuf Java Version: 3.25.4 +package com.google.maps.areainsights.v1; + +public interface TypeFilterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.areainsights.v1.TypeFilter) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Included Place types.
+   * 
+ * + * repeated string included_types = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the includedTypes. + */ + java.util.List getIncludedTypesList(); + /** + * + * + *
+   * Optional. Included Place types.
+   * 
+ * + * repeated string included_types = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of includedTypes. + */ + int getIncludedTypesCount(); + /** + * + * + *
+   * Optional. Included Place types.
+   * 
+ * + * repeated string included_types = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The includedTypes at the given index. + */ + java.lang.String getIncludedTypes(int index); + /** + * + * + *
+   * Optional. Included Place types.
+   * 
+ * + * repeated string included_types = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the includedTypes at the given index. + */ + com.google.protobuf.ByteString getIncludedTypesBytes(int index); + + /** + * + * + *
+   * Optional. Excluded Place types.
+   * 
+ * + * repeated string excluded_types = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the excludedTypes. + */ + java.util.List getExcludedTypesList(); + /** + * + * + *
+   * Optional. Excluded Place types.
+   * 
+ * + * repeated string excluded_types = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of excludedTypes. + */ + int getExcludedTypesCount(); + /** + * + * + *
+   * Optional. Excluded Place types.
+   * 
+ * + * repeated string excluded_types = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The excludedTypes at the given index. + */ + java.lang.String getExcludedTypes(int index); + /** + * + * + *
+   * Optional. Excluded Place types.
+   * 
+ * + * repeated string excluded_types = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the excludedTypes at the given index. + */ + com.google.protobuf.ByteString getExcludedTypesBytes(int index); + + /** + * + * + *
+   * Optional. Included primary Place types.
+   * 
+ * + * repeated string included_primary_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the includedPrimaryTypes. + */ + java.util.List getIncludedPrimaryTypesList(); + /** + * + * + *
+   * Optional. Included primary Place types.
+   * 
+ * + * repeated string included_primary_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of includedPrimaryTypes. + */ + int getIncludedPrimaryTypesCount(); + /** + * + * + *
+   * Optional. Included primary Place types.
+   * 
+ * + * repeated string included_primary_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The includedPrimaryTypes at the given index. + */ + java.lang.String getIncludedPrimaryTypes(int index); + /** + * + * + *
+   * Optional. Included primary Place types.
+   * 
+ * + * repeated string included_primary_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the includedPrimaryTypes at the given index. + */ + com.google.protobuf.ByteString getIncludedPrimaryTypesBytes(int index); + + /** + * + * + *
+   * Optional. Excluded primary Place types.
+   * 
+ * + * repeated string excluded_primary_types = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the excludedPrimaryTypes. + */ + java.util.List getExcludedPrimaryTypesList(); + /** + * + * + *
+   * Optional. Excluded primary Place types.
+   * 
+ * + * repeated string excluded_primary_types = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of excludedPrimaryTypes. + */ + int getExcludedPrimaryTypesCount(); + /** + * + * + *
+   * Optional. Excluded primary Place types.
+   * 
+ * + * repeated string excluded_primary_types = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The excludedPrimaryTypes at the given index. + */ + java.lang.String getExcludedPrimaryTypes(int index); + /** + * + * + *
+   * Optional. Excluded primary Place types.
+   * 
+ * + * repeated string excluded_primary_types = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the excludedPrimaryTypes at the given index. + */ + com.google.protobuf.ByteString getExcludedPrimaryTypesBytes(int index); +} diff --git a/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/proto/google/maps/areainsights/v1/area_insights_service.proto b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/proto/google/maps/areainsights/v1/area_insights_service.proto new file mode 100644 index 000000000000..66c72e4ec96d --- /dev/null +++ b/java-maps-area-insights/proto-google-maps-area-insights-v1/src/main/proto/google/maps/areainsights/v1/area_insights_service.proto @@ -0,0 +1,339 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.maps.areainsights.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/type/latlng.proto"; + +option csharp_namespace = "Google.Maps.AreaInsights.V1"; +option go_package = "cloud.google.com/go/maps/areainsights/apiv1/areainsightspb;areainsightspb"; +option java_multiple_files = true; +option java_outer_classname = "AreaInsightsServiceProto"; +option java_package = "com.google.maps.areainsights.v1"; +option objc_class_prefix = "MAI"; +option php_namespace = "Google\\Maps\\AreaInsights\\V1"; +option (google.api.resource_definition) = { + type: "places.googleapis.com/Place" + pattern: "places/{place_id}" +}; + +// Service definition for the Area Insights API. +service AreaInsights { + option (google.api.default_host) = "areainsights.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Compute Insights RPC + // + // This method lets you retrieve insights about areas using a variaty of + // filter such as: area, place type, operating status, price level + // and ratings. Currently "count" and "places" insights are supported. With + // "count" insights you can answer questions such as "How many restaurant are + // located in California that are operational, are inexpensive and have an + // average rating of at least 4 stars" (see `insight` enum for more details). + // With "places" insights, you can determine which places match the + // requested filter. Clients can then use those place resource names to fetch + // more details about each individual place using the Places API. + rpc ComputeInsights(ComputeInsightsRequest) + returns (ComputeInsightsResponse) { + option (google.api.http) = { + post: "/v1:computeInsights" + body: "*" + }; + } +} + +// Request for the ComputeInsights RPC. +message ComputeInsightsRequest { + // Required. Insights to compute. Currently only INSIGHT_COUNT and + // INSIGHT_PLACES are supported. + repeated Insight insights = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. Insight filter. + Filter filter = 5 [(google.api.field_behavior) = REQUIRED]; +} + +// Response for the ComputeInsights RPC. +message ComputeInsightsResponse { + // Result for Insights.INSIGHT_COUNT. + optional int64 count = 1; + + // Result for Insights.INSIGHT_PLACES. + repeated PlaceInsight place_insights = 5; +} + +// Holds information about a place +message PlaceInsight { + // The resource name of a place. This resource name can be used to retrieve + // details about the place using the [Places + // API](https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places/get). + string place = 1 [ + (google.api.resource_reference) = { type: "places.googleapis.com/Place" } + ]; +} + +// Filters for the ComputeInsights RPC. +message Filter { + // Required. Restricts results to places which are located in the area + // specified by location filters. + LocationFilter location_filter = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Place type filters. + TypeFilter type_filter = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Restricts results to places whose operating status is included on + // this list. If operating_status is not set, OPERATING_STATUS_OPERATIONAL is + // used as default. + repeated OperatingStatus operating_status = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Restricts results to places whose price level is included on this + // list. If price_level is not set, all price levels are included in the + // results. + repeated PriceLevel price_levels = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Restricts results to places whose average user ratings are in the + // range specified by rating_filter. If rating_filter is not set, all ratings + // are included in the result. + RatingFilter rating_filter = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Location filters. +// +// Specifies the area of interest for the insight. +message LocationFilter { + // A circle is defined by a center point and radius in meters. + message Circle { + // The center of the circle. + oneof center { + // The latitude and longitude of the center of the circle. + google.type.LatLng lat_lng = 1; + + // The Place resource name of the center of the circle. Only point places + // are supported. + string place = 2 [(google.api.resource_reference) = { + type: "places.googleapis.com/Place" + }]; + } + + // Optional. The radius of the circle in meters + int32 radius = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // A region is a geographic boundary such as: cities, postal codes, counties, + // states, etc. + message Region { + // The resource name of a region. + oneof region { + // The Place resource name of a region. + string place = 1 [(google.api.resource_reference) = { + type: "places.googleapis.com/Place" + }]; + } + } + + // Custom Area. + message CustomArea { + // A polygon is represented by a series of connected coordinates in an + // counterclockwise ordered sequence. The coordinates form a closed loop and + // define a filled region. The first and last coordinates are equivalent, + // and they must contain identical values. The format is a simplified + // version of GeoJSON polygons (we only support one counterclockwise + // exterior ring). + message Polygon { + // Optional. The coordinates that define the polygon. + repeated google.type.LatLng coordinates = 1 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. The custom area represented as a polygon + Polygon polygon = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // One of the following must be specified. + oneof area { + // Area as a circle. + Circle circle = 1; + + // Area as region. + Region region = 2; + + // Custom area specified by a polygon. + CustomArea custom_area = 3; + } +} + +// Place type filters. +// +// Only Place types from +// [Table +// a](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) +// are supported. +// +// A place can only have a single primary type associated with it. For example, +// the primary type might be "mexican_restaurant" or "steak_house". Use +// included_primary_types and excluded_primary_types to filter the results on a +// place's primary type. +// +// A place can also have multiple type values associated with it. For example a +// restaurant might have the following types: "seafood_restaurant", +// "restaurant", "food", "point_of_interest", "establishment". Use +// included_types and excluded_types to filter the results on the list of types +// associated with a place. +// +// If a search is specified with multiple type restrictions, only places that +// satisfy all of the restrictions are returned. For example, if you specify +// {"included_types": ["restaurant"], "excluded_primary_types": +// ["steak_house"]}, the returned places provide "restaurant" related services +// but do not operate primarily as a "steak_house". +// +// If there are any conflicting types, i.e. a type appears in both +// included_types and excluded_types types or included_primary_types and +// excluded_primary_types, an INVALID_ARGUMENT error is returned. +// +// One of included_types or included_primary_types must be set. +message TypeFilter { + // Optional. Included Place types. + repeated string included_types = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Excluded Place types. + repeated string excluded_types = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Included primary Place types. + repeated string included_primary_types = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Excluded primary Place types. + repeated string excluded_primary_types = 4 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Average user rating filters. +message RatingFilter { + // Optional. Restricts results to places whose average user rating is greater + // than or equal to min_rating. Values must be between 1.0 and 5.0. + optional float min_rating = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Restricts results to places whose average user rating is strictly + // less than or equal to max_rating. Values must be between 1.0 and 5.0. + optional float max_rating = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Supported insights. +enum Insight { + // Not Specified. + INSIGHT_UNSPECIFIED = 0; + + // Count insight. + // + // When this insight is specified ComputeInsights returns the number of + // places that match the specified filter criteria. + // ``` + // For example if the request is: + // ComputeInsightsRequest { + // insights: INSIGHT_COUNT + // filter { + // location_filter {region: } + // type_filter {included_types: "restaurant"} + // operating_status: OPERATING_STATUS_OPERATIONAL + // price_levels: PRICE_LEVEL_FREE + // price_levels: PRICE_LEVEL_INEXPENSIVE + // min_rating: 4.0 + // } + // } + // + // The method will return the count of restaurants in California that are + // operational, with price level free or inexpensive and have an average + // rating of at least 4 starts. + // + // Example response: + // ComputeInsightsResponse { + // count: + // } + // ``` + INSIGHT_COUNT = 1; + + // Return Places + // + // When this insight is specified ComputeInsights returns Places + // that match the specified filter criteria. + // ``` + // For example if the request is: + // ComputeInsightsRequest { + // insights: INSIGHT_PLACES + // filter { + // location_filter {region: } + // type_filter {included_types: "restaurant"} + // operating_status: OPERATING_STATUS_OPERATIONAL + // price_levels: PRICE_LEVEL_FREE + // price_levels: PRICE_LEVEL_INEXPENSIVE + // min_rating: 4.0 + // } + // } + // + // The method will return list of places of restaurants in + // California that are operational, with price level free or inexpensive and + // have an average rating of at least 4 stars. + // + // Example response: + // ComputeInsightsResponse { + // place_insights { place: "places/ABC" } + // place_insights { place: "places/PQR" } + // place_insights { place: "places/XYZ" } + // } + // ``` + INSIGHT_PLACES = 2; +} + +// Operating status of the place. +enum OperatingStatus { + // Not Specified. + OPERATING_STATUS_UNSPECIFIED = 0; + + // The place is operational and its open during its defined hours. + OPERATING_STATUS_OPERATIONAL = 1; + + // The Place is no longer in business. + OPERATING_STATUS_PERMANENTLY_CLOSED = 3; + + // The Place is temporarily closed and expected to reopen in the future. + OPERATING_STATUS_TEMPORARILY_CLOSED = 4; +} + +// Price level of the place. +enum PriceLevel { + // Place price level is unspecified or unknown. + PRICE_LEVEL_UNSPECIFIED = 0; + + // Place provides free services. + PRICE_LEVEL_FREE = 1; + + // Place provides inexpensive services. + PRICE_LEVEL_INEXPENSIVE = 2; + + // Place provides moderately priced services. + PRICE_LEVEL_MODERATE = 3; + + // Place provides expensive services. + PRICE_LEVEL_EXPENSIVE = 4; + + // Place provides very expensive services. + PRICE_LEVEL_VERY_EXPENSIVE = 5; +} diff --git a/java-maps-area-insights/samples/snippets/generated/com/google/maps/areainsights/v1/areainsights/computeinsights/AsyncComputeInsights.java b/java-maps-area-insights/samples/snippets/generated/com/google/maps/areainsights/v1/areainsights/computeinsights/AsyncComputeInsights.java new file mode 100644 index 000000000000..faedb74a32f1 --- /dev/null +++ b/java-maps-area-insights/samples/snippets/generated/com/google/maps/areainsights/v1/areainsights/computeinsights/AsyncComputeInsights.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.areainsights.v1.samples; + +// [START areainsights_v1_generated_AreaInsights_ComputeInsights_async] +import com.google.api.core.ApiFuture; +import com.google.maps.areainsights.v1.AreaInsightsClient; +import com.google.maps.areainsights.v1.ComputeInsightsRequest; +import com.google.maps.areainsights.v1.ComputeInsightsResponse; +import com.google.maps.areainsights.v1.Filter; +import com.google.maps.areainsights.v1.Insight; +import java.util.ArrayList; + +public class AsyncComputeInsights { + + public static void main(String[] args) throws Exception { + asyncComputeInsights(); + } + + public static void asyncComputeInsights() 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 (AreaInsightsClient areaInsightsClient = AreaInsightsClient.create()) { + ComputeInsightsRequest request = + ComputeInsightsRequest.newBuilder() + .addAllInsights(new ArrayList()) + .setFilter(Filter.newBuilder().build()) + .build(); + ApiFuture future = + areaInsightsClient.computeInsightsCallable().futureCall(request); + // Do something. + ComputeInsightsResponse response = future.get(); + } + } +} +// [END areainsights_v1_generated_AreaInsights_ComputeInsights_async] diff --git a/java-maps-area-insights/samples/snippets/generated/com/google/maps/areainsights/v1/areainsights/computeinsights/SyncComputeInsights.java b/java-maps-area-insights/samples/snippets/generated/com/google/maps/areainsights/v1/areainsights/computeinsights/SyncComputeInsights.java new file mode 100644 index 000000000000..d4fbd98234fd --- /dev/null +++ b/java-maps-area-insights/samples/snippets/generated/com/google/maps/areainsights/v1/areainsights/computeinsights/SyncComputeInsights.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.areainsights.v1.samples; + +// [START areainsights_v1_generated_AreaInsights_ComputeInsights_sync] +import com.google.maps.areainsights.v1.AreaInsightsClient; +import com.google.maps.areainsights.v1.ComputeInsightsRequest; +import com.google.maps.areainsights.v1.ComputeInsightsResponse; +import com.google.maps.areainsights.v1.Filter; +import com.google.maps.areainsights.v1.Insight; +import java.util.ArrayList; + +public class SyncComputeInsights { + + public static void main(String[] args) throws Exception { + syncComputeInsights(); + } + + public static void syncComputeInsights() 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 (AreaInsightsClient areaInsightsClient = AreaInsightsClient.create()) { + ComputeInsightsRequest request = + ComputeInsightsRequest.newBuilder() + .addAllInsights(new ArrayList()) + .setFilter(Filter.newBuilder().build()) + .build(); + ComputeInsightsResponse response = areaInsightsClient.computeInsights(request); + } + } +} +// [END areainsights_v1_generated_AreaInsights_ComputeInsights_sync] diff --git a/java-maps-area-insights/samples/snippets/generated/com/google/maps/areainsights/v1/areainsights/create/SyncCreateSetCredentialsProvider.java b/java-maps-area-insights/samples/snippets/generated/com/google/maps/areainsights/v1/areainsights/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..91a96ce91c02 --- /dev/null +++ b/java-maps-area-insights/samples/snippets/generated/com/google/maps/areainsights/v1/areainsights/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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.areainsights.v1.samples; + +// [START areainsights_v1_generated_AreaInsights_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.maps.areainsights.v1.AreaInsightsClient; +import com.google.maps.areainsights.v1.AreaInsightsSettings; +import com.google.maps.areainsights.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 + AreaInsightsSettings areaInsightsSettings = + AreaInsightsSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + AreaInsightsClient areaInsightsClient = AreaInsightsClient.create(areaInsightsSettings); + } +} +// [END areainsights_v1_generated_AreaInsights_Create_SetCredentialsProvider_sync] diff --git a/java-maps-area-insights/samples/snippets/generated/com/google/maps/areainsights/v1/areainsights/create/SyncCreateSetCredentialsProvider1.java b/java-maps-area-insights/samples/snippets/generated/com/google/maps/areainsights/v1/areainsights/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..722d16c8d0da --- /dev/null +++ b/java-maps-area-insights/samples/snippets/generated/com/google/maps/areainsights/v1/areainsights/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,39 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.areainsights.v1.samples; + +// [START areainsights_v1_generated_AreaInsights_Create_SetCredentialsProvider1_sync] +import com.google.maps.areainsights.v1.AreaInsightsClient; +import com.google.maps.areainsights.v1.AreaInsightsSettings; + +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 + AreaInsightsSettings areaInsightsSettings = AreaInsightsSettings.newHttpJsonBuilder().build(); + AreaInsightsClient areaInsightsClient = AreaInsightsClient.create(areaInsightsSettings); + } +} +// [END areainsights_v1_generated_AreaInsights_Create_SetCredentialsProvider1_sync] diff --git a/java-maps-area-insights/samples/snippets/generated/com/google/maps/areainsights/v1/areainsights/create/SyncCreateSetEndpoint.java b/java-maps-area-insights/samples/snippets/generated/com/google/maps/areainsights/v1/areainsights/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..0d36e6a23e92 --- /dev/null +++ b/java-maps-area-insights/samples/snippets/generated/com/google/maps/areainsights/v1/areainsights/create/SyncCreateSetEndpoint.java @@ -0,0 +1,41 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.areainsights.v1.samples; + +// [START areainsights_v1_generated_AreaInsights_Create_SetEndpoint_sync] +import com.google.maps.areainsights.v1.AreaInsightsClient; +import com.google.maps.areainsights.v1.AreaInsightsSettings; +import com.google.maps.areainsights.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 + AreaInsightsSettings areaInsightsSettings = + AreaInsightsSettings.newBuilder().setEndpoint(myEndpoint).build(); + AreaInsightsClient areaInsightsClient = AreaInsightsClient.create(areaInsightsSettings); + } +} +// [END areainsights_v1_generated_AreaInsights_Create_SetEndpoint_sync] diff --git a/java-maps-area-insights/samples/snippets/generated/com/google/maps/areainsights/v1/areainsightssettings/computeinsights/SyncComputeInsights.java b/java-maps-area-insights/samples/snippets/generated/com/google/maps/areainsights/v1/areainsightssettings/computeinsights/SyncComputeInsights.java new file mode 100644 index 000000000000..0721022641ab --- /dev/null +++ b/java-maps-area-insights/samples/snippets/generated/com/google/maps/areainsights/v1/areainsightssettings/computeinsights/SyncComputeInsights.java @@ -0,0 +1,48 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.areainsights.v1.samples; + +// [START areainsights_v1_generated_AreaInsightsSettings_ComputeInsights_sync] +import com.google.maps.areainsights.v1.AreaInsightsSettings; +import java.time.Duration; + +public class SyncComputeInsights { + + public static void main(String[] args) throws Exception { + syncComputeInsights(); + } + + public static void syncComputeInsights() 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 + AreaInsightsSettings.Builder areaInsightsSettingsBuilder = AreaInsightsSettings.newBuilder(); + areaInsightsSettingsBuilder + .computeInsightsSettings() + .setRetrySettings( + areaInsightsSettingsBuilder + .computeInsightsSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + AreaInsightsSettings areaInsightsSettings = areaInsightsSettingsBuilder.build(); + } +} +// [END areainsights_v1_generated_AreaInsightsSettings_ComputeInsights_sync] diff --git a/java-maps-area-insights/samples/snippets/generated/com/google/maps/areainsights/v1/stub/areainsightsstubsettings/computeinsights/SyncComputeInsights.java b/java-maps-area-insights/samples/snippets/generated/com/google/maps/areainsights/v1/stub/areainsightsstubsettings/computeinsights/SyncComputeInsights.java new file mode 100644 index 000000000000..aeb957e329ba --- /dev/null +++ b/java-maps-area-insights/samples/snippets/generated/com/google/maps/areainsights/v1/stub/areainsightsstubsettings/computeinsights/SyncComputeInsights.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.areainsights.v1.stub.samples; + +// [START areainsights_v1_generated_AreaInsightsStubSettings_ComputeInsights_sync] +import com.google.maps.areainsights.v1.stub.AreaInsightsStubSettings; +import java.time.Duration; + +public class SyncComputeInsights { + + public static void main(String[] args) throws Exception { + syncComputeInsights(); + } + + public static void syncComputeInsights() 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 + AreaInsightsStubSettings.Builder areaInsightsSettingsBuilder = + AreaInsightsStubSettings.newBuilder(); + areaInsightsSettingsBuilder + .computeInsightsSettings() + .setRetrySettings( + areaInsightsSettingsBuilder + .computeInsightsSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + AreaInsightsStubSettings areaInsightsSettings = areaInsightsSettingsBuilder.build(); + } +} +// [END areainsights_v1_generated_AreaInsightsStubSettings_ComputeInsights_sync] diff --git a/pom.xml b/pom.xml index d2166da5ac15..2f8faf36f44e 100644 --- a/pom.xml +++ b/pom.xml @@ -120,6 +120,7 @@ java-managed-identities java-managedkafka java-maps-addressvalidation + java-maps-area-insights java-maps-mapsplatformdatasets java-maps-places java-maps-routeoptimization diff --git a/versions.txt b/versions.txt index e1ec722bf8b8..9c7ef03e5d32 100644 --- a/versions.txt +++ b/versions.txt @@ -809,3 +809,6 @@ grpc-google-cloud-apihub-v1:0.1.0:0.2.0-SNAPSHOT google-cloud-connectgateway:0.0.0:0.0.1-SNAPSHOT proto-google-cloud-connectgateway-v1:0.0.0:0.0.1-SNAPSHOT grpc-google-cloud-connectgateway-v1:0.0.0:0.0.1-SNAPSHOT +google-maps-area-insights:0.0.0:0.0.1-SNAPSHOT +proto-google-maps-area-insights-v1:0.0.0:0.0.1-SNAPSHOT +grpc-google-maps-area-insights-v1:0.0.0:0.0.1-SNAPSHOT