diff --git a/generation_config.yaml b/generation_config.yaml index e2815f67eb0d..015f28e56714 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -241,7 +241,8 @@ libraries: name_pretty: Audit Manager API product_documentation: https://cloud.google.com/audit-manager/docs api_description: Lists information about the supported locations for this service. - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-auditmanager/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-auditmanager/latest/overview release_level: preview distribution_name: com.google.cloud:google-cloud-auditmanager api_id: auditmanager.googleapis.com @@ -271,7 +272,8 @@ libraries: product_documentation: https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-dr api_description: 'Backup and DR Service is a powerful, centralized, cloud-first backup and disaster recovery solution for cloud-based and hybrid workloads. ' - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-backupdr/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-backupdr/latest/overview release_level: stable distribution_name: com.google.cloud:google-cloud-backupdr api_id: backupdr.googleapis.com @@ -364,7 +366,8 @@ libraries: product_documentation: https://cloud.google.com/bigquery/docs/reference/bigqueryconnection/rest api_description: allows users to manage BigQuery connections to external data sources. release_level: stable - client_documentation: https://cloud.google.com/bigquery/docs/reference/reservations/rpc/google.cloud.bigquery.reservation.v1beta1 + client_documentation: + https://cloud.google.com/bigquery/docs/reference/reservations/rpc/google.cloud.bigquery.reservation.v1beta1 GAPICs: - proto_path: google/cloud/bigquery/connection/v1 - proto_path: google/cloud/bigquery/connection/v1beta1 @@ -404,7 +407,8 @@ libraries: - api_shortname: bigquerystorage name_pretty: BigQuery Storage product_documentation: https://cloud.google.com/bigquery/docs/reference/storage/ - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-bigquerystorage/latest/history + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-bigquerystorage/latest/history api_description: is an API for reading data stored in BigQuery. This API provides direct, high-throughput read access to existing BigQuery tables, supports parallel access with automatic liquid sharding, and allows fine-grained control over what @@ -465,7 +469,8 @@ libraries: name_pretty: Capacity Planner API product_documentation: https://cloud.google.com/capacity-planner/docs api_description: Provides programmatic access to Capacity Planner features. - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-capacityplanner/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-capacityplanner/latest/overview release_level: preview distribution_name: com.google.cloud:google-cloud-capacityplanner api_id: capacityplanner.googleapis.com @@ -500,7 +505,8 @@ libraries: - proto_path: google/cloud/ces/v1 - proto_path: google/cloud/ces/v1beta requires_billing: true - rpc_documentation: https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps/reference/rpc + rpc_documentation: + https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps/reference/rpc - api_shortname: cloudchannel name_pretty: Channel Services product_documentation: https://cloud.google.com/channel/docs @@ -529,7 +535,8 @@ libraries: api_description: The Google Cloud Security Operations API, popularly known as the Chronicle API, serves endpoints that enable security analysts to analyze and mitigate a security threat throughout its lifecycle - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-chronicle/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-chronicle/latest/overview release_level: preview distribution_name: com.google.cloud:google-cloud-chronicle api_id: chronicle.googleapis.com @@ -545,7 +552,8 @@ libraries: api_description: Cloud API Registry lets you discover, govern, use, and monitor Model Context Protocol (MCP) servers and tools provided by Google, or by your organization through Apigee API hub. - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-cloudapiregistry/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-cloudapiregistry/latest/overview release_level: preview distribution_name: com.google.cloud:google-cloud-cloudapiregistry api_id: cloudapiregistry.googleapis.com @@ -591,8 +599,8 @@ libraries: - api_shortname: cloudquotas name_pretty: Cloud Quotas API product_documentation: https://cloud.google.com/cloudquotas/docs/ - api_description: "Cloud Quotas API provides GCP service consumers with management\ - \ and\n observability for resource usage, quotas, and restrictions of the services\n\ + api_description: "Cloud Quotas API provides GCP service consumers with management + and\n observability for resource usage, quotas, and restrictions of the services\n\ \ they consume." release_level: stable GAPICs: @@ -600,11 +608,13 @@ libraries: - proto_path: google/api/cloudquotas/v1beta - api_shortname: cloudsecuritycompliance name_pretty: Cloud Security Compliance API - product_documentation: https://cloud.google.com/security-command-center/docs/compliance-manager-overview + product_documentation: + https://cloud.google.com/security-command-center/docs/compliance-manager-overview api_description: Compliance Manager uses software-defined controls that let you assess support for multiple compliance programs and security requirements within a Google Cloud organization - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-cloudsecuritycompliance/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-cloudsecuritycompliance/latest/overview release_level: preview distribution_name: com.google.cloud:google-cloud-cloudsecuritycompliance api_id: cloudsecuritycompliance.googleapis.com @@ -625,11 +635,11 @@ libraries: - api_shortname: compute name_pretty: Compute Engine product_documentation: https://cloud.google.com/compute/ - api_description: 'delivers virtual machines running in Google''s innovative data - centers and worldwide fiber network. Compute Engine''s tooling and workflow support + api_description: "delivers virtual machines running in Google's innovative data + centers and worldwide fiber network. Compute Engine's tooling and workflow support enable scaling from single instances to global, load-balanced cloud computing. - Compute Engine''s VMs boot quickly, come with persistent disk storage, deliver - consistent performance and are available in many configurations. ' + Compute Engine's VMs boot quickly, come with persistent disk storage, deliver + consistent performance and are available in many configurations. " release_level: stable excluded_poms: grpc-google-cloud-compute-v1 excluded_dependencies: grpc-google-cloud-compute-v1 @@ -645,10 +655,12 @@ libraries: - proto_path: google/cloud/confidentialcomputing/v1alpha1 - api_shortname: configdelivery name_pretty: Config Delivery API - product_documentation: https://cloud.google.com/kubernetes-engine/enterprise/config-sync/docs/concepts/fleet-packages + product_documentation: + https://cloud.google.com/kubernetes-engine/enterprise/config-sync/docs/concepts/fleet-packages api_description: ConfigDelivery service manages the deployment of kubernetes configuration to a fleet of kubernetes clusters. - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-configdelivery/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-configdelivery/latest/overview release_level: preview distribution_name: com.google.cloud:google-cloud-configdelivery api_id: configdelivery.googleapis.com @@ -656,16 +668,19 @@ libraries: group_id: com.google.cloud cloud_api: true requires_billing: true - rest_documentation: https://cloud.google.com/kubernetes-engine/enterprise/config-sync/docs/reference/rest + rest_documentation: + https://cloud.google.com/kubernetes-engine/enterprise/config-sync/docs/reference/rest GAPICs: - proto_path: google/cloud/configdelivery/v1beta - proto_path: google/cloud/configdelivery/v1 - api_shortname: connectgateway name_pretty: Connect Gateway API - product_documentation: https://cloud.google.com/kubernetes-engine/enterprise/multicluster-management/gateway + product_documentation: + https://cloud.google.com/kubernetes-engine/enterprise/multicluster-management/gateway api_description: The Connect Gateway service allows connectivity from external parties to connected Kubernetes clusters. - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-connectgateway/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-connectgateway/latest/overview release_level: preview distribution_name: com.google.cloud:google-cloud-connectgateway api_id: connectgateway.googleapis.com @@ -737,14 +752,15 @@ libraries: - api_shortname: databasecenter name_pretty: Database Center API product_documentation: https://cloud.google.com/database-center/docs/overview - api_description: "Database Center provides an organization-wide, cross-product fleet\ - \ health platform to eliminate the overhead, complexity, and risk associated with\ - \ aggregating and summarizing health signals through custom dashboards. Through\ - \ Database Center\u2019s fleet health dashboard and API, database platform teams\ - \ that are responsible for reliability, compliance, security, cost, and administration\ - \ of database fleets will now have a single pane of glass that pinpoints issues\ - \ relevant to each team." - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-databasecenter/latest/overview + api_description: Database Center provides an organization-wide, cross-product fleet + health platform to eliminate the overhead, complexity, and risk associated with + aggregating and summarizing health signals through custom dashboards. Through + Database Center’s fleet health dashboard and API, database platform teams that + are responsible for reliability, compliance, security, cost, and administration + of database fleets will now have a single pane of glass that pinpoints issues + relevant to each team. + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-databasecenter/latest/overview release_level: preview distribution_name: com.google.cloud:google-cloud-databasecenter api_id: databasecenter.googleapis.com @@ -857,7 +873,8 @@ libraries: - api_shortname: datastore name_pretty: Cloud Datastore product_documentation: https://cloud.google.com/datastore - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-datastore/latest/history + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-datastore/latest/history issue_tracker: https://issuetracker.google.com/savedsearches/559768 release_level: stable language: java @@ -900,7 +917,8 @@ libraries: name_pretty: Developer Connect API product_documentation: https://cloud.google.com/developer-connect/docs/overview api_description: Connect third-party source code management to Google - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-developerconnect/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-developerconnect/latest/overview release_level: preview distribution_name: com.google.cloud:google-cloud-developerconnect api_id: developerconnect.googleapis.com @@ -914,7 +932,8 @@ libraries: name_pretty: Device Streaming API product_documentation: https://cloud.google.com/device-streaming/docs api_description: The Cloud API for device streaming usage. - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-devicestreaming/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-devicestreaming/latest/overview release_level: preview distribution_name: com.google.cloud:google-cloud-devicestreaming api_id: devicestreaming.googleapis.com @@ -1090,11 +1109,13 @@ libraries: - proto_path: google/cloud/filestore/v1beta1 - api_shortname: financialservices name_pretty: Financial Services API - product_documentation: https://cloud.google.com/financial-services/anti-money-laundering/docs/concepts/overview + product_documentation: + https://cloud.google.com/financial-services/anti-money-laundering/docs/concepts/overview api_description: Google Cloud's Anti Money Laundering AI (AML AI) product is an API that scores AML risk. Use it to identify more risk, more defensibly, with fewer false positives and reduced time per review. - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-financialservices/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-financialservices/latest/overview release_level: preview distribution_name: com.google.cloud:google-cloud-financialservices api_id: financialservices.googleapis.com @@ -1125,7 +1146,8 @@ libraries: api_description: Google Distributed Cloud connected allows you to run Kubernetes clusters on dedicated hardware provided and maintained by Google that is separate from the Google Cloud data center. - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-gdchardwaremanagement/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-gdchardwaremanagement/latest/overview release_level: preview distribution_name: com.google.cloud:google-cloud-gdchardwaremanagement api_id: gdchardwaremanagement.googleapis.com @@ -1135,14 +1157,16 @@ libraries: GAPICs: - proto_path: google/cloud/gdchardwaremanagement/v1alpha requires_billing: true - rpc_documentation: https://cloud.google.com/distributed-cloud/edge/latest/docs/reference/hardware/rpc + rpc_documentation: + https://cloud.google.com/distributed-cloud/edge/latest/docs/reference/hardware/rpc - api_shortname: geminidataanalytics name_pretty: Data Analytics API with Gemini product_documentation: https://cloud.google.com/gemini/docs/conversational-analytics-api/overview api_description: Use Conversational Analytics API to build an artificial intelligence (AI)-powered chat interface, or data agent, that answers questions about structured data using natural language. - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/overview release_level: preview distribution_name: com.google.cloud:google-cloud-geminidataanalytics api_id: geminidataanalytics.googleapis.com @@ -1198,11 +1222,13 @@ libraries: - proto_path: google/cloud/gkehub/servicemesh/v1beta - api_shortname: gkerecommender name_pretty: GKE Recommender API - product_documentation: https://cloud.google.com/kubernetes-engine/docs/how-to/machine-learning/inference-quickstart + product_documentation: + https://cloud.google.com/kubernetes-engine/docs/how-to/machine-learning/inference-quickstart api_description: lets you analyze the performance and cost-efficiency of your inference workloads, and make data-driven decisions about resource allocation and model deployment strategies. - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-gkerecommender/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-gkerecommender/latest/overview release_level: preview distribution_name: com.google.cloud:google-cloud-gkerecommender api_id: gkerecommender.googleapis.com @@ -1240,9 +1266,11 @@ libraries: - proto_path: google/apps/script/type/slides - api_shortname: hypercomputecluster name_pretty: Cluster Director API - product_documentation: https://cloud.google.com/blog/products/compute/managed-slurm-and-other-cluster-director-enhancements + product_documentation: + https://cloud.google.com/blog/products/compute/managed-slurm-and-other-cluster-director-enhancements api_description: simplifies cluster management across compute, network, and storage - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-hypercomputecluster/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-hypercomputecluster/latest/overview release_level: preview distribution_name: com.google.cloud:google-cloud-hypercomputecluster api_id: hypercomputecluster.googleapis.com @@ -1334,7 +1362,8 @@ libraries: name_pretty: Merchant Issue Resolution API product_documentation: https://developers.google.com/merchant/api api_description: Programatically manage your Merchant Issues - client_documentation: https://cloud.google.com/java/docs/reference/google-shopping-merchant-issue-resolution/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-shopping-merchant-issue-resolution/latest/overview release_level: stable distribution_name: com.google.shopping:google-shopping-merchant-issue-resolution api_id: merchantapi.googleapis.com @@ -1350,7 +1379,8 @@ libraries: name_pretty: Merchant Order Tracking API product_documentation: https://developers.google.com/merchant/api api_description: Programmatically manage your Merchant Center Accounts - client_documentation: https://cloud.google.com/java/docs/reference/google-shopping-merchant-order-tracking/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-shopping-merchant-order-tracking/latest/overview release_level: stable distribution_name: com.google.shopping:google-shopping-merchant-order-tracking api_id: merchantapi.googleapis.com @@ -1405,7 +1435,8 @@ libraries: product_documentation: https://cloud.google.com/compute/docs/instances/windows/ms-licensing api_description: License Manager is a tool to manage and track third-party licenses on Google Cloud. - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-licensemanager/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-licensemanager/latest/overview release_level: preview distribution_name: com.google.cloud:google-cloud-licensemanager api_id: licensemanager.googleapis.com @@ -1431,7 +1462,8 @@ libraries: api_description: Cloud Location Finder is a public API that offers a repository of all Google Cloud and Google Distributed Cloud locations, as well as cloud locations for other cloud providers. - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-locationfinder/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-locationfinder/latest/overview release_level: preview distribution_name: com.google.cloud:google-cloud-locationfinder api_id: locationfinder.googleapis.com @@ -1482,7 +1514,8 @@ libraries: product_documentation: https://cloud.google.com/unified-maintenance/docs/overview api_description: The Maintenance API provides a centralized view of planned disruptive maintenance events across supported Google Cloud products. - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-maintenance/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-maintenance/latest/overview release_level: preview distribution_name: com.google.cloud:google-cloud-maintenance api_id: maintenance.googleapis.com @@ -1511,7 +1544,8 @@ libraries: name_pretty: Managed Service for Apache Kafka product_documentation: https://cloud.google.com/managed-kafka api_description: Manage Apache Kafka clusters and resources. - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-managedkafka/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-managedkafka/latest/overview release_level: preview distribution_name: com.google.cloud:google-cloud-managedkafka api_id: managedkafka.googleapis.com @@ -1537,7 +1571,8 @@ libraries: 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 + 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 @@ -1549,12 +1584,14 @@ libraries: requires_billing: true - api_shortname: maps-fleetengine name_pretty: Local Rides and Deliveries API - product_documentation: https://developers.google.com/maps/documentation/transportation-logistics/mobility + product_documentation: + https://developers.google.com/maps/documentation/transportation-logistics/mobility api_description: Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. - client_documentation: https://cloud.google.com/java/docs/reference/google-maps-fleetengine/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-maps-fleetengine/latest/overview release_level: preview distribution_name: com.google.maps:google-maps-fleetengine api_id: maps-fleetengine.googleapis.com @@ -1566,12 +1603,14 @@ libraries: requires_billing: true - api_shortname: maps-fleetengine-delivery name_pretty: Last Mile Fleet Solution Delivery API - product_documentation: https://developers.google.com/maps/documentation/transportation-logistics/mobility + product_documentation: + https://developers.google.com/maps/documentation/transportation-logistics/mobility api_description: Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms. - client_documentation: https://cloud.google.com/java/docs/reference/google-maps-fleetengine-delivery/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-maps-fleetengine-delivery/latest/overview release_level: preview distribution_name: com.google.maps:google-maps-fleetengine-delivery api_id: maps-fleetengine-delivery.googleapis.com @@ -1581,12 +1620,28 @@ libraries: GAPICs: - proto_path: google/maps/fleetengine/delivery/v1 requires_billing: true +- api_shortname: geocode + name_pretty: Geocoding API + product_documentation: https://developers.google.com/maps/documentation/geocoding/overview + api_description: The Geocoding API is a service that accepts a place as an address, + latitude and longitude coordinates, or Place ID. + client_documentation: https://cloud.google.com/java/docs/reference/google-maps-geocode/latest/overview + release_level: preview + distribution_name: com.google.maps:google-maps-geocode + api_id: geocode.googleapis.com + library_type: GAPIC_AUTO + group_id: com.google.maps + cloud_api: false + GAPICs: + - proto_path: google/maps/geocode/v4 + library_name: maps-geocode + requires_billing: true - api_shortname: maps-mapsplatformdatasets name_pretty: Maps Platform Datasets API product_documentation: https://developers.google.com/maps/documentation - api_description: "The Maps Platform Datasets API enables developers to ingest geospatially-tied\ - \ datasets\n that they can use to enrich their experience of Maps Platform\ - \ solutions (e.g. styling, routing)." + api_description: "The Maps Platform Datasets API enables developers to ingest geospatially-tied + datasets\n that they can use to enrich their experience of Maps Platform solutions + (e.g. styling, routing)." api_id: mapsplatformdatasets.googleapis.com distribution_name: com.google.maps:google-maps-mapsplatformdatasets cloud_api: false @@ -1608,7 +1663,8 @@ libraries: api_description: The Route Optimization API assigns tasks and routes to a vehicle fleet, optimizing against the objectives and constraints that you supply for your transportation goals. - client_documentation: https://cloud.google.com/java/docs/reference/google-maps-routeoptimization/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-maps-routeoptimization/latest/overview release_level: preview distribution_name: com.google.maps:google-maps-routeoptimization api_id: routeoptimization.googleapis.com @@ -1619,8 +1675,10 @@ libraries: - proto_path: google/maps/routeoptimization/v1 library_name: maps-routeoptimization requires_billing: true - rest_documentation: https://developers.google.com/maps/documentation/route-optimization/reference/rest/ - rpc_documentation: https://developers.google.com/maps/documentation/route-optimization/reference/rpc + rest_documentation: + https://developers.google.com/maps/documentation/route-optimization/reference/rest/ + rpc_documentation: + https://developers.google.com/maps/documentation/route-optimization/reference/rpc - api_shortname: maps-routing name_pretty: Routes API product_documentation: https://developers.google.com/maps/documentation/routes @@ -1708,7 +1766,8 @@ libraries: api_description: Model Armor helps you protect against risks like prompt injection, harmful content, and data leakage in generative AI applications by letting you define policies that filter user prompts and model responses. - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-modelarmor/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-modelarmor/latest/overview release_level: preview distribution_name: com.google.cloud:google-cloud-modelarmor api_id: modelarmor.googleapis.com @@ -1746,7 +1805,8 @@ libraries: - proto_path: google/monitoring/dashboard/v1 - api_shortname: monitoring-metricsscope name_pretty: Monitoring Metrics Scopes - product_documentation: https://cloud.google.com/monitoring/api/ref_v3/rest/v1/locations.global.metricsScopes + product_documentation: + https://cloud.google.com/monitoring/api/ref_v3/rest/v1/locations.global.metricsScopes api_description: The metrics scope defines the set of Google Cloud projects whose metrics the current Google Cloud project can access. api_id: monitoring.googleapis.com @@ -1763,7 +1823,8 @@ libraries: - proto_path: google/cloud/netapp/v1 - api_shortname: networkmanagement name_pretty: Network Management API - product_documentation: https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/reference/networkmanagement/rest/ + product_documentation: + https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/reference/networkmanagement/rest/ api_description: provides a collection of network performance monitoring and diagnostic capabilities. library_name: network-management @@ -1798,7 +1859,8 @@ libraries: on top of planet-scale infrastructure that leverages automation, advanced AI, and programmability, enabling enterprises to connect, scale, secure, modernize and optimize their infrastructure. - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-networkservices/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-networkservices/latest/overview release_level: preview distribution_name: com.google.cloud:google-cloud-networkservices api_id: networkservices.googleapis.com @@ -1838,7 +1900,8 @@ libraries: product_documentation: https://cloud.google.com/oracle/database/docs api_description: The Oracle Database@Google Cloud API provides a set of APIs to manage Oracle database services, such as Exadata and Autonomous Databases. - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-oracledatabase/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-oracledatabase/latest/overview release_level: preview distribution_name: com.google.cloud:google-cloud-oracledatabase api_id: oracledatabase.googleapis.com @@ -1868,7 +1931,8 @@ libraries: product_documentation: n/a api_description: n/a release_level: stable - client_documentation: https://cloud.google.com/java/docs/reference/proto-google-cloud-orgpolicy-v1/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/proto-google-cloud-orgpolicy-v1/latest/overview GAPICs: - proto_path: google/cloud/orgpolicy/v1 - proto_path: google/cloud/orgpolicy/v2 @@ -1900,7 +1964,8 @@ libraries: product_documentation: https://cloud/parallelstore?hl=en api_description: 'Parallelstore is based on Intel DAOS and delivers up to 6.3x greater read throughput performance compared to competitive Lustre scratch offerings. ' - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-parallelstore/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-parallelstore/latest/overview release_level: preview distribution_name: com.google.cloud:google-cloud-parallelstore api_id: parallelstore.googleapis.com @@ -1918,7 +1983,8 @@ libraries: to store, access and manage the lifecycle of your workload parameters. Parameter Manager aims to make management of sensitive application parameters effortless for customers without diminishing focus on security. - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-parametermanager/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-parametermanager/latest/overview release_level: preview distribution_name: com.google.cloud:google-cloud-parametermanager api_id: parametermanager.googleapis.com @@ -1974,7 +2040,8 @@ libraries: - proto_path: google/cloud/privatecatalog/v1beta1 - api_shortname: privilegedaccessmanager name_pretty: Privileged Access Manager API - product_documentation: https://cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/overview + product_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/overview api_description: Privileged Access Manager (PAM) helps you on your journey towards least privilege and helps mitigate risks tied to privileged access misuse orabuse. PAM allows you to shift from always-on standing privileges towards on-demand access @@ -1987,7 +2054,8 @@ libraries: access for developers for critical deployment or maintenance, temporary access for operators for data ingestion and audits, JIT access to service accounts for automated tasks, and more. - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/overview release_level: preview distribution_name: com.google.cloud:google-cloud-privilegedaccessmanager api_id: privilegedaccessmanager.googleapis.com @@ -2108,7 +2176,8 @@ libraries: name_pretty: SaaS Runtime API product_documentation: https://cloud.google.com/saas-runtime/docs/overview api_description: "Model, deploy, and operate your SaaS at scale.\t" - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-saasservicemgmt/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-saasservicemgmt/latest/overview release_level: preview distribution_name: com.google.cloud:google-cloud-saasservicemgmt api_id: saasservicemgmt.googleapis.com @@ -2150,8 +2219,8 @@ libraries: - api_shortname: securesourcemanager name_pretty: Secure Source Manager API product_documentation: https://cloud.google.com/secure-source-manager/docs/overview - api_description: "Regionally deployed, single-tenant managed source code repository\ - \ hosted on\n Google Cloud." + api_description: "Regionally deployed, single-tenant managed source code repository + hosted on\n Google Cloud." release_level: stable GAPICs: - proto_path: google/cloud/securesourcemanager/v1 @@ -2296,7 +2365,8 @@ libraries: name_pretty: Merchant API product_documentation: https://developers.google.com/merchant/api api_description: Programmatically manage your Merchant Center accounts. - client_documentation: https://cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/overview release_level: stable distribution_name: com.google.shopping:google-shopping-merchant-accounts api_id: merchantapi.googleapis.com @@ -2312,7 +2382,8 @@ libraries: name_pretty: Merchant Conversions API product_documentation: https://developers.google.com/merchant/api api_description: Programmatically manage your Merchant Center accounts. - client_documentation: https://cloud.google.com/java/docs/reference/google-shopping-merchant-conversions/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-shopping-merchant-conversions/latest/overview release_level: stable distribution_name: com.google.shopping:google-shopping-merchant-conversions api_id: shopping-merchant-conversions.googleapis.com @@ -2327,7 +2398,8 @@ libraries: name_pretty: Merchant API product_documentation: https://developers.google.com/merchant/api api_description: Programmatically manage your Merchant Center accounts. - client_documentation: https://cloud.google.com/java/docs/reference/google-shopping-merchant-datasources/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-shopping-merchant-datasources/latest/overview release_level: stable distribution_name: com.google.shopping:google-shopping-merchant-datasources api_id: merchantapi.googleapis.com @@ -2354,7 +2426,8 @@ libraries: name_pretty: Merchant LFP API product_documentation: https://developers.google.com/merchant/api api_description: Programmatically manage your Merchant Center accounts. - client_documentation: https://cloud.google.com/java/docs/reference/google-shopping-merchant-lfp/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-shopping-merchant-lfp/latest/overview release_level: stable distribution_name: com.google.shopping:google-shopping-merchant-lfp api_id: shopping-merchant-lfp.googleapis.com @@ -2369,7 +2442,8 @@ libraries: name_pretty: Merchant Notifications API product_documentation: https://developers.google.com/merchant/api api_description: Programmatically manage your Merchant Center accounts. - client_documentation: https://cloud.google.com/java/docs/reference/google-shopping-merchant-notifications/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-shopping-merchant-notifications/latest/overview release_level: stable distribution_name: com.google.shopping:google-shopping-merchant-notifications api_id: shopping-merchant-notifications.googleapis.com @@ -2384,7 +2458,8 @@ libraries: name_pretty: Merchant API product_documentation: https://developers.google.com/merchant/api api_description: Programmatically manage your products. - client_documentation: https://cloud.google.com/java/docs/reference/google-shopping-merchant-productstudio/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-shopping-merchant-productstudio/latest/overview release_level: preview distribution_name: com.google.shopping:google-shopping-merchant-productstudio api_id: merchantapi.googleapis.com @@ -2399,7 +2474,8 @@ libraries: name_pretty: Merchant API product_documentation: https://developers.google.com/merchant/api api_description: Programmatically manage your Merchant Center accounts. - client_documentation: https://cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/overview release_level: stable distribution_name: com.google.shopping:google-shopping-merchant-products api_id: merchantapi.googleapis.com @@ -2414,7 +2490,8 @@ libraries: name_pretty: Merchant API product_documentation: https://developers.google.com/merchant/api api_description: Programmatically manage your Merchant Center accounts. - client_documentation: https://cloud.google.com/java/docs/reference/google-shopping-merchant-promotions/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-shopping-merchant-promotions/latest/overview release_level: stable distribution_name: com.google.shopping:google-shopping-merchant-promotions api_id: merchantapi.googleapis.com @@ -2430,7 +2507,8 @@ libraries: name_pretty: Merchant Quota API product_documentation: https://developers.google.com/merchant/api api_description: Programmatically manage your Merchant Center accounts. - client_documentation: https://cloud.google.com/java/docs/reference/google-shopping-merchant-quota/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-shopping-merchant-quota/latest/overview release_level: stable distribution_name: com.google.shopping:google-shopping-merchant-quota api_id: shopping-merchant-quota.googleapis.com @@ -2457,7 +2535,8 @@ libraries: name_pretty: Merchant API product_documentation: https://developers.google.com/merchant/api api_description: Programmatically manage your Merchant Center Accounts. - client_documentation: https://cloud.google.com/java/docs/reference/google-shopping-merchant-reviews/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-shopping-merchant-reviews/latest/overview release_level: preview distribution_name: com.google.shopping:google-shopping-merchant-reviews library_type: GAPIC_AUTO @@ -2495,11 +2574,13 @@ libraries: - proto_path: google/spanner/v1 - api_shortname: spanneradapter name_pretty: Cloud Spanner Adapter API - product_documentation: https://cloud.google.com/java/docs/reference/google-cloud-spanneradapter/latest/overview + product_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-spanneradapter/latest/overview api_description: The Cloud Spanner Adapter service allows native drivers of supported database dialects to interact directly with Cloud Spanner by wrapping the underlying wire protocol used by the driver in a gRPC stream. - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-spanneradapter/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-spanneradapter/latest/overview release_level: preview distribution_name: com.google.cloud:google-cloud-spanneradapter api_id: spanneradapter.googleapis.com @@ -2561,7 +2642,8 @@ libraries: api_description: Storage batch operations is a Cloud Storage management feature that performs operations on billions of Cloud Storage objects in a serverless manner. - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-storagebatchoperations/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-storagebatchoperations/latest/overview release_level: preview distribution_name: com.google.cloud:google-cloud-storagebatchoperations api_id: storagebatchoperations.googleapis.com @@ -2675,7 +2757,8 @@ libraries: product_documentation: https://cloud.google.com/memorystore/docs/valkey api_description: Memorystore for Valkey is a fully managed Valkey Cluster service for Google Cloud. - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-memorystore/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-memorystore/latest/overview release_level: stable api_id: memorystore.googleapis.com library_type: GAPIC_AUTO @@ -2698,7 +2781,8 @@ libraries: with associated metadata, automatically generate embeddings from your data, and perform fast approximate nearest neighbor (ANN) searches to find semantically similar items at scale. - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-vectorsearch/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-vectorsearch/latest/overview release_level: preview distribution_name: com.google.cloud:google-cloud-vectorsearch api_id: vectorsearch.googleapis.com @@ -2778,7 +2862,8 @@ libraries: product_documentation: https://cloud.google.com/vision-ai/docs api_description: Vertex AI Vision is an AI-powered platform to ingest, analyze and store video data. - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-visionai/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-visionai/latest/overview release_level: preview distribution_name: com.google.cloud:google-cloud-visionai api_id: visionai.googleapis.com @@ -2819,14 +2904,14 @@ libraries: - api_shortname: webrisk name_pretty: Web Risk product_documentation: https://cloud.google.com/web-risk/docs/ - api_description: "is a Google Cloud service that lets client applications check\ - \ URLs against Google's constantly updated lists of unsafe web resources. Unsafe\ - \ web resources include social engineering sites\u2014such as phishing and deceptive\ - \ sites\u2014and sites that host malware or unwanted software. With the Web Risk\ - \ API, you can quickly identify known bad sites, warn users before they click\ - \ infected links, and prevent users from posting links to known infected pages\ - \ from your site. The Web Risk API includes data on more than a million unsafe\ - \ URLs and stays up to date by examining billions of URLs each day." + api_description: is a Google Cloud service that lets client applications check URLs + against Google's constantly updated lists of unsafe web resources. Unsafe web + resources include social engineering sites—such as phishing and deceptive sites—and + sites that host malware or unwanted software. With the Web Risk API, you can quickly + identify known bad sites, warn users before they click infected links, and prevent + users from posting links to known infected pages from your site. The Web Risk + API includes data on more than a million unsafe URLs and stays up to date by examining + billions of URLs each day. release_level: stable requires_billing: false issue_tracker: '' @@ -2878,7 +2963,8 @@ libraries: api_description: Workload Manager is a service that provides tooling for enterprise workloads to automate the deployment and validation of your workloads against best practices and recommendations. - client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-workloadmanager/latest/overview + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-workloadmanager/latest/overview release_level: preview distribution_name: com.google.cloud:google-cloud-workloadmanager api_id: workloadmanager.googleapis.com diff --git a/java-maps-geocode/.OwlBot-hermetic.yaml b/java-maps-geocode/.OwlBot-hermetic.yaml new file mode 100644 index 000000000000..337c1b77e975 --- /dev/null +++ b/java-maps-geocode/.OwlBot-hermetic.yaml @@ -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 +# +# 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-geocode/grpc-google-.*/src" +- "/java-maps-geocode/proto-google-.*/src" +- "/java-maps-geocode/google-.*/src" +- "/java-maps-geocode/samples/snippets/generated" + +deep-preserve-regex: +- "/java-maps-geocode/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" +- "/java-maps-geocode/google-.*/src/main/java/com/google/cloud/.*/v.*/stub/Version.java" + +deep-copy-regex: +- source: "/google/maps/geocode/(v.*)/.*-java/proto-google-.*/src" + dest: "/owl-bot-staging/java-maps-geocode/$1/proto-google-maps-geocode-$1/src" +- source: "/google/maps/geocode/(v.*)/.*-java/grpc-google-.*/src" + dest: "/owl-bot-staging/java-maps-geocode/$1/grpc-google-maps-geocode-$1/src" +- source: "/google/maps/geocode/(v.*)/.*-java/gapic-google-.*/src" + dest: "/owl-bot-staging/java-maps-geocode/$1/google-maps-geocode/src" +- source: "/google/maps/geocode/(v.*)/.*-java/samples/snippets/generated" + dest: "/owl-bot-staging/java-maps-geocode/$1/samples/snippets/generated" + +api-name: geocode \ No newline at end of file diff --git a/java-maps-geocode/.repo-metadata.json b/java-maps-geocode/.repo-metadata.json new file mode 100644 index 000000000000..6f08aa0313f0 --- /dev/null +++ b/java-maps-geocode/.repo-metadata.json @@ -0,0 +1,16 @@ +{ + "api_shortname": "geocode", + "name_pretty": "Geocoding API", + "product_documentation": "https://developers.google.com/maps/documentation/geocoding/overview", + "api_description": "The Geocoding API is a service that accepts a place as an address, latitude and longitude coordinates, or Place ID.", + "client_documentation": "https://cloud.google.com/java/docs/reference/google-maps-geocode/latest/overview", + "release_level": "preview", + "transport": "both", + "language": "java", + "repo": "googleapis/google-cloud-java", + "repo_short": "java-maps-geocode", + "distribution_name": "com.google.maps:google-maps-geocode", + "api_id": "geocode.googleapis.com", + "library_type": "GAPIC_AUTO", + "requires_billing": true +} \ No newline at end of file diff --git a/java-maps-geocode/README.md b/java-maps-geocode/README.md new file mode 100644 index 000000000000..fd2afdb420dc --- /dev/null +++ b/java-maps-geocode/README.md @@ -0,0 +1,182 @@ +# Google Geocoding API Client for Java + +Java idiomatic client for [Geocoding 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, add this to your pom.xml file: + + +```xml + + com.google.maps + google-maps-geocode + 0.0.0 + +``` + +If you are using Gradle without BOM, add this to your dependencies: + +```Groovy +implementation 'com.google.maps:google-maps-geocode:0.0.0' +``` + +If you are using SBT, add this to your dependencies: + +```Scala +libraryDependencies += "com.google.maps" % "google-maps-geocode" % "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 Geocoding API APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the Geocoding API API calls. + +## Getting Started + +### Prerequisites + +You will need a [Google Cloud Platform Console][developer-console] project with the Geocoding API [API enabled][enable-api]. +You will need to [enable billing][enable-billing] to use Google Geocoding 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-geocode` library. See the [Quickstart](#quickstart) section +to add `google-maps-geocode` as a dependency in your code. + +## About Geocoding API + + +[Geocoding API][product-docs] The Geocoding API is a service that accepts a place as an address, latitude and longitude coordinates, or Place ID. + +See the [Geocoding API client library docs][javadocs] to learn how to +use this Geocoding API Client Library. + + + + + + +## Troubleshooting + +To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. + +## Transport + +Geocoding 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. + +Java is a registered trademark of Oracle and/or its affiliates. + +[product-docs]: https://developers.google.com/maps/documentation/geocoding/overview +[javadocs]: https://cloud.google.com/java/docs/reference/google-maps-geocode/latest/overview +[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-geocode.svg +[maven-version-link]: https://central.sonatype.com/artifact/com.google.maps/google-maps-geocode/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=geocode.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-geocode/google-maps-geocode-bom/pom.xml b/java-maps-geocode/google-maps-geocode-bom/pom.xml new file mode 100644 index 000000000000..1a84ebbb9863 --- /dev/null +++ b/java-maps-geocode/google-maps-geocode-bom/pom.xml @@ -0,0 +1,43 @@ + + + 4.0.0 + com.google.maps + google-maps-geocode-bom + 0.0.1-SNAPSHOT + pom + + com.google.cloud + google-cloud-pom-parent + 1.83.0-SNAPSHOT + ../../google-cloud-pom-parent/pom.xml + + + Google Geocoding API BOM + + BOM for Geocoding API + + + + true + + + + + + com.google.maps + google-maps-geocode + 0.0.1-SNAPSHOT + + + com.google.maps.api.grpc + grpc-google-maps-geocode-v4 + 0.0.1-SNAPSHOT + + + com.google.maps.api.grpc + proto-google-maps-geocode-v4 + 0.0.1-SNAPSHOT + + + + diff --git a/java-maps-geocode/google-maps-geocode/pom.xml b/java-maps-geocode/google-maps-geocode/pom.xml new file mode 100644 index 000000000000..3a849e7ef1d8 --- /dev/null +++ b/java-maps-geocode/google-maps-geocode/pom.xml @@ -0,0 +1,115 @@ + + + 4.0.0 + com.google.maps + google-maps-geocode + 0.0.1-SNAPSHOT + jar + Google Geocoding API + Geocoding API The Geocoding API is a service that accepts a place as an address, latitude and longitude coordinates, or Place ID. + + com.google.maps + google-maps-geocode-parent + 0.0.1-SNAPSHOT + + + google-maps-geocode + + + + 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-geocode-v4 + + + com.google.guava + guava + + + com.google.api + gax + + + com.google.api + gax-grpc + + + com.google.api + gax-httpjson + + + com.google.api.grpc + proto-google-iam-v1 + + + org.threeten + threetenbp + + + + + com.google.api.grpc + grpc-google-common-protos + test + + + com.google.api.grpc + grpc-google-iam-v1 + test + + + junit + junit + test + + + + com.google.maps.api.grpc + grpc-google-maps-geocode-v4 + 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-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/DestinationServiceClient.java b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/DestinationServiceClient.java new file mode 100644 index 000000000000..f8c0fa8d9046 --- /dev/null +++ b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/DestinationServiceClient.java @@ -0,0 +1,278 @@ +/* + * Copyright 2026 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.geocode.v4; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.maps.geocode.v4.stub.DestinationServiceStub; +import com.google.maps.geocode.v4.stub.DestinationServiceStubSettings; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: A service for retrieving destinations. + * + *

A destination provides hierarchical context about a place, which allows you to, for example, + * find apartment buildings within a larger apartment complex and vice versa. It also provides + * navigation points suitable for use cases such as ridesharing or delivery. + * + *

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 (DestinationServiceClient destinationServiceClient = DestinationServiceClient.create()) {
+ *   SearchDestinationsRequest request =
+ *       SearchDestinationsRequest.newBuilder()
+ *           .addAllTravelModes(new ArrayList())
+ *           .setLanguageCode("languageCode-2092349083")
+ *           .setRegionCode("regionCode-1991004415")
+ *           .build();
+ *   SearchDestinationsResponse response = destinationServiceClient.searchDestinations(request);
+ * }
+ * }
+ * + *

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

SearchDestinations

This method performs a destination lookup and returns a list of destinations.

+ *

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

+ *
    + *
  • searchDestinations(SearchDestinationsRequest request) + *

+ *

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

+ *
    + *
  • searchDestinationsCallable() + *

+ *
+ * + *

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 DestinationServiceSettings 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
+ * DestinationServiceSettings destinationServiceSettings =
+ *     DestinationServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * DestinationServiceClient destinationServiceClient =
+ *     DestinationServiceClient.create(destinationServiceSettings);
+ * }
+ * + *

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
+ * DestinationServiceSettings destinationServiceSettings =
+ *     DestinationServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * DestinationServiceClient destinationServiceClient =
+ *     DestinationServiceClient.create(destinationServiceSettings);
+ * }
+ * + *

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
+ * DestinationServiceSettings destinationServiceSettings =
+ *     DestinationServiceSettings.newHttpJsonBuilder().build();
+ * DestinationServiceClient destinationServiceClient =
+ *     DestinationServiceClient.create(destinationServiceSettings);
+ * }
+ * + *

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

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 (DestinationServiceClient destinationServiceClient = DestinationServiceClient.create()) {
+   *   SearchDestinationsRequest request =
+   *       SearchDestinationsRequest.newBuilder()
+   *           .addAllTravelModes(new ArrayList())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setRegionCode("regionCode-1991004415")
+   *           .build();
+   *   SearchDestinationsResponse response = destinationServiceClient.searchDestinations(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 SearchDestinationsResponse searchDestinations(SearchDestinationsRequest request) { + return searchDestinationsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * This method performs a destination lookup and returns a list of destinations. + * + *

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 (DestinationServiceClient destinationServiceClient = DestinationServiceClient.create()) {
+   *   SearchDestinationsRequest request =
+   *       SearchDestinationsRequest.newBuilder()
+   *           .addAllTravelModes(new ArrayList())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setRegionCode("regionCode-1991004415")
+   *           .build();
+   *   ApiFuture future =
+   *       destinationServiceClient.searchDestinationsCallable().futureCall(request);
+   *   // Do something.
+   *   SearchDestinationsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + searchDestinationsCallable() { + return stub.searchDestinationsCallable(); + } + + @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-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/DestinationServiceSettings.java b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/DestinationServiceSettings.java new file mode 100644 index 000000000000..0e0eb0d1c982 --- /dev/null +++ b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/DestinationServiceSettings.java @@ -0,0 +1,219 @@ +/* + * Copyright 2026 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.geocode.v4; + +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.geocode.v4.stub.DestinationServiceStubSettings; +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 DestinationServiceClient}. + * + *

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 + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of searchDestinations: + * + *

{@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
+ * DestinationServiceSettings.Builder destinationServiceSettingsBuilder =
+ *     DestinationServiceSettings.newBuilder();
+ * destinationServiceSettingsBuilder
+ *     .searchDestinationsSettings()
+ *     .setRetrySettings(
+ *         destinationServiceSettingsBuilder
+ *             .searchDestinationsSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * DestinationServiceSettings destinationServiceSettings =
+ *     destinationServiceSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + */ +@Generated("by gapic-generator-java") +public class DestinationServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to searchDestinations. */ + public UnaryCallSettings + searchDestinationsSettings() { + return ((DestinationServiceStubSettings) getStubSettings()).searchDestinationsSettings(); + } + + public static final DestinationServiceSettings create(DestinationServiceStubSettings stub) + throws IOException { + return new DestinationServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return DestinationServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return DestinationServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DestinationServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return DestinationServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return DestinationServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return DestinationServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return DestinationServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DestinationServiceStubSettings.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 DestinationServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for DestinationServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(DestinationServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(DestinationServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(DestinationServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(DestinationServiceStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(DestinationServiceStubSettings.newHttpJsonBuilder()); + } + + public DestinationServiceStubSettings.Builder getStubSettingsBuilder() { + return ((DestinationServiceStubSettings.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 searchDestinations. */ + public UnaryCallSettings.Builder + searchDestinationsSettings() { + return getStubSettingsBuilder().searchDestinationsSettings(); + } + + @Override + public DestinationServiceSettings build() throws IOException { + return new DestinationServiceSettings(this); + } + } +} diff --git a/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/GeocodeServiceClient.java b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/GeocodeServiceClient.java new file mode 100644 index 000000000000..b9ff7094115e --- /dev/null +++ b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/GeocodeServiceClient.java @@ -0,0 +1,425 @@ +/* + * Copyright 2026 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.geocode.v4; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.maps.geocode.v4.stub.GeocodeServiceStub; +import com.google.maps.geocode.v4.stub.GeocodeServiceStubSettings; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: A service for performing geocoding. + * + *

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 (GeocodeServiceClient geocodeServiceClient = GeocodeServiceClient.create()) {
+ *   GeocodeAddressRequest request =
+ *       GeocodeAddressRequest.newBuilder()
+ *           .setLocationBias(GeocodeAddressRequest.LocationBias.newBuilder().build())
+ *           .setLanguageCode("languageCode-2092349083")
+ *           .setRegionCode("regionCode-1991004415")
+ *           .build();
+ *   GeocodeAddressResponse response = geocodeServiceClient.geocodeAddress(request);
+ * }
+ * }
+ * + *

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

GeocodeAddress

This method performs an address geocode, which maps an address to a LatLng. It also provides structured information about the address.

+ *

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

+ *
    + *
  • geocodeAddress(GeocodeAddressRequest request) + *

+ *

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

+ *
    + *
  • geocodeAddressCallable() + *

+ *

GeocodeLocation

This method performs a location geocode, which maps a LatLng to an address. It also provides structured information about the address.

+ *

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

+ *
    + *
  • geocodeLocation(GeocodeLocationRequest request) + *

+ *

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

+ *
    + *
  • geocodeLocationCallable() + *

+ *

GeocodePlace

This method performs a geocode lookup using a place ID.

+ *

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

+ *
    + *
  • geocodePlace(GeocodePlaceRequest request) + *

+ *

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

+ *
    + *
  • geocodePlaceCallable() + *

+ *
+ * + *

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 GeocodeServiceSettings 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
+ * GeocodeServiceSettings geocodeServiceSettings =
+ *     GeocodeServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * GeocodeServiceClient geocodeServiceClient = GeocodeServiceClient.create(geocodeServiceSettings);
+ * }
+ * + *

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
+ * GeocodeServiceSettings geocodeServiceSettings =
+ *     GeocodeServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * GeocodeServiceClient geocodeServiceClient = GeocodeServiceClient.create(geocodeServiceSettings);
+ * }
+ * + *

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
+ * GeocodeServiceSettings geocodeServiceSettings =
+ *     GeocodeServiceSettings.newHttpJsonBuilder().build();
+ * GeocodeServiceClient geocodeServiceClient = GeocodeServiceClient.create(geocodeServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class GeocodeServiceClient implements BackgroundResource { + private final GeocodeServiceSettings settings; + private final GeocodeServiceStub stub; + + /** Constructs an instance of GeocodeServiceClient with default settings. */ + public static final GeocodeServiceClient create() throws IOException { + return create(GeocodeServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of GeocodeServiceClient, 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 GeocodeServiceClient create(GeocodeServiceSettings settings) + throws IOException { + return new GeocodeServiceClient(settings); + } + + /** + * Constructs an instance of GeocodeServiceClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(GeocodeServiceSettings). + */ + public static final GeocodeServiceClient create(GeocodeServiceStub stub) { + return new GeocodeServiceClient(stub); + } + + /** + * Constructs an instance of GeocodeServiceClient, 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 GeocodeServiceClient(GeocodeServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((GeocodeServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected GeocodeServiceClient(GeocodeServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final GeocodeServiceSettings getSettings() { + return settings; + } + + public GeocodeServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * This method performs an address geocode, which maps an address to a LatLng. It also provides + * structured information about the address. + * + *

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 (GeocodeServiceClient geocodeServiceClient = GeocodeServiceClient.create()) {
+   *   GeocodeAddressRequest request =
+   *       GeocodeAddressRequest.newBuilder()
+   *           .setLocationBias(GeocodeAddressRequest.LocationBias.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setRegionCode("regionCode-1991004415")
+   *           .build();
+   *   GeocodeAddressResponse response = geocodeServiceClient.geocodeAddress(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 GeocodeAddressResponse geocodeAddress(GeocodeAddressRequest request) { + return geocodeAddressCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * This method performs an address geocode, which maps an address to a LatLng. It also provides + * structured information about the address. + * + *

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 (GeocodeServiceClient geocodeServiceClient = GeocodeServiceClient.create()) {
+   *   GeocodeAddressRequest request =
+   *       GeocodeAddressRequest.newBuilder()
+   *           .setLocationBias(GeocodeAddressRequest.LocationBias.newBuilder().build())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setRegionCode("regionCode-1991004415")
+   *           .build();
+   *   ApiFuture future =
+   *       geocodeServiceClient.geocodeAddressCallable().futureCall(request);
+   *   // Do something.
+   *   GeocodeAddressResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + geocodeAddressCallable() { + return stub.geocodeAddressCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * This method performs a location geocode, which maps a LatLng to an address. It also provides + * structured information about the address. + * + *

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 (GeocodeServiceClient geocodeServiceClient = GeocodeServiceClient.create()) {
+   *   GeocodeLocationRequest request =
+   *       GeocodeLocationRequest.newBuilder()
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setRegionCode("regionCode-1991004415")
+   *           .addAllTypes(new ArrayList())
+   *           .addAllGranularity(new ArrayList())
+   *           .build();
+   *   GeocodeLocationResponse response = geocodeServiceClient.geocodeLocation(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 GeocodeLocationResponse geocodeLocation(GeocodeLocationRequest request) { + return geocodeLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * This method performs a location geocode, which maps a LatLng to an address. It also provides + * structured information about the address. + * + *

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 (GeocodeServiceClient geocodeServiceClient = GeocodeServiceClient.create()) {
+   *   GeocodeLocationRequest request =
+   *       GeocodeLocationRequest.newBuilder()
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setRegionCode("regionCode-1991004415")
+   *           .addAllTypes(new ArrayList())
+   *           .addAllGranularity(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       geocodeServiceClient.geocodeLocationCallable().futureCall(request);
+   *   // Do something.
+   *   GeocodeLocationResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + geocodeLocationCallable() { + return stub.geocodeLocationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * This method performs a geocode lookup using a place ID. + * + *

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 (GeocodeServiceClient geocodeServiceClient = GeocodeServiceClient.create()) {
+   *   GeocodePlaceRequest request =
+   *       GeocodePlaceRequest.newBuilder()
+   *           .setPlace("place106748167")
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setRegionCode("regionCode-1991004415")
+   *           .build();
+   *   GeocodeResult response = geocodeServiceClient.geocodePlace(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 GeocodeResult geocodePlace(GeocodePlaceRequest request) { + return geocodePlaceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * This method performs a geocode lookup using a place ID. + * + *

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 (GeocodeServiceClient geocodeServiceClient = GeocodeServiceClient.create()) {
+   *   GeocodePlaceRequest request =
+   *       GeocodePlaceRequest.newBuilder()
+   *           .setPlace("place106748167")
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setRegionCode("regionCode-1991004415")
+   *           .build();
+   *   ApiFuture future =
+   *       geocodeServiceClient.geocodePlaceCallable().futureCall(request);
+   *   // Do something.
+   *   GeocodeResult response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable geocodePlaceCallable() { + return stub.geocodePlaceCallable(); + } + + @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-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/GeocodeServiceSettings.java b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/GeocodeServiceSettings.java new file mode 100644 index 000000000000..e7ea63fdda73 --- /dev/null +++ b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/GeocodeServiceSettings.java @@ -0,0 +1,239 @@ +/* + * Copyright 2026 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.geocode.v4; + +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.geocode.v4.stub.GeocodeServiceStubSettings; +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 GeocodeServiceClient}. + * + *

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

    + *
  • The default service address (geocoding-backend.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 + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of geocodeAddress: + * + *

{@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
+ * GeocodeServiceSettings.Builder geocodeServiceSettingsBuilder =
+ *     GeocodeServiceSettings.newBuilder();
+ * geocodeServiceSettingsBuilder
+ *     .geocodeAddressSettings()
+ *     .setRetrySettings(
+ *         geocodeServiceSettingsBuilder
+ *             .geocodeAddressSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * GeocodeServiceSettings geocodeServiceSettings = geocodeServiceSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + */ +@Generated("by gapic-generator-java") +public class GeocodeServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to geocodeAddress. */ + public UnaryCallSettings geocodeAddressSettings() { + return ((GeocodeServiceStubSettings) getStubSettings()).geocodeAddressSettings(); + } + + /** Returns the object with the settings used for calls to geocodeLocation. */ + public UnaryCallSettings + geocodeLocationSettings() { + return ((GeocodeServiceStubSettings) getStubSettings()).geocodeLocationSettings(); + } + + /** Returns the object with the settings used for calls to geocodePlace. */ + public UnaryCallSettings geocodePlaceSettings() { + return ((GeocodeServiceStubSettings) getStubSettings()).geocodePlaceSettings(); + } + + public static final GeocodeServiceSettings create(GeocodeServiceStubSettings stub) + throws IOException { + return new GeocodeServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return GeocodeServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return GeocodeServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return GeocodeServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GeocodeServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return GeocodeServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return GeocodeServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return GeocodeServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return GeocodeServiceStubSettings.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 GeocodeServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for GeocodeServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(GeocodeServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(GeocodeServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(GeocodeServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(GeocodeServiceStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(GeocodeServiceStubSettings.newHttpJsonBuilder()); + } + + public GeocodeServiceStubSettings.Builder getStubSettingsBuilder() { + return ((GeocodeServiceStubSettings.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 geocodeAddress. */ + public UnaryCallSettings.Builder + geocodeAddressSettings() { + return getStubSettingsBuilder().geocodeAddressSettings(); + } + + /** Returns the builder for the settings used for calls to geocodeLocation. */ + public UnaryCallSettings.Builder + geocodeLocationSettings() { + return getStubSettingsBuilder().geocodeLocationSettings(); + } + + /** Returns the builder for the settings used for calls to geocodePlace. */ + public UnaryCallSettings.Builder geocodePlaceSettings() { + return getStubSettingsBuilder().geocodePlaceSettings(); + } + + @Override + public GeocodeServiceSettings build() throws IOException { + return new GeocodeServiceSettings(this); + } + } +} diff --git a/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/gapic_metadata.json b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/gapic_metadata.json new file mode 100644 index 000000000000..4fd4fe0bf870 --- /dev/null +++ b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/gapic_metadata.json @@ -0,0 +1,39 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.maps.geocode.v4", + "libraryPackage": "com.google.maps.geocode.v4", + "services": { + "DestinationService": { + "clients": { + "grpc": { + "libraryClient": "DestinationServiceClient", + "rpcs": { + "SearchDestinations": { + "methods": ["searchDestinations", "searchDestinationsCallable"] + } + } + } + } + }, + "GeocodeService": { + "clients": { + "grpc": { + "libraryClient": "GeocodeServiceClient", + "rpcs": { + "GeocodeAddress": { + "methods": ["geocodeAddress", "geocodeAddressCallable"] + }, + "GeocodeLocation": { + "methods": ["geocodeLocation", "geocodeLocationCallable"] + }, + "GeocodePlace": { + "methods": ["geocodePlace", "geocodePlaceCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/package-info.java b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/package-info.java new file mode 100644 index 000000000000..3741155c8ce2 --- /dev/null +++ b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/package-info.java @@ -0,0 +1,75 @@ +/* + * Copyright 2026 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 Geocoding API + * + *

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

======================= DestinationServiceClient ======================= + * + *

Service Description: A service for retrieving destinations. + * + *

A destination provides hierarchical context about a place, which allows you to, for example, + * find apartment buildings within a larger apartment complex and vice versa. It also provides + * navigation points suitable for use cases such as ridesharing or delivery. + * + *

Sample for DestinationServiceClient: + * + *

{@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 (DestinationServiceClient destinationServiceClient = DestinationServiceClient.create()) {
+ *   SearchDestinationsRequest request =
+ *       SearchDestinationsRequest.newBuilder()
+ *           .addAllTravelModes(new ArrayList())
+ *           .setLanguageCode("languageCode-2092349083")
+ *           .setRegionCode("regionCode-1991004415")
+ *           .build();
+ *   SearchDestinationsResponse response = destinationServiceClient.searchDestinations(request);
+ * }
+ * }
+ * + *

======================= GeocodeServiceClient ======================= + * + *

Service Description: A service for performing geocoding. + * + *

Sample for GeocodeServiceClient: + * + *

{@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 (GeocodeServiceClient geocodeServiceClient = GeocodeServiceClient.create()) {
+ *   GeocodeAddressRequest request =
+ *       GeocodeAddressRequest.newBuilder()
+ *           .setLocationBias(GeocodeAddressRequest.LocationBias.newBuilder().build())
+ *           .setLanguageCode("languageCode-2092349083")
+ *           .setRegionCode("regionCode-1991004415")
+ *           .build();
+ *   GeocodeAddressResponse response = geocodeServiceClient.geocodeAddress(request);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.maps.geocode.v4; + +import javax.annotation.Generated; diff --git a/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/DestinationServiceStub.java b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/DestinationServiceStub.java new file mode 100644 index 000000000000..0af21e975da7 --- /dev/null +++ b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/DestinationServiceStub.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 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.geocode.v4.stub; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.maps.geocode.v4.SearchDestinationsRequest; +import com.google.maps.geocode.v4.SearchDestinationsResponse; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the DestinationService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class DestinationServiceStub implements BackgroundResource { + + public UnaryCallable + searchDestinationsCallable() { + throw new UnsupportedOperationException("Not implemented: searchDestinationsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/DestinationServiceStubSettings.java b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/DestinationServiceStubSettings.java new file mode 100644 index 000000000000..dc03e8793772 --- /dev/null +++ b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/DestinationServiceStubSettings.java @@ -0,0 +1,364 @@ +/* + * Copyright 2026 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.geocode.v4.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.LibraryMetadata; +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.geocode.v4.SearchDestinationsRequest; +import com.google.maps.geocode.v4.SearchDestinationsResponse; +import java.io.IOException; +import java.time.Duration; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link DestinationServiceStub}. + * + *

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

    + *
  • The default service address (geocoding-backend.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 + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of searchDestinations: + * + *

{@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
+ * DestinationServiceStubSettings.Builder destinationServiceSettingsBuilder =
+ *     DestinationServiceStubSettings.newBuilder();
+ * destinationServiceSettingsBuilder
+ *     .searchDestinationsSettings()
+ *     .setRetrySettings(
+ *         destinationServiceSettingsBuilder
+ *             .searchDestinationsSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * DestinationServiceStubSettings destinationServiceSettings =
+ *     destinationServiceSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + */ +@Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") +public class DestinationServiceStubSettings 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") + .add("https://www.googleapis.com/auth/maps-platform.destinations") + .add("https://www.googleapis.com/auth/maps-platform.geocode") + .build(); + + private final UnaryCallSettings + searchDestinationsSettings; + + /** Returns the object with the settings used for calls to searchDestinations. */ + public UnaryCallSettings + searchDestinationsSettings() { + return searchDestinationsSettings; + } + + public DestinationServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcDestinationServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonDestinationServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "geocoding-backend"; + } + + /** 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 "geocoding-backend.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "geocoding-backend.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(DestinationServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(DestinationServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DestinationServiceStubSettings.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 DestinationServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + searchDestinationsSettings = settingsBuilder.searchDestinationsSettings().build(); + } + + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.maps:google-maps-geocode") + .setRepository("googleapis/google-cloud-java") + .setVersion(Version.VERSION) + .build(); + } + + /** Builder for DestinationServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + searchDestinationsSettings; + 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() + .setInitialRetryDelayDuration(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelayDuration(Duration.ofMillis(10000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + searchDestinationsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(searchDestinationsSettings); + initDefaults(this); + } + + protected Builder(DestinationServiceStubSettings settings) { + super(settings); + + searchDestinationsSettings = settings.searchDestinationsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(searchDestinationsSettings); + } + + 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 + .searchDestinationsSettings() + .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 searchDestinations. */ + public UnaryCallSettings.Builder + searchDestinationsSettings() { + return searchDestinationsSettings; + } + + @Override + public DestinationServiceStubSettings build() throws IOException { + return new DestinationServiceStubSettings(this); + } + } +} diff --git a/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/GeocodeServiceStub.java b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/GeocodeServiceStub.java new file mode 100644 index 000000000000..9aae1f9cdbd9 --- /dev/null +++ b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/GeocodeServiceStub.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.geocode.v4.stub; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.maps.geocode.v4.GeocodeAddressRequest; +import com.google.maps.geocode.v4.GeocodeAddressResponse; +import com.google.maps.geocode.v4.GeocodeLocationRequest; +import com.google.maps.geocode.v4.GeocodeLocationResponse; +import com.google.maps.geocode.v4.GeocodePlaceRequest; +import com.google.maps.geocode.v4.GeocodeResult; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the GeocodeService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class GeocodeServiceStub implements BackgroundResource { + + public UnaryCallable geocodeAddressCallable() { + throw new UnsupportedOperationException("Not implemented: geocodeAddressCallable()"); + } + + public UnaryCallable geocodeLocationCallable() { + throw new UnsupportedOperationException("Not implemented: geocodeLocationCallable()"); + } + + public UnaryCallable geocodePlaceCallable() { + throw new UnsupportedOperationException("Not implemented: geocodePlaceCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/GeocodeServiceStubSettings.java b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/GeocodeServiceStubSettings.java new file mode 100644 index 000000000000..24a33383247e --- /dev/null +++ b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/GeocodeServiceStubSettings.java @@ -0,0 +1,414 @@ +/* + * Copyright 2026 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.geocode.v4.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.LibraryMetadata; +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.geocode.v4.GeocodeAddressRequest; +import com.google.maps.geocode.v4.GeocodeAddressResponse; +import com.google.maps.geocode.v4.GeocodeLocationRequest; +import com.google.maps.geocode.v4.GeocodeLocationResponse; +import com.google.maps.geocode.v4.GeocodePlaceRequest; +import com.google.maps.geocode.v4.GeocodeResult; +import java.io.IOException; +import java.time.Duration; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link GeocodeServiceStub}. + * + *

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

    + *
  • The default service address (geocoding-backend.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 + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of geocodeAddress: + * + *

{@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
+ * GeocodeServiceStubSettings.Builder geocodeServiceSettingsBuilder =
+ *     GeocodeServiceStubSettings.newBuilder();
+ * geocodeServiceSettingsBuilder
+ *     .geocodeAddressSettings()
+ *     .setRetrySettings(
+ *         geocodeServiceSettingsBuilder
+ *             .geocodeAddressSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * GeocodeServiceStubSettings geocodeServiceSettings = geocodeServiceSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + */ +@Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") +public class GeocodeServiceStubSettings 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") + .add("https://www.googleapis.com/auth/maps-platform.geocode") + .add("https://www.googleapis.com/auth/maps-platform.geocode.address") + .add("https://www.googleapis.com/auth/maps-platform.geocode.location") + .add("https://www.googleapis.com/auth/maps-platform.geocode.place") + .build(); + + private final UnaryCallSettings + geocodeAddressSettings; + private final UnaryCallSettings + geocodeLocationSettings; + private final UnaryCallSettings geocodePlaceSettings; + + /** Returns the object with the settings used for calls to geocodeAddress. */ + public UnaryCallSettings geocodeAddressSettings() { + return geocodeAddressSettings; + } + + /** Returns the object with the settings used for calls to geocodeLocation. */ + public UnaryCallSettings + geocodeLocationSettings() { + return geocodeLocationSettings; + } + + /** Returns the object with the settings used for calls to geocodePlace. */ + public UnaryCallSettings geocodePlaceSettings() { + return geocodePlaceSettings; + } + + public GeocodeServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcGeocodeServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonGeocodeServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "geocoding-backend"; + } + + /** 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 "geocoding-backend.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "geocoding-backend.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(GeocodeServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(GeocodeServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return GeocodeServiceStubSettings.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 GeocodeServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + geocodeAddressSettings = settingsBuilder.geocodeAddressSettings().build(); + geocodeLocationSettings = settingsBuilder.geocodeLocationSettings().build(); + geocodePlaceSettings = settingsBuilder.geocodePlaceSettings().build(); + } + + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.maps:google-maps-geocode") + .setRepository("googleapis/google-cloud-java") + .setVersion(Version.VERSION) + .build(); + } + + /** Builder for GeocodeServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + geocodeAddressSettings; + private final UnaryCallSettings.Builder + geocodeLocationSettings; + private final UnaryCallSettings.Builder + geocodePlaceSettings; + 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() + .setInitialRetryDelayDuration(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelayDuration(Duration.ofMillis(10000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + geocodeAddressSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + geocodeLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + geocodePlaceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + geocodeAddressSettings, geocodeLocationSettings, geocodePlaceSettings); + initDefaults(this); + } + + protected Builder(GeocodeServiceStubSettings settings) { + super(settings); + + geocodeAddressSettings = settings.geocodeAddressSettings.toBuilder(); + geocodeLocationSettings = settings.geocodeLocationSettings.toBuilder(); + geocodePlaceSettings = settings.geocodePlaceSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + geocodeAddressSettings, geocodeLocationSettings, geocodePlaceSettings); + } + + 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 + .geocodeAddressSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .geocodeLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .geocodePlaceSettings() + .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 geocodeAddress. */ + public UnaryCallSettings.Builder + geocodeAddressSettings() { + return geocodeAddressSettings; + } + + /** Returns the builder for the settings used for calls to geocodeLocation. */ + public UnaryCallSettings.Builder + geocodeLocationSettings() { + return geocodeLocationSettings; + } + + /** Returns the builder for the settings used for calls to geocodePlace. */ + public UnaryCallSettings.Builder geocodePlaceSettings() { + return geocodePlaceSettings; + } + + @Override + public GeocodeServiceStubSettings build() throws IOException { + return new GeocodeServiceStubSettings(this); + } + } +} diff --git a/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/GrpcDestinationServiceCallableFactory.java b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/GrpcDestinationServiceCallableFactory.java new file mode 100644 index 000000000000..5a7fd81bd059 --- /dev/null +++ b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/GrpcDestinationServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2026 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.geocode.v4.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 DestinationService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcDestinationServiceCallableFactory 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-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/GrpcDestinationServiceStub.java b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/GrpcDestinationServiceStub.java new file mode 100644 index 000000000000..a802a81ce3cd --- /dev/null +++ b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/GrpcDestinationServiceStub.java @@ -0,0 +1,162 @@ +/* + * Copyright 2026 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.geocode.v4.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.geocode.v4.SearchDestinationsRequest; +import com.google.maps.geocode.v4.SearchDestinationsResponse; +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 DestinationService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcDestinationServiceStub extends DestinationServiceStub { + private static final MethodDescriptor + searchDestinationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.maps.geocode.v4.DestinationService/SearchDestinations") + .setRequestMarshaller( + ProtoUtils.marshaller(SearchDestinationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(SearchDestinationsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private final UnaryCallable + searchDestinationsCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcDestinationServiceStub create(DestinationServiceStubSettings settings) + throws IOException { + return new GrpcDestinationServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcDestinationServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcDestinationServiceStub( + DestinationServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcDestinationServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcDestinationServiceStub( + DestinationServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcDestinationServiceStub, 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 GrpcDestinationServiceStub( + DestinationServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcDestinationServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcDestinationServiceStub, 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 GrpcDestinationServiceStub( + DestinationServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + searchDestinationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(searchDestinationsMethodDescriptor) + .build(); + + this.searchDestinationsCallable = + callableFactory.createUnaryCallable( + searchDestinationsTransportSettings, + settings.searchDestinationsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + searchDestinationsCallable() { + return searchDestinationsCallable; + } + + @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-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/GrpcGeocodeServiceCallableFactory.java b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/GrpcGeocodeServiceCallableFactory.java new file mode 100644 index 000000000000..d3353b6c2b85 --- /dev/null +++ b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/GrpcGeocodeServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2026 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.geocode.v4.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 GeocodeService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcGeocodeServiceCallableFactory 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-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/GrpcGeocodeServiceStub.java b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/GrpcGeocodeServiceStub.java new file mode 100644 index 000000000000..43a344cacfe9 --- /dev/null +++ b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/GrpcGeocodeServiceStub.java @@ -0,0 +1,231 @@ +/* + * Copyright 2026 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.geocode.v4.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.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.maps.geocode.v4.GeocodeAddressRequest; +import com.google.maps.geocode.v4.GeocodeAddressResponse; +import com.google.maps.geocode.v4.GeocodeLocationRequest; +import com.google.maps.geocode.v4.GeocodeLocationResponse; +import com.google.maps.geocode.v4.GeocodePlaceRequest; +import com.google.maps.geocode.v4.GeocodeResult; +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 GeocodeService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcGeocodeServiceStub extends GeocodeServiceStub { + private static final MethodDescriptor + geocodeAddressMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.maps.geocode.v4.GeocodeService/GeocodeAddress") + .setRequestMarshaller( + ProtoUtils.marshaller(GeocodeAddressRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(GeocodeAddressResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + geocodeLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.maps.geocode.v4.GeocodeService/GeocodeLocation") + .setRequestMarshaller( + ProtoUtils.marshaller(GeocodeLocationRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(GeocodeLocationResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + geocodePlaceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.maps.geocode.v4.GeocodeService/GeocodePlace") + .setRequestMarshaller(ProtoUtils.marshaller(GeocodePlaceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(GeocodeResult.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private final UnaryCallable geocodeAddressCallable; + private final UnaryCallable + geocodeLocationCallable; + private final UnaryCallable geocodePlaceCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcGeocodeServiceStub create(GeocodeServiceStubSettings settings) + throws IOException { + return new GrpcGeocodeServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcGeocodeServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcGeocodeServiceStub( + GeocodeServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcGeocodeServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcGeocodeServiceStub( + GeocodeServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcGeocodeServiceStub, 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 GrpcGeocodeServiceStub(GeocodeServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcGeocodeServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcGeocodeServiceStub, 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 GrpcGeocodeServiceStub( + GeocodeServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + geocodeAddressTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(geocodeAddressMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("address_query", String.valueOf(request.getAddressQuery())); + return builder.build(); + }) + .build(); + GrpcCallSettings + geocodeLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(geocodeLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("location_query", String.valueOf(request.getLocationQuery())); + return builder.build(); + }) + .build(); + GrpcCallSettings geocodePlaceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(geocodePlaceMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("place", String.valueOf(request.getPlace())); + return builder.build(); + }) + .build(); + + this.geocodeAddressCallable = + callableFactory.createUnaryCallable( + geocodeAddressTransportSettings, settings.geocodeAddressSettings(), clientContext); + this.geocodeLocationCallable = + callableFactory.createUnaryCallable( + geocodeLocationTransportSettings, settings.geocodeLocationSettings(), clientContext); + this.geocodePlaceCallable = + callableFactory.createUnaryCallable( + geocodePlaceTransportSettings, settings.geocodePlaceSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable geocodeAddressCallable() { + return geocodeAddressCallable; + } + + @Override + public UnaryCallable geocodeLocationCallable() { + return geocodeLocationCallable; + } + + @Override + public UnaryCallable geocodePlaceCallable() { + return geocodePlaceCallable; + } + + @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-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/HttpJsonDestinationServiceCallableFactory.java b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/HttpJsonDestinationServiceCallableFactory.java new file mode 100644 index 000000000000..c31372cfe6b4 --- /dev/null +++ b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/HttpJsonDestinationServiceCallableFactory.java @@ -0,0 +1,101 @@ +/* + * Copyright 2026 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.geocode.v4.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 DestinationService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class HttpJsonDestinationServiceCallableFactory + 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-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/HttpJsonDestinationServiceStub.java b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/HttpJsonDestinationServiceStub.java new file mode 100644 index 000000000000..873640bf3891 --- /dev/null +++ b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/HttpJsonDestinationServiceStub.java @@ -0,0 +1,199 @@ +/* + * Copyright 2026 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.geocode.v4.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.geocode.v4.SearchDestinationsRequest; +import com.google.maps.geocode.v4.SearchDestinationsResponse; +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 DestinationService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class HttpJsonDestinationServiceStub extends DestinationServiceStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor + searchDestinationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.maps.geocode.v4.DestinationService/SearchDestinations") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v4/geocode/destinations", + 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(SearchDestinationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable + searchDestinationsCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonDestinationServiceStub create(DestinationServiceStubSettings settings) + throws IOException { + return new HttpJsonDestinationServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonDestinationServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonDestinationServiceStub( + DestinationServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonDestinationServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonDestinationServiceStub( + DestinationServiceStubSettings.newHttpJsonBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of HttpJsonDestinationServiceStub, 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 HttpJsonDestinationServiceStub( + DestinationServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonDestinationServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonDestinationServiceStub, 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 HttpJsonDestinationServiceStub( + DestinationServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings + searchDestinationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(searchDestinationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.searchDestinationsCallable = + callableFactory.createUnaryCallable( + searchDestinationsTransportSettings, + settings.searchDestinationsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(searchDestinationsMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable + searchDestinationsCallable() { + return searchDestinationsCallable; + } + + @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-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/HttpJsonGeocodeServiceCallableFactory.java b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/HttpJsonGeocodeServiceCallableFactory.java new file mode 100644 index 000000000000..a43f64f14be2 --- /dev/null +++ b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/HttpJsonGeocodeServiceCallableFactory.java @@ -0,0 +1,101 @@ +/* + * Copyright 2026 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.geocode.v4.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 GeocodeService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class HttpJsonGeocodeServiceCallableFactory + 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-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/HttpJsonGeocodeServiceStub.java b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/HttpJsonGeocodeServiceStub.java new file mode 100644 index 000000000000..0eea3b5609bd --- /dev/null +++ b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/HttpJsonGeocodeServiceStub.java @@ -0,0 +1,334 @@ +/* + * Copyright 2026 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.geocode.v4.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.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.maps.geocode.v4.GeocodeAddressRequest; +import com.google.maps.geocode.v4.GeocodeAddressResponse; +import com.google.maps.geocode.v4.GeocodeLocationRequest; +import com.google.maps.geocode.v4.GeocodeLocationResponse; +import com.google.maps.geocode.v4.GeocodePlaceRequest; +import com.google.maps.geocode.v4.GeocodeResult; +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 GeocodeService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class HttpJsonGeocodeServiceStub extends GeocodeServiceStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor + geocodeAddressMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.maps.geocode.v4.GeocodeService/GeocodeAddress") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v4/geocode/address", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "addressQuery", request.getAddressQuery()); + return fields; + }) + .setAdditionalPaths("/v4/geocode/address/{addressQuery}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "address", request.getAddress()); + serializer.putQueryParam( + fields, "languageCode", request.getLanguageCode()); + serializer.putQueryParam( + fields, "locationBias", request.getLocationBias()); + serializer.putQueryParam(fields, "regionCode", request.getRegionCode()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(GeocodeAddressResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + geocodeLocationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.maps.geocode.v4.GeocodeService/GeocodeLocation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v4/geocode/location", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "locationQuery", request.getLocationQuery()); + return fields; + }) + .setAdditionalPaths("/v4/geocode/location/{locationQuery}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "granularity", request.getGranularityList()); + serializer.putQueryParam( + fields, "languageCode", request.getLanguageCode()); + serializer.putQueryParam(fields, "location", request.getLocation()); + serializer.putQueryParam(fields, "regionCode", request.getRegionCode()); + serializer.putQueryParam(fields, "types", request.getTypesList()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(GeocodeLocationResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + geocodePlaceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.maps.geocode.v4.GeocodeService/GeocodePlace") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v4/geocode/{place=places/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "place", request.getPlace()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "languageCode", request.getLanguageCode()); + serializer.putQueryParam(fields, "regionCode", request.getRegionCode()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(GeocodeResult.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable geocodeAddressCallable; + private final UnaryCallable + geocodeLocationCallable; + private final UnaryCallable geocodePlaceCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonGeocodeServiceStub create(GeocodeServiceStubSettings settings) + throws IOException { + return new HttpJsonGeocodeServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonGeocodeServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonGeocodeServiceStub( + GeocodeServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonGeocodeServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonGeocodeServiceStub( + GeocodeServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonGeocodeServiceStub, 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 HttpJsonGeocodeServiceStub( + GeocodeServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonGeocodeServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonGeocodeServiceStub, 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 HttpJsonGeocodeServiceStub( + GeocodeServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings + geocodeAddressTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(geocodeAddressMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("address_query", String.valueOf(request.getAddressQuery())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + geocodeLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(geocodeLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("location_query", String.valueOf(request.getLocationQuery())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings geocodePlaceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(geocodePlaceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("place", String.valueOf(request.getPlace())); + return builder.build(); + }) + .build(); + + this.geocodeAddressCallable = + callableFactory.createUnaryCallable( + geocodeAddressTransportSettings, settings.geocodeAddressSettings(), clientContext); + this.geocodeLocationCallable = + callableFactory.createUnaryCallable( + geocodeLocationTransportSettings, settings.geocodeLocationSettings(), clientContext); + this.geocodePlaceCallable = + callableFactory.createUnaryCallable( + geocodePlaceTransportSettings, settings.geocodePlaceSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(geocodeAddressMethodDescriptor); + methodDescriptors.add(geocodeLocationMethodDescriptor); + methodDescriptors.add(geocodePlaceMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable geocodeAddressCallable() { + return geocodeAddressCallable; + } + + @Override + public UnaryCallable geocodeLocationCallable() { + return geocodeLocationCallable; + } + + @Override + public UnaryCallable geocodePlaceCallable() { + return geocodePlaceCallable; + } + + @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-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/Version.java b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/Version.java new file mode 100644 index 000000000000..c8e9a355dfde --- /dev/null +++ b/java-maps-geocode/google-maps-geocode/src/main/java/com/google/maps/geocode/v4/stub/Version.java @@ -0,0 +1,27 @@ +/* + * Copyright 2026 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.geocode.v4.stub; + +import com.google.api.core.InternalApi; + +@InternalApi("For internal use only") +final class Version { + // {x-version-update-start:google-maps-geocode:current} + static final String VERSION = "0.0.0-SNAPSHOT"; + // {x-version-update-end} + +} diff --git a/java-maps-geocode/google-maps-geocode/src/main/resources/META-INF/native-image/com.google.maps.geocode.v4/reflect-config.json b/java-maps-geocode/google-maps-geocode/src/main/resources/META-INF/native-image/com.google.maps.geocode.v4/reflect-config.json new file mode 100644 index 000000000000..2479cdf102bc --- /dev/null +++ b/java-maps-geocode/google-maps-geocode/src/main/resources/META-INF/native-image/com.google.maps.geocode.v4/reflect-config.json @@ -0,0 +1,1829 @@ +[ + { + "name": "com.google.api.BatchingConfigProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingConfigProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingSettingsProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingSettingsProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "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.FlowControlLimitExceededBehaviorProto", + "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.api.SelectiveGapicGeneration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.SelectiveGapicGeneration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.geo.type.Viewport", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.geo.type.Viewport$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.Destination", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.Destination$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.Entrance", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.Entrance$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.Entrance$Tag", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.GeocodeAddressRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.GeocodeAddressRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.GeocodeAddressRequest$LocationBias", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.GeocodeAddressRequest$LocationBias$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.GeocodeAddressResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.GeocodeAddressResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.GeocodeLocationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.GeocodeLocationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.GeocodeLocationResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.GeocodeLocationResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.GeocodePlaceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.GeocodePlaceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.GeocodeResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.GeocodeResult$AddressComponent", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.GeocodeResult$AddressComponent$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.GeocodeResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.GeocodeResult$Granularity", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.Landmark", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.Landmark$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.Landmark$Tag", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.NavigationPoint", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.NavigationPoint$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.NavigationPoint$TravelMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.NavigationPoint$Usage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.PlaceView", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.PlaceView$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.PlaceView$StructureType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.PlusCode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.PlusCode$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.SearchDestinationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.SearchDestinationsRequest$AddressQuery", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.SearchDestinationsRequest$AddressQuery$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.SearchDestinationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.SearchDestinationsRequest$LocationQuery", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.SearchDestinationsRequest$LocationQuery$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.SearchDestinationsRequest$LocationQuery$PlaceFilter", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.SearchDestinationsRequest$LocationQuery$PlaceFilter$Addressability", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.SearchDestinationsRequest$LocationQuery$PlaceFilter$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.SearchDestinationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.geocode.v4.SearchDestinationsResponse$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$EnforceNamingStyle", + "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$FeatureSet$VisibilityFeature", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$DefaultSymbolVisibility", + "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$FeatureSupport", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport$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$SymbolVisibility", + "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.protobuf.ListValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.ListValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.NullValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Struct", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Struct$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Value", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Value$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 + }, + { + "name": "com.google.type.LocalizedText", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.LocalizedText$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.PostalAddress", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.PostalAddress$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + } +] \ No newline at end of file diff --git a/java-maps-geocode/google-maps-geocode/src/test/java/com/google/maps/geocode/v4/DestinationServiceClientHttpJsonTest.java b/java-maps-geocode/google-maps-geocode/src/test/java/com/google/maps/geocode/v4/DestinationServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..721dd80e498c --- /dev/null +++ b/java-maps-geocode/google-maps-geocode/src/test/java/com/google/maps/geocode/v4/DestinationServiceClientHttpJsonTest.java @@ -0,0 +1,128 @@ +/* + * Copyright 2026 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.geocode.v4; + +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.geocode.v4.stub.HttpJsonDestinationServiceStub; +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 DestinationServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static DestinationServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonDestinationServiceStub.getMethodDescriptors(), + DestinationServiceSettings.getDefaultEndpoint()); + DestinationServiceSettings settings = + DestinationServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + DestinationServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DestinationServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void searchDestinationsTest() throws Exception { + SearchDestinationsResponse expectedResponse = + SearchDestinationsResponse.newBuilder() + .addAllDestinations(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + SearchDestinationsRequest request = + SearchDestinationsRequest.newBuilder() + .addAllTravelModes(new ArrayList()) + .setLanguageCode("languageCode-2092349083") + .setRegionCode("regionCode-1991004415") + .build(); + + SearchDestinationsResponse actualResponse = client.searchDestinations(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 searchDestinationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SearchDestinationsRequest request = + SearchDestinationsRequest.newBuilder() + .addAllTravelModes(new ArrayList()) + .setLanguageCode("languageCode-2092349083") + .setRegionCode("regionCode-1991004415") + .build(); + client.searchDestinations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-maps-geocode/google-maps-geocode/src/test/java/com/google/maps/geocode/v4/DestinationServiceClientTest.java b/java-maps-geocode/google-maps-geocode/src/test/java/com/google/maps/geocode/v4/DestinationServiceClientTest.java new file mode 100644 index 000000000000..83140e0ce154 --- /dev/null +++ b/java-maps-geocode/google-maps-geocode/src/test/java/com/google/maps/geocode/v4/DestinationServiceClientTest.java @@ -0,0 +1,131 @@ +/* + * Copyright 2026 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.geocode.v4; + +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 DestinationServiceClientTest { + private static MockDestinationService mockDestinationService; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private DestinationServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockDestinationService = new MockDestinationService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockDestinationService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + DestinationServiceSettings settings = + DestinationServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DestinationServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void searchDestinationsTest() throws Exception { + SearchDestinationsResponse expectedResponse = + SearchDestinationsResponse.newBuilder() + .addAllDestinations(new ArrayList()) + .build(); + mockDestinationService.addResponse(expectedResponse); + + SearchDestinationsRequest request = + SearchDestinationsRequest.newBuilder() + .addAllTravelModes(new ArrayList()) + .setLanguageCode("languageCode-2092349083") + .setRegionCode("regionCode-1991004415") + .build(); + + SearchDestinationsResponse actualResponse = client.searchDestinations(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDestinationService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchDestinationsRequest actualRequest = ((SearchDestinationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getPlace(), actualRequest.getPlace()); + Assert.assertEquals(request.getAddressQuery(), actualRequest.getAddressQuery()); + Assert.assertEquals(request.getLocationQuery(), actualRequest.getLocationQuery()); + Assert.assertEquals(request.getTravelModesList(), actualRequest.getTravelModesList()); + Assert.assertEquals(request.getLanguageCode(), actualRequest.getLanguageCode()); + Assert.assertEquals(request.getRegionCode(), actualRequest.getRegionCode()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchDestinationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDestinationService.addException(exception); + + try { + SearchDestinationsRequest request = + SearchDestinationsRequest.newBuilder() + .addAllTravelModes(new ArrayList()) + .setLanguageCode("languageCode-2092349083") + .setRegionCode("regionCode-1991004415") + .build(); + client.searchDestinations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-maps-geocode/google-maps-geocode/src/test/java/com/google/maps/geocode/v4/GeocodeServiceClientHttpJsonTest.java b/java-maps-geocode/google-maps-geocode/src/test/java/com/google/maps/geocode/v4/GeocodeServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..945a5ac751a3 --- /dev/null +++ b/java-maps-geocode/google-maps-geocode/src/test/java/com/google/maps/geocode/v4/GeocodeServiceClientHttpJsonTest.java @@ -0,0 +1,251 @@ +/* + * Copyright 2026 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.geocode.v4; + +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.geo.type.Viewport; +import com.google.maps.geocode.v4.stub.HttpJsonGeocodeServiceStub; +import com.google.type.LatLng; +import com.google.type.LocalizedText; +import com.google.type.PostalAddress; +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 GeocodeServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static GeocodeServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonGeocodeServiceStub.getMethodDescriptors(), + GeocodeServiceSettings.getDefaultEndpoint()); + GeocodeServiceSettings settings = + GeocodeServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + GeocodeServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = GeocodeServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void geocodeAddressTest() throws Exception { + GeocodeAddressResponse expectedResponse = + GeocodeAddressResponse.newBuilder().addAllResults(new ArrayList()).build(); + mockService.addResponse(expectedResponse); + + GeocodeAddressRequest request = + GeocodeAddressRequest.newBuilder() + .setLocationBias(GeocodeAddressRequest.LocationBias.newBuilder().build()) + .setLanguageCode("languageCode-2092349083") + .setRegionCode("regionCode-1991004415") + .build(); + + GeocodeAddressResponse actualResponse = client.geocodeAddress(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 geocodeAddressExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GeocodeAddressRequest request = + GeocodeAddressRequest.newBuilder() + .setLocationBias(GeocodeAddressRequest.LocationBias.newBuilder().build()) + .setLanguageCode("languageCode-2092349083") + .setRegionCode("regionCode-1991004415") + .build(); + client.geocodeAddress(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void geocodeLocationTest() throws Exception { + GeocodeLocationResponse expectedResponse = + GeocodeLocationResponse.newBuilder() + .addAllResults(new ArrayList()) + .setPlusCode(PlusCode.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + GeocodeLocationRequest request = + GeocodeLocationRequest.newBuilder() + .setLanguageCode("languageCode-2092349083") + .setRegionCode("regionCode-1991004415") + .addAllTypes(new ArrayList()) + .addAllGranularity(new ArrayList()) + .build(); + + GeocodeLocationResponse actualResponse = client.geocodeLocation(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 geocodeLocationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GeocodeLocationRequest request = + GeocodeLocationRequest.newBuilder() + .setLanguageCode("languageCode-2092349083") + .setRegionCode("regionCode-1991004415") + .addAllTypes(new ArrayList()) + .addAllGranularity(new ArrayList()) + .build(); + client.geocodeLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void geocodePlaceTest() throws Exception { + GeocodeResult expectedResponse = + GeocodeResult.newBuilder() + .setPlace("place106748167") + .setPlaceId("placeId-494224254") + .setLocation(LatLng.newBuilder().build()) + .setViewport(Viewport.newBuilder().build()) + .setBounds(Viewport.newBuilder().build()) + .setFormattedAddress("formattedAddress1036810136") + .setPostalAddress(PostalAddress.newBuilder().build()) + .addAllAddressComponents(new ArrayList()) + .addAllPostalCodeLocalities(new ArrayList()) + .addAllTypes(new ArrayList()) + .setPlusCode(PlusCode.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + GeocodePlaceRequest request = + GeocodePlaceRequest.newBuilder() + .setPlace("places/place-4590") + .setLanguageCode("languageCode-2092349083") + .setRegionCode("regionCode-1991004415") + .build(); + + GeocodeResult actualResponse = client.geocodePlace(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 geocodePlaceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GeocodePlaceRequest request = + GeocodePlaceRequest.newBuilder() + .setPlace("places/place-4590") + .setLanguageCode("languageCode-2092349083") + .setRegionCode("regionCode-1991004415") + .build(); + client.geocodePlace(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-maps-geocode/google-maps-geocode/src/test/java/com/google/maps/geocode/v4/GeocodeServiceClientTest.java b/java-maps-geocode/google-maps-geocode/src/test/java/com/google/maps/geocode/v4/GeocodeServiceClientTest.java new file mode 100644 index 000000000000..7bf4a064a881 --- /dev/null +++ b/java-maps-geocode/google-maps-geocode/src/test/java/com/google/maps/geocode/v4/GeocodeServiceClientTest.java @@ -0,0 +1,248 @@ +/* + * Copyright 2026 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.geocode.v4; + +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.geo.type.Viewport; +import com.google.protobuf.AbstractMessage; +import com.google.type.LatLng; +import com.google.type.LocalizedText; +import com.google.type.PostalAddress; +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 GeocodeServiceClientTest { + private static MockGeocodeService mockGeocodeService; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private GeocodeServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockGeocodeService = new MockGeocodeService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockGeocodeService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + GeocodeServiceSettings settings = + GeocodeServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = GeocodeServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void geocodeAddressTest() throws Exception { + GeocodeAddressResponse expectedResponse = + GeocodeAddressResponse.newBuilder().addAllResults(new ArrayList()).build(); + mockGeocodeService.addResponse(expectedResponse); + + GeocodeAddressRequest request = + GeocodeAddressRequest.newBuilder() + .setLocationBias(GeocodeAddressRequest.LocationBias.newBuilder().build()) + .setLanguageCode("languageCode-2092349083") + .setRegionCode("regionCode-1991004415") + .build(); + + GeocodeAddressResponse actualResponse = client.geocodeAddress(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGeocodeService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GeocodeAddressRequest actualRequest = ((GeocodeAddressRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getAddressQuery(), actualRequest.getAddressQuery()); + Assert.assertEquals(request.getAddress(), actualRequest.getAddress()); + Assert.assertEquals(request.getLocationBias(), actualRequest.getLocationBias()); + Assert.assertEquals(request.getLanguageCode(), actualRequest.getLanguageCode()); + Assert.assertEquals(request.getRegionCode(), actualRequest.getRegionCode()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void geocodeAddressExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGeocodeService.addException(exception); + + try { + GeocodeAddressRequest request = + GeocodeAddressRequest.newBuilder() + .setLocationBias(GeocodeAddressRequest.LocationBias.newBuilder().build()) + .setLanguageCode("languageCode-2092349083") + .setRegionCode("regionCode-1991004415") + .build(); + client.geocodeAddress(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void geocodeLocationTest() throws Exception { + GeocodeLocationResponse expectedResponse = + GeocodeLocationResponse.newBuilder() + .addAllResults(new ArrayList()) + .setPlusCode(PlusCode.newBuilder().build()) + .build(); + mockGeocodeService.addResponse(expectedResponse); + + GeocodeLocationRequest request = + GeocodeLocationRequest.newBuilder() + .setLanguageCode("languageCode-2092349083") + .setRegionCode("regionCode-1991004415") + .addAllTypes(new ArrayList()) + .addAllGranularity(new ArrayList()) + .build(); + + GeocodeLocationResponse actualResponse = client.geocodeLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGeocodeService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GeocodeLocationRequest actualRequest = ((GeocodeLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getLocationQuery(), actualRequest.getLocationQuery()); + Assert.assertEquals(request.getLocation(), actualRequest.getLocation()); + Assert.assertEquals(request.getLanguageCode(), actualRequest.getLanguageCode()); + Assert.assertEquals(request.getRegionCode(), actualRequest.getRegionCode()); + Assert.assertEquals(request.getTypesList(), actualRequest.getTypesList()); + Assert.assertEquals(request.getGranularityList(), actualRequest.getGranularityList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void geocodeLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGeocodeService.addException(exception); + + try { + GeocodeLocationRequest request = + GeocodeLocationRequest.newBuilder() + .setLanguageCode("languageCode-2092349083") + .setRegionCode("regionCode-1991004415") + .addAllTypes(new ArrayList()) + .addAllGranularity(new ArrayList()) + .build(); + client.geocodeLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void geocodePlaceTest() throws Exception { + GeocodeResult expectedResponse = + GeocodeResult.newBuilder() + .setPlace("place106748167") + .setPlaceId("placeId-494224254") + .setLocation(LatLng.newBuilder().build()) + .setViewport(Viewport.newBuilder().build()) + .setBounds(Viewport.newBuilder().build()) + .setFormattedAddress("formattedAddress1036810136") + .setPostalAddress(PostalAddress.newBuilder().build()) + .addAllAddressComponents(new ArrayList()) + .addAllPostalCodeLocalities(new ArrayList()) + .addAllTypes(new ArrayList()) + .setPlusCode(PlusCode.newBuilder().build()) + .build(); + mockGeocodeService.addResponse(expectedResponse); + + GeocodePlaceRequest request = + GeocodePlaceRequest.newBuilder() + .setPlace("place106748167") + .setLanguageCode("languageCode-2092349083") + .setRegionCode("regionCode-1991004415") + .build(); + + GeocodeResult actualResponse = client.geocodePlace(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGeocodeService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GeocodePlaceRequest actualRequest = ((GeocodePlaceRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getPlace(), actualRequest.getPlace()); + Assert.assertEquals(request.getLanguageCode(), actualRequest.getLanguageCode()); + Assert.assertEquals(request.getRegionCode(), actualRequest.getRegionCode()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void geocodePlaceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGeocodeService.addException(exception); + + try { + GeocodePlaceRequest request = + GeocodePlaceRequest.newBuilder() + .setPlace("place106748167") + .setLanguageCode("languageCode-2092349083") + .setRegionCode("regionCode-1991004415") + .build(); + client.geocodePlace(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-maps-geocode/google-maps-geocode/src/test/java/com/google/maps/geocode/v4/MockDestinationService.java b/java-maps-geocode/google-maps-geocode/src/test/java/com/google/maps/geocode/v4/MockDestinationService.java new file mode 100644 index 000000000000..a8495d09c5de --- /dev/null +++ b/java-maps-geocode/google-maps-geocode/src/test/java/com/google/maps/geocode/v4/MockDestinationService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 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.geocode.v4; + +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 MockDestinationService implements MockGrpcService { + private final MockDestinationServiceImpl serviceImpl; + + public MockDestinationService() { + serviceImpl = new MockDestinationServiceImpl(); + } + + @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-geocode/google-maps-geocode/src/test/java/com/google/maps/geocode/v4/MockDestinationServiceImpl.java b/java-maps-geocode/google-maps-geocode/src/test/java/com/google/maps/geocode/v4/MockDestinationServiceImpl.java new file mode 100644 index 000000000000..b4dd696eaaef --- /dev/null +++ b/java-maps-geocode/google-maps-geocode/src/test/java/com/google/maps/geocode/v4/MockDestinationServiceImpl.java @@ -0,0 +1,82 @@ +/* + * Copyright 2026 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.geocode.v4; + +import com.google.api.core.BetaApi; +import com.google.maps.geocode.v4.DestinationServiceGrpc.DestinationServiceImplBase; +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 MockDestinationServiceImpl extends DestinationServiceImplBase { + private List requests; + private Queue responses; + + public MockDestinationServiceImpl() { + 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 searchDestinations( + SearchDestinationsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SearchDestinationsResponse) { + requests.add(request); + responseObserver.onNext(((SearchDestinationsResponse) 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 SearchDestinations, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SearchDestinationsResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-maps-geocode/google-maps-geocode/src/test/java/com/google/maps/geocode/v4/MockGeocodeService.java b/java-maps-geocode/google-maps-geocode/src/test/java/com/google/maps/geocode/v4/MockGeocodeService.java new file mode 100644 index 000000000000..140e7e6d3192 --- /dev/null +++ b/java-maps-geocode/google-maps-geocode/src/test/java/com/google/maps/geocode/v4/MockGeocodeService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 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.geocode.v4; + +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 MockGeocodeService implements MockGrpcService { + private final MockGeocodeServiceImpl serviceImpl; + + public MockGeocodeService() { + serviceImpl = new MockGeocodeServiceImpl(); + } + + @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-geocode/google-maps-geocode/src/test/java/com/google/maps/geocode/v4/MockGeocodeServiceImpl.java b/java-maps-geocode/google-maps-geocode/src/test/java/com/google/maps/geocode/v4/MockGeocodeServiceImpl.java new file mode 100644 index 000000000000..f8968febcb55 --- /dev/null +++ b/java-maps-geocode/google-maps-geocode/src/test/java/com/google/maps/geocode/v4/MockGeocodeServiceImpl.java @@ -0,0 +1,123 @@ +/* + * Copyright 2026 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.geocode.v4; + +import com.google.api.core.BetaApi; +import com.google.maps.geocode.v4.GeocodeServiceGrpc.GeocodeServiceImplBase; +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 MockGeocodeServiceImpl extends GeocodeServiceImplBase { + private List requests; + private Queue responses; + + public MockGeocodeServiceImpl() { + 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 geocodeAddress( + GeocodeAddressRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof GeocodeAddressResponse) { + requests.add(request); + responseObserver.onNext(((GeocodeAddressResponse) 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 GeocodeAddress, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + GeocodeAddressResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void geocodeLocation( + GeocodeLocationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof GeocodeLocationResponse) { + requests.add(request); + responseObserver.onNext(((GeocodeLocationResponse) 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 GeocodeLocation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + GeocodeLocationResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void geocodePlace( + GeocodePlaceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof GeocodeResult) { + requests.add(request); + responseObserver.onNext(((GeocodeResult) 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 GeocodePlace, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + GeocodeResult.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-maps-geocode/grpc-google-maps-geocode-v4/pom.xml b/java-maps-geocode/grpc-google-maps-geocode-v4/pom.xml new file mode 100644 index 000000000000..fba5db429bdf --- /dev/null +++ b/java-maps-geocode/grpc-google-maps-geocode-v4/pom.xml @@ -0,0 +1,45 @@ + + 4.0.0 + com.google.maps.api.grpc + grpc-google-maps-geocode-v4 + 0.0.1-SNAPSHOT + grpc-google-maps-geocode-v4 + GRPC library for google-maps-geocode + + com.google.maps + google-maps-geocode-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-geocode-v4 + + + com.google.guava + guava + + + diff --git a/java-maps-geocode/grpc-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/DestinationServiceGrpc.java b/java-maps-geocode/grpc-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/DestinationServiceGrpc.java new file mode 100644 index 000000000000..c64ac5a4a85f --- /dev/null +++ b/java-maps-geocode/grpc-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/DestinationServiceGrpc.java @@ -0,0 +1,460 @@ +/* + * Copyright 2026 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.geocode.v4; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * A service for retrieving destinations.
+ * A destination provides hierarchical context about a place, which
+ * allows you to, for example, find apartment buildings within a larger
+ * apartment complex and vice versa. It also provides navigation points suitable
+ * for use cases such as ridesharing or delivery.
+ * 
+ */ +@io.grpc.stub.annotations.GrpcGenerated +public final class DestinationServiceGrpc { + + private DestinationServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = "google.maps.geocode.v4.DestinationService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.maps.geocode.v4.SearchDestinationsRequest, + com.google.maps.geocode.v4.SearchDestinationsResponse> + getSearchDestinationsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SearchDestinations", + requestType = com.google.maps.geocode.v4.SearchDestinationsRequest.class, + responseType = com.google.maps.geocode.v4.SearchDestinationsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.maps.geocode.v4.SearchDestinationsRequest, + com.google.maps.geocode.v4.SearchDestinationsResponse> + getSearchDestinationsMethod() { + io.grpc.MethodDescriptor< + com.google.maps.geocode.v4.SearchDestinationsRequest, + com.google.maps.geocode.v4.SearchDestinationsResponse> + getSearchDestinationsMethod; + if ((getSearchDestinationsMethod = DestinationServiceGrpc.getSearchDestinationsMethod) + == null) { + synchronized (DestinationServiceGrpc.class) { + if ((getSearchDestinationsMethod = DestinationServiceGrpc.getSearchDestinationsMethod) + == null) { + DestinationServiceGrpc.getSearchDestinationsMethod = + getSearchDestinationsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SearchDestinations")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.maps.geocode.v4.SearchDestinationsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.maps.geocode.v4.SearchDestinationsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DestinationServiceMethodDescriptorSupplier("SearchDestinations")) + .build(); + } + } + } + return getSearchDestinationsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static DestinationServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DestinationServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DestinationServiceStub(channel, callOptions); + } + }; + return DestinationServiceStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static DestinationServiceBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DestinationServiceBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DestinationServiceBlockingV2Stub(channel, callOptions); + } + }; + return DestinationServiceBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static DestinationServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DestinationServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DestinationServiceBlockingStub(channel, callOptions); + } + }; + return DestinationServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static DestinationServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DestinationServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DestinationServiceFutureStub(channel, callOptions); + } + }; + return DestinationServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * A service for retrieving destinations.
+   * A destination provides hierarchical context about a place, which
+   * allows you to, for example, find apartment buildings within a larger
+   * apartment complex and vice versa. It also provides navigation points suitable
+   * for use cases such as ridesharing or delivery.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * This method performs a destination lookup and returns a list of
+     * destinations.
+     * 
+ */ + default void searchDestinations( + com.google.maps.geocode.v4.SearchDestinationsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSearchDestinationsMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service DestinationService. + * + *
+   * A service for retrieving destinations.
+   * A destination provides hierarchical context about a place, which
+   * allows you to, for example, find apartment buildings within a larger
+   * apartment complex and vice versa. It also provides navigation points suitable
+   * for use cases such as ridesharing or delivery.
+   * 
+ */ + public abstract static class DestinationServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return DestinationServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service DestinationService. + * + *
+   * A service for retrieving destinations.
+   * A destination provides hierarchical context about a place, which
+   * allows you to, for example, find apartment buildings within a larger
+   * apartment complex and vice versa. It also provides navigation points suitable
+   * for use cases such as ridesharing or delivery.
+   * 
+ */ + public static final class DestinationServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private DestinationServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DestinationServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DestinationServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * This method performs a destination lookup and returns a list of
+     * destinations.
+     * 
+ */ + public void searchDestinations( + com.google.maps.geocode.v4.SearchDestinationsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSearchDestinationsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service DestinationService. + * + *
+   * A service for retrieving destinations.
+   * A destination provides hierarchical context about a place, which
+   * allows you to, for example, find apartment buildings within a larger
+   * apartment complex and vice versa. It also provides navigation points suitable
+   * for use cases such as ridesharing or delivery.
+   * 
+ */ + public static final class DestinationServiceBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private DestinationServiceBlockingV2Stub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DestinationServiceBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DestinationServiceBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * This method performs a destination lookup and returns a list of
+     * destinations.
+     * 
+ */ + public com.google.maps.geocode.v4.SearchDestinationsResponse searchDestinations( + com.google.maps.geocode.v4.SearchDestinationsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getSearchDestinationsMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service DestinationService. + * + *
+   * A service for retrieving destinations.
+   * A destination provides hierarchical context about a place, which
+   * allows you to, for example, find apartment buildings within a larger
+   * apartment complex and vice versa. It also provides navigation points suitable
+   * for use cases such as ridesharing or delivery.
+   * 
+ */ + public static final class DestinationServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private DestinationServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DestinationServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DestinationServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * This method performs a destination lookup and returns a list of
+     * destinations.
+     * 
+ */ + public com.google.maps.geocode.v4.SearchDestinationsResponse searchDestinations( + com.google.maps.geocode.v4.SearchDestinationsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSearchDestinationsMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service DestinationService. + * + *
+   * A service for retrieving destinations.
+   * A destination provides hierarchical context about a place, which
+   * allows you to, for example, find apartment buildings within a larger
+   * apartment complex and vice versa. It also provides navigation points suitable
+   * for use cases such as ridesharing or delivery.
+   * 
+ */ + public static final class DestinationServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private DestinationServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DestinationServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DestinationServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * This method performs a destination lookup and returns a list of
+     * destinations.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.maps.geocode.v4.SearchDestinationsResponse> + searchDestinations(com.google.maps.geocode.v4.SearchDestinationsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSearchDestinationsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_SEARCH_DESTINATIONS = 0; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_SEARCH_DESTINATIONS: + serviceImpl.searchDestinations( + (com.google.maps.geocode.v4.SearchDestinationsRequest) 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( + getSearchDestinationsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.maps.geocode.v4.SearchDestinationsRequest, + com.google.maps.geocode.v4.SearchDestinationsResponse>( + service, METHODID_SEARCH_DESTINATIONS))) + .build(); + } + + private abstract static class DestinationServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + DestinationServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.maps.geocode.v4.DestinationServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("DestinationService"); + } + } + + private static final class DestinationServiceFileDescriptorSupplier + extends DestinationServiceBaseDescriptorSupplier { + DestinationServiceFileDescriptorSupplier() {} + } + + private static final class DestinationServiceMethodDescriptorSupplier + extends DestinationServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + DestinationServiceMethodDescriptorSupplier(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 (DestinationServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new DestinationServiceFileDescriptorSupplier()) + .addMethod(getSearchDestinationsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-maps-geocode/grpc-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodeServiceGrpc.java b/java-maps-geocode/grpc-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodeServiceGrpc.java new file mode 100644 index 000000000000..e39d0f6b31eb --- /dev/null +++ b/java-maps-geocode/grpc-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodeServiceGrpc.java @@ -0,0 +1,692 @@ +/* + * Copyright 2026 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.geocode.v4; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * A service for performing geocoding.
+ * 
+ */ +@io.grpc.stub.annotations.GrpcGenerated +public final class GeocodeServiceGrpc { + + private GeocodeServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = "google.maps.geocode.v4.GeocodeService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.maps.geocode.v4.GeocodeAddressRequest, + com.google.maps.geocode.v4.GeocodeAddressResponse> + getGeocodeAddressMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GeocodeAddress", + requestType = com.google.maps.geocode.v4.GeocodeAddressRequest.class, + responseType = com.google.maps.geocode.v4.GeocodeAddressResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.maps.geocode.v4.GeocodeAddressRequest, + com.google.maps.geocode.v4.GeocodeAddressResponse> + getGeocodeAddressMethod() { + io.grpc.MethodDescriptor< + com.google.maps.geocode.v4.GeocodeAddressRequest, + com.google.maps.geocode.v4.GeocodeAddressResponse> + getGeocodeAddressMethod; + if ((getGeocodeAddressMethod = GeocodeServiceGrpc.getGeocodeAddressMethod) == null) { + synchronized (GeocodeServiceGrpc.class) { + if ((getGeocodeAddressMethod = GeocodeServiceGrpc.getGeocodeAddressMethod) == null) { + GeocodeServiceGrpc.getGeocodeAddressMethod = + getGeocodeAddressMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GeocodeAddress")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.maps.geocode.v4.GeocodeAddressRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.maps.geocode.v4.GeocodeAddressResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new GeocodeServiceMethodDescriptorSupplier("GeocodeAddress")) + .build(); + } + } + } + return getGeocodeAddressMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.maps.geocode.v4.GeocodeLocationRequest, + com.google.maps.geocode.v4.GeocodeLocationResponse> + getGeocodeLocationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GeocodeLocation", + requestType = com.google.maps.geocode.v4.GeocodeLocationRequest.class, + responseType = com.google.maps.geocode.v4.GeocodeLocationResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.maps.geocode.v4.GeocodeLocationRequest, + com.google.maps.geocode.v4.GeocodeLocationResponse> + getGeocodeLocationMethod() { + io.grpc.MethodDescriptor< + com.google.maps.geocode.v4.GeocodeLocationRequest, + com.google.maps.geocode.v4.GeocodeLocationResponse> + getGeocodeLocationMethod; + if ((getGeocodeLocationMethod = GeocodeServiceGrpc.getGeocodeLocationMethod) == null) { + synchronized (GeocodeServiceGrpc.class) { + if ((getGeocodeLocationMethod = GeocodeServiceGrpc.getGeocodeLocationMethod) == null) { + GeocodeServiceGrpc.getGeocodeLocationMethod = + getGeocodeLocationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GeocodeLocation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.maps.geocode.v4.GeocodeLocationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.maps.geocode.v4.GeocodeLocationResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new GeocodeServiceMethodDescriptorSupplier("GeocodeLocation")) + .build(); + } + } + } + return getGeocodeLocationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.maps.geocode.v4.GeocodePlaceRequest, com.google.maps.geocode.v4.GeocodeResult> + getGeocodePlaceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GeocodePlace", + requestType = com.google.maps.geocode.v4.GeocodePlaceRequest.class, + responseType = com.google.maps.geocode.v4.GeocodeResult.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.maps.geocode.v4.GeocodePlaceRequest, com.google.maps.geocode.v4.GeocodeResult> + getGeocodePlaceMethod() { + io.grpc.MethodDescriptor< + com.google.maps.geocode.v4.GeocodePlaceRequest, + com.google.maps.geocode.v4.GeocodeResult> + getGeocodePlaceMethod; + if ((getGeocodePlaceMethod = GeocodeServiceGrpc.getGeocodePlaceMethod) == null) { + synchronized (GeocodeServiceGrpc.class) { + if ((getGeocodePlaceMethod = GeocodeServiceGrpc.getGeocodePlaceMethod) == null) { + GeocodeServiceGrpc.getGeocodePlaceMethod = + getGeocodePlaceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GeocodePlace")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.maps.geocode.v4.GeocodePlaceRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.maps.geocode.v4.GeocodeResult.getDefaultInstance())) + .setSchemaDescriptor( + new GeocodeServiceMethodDescriptorSupplier("GeocodePlace")) + .build(); + } + } + } + return getGeocodePlaceMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static GeocodeServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public GeocodeServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GeocodeServiceStub(channel, callOptions); + } + }; + return GeocodeServiceStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static GeocodeServiceBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public GeocodeServiceBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GeocodeServiceBlockingV2Stub(channel, callOptions); + } + }; + return GeocodeServiceBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static GeocodeServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public GeocodeServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GeocodeServiceBlockingStub(channel, callOptions); + } + }; + return GeocodeServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static GeocodeServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public GeocodeServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GeocodeServiceFutureStub(channel, callOptions); + } + }; + return GeocodeServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * A service for performing geocoding.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * This method performs an address geocode, which maps an address to a
+     * LatLng. It also provides structured information about the address.
+     * 
+ */ + default void geocodeAddress( + com.google.maps.geocode.v4.GeocodeAddressRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGeocodeAddressMethod(), responseObserver); + } + + /** + * + * + *
+     * This method performs a location geocode, which maps a LatLng to an
+     * address. It also provides structured information about the address.
+     * 
+ */ + default void geocodeLocation( + com.google.maps.geocode.v4.GeocodeLocationRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGeocodeLocationMethod(), responseObserver); + } + + /** + * + * + *
+     * This method performs a geocode lookup using a place ID.
+     * 
+ */ + default void geocodePlace( + com.google.maps.geocode.v4.GeocodePlaceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGeocodePlaceMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service GeocodeService. + * + *
+   * A service for performing geocoding.
+   * 
+ */ + public abstract static class GeocodeServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return GeocodeServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service GeocodeService. + * + *
+   * A service for performing geocoding.
+   * 
+ */ + public static final class GeocodeServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private GeocodeServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected GeocodeServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GeocodeServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * This method performs an address geocode, which maps an address to a
+     * LatLng. It also provides structured information about the address.
+     * 
+ */ + public void geocodeAddress( + com.google.maps.geocode.v4.GeocodeAddressRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGeocodeAddressMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * This method performs a location geocode, which maps a LatLng to an
+     * address. It also provides structured information about the address.
+     * 
+ */ + public void geocodeLocation( + com.google.maps.geocode.v4.GeocodeLocationRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGeocodeLocationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * This method performs a geocode lookup using a place ID.
+     * 
+ */ + public void geocodePlace( + com.google.maps.geocode.v4.GeocodePlaceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGeocodePlaceMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service GeocodeService. + * + *
+   * A service for performing geocoding.
+   * 
+ */ + public static final class GeocodeServiceBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private GeocodeServiceBlockingV2Stub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected GeocodeServiceBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GeocodeServiceBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * This method performs an address geocode, which maps an address to a
+     * LatLng. It also provides structured information about the address.
+     * 
+ */ + public com.google.maps.geocode.v4.GeocodeAddressResponse geocodeAddress( + com.google.maps.geocode.v4.GeocodeAddressRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGeocodeAddressMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * This method performs a location geocode, which maps a LatLng to an
+     * address. It also provides structured information about the address.
+     * 
+ */ + public com.google.maps.geocode.v4.GeocodeLocationResponse geocodeLocation( + com.google.maps.geocode.v4.GeocodeLocationRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGeocodeLocationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * This method performs a geocode lookup using a place ID.
+     * 
+ */ + public com.google.maps.geocode.v4.GeocodeResult geocodePlace( + com.google.maps.geocode.v4.GeocodePlaceRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGeocodePlaceMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service GeocodeService. + * + *
+   * A service for performing geocoding.
+   * 
+ */ + public static final class GeocodeServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private GeocodeServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected GeocodeServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GeocodeServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * This method performs an address geocode, which maps an address to a
+     * LatLng. It also provides structured information about the address.
+     * 
+ */ + public com.google.maps.geocode.v4.GeocodeAddressResponse geocodeAddress( + com.google.maps.geocode.v4.GeocodeAddressRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGeocodeAddressMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * This method performs a location geocode, which maps a LatLng to an
+     * address. It also provides structured information about the address.
+     * 
+ */ + public com.google.maps.geocode.v4.GeocodeLocationResponse geocodeLocation( + com.google.maps.geocode.v4.GeocodeLocationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGeocodeLocationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * This method performs a geocode lookup using a place ID.
+     * 
+ */ + public com.google.maps.geocode.v4.GeocodeResult geocodePlace( + com.google.maps.geocode.v4.GeocodePlaceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGeocodePlaceMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service GeocodeService. + * + *
+   * A service for performing geocoding.
+   * 
+ */ + public static final class GeocodeServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private GeocodeServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected GeocodeServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GeocodeServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * This method performs an address geocode, which maps an address to a
+     * LatLng. It also provides structured information about the address.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.maps.geocode.v4.GeocodeAddressResponse> + geocodeAddress(com.google.maps.geocode.v4.GeocodeAddressRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGeocodeAddressMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * This method performs a location geocode, which maps a LatLng to an
+     * address. It also provides structured information about the address.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.maps.geocode.v4.GeocodeLocationResponse> + geocodeLocation(com.google.maps.geocode.v4.GeocodeLocationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGeocodeLocationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * This method performs a geocode lookup using a place ID.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.maps.geocode.v4.GeocodeResult> + geocodePlace(com.google.maps.geocode.v4.GeocodePlaceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGeocodePlaceMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_GEOCODE_ADDRESS = 0; + private static final int METHODID_GEOCODE_LOCATION = 1; + private static final int METHODID_GEOCODE_PLACE = 2; + + 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_GEOCODE_ADDRESS: + serviceImpl.geocodeAddress( + (com.google.maps.geocode.v4.GeocodeAddressRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GEOCODE_LOCATION: + serviceImpl.geocodeLocation( + (com.google.maps.geocode.v4.GeocodeLocationRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GEOCODE_PLACE: + serviceImpl.geocodePlace( + (com.google.maps.geocode.v4.GeocodePlaceRequest) 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( + getGeocodeAddressMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.maps.geocode.v4.GeocodeAddressRequest, + com.google.maps.geocode.v4.GeocodeAddressResponse>( + service, METHODID_GEOCODE_ADDRESS))) + .addMethod( + getGeocodeLocationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.maps.geocode.v4.GeocodeLocationRequest, + com.google.maps.geocode.v4.GeocodeLocationResponse>( + service, METHODID_GEOCODE_LOCATION))) + .addMethod( + getGeocodePlaceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.maps.geocode.v4.GeocodePlaceRequest, + com.google.maps.geocode.v4.GeocodeResult>(service, METHODID_GEOCODE_PLACE))) + .build(); + } + + private abstract static class GeocodeServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + GeocodeServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.maps.geocode.v4.GeocodeServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("GeocodeService"); + } + } + + private static final class GeocodeServiceFileDescriptorSupplier + extends GeocodeServiceBaseDescriptorSupplier { + GeocodeServiceFileDescriptorSupplier() {} + } + + private static final class GeocodeServiceMethodDescriptorSupplier + extends GeocodeServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + GeocodeServiceMethodDescriptorSupplier(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 (GeocodeServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new GeocodeServiceFileDescriptorSupplier()) + .addMethod(getGeocodeAddressMethod()) + .addMethod(getGeocodeLocationMethod()) + .addMethod(getGeocodePlaceMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-maps-geocode/owlbot.py b/java-maps-geocode/owlbot.py new file mode 100644 index 000000000000..fbb37df70f1a --- /dev/null +++ b/java-maps-geocode/owlbot.py @@ -0,0 +1,37 @@ +# 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-geocode/pom.xml b/java-maps-geocode/pom.xml new file mode 100644 index 000000000000..5a49772dc2bf --- /dev/null +++ b/java-maps-geocode/pom.xml @@ -0,0 +1,55 @@ + + + 4.0.0 + com.google.maps + google-maps-geocode-parent + pom + 0.0.1-SNAPSHOT + Google Geocoding API Parent + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-jar-parent + 1.83.0-SNAPSHOT + ../google-cloud-jar-parent/pom.xml + + + + UTF-8 + UTF-8 + github + google-maps-geocode-parent + + + + + + com.google.maps + google-maps-geocode + 0.0.1-SNAPSHOT + + + com.google.maps.api.grpc + grpc-google-maps-geocode-v4 + 0.0.1-SNAPSHOT + + + com.google.maps.api.grpc + proto-google-maps-geocode-v4 + 0.0.1-SNAPSHOT + + + + + + + google-maps-geocode + grpc-google-maps-geocode-v4 + proto-google-maps-geocode-v4 + google-maps-geocode-bom + + + diff --git a/java-maps-geocode/proto-google-maps-geocode-v4/clirr-ignored-differences.xml b/java-maps-geocode/proto-google-maps-geocode-v4/clirr-ignored-differences.xml new file mode 100644 index 000000000000..31fb780ecc94 --- /dev/null +++ b/java-maps-geocode/proto-google-maps-geocode-v4/clirr-ignored-differences.xml @@ -0,0 +1,80 @@ + + + + + 7012 + com/google/maps/geocode/v4/*OrBuilder + * get*(*) + + + 7012 + com/google/maps/geocode/v4/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/maps/geocode/v4/*OrBuilder + boolean has*(*) + + + + 7006 + com/google/maps/geocode/v4/** + * getDefaultInstanceForType() + ** + + + 7006 + com/google/maps/geocode/v4/** + * addRepeatedField(*) + ** + + + 7006 + com/google/maps/geocode/v4/** + * clear() + ** + + + 7006 + com/google/maps/geocode/v4/** + * clearField(*) + ** + + + 7006 + com/google/maps/geocode/v4/** + * clearOneof(*) + ** + + + 7006 + com/google/maps/geocode/v4/** + * clone() + ** + + + 7006 + com/google/maps/geocode/v4/** + * mergeUnknownFields(*) + ** + + + 7006 + com/google/maps/geocode/v4/** + * setField(*) + ** + + + 7006 + com/google/maps/geocode/v4/** + * setRepeatedField(*) + ** + + + 7006 + com/google/maps/geocode/v4/** + * setUnknownFields(*) + ** + + diff --git a/java-maps-geocode/proto-google-maps-geocode-v4/pom.xml b/java-maps-geocode/proto-google-maps-geocode-v4/pom.xml new file mode 100644 index 000000000000..61d9fd6d52b1 --- /dev/null +++ b/java-maps-geocode/proto-google-maps-geocode-v4/pom.xml @@ -0,0 +1,37 @@ + + 4.0.0 + com.google.maps.api.grpc + proto-google-maps-geocode-v4 + 0.0.1-SNAPSHOT + proto-google-maps-geocode-v4 + Proto library for google-maps-geocode + + com.google.maps + google-maps-geocode-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-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/Destination.java b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/Destination.java new file mode 100644 index 000000000000..da8b4b6a4332 --- /dev/null +++ b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/Destination.java @@ -0,0 +1,3456 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/maps/geocode/v4/destination_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.geocode.v4; + +/** + * + * + *
+ * A destination. This includes the primary place, related places,
+ * entrances, and navigation points.
+ * 
+ * + * Protobuf type {@code google.maps.geocode.v4.Destination} + */ +@com.google.protobuf.Generated +public final class Destination extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.maps.geocode.v4.Destination) + DestinationOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Destination"); + } + + // Use Destination.newBuilder() to construct. + private Destination(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Destination() { + containingPlaces_ = java.util.Collections.emptyList(); + subDestinations_ = java.util.Collections.emptyList(); + landmarks_ = java.util.Collections.emptyList(); + entrances_ = java.util.Collections.emptyList(); + navigationPoints_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_Destination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_Destination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.Destination.class, + com.google.maps.geocode.v4.Destination.Builder.class); + } + + private int bitField0_; + public static final int PRIMARY_FIELD_NUMBER = 1; + private com.google.maps.geocode.v4.PlaceView primary_; + + /** + * + * + *
+   * The primary place identified by the `primary_query` in the request.
+   * 
+ * + * .google.maps.geocode.v4.PlaceView primary = 1; + * + * @return Whether the primary field is set. + */ + @java.lang.Override + public boolean hasPrimary() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * The primary place identified by the `primary_query` in the request.
+   * 
+ * + * .google.maps.geocode.v4.PlaceView primary = 1; + * + * @return The primary. + */ + @java.lang.Override + public com.google.maps.geocode.v4.PlaceView getPrimary() { + return primary_ == null ? com.google.maps.geocode.v4.PlaceView.getDefaultInstance() : primary_; + } + + /** + * + * + *
+   * The primary place identified by the `primary_query` in the request.
+   * 
+ * + * .google.maps.geocode.v4.PlaceView primary = 1; + */ + @java.lang.Override + public com.google.maps.geocode.v4.PlaceViewOrBuilder getPrimaryOrBuilder() { + return primary_ == null ? com.google.maps.geocode.v4.PlaceView.getDefaultInstance() : primary_; + } + + public static final int CONTAINING_PLACES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List containingPlaces_; + + /** + * + * + *
+   * The less precise places that the primary place is contained by.
+   * For example, the apartment complex that contains this building.
+   * 
+ * + * repeated .google.maps.geocode.v4.PlaceView containing_places = 2; + */ + @java.lang.Override + public java.util.List getContainingPlacesList() { + return containingPlaces_; + } + + /** + * + * + *
+   * The less precise places that the primary place is contained by.
+   * For example, the apartment complex that contains this building.
+   * 
+ * + * repeated .google.maps.geocode.v4.PlaceView containing_places = 2; + */ + @java.lang.Override + public java.util.List + getContainingPlacesOrBuilderList() { + return containingPlaces_; + } + + /** + * + * + *
+   * The less precise places that the primary place is contained by.
+   * For example, the apartment complex that contains this building.
+   * 
+ * + * repeated .google.maps.geocode.v4.PlaceView containing_places = 2; + */ + @java.lang.Override + public int getContainingPlacesCount() { + return containingPlaces_.size(); + } + + /** + * + * + *
+   * The less precise places that the primary place is contained by.
+   * For example, the apartment complex that contains this building.
+   * 
+ * + * repeated .google.maps.geocode.v4.PlaceView containing_places = 2; + */ + @java.lang.Override + public com.google.maps.geocode.v4.PlaceView getContainingPlaces(int index) { + return containingPlaces_.get(index); + } + + /** + * + * + *
+   * The less precise places that the primary place is contained by.
+   * For example, the apartment complex that contains this building.
+   * 
+ * + * repeated .google.maps.geocode.v4.PlaceView containing_places = 2; + */ + @java.lang.Override + public com.google.maps.geocode.v4.PlaceViewOrBuilder getContainingPlacesOrBuilder(int index) { + return containingPlaces_.get(index); + } + + public static final int SUB_DESTINATIONS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List subDestinations_; + + /** + * + * + *
+   * More precise sub-destinations of the primary place. For example, units
+   * contained in a building.
+   *
+   * Note: compared to the
+   * [SubDestination](/maps/documentation/places/web-service/reference/rest/v1/places#SubDestination)
+   * returned by the Places API, this list of sub-destinations is more
+   * exhaustive, and each sub-destination contains more information.
+   * 
+ * + * repeated .google.maps.geocode.v4.PlaceView sub_destinations = 3; + */ + @java.lang.Override + public java.util.List getSubDestinationsList() { + return subDestinations_; + } + + /** + * + * + *
+   * More precise sub-destinations of the primary place. For example, units
+   * contained in a building.
+   *
+   * Note: compared to the
+   * [SubDestination](/maps/documentation/places/web-service/reference/rest/v1/places#SubDestination)
+   * returned by the Places API, this list of sub-destinations is more
+   * exhaustive, and each sub-destination contains more information.
+   * 
+ * + * repeated .google.maps.geocode.v4.PlaceView sub_destinations = 3; + */ + @java.lang.Override + public java.util.List + getSubDestinationsOrBuilderList() { + return subDestinations_; + } + + /** + * + * + *
+   * More precise sub-destinations of the primary place. For example, units
+   * contained in a building.
+   *
+   * Note: compared to the
+   * [SubDestination](/maps/documentation/places/web-service/reference/rest/v1/places#SubDestination)
+   * returned by the Places API, this list of sub-destinations is more
+   * exhaustive, and each sub-destination contains more information.
+   * 
+ * + * repeated .google.maps.geocode.v4.PlaceView sub_destinations = 3; + */ + @java.lang.Override + public int getSubDestinationsCount() { + return subDestinations_.size(); + } + + /** + * + * + *
+   * More precise sub-destinations of the primary place. For example, units
+   * contained in a building.
+   *
+   * Note: compared to the
+   * [SubDestination](/maps/documentation/places/web-service/reference/rest/v1/places#SubDestination)
+   * returned by the Places API, this list of sub-destinations is more
+   * exhaustive, and each sub-destination contains more information.
+   * 
+ * + * repeated .google.maps.geocode.v4.PlaceView sub_destinations = 3; + */ + @java.lang.Override + public com.google.maps.geocode.v4.PlaceView getSubDestinations(int index) { + return subDestinations_.get(index); + } + + /** + * + * + *
+   * More precise sub-destinations of the primary place. For example, units
+   * contained in a building.
+   *
+   * Note: compared to the
+   * [SubDestination](/maps/documentation/places/web-service/reference/rest/v1/places#SubDestination)
+   * returned by the Places API, this list of sub-destinations is more
+   * exhaustive, and each sub-destination contains more information.
+   * 
+ * + * repeated .google.maps.geocode.v4.PlaceView sub_destinations = 3; + */ + @java.lang.Override + public com.google.maps.geocode.v4.PlaceViewOrBuilder getSubDestinationsOrBuilder(int index) { + return subDestinations_.get(index); + } + + public static final int LANDMARKS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List landmarks_; + + /** + * + * + *
+   * Landmarks that can be used to communicate where the destination is
+   * or help with arrival.
+   * 
+ * + * repeated .google.maps.geocode.v4.Landmark landmarks = 4; + */ + @java.lang.Override + public java.util.List getLandmarksList() { + return landmarks_; + } + + /** + * + * + *
+   * Landmarks that can be used to communicate where the destination is
+   * or help with arrival.
+   * 
+ * + * repeated .google.maps.geocode.v4.Landmark landmarks = 4; + */ + @java.lang.Override + public java.util.List + getLandmarksOrBuilderList() { + return landmarks_; + } + + /** + * + * + *
+   * Landmarks that can be used to communicate where the destination is
+   * or help with arrival.
+   * 
+ * + * repeated .google.maps.geocode.v4.Landmark landmarks = 4; + */ + @java.lang.Override + public int getLandmarksCount() { + return landmarks_.size(); + } + + /** + * + * + *
+   * Landmarks that can be used to communicate where the destination is
+   * or help with arrival.
+   * 
+ * + * repeated .google.maps.geocode.v4.Landmark landmarks = 4; + */ + @java.lang.Override + public com.google.maps.geocode.v4.Landmark getLandmarks(int index) { + return landmarks_.get(index); + } + + /** + * + * + *
+   * Landmarks that can be used to communicate where the destination is
+   * or help with arrival.
+   * 
+ * + * repeated .google.maps.geocode.v4.Landmark landmarks = 4; + */ + @java.lang.Override + public com.google.maps.geocode.v4.LandmarkOrBuilder getLandmarksOrBuilder(int index) { + return landmarks_.get(index); + } + + public static final int ENTRANCES_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List entrances_; + + /** + * + * + *
+   * Entrances for this destination.
+   * 
+ * + * repeated .google.maps.geocode.v4.Entrance entrances = 5; + */ + @java.lang.Override + public java.util.List getEntrancesList() { + return entrances_; + } + + /** + * + * + *
+   * Entrances for this destination.
+   * 
+ * + * repeated .google.maps.geocode.v4.Entrance entrances = 5; + */ + @java.lang.Override + public java.util.List + getEntrancesOrBuilderList() { + return entrances_; + } + + /** + * + * + *
+   * Entrances for this destination.
+   * 
+ * + * repeated .google.maps.geocode.v4.Entrance entrances = 5; + */ + @java.lang.Override + public int getEntrancesCount() { + return entrances_.size(); + } + + /** + * + * + *
+   * Entrances for this destination.
+   * 
+ * + * repeated .google.maps.geocode.v4.Entrance entrances = 5; + */ + @java.lang.Override + public com.google.maps.geocode.v4.Entrance getEntrances(int index) { + return entrances_.get(index); + } + + /** + * + * + *
+   * Entrances for this destination.
+   * 
+ * + * repeated .google.maps.geocode.v4.Entrance entrances = 5; + */ + @java.lang.Override + public com.google.maps.geocode.v4.EntranceOrBuilder getEntrancesOrBuilder(int index) { + return entrances_.get(index); + } + + public static final int NAVIGATION_POINTS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private java.util.List navigationPoints_; + + /** + * + * + *
+   * Navigation points for this destination.
+   * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint navigation_points = 6; + */ + @java.lang.Override + public java.util.List getNavigationPointsList() { + return navigationPoints_; + } + + /** + * + * + *
+   * Navigation points for this destination.
+   * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint navigation_points = 6; + */ + @java.lang.Override + public java.util.List + getNavigationPointsOrBuilderList() { + return navigationPoints_; + } + + /** + * + * + *
+   * Navigation points for this destination.
+   * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint navigation_points = 6; + */ + @java.lang.Override + public int getNavigationPointsCount() { + return navigationPoints_.size(); + } + + /** + * + * + *
+   * Navigation points for this destination.
+   * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint navigation_points = 6; + */ + @java.lang.Override + public com.google.maps.geocode.v4.NavigationPoint getNavigationPoints(int index) { + return navigationPoints_.get(index); + } + + /** + * + * + *
+   * Navigation points for this destination.
+   * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint navigation_points = 6; + */ + @java.lang.Override + public com.google.maps.geocode.v4.NavigationPointOrBuilder getNavigationPointsOrBuilder( + int index) { + return navigationPoints_.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.writeMessage(1, getPrimary()); + } + for (int i = 0; i < containingPlaces_.size(); i++) { + output.writeMessage(2, containingPlaces_.get(i)); + } + for (int i = 0; i < subDestinations_.size(); i++) { + output.writeMessage(3, subDestinations_.get(i)); + } + for (int i = 0; i < landmarks_.size(); i++) { + output.writeMessage(4, landmarks_.get(i)); + } + for (int i = 0; i < entrances_.size(); i++) { + output.writeMessage(5, entrances_.get(i)); + } + for (int i = 0; i < navigationPoints_.size(); i++) { + output.writeMessage(6, navigationPoints_.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.computeMessageSize(1, getPrimary()); + } + for (int i = 0; i < containingPlaces_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, containingPlaces_.get(i)); + } + for (int i = 0; i < subDestinations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, subDestinations_.get(i)); + } + for (int i = 0; i < landmarks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, landmarks_.get(i)); + } + for (int i = 0; i < entrances_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, entrances_.get(i)); + } + for (int i = 0; i < navigationPoints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, navigationPoints_.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.geocode.v4.Destination)) { + return super.equals(obj); + } + com.google.maps.geocode.v4.Destination other = (com.google.maps.geocode.v4.Destination) obj; + + if (hasPrimary() != other.hasPrimary()) return false; + if (hasPrimary()) { + if (!getPrimary().equals(other.getPrimary())) return false; + } + if (!getContainingPlacesList().equals(other.getContainingPlacesList())) return false; + if (!getSubDestinationsList().equals(other.getSubDestinationsList())) return false; + if (!getLandmarksList().equals(other.getLandmarksList())) return false; + if (!getEntrancesList().equals(other.getEntrancesList())) return false; + if (!getNavigationPointsList().equals(other.getNavigationPointsList())) 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 (hasPrimary()) { + hash = (37 * hash) + PRIMARY_FIELD_NUMBER; + hash = (53 * hash) + getPrimary().hashCode(); + } + if (getContainingPlacesCount() > 0) { + hash = (37 * hash) + CONTAINING_PLACES_FIELD_NUMBER; + hash = (53 * hash) + getContainingPlacesList().hashCode(); + } + if (getSubDestinationsCount() > 0) { + hash = (37 * hash) + SUB_DESTINATIONS_FIELD_NUMBER; + hash = (53 * hash) + getSubDestinationsList().hashCode(); + } + if (getLandmarksCount() > 0) { + hash = (37 * hash) + LANDMARKS_FIELD_NUMBER; + hash = (53 * hash) + getLandmarksList().hashCode(); + } + if (getEntrancesCount() > 0) { + hash = (37 * hash) + ENTRANCES_FIELD_NUMBER; + hash = (53 * hash) + getEntrancesList().hashCode(); + } + if (getNavigationPointsCount() > 0) { + hash = (37 * hash) + NAVIGATION_POINTS_FIELD_NUMBER; + hash = (53 * hash) + getNavigationPointsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.geocode.v4.Destination parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.Destination 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.geocode.v4.Destination parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.Destination 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.geocode.v4.Destination parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.Destination parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.geocode.v4.Destination parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.Destination parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.Destination parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.Destination parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.Destination parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.Destination parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geocode.v4.Destination 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A destination. This includes the primary place, related places,
+   * entrances, and navigation points.
+   * 
+ * + * Protobuf type {@code google.maps.geocode.v4.Destination} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.geocode.v4.Destination) + com.google.maps.geocode.v4.DestinationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_Destination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_Destination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.Destination.class, + com.google.maps.geocode.v4.Destination.Builder.class); + } + + // Construct using com.google.maps.geocode.v4.Destination.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPrimaryFieldBuilder(); + internalGetContainingPlacesFieldBuilder(); + internalGetSubDestinationsFieldBuilder(); + internalGetLandmarksFieldBuilder(); + internalGetEntrancesFieldBuilder(); + internalGetNavigationPointsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + primary_ = null; + if (primaryBuilder_ != null) { + primaryBuilder_.dispose(); + primaryBuilder_ = null; + } + if (containingPlacesBuilder_ == null) { + containingPlaces_ = java.util.Collections.emptyList(); + } else { + containingPlaces_ = null; + containingPlacesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (subDestinationsBuilder_ == null) { + subDestinations_ = java.util.Collections.emptyList(); + } else { + subDestinations_ = null; + subDestinationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + if (landmarksBuilder_ == null) { + landmarks_ = java.util.Collections.emptyList(); + } else { + landmarks_ = null; + landmarksBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + if (entrancesBuilder_ == null) { + entrances_ = java.util.Collections.emptyList(); + } else { + entrances_ = null; + entrancesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + if (navigationPointsBuilder_ == null) { + navigationPoints_ = java.util.Collections.emptyList(); + } else { + navigationPoints_ = null; + navigationPointsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_Destination_descriptor; + } + + @java.lang.Override + public com.google.maps.geocode.v4.Destination getDefaultInstanceForType() { + return com.google.maps.geocode.v4.Destination.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.geocode.v4.Destination build() { + com.google.maps.geocode.v4.Destination result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.geocode.v4.Destination buildPartial() { + com.google.maps.geocode.v4.Destination result = + new com.google.maps.geocode.v4.Destination(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.maps.geocode.v4.Destination result) { + if (containingPlacesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + containingPlaces_ = java.util.Collections.unmodifiableList(containingPlaces_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.containingPlaces_ = containingPlaces_; + } else { + result.containingPlaces_ = containingPlacesBuilder_.build(); + } + if (subDestinationsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + subDestinations_ = java.util.Collections.unmodifiableList(subDestinations_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.subDestinations_ = subDestinations_; + } else { + result.subDestinations_ = subDestinationsBuilder_.build(); + } + if (landmarksBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + landmarks_ = java.util.Collections.unmodifiableList(landmarks_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.landmarks_ = landmarks_; + } else { + result.landmarks_ = landmarksBuilder_.build(); + } + if (entrancesBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + entrances_ = java.util.Collections.unmodifiableList(entrances_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.entrances_ = entrances_; + } else { + result.entrances_ = entrancesBuilder_.build(); + } + if (navigationPointsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + navigationPoints_ = java.util.Collections.unmodifiableList(navigationPoints_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.navigationPoints_ = navigationPoints_; + } else { + result.navigationPoints_ = navigationPointsBuilder_.build(); + } + } + + private void buildPartial0(com.google.maps.geocode.v4.Destination result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.primary_ = primaryBuilder_ == null ? primary_ : primaryBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.geocode.v4.Destination) { + return mergeFrom((com.google.maps.geocode.v4.Destination) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.geocode.v4.Destination other) { + if (other == com.google.maps.geocode.v4.Destination.getDefaultInstance()) return this; + if (other.hasPrimary()) { + mergePrimary(other.getPrimary()); + } + if (containingPlacesBuilder_ == null) { + if (!other.containingPlaces_.isEmpty()) { + if (containingPlaces_.isEmpty()) { + containingPlaces_ = other.containingPlaces_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureContainingPlacesIsMutable(); + containingPlaces_.addAll(other.containingPlaces_); + } + onChanged(); + } + } else { + if (!other.containingPlaces_.isEmpty()) { + if (containingPlacesBuilder_.isEmpty()) { + containingPlacesBuilder_.dispose(); + containingPlacesBuilder_ = null; + containingPlaces_ = other.containingPlaces_; + bitField0_ = (bitField0_ & ~0x00000002); + containingPlacesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetContainingPlacesFieldBuilder() + : null; + } else { + containingPlacesBuilder_.addAllMessages(other.containingPlaces_); + } + } + } + if (subDestinationsBuilder_ == null) { + if (!other.subDestinations_.isEmpty()) { + if (subDestinations_.isEmpty()) { + subDestinations_ = other.subDestinations_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureSubDestinationsIsMutable(); + subDestinations_.addAll(other.subDestinations_); + } + onChanged(); + } + } else { + if (!other.subDestinations_.isEmpty()) { + if (subDestinationsBuilder_.isEmpty()) { + subDestinationsBuilder_.dispose(); + subDestinationsBuilder_ = null; + subDestinations_ = other.subDestinations_; + bitField0_ = (bitField0_ & ~0x00000004); + subDestinationsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSubDestinationsFieldBuilder() + : null; + } else { + subDestinationsBuilder_.addAllMessages(other.subDestinations_); + } + } + } + if (landmarksBuilder_ == null) { + if (!other.landmarks_.isEmpty()) { + if (landmarks_.isEmpty()) { + landmarks_ = other.landmarks_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureLandmarksIsMutable(); + landmarks_.addAll(other.landmarks_); + } + onChanged(); + } + } else { + if (!other.landmarks_.isEmpty()) { + if (landmarksBuilder_.isEmpty()) { + landmarksBuilder_.dispose(); + landmarksBuilder_ = null; + landmarks_ = other.landmarks_; + bitField0_ = (bitField0_ & ~0x00000008); + landmarksBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetLandmarksFieldBuilder() + : null; + } else { + landmarksBuilder_.addAllMessages(other.landmarks_); + } + } + } + if (entrancesBuilder_ == null) { + if (!other.entrances_.isEmpty()) { + if (entrances_.isEmpty()) { + entrances_ = other.entrances_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureEntrancesIsMutable(); + entrances_.addAll(other.entrances_); + } + onChanged(); + } + } else { + if (!other.entrances_.isEmpty()) { + if (entrancesBuilder_.isEmpty()) { + entrancesBuilder_.dispose(); + entrancesBuilder_ = null; + entrances_ = other.entrances_; + bitField0_ = (bitField0_ & ~0x00000010); + entrancesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetEntrancesFieldBuilder() + : null; + } else { + entrancesBuilder_.addAllMessages(other.entrances_); + } + } + } + if (navigationPointsBuilder_ == null) { + if (!other.navigationPoints_.isEmpty()) { + if (navigationPoints_.isEmpty()) { + navigationPoints_ = other.navigationPoints_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureNavigationPointsIsMutable(); + navigationPoints_.addAll(other.navigationPoints_); + } + onChanged(); + } + } else { + if (!other.navigationPoints_.isEmpty()) { + if (navigationPointsBuilder_.isEmpty()) { + navigationPointsBuilder_.dispose(); + navigationPointsBuilder_ = null; + navigationPoints_ = other.navigationPoints_; + bitField0_ = (bitField0_ & ~0x00000020); + navigationPointsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetNavigationPointsFieldBuilder() + : null; + } else { + navigationPointsBuilder_.addAllMessages(other.navigationPoints_); + } + } + } + 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(internalGetPrimaryFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.maps.geocode.v4.PlaceView m = + input.readMessage( + com.google.maps.geocode.v4.PlaceView.parser(), extensionRegistry); + if (containingPlacesBuilder_ == null) { + ensureContainingPlacesIsMutable(); + containingPlaces_.add(m); + } else { + containingPlacesBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + com.google.maps.geocode.v4.PlaceView m = + input.readMessage( + com.google.maps.geocode.v4.PlaceView.parser(), extensionRegistry); + if (subDestinationsBuilder_ == null) { + ensureSubDestinationsIsMutable(); + subDestinations_.add(m); + } else { + subDestinationsBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: + { + com.google.maps.geocode.v4.Landmark m = + input.readMessage( + com.google.maps.geocode.v4.Landmark.parser(), extensionRegistry); + if (landmarksBuilder_ == null) { + ensureLandmarksIsMutable(); + landmarks_.add(m); + } else { + landmarksBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + com.google.maps.geocode.v4.Entrance m = + input.readMessage( + com.google.maps.geocode.v4.Entrance.parser(), extensionRegistry); + if (entrancesBuilder_ == null) { + ensureEntrancesIsMutable(); + entrances_.add(m); + } else { + entrancesBuilder_.addMessage(m); + } + break; + } // case 42 + case 50: + { + com.google.maps.geocode.v4.NavigationPoint m = + input.readMessage( + com.google.maps.geocode.v4.NavigationPoint.parser(), extensionRegistry); + if (navigationPointsBuilder_ == null) { + ensureNavigationPointsIsMutable(); + navigationPoints_.add(m); + } else { + navigationPointsBuilder_.addMessage(m); + } + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.maps.geocode.v4.PlaceView primary_; + private com.google.protobuf.SingleFieldBuilder< + com.google.maps.geocode.v4.PlaceView, + com.google.maps.geocode.v4.PlaceView.Builder, + com.google.maps.geocode.v4.PlaceViewOrBuilder> + primaryBuilder_; + + /** + * + * + *
+     * The primary place identified by the `primary_query` in the request.
+     * 
+ * + * .google.maps.geocode.v4.PlaceView primary = 1; + * + * @return Whether the primary field is set. + */ + public boolean hasPrimary() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * The primary place identified by the `primary_query` in the request.
+     * 
+ * + * .google.maps.geocode.v4.PlaceView primary = 1; + * + * @return The primary. + */ + public com.google.maps.geocode.v4.PlaceView getPrimary() { + if (primaryBuilder_ == null) { + return primary_ == null + ? com.google.maps.geocode.v4.PlaceView.getDefaultInstance() + : primary_; + } else { + return primaryBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The primary place identified by the `primary_query` in the request.
+     * 
+ * + * .google.maps.geocode.v4.PlaceView primary = 1; + */ + public Builder setPrimary(com.google.maps.geocode.v4.PlaceView value) { + if (primaryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + primary_ = value; + } else { + primaryBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The primary place identified by the `primary_query` in the request.
+     * 
+ * + * .google.maps.geocode.v4.PlaceView primary = 1; + */ + public Builder setPrimary(com.google.maps.geocode.v4.PlaceView.Builder builderForValue) { + if (primaryBuilder_ == null) { + primary_ = builderForValue.build(); + } else { + primaryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The primary place identified by the `primary_query` in the request.
+     * 
+ * + * .google.maps.geocode.v4.PlaceView primary = 1; + */ + public Builder mergePrimary(com.google.maps.geocode.v4.PlaceView value) { + if (primaryBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && primary_ != null + && primary_ != com.google.maps.geocode.v4.PlaceView.getDefaultInstance()) { + getPrimaryBuilder().mergeFrom(value); + } else { + primary_ = value; + } + } else { + primaryBuilder_.mergeFrom(value); + } + if (primary_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The primary place identified by the `primary_query` in the request.
+     * 
+ * + * .google.maps.geocode.v4.PlaceView primary = 1; + */ + public Builder clearPrimary() { + bitField0_ = (bitField0_ & ~0x00000001); + primary_ = null; + if (primaryBuilder_ != null) { + primaryBuilder_.dispose(); + primaryBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The primary place identified by the `primary_query` in the request.
+     * 
+ * + * .google.maps.geocode.v4.PlaceView primary = 1; + */ + public com.google.maps.geocode.v4.PlaceView.Builder getPrimaryBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetPrimaryFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The primary place identified by the `primary_query` in the request.
+     * 
+ * + * .google.maps.geocode.v4.PlaceView primary = 1; + */ + public com.google.maps.geocode.v4.PlaceViewOrBuilder getPrimaryOrBuilder() { + if (primaryBuilder_ != null) { + return primaryBuilder_.getMessageOrBuilder(); + } else { + return primary_ == null + ? com.google.maps.geocode.v4.PlaceView.getDefaultInstance() + : primary_; + } + } + + /** + * + * + *
+     * The primary place identified by the `primary_query` in the request.
+     * 
+ * + * .google.maps.geocode.v4.PlaceView primary = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.maps.geocode.v4.PlaceView, + com.google.maps.geocode.v4.PlaceView.Builder, + com.google.maps.geocode.v4.PlaceViewOrBuilder> + internalGetPrimaryFieldBuilder() { + if (primaryBuilder_ == null) { + primaryBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.maps.geocode.v4.PlaceView, + com.google.maps.geocode.v4.PlaceView.Builder, + com.google.maps.geocode.v4.PlaceViewOrBuilder>( + getPrimary(), getParentForChildren(), isClean()); + primary_ = null; + } + return primaryBuilder_; + } + + private java.util.List containingPlaces_ = + java.util.Collections.emptyList(); + + private void ensureContainingPlacesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + containingPlaces_ = + new java.util.ArrayList(containingPlaces_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.maps.geocode.v4.PlaceView, + com.google.maps.geocode.v4.PlaceView.Builder, + com.google.maps.geocode.v4.PlaceViewOrBuilder> + containingPlacesBuilder_; + + /** + * + * + *
+     * The less precise places that the primary place is contained by.
+     * For example, the apartment complex that contains this building.
+     * 
+ * + * repeated .google.maps.geocode.v4.PlaceView containing_places = 2; + */ + public java.util.List getContainingPlacesList() { + if (containingPlacesBuilder_ == null) { + return java.util.Collections.unmodifiableList(containingPlaces_); + } else { + return containingPlacesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The less precise places that the primary place is contained by.
+     * For example, the apartment complex that contains this building.
+     * 
+ * + * repeated .google.maps.geocode.v4.PlaceView containing_places = 2; + */ + public int getContainingPlacesCount() { + if (containingPlacesBuilder_ == null) { + return containingPlaces_.size(); + } else { + return containingPlacesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The less precise places that the primary place is contained by.
+     * For example, the apartment complex that contains this building.
+     * 
+ * + * repeated .google.maps.geocode.v4.PlaceView containing_places = 2; + */ + public com.google.maps.geocode.v4.PlaceView getContainingPlaces(int index) { + if (containingPlacesBuilder_ == null) { + return containingPlaces_.get(index); + } else { + return containingPlacesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The less precise places that the primary place is contained by.
+     * For example, the apartment complex that contains this building.
+     * 
+ * + * repeated .google.maps.geocode.v4.PlaceView containing_places = 2; + */ + public Builder setContainingPlaces(int index, com.google.maps.geocode.v4.PlaceView value) { + if (containingPlacesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContainingPlacesIsMutable(); + containingPlaces_.set(index, value); + onChanged(); + } else { + containingPlacesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The less precise places that the primary place is contained by.
+     * For example, the apartment complex that contains this building.
+     * 
+ * + * repeated .google.maps.geocode.v4.PlaceView containing_places = 2; + */ + public Builder setContainingPlaces( + int index, com.google.maps.geocode.v4.PlaceView.Builder builderForValue) { + if (containingPlacesBuilder_ == null) { + ensureContainingPlacesIsMutable(); + containingPlaces_.set(index, builderForValue.build()); + onChanged(); + } else { + containingPlacesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The less precise places that the primary place is contained by.
+     * For example, the apartment complex that contains this building.
+     * 
+ * + * repeated .google.maps.geocode.v4.PlaceView containing_places = 2; + */ + public Builder addContainingPlaces(com.google.maps.geocode.v4.PlaceView value) { + if (containingPlacesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContainingPlacesIsMutable(); + containingPlaces_.add(value); + onChanged(); + } else { + containingPlacesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The less precise places that the primary place is contained by.
+     * For example, the apartment complex that contains this building.
+     * 
+ * + * repeated .google.maps.geocode.v4.PlaceView containing_places = 2; + */ + public Builder addContainingPlaces(int index, com.google.maps.geocode.v4.PlaceView value) { + if (containingPlacesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContainingPlacesIsMutable(); + containingPlaces_.add(index, value); + onChanged(); + } else { + containingPlacesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The less precise places that the primary place is contained by.
+     * For example, the apartment complex that contains this building.
+     * 
+ * + * repeated .google.maps.geocode.v4.PlaceView containing_places = 2; + */ + public Builder addContainingPlaces( + com.google.maps.geocode.v4.PlaceView.Builder builderForValue) { + if (containingPlacesBuilder_ == null) { + ensureContainingPlacesIsMutable(); + containingPlaces_.add(builderForValue.build()); + onChanged(); + } else { + containingPlacesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The less precise places that the primary place is contained by.
+     * For example, the apartment complex that contains this building.
+     * 
+ * + * repeated .google.maps.geocode.v4.PlaceView containing_places = 2; + */ + public Builder addContainingPlaces( + int index, com.google.maps.geocode.v4.PlaceView.Builder builderForValue) { + if (containingPlacesBuilder_ == null) { + ensureContainingPlacesIsMutable(); + containingPlaces_.add(index, builderForValue.build()); + onChanged(); + } else { + containingPlacesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The less precise places that the primary place is contained by.
+     * For example, the apartment complex that contains this building.
+     * 
+ * + * repeated .google.maps.geocode.v4.PlaceView containing_places = 2; + */ + public Builder addAllContainingPlaces( + java.lang.Iterable values) { + if (containingPlacesBuilder_ == null) { + ensureContainingPlacesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, containingPlaces_); + onChanged(); + } else { + containingPlacesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The less precise places that the primary place is contained by.
+     * For example, the apartment complex that contains this building.
+     * 
+ * + * repeated .google.maps.geocode.v4.PlaceView containing_places = 2; + */ + public Builder clearContainingPlaces() { + if (containingPlacesBuilder_ == null) { + containingPlaces_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + containingPlacesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The less precise places that the primary place is contained by.
+     * For example, the apartment complex that contains this building.
+     * 
+ * + * repeated .google.maps.geocode.v4.PlaceView containing_places = 2; + */ + public Builder removeContainingPlaces(int index) { + if (containingPlacesBuilder_ == null) { + ensureContainingPlacesIsMutable(); + containingPlaces_.remove(index); + onChanged(); + } else { + containingPlacesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The less precise places that the primary place is contained by.
+     * For example, the apartment complex that contains this building.
+     * 
+ * + * repeated .google.maps.geocode.v4.PlaceView containing_places = 2; + */ + public com.google.maps.geocode.v4.PlaceView.Builder getContainingPlacesBuilder(int index) { + return internalGetContainingPlacesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The less precise places that the primary place is contained by.
+     * For example, the apartment complex that contains this building.
+     * 
+ * + * repeated .google.maps.geocode.v4.PlaceView containing_places = 2; + */ + public com.google.maps.geocode.v4.PlaceViewOrBuilder getContainingPlacesOrBuilder(int index) { + if (containingPlacesBuilder_ == null) { + return containingPlaces_.get(index); + } else { + return containingPlacesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The less precise places that the primary place is contained by.
+     * For example, the apartment complex that contains this building.
+     * 
+ * + * repeated .google.maps.geocode.v4.PlaceView containing_places = 2; + */ + public java.util.List + getContainingPlacesOrBuilderList() { + if (containingPlacesBuilder_ != null) { + return containingPlacesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(containingPlaces_); + } + } + + /** + * + * + *
+     * The less precise places that the primary place is contained by.
+     * For example, the apartment complex that contains this building.
+     * 
+ * + * repeated .google.maps.geocode.v4.PlaceView containing_places = 2; + */ + public com.google.maps.geocode.v4.PlaceView.Builder addContainingPlacesBuilder() { + return internalGetContainingPlacesFieldBuilder() + .addBuilder(com.google.maps.geocode.v4.PlaceView.getDefaultInstance()); + } + + /** + * + * + *
+     * The less precise places that the primary place is contained by.
+     * For example, the apartment complex that contains this building.
+     * 
+ * + * repeated .google.maps.geocode.v4.PlaceView containing_places = 2; + */ + public com.google.maps.geocode.v4.PlaceView.Builder addContainingPlacesBuilder(int index) { + return internalGetContainingPlacesFieldBuilder() + .addBuilder(index, com.google.maps.geocode.v4.PlaceView.getDefaultInstance()); + } + + /** + * + * + *
+     * The less precise places that the primary place is contained by.
+     * For example, the apartment complex that contains this building.
+     * 
+ * + * repeated .google.maps.geocode.v4.PlaceView containing_places = 2; + */ + public java.util.List + getContainingPlacesBuilderList() { + return internalGetContainingPlacesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.maps.geocode.v4.PlaceView, + com.google.maps.geocode.v4.PlaceView.Builder, + com.google.maps.geocode.v4.PlaceViewOrBuilder> + internalGetContainingPlacesFieldBuilder() { + if (containingPlacesBuilder_ == null) { + containingPlacesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.maps.geocode.v4.PlaceView, + com.google.maps.geocode.v4.PlaceView.Builder, + com.google.maps.geocode.v4.PlaceViewOrBuilder>( + containingPlaces_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + containingPlaces_ = null; + } + return containingPlacesBuilder_; + } + + private java.util.List subDestinations_ = + java.util.Collections.emptyList(); + + private void ensureSubDestinationsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + subDestinations_ = + new java.util.ArrayList(subDestinations_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.maps.geocode.v4.PlaceView, + com.google.maps.geocode.v4.PlaceView.Builder, + com.google.maps.geocode.v4.PlaceViewOrBuilder> + subDestinationsBuilder_; + + /** + * + * + *
+     * More precise sub-destinations of the primary place. For example, units
+     * contained in a building.
+     *
+     * Note: compared to the
+     * [SubDestination](/maps/documentation/places/web-service/reference/rest/v1/places#SubDestination)
+     * returned by the Places API, this list of sub-destinations is more
+     * exhaustive, and each sub-destination contains more information.
+     * 
+ * + * repeated .google.maps.geocode.v4.PlaceView sub_destinations = 3; + */ + public java.util.List getSubDestinationsList() { + if (subDestinationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(subDestinations_); + } else { + return subDestinationsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * More precise sub-destinations of the primary place. For example, units
+     * contained in a building.
+     *
+     * Note: compared to the
+     * [SubDestination](/maps/documentation/places/web-service/reference/rest/v1/places#SubDestination)
+     * returned by the Places API, this list of sub-destinations is more
+     * exhaustive, and each sub-destination contains more information.
+     * 
+ * + * repeated .google.maps.geocode.v4.PlaceView sub_destinations = 3; + */ + public int getSubDestinationsCount() { + if (subDestinationsBuilder_ == null) { + return subDestinations_.size(); + } else { + return subDestinationsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * More precise sub-destinations of the primary place. For example, units
+     * contained in a building.
+     *
+     * Note: compared to the
+     * [SubDestination](/maps/documentation/places/web-service/reference/rest/v1/places#SubDestination)
+     * returned by the Places API, this list of sub-destinations is more
+     * exhaustive, and each sub-destination contains more information.
+     * 
+ * + * repeated .google.maps.geocode.v4.PlaceView sub_destinations = 3; + */ + public com.google.maps.geocode.v4.PlaceView getSubDestinations(int index) { + if (subDestinationsBuilder_ == null) { + return subDestinations_.get(index); + } else { + return subDestinationsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * More precise sub-destinations of the primary place. For example, units
+     * contained in a building.
+     *
+     * Note: compared to the
+     * [SubDestination](/maps/documentation/places/web-service/reference/rest/v1/places#SubDestination)
+     * returned by the Places API, this list of sub-destinations is more
+     * exhaustive, and each sub-destination contains more information.
+     * 
+ * + * repeated .google.maps.geocode.v4.PlaceView sub_destinations = 3; + */ + public Builder setSubDestinations(int index, com.google.maps.geocode.v4.PlaceView value) { + if (subDestinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubDestinationsIsMutable(); + subDestinations_.set(index, value); + onChanged(); + } else { + subDestinationsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * More precise sub-destinations of the primary place. For example, units
+     * contained in a building.
+     *
+     * Note: compared to the
+     * [SubDestination](/maps/documentation/places/web-service/reference/rest/v1/places#SubDestination)
+     * returned by the Places API, this list of sub-destinations is more
+     * exhaustive, and each sub-destination contains more information.
+     * 
+ * + * repeated .google.maps.geocode.v4.PlaceView sub_destinations = 3; + */ + public Builder setSubDestinations( + int index, com.google.maps.geocode.v4.PlaceView.Builder builderForValue) { + if (subDestinationsBuilder_ == null) { + ensureSubDestinationsIsMutable(); + subDestinations_.set(index, builderForValue.build()); + onChanged(); + } else { + subDestinationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * More precise sub-destinations of the primary place. For example, units
+     * contained in a building.
+     *
+     * Note: compared to the
+     * [SubDestination](/maps/documentation/places/web-service/reference/rest/v1/places#SubDestination)
+     * returned by the Places API, this list of sub-destinations is more
+     * exhaustive, and each sub-destination contains more information.
+     * 
+ * + * repeated .google.maps.geocode.v4.PlaceView sub_destinations = 3; + */ + public Builder addSubDestinations(com.google.maps.geocode.v4.PlaceView value) { + if (subDestinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubDestinationsIsMutable(); + subDestinations_.add(value); + onChanged(); + } else { + subDestinationsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * More precise sub-destinations of the primary place. For example, units
+     * contained in a building.
+     *
+     * Note: compared to the
+     * [SubDestination](/maps/documentation/places/web-service/reference/rest/v1/places#SubDestination)
+     * returned by the Places API, this list of sub-destinations is more
+     * exhaustive, and each sub-destination contains more information.
+     * 
+ * + * repeated .google.maps.geocode.v4.PlaceView sub_destinations = 3; + */ + public Builder addSubDestinations(int index, com.google.maps.geocode.v4.PlaceView value) { + if (subDestinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubDestinationsIsMutable(); + subDestinations_.add(index, value); + onChanged(); + } else { + subDestinationsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * More precise sub-destinations of the primary place. For example, units
+     * contained in a building.
+     *
+     * Note: compared to the
+     * [SubDestination](/maps/documentation/places/web-service/reference/rest/v1/places#SubDestination)
+     * returned by the Places API, this list of sub-destinations is more
+     * exhaustive, and each sub-destination contains more information.
+     * 
+ * + * repeated .google.maps.geocode.v4.PlaceView sub_destinations = 3; + */ + public Builder addSubDestinations( + com.google.maps.geocode.v4.PlaceView.Builder builderForValue) { + if (subDestinationsBuilder_ == null) { + ensureSubDestinationsIsMutable(); + subDestinations_.add(builderForValue.build()); + onChanged(); + } else { + subDestinationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * More precise sub-destinations of the primary place. For example, units
+     * contained in a building.
+     *
+     * Note: compared to the
+     * [SubDestination](/maps/documentation/places/web-service/reference/rest/v1/places#SubDestination)
+     * returned by the Places API, this list of sub-destinations is more
+     * exhaustive, and each sub-destination contains more information.
+     * 
+ * + * repeated .google.maps.geocode.v4.PlaceView sub_destinations = 3; + */ + public Builder addSubDestinations( + int index, com.google.maps.geocode.v4.PlaceView.Builder builderForValue) { + if (subDestinationsBuilder_ == null) { + ensureSubDestinationsIsMutable(); + subDestinations_.add(index, builderForValue.build()); + onChanged(); + } else { + subDestinationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * More precise sub-destinations of the primary place. For example, units
+     * contained in a building.
+     *
+     * Note: compared to the
+     * [SubDestination](/maps/documentation/places/web-service/reference/rest/v1/places#SubDestination)
+     * returned by the Places API, this list of sub-destinations is more
+     * exhaustive, and each sub-destination contains more information.
+     * 
+ * + * repeated .google.maps.geocode.v4.PlaceView sub_destinations = 3; + */ + public Builder addAllSubDestinations( + java.lang.Iterable values) { + if (subDestinationsBuilder_ == null) { + ensureSubDestinationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, subDestinations_); + onChanged(); + } else { + subDestinationsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * More precise sub-destinations of the primary place. For example, units
+     * contained in a building.
+     *
+     * Note: compared to the
+     * [SubDestination](/maps/documentation/places/web-service/reference/rest/v1/places#SubDestination)
+     * returned by the Places API, this list of sub-destinations is more
+     * exhaustive, and each sub-destination contains more information.
+     * 
+ * + * repeated .google.maps.geocode.v4.PlaceView sub_destinations = 3; + */ + public Builder clearSubDestinations() { + if (subDestinationsBuilder_ == null) { + subDestinations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + subDestinationsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * More precise sub-destinations of the primary place. For example, units
+     * contained in a building.
+     *
+     * Note: compared to the
+     * [SubDestination](/maps/documentation/places/web-service/reference/rest/v1/places#SubDestination)
+     * returned by the Places API, this list of sub-destinations is more
+     * exhaustive, and each sub-destination contains more information.
+     * 
+ * + * repeated .google.maps.geocode.v4.PlaceView sub_destinations = 3; + */ + public Builder removeSubDestinations(int index) { + if (subDestinationsBuilder_ == null) { + ensureSubDestinationsIsMutable(); + subDestinations_.remove(index); + onChanged(); + } else { + subDestinationsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * More precise sub-destinations of the primary place. For example, units
+     * contained in a building.
+     *
+     * Note: compared to the
+     * [SubDestination](/maps/documentation/places/web-service/reference/rest/v1/places#SubDestination)
+     * returned by the Places API, this list of sub-destinations is more
+     * exhaustive, and each sub-destination contains more information.
+     * 
+ * + * repeated .google.maps.geocode.v4.PlaceView sub_destinations = 3; + */ + public com.google.maps.geocode.v4.PlaceView.Builder getSubDestinationsBuilder(int index) { + return internalGetSubDestinationsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * More precise sub-destinations of the primary place. For example, units
+     * contained in a building.
+     *
+     * Note: compared to the
+     * [SubDestination](/maps/documentation/places/web-service/reference/rest/v1/places#SubDestination)
+     * returned by the Places API, this list of sub-destinations is more
+     * exhaustive, and each sub-destination contains more information.
+     * 
+ * + * repeated .google.maps.geocode.v4.PlaceView sub_destinations = 3; + */ + public com.google.maps.geocode.v4.PlaceViewOrBuilder getSubDestinationsOrBuilder(int index) { + if (subDestinationsBuilder_ == null) { + return subDestinations_.get(index); + } else { + return subDestinationsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * More precise sub-destinations of the primary place. For example, units
+     * contained in a building.
+     *
+     * Note: compared to the
+     * [SubDestination](/maps/documentation/places/web-service/reference/rest/v1/places#SubDestination)
+     * returned by the Places API, this list of sub-destinations is more
+     * exhaustive, and each sub-destination contains more information.
+     * 
+ * + * repeated .google.maps.geocode.v4.PlaceView sub_destinations = 3; + */ + public java.util.List + getSubDestinationsOrBuilderList() { + if (subDestinationsBuilder_ != null) { + return subDestinationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(subDestinations_); + } + } + + /** + * + * + *
+     * More precise sub-destinations of the primary place. For example, units
+     * contained in a building.
+     *
+     * Note: compared to the
+     * [SubDestination](/maps/documentation/places/web-service/reference/rest/v1/places#SubDestination)
+     * returned by the Places API, this list of sub-destinations is more
+     * exhaustive, and each sub-destination contains more information.
+     * 
+ * + * repeated .google.maps.geocode.v4.PlaceView sub_destinations = 3; + */ + public com.google.maps.geocode.v4.PlaceView.Builder addSubDestinationsBuilder() { + return internalGetSubDestinationsFieldBuilder() + .addBuilder(com.google.maps.geocode.v4.PlaceView.getDefaultInstance()); + } + + /** + * + * + *
+     * More precise sub-destinations of the primary place. For example, units
+     * contained in a building.
+     *
+     * Note: compared to the
+     * [SubDestination](/maps/documentation/places/web-service/reference/rest/v1/places#SubDestination)
+     * returned by the Places API, this list of sub-destinations is more
+     * exhaustive, and each sub-destination contains more information.
+     * 
+ * + * repeated .google.maps.geocode.v4.PlaceView sub_destinations = 3; + */ + public com.google.maps.geocode.v4.PlaceView.Builder addSubDestinationsBuilder(int index) { + return internalGetSubDestinationsFieldBuilder() + .addBuilder(index, com.google.maps.geocode.v4.PlaceView.getDefaultInstance()); + } + + /** + * + * + *
+     * More precise sub-destinations of the primary place. For example, units
+     * contained in a building.
+     *
+     * Note: compared to the
+     * [SubDestination](/maps/documentation/places/web-service/reference/rest/v1/places#SubDestination)
+     * returned by the Places API, this list of sub-destinations is more
+     * exhaustive, and each sub-destination contains more information.
+     * 
+ * + * repeated .google.maps.geocode.v4.PlaceView sub_destinations = 3; + */ + public java.util.List + getSubDestinationsBuilderList() { + return internalGetSubDestinationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.maps.geocode.v4.PlaceView, + com.google.maps.geocode.v4.PlaceView.Builder, + com.google.maps.geocode.v4.PlaceViewOrBuilder> + internalGetSubDestinationsFieldBuilder() { + if (subDestinationsBuilder_ == null) { + subDestinationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.maps.geocode.v4.PlaceView, + com.google.maps.geocode.v4.PlaceView.Builder, + com.google.maps.geocode.v4.PlaceViewOrBuilder>( + subDestinations_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + subDestinations_ = null; + } + return subDestinationsBuilder_; + } + + private java.util.List landmarks_ = + java.util.Collections.emptyList(); + + private void ensureLandmarksIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + landmarks_ = new java.util.ArrayList(landmarks_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.maps.geocode.v4.Landmark, + com.google.maps.geocode.v4.Landmark.Builder, + com.google.maps.geocode.v4.LandmarkOrBuilder> + landmarksBuilder_; + + /** + * + * + *
+     * Landmarks that can be used to communicate where the destination is
+     * or help with arrival.
+     * 
+ * + * repeated .google.maps.geocode.v4.Landmark landmarks = 4; + */ + public java.util.List getLandmarksList() { + if (landmarksBuilder_ == null) { + return java.util.Collections.unmodifiableList(landmarks_); + } else { + return landmarksBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Landmarks that can be used to communicate where the destination is
+     * or help with arrival.
+     * 
+ * + * repeated .google.maps.geocode.v4.Landmark landmarks = 4; + */ + public int getLandmarksCount() { + if (landmarksBuilder_ == null) { + return landmarks_.size(); + } else { + return landmarksBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Landmarks that can be used to communicate where the destination is
+     * or help with arrival.
+     * 
+ * + * repeated .google.maps.geocode.v4.Landmark landmarks = 4; + */ + public com.google.maps.geocode.v4.Landmark getLandmarks(int index) { + if (landmarksBuilder_ == null) { + return landmarks_.get(index); + } else { + return landmarksBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Landmarks that can be used to communicate where the destination is
+     * or help with arrival.
+     * 
+ * + * repeated .google.maps.geocode.v4.Landmark landmarks = 4; + */ + public Builder setLandmarks(int index, com.google.maps.geocode.v4.Landmark value) { + if (landmarksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLandmarksIsMutable(); + landmarks_.set(index, value); + onChanged(); + } else { + landmarksBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Landmarks that can be used to communicate where the destination is
+     * or help with arrival.
+     * 
+ * + * repeated .google.maps.geocode.v4.Landmark landmarks = 4; + */ + public Builder setLandmarks( + int index, com.google.maps.geocode.v4.Landmark.Builder builderForValue) { + if (landmarksBuilder_ == null) { + ensureLandmarksIsMutable(); + landmarks_.set(index, builderForValue.build()); + onChanged(); + } else { + landmarksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Landmarks that can be used to communicate where the destination is
+     * or help with arrival.
+     * 
+ * + * repeated .google.maps.geocode.v4.Landmark landmarks = 4; + */ + public Builder addLandmarks(com.google.maps.geocode.v4.Landmark value) { + if (landmarksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLandmarksIsMutable(); + landmarks_.add(value); + onChanged(); + } else { + landmarksBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Landmarks that can be used to communicate where the destination is
+     * or help with arrival.
+     * 
+ * + * repeated .google.maps.geocode.v4.Landmark landmarks = 4; + */ + public Builder addLandmarks(int index, com.google.maps.geocode.v4.Landmark value) { + if (landmarksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLandmarksIsMutable(); + landmarks_.add(index, value); + onChanged(); + } else { + landmarksBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Landmarks that can be used to communicate where the destination is
+     * or help with arrival.
+     * 
+ * + * repeated .google.maps.geocode.v4.Landmark landmarks = 4; + */ + public Builder addLandmarks(com.google.maps.geocode.v4.Landmark.Builder builderForValue) { + if (landmarksBuilder_ == null) { + ensureLandmarksIsMutable(); + landmarks_.add(builderForValue.build()); + onChanged(); + } else { + landmarksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Landmarks that can be used to communicate where the destination is
+     * or help with arrival.
+     * 
+ * + * repeated .google.maps.geocode.v4.Landmark landmarks = 4; + */ + public Builder addLandmarks( + int index, com.google.maps.geocode.v4.Landmark.Builder builderForValue) { + if (landmarksBuilder_ == null) { + ensureLandmarksIsMutable(); + landmarks_.add(index, builderForValue.build()); + onChanged(); + } else { + landmarksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Landmarks that can be used to communicate where the destination is
+     * or help with arrival.
+     * 
+ * + * repeated .google.maps.geocode.v4.Landmark landmarks = 4; + */ + public Builder addAllLandmarks( + java.lang.Iterable values) { + if (landmarksBuilder_ == null) { + ensureLandmarksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, landmarks_); + onChanged(); + } else { + landmarksBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Landmarks that can be used to communicate where the destination is
+     * or help with arrival.
+     * 
+ * + * repeated .google.maps.geocode.v4.Landmark landmarks = 4; + */ + public Builder clearLandmarks() { + if (landmarksBuilder_ == null) { + landmarks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + landmarksBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Landmarks that can be used to communicate where the destination is
+     * or help with arrival.
+     * 
+ * + * repeated .google.maps.geocode.v4.Landmark landmarks = 4; + */ + public Builder removeLandmarks(int index) { + if (landmarksBuilder_ == null) { + ensureLandmarksIsMutable(); + landmarks_.remove(index); + onChanged(); + } else { + landmarksBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Landmarks that can be used to communicate where the destination is
+     * or help with arrival.
+     * 
+ * + * repeated .google.maps.geocode.v4.Landmark landmarks = 4; + */ + public com.google.maps.geocode.v4.Landmark.Builder getLandmarksBuilder(int index) { + return internalGetLandmarksFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Landmarks that can be used to communicate where the destination is
+     * or help with arrival.
+     * 
+ * + * repeated .google.maps.geocode.v4.Landmark landmarks = 4; + */ + public com.google.maps.geocode.v4.LandmarkOrBuilder getLandmarksOrBuilder(int index) { + if (landmarksBuilder_ == null) { + return landmarks_.get(index); + } else { + return landmarksBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Landmarks that can be used to communicate where the destination is
+     * or help with arrival.
+     * 
+ * + * repeated .google.maps.geocode.v4.Landmark landmarks = 4; + */ + public java.util.List + getLandmarksOrBuilderList() { + if (landmarksBuilder_ != null) { + return landmarksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(landmarks_); + } + } + + /** + * + * + *
+     * Landmarks that can be used to communicate where the destination is
+     * or help with arrival.
+     * 
+ * + * repeated .google.maps.geocode.v4.Landmark landmarks = 4; + */ + public com.google.maps.geocode.v4.Landmark.Builder addLandmarksBuilder() { + return internalGetLandmarksFieldBuilder() + .addBuilder(com.google.maps.geocode.v4.Landmark.getDefaultInstance()); + } + + /** + * + * + *
+     * Landmarks that can be used to communicate where the destination is
+     * or help with arrival.
+     * 
+ * + * repeated .google.maps.geocode.v4.Landmark landmarks = 4; + */ + public com.google.maps.geocode.v4.Landmark.Builder addLandmarksBuilder(int index) { + return internalGetLandmarksFieldBuilder() + .addBuilder(index, com.google.maps.geocode.v4.Landmark.getDefaultInstance()); + } + + /** + * + * + *
+     * Landmarks that can be used to communicate where the destination is
+     * or help with arrival.
+     * 
+ * + * repeated .google.maps.geocode.v4.Landmark landmarks = 4; + */ + public java.util.List getLandmarksBuilderList() { + return internalGetLandmarksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.maps.geocode.v4.Landmark, + com.google.maps.geocode.v4.Landmark.Builder, + com.google.maps.geocode.v4.LandmarkOrBuilder> + internalGetLandmarksFieldBuilder() { + if (landmarksBuilder_ == null) { + landmarksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.maps.geocode.v4.Landmark, + com.google.maps.geocode.v4.Landmark.Builder, + com.google.maps.geocode.v4.LandmarkOrBuilder>( + landmarks_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + landmarks_ = null; + } + return landmarksBuilder_; + } + + private java.util.List entrances_ = + java.util.Collections.emptyList(); + + private void ensureEntrancesIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + entrances_ = new java.util.ArrayList(entrances_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.maps.geocode.v4.Entrance, + com.google.maps.geocode.v4.Entrance.Builder, + com.google.maps.geocode.v4.EntranceOrBuilder> + entrancesBuilder_; + + /** + * + * + *
+     * Entrances for this destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.Entrance entrances = 5; + */ + public java.util.List getEntrancesList() { + if (entrancesBuilder_ == null) { + return java.util.Collections.unmodifiableList(entrances_); + } else { + return entrancesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Entrances for this destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.Entrance entrances = 5; + */ + public int getEntrancesCount() { + if (entrancesBuilder_ == null) { + return entrances_.size(); + } else { + return entrancesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Entrances for this destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.Entrance entrances = 5; + */ + public com.google.maps.geocode.v4.Entrance getEntrances(int index) { + if (entrancesBuilder_ == null) { + return entrances_.get(index); + } else { + return entrancesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Entrances for this destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.Entrance entrances = 5; + */ + public Builder setEntrances(int index, com.google.maps.geocode.v4.Entrance value) { + if (entrancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntrancesIsMutable(); + entrances_.set(index, value); + onChanged(); + } else { + entrancesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Entrances for this destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.Entrance entrances = 5; + */ + public Builder setEntrances( + int index, com.google.maps.geocode.v4.Entrance.Builder builderForValue) { + if (entrancesBuilder_ == null) { + ensureEntrancesIsMutable(); + entrances_.set(index, builderForValue.build()); + onChanged(); + } else { + entrancesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Entrances for this destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.Entrance entrances = 5; + */ + public Builder addEntrances(com.google.maps.geocode.v4.Entrance value) { + if (entrancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntrancesIsMutable(); + entrances_.add(value); + onChanged(); + } else { + entrancesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Entrances for this destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.Entrance entrances = 5; + */ + public Builder addEntrances(int index, com.google.maps.geocode.v4.Entrance value) { + if (entrancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntrancesIsMutable(); + entrances_.add(index, value); + onChanged(); + } else { + entrancesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Entrances for this destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.Entrance entrances = 5; + */ + public Builder addEntrances(com.google.maps.geocode.v4.Entrance.Builder builderForValue) { + if (entrancesBuilder_ == null) { + ensureEntrancesIsMutable(); + entrances_.add(builderForValue.build()); + onChanged(); + } else { + entrancesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Entrances for this destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.Entrance entrances = 5; + */ + public Builder addEntrances( + int index, com.google.maps.geocode.v4.Entrance.Builder builderForValue) { + if (entrancesBuilder_ == null) { + ensureEntrancesIsMutable(); + entrances_.add(index, builderForValue.build()); + onChanged(); + } else { + entrancesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Entrances for this destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.Entrance entrances = 5; + */ + public Builder addAllEntrances( + java.lang.Iterable values) { + if (entrancesBuilder_ == null) { + ensureEntrancesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entrances_); + onChanged(); + } else { + entrancesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Entrances for this destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.Entrance entrances = 5; + */ + public Builder clearEntrances() { + if (entrancesBuilder_ == null) { + entrances_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + entrancesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Entrances for this destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.Entrance entrances = 5; + */ + public Builder removeEntrances(int index) { + if (entrancesBuilder_ == null) { + ensureEntrancesIsMutable(); + entrances_.remove(index); + onChanged(); + } else { + entrancesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Entrances for this destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.Entrance entrances = 5; + */ + public com.google.maps.geocode.v4.Entrance.Builder getEntrancesBuilder(int index) { + return internalGetEntrancesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Entrances for this destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.Entrance entrances = 5; + */ + public com.google.maps.geocode.v4.EntranceOrBuilder getEntrancesOrBuilder(int index) { + if (entrancesBuilder_ == null) { + return entrances_.get(index); + } else { + return entrancesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Entrances for this destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.Entrance entrances = 5; + */ + public java.util.List + getEntrancesOrBuilderList() { + if (entrancesBuilder_ != null) { + return entrancesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(entrances_); + } + } + + /** + * + * + *
+     * Entrances for this destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.Entrance entrances = 5; + */ + public com.google.maps.geocode.v4.Entrance.Builder addEntrancesBuilder() { + return internalGetEntrancesFieldBuilder() + .addBuilder(com.google.maps.geocode.v4.Entrance.getDefaultInstance()); + } + + /** + * + * + *
+     * Entrances for this destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.Entrance entrances = 5; + */ + public com.google.maps.geocode.v4.Entrance.Builder addEntrancesBuilder(int index) { + return internalGetEntrancesFieldBuilder() + .addBuilder(index, com.google.maps.geocode.v4.Entrance.getDefaultInstance()); + } + + /** + * + * + *
+     * Entrances for this destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.Entrance entrances = 5; + */ + public java.util.List getEntrancesBuilderList() { + return internalGetEntrancesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.maps.geocode.v4.Entrance, + com.google.maps.geocode.v4.Entrance.Builder, + com.google.maps.geocode.v4.EntranceOrBuilder> + internalGetEntrancesFieldBuilder() { + if (entrancesBuilder_ == null) { + entrancesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.maps.geocode.v4.Entrance, + com.google.maps.geocode.v4.Entrance.Builder, + com.google.maps.geocode.v4.EntranceOrBuilder>( + entrances_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); + entrances_ = null; + } + return entrancesBuilder_; + } + + private java.util.List navigationPoints_ = + java.util.Collections.emptyList(); + + private void ensureNavigationPointsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + navigationPoints_ = + new java.util.ArrayList(navigationPoints_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.maps.geocode.v4.NavigationPoint, + com.google.maps.geocode.v4.NavigationPoint.Builder, + com.google.maps.geocode.v4.NavigationPointOrBuilder> + navigationPointsBuilder_; + + /** + * + * + *
+     * Navigation points for this destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint navigation_points = 6; + */ + public java.util.List getNavigationPointsList() { + if (navigationPointsBuilder_ == null) { + return java.util.Collections.unmodifiableList(navigationPoints_); + } else { + return navigationPointsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Navigation points for this destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint navigation_points = 6; + */ + public int getNavigationPointsCount() { + if (navigationPointsBuilder_ == null) { + return navigationPoints_.size(); + } else { + return navigationPointsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Navigation points for this destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint navigation_points = 6; + */ + public com.google.maps.geocode.v4.NavigationPoint getNavigationPoints(int index) { + if (navigationPointsBuilder_ == null) { + return navigationPoints_.get(index); + } else { + return navigationPointsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Navigation points for this destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint navigation_points = 6; + */ + public Builder setNavigationPoints( + int index, com.google.maps.geocode.v4.NavigationPoint value) { + if (navigationPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNavigationPointsIsMutable(); + navigationPoints_.set(index, value); + onChanged(); + } else { + navigationPointsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Navigation points for this destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint navigation_points = 6; + */ + public Builder setNavigationPoints( + int index, com.google.maps.geocode.v4.NavigationPoint.Builder builderForValue) { + if (navigationPointsBuilder_ == null) { + ensureNavigationPointsIsMutable(); + navigationPoints_.set(index, builderForValue.build()); + onChanged(); + } else { + navigationPointsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Navigation points for this destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint navigation_points = 6; + */ + public Builder addNavigationPoints(com.google.maps.geocode.v4.NavigationPoint value) { + if (navigationPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNavigationPointsIsMutable(); + navigationPoints_.add(value); + onChanged(); + } else { + navigationPointsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Navigation points for this destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint navigation_points = 6; + */ + public Builder addNavigationPoints( + int index, com.google.maps.geocode.v4.NavigationPoint value) { + if (navigationPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNavigationPointsIsMutable(); + navigationPoints_.add(index, value); + onChanged(); + } else { + navigationPointsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Navigation points for this destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint navigation_points = 6; + */ + public Builder addNavigationPoints( + com.google.maps.geocode.v4.NavigationPoint.Builder builderForValue) { + if (navigationPointsBuilder_ == null) { + ensureNavigationPointsIsMutable(); + navigationPoints_.add(builderForValue.build()); + onChanged(); + } else { + navigationPointsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Navigation points for this destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint navigation_points = 6; + */ + public Builder addNavigationPoints( + int index, com.google.maps.geocode.v4.NavigationPoint.Builder builderForValue) { + if (navigationPointsBuilder_ == null) { + ensureNavigationPointsIsMutable(); + navigationPoints_.add(index, builderForValue.build()); + onChanged(); + } else { + navigationPointsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Navigation points for this destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint navigation_points = 6; + */ + public Builder addAllNavigationPoints( + java.lang.Iterable values) { + if (navigationPointsBuilder_ == null) { + ensureNavigationPointsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, navigationPoints_); + onChanged(); + } else { + navigationPointsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Navigation points for this destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint navigation_points = 6; + */ + public Builder clearNavigationPoints() { + if (navigationPointsBuilder_ == null) { + navigationPoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + navigationPointsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Navigation points for this destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint navigation_points = 6; + */ + public Builder removeNavigationPoints(int index) { + if (navigationPointsBuilder_ == null) { + ensureNavigationPointsIsMutable(); + navigationPoints_.remove(index); + onChanged(); + } else { + navigationPointsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Navigation points for this destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint navigation_points = 6; + */ + public com.google.maps.geocode.v4.NavigationPoint.Builder getNavigationPointsBuilder( + int index) { + return internalGetNavigationPointsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Navigation points for this destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint navigation_points = 6; + */ + public com.google.maps.geocode.v4.NavigationPointOrBuilder getNavigationPointsOrBuilder( + int index) { + if (navigationPointsBuilder_ == null) { + return navigationPoints_.get(index); + } else { + return navigationPointsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Navigation points for this destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint navigation_points = 6; + */ + public java.util.List + getNavigationPointsOrBuilderList() { + if (navigationPointsBuilder_ != null) { + return navigationPointsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(navigationPoints_); + } + } + + /** + * + * + *
+     * Navigation points for this destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint navigation_points = 6; + */ + public com.google.maps.geocode.v4.NavigationPoint.Builder addNavigationPointsBuilder() { + return internalGetNavigationPointsFieldBuilder() + .addBuilder(com.google.maps.geocode.v4.NavigationPoint.getDefaultInstance()); + } + + /** + * + * + *
+     * Navigation points for this destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint navigation_points = 6; + */ + public com.google.maps.geocode.v4.NavigationPoint.Builder addNavigationPointsBuilder( + int index) { + return internalGetNavigationPointsFieldBuilder() + .addBuilder(index, com.google.maps.geocode.v4.NavigationPoint.getDefaultInstance()); + } + + /** + * + * + *
+     * Navigation points for this destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint navigation_points = 6; + */ + public java.util.List + getNavigationPointsBuilderList() { + return internalGetNavigationPointsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.maps.geocode.v4.NavigationPoint, + com.google.maps.geocode.v4.NavigationPoint.Builder, + com.google.maps.geocode.v4.NavigationPointOrBuilder> + internalGetNavigationPointsFieldBuilder() { + if (navigationPointsBuilder_ == null) { + navigationPointsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.maps.geocode.v4.NavigationPoint, + com.google.maps.geocode.v4.NavigationPoint.Builder, + com.google.maps.geocode.v4.NavigationPointOrBuilder>( + navigationPoints_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + navigationPoints_ = null; + } + return navigationPointsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.maps.geocode.v4.Destination) + } + + // @@protoc_insertion_point(class_scope:google.maps.geocode.v4.Destination) + private static final com.google.maps.geocode.v4.Destination DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.geocode.v4.Destination(); + } + + public static com.google.maps.geocode.v4.Destination getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Destination 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.geocode.v4.Destination getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/DestinationOrBuilder.java b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/DestinationOrBuilder.java new file mode 100644 index 000000000000..25ab015ad1a6 --- /dev/null +++ b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/DestinationOrBuilder.java @@ -0,0 +1,385 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/maps/geocode/v4/destination_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.geocode.v4; + +@com.google.protobuf.Generated +public interface DestinationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.geocode.v4.Destination) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The primary place identified by the `primary_query` in the request.
+   * 
+ * + * .google.maps.geocode.v4.PlaceView primary = 1; + * + * @return Whether the primary field is set. + */ + boolean hasPrimary(); + + /** + * + * + *
+   * The primary place identified by the `primary_query` in the request.
+   * 
+ * + * .google.maps.geocode.v4.PlaceView primary = 1; + * + * @return The primary. + */ + com.google.maps.geocode.v4.PlaceView getPrimary(); + + /** + * + * + *
+   * The primary place identified by the `primary_query` in the request.
+   * 
+ * + * .google.maps.geocode.v4.PlaceView primary = 1; + */ + com.google.maps.geocode.v4.PlaceViewOrBuilder getPrimaryOrBuilder(); + + /** + * + * + *
+   * The less precise places that the primary place is contained by.
+   * For example, the apartment complex that contains this building.
+   * 
+ * + * repeated .google.maps.geocode.v4.PlaceView containing_places = 2; + */ + java.util.List getContainingPlacesList(); + + /** + * + * + *
+   * The less precise places that the primary place is contained by.
+   * For example, the apartment complex that contains this building.
+   * 
+ * + * repeated .google.maps.geocode.v4.PlaceView containing_places = 2; + */ + com.google.maps.geocode.v4.PlaceView getContainingPlaces(int index); + + /** + * + * + *
+   * The less precise places that the primary place is contained by.
+   * For example, the apartment complex that contains this building.
+   * 
+ * + * repeated .google.maps.geocode.v4.PlaceView containing_places = 2; + */ + int getContainingPlacesCount(); + + /** + * + * + *
+   * The less precise places that the primary place is contained by.
+   * For example, the apartment complex that contains this building.
+   * 
+ * + * repeated .google.maps.geocode.v4.PlaceView containing_places = 2; + */ + java.util.List + getContainingPlacesOrBuilderList(); + + /** + * + * + *
+   * The less precise places that the primary place is contained by.
+   * For example, the apartment complex that contains this building.
+   * 
+ * + * repeated .google.maps.geocode.v4.PlaceView containing_places = 2; + */ + com.google.maps.geocode.v4.PlaceViewOrBuilder getContainingPlacesOrBuilder(int index); + + /** + * + * + *
+   * More precise sub-destinations of the primary place. For example, units
+   * contained in a building.
+   *
+   * Note: compared to the
+   * [SubDestination](/maps/documentation/places/web-service/reference/rest/v1/places#SubDestination)
+   * returned by the Places API, this list of sub-destinations is more
+   * exhaustive, and each sub-destination contains more information.
+   * 
+ * + * repeated .google.maps.geocode.v4.PlaceView sub_destinations = 3; + */ + java.util.List getSubDestinationsList(); + + /** + * + * + *
+   * More precise sub-destinations of the primary place. For example, units
+   * contained in a building.
+   *
+   * Note: compared to the
+   * [SubDestination](/maps/documentation/places/web-service/reference/rest/v1/places#SubDestination)
+   * returned by the Places API, this list of sub-destinations is more
+   * exhaustive, and each sub-destination contains more information.
+   * 
+ * + * repeated .google.maps.geocode.v4.PlaceView sub_destinations = 3; + */ + com.google.maps.geocode.v4.PlaceView getSubDestinations(int index); + + /** + * + * + *
+   * More precise sub-destinations of the primary place. For example, units
+   * contained in a building.
+   *
+   * Note: compared to the
+   * [SubDestination](/maps/documentation/places/web-service/reference/rest/v1/places#SubDestination)
+   * returned by the Places API, this list of sub-destinations is more
+   * exhaustive, and each sub-destination contains more information.
+   * 
+ * + * repeated .google.maps.geocode.v4.PlaceView sub_destinations = 3; + */ + int getSubDestinationsCount(); + + /** + * + * + *
+   * More precise sub-destinations of the primary place. For example, units
+   * contained in a building.
+   *
+   * Note: compared to the
+   * [SubDestination](/maps/documentation/places/web-service/reference/rest/v1/places#SubDestination)
+   * returned by the Places API, this list of sub-destinations is more
+   * exhaustive, and each sub-destination contains more information.
+   * 
+ * + * repeated .google.maps.geocode.v4.PlaceView sub_destinations = 3; + */ + java.util.List + getSubDestinationsOrBuilderList(); + + /** + * + * + *
+   * More precise sub-destinations of the primary place. For example, units
+   * contained in a building.
+   *
+   * Note: compared to the
+   * [SubDestination](/maps/documentation/places/web-service/reference/rest/v1/places#SubDestination)
+   * returned by the Places API, this list of sub-destinations is more
+   * exhaustive, and each sub-destination contains more information.
+   * 
+ * + * repeated .google.maps.geocode.v4.PlaceView sub_destinations = 3; + */ + com.google.maps.geocode.v4.PlaceViewOrBuilder getSubDestinationsOrBuilder(int index); + + /** + * + * + *
+   * Landmarks that can be used to communicate where the destination is
+   * or help with arrival.
+   * 
+ * + * repeated .google.maps.geocode.v4.Landmark landmarks = 4; + */ + java.util.List getLandmarksList(); + + /** + * + * + *
+   * Landmarks that can be used to communicate where the destination is
+   * or help with arrival.
+   * 
+ * + * repeated .google.maps.geocode.v4.Landmark landmarks = 4; + */ + com.google.maps.geocode.v4.Landmark getLandmarks(int index); + + /** + * + * + *
+   * Landmarks that can be used to communicate where the destination is
+   * or help with arrival.
+   * 
+ * + * repeated .google.maps.geocode.v4.Landmark landmarks = 4; + */ + int getLandmarksCount(); + + /** + * + * + *
+   * Landmarks that can be used to communicate where the destination is
+   * or help with arrival.
+   * 
+ * + * repeated .google.maps.geocode.v4.Landmark landmarks = 4; + */ + java.util.List + getLandmarksOrBuilderList(); + + /** + * + * + *
+   * Landmarks that can be used to communicate where the destination is
+   * or help with arrival.
+   * 
+ * + * repeated .google.maps.geocode.v4.Landmark landmarks = 4; + */ + com.google.maps.geocode.v4.LandmarkOrBuilder getLandmarksOrBuilder(int index); + + /** + * + * + *
+   * Entrances for this destination.
+   * 
+ * + * repeated .google.maps.geocode.v4.Entrance entrances = 5; + */ + java.util.List getEntrancesList(); + + /** + * + * + *
+   * Entrances for this destination.
+   * 
+ * + * repeated .google.maps.geocode.v4.Entrance entrances = 5; + */ + com.google.maps.geocode.v4.Entrance getEntrances(int index); + + /** + * + * + *
+   * Entrances for this destination.
+   * 
+ * + * repeated .google.maps.geocode.v4.Entrance entrances = 5; + */ + int getEntrancesCount(); + + /** + * + * + *
+   * Entrances for this destination.
+   * 
+ * + * repeated .google.maps.geocode.v4.Entrance entrances = 5; + */ + java.util.List + getEntrancesOrBuilderList(); + + /** + * + * + *
+   * Entrances for this destination.
+   * 
+ * + * repeated .google.maps.geocode.v4.Entrance entrances = 5; + */ + com.google.maps.geocode.v4.EntranceOrBuilder getEntrancesOrBuilder(int index); + + /** + * + * + *
+   * Navigation points for this destination.
+   * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint navigation_points = 6; + */ + java.util.List getNavigationPointsList(); + + /** + * + * + *
+   * Navigation points for this destination.
+   * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint navigation_points = 6; + */ + com.google.maps.geocode.v4.NavigationPoint getNavigationPoints(int index); + + /** + * + * + *
+   * Navigation points for this destination.
+   * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint navigation_points = 6; + */ + int getNavigationPointsCount(); + + /** + * + * + *
+   * Navigation points for this destination.
+   * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint navigation_points = 6; + */ + java.util.List + getNavigationPointsOrBuilderList(); + + /** + * + * + *
+   * Navigation points for this destination.
+   * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint navigation_points = 6; + */ + com.google.maps.geocode.v4.NavigationPointOrBuilder getNavigationPointsOrBuilder(int index); +} diff --git a/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/DestinationServiceProto.java b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/DestinationServiceProto.java new file mode 100644 index 000000000000..06dec00e2447 --- /dev/null +++ b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/DestinationServiceProto.java @@ -0,0 +1,343 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/maps/geocode/v4/destination_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.geocode.v4; + +@com.google.protobuf.Generated +public final class DestinationServiceProto extends com.google.protobuf.GeneratedFile { + private DestinationServiceProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DestinationServiceProto"); + } + + 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_geocode_v4_SearchDestinationsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_maps_geocode_v4_SearchDestinationsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_geocode_v4_SearchDestinationsRequest_AddressQuery_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_maps_geocode_v4_SearchDestinationsRequest_AddressQuery_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_geocode_v4_SearchDestinationsRequest_LocationQuery_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_maps_geocode_v4_SearchDestinationsRequest_LocationQuery_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_geocode_v4_SearchDestinationsRequest_LocationQuery_PlaceFilter_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_maps_geocode_v4_SearchDestinationsRequest_LocationQuery_PlaceFilter_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_geocode_v4_SearchDestinationsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_maps_geocode_v4_SearchDestinationsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_geocode_v4_Destination_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_maps_geocode_v4_Destination_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_geocode_v4_PlaceView_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_maps_geocode_v4_PlaceView_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_geocode_v4_Entrance_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_maps_geocode_v4_Entrance_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_geocode_v4_NavigationPoint_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_maps_geocode_v4_NavigationPoint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_geocode_v4_Landmark_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_maps_geocode_v4_Landmark_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + "0google/maps/geocode/v4/destination_ser" + + "vice.proto\022\026google.maps.geocode.v4\032\034goog" + + "le/api/annotations.proto\032\027google/api/cli" + + "ent.proto\032\037google/api/field_behavior.pro" + + "to\032\034google/protobuf/struct.proto\032\030google/type/latlng.proto\032" + + " google/type/localized_text.proto\032 google/type/postal_address.proto\"\252\007\n" + + "\031SearchDestinationsRequest\022\017\n" + + "\005place\030\001 \001(\tH\000\022W\n\r" + + "address_query\030\002 \001(\0132>.g" + + "oogle.maps.geocode.v4.SearchDestinationsRequest.AddressQueryH\000\022Y\n" + + "\016location_query\030\003" + + " \001(\0132?.google.maps.geocode.v4.SearchDestinationsRequest.LocationQueryH\000\022M\n" + + "\014travel_modes\030\005" + + " \003(\01622.google.maps.geocode.v4.NavigationPoint.TravelModeB\003\340A\001\022\032\n\r" + + "language_code\030\006 \001(\tB\003\340A\001\022\030\n" + + "\013region_code\030\007 \001(\tB\003\340A\001\032^\n" + + "\014AddressQuery\022-\n" + + "\007address\030\001 \001(\0132\032.google.type.PostalAddressH\000\022\027\n\r" + + "address_query\030\002 \001(\tH\000B\006\n" + + "\004kind\032\321\003\n\r" + + "LocationQuery\022\'\n" + + "\010location\030\001 \001(\0132\023.google.type.LatLngH\000\022f\n" + + "\014place_filter\030\002 \001(\0132K.google.maps.ge" + + "ocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilterB\003\340A\001\032\246\002\n" + + "\013PlaceFilter\022L\n" + + "\016structure_type\030\002 \001(\0162/.google.maps." + + "geocode.v4.PlaceView.StructureTypeB\003\340A\001\022w\n" + + "\016addressability\030\003 \001(\0162Z.google.maps.ge" + + "ocode.v4.SearchDestinationsRequest.Locat" + + "ionQuery.PlaceFilter.AddressabilityB\003\340A\001\"P\n" + + "\016Addressability\022\036\n" + + "\032ADDRESSABILITY_UNSPECIFIED\020\000\022\007\n" + + "\003ANY\020\001\022\013\n" + + "\007PRIMARY\020\002\022\010\n" + + "\004WEAK\020\003B\006\n" + + "\004kindB\017\n\r" + + "primary_query\"W\n" + + "\032SearchDestinationsResponse\0229\n" + + "\014destinations\030\001 \003(\0132#.google.maps.geocode.v4.Destination\"\352\002\n" + + "\013Destination\0222\n" + + "\007primary\030\001 \001(\0132!.google.maps.geocode.v4.PlaceView\022<\n" + + "\021containing_places\030\002 \003(\0132!.google.maps.geocode.v4.PlaceView\022;\n" + + "\020sub_destinations\030\003 \003(\0132!.google.maps.geocode.v4.PlaceView\0223\n" + + "\tlandmarks\030\004 \003(\0132 .google.maps.geocode.v4.Landmark\0223\n" + + "\tentrances\030\005 \003(\0132 .google.maps.geocode.v4.Entrance\022B\n" + + "\021navigation_points\030\006 \003(\013" + + "2\'.google.maps.geocode.v4.NavigationPoint\"\330\003\n" + + "\tPlaceView\022\r\n" + + "\005place\030\001 \001(\t\022\020\n" + + "\010place_id\030\002 \001(\t\0220\n" + + "\014display_name\030\003 \001(\0132\032.google.type.LocalizedText\022\024\n" + + "\014primary_type\030\004 \001(\t\022\r\n" + + "\005types\030\005 \003(\t\022\031\n" + + "\021formatted_address\030\006 \001(\t\0222\n" + + "\016postal_address\030\007 \001(\0132\032.google.type.PostalAddress\022G\n" + + "\016structure_type\030\010 \001(\0162/" + + ".google.maps.geocode.v4.PlaceView.StructureType\022%\n" + + "\010location\030\t \001(\0132\023.google.type.LatLng\0220\n" + + "\017display_polygon\030\n" + + " \001(\0132\027.google.protobuf.Struct\"b\n\r" + + "StructureType\022\036\n" + + "\032STRUCTURE_TYPE_UNSPECIFIED\020\000\022\t\n" + + "\005POINT\020\001\022\013\n" + + "\007SECTION\020\002\022\014\n" + + "\010BUILDING\020\003\022\013\n" + + "\007GROUNDS\020\004\"\237\001\n" + + "\010Entrance\022%\n" + + "\010location\030\002 \001(\0132\023.google.type.LatLng\0222\n" + + "\004tags\030\003 \003(\0162$.google.maps.geocode.v4.Entrance.Tag\022\r\n" + + "\005place\030\004 \001(\t\")\n" + + "\003Tag\022\023\n" + + "\017TAG_UNSPECIFIED\020\000\022\r\n" + + "\tPREFERRED\020\001\"\253\003\n" + + "\017NavigationPoint\022#\n" + + "\026navigation_point_token\030\001 \001(\tB\003\340A\003\0220\n" + + "\014display_name\030\002 \001(\0132\032.google.type.LocalizedText\022%\n" + + "\010location\030\003 \001(\0132\023.google.type.LatLng\022H\n" + + "\014travel_modes\030\004" + + " \003(\01622.google.maps.geocode.v4.NavigationPoint.TravelMode\022=\n" + + "\006usages\030\005 \003(\0162-.google.maps.geocode.v4.NavigationPoint.Usage\">\n\n" + + "TravelMode\022\033\n" + + "\027TRAVEL_MODE_UNSPECIFIED\020\000\022\t\n" + + "\005DRIVE\020\001\022\010\n" + + "\004WALK\020\002\"Q\n" + + "\005Usage\022\025\n" + + "\021USAGE_UNSPECIFIED\020\000\022\013\n" + + "\007UNKNOWN\020\001\022\013\n" + + "\007DROPOFF\020\002\022\n\n" + + "\006PICKUP\020\003\022\013\n" + + "\007PARKING\020\004\"\301\002\n" + + "\010Landmark\0222\n" + + "\005place\030\001 \001(\0132!.google.maps.geocode.v4.PlaceViewH\000\022:\n" + + "\026relational_description\030\002 \001(\0132\032.google.type.LocalizedText\0222\n" + + "\004tags\030\003 \003(\0162$.google.maps.geocode.v4.Landmark.Tag\022*\n" + + "\035straight_line_distance_meters\030\004 \001(\001B\003\340A\003\022#\n" + + "\026travel_distance_meters\030\005 \001(\001B\003\340A\003\"4\n" + + "\003Tag\022\023\n" + + "\017TAG_UNSPECIFIED\020\000\022\013\n" + + "\007ADDRESS\020\001\022\013\n" + + "\007ARRIVAL\020\002B\n\n" + + "\010landmark2\200\003\n" + + "\022DestinationService\022\240\001\n" + + "\022SearchDestinations\0221.google.maps.geocode.v4.SearchDestinatio" + + "nsRequest\0322.google.maps.geocode.v4.Searc" + + "hDestinationsResponse\"#\202\323\344\223\002\035\"\030/v4/geocode/destinations:\001*\032\306\001\312A" + + " geocoding-backend.googleapis.com\322A\237\001https://www.googleap" + + "is.com/auth/cloud-platform,https://www.googleapis.com/auth/maps-platform.destina" + + "tions,https://www.googleapis.com/auth/maps-platform.geocodeB\310\001\n" + + "\032com.google.maps.geocode.v4B\027DestinationServiceProtoP\001Z:c" + + "loud.google.com/go/maps/geocode/apiv4/ge" + + "ocodepb;geocodepb\242\002\004GMPG\252\002\026Google.Maps.G" + + "eocode.V4\312\002\026Google\\Maps\\Geocode\\V4\352\002\031Goo" + + "gle::Maps::Geocode::V4b\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.protobuf.StructProto.getDescriptor(), + com.google.type.LatLngProto.getDescriptor(), + com.google.type.LocalizedTextProto.getDescriptor(), + com.google.type.PostalAddressProto.getDescriptor(), + }); + internal_static_google_maps_geocode_v4_SearchDestinationsRequest_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_maps_geocode_v4_SearchDestinationsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_maps_geocode_v4_SearchDestinationsRequest_descriptor, + new java.lang.String[] { + "Place", + "AddressQuery", + "LocationQuery", + "TravelModes", + "LanguageCode", + "RegionCode", + "PrimaryQuery", + }); + internal_static_google_maps_geocode_v4_SearchDestinationsRequest_AddressQuery_descriptor = + internal_static_google_maps_geocode_v4_SearchDestinationsRequest_descriptor.getNestedType( + 0); + internal_static_google_maps_geocode_v4_SearchDestinationsRequest_AddressQuery_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_maps_geocode_v4_SearchDestinationsRequest_AddressQuery_descriptor, + new java.lang.String[] { + "Address", "AddressQuery", "Kind", + }); + internal_static_google_maps_geocode_v4_SearchDestinationsRequest_LocationQuery_descriptor = + internal_static_google_maps_geocode_v4_SearchDestinationsRequest_descriptor.getNestedType( + 1); + internal_static_google_maps_geocode_v4_SearchDestinationsRequest_LocationQuery_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_maps_geocode_v4_SearchDestinationsRequest_LocationQuery_descriptor, + new java.lang.String[] { + "Location", "PlaceFilter", "Kind", + }); + internal_static_google_maps_geocode_v4_SearchDestinationsRequest_LocationQuery_PlaceFilter_descriptor = + internal_static_google_maps_geocode_v4_SearchDestinationsRequest_LocationQuery_descriptor + .getNestedType(0); + internal_static_google_maps_geocode_v4_SearchDestinationsRequest_LocationQuery_PlaceFilter_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_maps_geocode_v4_SearchDestinationsRequest_LocationQuery_PlaceFilter_descriptor, + new java.lang.String[] { + "StructureType", "Addressability", + }); + internal_static_google_maps_geocode_v4_SearchDestinationsResponse_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_maps_geocode_v4_SearchDestinationsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_maps_geocode_v4_SearchDestinationsResponse_descriptor, + new java.lang.String[] { + "Destinations", + }); + internal_static_google_maps_geocode_v4_Destination_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_maps_geocode_v4_Destination_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_maps_geocode_v4_Destination_descriptor, + new java.lang.String[] { + "Primary", + "ContainingPlaces", + "SubDestinations", + "Landmarks", + "Entrances", + "NavigationPoints", + }); + internal_static_google_maps_geocode_v4_PlaceView_descriptor = getDescriptor().getMessageType(3); + internal_static_google_maps_geocode_v4_PlaceView_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_maps_geocode_v4_PlaceView_descriptor, + new java.lang.String[] { + "Place", + "PlaceId", + "DisplayName", + "PrimaryType", + "Types", + "FormattedAddress", + "PostalAddress", + "StructureType", + "Location", + "DisplayPolygon", + }); + internal_static_google_maps_geocode_v4_Entrance_descriptor = getDescriptor().getMessageType(4); + internal_static_google_maps_geocode_v4_Entrance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_maps_geocode_v4_Entrance_descriptor, + new java.lang.String[] { + "Location", "Tags", "Place", + }); + internal_static_google_maps_geocode_v4_NavigationPoint_descriptor = + getDescriptor().getMessageType(5); + internal_static_google_maps_geocode_v4_NavigationPoint_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_maps_geocode_v4_NavigationPoint_descriptor, + new java.lang.String[] { + "NavigationPointToken", "DisplayName", "Location", "TravelModes", "Usages", + }); + internal_static_google_maps_geocode_v4_Landmark_descriptor = getDescriptor().getMessageType(6); + internal_static_google_maps_geocode_v4_Landmark_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_maps_geocode_v4_Landmark_descriptor, + new java.lang.String[] { + "Place", + "RelationalDescription", + "Tags", + "StraightLineDistanceMeters", + "TravelDistanceMeters", + "Landmark", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + com.google.type.LatLngProto.getDescriptor(); + com.google.type.LocalizedTextProto.getDescriptor(); + com.google.type.PostalAddressProto.getDescriptor(); + 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); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/Entrance.java b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/Entrance.java new file mode 100644 index 000000000000..840d5d4b8ef0 --- /dev/null +++ b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/Entrance.java @@ -0,0 +1,1463 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/maps/geocode/v4/destination_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.geocode.v4; + +/** + * + * + *
+ * An entrance is a single latitude/longitude coordinate pair that defines the
+ * location of an entry and exit point for a place.
+ * 
+ * + * Protobuf type {@code google.maps.geocode.v4.Entrance} + */ +@com.google.protobuf.Generated +public final class Entrance extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.maps.geocode.v4.Entrance) + EntranceOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Entrance"); + } + + // Use Entrance.newBuilder() to construct. + private Entrance(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Entrance() { + tags_ = emptyIntList(); + place_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_Entrance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_Entrance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.Entrance.class, + com.google.maps.geocode.v4.Entrance.Builder.class); + } + + /** + * + * + *
+   * Characteristics that describe an entrance.
+   * 
+ * + * Protobuf enum {@code google.maps.geocode.v4.Entrance.Tag} + */ + public enum Tag implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not used.
+     * 
+ * + * TAG_UNSPECIFIED = 0; + */ + TAG_UNSPECIFIED(0), + /** + * + * + *
+     * The entrance likely provides physical access to the primary place in
+     * the returned destination. A place can have multiple preferred entrances.
+     * If an entrance does not have this tag, it means the entrance is
+     * physically on the same building as the primary place, but does not
+     * necessarily provide access to the place.
+     *
+     * For example, if the primary place is a restaurant in a strip mall, the
+     * "PREFERRED" entrances will be the ones that likely lead into the
+     * restaurant itself, while the other returned entrances will be other
+     * entrances for the building, such as entrances into other restaurants in
+     * the strip mall.
+     *
+     * If the primary place is a building itself, the `PREFERRED` entrances
+     * will be the ones that lead into the "main" part of the building. For
+     * example, in a shopping center the `PREFERRED` entrances will be the ones
+     * that allow access to the main foyer area, but if an entrance only
+     * provides access to a store on the side of the building, it won't be a
+     * `PREFERRED` entrance.
+     *
+     * Note: a `PREFERRED` entrance might not provide access to the primary
+     * place, and a non-`PREFERRED` entrance might provide access to the
+     * primary place.
+     * 
+ * + * PREFERRED = 1; + */ + PREFERRED(1), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Tag"); + } + + /** + * + * + *
+     * Not used.
+     * 
+ * + * TAG_UNSPECIFIED = 0; + */ + public static final int TAG_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The entrance likely provides physical access to the primary place in
+     * the returned destination. A place can have multiple preferred entrances.
+     * If an entrance does not have this tag, it means the entrance is
+     * physically on the same building as the primary place, but does not
+     * necessarily provide access to the place.
+     *
+     * For example, if the primary place is a restaurant in a strip mall, the
+     * "PREFERRED" entrances will be the ones that likely lead into the
+     * restaurant itself, while the other returned entrances will be other
+     * entrances for the building, such as entrances into other restaurants in
+     * the strip mall.
+     *
+     * If the primary place is a building itself, the `PREFERRED` entrances
+     * will be the ones that lead into the "main" part of the building. For
+     * example, in a shopping center the `PREFERRED` entrances will be the ones
+     * that allow access to the main foyer area, but if an entrance only
+     * provides access to a store on the side of the building, it won't be a
+     * `PREFERRED` entrance.
+     *
+     * Note: a `PREFERRED` entrance might not provide access to the primary
+     * place, and a non-`PREFERRED` entrance might provide access to the
+     * primary place.
+     * 
+ * + * PREFERRED = 1; + */ + public static final int PREFERRED_VALUE = 1; + + 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 Tag 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 Tag forNumber(int value) { + switch (value) { + case 0: + return TAG_UNSPECIFIED; + case 1: + return PREFERRED; + 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 Tag findValueByNumber(int number) { + return Tag.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.maps.geocode.v4.Entrance.getDescriptor().getEnumTypes().get(0); + } + + private static final Tag[] VALUES = values(); + + public static Tag 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 Tag(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.maps.geocode.v4.Entrance.Tag) + } + + private int bitField0_; + public static final int LOCATION_FIELD_NUMBER = 2; + private com.google.type.LatLng location_; + + /** + * + * + *
+   * The location of the entrance.
+   * 
+ * + * .google.type.LatLng location = 2; + * + * @return Whether the location field is set. + */ + @java.lang.Override + public boolean hasLocation() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * The location of the entrance.
+   * 
+ * + * .google.type.LatLng location = 2; + * + * @return The location. + */ + @java.lang.Override + public com.google.type.LatLng getLocation() { + return location_ == null ? com.google.type.LatLng.getDefaultInstance() : location_; + } + + /** + * + * + *
+   * The location of the entrance.
+   * 
+ * + * .google.type.LatLng location = 2; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getLocationOrBuilder() { + return location_ == null ? com.google.type.LatLng.getDefaultInstance() : location_; + } + + public static final int TAGS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList tags_ = emptyIntList(); + + private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.maps.geocode.v4.Entrance.Tag> + tags_converter_ = + new com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.maps.geocode.v4.Entrance.Tag>() { + public com.google.maps.geocode.v4.Entrance.Tag convert(int from) { + com.google.maps.geocode.v4.Entrance.Tag result = + com.google.maps.geocode.v4.Entrance.Tag.forNumber(from); + return result == null ? com.google.maps.geocode.v4.Entrance.Tag.UNRECOGNIZED : result; + } + }; + + /** + * + * + *
+   * A list of tags that describe the entrance.
+   * 
+ * + * repeated .google.maps.geocode.v4.Entrance.Tag tags = 3; + * + * @return A list containing the tags. + */ + @java.lang.Override + public java.util.List getTagsList() { + return new com.google.protobuf.Internal.IntListAdapter( + tags_, tags_converter_); + } + + /** + * + * + *
+   * A list of tags that describe the entrance.
+   * 
+ * + * repeated .google.maps.geocode.v4.Entrance.Tag tags = 3; + * + * @return The count of tags. + */ + @java.lang.Override + public int getTagsCount() { + return tags_.size(); + } + + /** + * + * + *
+   * A list of tags that describe the entrance.
+   * 
+ * + * repeated .google.maps.geocode.v4.Entrance.Tag tags = 3; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + @java.lang.Override + public com.google.maps.geocode.v4.Entrance.Tag getTags(int index) { + return tags_converter_.convert(tags_.getInt(index)); + } + + /** + * + * + *
+   * A list of tags that describe the entrance.
+   * 
+ * + * repeated .google.maps.geocode.v4.Entrance.Tag tags = 3; + * + * @return A list containing the enum numeric values on the wire for tags. + */ + @java.lang.Override + public java.util.List getTagsValueList() { + return tags_; + } + + /** + * + * + *
+   * A list of tags that describe the entrance.
+   * 
+ * + * repeated .google.maps.geocode.v4.Entrance.Tag tags = 3; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of tags at the given index. + */ + @java.lang.Override + public int getTagsValue(int index) { + return tags_.getInt(index); + } + + private int tagsMemoizedSerializedSize; + + public static final int PLACE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object place_ = ""; + + /** + * + * + *
+   * The structure this entrance is physically located on, in
+   * `places/{place_id}` format.
+   * 
+ * + * string place = 4; + * + * @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 structure this entrance is physically located on, in
+   * `places/{place_id}` format.
+   * 
+ * + * string place = 4; + * + * @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 { + getSerializedSize(); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getLocation()); + } + if (getTagsList().size() > 0) { + output.writeUInt32NoTag(26); + output.writeUInt32NoTag(tagsMemoizedSerializedSize); + } + for (int i = 0; i < tags_.size(); i++) { + output.writeEnumNoTag(tags_.getInt(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(place_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, place_); + } + 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(2, getLocation()); + } + { + int dataSize = 0; + for (int i = 0; i < tags_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(tags_.getInt(i)); + } + size += dataSize; + if (!getTagsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + tagsMemoizedSerializedSize = dataSize; + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(place_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, 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.geocode.v4.Entrance)) { + return super.equals(obj); + } + com.google.maps.geocode.v4.Entrance other = (com.google.maps.geocode.v4.Entrance) obj; + + if (hasLocation() != other.hasLocation()) return false; + if (hasLocation()) { + if (!getLocation().equals(other.getLocation())) return false; + } + if (!tags_.equals(other.tags_)) return false; + 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(); + if (hasLocation()) { + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + } + if (getTagsCount() > 0) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + tags_.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.geocode.v4.Entrance parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.Entrance 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.geocode.v4.Entrance parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.Entrance 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.geocode.v4.Entrance parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.Entrance parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.geocode.v4.Entrance parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.Entrance parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.Entrance parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.Entrance parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.Entrance parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.Entrance parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geocode.v4.Entrance 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * An entrance is a single latitude/longitude coordinate pair that defines the
+   * location of an entry and exit point for a place.
+   * 
+ * + * Protobuf type {@code google.maps.geocode.v4.Entrance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.geocode.v4.Entrance) + com.google.maps.geocode.v4.EntranceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_Entrance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_Entrance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.Entrance.class, + com.google.maps.geocode.v4.Entrance.Builder.class); + } + + // Construct using com.google.maps.geocode.v4.Entrance.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetLocationFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + location_ = null; + if (locationBuilder_ != null) { + locationBuilder_.dispose(); + locationBuilder_ = null; + } + tags_ = emptyIntList(); + place_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_Entrance_descriptor; + } + + @java.lang.Override + public com.google.maps.geocode.v4.Entrance getDefaultInstanceForType() { + return com.google.maps.geocode.v4.Entrance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.geocode.v4.Entrance build() { + com.google.maps.geocode.v4.Entrance result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.geocode.v4.Entrance buildPartial() { + com.google.maps.geocode.v4.Entrance result = new com.google.maps.geocode.v4.Entrance(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.geocode.v4.Entrance result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.location_ = locationBuilder_ == null ? location_ : locationBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + tags_.makeImmutable(); + result.tags_ = tags_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.place_ = place_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.geocode.v4.Entrance) { + return mergeFrom((com.google.maps.geocode.v4.Entrance) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.geocode.v4.Entrance other) { + if (other == com.google.maps.geocode.v4.Entrance.getDefaultInstance()) return this; + if (other.hasLocation()) { + mergeLocation(other.getLocation()); + } + if (!other.tags_.isEmpty()) { + if (tags_.isEmpty()) { + tags_ = other.tags_; + tags_.makeImmutable(); + bitField0_ |= 0x00000002; + } else { + ensureTagsIsMutable(); + tags_.addAll(other.tags_); + } + onChanged(); + } + if (!other.getPlace().isEmpty()) { + place_ = other.place_; + bitField0_ |= 0x00000004; + 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 18: + { + input.readMessage( + internalGetLocationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 18 + case 24: + { + int tmpRaw = input.readEnum(); + ensureTagsIsMutable(); + tags_.addInt(tmpRaw); + break; + } // case 24 + case 26: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureTagsIsMutable(); + while (input.getBytesUntilLimit() > 0) { + tags_.addInt(input.readEnum()); + } + input.popLimit(limit); + break; + } // case 26 + case 34: + { + place_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + 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.type.LatLng location_; + private com.google.protobuf.SingleFieldBuilder< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + locationBuilder_; + + /** + * + * + *
+     * The location of the entrance.
+     * 
+ * + * .google.type.LatLng location = 2; + * + * @return Whether the location field is set. + */ + public boolean hasLocation() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * The location of the entrance.
+     * 
+ * + * .google.type.LatLng location = 2; + * + * @return The location. + */ + public com.google.type.LatLng getLocation() { + if (locationBuilder_ == null) { + return location_ == null ? com.google.type.LatLng.getDefaultInstance() : location_; + } else { + return locationBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The location of the entrance.
+     * 
+ * + * .google.type.LatLng location = 2; + */ + public Builder setLocation(com.google.type.LatLng value) { + if (locationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + } else { + locationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The location of the entrance.
+     * 
+ * + * .google.type.LatLng location = 2; + */ + public Builder setLocation(com.google.type.LatLng.Builder builderForValue) { + if (locationBuilder_ == null) { + location_ = builderForValue.build(); + } else { + locationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The location of the entrance.
+     * 
+ * + * .google.type.LatLng location = 2; + */ + public Builder mergeLocation(com.google.type.LatLng value) { + if (locationBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && location_ != null + && location_ != com.google.type.LatLng.getDefaultInstance()) { + getLocationBuilder().mergeFrom(value); + } else { + location_ = value; + } + } else { + locationBuilder_.mergeFrom(value); + } + if (location_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The location of the entrance.
+     * 
+ * + * .google.type.LatLng location = 2; + */ + public Builder clearLocation() { + bitField0_ = (bitField0_ & ~0x00000001); + location_ = null; + if (locationBuilder_ != null) { + locationBuilder_.dispose(); + locationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The location of the entrance.
+     * 
+ * + * .google.type.LatLng location = 2; + */ + public com.google.type.LatLng.Builder getLocationBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetLocationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The location of the entrance.
+     * 
+ * + * .google.type.LatLng location = 2; + */ + public com.google.type.LatLngOrBuilder getLocationOrBuilder() { + if (locationBuilder_ != null) { + return locationBuilder_.getMessageOrBuilder(); + } else { + return location_ == null ? com.google.type.LatLng.getDefaultInstance() : location_; + } + } + + /** + * + * + *
+     * The location of the entrance.
+     * 
+ * + * .google.type.LatLng location = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + internalGetLocationFieldBuilder() { + if (locationBuilder_ == null) { + locationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.LatLng, + com.google.type.LatLng.Builder, + com.google.type.LatLngOrBuilder>(getLocation(), getParentForChildren(), isClean()); + location_ = null; + } + return locationBuilder_; + } + + private com.google.protobuf.Internal.IntList tags_ = emptyIntList(); + + private void ensureTagsIsMutable() { + if (!tags_.isModifiable()) { + tags_ = makeMutableCopy(tags_); + } + bitField0_ |= 0x00000002; + } + + /** + * + * + *
+     * A list of tags that describe the entrance.
+     * 
+ * + * repeated .google.maps.geocode.v4.Entrance.Tag tags = 3; + * + * @return A list containing the tags. + */ + public java.util.List getTagsList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.maps.geocode.v4.Entrance.Tag>(tags_, tags_converter_); + } + + /** + * + * + *
+     * A list of tags that describe the entrance.
+     * 
+ * + * repeated .google.maps.geocode.v4.Entrance.Tag tags = 3; + * + * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + + /** + * + * + *
+     * A list of tags that describe the entrance.
+     * 
+ * + * repeated .google.maps.geocode.v4.Entrance.Tag tags = 3; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + public com.google.maps.geocode.v4.Entrance.Tag getTags(int index) { + return tags_converter_.convert(tags_.getInt(index)); + } + + /** + * + * + *
+     * A list of tags that describe the entrance.
+     * 
+ * + * repeated .google.maps.geocode.v4.Entrance.Tag tags = 3; + * + * @param index The index to set the value at. + * @param value The tags to set. + * @return This builder for chaining. + */ + public Builder setTags(int index, com.google.maps.geocode.v4.Entrance.Tag value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.setInt(index, value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
+     * A list of tags that describe the entrance.
+     * 
+ * + * repeated .google.maps.geocode.v4.Entrance.Tag tags = 3; + * + * @param value The tags to add. + * @return This builder for chaining. + */ + public Builder addTags(com.google.maps.geocode.v4.Entrance.Tag value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.addInt(value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
+     * A list of tags that describe the entrance.
+     * 
+ * + * repeated .google.maps.geocode.v4.Entrance.Tag tags = 3; + * + * @param values The tags to add. + * @return This builder for chaining. + */ + public Builder addAllTags( + java.lang.Iterable values) { + ensureTagsIsMutable(); + for (com.google.maps.geocode.v4.Entrance.Tag value : values) { + tags_.addInt(value.getNumber()); + } + onChanged(); + return this; + } + + /** + * + * + *
+     * A list of tags that describe the entrance.
+     * 
+ * + * repeated .google.maps.geocode.v4.Entrance.Tag tags = 3; + * + * @return This builder for chaining. + */ + public Builder clearTags() { + tags_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A list of tags that describe the entrance.
+     * 
+ * + * repeated .google.maps.geocode.v4.Entrance.Tag tags = 3; + * + * @return A list containing the enum numeric values on the wire for tags. + */ + public java.util.List getTagsValueList() { + tags_.makeImmutable(); + return tags_; + } + + /** + * + * + *
+     * A list of tags that describe the entrance.
+     * 
+ * + * repeated .google.maps.geocode.v4.Entrance.Tag tags = 3; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of tags at the given index. + */ + public int getTagsValue(int index) { + return tags_.getInt(index); + } + + /** + * + * + *
+     * A list of tags that describe the entrance.
+     * 
+ * + * repeated .google.maps.geocode.v4.Entrance.Tag tags = 3; + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for tags to set. + * @return This builder for chaining. + */ + public Builder setTagsValue(int index, int value) { + ensureTagsIsMutable(); + tags_.setInt(index, value); + onChanged(); + return this; + } + + /** + * + * + *
+     * A list of tags that describe the entrance.
+     * 
+ * + * repeated .google.maps.geocode.v4.Entrance.Tag tags = 3; + * + * @param value The enum numeric value on the wire for tags to add. + * @return This builder for chaining. + */ + public Builder addTagsValue(int value) { + ensureTagsIsMutable(); + tags_.addInt(value); + onChanged(); + return this; + } + + /** + * + * + *
+     * A list of tags that describe the entrance.
+     * 
+ * + * repeated .google.maps.geocode.v4.Entrance.Tag tags = 3; + * + * @param values The enum numeric values on the wire for tags to add. + * @return This builder for chaining. + */ + public Builder addAllTagsValue(java.lang.Iterable values) { + ensureTagsIsMutable(); + for (int value : values) { + tags_.addInt(value); + } + onChanged(); + return this; + } + + private java.lang.Object place_ = ""; + + /** + * + * + *
+     * The structure this entrance is physically located on, in
+     * `places/{place_id}` format.
+     * 
+ * + * string place = 4; + * + * @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 structure this entrance is physically located on, in
+     * `places/{place_id}` format.
+     * 
+ * + * string place = 4; + * + * @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 structure this entrance is physically located on, in
+     * `places/{place_id}` format.
+     * 
+ * + * string place = 4; + * + * @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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The structure this entrance is physically located on, in
+     * `places/{place_id}` format.
+     * 
+ * + * string place = 4; + * + * @return This builder for chaining. + */ + public Builder clearPlace() { + place_ = getDefaultInstance().getPlace(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * The structure this entrance is physically located on, in
+     * `places/{place_id}` format.
+     * 
+ * + * string place = 4; + * + * @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_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.maps.geocode.v4.Entrance) + } + + // @@protoc_insertion_point(class_scope:google.maps.geocode.v4.Entrance) + private static final com.google.maps.geocode.v4.Entrance DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.geocode.v4.Entrance(); + } + + public static com.google.maps.geocode.v4.Entrance getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Entrance 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.geocode.v4.Entrance getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/EntranceOrBuilder.java b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/EntranceOrBuilder.java new file mode 100644 index 000000000000..8e0ccfe1f2f8 --- /dev/null +++ b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/EntranceOrBuilder.java @@ -0,0 +1,160 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/maps/geocode/v4/destination_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.geocode.v4; + +@com.google.protobuf.Generated +public interface EntranceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.geocode.v4.Entrance) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The location of the entrance.
+   * 
+ * + * .google.type.LatLng location = 2; + * + * @return Whether the location field is set. + */ + boolean hasLocation(); + + /** + * + * + *
+   * The location of the entrance.
+   * 
+ * + * .google.type.LatLng location = 2; + * + * @return The location. + */ + com.google.type.LatLng getLocation(); + + /** + * + * + *
+   * The location of the entrance.
+   * 
+ * + * .google.type.LatLng location = 2; + */ + com.google.type.LatLngOrBuilder getLocationOrBuilder(); + + /** + * + * + *
+   * A list of tags that describe the entrance.
+   * 
+ * + * repeated .google.maps.geocode.v4.Entrance.Tag tags = 3; + * + * @return A list containing the tags. + */ + java.util.List getTagsList(); + + /** + * + * + *
+   * A list of tags that describe the entrance.
+   * 
+ * + * repeated .google.maps.geocode.v4.Entrance.Tag tags = 3; + * + * @return The count of tags. + */ + int getTagsCount(); + + /** + * + * + *
+   * A list of tags that describe the entrance.
+   * 
+ * + * repeated .google.maps.geocode.v4.Entrance.Tag tags = 3; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + com.google.maps.geocode.v4.Entrance.Tag getTags(int index); + + /** + * + * + *
+   * A list of tags that describe the entrance.
+   * 
+ * + * repeated .google.maps.geocode.v4.Entrance.Tag tags = 3; + * + * @return A list containing the enum numeric values on the wire for tags. + */ + java.util.List getTagsValueList(); + + /** + * + * + *
+   * A list of tags that describe the entrance.
+   * 
+ * + * repeated .google.maps.geocode.v4.Entrance.Tag tags = 3; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of tags at the given index. + */ + int getTagsValue(int index); + + /** + * + * + *
+   * The structure this entrance is physically located on, in
+   * `places/{place_id}` format.
+   * 
+ * + * string place = 4; + * + * @return The place. + */ + java.lang.String getPlace(); + + /** + * + * + *
+   * The structure this entrance is physically located on, in
+   * `places/{place_id}` format.
+   * 
+ * + * string place = 4; + * + * @return The bytes for place. + */ + com.google.protobuf.ByteString getPlaceBytes(); +} diff --git a/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodeAddressRequest.java b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodeAddressRequest.java new file mode 100644 index 000000000000..d192b88ec2ec --- /dev/null +++ b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodeAddressRequest.java @@ -0,0 +1,2670 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/maps/geocode/v4/geocode_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.geocode.v4; + +/** + * + * + *
+ * Request message for GeocodeService.GeocodeAddress.
+ * 
+ * + * Protobuf type {@code google.maps.geocode.v4.GeocodeAddressRequest} + */ +@com.google.protobuf.Generated +public final class GeocodeAddressRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.maps.geocode.v4.GeocodeAddressRequest) + GeocodeAddressRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GeocodeAddressRequest"); + } + + // Use GeocodeAddressRequest.newBuilder() to construct. + private GeocodeAddressRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GeocodeAddressRequest() { + languageCode_ = ""; + regionCode_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodeAddressRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodeAddressRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.GeocodeAddressRequest.class, + com.google.maps.geocode.v4.GeocodeAddressRequest.Builder.class); + } + + public interface LocationBiasOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.geocode.v4.GeocodeAddressRequest.LocationBias) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * A rectangular box defined by northeast and southwest corner.
+     * `rectangle.high()` must be the northeast point of the rectangle
+     * viewport. `rectangle.low()` must be the southwest point of the
+     * rectangle viewport. `rectangle.low().latitude()` cannot be greater than
+     * `rectangle.high().latitude()`. This will result in an empty latitude
+     * range. A rectangle viewport cannot be wider than 180 degrees.
+     * 
+ * + * .google.geo.type.Viewport rectangle = 1; + * + * @return Whether the rectangle field is set. + */ + boolean hasRectangle(); + + /** + * + * + *
+     * A rectangular box defined by northeast and southwest corner.
+     * `rectangle.high()` must be the northeast point of the rectangle
+     * viewport. `rectangle.low()` must be the southwest point of the
+     * rectangle viewport. `rectangle.low().latitude()` cannot be greater than
+     * `rectangle.high().latitude()`. This will result in an empty latitude
+     * range. A rectangle viewport cannot be wider than 180 degrees.
+     * 
+ * + * .google.geo.type.Viewport rectangle = 1; + * + * @return The rectangle. + */ + com.google.geo.type.Viewport getRectangle(); + + /** + * + * + *
+     * A rectangular box defined by northeast and southwest corner.
+     * `rectangle.high()` must be the northeast point of the rectangle
+     * viewport. `rectangle.low()` must be the southwest point of the
+     * rectangle viewport. `rectangle.low().latitude()` cannot be greater than
+     * `rectangle.high().latitude()`. This will result in an empty latitude
+     * range. A rectangle viewport cannot be wider than 180 degrees.
+     * 
+ * + * .google.geo.type.Viewport rectangle = 1; + */ + com.google.geo.type.ViewportOrBuilder getRectangleOrBuilder(); + + com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias.TypeCase getTypeCase(); + } + + /** + * + * + *
+   * The region to search. This location serves as a bias which means results
+   * around the given location are preferred.
+   * 
+ * + * Protobuf type {@code google.maps.geocode.v4.GeocodeAddressRequest.LocationBias} + */ + public static final class LocationBias extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.maps.geocode.v4.GeocodeAddressRequest.LocationBias) + LocationBiasOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "LocationBias"); + } + + // Use LocationBias.newBuilder() to construct. + private LocationBias(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private LocationBias() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodeAddressRequest_LocationBias_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodeAddressRequest_LocationBias_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias.class, + com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias.Builder.class); + } + + private int typeCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object type_; + + public enum TypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + RECTANGLE(1), + TYPE_NOT_SET(0); + private final int value; + + private TypeCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TypeCase valueOf(int value) { + return forNumber(value); + } + + public static TypeCase forNumber(int value) { + switch (value) { + case 1: + return RECTANGLE; + case 0: + return TYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TypeCase getTypeCase() { + return TypeCase.forNumber(typeCase_); + } + + public static final int RECTANGLE_FIELD_NUMBER = 1; + + /** + * + * + *
+     * A rectangular box defined by northeast and southwest corner.
+     * `rectangle.high()` must be the northeast point of the rectangle
+     * viewport. `rectangle.low()` must be the southwest point of the
+     * rectangle viewport. `rectangle.low().latitude()` cannot be greater than
+     * `rectangle.high().latitude()`. This will result in an empty latitude
+     * range. A rectangle viewport cannot be wider than 180 degrees.
+     * 
+ * + * .google.geo.type.Viewport rectangle = 1; + * + * @return Whether the rectangle field is set. + */ + @java.lang.Override + public boolean hasRectangle() { + return typeCase_ == 1; + } + + /** + * + * + *
+     * A rectangular box defined by northeast and southwest corner.
+     * `rectangle.high()` must be the northeast point of the rectangle
+     * viewport. `rectangle.low()` must be the southwest point of the
+     * rectangle viewport. `rectangle.low().latitude()` cannot be greater than
+     * `rectangle.high().latitude()`. This will result in an empty latitude
+     * range. A rectangle viewport cannot be wider than 180 degrees.
+     * 
+ * + * .google.geo.type.Viewport rectangle = 1; + * + * @return The rectangle. + */ + @java.lang.Override + public com.google.geo.type.Viewport getRectangle() { + if (typeCase_ == 1) { + return (com.google.geo.type.Viewport) type_; + } + return com.google.geo.type.Viewport.getDefaultInstance(); + } + + /** + * + * + *
+     * A rectangular box defined by northeast and southwest corner.
+     * `rectangle.high()` must be the northeast point of the rectangle
+     * viewport. `rectangle.low()` must be the southwest point of the
+     * rectangle viewport. `rectangle.low().latitude()` cannot be greater than
+     * `rectangle.high().latitude()`. This will result in an empty latitude
+     * range. A rectangle viewport cannot be wider than 180 degrees.
+     * 
+ * + * .google.geo.type.Viewport rectangle = 1; + */ + @java.lang.Override + public com.google.geo.type.ViewportOrBuilder getRectangleOrBuilder() { + if (typeCase_ == 1) { + return (com.google.geo.type.Viewport) type_; + } + return com.google.geo.type.Viewport.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (typeCase_ == 1) { + output.writeMessage(1, (com.google.geo.type.Viewport) type_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (typeCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.geo.type.Viewport) type_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias)) { + return super.equals(obj); + } + com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias other = + (com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias) obj; + + if (!getTypeCase().equals(other.getTypeCase())) return false; + switch (typeCase_) { + case 1: + if (!getRectangle().equals(other.getRectangle())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (typeCase_) { + case 1: + hash = (37 * hash) + RECTANGLE_FIELD_NUMBER; + hash = (53 * hash) + getRectangle().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geocode.v4.GeocodeAddressRequest.LocationBias prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * The region to search. This location serves as a bias which means results
+     * around the given location are preferred.
+     * 
+ * + * Protobuf type {@code google.maps.geocode.v4.GeocodeAddressRequest.LocationBias} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.geocode.v4.GeocodeAddressRequest.LocationBias) + com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBiasOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodeAddressRequest_LocationBias_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodeAddressRequest_LocationBias_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias.class, + com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias.Builder.class); + } + + // Construct using com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (rectangleBuilder_ != null) { + rectangleBuilder_.clear(); + } + typeCase_ = 0; + type_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodeAddressRequest_LocationBias_descriptor; + } + + @java.lang.Override + public com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias + getDefaultInstanceForType() { + return com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias build() { + com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias buildPartial() { + com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias result = + new com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias result) { + result.typeCase_ = typeCase_; + result.type_ = this.type_; + if (typeCase_ == 1 && rectangleBuilder_ != null) { + result.type_ = rectangleBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias) { + return mergeFrom((com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias other) { + if (other + == com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias.getDefaultInstance()) + return this; + switch (other.getTypeCase()) { + case RECTANGLE: + { + mergeRectangle(other.getRectangle()); + break; + } + case TYPE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetRectangleFieldBuilder().getBuilder(), extensionRegistry); + typeCase_ = 1; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int typeCase_ = 0; + private java.lang.Object type_; + + public TypeCase getTypeCase() { + return TypeCase.forNumber(typeCase_); + } + + public Builder clearType() { + typeCase_ = 0; + type_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.geo.type.Viewport, + com.google.geo.type.Viewport.Builder, + com.google.geo.type.ViewportOrBuilder> + rectangleBuilder_; + + /** + * + * + *
+       * A rectangular box defined by northeast and southwest corner.
+       * `rectangle.high()` must be the northeast point of the rectangle
+       * viewport. `rectangle.low()` must be the southwest point of the
+       * rectangle viewport. `rectangle.low().latitude()` cannot be greater than
+       * `rectangle.high().latitude()`. This will result in an empty latitude
+       * range. A rectangle viewport cannot be wider than 180 degrees.
+       * 
+ * + * .google.geo.type.Viewport rectangle = 1; + * + * @return Whether the rectangle field is set. + */ + @java.lang.Override + public boolean hasRectangle() { + return typeCase_ == 1; + } + + /** + * + * + *
+       * A rectangular box defined by northeast and southwest corner.
+       * `rectangle.high()` must be the northeast point of the rectangle
+       * viewport. `rectangle.low()` must be the southwest point of the
+       * rectangle viewport. `rectangle.low().latitude()` cannot be greater than
+       * `rectangle.high().latitude()`. This will result in an empty latitude
+       * range. A rectangle viewport cannot be wider than 180 degrees.
+       * 
+ * + * .google.geo.type.Viewport rectangle = 1; + * + * @return The rectangle. + */ + @java.lang.Override + public com.google.geo.type.Viewport getRectangle() { + if (rectangleBuilder_ == null) { + if (typeCase_ == 1) { + return (com.google.geo.type.Viewport) type_; + } + return com.google.geo.type.Viewport.getDefaultInstance(); + } else { + if (typeCase_ == 1) { + return rectangleBuilder_.getMessage(); + } + return com.google.geo.type.Viewport.getDefaultInstance(); + } + } + + /** + * + * + *
+       * A rectangular box defined by northeast and southwest corner.
+       * `rectangle.high()` must be the northeast point of the rectangle
+       * viewport. `rectangle.low()` must be the southwest point of the
+       * rectangle viewport. `rectangle.low().latitude()` cannot be greater than
+       * `rectangle.high().latitude()`. This will result in an empty latitude
+       * range. A rectangle viewport cannot be wider than 180 degrees.
+       * 
+ * + * .google.geo.type.Viewport rectangle = 1; + */ + public Builder setRectangle(com.google.geo.type.Viewport value) { + if (rectangleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + rectangleBuilder_.setMessage(value); + } + typeCase_ = 1; + return this; + } + + /** + * + * + *
+       * A rectangular box defined by northeast and southwest corner.
+       * `rectangle.high()` must be the northeast point of the rectangle
+       * viewport. `rectangle.low()` must be the southwest point of the
+       * rectangle viewport. `rectangle.low().latitude()` cannot be greater than
+       * `rectangle.high().latitude()`. This will result in an empty latitude
+       * range. A rectangle viewport cannot be wider than 180 degrees.
+       * 
+ * + * .google.geo.type.Viewport rectangle = 1; + */ + public Builder setRectangle(com.google.geo.type.Viewport.Builder builderForValue) { + if (rectangleBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + rectangleBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 1; + return this; + } + + /** + * + * + *
+       * A rectangular box defined by northeast and southwest corner.
+       * `rectangle.high()` must be the northeast point of the rectangle
+       * viewport. `rectangle.low()` must be the southwest point of the
+       * rectangle viewport. `rectangle.low().latitude()` cannot be greater than
+       * `rectangle.high().latitude()`. This will result in an empty latitude
+       * range. A rectangle viewport cannot be wider than 180 degrees.
+       * 
+ * + * .google.geo.type.Viewport rectangle = 1; + */ + public Builder mergeRectangle(com.google.geo.type.Viewport value) { + if (rectangleBuilder_ == null) { + if (typeCase_ == 1 && type_ != com.google.geo.type.Viewport.getDefaultInstance()) { + type_ = + com.google.geo.type.Viewport.newBuilder((com.google.geo.type.Viewport) type_) + .mergeFrom(value) + .buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 1) { + rectangleBuilder_.mergeFrom(value); + } else { + rectangleBuilder_.setMessage(value); + } + } + typeCase_ = 1; + return this; + } + + /** + * + * + *
+       * A rectangular box defined by northeast and southwest corner.
+       * `rectangle.high()` must be the northeast point of the rectangle
+       * viewport. `rectangle.low()` must be the southwest point of the
+       * rectangle viewport. `rectangle.low().latitude()` cannot be greater than
+       * `rectangle.high().latitude()`. This will result in an empty latitude
+       * range. A rectangle viewport cannot be wider than 180 degrees.
+       * 
+ * + * .google.geo.type.Viewport rectangle = 1; + */ + public Builder clearRectangle() { + if (rectangleBuilder_ == null) { + if (typeCase_ == 1) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 1) { + typeCase_ = 0; + type_ = null; + } + rectangleBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * A rectangular box defined by northeast and southwest corner.
+       * `rectangle.high()` must be the northeast point of the rectangle
+       * viewport. `rectangle.low()` must be the southwest point of the
+       * rectangle viewport. `rectangle.low().latitude()` cannot be greater than
+       * `rectangle.high().latitude()`. This will result in an empty latitude
+       * range. A rectangle viewport cannot be wider than 180 degrees.
+       * 
+ * + * .google.geo.type.Viewport rectangle = 1; + */ + public com.google.geo.type.Viewport.Builder getRectangleBuilder() { + return internalGetRectangleFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * A rectangular box defined by northeast and southwest corner.
+       * `rectangle.high()` must be the northeast point of the rectangle
+       * viewport. `rectangle.low()` must be the southwest point of the
+       * rectangle viewport. `rectangle.low().latitude()` cannot be greater than
+       * `rectangle.high().latitude()`. This will result in an empty latitude
+       * range. A rectangle viewport cannot be wider than 180 degrees.
+       * 
+ * + * .google.geo.type.Viewport rectangle = 1; + */ + @java.lang.Override + public com.google.geo.type.ViewportOrBuilder getRectangleOrBuilder() { + if ((typeCase_ == 1) && (rectangleBuilder_ != null)) { + return rectangleBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 1) { + return (com.google.geo.type.Viewport) type_; + } + return com.google.geo.type.Viewport.getDefaultInstance(); + } + } + + /** + * + * + *
+       * A rectangular box defined by northeast and southwest corner.
+       * `rectangle.high()` must be the northeast point of the rectangle
+       * viewport. `rectangle.low()` must be the southwest point of the
+       * rectangle viewport. `rectangle.low().latitude()` cannot be greater than
+       * `rectangle.high().latitude()`. This will result in an empty latitude
+       * range. A rectangle viewport cannot be wider than 180 degrees.
+       * 
+ * + * .google.geo.type.Viewport rectangle = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.geo.type.Viewport, + com.google.geo.type.Viewport.Builder, + com.google.geo.type.ViewportOrBuilder> + internalGetRectangleFieldBuilder() { + if (rectangleBuilder_ == null) { + if (!(typeCase_ == 1)) { + type_ = com.google.geo.type.Viewport.getDefaultInstance(); + } + rectangleBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.geo.type.Viewport, + com.google.geo.type.Viewport.Builder, + com.google.geo.type.ViewportOrBuilder>( + (com.google.geo.type.Viewport) type_, getParentForChildren(), isClean()); + type_ = null; + } + typeCase_ = 1; + onChanged(); + return rectangleBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.maps.geocode.v4.GeocodeAddressRequest.LocationBias) + } + + // @@protoc_insertion_point(class_scope:google.maps.geocode.v4.GeocodeAddressRequest.LocationBias) + private static final com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias(); + } + + public static com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LocationBias parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + private int addressInputCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object addressInput_; + + public enum AddressInputCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ADDRESS_QUERY(1), + ADDRESS(2), + ADDRESSINPUT_NOT_SET(0); + private final int value; + + private AddressInputCase(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 AddressInputCase valueOf(int value) { + return forNumber(value); + } + + public static AddressInputCase forNumber(int value) { + switch (value) { + case 1: + return ADDRESS_QUERY; + case 2: + return ADDRESS; + case 0: + return ADDRESSINPUT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public AddressInputCase getAddressInputCase() { + return AddressInputCase.forNumber(addressInputCase_); + } + + public static final int ADDRESS_QUERY_FIELD_NUMBER = 1; + + /** + * + * + *
+   * The unstructured address to geocode.
+   * 
+ * + * string address_query = 1; + * + * @return Whether the addressQuery field is set. + */ + public boolean hasAddressQuery() { + return addressInputCase_ == 1; + } + + /** + * + * + *
+   * The unstructured address to geocode.
+   * 
+ * + * string address_query = 1; + * + * @return The addressQuery. + */ + public java.lang.String getAddressQuery() { + java.lang.Object ref = ""; + if (addressInputCase_ == 1) { + ref = addressInput_; + } + 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 (addressInputCase_ == 1) { + addressInput_ = s; + } + return s; + } + } + + /** + * + * + *
+   * The unstructured address to geocode.
+   * 
+ * + * string address_query = 1; + * + * @return The bytes for addressQuery. + */ + public com.google.protobuf.ByteString getAddressQueryBytes() { + java.lang.Object ref = ""; + if (addressInputCase_ == 1) { + ref = addressInput_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (addressInputCase_ == 1) { + addressInput_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ADDRESS_FIELD_NUMBER = 2; + + /** + * + * + *
+   * The structured address to geocode in postal address format.
+   * 
+ * + * .google.type.PostalAddress address = 2; + * + * @return Whether the address field is set. + */ + @java.lang.Override + public boolean hasAddress() { + return addressInputCase_ == 2; + } + + /** + * + * + *
+   * The structured address to geocode in postal address format.
+   * 
+ * + * .google.type.PostalAddress address = 2; + * + * @return The address. + */ + @java.lang.Override + public com.google.type.PostalAddress getAddress() { + if (addressInputCase_ == 2) { + return (com.google.type.PostalAddress) addressInput_; + } + return com.google.type.PostalAddress.getDefaultInstance(); + } + + /** + * + * + *
+   * The structured address to geocode in postal address format.
+   * 
+ * + * .google.type.PostalAddress address = 2; + */ + @java.lang.Override + public com.google.type.PostalAddressOrBuilder getAddressOrBuilder() { + if (addressInputCase_ == 2) { + return (com.google.type.PostalAddress) addressInput_; + } + return com.google.type.PostalAddress.getDefaultInstance(); + } + + public static final int LOCATION_BIAS_FIELD_NUMBER = 3; + private com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias locationBias_; + + /** + * + * + *
+   * Optional. The region to search. This location serves as a bias which means
+   * results around the given location are preferred.
+   * 
+ * + * + * .google.maps.geocode.v4.GeocodeAddressRequest.LocationBias location_bias = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the locationBias field is set. + */ + @java.lang.Override + public boolean hasLocationBias() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. The region to search. This location serves as a bias which means
+   * results around the given location are preferred.
+   * 
+ * + * + * .google.maps.geocode.v4.GeocodeAddressRequest.LocationBias location_bias = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The locationBias. + */ + @java.lang.Override + public com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias getLocationBias() { + return locationBias_ == null + ? com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias.getDefaultInstance() + : locationBias_; + } + + /** + * + * + *
+   * Optional. The region to search. This location serves as a bias which means
+   * results around the given location are preferred.
+   * 
+ * + * + * .google.maps.geocode.v4.GeocodeAddressRequest.LocationBias location_bias = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBiasOrBuilder + getLocationBiasOrBuilder() { + return locationBias_ == null + ? com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias.getDefaultInstance() + : locationBias_; + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object languageCode_ = ""; + + /** + * + * + *
+   * Optional. Language in which the results should be returned.
+   * 
+ * + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Language in which the results should be returned.
+   * 
+ * + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REGION_CODE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object regionCode_ = ""; + + /** + * + * + *
+   * Optional. Region code. The region code, specified as a ccTLD ("top-level
+   * domain") two-character value. The parameter affects results based on
+   * applicable law. This parameter will also influence, but not fully restrict,
+   * results from the service.
+   * 
+ * + * string region_code = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The regionCode. + */ + @java.lang.Override + public java.lang.String getRegionCode() { + java.lang.Object ref = regionCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + regionCode_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Region code. The region code, specified as a ccTLD ("top-level
+   * domain") two-character value. The parameter affects results based on
+   * applicable law. This parameter will also influence, but not fully restrict,
+   * results from the service.
+   * 
+ * + * string region_code = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for regionCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRegionCodeBytes() { + java.lang.Object ref = regionCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + regionCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (addressInputCase_ == 1) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, addressInput_); + } + if (addressInputCase_ == 2) { + output.writeMessage(2, (com.google.type.PostalAddress) addressInput_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getLocationBias()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, languageCode_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(regionCode_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, regionCode_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (addressInputCase_ == 1) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, addressInput_); + } + if (addressInputCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.type.PostalAddress) addressInput_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getLocationBias()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, languageCode_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(regionCode_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, regionCode_); + } + 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.geocode.v4.GeocodeAddressRequest)) { + return super.equals(obj); + } + com.google.maps.geocode.v4.GeocodeAddressRequest other = + (com.google.maps.geocode.v4.GeocodeAddressRequest) obj; + + if (hasLocationBias() != other.hasLocationBias()) return false; + if (hasLocationBias()) { + if (!getLocationBias().equals(other.getLocationBias())) return false; + } + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (!getRegionCode().equals(other.getRegionCode())) return false; + if (!getAddressInputCase().equals(other.getAddressInputCase())) return false; + switch (addressInputCase_) { + case 1: + if (!getAddressQuery().equals(other.getAddressQuery())) return false; + break; + case 2: + if (!getAddress().equals(other.getAddress())) 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(); + if (hasLocationBias()) { + hash = (37 * hash) + LOCATION_BIAS_FIELD_NUMBER; + hash = (53 * hash) + getLocationBias().hashCode(); + } + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (37 * hash) + REGION_CODE_FIELD_NUMBER; + hash = (53 * hash) + getRegionCode().hashCode(); + switch (addressInputCase_) { + case 1: + hash = (37 * hash) + ADDRESS_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getAddressQuery().hashCode(); + break; + case 2: + hash = (37 * hash) + ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getAddress().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.geocode.v4.GeocodeAddressRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.GeocodeAddressRequest 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.geocode.v4.GeocodeAddressRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.GeocodeAddressRequest 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.geocode.v4.GeocodeAddressRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.GeocodeAddressRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.geocode.v4.GeocodeAddressRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.GeocodeAddressRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.GeocodeAddressRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.GeocodeAddressRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.GeocodeAddressRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.GeocodeAddressRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geocode.v4.GeocodeAddressRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for GeocodeService.GeocodeAddress.
+   * 
+ * + * Protobuf type {@code google.maps.geocode.v4.GeocodeAddressRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.geocode.v4.GeocodeAddressRequest) + com.google.maps.geocode.v4.GeocodeAddressRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodeAddressRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodeAddressRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.GeocodeAddressRequest.class, + com.google.maps.geocode.v4.GeocodeAddressRequest.Builder.class); + } + + // Construct using com.google.maps.geocode.v4.GeocodeAddressRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetLocationBiasFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (addressBuilder_ != null) { + addressBuilder_.clear(); + } + locationBias_ = null; + if (locationBiasBuilder_ != null) { + locationBiasBuilder_.dispose(); + locationBiasBuilder_ = null; + } + languageCode_ = ""; + regionCode_ = ""; + addressInputCase_ = 0; + addressInput_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodeAddressRequest_descriptor; + } + + @java.lang.Override + public com.google.maps.geocode.v4.GeocodeAddressRequest getDefaultInstanceForType() { + return com.google.maps.geocode.v4.GeocodeAddressRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.geocode.v4.GeocodeAddressRequest build() { + com.google.maps.geocode.v4.GeocodeAddressRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.geocode.v4.GeocodeAddressRequest buildPartial() { + com.google.maps.geocode.v4.GeocodeAddressRequest result = + new com.google.maps.geocode.v4.GeocodeAddressRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.geocode.v4.GeocodeAddressRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.locationBias_ = + locationBiasBuilder_ == null ? locationBias_ : locationBiasBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.languageCode_ = languageCode_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.regionCode_ = regionCode_; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.maps.geocode.v4.GeocodeAddressRequest result) { + result.addressInputCase_ = addressInputCase_; + result.addressInput_ = this.addressInput_; + if (addressInputCase_ == 2 && addressBuilder_ != null) { + result.addressInput_ = addressBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.geocode.v4.GeocodeAddressRequest) { + return mergeFrom((com.google.maps.geocode.v4.GeocodeAddressRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.geocode.v4.GeocodeAddressRequest other) { + if (other == com.google.maps.geocode.v4.GeocodeAddressRequest.getDefaultInstance()) + return this; + if (other.hasLocationBias()) { + mergeLocationBias(other.getLocationBias()); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getRegionCode().isEmpty()) { + regionCode_ = other.regionCode_; + bitField0_ |= 0x00000010; + onChanged(); + } + switch (other.getAddressInputCase()) { + case ADDRESS_QUERY: + { + addressInputCase_ = 1; + addressInput_ = other.addressInput_; + onChanged(); + break; + } + case ADDRESS: + { + mergeAddress(other.getAddress()); + break; + } + case ADDRESSINPUT_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(); + addressInputCase_ = 1; + addressInput_ = s; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetAddressFieldBuilder().getBuilder(), extensionRegistry); + addressInputCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetLocationBiasFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + languageCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + regionCode_ = input.readStringRequireUtf8(); + 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 addressInputCase_ = 0; + private java.lang.Object addressInput_; + + public AddressInputCase getAddressInputCase() { + return AddressInputCase.forNumber(addressInputCase_); + } + + public Builder clearAddressInput() { + addressInputCase_ = 0; + addressInput_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * The unstructured address to geocode.
+     * 
+ * + * string address_query = 1; + * + * @return Whether the addressQuery field is set. + */ + @java.lang.Override + public boolean hasAddressQuery() { + return addressInputCase_ == 1; + } + + /** + * + * + *
+     * The unstructured address to geocode.
+     * 
+ * + * string address_query = 1; + * + * @return The addressQuery. + */ + @java.lang.Override + public java.lang.String getAddressQuery() { + java.lang.Object ref = ""; + if (addressInputCase_ == 1) { + ref = addressInput_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (addressInputCase_ == 1) { + addressInput_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The unstructured address to geocode.
+     * 
+ * + * string address_query = 1; + * + * @return The bytes for addressQuery. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAddressQueryBytes() { + java.lang.Object ref = ""; + if (addressInputCase_ == 1) { + ref = addressInput_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (addressInputCase_ == 1) { + addressInput_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The unstructured address to geocode.
+     * 
+ * + * string address_query = 1; + * + * @param value The addressQuery to set. + * @return This builder for chaining. + */ + public Builder setAddressQuery(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + addressInputCase_ = 1; + addressInput_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * The unstructured address to geocode.
+     * 
+ * + * string address_query = 1; + * + * @return This builder for chaining. + */ + public Builder clearAddressQuery() { + if (addressInputCase_ == 1) { + addressInputCase_ = 0; + addressInput_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The unstructured address to geocode.
+     * 
+ * + * string address_query = 1; + * + * @param value The bytes for addressQuery to set. + * @return This builder for chaining. + */ + public Builder setAddressQueryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + addressInputCase_ = 1; + addressInput_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.type.PostalAddress, + com.google.type.PostalAddress.Builder, + com.google.type.PostalAddressOrBuilder> + addressBuilder_; + + /** + * + * + *
+     * The structured address to geocode in postal address format.
+     * 
+ * + * .google.type.PostalAddress address = 2; + * + * @return Whether the address field is set. + */ + @java.lang.Override + public boolean hasAddress() { + return addressInputCase_ == 2; + } + + /** + * + * + *
+     * The structured address to geocode in postal address format.
+     * 
+ * + * .google.type.PostalAddress address = 2; + * + * @return The address. + */ + @java.lang.Override + public com.google.type.PostalAddress getAddress() { + if (addressBuilder_ == null) { + if (addressInputCase_ == 2) { + return (com.google.type.PostalAddress) addressInput_; + } + return com.google.type.PostalAddress.getDefaultInstance(); + } else { + if (addressInputCase_ == 2) { + return addressBuilder_.getMessage(); + } + return com.google.type.PostalAddress.getDefaultInstance(); + } + } + + /** + * + * + *
+     * The structured address to geocode in postal address format.
+     * 
+ * + * .google.type.PostalAddress address = 2; + */ + public Builder setAddress(com.google.type.PostalAddress value) { + if (addressBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + addressInput_ = value; + onChanged(); + } else { + addressBuilder_.setMessage(value); + } + addressInputCase_ = 2; + return this; + } + + /** + * + * + *
+     * The structured address to geocode in postal address format.
+     * 
+ * + * .google.type.PostalAddress address = 2; + */ + public Builder setAddress(com.google.type.PostalAddress.Builder builderForValue) { + if (addressBuilder_ == null) { + addressInput_ = builderForValue.build(); + onChanged(); + } else { + addressBuilder_.setMessage(builderForValue.build()); + } + addressInputCase_ = 2; + return this; + } + + /** + * + * + *
+     * The structured address to geocode in postal address format.
+     * 
+ * + * .google.type.PostalAddress address = 2; + */ + public Builder mergeAddress(com.google.type.PostalAddress value) { + if (addressBuilder_ == null) { + if (addressInputCase_ == 2 + && addressInput_ != com.google.type.PostalAddress.getDefaultInstance()) { + addressInput_ = + com.google.type.PostalAddress.newBuilder( + (com.google.type.PostalAddress) addressInput_) + .mergeFrom(value) + .buildPartial(); + } else { + addressInput_ = value; + } + onChanged(); + } else { + if (addressInputCase_ == 2) { + addressBuilder_.mergeFrom(value); + } else { + addressBuilder_.setMessage(value); + } + } + addressInputCase_ = 2; + return this; + } + + /** + * + * + *
+     * The structured address to geocode in postal address format.
+     * 
+ * + * .google.type.PostalAddress address = 2; + */ + public Builder clearAddress() { + if (addressBuilder_ == null) { + if (addressInputCase_ == 2) { + addressInputCase_ = 0; + addressInput_ = null; + onChanged(); + } + } else { + if (addressInputCase_ == 2) { + addressInputCase_ = 0; + addressInput_ = null; + } + addressBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The structured address to geocode in postal address format.
+     * 
+ * + * .google.type.PostalAddress address = 2; + */ + public com.google.type.PostalAddress.Builder getAddressBuilder() { + return internalGetAddressFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The structured address to geocode in postal address format.
+     * 
+ * + * .google.type.PostalAddress address = 2; + */ + @java.lang.Override + public com.google.type.PostalAddressOrBuilder getAddressOrBuilder() { + if ((addressInputCase_ == 2) && (addressBuilder_ != null)) { + return addressBuilder_.getMessageOrBuilder(); + } else { + if (addressInputCase_ == 2) { + return (com.google.type.PostalAddress) addressInput_; + } + return com.google.type.PostalAddress.getDefaultInstance(); + } + } + + /** + * + * + *
+     * The structured address to geocode in postal address format.
+     * 
+ * + * .google.type.PostalAddress address = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.PostalAddress, + com.google.type.PostalAddress.Builder, + com.google.type.PostalAddressOrBuilder> + internalGetAddressFieldBuilder() { + if (addressBuilder_ == null) { + if (!(addressInputCase_ == 2)) { + addressInput_ = com.google.type.PostalAddress.getDefaultInstance(); + } + addressBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.PostalAddress, + com.google.type.PostalAddress.Builder, + com.google.type.PostalAddressOrBuilder>( + (com.google.type.PostalAddress) addressInput_, getParentForChildren(), isClean()); + addressInput_ = null; + } + addressInputCase_ = 2; + onChanged(); + return addressBuilder_; + } + + private com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias locationBias_; + private com.google.protobuf.SingleFieldBuilder< + com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias, + com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias.Builder, + com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBiasOrBuilder> + locationBiasBuilder_; + + /** + * + * + *
+     * Optional. The region to search. This location serves as a bias which means
+     * results around the given location are preferred.
+     * 
+ * + * + * .google.maps.geocode.v4.GeocodeAddressRequest.LocationBias location_bias = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the locationBias field is set. + */ + public boolean hasLocationBias() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. The region to search. This location serves as a bias which means
+     * results around the given location are preferred.
+     * 
+ * + * + * .google.maps.geocode.v4.GeocodeAddressRequest.LocationBias location_bias = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The locationBias. + */ + public com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias getLocationBias() { + if (locationBiasBuilder_ == null) { + return locationBias_ == null + ? com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias.getDefaultInstance() + : locationBias_; + } else { + return locationBiasBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The region to search. This location serves as a bias which means
+     * results around the given location are preferred.
+     * 
+ * + * + * .google.maps.geocode.v4.GeocodeAddressRequest.LocationBias location_bias = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLocationBias( + com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias value) { + if (locationBiasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + locationBias_ = value; + } else { + locationBiasBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The region to search. This location serves as a bias which means
+     * results around the given location are preferred.
+     * 
+ * + * + * .google.maps.geocode.v4.GeocodeAddressRequest.LocationBias location_bias = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLocationBias( + com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias.Builder builderForValue) { + if (locationBiasBuilder_ == null) { + locationBias_ = builderForValue.build(); + } else { + locationBiasBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The region to search. This location serves as a bias which means
+     * results around the given location are preferred.
+     * 
+ * + * + * .google.maps.geocode.v4.GeocodeAddressRequest.LocationBias location_bias = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeLocationBias( + com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias value) { + if (locationBiasBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && locationBias_ != null + && locationBias_ + != com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias + .getDefaultInstance()) { + getLocationBiasBuilder().mergeFrom(value); + } else { + locationBias_ = value; + } + } else { + locationBiasBuilder_.mergeFrom(value); + } + if (locationBias_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The region to search. This location serves as a bias which means
+     * results around the given location are preferred.
+     * 
+ * + * + * .google.maps.geocode.v4.GeocodeAddressRequest.LocationBias location_bias = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearLocationBias() { + bitField0_ = (bitField0_ & ~0x00000004); + locationBias_ = null; + if (locationBiasBuilder_ != null) { + locationBiasBuilder_.dispose(); + locationBiasBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The region to search. This location serves as a bias which means
+     * results around the given location are preferred.
+     * 
+ * + * + * .google.maps.geocode.v4.GeocodeAddressRequest.LocationBias location_bias = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias.Builder + getLocationBiasBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetLocationBiasFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The region to search. This location serves as a bias which means
+     * results around the given location are preferred.
+     * 
+ * + * + * .google.maps.geocode.v4.GeocodeAddressRequest.LocationBias location_bias = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBiasOrBuilder + getLocationBiasOrBuilder() { + if (locationBiasBuilder_ != null) { + return locationBiasBuilder_.getMessageOrBuilder(); + } else { + return locationBias_ == null + ? com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias.getDefaultInstance() + : locationBias_; + } + } + + /** + * + * + *
+     * Optional. The region to search. This location serves as a bias which means
+     * results around the given location are preferred.
+     * 
+ * + * + * .google.maps.geocode.v4.GeocodeAddressRequest.LocationBias location_bias = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias, + com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias.Builder, + com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBiasOrBuilder> + internalGetLocationBiasFieldBuilder() { + if (locationBiasBuilder_ == null) { + locationBiasBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias, + com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias.Builder, + com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBiasOrBuilder>( + getLocationBias(), getParentForChildren(), isClean()); + locationBias_ = null; + } + return locationBiasBuilder_; + } + + private java.lang.Object languageCode_ = ""; + + /** + * + * + *
+     * Optional. Language in which the results should be returned.
+     * 
+ * + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Language in which the results should be returned.
+     * 
+ * + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Language in which the results should be returned.
+     * 
+ * + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + languageCode_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Language in which the results should be returned.
+     * 
+ * + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + languageCode_ = getDefaultInstance().getLanguageCode(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Language in which the results should be returned.
+     * 
+ * + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + languageCode_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object regionCode_ = ""; + + /** + * + * + *
+     * Optional. Region code. The region code, specified as a ccTLD ("top-level
+     * domain") two-character value. The parameter affects results based on
+     * applicable law. This parameter will also influence, but not fully restrict,
+     * results from the service.
+     * 
+ * + * string region_code = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The regionCode. + */ + public java.lang.String getRegionCode() { + java.lang.Object ref = regionCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + regionCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Region code. The region code, specified as a ccTLD ("top-level
+     * domain") two-character value. The parameter affects results based on
+     * applicable law. This parameter will also influence, but not fully restrict,
+     * results from the service.
+     * 
+ * + * string region_code = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for regionCode. + */ + public com.google.protobuf.ByteString getRegionCodeBytes() { + java.lang.Object ref = regionCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + regionCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Region code. The region code, specified as a ccTLD ("top-level
+     * domain") two-character value. The parameter affects results based on
+     * applicable law. This parameter will also influence, but not fully restrict,
+     * results from the service.
+     * 
+ * + * string region_code = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The regionCode to set. + * @return This builder for chaining. + */ + public Builder setRegionCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + regionCode_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Region code. The region code, specified as a ccTLD ("top-level
+     * domain") two-character value. The parameter affects results based on
+     * applicable law. This parameter will also influence, but not fully restrict,
+     * results from the service.
+     * 
+ * + * string region_code = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRegionCode() { + regionCode_ = getDefaultInstance().getRegionCode(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Region code. The region code, specified as a ccTLD ("top-level
+     * domain") two-character value. The parameter affects results based on
+     * applicable law. This parameter will also influence, but not fully restrict,
+     * results from the service.
+     * 
+ * + * string region_code = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for regionCode to set. + * @return This builder for chaining. + */ + public Builder setRegionCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + regionCode_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.maps.geocode.v4.GeocodeAddressRequest) + } + + // @@protoc_insertion_point(class_scope:google.maps.geocode.v4.GeocodeAddressRequest) + private static final com.google.maps.geocode.v4.GeocodeAddressRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.geocode.v4.GeocodeAddressRequest(); + } + + public static com.google.maps.geocode.v4.GeocodeAddressRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GeocodeAddressRequest 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.geocode.v4.GeocodeAddressRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodeAddressRequestOrBuilder.java b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodeAddressRequestOrBuilder.java new file mode 100644 index 000000000000..4bd9cd9d9ca9 --- /dev/null +++ b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodeAddressRequestOrBuilder.java @@ -0,0 +1,210 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/maps/geocode/v4/geocode_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.geocode.v4; + +@com.google.protobuf.Generated +public interface GeocodeAddressRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.geocode.v4.GeocodeAddressRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The unstructured address to geocode.
+   * 
+ * + * string address_query = 1; + * + * @return Whether the addressQuery field is set. + */ + boolean hasAddressQuery(); + + /** + * + * + *
+   * The unstructured address to geocode.
+   * 
+ * + * string address_query = 1; + * + * @return The addressQuery. + */ + java.lang.String getAddressQuery(); + + /** + * + * + *
+   * The unstructured address to geocode.
+   * 
+ * + * string address_query = 1; + * + * @return The bytes for addressQuery. + */ + com.google.protobuf.ByteString getAddressQueryBytes(); + + /** + * + * + *
+   * The structured address to geocode in postal address format.
+   * 
+ * + * .google.type.PostalAddress address = 2; + * + * @return Whether the address field is set. + */ + boolean hasAddress(); + + /** + * + * + *
+   * The structured address to geocode in postal address format.
+   * 
+ * + * .google.type.PostalAddress address = 2; + * + * @return The address. + */ + com.google.type.PostalAddress getAddress(); + + /** + * + * + *
+   * The structured address to geocode in postal address format.
+   * 
+ * + * .google.type.PostalAddress address = 2; + */ + com.google.type.PostalAddressOrBuilder getAddressOrBuilder(); + + /** + * + * + *
+   * Optional. The region to search. This location serves as a bias which means
+   * results around the given location are preferred.
+   * 
+ * + * + * .google.maps.geocode.v4.GeocodeAddressRequest.LocationBias location_bias = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the locationBias field is set. + */ + boolean hasLocationBias(); + + /** + * + * + *
+   * Optional. The region to search. This location serves as a bias which means
+   * results around the given location are preferred.
+   * 
+ * + * + * .google.maps.geocode.v4.GeocodeAddressRequest.LocationBias location_bias = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The locationBias. + */ + com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBias getLocationBias(); + + /** + * + * + *
+   * Optional. The region to search. This location serves as a bias which means
+   * results around the given location are preferred.
+   * 
+ * + * + * .google.maps.geocode.v4.GeocodeAddressRequest.LocationBias location_bias = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.maps.geocode.v4.GeocodeAddressRequest.LocationBiasOrBuilder getLocationBiasOrBuilder(); + + /** + * + * + *
+   * Optional. Language in which the results should be returned.
+   * 
+ * + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + + /** + * + * + *
+   * Optional. Language in which the results should be returned.
+   * 
+ * + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); + + /** + * + * + *
+   * Optional. Region code. The region code, specified as a ccTLD ("top-level
+   * domain") two-character value. The parameter affects results based on
+   * applicable law. This parameter will also influence, but not fully restrict,
+   * results from the service.
+   * 
+ * + * string region_code = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The regionCode. + */ + java.lang.String getRegionCode(); + + /** + * + * + *
+   * Optional. Region code. The region code, specified as a ccTLD ("top-level
+   * domain") two-character value. The parameter affects results based on
+   * applicable law. This parameter will also influence, but not fully restrict,
+   * results from the service.
+   * 
+ * + * string region_code = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for regionCode. + */ + com.google.protobuf.ByteString getRegionCodeBytes(); + + com.google.maps.geocode.v4.GeocodeAddressRequest.AddressInputCase getAddressInputCase(); +} diff --git a/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodeAddressResponse.java b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodeAddressResponse.java new file mode 100644 index 000000000000..0b3ec9598081 --- /dev/null +++ b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodeAddressResponse.java @@ -0,0 +1,924 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/maps/geocode/v4/geocode_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.geocode.v4; + +/** + * + * + *
+ * Response message for
+ * [GeocodeService.GeocodeAddress][google.maps.geocode.v4.GeocodeService.GeocodeAddress].
+ * 
+ * + * Protobuf type {@code google.maps.geocode.v4.GeocodeAddressResponse} + */ +@com.google.protobuf.Generated +public final class GeocodeAddressResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.maps.geocode.v4.GeocodeAddressResponse) + GeocodeAddressResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GeocodeAddressResponse"); + } + + // Use GeocodeAddressResponse.newBuilder() to construct. + private GeocodeAddressResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GeocodeAddressResponse() { + results_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodeAddressResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodeAddressResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.GeocodeAddressResponse.class, + com.google.maps.geocode.v4.GeocodeAddressResponse.Builder.class); + } + + public static final int RESULTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List results_; + + /** + * + * + *
+   * The geocoding result.
+   * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + @java.lang.Override + public java.util.List getResultsList() { + return results_; + } + + /** + * + * + *
+   * The geocoding result.
+   * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + @java.lang.Override + public java.util.List + getResultsOrBuilderList() { + return results_; + } + + /** + * + * + *
+   * The geocoding result.
+   * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + @java.lang.Override + public int getResultsCount() { + return results_.size(); + } + + /** + * + * + *
+   * The geocoding result.
+   * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + @java.lang.Override + public com.google.maps.geocode.v4.GeocodeResult getResults(int index) { + return results_.get(index); + } + + /** + * + * + *
+   * The geocoding result.
+   * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + @java.lang.Override + public com.google.maps.geocode.v4.GeocodeResultOrBuilder getResultsOrBuilder(int index) { + return results_.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 < results_.size(); i++) { + output.writeMessage(1, results_.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 < results_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, results_.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.geocode.v4.GeocodeAddressResponse)) { + return super.equals(obj); + } + com.google.maps.geocode.v4.GeocodeAddressResponse other = + (com.google.maps.geocode.v4.GeocodeAddressResponse) obj; + + if (!getResultsList().equals(other.getResultsList())) 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 (getResultsCount() > 0) { + hash = (37 * hash) + RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getResultsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.geocode.v4.GeocodeAddressResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.GeocodeAddressResponse 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.geocode.v4.GeocodeAddressResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.GeocodeAddressResponse 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.geocode.v4.GeocodeAddressResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.GeocodeAddressResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.geocode.v4.GeocodeAddressResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.GeocodeAddressResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.GeocodeAddressResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.GeocodeAddressResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.GeocodeAddressResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.GeocodeAddressResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geocode.v4.GeocodeAddressResponse 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for
+   * [GeocodeService.GeocodeAddress][google.maps.geocode.v4.GeocodeService.GeocodeAddress].
+   * 
+ * + * Protobuf type {@code google.maps.geocode.v4.GeocodeAddressResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.geocode.v4.GeocodeAddressResponse) + com.google.maps.geocode.v4.GeocodeAddressResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodeAddressResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodeAddressResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.GeocodeAddressResponse.class, + com.google.maps.geocode.v4.GeocodeAddressResponse.Builder.class); + } + + // Construct using com.google.maps.geocode.v4.GeocodeAddressResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + } else { + results_ = null; + resultsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodeAddressResponse_descriptor; + } + + @java.lang.Override + public com.google.maps.geocode.v4.GeocodeAddressResponse getDefaultInstanceForType() { + return com.google.maps.geocode.v4.GeocodeAddressResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.geocode.v4.GeocodeAddressResponse build() { + com.google.maps.geocode.v4.GeocodeAddressResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.geocode.v4.GeocodeAddressResponse buildPartial() { + com.google.maps.geocode.v4.GeocodeAddressResponse result = + new com.google.maps.geocode.v4.GeocodeAddressResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.maps.geocode.v4.GeocodeAddressResponse result) { + if (resultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.results_ = results_; + } else { + result.results_ = resultsBuilder_.build(); + } + } + + private void buildPartial0(com.google.maps.geocode.v4.GeocodeAddressResponse result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.geocode.v4.GeocodeAddressResponse) { + return mergeFrom((com.google.maps.geocode.v4.GeocodeAddressResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.geocode.v4.GeocodeAddressResponse other) { + if (other == com.google.maps.geocode.v4.GeocodeAddressResponse.getDefaultInstance()) + return this; + if (resultsBuilder_ == null) { + if (!other.results_.isEmpty()) { + if (results_.isEmpty()) { + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResultsIsMutable(); + results_.addAll(other.results_); + } + onChanged(); + } + } else { + if (!other.results_.isEmpty()) { + if (resultsBuilder_.isEmpty()) { + resultsBuilder_.dispose(); + resultsBuilder_ = null; + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + resultsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetResultsFieldBuilder() + : null; + } else { + resultsBuilder_.addAllMessages(other.results_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.maps.geocode.v4.GeocodeResult m = + input.readMessage( + com.google.maps.geocode.v4.GeocodeResult.parser(), extensionRegistry); + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(m); + } else { + resultsBuilder_.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 results_ = + java.util.Collections.emptyList(); + + private void ensureResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + results_ = new java.util.ArrayList(results_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.maps.geocode.v4.GeocodeResult, + com.google.maps.geocode.v4.GeocodeResult.Builder, + com.google.maps.geocode.v4.GeocodeResultOrBuilder> + resultsBuilder_; + + /** + * + * + *
+     * The geocoding result.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + public java.util.List getResultsList() { + if (resultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(results_); + } else { + return resultsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The geocoding result.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + public int getResultsCount() { + if (resultsBuilder_ == null) { + return results_.size(); + } else { + return resultsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The geocoding result.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + public com.google.maps.geocode.v4.GeocodeResult getResults(int index) { + if (resultsBuilder_ == null) { + return results_.get(index); + } else { + return resultsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The geocoding result.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + public Builder setResults(int index, com.google.maps.geocode.v4.GeocodeResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.set(index, value); + onChanged(); + } else { + resultsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The geocoding result.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + public Builder setResults( + int index, com.google.maps.geocode.v4.GeocodeResult.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.set(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The geocoding result.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + public Builder addResults(com.google.maps.geocode.v4.GeocodeResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(value); + onChanged(); + } else { + resultsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The geocoding result.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + public Builder addResults(int index, com.google.maps.geocode.v4.GeocodeResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(index, value); + onChanged(); + } else { + resultsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The geocoding result.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + public Builder addResults(com.google.maps.geocode.v4.GeocodeResult.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The geocoding result.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + public Builder addResults( + int index, com.google.maps.geocode.v4.GeocodeResult.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The geocoding result.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + public Builder addAllResults( + java.lang.Iterable values) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, results_); + onChanged(); + } else { + resultsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The geocoding result.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + public Builder clearResults() { + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + resultsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The geocoding result.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + public Builder removeResults(int index) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.remove(index); + onChanged(); + } else { + resultsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The geocoding result.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + public com.google.maps.geocode.v4.GeocodeResult.Builder getResultsBuilder(int index) { + return internalGetResultsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The geocoding result.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + public com.google.maps.geocode.v4.GeocodeResultOrBuilder getResultsOrBuilder(int index) { + if (resultsBuilder_ == null) { + return results_.get(index); + } else { + return resultsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The geocoding result.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + public java.util.List + getResultsOrBuilderList() { + if (resultsBuilder_ != null) { + return resultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(results_); + } + } + + /** + * + * + *
+     * The geocoding result.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + public com.google.maps.geocode.v4.GeocodeResult.Builder addResultsBuilder() { + return internalGetResultsFieldBuilder() + .addBuilder(com.google.maps.geocode.v4.GeocodeResult.getDefaultInstance()); + } + + /** + * + * + *
+     * The geocoding result.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + public com.google.maps.geocode.v4.GeocodeResult.Builder addResultsBuilder(int index) { + return internalGetResultsFieldBuilder() + .addBuilder(index, com.google.maps.geocode.v4.GeocodeResult.getDefaultInstance()); + } + + /** + * + * + *
+     * The geocoding result.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + public java.util.List + getResultsBuilderList() { + return internalGetResultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.maps.geocode.v4.GeocodeResult, + com.google.maps.geocode.v4.GeocodeResult.Builder, + com.google.maps.geocode.v4.GeocodeResultOrBuilder> + internalGetResultsFieldBuilder() { + if (resultsBuilder_ == null) { + resultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.maps.geocode.v4.GeocodeResult, + com.google.maps.geocode.v4.GeocodeResult.Builder, + com.google.maps.geocode.v4.GeocodeResultOrBuilder>( + results_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + results_ = null; + } + return resultsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.maps.geocode.v4.GeocodeAddressResponse) + } + + // @@protoc_insertion_point(class_scope:google.maps.geocode.v4.GeocodeAddressResponse) + private static final com.google.maps.geocode.v4.GeocodeAddressResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.geocode.v4.GeocodeAddressResponse(); + } + + public static com.google.maps.geocode.v4.GeocodeAddressResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GeocodeAddressResponse 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.geocode.v4.GeocodeAddressResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodeAddressResponseOrBuilder.java b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodeAddressResponseOrBuilder.java new file mode 100644 index 000000000000..d8b3e56519a8 --- /dev/null +++ b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodeAddressResponseOrBuilder.java @@ -0,0 +1,84 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/maps/geocode/v4/geocode_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.geocode.v4; + +@com.google.protobuf.Generated +public interface GeocodeAddressResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.geocode.v4.GeocodeAddressResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The geocoding result.
+   * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + java.util.List getResultsList(); + + /** + * + * + *
+   * The geocoding result.
+   * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + com.google.maps.geocode.v4.GeocodeResult getResults(int index); + + /** + * + * + *
+   * The geocoding result.
+   * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + int getResultsCount(); + + /** + * + * + *
+   * The geocoding result.
+   * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + java.util.List + getResultsOrBuilderList(); + + /** + * + * + *
+   * The geocoding result.
+   * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + com.google.maps.geocode.v4.GeocodeResultOrBuilder getResultsOrBuilder(int index); +} diff --git a/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodeLocationRequest.java b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodeLocationRequest.java new file mode 100644 index 000000000000..d4cfb4efdaf8 --- /dev/null +++ b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodeLocationRequest.java @@ -0,0 +1,2208 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/maps/geocode/v4/geocode_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.geocode.v4; + +/** + * + * + *
+ * Request message for GeocodeService.GeocodeLocation.
+ * 
+ * + * Protobuf type {@code google.maps.geocode.v4.GeocodeLocationRequest} + */ +@com.google.protobuf.Generated +public final class GeocodeLocationRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.maps.geocode.v4.GeocodeLocationRequest) + GeocodeLocationRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GeocodeLocationRequest"); + } + + // Use GeocodeLocationRequest.newBuilder() to construct. + private GeocodeLocationRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GeocodeLocationRequest() { + languageCode_ = ""; + regionCode_ = ""; + types_ = com.google.protobuf.LazyStringArrayList.emptyList(); + granularity_ = emptyIntList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodeLocationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodeLocationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.GeocodeLocationRequest.class, + com.google.maps.geocode.v4.GeocodeLocationRequest.Builder.class); + } + + private int locationInputCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object locationInput_; + + public enum LocationInputCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + LOCATION_QUERY(1), + LOCATION(2), + LOCATIONINPUT_NOT_SET(0); + private final int value; + + private LocationInputCase(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 LocationInputCase valueOf(int value) { + return forNumber(value); + } + + public static LocationInputCase forNumber(int value) { + switch (value) { + case 1: + return LOCATION_QUERY; + case 2: + return LOCATION; + case 0: + return LOCATIONINPUT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public LocationInputCase getLocationInputCase() { + return LocationInputCase.forNumber(locationInputCase_); + } + + public static final int LOCATION_QUERY_FIELD_NUMBER = 1; + + /** + * + * + *
+   * The location in the format of "lat,lng" string. For example,
+   * "64.7611872,-18.4705364".
+   * 
+ * + * string location_query = 1; + * + * @return Whether the locationQuery field is set. + */ + public boolean hasLocationQuery() { + return locationInputCase_ == 1; + } + + /** + * + * + *
+   * The location in the format of "lat,lng" string. For example,
+   * "64.7611872,-18.4705364".
+   * 
+ * + * string location_query = 1; + * + * @return The locationQuery. + */ + public java.lang.String getLocationQuery() { + java.lang.Object ref = ""; + if (locationInputCase_ == 1) { + ref = locationInput_; + } + 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 (locationInputCase_ == 1) { + locationInput_ = s; + } + return s; + } + } + + /** + * + * + *
+   * The location in the format of "lat,lng" string. For example,
+   * "64.7611872,-18.4705364".
+   * 
+ * + * string location_query = 1; + * + * @return The bytes for locationQuery. + */ + public com.google.protobuf.ByteString getLocationQueryBytes() { + java.lang.Object ref = ""; + if (locationInputCase_ == 1) { + ref = locationInput_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (locationInputCase_ == 1) { + locationInput_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_FIELD_NUMBER = 2; + + /** + * + * + *
+   * The location in the structured format.
+   * 
+ * + * .google.type.LatLng location = 2; + * + * @return Whether the location field is set. + */ + @java.lang.Override + public boolean hasLocation() { + return locationInputCase_ == 2; + } + + /** + * + * + *
+   * The location in the structured format.
+   * 
+ * + * .google.type.LatLng location = 2; + * + * @return The location. + */ + @java.lang.Override + public com.google.type.LatLng getLocation() { + if (locationInputCase_ == 2) { + return (com.google.type.LatLng) locationInput_; + } + return com.google.type.LatLng.getDefaultInstance(); + } + + /** + * + * + *
+   * The location in the structured format.
+   * 
+ * + * .google.type.LatLng location = 2; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getLocationOrBuilder() { + if (locationInputCase_ == 2) { + return (com.google.type.LatLng) locationInput_; + } + return com.google.type.LatLng.getDefaultInstance(); + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object languageCode_ = ""; + + /** + * + * + *
+   * Optional. Language in which the results should be returned.
+   * 
+ * + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Language in which the results should be returned.
+   * 
+ * + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REGION_CODE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object regionCode_ = ""; + + /** + * + * + *
+   * Optional. Region code. The region code, specified as a ccTLD ("top-level
+   * domain") two-character value. The parameter affects results based on
+   * applicable law.
+   * 
+ * + * string region_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The regionCode. + */ + @java.lang.Override + public java.lang.String getRegionCode() { + java.lang.Object ref = regionCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + regionCode_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Region code. The region code, specified as a ccTLD ("top-level
+   * domain") two-character value. The parameter affects results based on
+   * applicable law.
+   * 
+ * + * string region_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for regionCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRegionCodeBytes() { + java.lang.Object ref = regionCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + regionCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPES_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList types_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. A set of type tags to restrict the results. Results that do not
+   * have any of the specified types are removed.
+   *
+   * For the complete list of possible values, see Table A and Table B at
+   * https://developers.google.com/maps/documentation/places/web-service/place-types.
+   * 
+ * + * repeated string types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the types. + */ + public com.google.protobuf.ProtocolStringList getTypesList() { + return types_; + } + + /** + * + * + *
+   * Optional. A set of type tags to restrict the results. Results that do not
+   * have any of the specified types are removed.
+   *
+   * For the complete list of possible values, see Table A and Table B at
+   * https://developers.google.com/maps/documentation/places/web-service/place-types.
+   * 
+ * + * repeated string types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of types. + */ + public int getTypesCount() { + return types_.size(); + } + + /** + * + * + *
+   * Optional. A set of type tags to restrict the results. Results that do not
+   * have any of the specified types are removed.
+   *
+   * For the complete list of possible values, see Table A and Table B at
+   * https://developers.google.com/maps/documentation/places/web-service/place-types.
+   * 
+ * + * repeated string types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The types at the given index. + */ + public java.lang.String getTypes(int index) { + return types_.get(index); + } + + /** + * + * + *
+   * Optional. A set of type tags to restrict the results. Results that do not
+   * have any of the specified types are removed.
+   *
+   * For the complete list of possible values, see Table A and Table B at
+   * https://developers.google.com/maps/documentation/places/web-service/place-types.
+   * 
+ * + * repeated string types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the types at the given index. + */ + public com.google.protobuf.ByteString getTypesBytes(int index) { + return types_.getByteString(index); + } + + public static final int GRANULARITY_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList granularity_ = emptyIntList(); + + private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.maps.geocode.v4.GeocodeResult.Granularity> + granularity_converter_ = + new com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.maps.geocode.v4.GeocodeResult.Granularity>() { + public com.google.maps.geocode.v4.GeocodeResult.Granularity convert(int from) { + com.google.maps.geocode.v4.GeocodeResult.Granularity result = + com.google.maps.geocode.v4.GeocodeResult.Granularity.forNumber(from); + return result == null + ? com.google.maps.geocode.v4.GeocodeResult.Granularity.UNRECOGNIZED + : result; + } + }; + + /** + * + * + *
+   * Optional. A filter of one or more location granularity enums.
+   * 
+ * + * + * repeated .google.maps.geocode.v4.GeocodeResult.Granularity granularity = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the granularity. + */ + @java.lang.Override + public java.util.List getGranularityList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.maps.geocode.v4.GeocodeResult.Granularity>(granularity_, granularity_converter_); + } + + /** + * + * + *
+   * Optional. A filter of one or more location granularity enums.
+   * 
+ * + * + * repeated .google.maps.geocode.v4.GeocodeResult.Granularity granularity = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of granularity. + */ + @java.lang.Override + public int getGranularityCount() { + return granularity_.size(); + } + + /** + * + * + *
+   * Optional. A filter of one or more location granularity enums.
+   * 
+ * + * + * repeated .google.maps.geocode.v4.GeocodeResult.Granularity granularity = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The granularity at the given index. + */ + @java.lang.Override + public com.google.maps.geocode.v4.GeocodeResult.Granularity getGranularity(int index) { + return granularity_converter_.convert(granularity_.getInt(index)); + } + + /** + * + * + *
+   * Optional. A filter of one or more location granularity enums.
+   * 
+ * + * + * repeated .google.maps.geocode.v4.GeocodeResult.Granularity granularity = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for granularity. + */ + @java.lang.Override + public java.util.List getGranularityValueList() { + return granularity_; + } + + /** + * + * + *
+   * Optional. A filter of one or more location granularity enums.
+   * 
+ * + * + * repeated .google.maps.geocode.v4.GeocodeResult.Granularity granularity = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of granularity at the given index. + */ + @java.lang.Override + public int getGranularityValue(int index) { + return granularity_.getInt(index); + } + + private int granularityMemoizedSerializedSize; + + 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 (locationInputCase_ == 1) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, locationInput_); + } + if (locationInputCase_ == 2) { + output.writeMessage(2, (com.google.type.LatLng) locationInput_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, languageCode_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(regionCode_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, regionCode_); + } + for (int i = 0; i < types_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, types_.getRaw(i)); + } + if (getGranularityList().size() > 0) { + output.writeUInt32NoTag(50); + output.writeUInt32NoTag(granularityMemoizedSerializedSize); + } + for (int i = 0; i < granularity_.size(); i++) { + output.writeEnumNoTag(granularity_.getInt(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (locationInputCase_ == 1) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, locationInput_); + } + if (locationInputCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.type.LatLng) locationInput_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, languageCode_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(regionCode_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, regionCode_); + } + { + int dataSize = 0; + for (int i = 0; i < types_.size(); i++) { + dataSize += computeStringSizeNoTag(types_.getRaw(i)); + } + size += dataSize; + size += 1 * getTypesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < granularity_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(granularity_.getInt(i)); + } + size += dataSize; + if (!getGranularityList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + granularityMemoizedSerializedSize = dataSize; + } + 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.geocode.v4.GeocodeLocationRequest)) { + return super.equals(obj); + } + com.google.maps.geocode.v4.GeocodeLocationRequest other = + (com.google.maps.geocode.v4.GeocodeLocationRequest) obj; + + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (!getRegionCode().equals(other.getRegionCode())) return false; + if (!getTypesList().equals(other.getTypesList())) return false; + if (!granularity_.equals(other.granularity_)) return false; + if (!getLocationInputCase().equals(other.getLocationInputCase())) return false; + switch (locationInputCase_) { + case 1: + if (!getLocationQuery().equals(other.getLocationQuery())) return false; + break; + case 2: + if (!getLocation().equals(other.getLocation())) 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) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (37 * hash) + REGION_CODE_FIELD_NUMBER; + hash = (53 * hash) + getRegionCode().hashCode(); + if (getTypesCount() > 0) { + hash = (37 * hash) + TYPES_FIELD_NUMBER; + hash = (53 * hash) + getTypesList().hashCode(); + } + if (getGranularityCount() > 0) { + hash = (37 * hash) + GRANULARITY_FIELD_NUMBER; + hash = (53 * hash) + granularity_.hashCode(); + } + switch (locationInputCase_) { + case 1: + hash = (37 * hash) + LOCATION_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getLocationQuery().hashCode(); + break; + case 2: + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.geocode.v4.GeocodeLocationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.GeocodeLocationRequest 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.geocode.v4.GeocodeLocationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.GeocodeLocationRequest 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.geocode.v4.GeocodeLocationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.GeocodeLocationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.geocode.v4.GeocodeLocationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.GeocodeLocationRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.GeocodeLocationRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.GeocodeLocationRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.GeocodeLocationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.GeocodeLocationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geocode.v4.GeocodeLocationRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for GeocodeService.GeocodeLocation.
+   * 
+ * + * Protobuf type {@code google.maps.geocode.v4.GeocodeLocationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.geocode.v4.GeocodeLocationRequest) + com.google.maps.geocode.v4.GeocodeLocationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodeLocationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodeLocationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.GeocodeLocationRequest.class, + com.google.maps.geocode.v4.GeocodeLocationRequest.Builder.class); + } + + // Construct using com.google.maps.geocode.v4.GeocodeLocationRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (locationBuilder_ != null) { + locationBuilder_.clear(); + } + languageCode_ = ""; + regionCode_ = ""; + types_ = com.google.protobuf.LazyStringArrayList.emptyList(); + granularity_ = emptyIntList(); + locationInputCase_ = 0; + locationInput_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodeLocationRequest_descriptor; + } + + @java.lang.Override + public com.google.maps.geocode.v4.GeocodeLocationRequest getDefaultInstanceForType() { + return com.google.maps.geocode.v4.GeocodeLocationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.geocode.v4.GeocodeLocationRequest build() { + com.google.maps.geocode.v4.GeocodeLocationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.geocode.v4.GeocodeLocationRequest buildPartial() { + com.google.maps.geocode.v4.GeocodeLocationRequest result = + new com.google.maps.geocode.v4.GeocodeLocationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.geocode.v4.GeocodeLocationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.languageCode_ = languageCode_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.regionCode_ = regionCode_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + types_.makeImmutable(); + result.types_ = types_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + granularity_.makeImmutable(); + result.granularity_ = granularity_; + } + } + + private void buildPartialOneofs(com.google.maps.geocode.v4.GeocodeLocationRequest result) { + result.locationInputCase_ = locationInputCase_; + result.locationInput_ = this.locationInput_; + if (locationInputCase_ == 2 && locationBuilder_ != null) { + result.locationInput_ = locationBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.geocode.v4.GeocodeLocationRequest) { + return mergeFrom((com.google.maps.geocode.v4.GeocodeLocationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.geocode.v4.GeocodeLocationRequest other) { + if (other == com.google.maps.geocode.v4.GeocodeLocationRequest.getDefaultInstance()) + return this; + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getRegionCode().isEmpty()) { + regionCode_ = other.regionCode_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.types_.isEmpty()) { + if (types_.isEmpty()) { + types_ = other.types_; + bitField0_ |= 0x00000010; + } else { + ensureTypesIsMutable(); + types_.addAll(other.types_); + } + onChanged(); + } + if (!other.granularity_.isEmpty()) { + if (granularity_.isEmpty()) { + granularity_ = other.granularity_; + granularity_.makeImmutable(); + bitField0_ |= 0x00000020; + } else { + ensureGranularityIsMutable(); + granularity_.addAll(other.granularity_); + } + onChanged(); + } + switch (other.getLocationInputCase()) { + case LOCATION_QUERY: + { + locationInputCase_ = 1; + locationInput_ = other.locationInput_; + onChanged(); + break; + } + case LOCATION: + { + mergeLocation(other.getLocation()); + break; + } + case LOCATIONINPUT_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(); + locationInputCase_ = 1; + locationInput_ = s; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetLocationFieldBuilder().getBuilder(), extensionRegistry); + locationInputCase_ = 2; + break; + } // case 18 + case 26: + { + languageCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + regionCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTypesIsMutable(); + types_.add(s); + break; + } // case 42 + case 48: + { + int tmpRaw = input.readEnum(); + ensureGranularityIsMutable(); + granularity_.addInt(tmpRaw); + break; + } // case 48 + case 50: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureGranularityIsMutable(); + while (input.getBytesUntilLimit() > 0) { + granularity_.addInt(input.readEnum()); + } + input.popLimit(limit); + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int locationInputCase_ = 0; + private java.lang.Object locationInput_; + + public LocationInputCase getLocationInputCase() { + return LocationInputCase.forNumber(locationInputCase_); + } + + public Builder clearLocationInput() { + locationInputCase_ = 0; + locationInput_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * The location in the format of "lat,lng" string. For example,
+     * "64.7611872,-18.4705364".
+     * 
+ * + * string location_query = 1; + * + * @return Whether the locationQuery field is set. + */ + @java.lang.Override + public boolean hasLocationQuery() { + return locationInputCase_ == 1; + } + + /** + * + * + *
+     * The location in the format of "lat,lng" string. For example,
+     * "64.7611872,-18.4705364".
+     * 
+ * + * string location_query = 1; + * + * @return The locationQuery. + */ + @java.lang.Override + public java.lang.String getLocationQuery() { + java.lang.Object ref = ""; + if (locationInputCase_ == 1) { + ref = locationInput_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (locationInputCase_ == 1) { + locationInput_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The location in the format of "lat,lng" string. For example,
+     * "64.7611872,-18.4705364".
+     * 
+ * + * string location_query = 1; + * + * @return The bytes for locationQuery. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLocationQueryBytes() { + java.lang.Object ref = ""; + if (locationInputCase_ == 1) { + ref = locationInput_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (locationInputCase_ == 1) { + locationInput_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The location in the format of "lat,lng" string. For example,
+     * "64.7611872,-18.4705364".
+     * 
+ * + * string location_query = 1; + * + * @param value The locationQuery to set. + * @return This builder for chaining. + */ + public Builder setLocationQuery(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + locationInputCase_ = 1; + locationInput_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * The location in the format of "lat,lng" string. For example,
+     * "64.7611872,-18.4705364".
+     * 
+ * + * string location_query = 1; + * + * @return This builder for chaining. + */ + public Builder clearLocationQuery() { + if (locationInputCase_ == 1) { + locationInputCase_ = 0; + locationInput_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The location in the format of "lat,lng" string. For example,
+     * "64.7611872,-18.4705364".
+     * 
+ * + * string location_query = 1; + * + * @param value The bytes for locationQuery to set. + * @return This builder for chaining. + */ + public Builder setLocationQueryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + locationInputCase_ = 1; + locationInput_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + locationBuilder_; + + /** + * + * + *
+     * The location in the structured format.
+     * 
+ * + * .google.type.LatLng location = 2; + * + * @return Whether the location field is set. + */ + @java.lang.Override + public boolean hasLocation() { + return locationInputCase_ == 2; + } + + /** + * + * + *
+     * The location in the structured format.
+     * 
+ * + * .google.type.LatLng location = 2; + * + * @return The location. + */ + @java.lang.Override + public com.google.type.LatLng getLocation() { + if (locationBuilder_ == null) { + if (locationInputCase_ == 2) { + return (com.google.type.LatLng) locationInput_; + } + return com.google.type.LatLng.getDefaultInstance(); + } else { + if (locationInputCase_ == 2) { + return locationBuilder_.getMessage(); + } + return com.google.type.LatLng.getDefaultInstance(); + } + } + + /** + * + * + *
+     * The location in the structured format.
+     * 
+ * + * .google.type.LatLng location = 2; + */ + public Builder setLocation(com.google.type.LatLng value) { + if (locationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + locationInput_ = value; + onChanged(); + } else { + locationBuilder_.setMessage(value); + } + locationInputCase_ = 2; + return this; + } + + /** + * + * + *
+     * The location in the structured format.
+     * 
+ * + * .google.type.LatLng location = 2; + */ + public Builder setLocation(com.google.type.LatLng.Builder builderForValue) { + if (locationBuilder_ == null) { + locationInput_ = builderForValue.build(); + onChanged(); + } else { + locationBuilder_.setMessage(builderForValue.build()); + } + locationInputCase_ = 2; + return this; + } + + /** + * + * + *
+     * The location in the structured format.
+     * 
+ * + * .google.type.LatLng location = 2; + */ + public Builder mergeLocation(com.google.type.LatLng value) { + if (locationBuilder_ == null) { + if (locationInputCase_ == 2 + && locationInput_ != com.google.type.LatLng.getDefaultInstance()) { + locationInput_ = + com.google.type.LatLng.newBuilder((com.google.type.LatLng) locationInput_) + .mergeFrom(value) + .buildPartial(); + } else { + locationInput_ = value; + } + onChanged(); + } else { + if (locationInputCase_ == 2) { + locationBuilder_.mergeFrom(value); + } else { + locationBuilder_.setMessage(value); + } + } + locationInputCase_ = 2; + return this; + } + + /** + * + * + *
+     * The location in the structured format.
+     * 
+ * + * .google.type.LatLng location = 2; + */ + public Builder clearLocation() { + if (locationBuilder_ == null) { + if (locationInputCase_ == 2) { + locationInputCase_ = 0; + locationInput_ = null; + onChanged(); + } + } else { + if (locationInputCase_ == 2) { + locationInputCase_ = 0; + locationInput_ = null; + } + locationBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The location in the structured format.
+     * 
+ * + * .google.type.LatLng location = 2; + */ + public com.google.type.LatLng.Builder getLocationBuilder() { + return internalGetLocationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The location in the structured format.
+     * 
+ * + * .google.type.LatLng location = 2; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getLocationOrBuilder() { + if ((locationInputCase_ == 2) && (locationBuilder_ != null)) { + return locationBuilder_.getMessageOrBuilder(); + } else { + if (locationInputCase_ == 2) { + return (com.google.type.LatLng) locationInput_; + } + return com.google.type.LatLng.getDefaultInstance(); + } + } + + /** + * + * + *
+     * The location in the structured format.
+     * 
+ * + * .google.type.LatLng location = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + internalGetLocationFieldBuilder() { + if (locationBuilder_ == null) { + if (!(locationInputCase_ == 2)) { + locationInput_ = com.google.type.LatLng.getDefaultInstance(); + } + locationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.LatLng, + com.google.type.LatLng.Builder, + com.google.type.LatLngOrBuilder>( + (com.google.type.LatLng) locationInput_, getParentForChildren(), isClean()); + locationInput_ = null; + } + locationInputCase_ = 2; + onChanged(); + return locationBuilder_; + } + + private java.lang.Object languageCode_ = ""; + + /** + * + * + *
+     * Optional. Language in which the results should be returned.
+     * 
+ * + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Language in which the results should be returned.
+     * 
+ * + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Language in which the results should be returned.
+     * 
+ * + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + languageCode_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Language in which the results should be returned.
+     * 
+ * + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + languageCode_ = getDefaultInstance().getLanguageCode(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Language in which the results should be returned.
+     * 
+ * + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + languageCode_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object regionCode_ = ""; + + /** + * + * + *
+     * Optional. Region code. The region code, specified as a ccTLD ("top-level
+     * domain") two-character value. The parameter affects results based on
+     * applicable law.
+     * 
+ * + * string region_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The regionCode. + */ + public java.lang.String getRegionCode() { + java.lang.Object ref = regionCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + regionCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Region code. The region code, specified as a ccTLD ("top-level
+     * domain") two-character value. The parameter affects results based on
+     * applicable law.
+     * 
+ * + * string region_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for regionCode. + */ + public com.google.protobuf.ByteString getRegionCodeBytes() { + java.lang.Object ref = regionCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + regionCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Region code. The region code, specified as a ccTLD ("top-level
+     * domain") two-character value. The parameter affects results based on
+     * applicable law.
+     * 
+ * + * string region_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The regionCode to set. + * @return This builder for chaining. + */ + public Builder setRegionCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + regionCode_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Region code. The region code, specified as a ccTLD ("top-level
+     * domain") two-character value. The parameter affects results based on
+     * applicable law.
+     * 
+ * + * string region_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRegionCode() { + regionCode_ = getDefaultInstance().getRegionCode(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Region code. The region code, specified as a ccTLD ("top-level
+     * domain") two-character value. The parameter affects results based on
+     * applicable law.
+     * 
+ * + * string region_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for regionCode to set. + * @return This builder for chaining. + */ + public Builder setRegionCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + regionCode_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList types_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureTypesIsMutable() { + if (!types_.isModifiable()) { + types_ = new com.google.protobuf.LazyStringArrayList(types_); + } + bitField0_ |= 0x00000010; + } + + /** + * + * + *
+     * Optional. A set of type tags to restrict the results. Results that do not
+     * have any of the specified types are removed.
+     *
+     * For the complete list of possible values, see Table A and Table B at
+     * https://developers.google.com/maps/documentation/places/web-service/place-types.
+     * 
+ * + * repeated string types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the types. + */ + public com.google.protobuf.ProtocolStringList getTypesList() { + types_.makeImmutable(); + return types_; + } + + /** + * + * + *
+     * Optional. A set of type tags to restrict the results. Results that do not
+     * have any of the specified types are removed.
+     *
+     * For the complete list of possible values, see Table A and Table B at
+     * https://developers.google.com/maps/documentation/places/web-service/place-types.
+     * 
+ * + * repeated string types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of types. + */ + public int getTypesCount() { + return types_.size(); + } + + /** + * + * + *
+     * Optional. A set of type tags to restrict the results. Results that do not
+     * have any of the specified types are removed.
+     *
+     * For the complete list of possible values, see Table A and Table B at
+     * https://developers.google.com/maps/documentation/places/web-service/place-types.
+     * 
+ * + * repeated string types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The types at the given index. + */ + public java.lang.String getTypes(int index) { + return types_.get(index); + } + + /** + * + * + *
+     * Optional. A set of type tags to restrict the results. Results that do not
+     * have any of the specified types are removed.
+     *
+     * For the complete list of possible values, see Table A and Table B at
+     * https://developers.google.com/maps/documentation/places/web-service/place-types.
+     * 
+ * + * repeated string types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the types at the given index. + */ + public com.google.protobuf.ByteString getTypesBytes(int index) { + return types_.getByteString(index); + } + + /** + * + * + *
+     * Optional. A set of type tags to restrict the results. Results that do not
+     * have any of the specified types are removed.
+     *
+     * For the complete list of possible values, see Table A and Table B at
+     * https://developers.google.com/maps/documentation/places/web-service/place-types.
+     * 
+ * + * repeated string types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The types to set. + * @return This builder for chaining. + */ + public Builder setTypes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypesIsMutable(); + types_.set(index, value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A set of type tags to restrict the results. Results that do not
+     * have any of the specified types are removed.
+     *
+     * For the complete list of possible values, see Table A and Table B at
+     * https://developers.google.com/maps/documentation/places/web-service/place-types.
+     * 
+ * + * repeated string types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The types to add. + * @return This builder for chaining. + */ + public Builder addTypes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypesIsMutable(); + types_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A set of type tags to restrict the results. Results that do not
+     * have any of the specified types are removed.
+     *
+     * For the complete list of possible values, see Table A and Table B at
+     * https://developers.google.com/maps/documentation/places/web-service/place-types.
+     * 
+ * + * repeated string types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The types to add. + * @return This builder for chaining. + */ + public Builder addAllTypes(java.lang.Iterable values) { + ensureTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, types_); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A set of type tags to restrict the results. Results that do not
+     * have any of the specified types are removed.
+     *
+     * For the complete list of possible values, see Table A and Table B at
+     * https://developers.google.com/maps/documentation/places/web-service/place-types.
+     * 
+ * + * repeated string types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearTypes() { + types_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A set of type tags to restrict the results. Results that do not
+     * have any of the specified types are removed.
+     *
+     * For the complete list of possible values, see Table A and Table B at
+     * https://developers.google.com/maps/documentation/places/web-service/place-types.
+     * 
+ * + * repeated string types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the types to add. + * @return This builder for chaining. + */ + public Builder addTypesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTypesIsMutable(); + types_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.IntList granularity_ = emptyIntList(); + + private void ensureGranularityIsMutable() { + if (!granularity_.isModifiable()) { + granularity_ = makeMutableCopy(granularity_); + } + bitField0_ |= 0x00000020; + } + + /** + * + * + *
+     * Optional. A filter of one or more location granularity enums.
+     * 
+ * + * + * repeated .google.maps.geocode.v4.GeocodeResult.Granularity granularity = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the granularity. + */ + public java.util.List + getGranularityList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.maps.geocode.v4.GeocodeResult.Granularity>( + granularity_, granularity_converter_); + } + + /** + * + * + *
+     * Optional. A filter of one or more location granularity enums.
+     * 
+ * + * + * repeated .google.maps.geocode.v4.GeocodeResult.Granularity granularity = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of granularity. + */ + public int getGranularityCount() { + return granularity_.size(); + } + + /** + * + * + *
+     * Optional. A filter of one or more location granularity enums.
+     * 
+ * + * + * repeated .google.maps.geocode.v4.GeocodeResult.Granularity granularity = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The granularity at the given index. + */ + public com.google.maps.geocode.v4.GeocodeResult.Granularity getGranularity(int index) { + return granularity_converter_.convert(granularity_.getInt(index)); + } + + /** + * + * + *
+     * Optional. A filter of one or more location granularity enums.
+     * 
+ * + * + * repeated .google.maps.geocode.v4.GeocodeResult.Granularity granularity = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The granularity to set. + * @return This builder for chaining. + */ + public Builder setGranularity( + int index, com.google.maps.geocode.v4.GeocodeResult.Granularity value) { + if (value == null) { + throw new NullPointerException(); + } + ensureGranularityIsMutable(); + granularity_.setInt(index, value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A filter of one or more location granularity enums.
+     * 
+ * + * + * repeated .google.maps.geocode.v4.GeocodeResult.Granularity granularity = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The granularity to add. + * @return This builder for chaining. + */ + public Builder addGranularity(com.google.maps.geocode.v4.GeocodeResult.Granularity value) { + if (value == null) { + throw new NullPointerException(); + } + ensureGranularityIsMutable(); + granularity_.addInt(value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A filter of one or more location granularity enums.
+     * 
+ * + * + * repeated .google.maps.geocode.v4.GeocodeResult.Granularity granularity = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The granularity to add. + * @return This builder for chaining. + */ + public Builder addAllGranularity( + java.lang.Iterable values) { + ensureGranularityIsMutable(); + for (com.google.maps.geocode.v4.GeocodeResult.Granularity value : values) { + granularity_.addInt(value.getNumber()); + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A filter of one or more location granularity enums.
+     * 
+ * + * + * repeated .google.maps.geocode.v4.GeocodeResult.Granularity granularity = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearGranularity() { + granularity_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A filter of one or more location granularity enums.
+     * 
+ * + * + * repeated .google.maps.geocode.v4.GeocodeResult.Granularity granularity = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for granularity. + */ + public java.util.List getGranularityValueList() { + granularity_.makeImmutable(); + return granularity_; + } + + /** + * + * + *
+     * Optional. A filter of one or more location granularity enums.
+     * 
+ * + * + * repeated .google.maps.geocode.v4.GeocodeResult.Granularity granularity = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of granularity at the given index. + */ + public int getGranularityValue(int index) { + return granularity_.getInt(index); + } + + /** + * + * + *
+     * Optional. A filter of one or more location granularity enums.
+     * 
+ * + * + * repeated .google.maps.geocode.v4.GeocodeResult.Granularity granularity = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for granularity to set. + * @return This builder for chaining. + */ + public Builder setGranularityValue(int index, int value) { + ensureGranularityIsMutable(); + granularity_.setInt(index, value); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A filter of one or more location granularity enums.
+     * 
+ * + * + * repeated .google.maps.geocode.v4.GeocodeResult.Granularity granularity = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for granularity to add. + * @return This builder for chaining. + */ + public Builder addGranularityValue(int value) { + ensureGranularityIsMutable(); + granularity_.addInt(value); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A filter of one or more location granularity enums.
+     * 
+ * + * + * repeated .google.maps.geocode.v4.GeocodeResult.Granularity granularity = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The enum numeric values on the wire for granularity to add. + * @return This builder for chaining. + */ + public Builder addAllGranularityValue(java.lang.Iterable values) { + ensureGranularityIsMutable(); + for (int value : values) { + granularity_.addInt(value); + } + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.maps.geocode.v4.GeocodeLocationRequest) + } + + // @@protoc_insertion_point(class_scope:google.maps.geocode.v4.GeocodeLocationRequest) + private static final com.google.maps.geocode.v4.GeocodeLocationRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.geocode.v4.GeocodeLocationRequest(); + } + + public static com.google.maps.geocode.v4.GeocodeLocationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GeocodeLocationRequest 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.geocode.v4.GeocodeLocationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodeLocationRequestOrBuilder.java b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodeLocationRequestOrBuilder.java new file mode 100644 index 000000000000..e7ce488cd02a --- /dev/null +++ b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodeLocationRequestOrBuilder.java @@ -0,0 +1,312 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/maps/geocode/v4/geocode_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.geocode.v4; + +@com.google.protobuf.Generated +public interface GeocodeLocationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.geocode.v4.GeocodeLocationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The location in the format of "lat,lng" string. For example,
+   * "64.7611872,-18.4705364".
+   * 
+ * + * string location_query = 1; + * + * @return Whether the locationQuery field is set. + */ + boolean hasLocationQuery(); + + /** + * + * + *
+   * The location in the format of "lat,lng" string. For example,
+   * "64.7611872,-18.4705364".
+   * 
+ * + * string location_query = 1; + * + * @return The locationQuery. + */ + java.lang.String getLocationQuery(); + + /** + * + * + *
+   * The location in the format of "lat,lng" string. For example,
+   * "64.7611872,-18.4705364".
+   * 
+ * + * string location_query = 1; + * + * @return The bytes for locationQuery. + */ + com.google.protobuf.ByteString getLocationQueryBytes(); + + /** + * + * + *
+   * The location in the structured format.
+   * 
+ * + * .google.type.LatLng location = 2; + * + * @return Whether the location field is set. + */ + boolean hasLocation(); + + /** + * + * + *
+   * The location in the structured format.
+   * 
+ * + * .google.type.LatLng location = 2; + * + * @return The location. + */ + com.google.type.LatLng getLocation(); + + /** + * + * + *
+   * The location in the structured format.
+   * 
+ * + * .google.type.LatLng location = 2; + */ + com.google.type.LatLngOrBuilder getLocationOrBuilder(); + + /** + * + * + *
+   * Optional. Language in which the results should be returned.
+   * 
+ * + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + + /** + * + * + *
+   * Optional. Language in which the results should be returned.
+   * 
+ * + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); + + /** + * + * + *
+   * Optional. Region code. The region code, specified as a ccTLD ("top-level
+   * domain") two-character value. The parameter affects results based on
+   * applicable law.
+   * 
+ * + * string region_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The regionCode. + */ + java.lang.String getRegionCode(); + + /** + * + * + *
+   * Optional. Region code. The region code, specified as a ccTLD ("top-level
+   * domain") two-character value. The parameter affects results based on
+   * applicable law.
+   * 
+ * + * string region_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for regionCode. + */ + com.google.protobuf.ByteString getRegionCodeBytes(); + + /** + * + * + *
+   * Optional. A set of type tags to restrict the results. Results that do not
+   * have any of the specified types are removed.
+   *
+   * For the complete list of possible values, see Table A and Table B at
+   * https://developers.google.com/maps/documentation/places/web-service/place-types.
+   * 
+ * + * repeated string types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the types. + */ + java.util.List getTypesList(); + + /** + * + * + *
+   * Optional. A set of type tags to restrict the results. Results that do not
+   * have any of the specified types are removed.
+   *
+   * For the complete list of possible values, see Table A and Table B at
+   * https://developers.google.com/maps/documentation/places/web-service/place-types.
+   * 
+ * + * repeated string types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of types. + */ + int getTypesCount(); + + /** + * + * + *
+   * Optional. A set of type tags to restrict the results. Results that do not
+   * have any of the specified types are removed.
+   *
+   * For the complete list of possible values, see Table A and Table B at
+   * https://developers.google.com/maps/documentation/places/web-service/place-types.
+   * 
+ * + * repeated string types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The types at the given index. + */ + java.lang.String getTypes(int index); + + /** + * + * + *
+   * Optional. A set of type tags to restrict the results. Results that do not
+   * have any of the specified types are removed.
+   *
+   * For the complete list of possible values, see Table A and Table B at
+   * https://developers.google.com/maps/documentation/places/web-service/place-types.
+   * 
+ * + * repeated string types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the types at the given index. + */ + com.google.protobuf.ByteString getTypesBytes(int index); + + /** + * + * + *
+   * Optional. A filter of one or more location granularity enums.
+   * 
+ * + * + * repeated .google.maps.geocode.v4.GeocodeResult.Granularity granularity = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the granularity. + */ + java.util.List getGranularityList(); + + /** + * + * + *
+   * Optional. A filter of one or more location granularity enums.
+   * 
+ * + * + * repeated .google.maps.geocode.v4.GeocodeResult.Granularity granularity = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of granularity. + */ + int getGranularityCount(); + + /** + * + * + *
+   * Optional. A filter of one or more location granularity enums.
+   * 
+ * + * + * repeated .google.maps.geocode.v4.GeocodeResult.Granularity granularity = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The granularity at the given index. + */ + com.google.maps.geocode.v4.GeocodeResult.Granularity getGranularity(int index); + + /** + * + * + *
+   * Optional. A filter of one or more location granularity enums.
+   * 
+ * + * + * repeated .google.maps.geocode.v4.GeocodeResult.Granularity granularity = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for granularity. + */ + java.util.List getGranularityValueList(); + + /** + * + * + *
+   * Optional. A filter of one or more location granularity enums.
+   * 
+ * + * + * repeated .google.maps.geocode.v4.GeocodeResult.Granularity granularity = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of granularity at the given index. + */ + int getGranularityValue(int index); + + com.google.maps.geocode.v4.GeocodeLocationRequest.LocationInputCase getLocationInputCase(); +} diff --git a/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodeLocationResponse.java b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodeLocationResponse.java new file mode 100644 index 000000000000..34c931a9f3a3 --- /dev/null +++ b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodeLocationResponse.java @@ -0,0 +1,1213 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/maps/geocode/v4/geocode_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.geocode.v4; + +/** + * + * + *
+ * Response message for
+ * [GeocodeService.GeocodeLocation][google.maps.geocode.v4.GeocodeService.GeocodeLocation].
+ * 
+ * + * Protobuf type {@code google.maps.geocode.v4.GeocodeLocationResponse} + */ +@com.google.protobuf.Generated +public final class GeocodeLocationResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.maps.geocode.v4.GeocodeLocationResponse) + GeocodeLocationResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GeocodeLocationResponse"); + } + + // Use GeocodeLocationResponse.newBuilder() to construct. + private GeocodeLocationResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GeocodeLocationResponse() { + results_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodeLocationResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodeLocationResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.GeocodeLocationResponse.class, + com.google.maps.geocode.v4.GeocodeLocationResponse.Builder.class); + } + + private int bitField0_; + public static final int RESULTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List results_; + + /** + * + * + *
+   * The geocoding result.
+   * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + @java.lang.Override + public java.util.List getResultsList() { + return results_; + } + + /** + * + * + *
+   * The geocoding result.
+   * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + @java.lang.Override + public java.util.List + getResultsOrBuilderList() { + return results_; + } + + /** + * + * + *
+   * The geocoding result.
+   * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + @java.lang.Override + public int getResultsCount() { + return results_.size(); + } + + /** + * + * + *
+   * The geocoding result.
+   * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + @java.lang.Override + public com.google.maps.geocode.v4.GeocodeResult getResults(int index) { + return results_.get(index); + } + + /** + * + * + *
+   * The geocoding result.
+   * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + @java.lang.Override + public com.google.maps.geocode.v4.GeocodeResultOrBuilder getResultsOrBuilder(int index) { + return results_.get(index); + } + + public static final int PLUS_CODE_FIELD_NUMBER = 2; + private com.google.maps.geocode.v4.PlusCode plusCode_; + + /** + * + * + *
+   * Plus code of the location in the request.
+   * 
+ * + * .google.maps.geocode.v4.PlusCode plus_code = 2; + * + * @return Whether the plusCode field is set. + */ + @java.lang.Override + public boolean hasPlusCode() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Plus code of the location in the request.
+   * 
+ * + * .google.maps.geocode.v4.PlusCode plus_code = 2; + * + * @return The plusCode. + */ + @java.lang.Override + public com.google.maps.geocode.v4.PlusCode getPlusCode() { + return plusCode_ == null ? com.google.maps.geocode.v4.PlusCode.getDefaultInstance() : plusCode_; + } + + /** + * + * + *
+   * Plus code of the location in the request.
+   * 
+ * + * .google.maps.geocode.v4.PlusCode plus_code = 2; + */ + @java.lang.Override + public com.google.maps.geocode.v4.PlusCodeOrBuilder getPlusCodeOrBuilder() { + return plusCode_ == null ? com.google.maps.geocode.v4.PlusCode.getDefaultInstance() : plusCode_; + } + + 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 < results_.size(); i++) { + output.writeMessage(1, results_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getPlusCode()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < results_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, results_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPlusCode()); + } + 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.geocode.v4.GeocodeLocationResponse)) { + return super.equals(obj); + } + com.google.maps.geocode.v4.GeocodeLocationResponse other = + (com.google.maps.geocode.v4.GeocodeLocationResponse) obj; + + if (!getResultsList().equals(other.getResultsList())) return false; + if (hasPlusCode() != other.hasPlusCode()) return false; + if (hasPlusCode()) { + if (!getPlusCode().equals(other.getPlusCode())) 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 (getResultsCount() > 0) { + hash = (37 * hash) + RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getResultsList().hashCode(); + } + if (hasPlusCode()) { + hash = (37 * hash) + PLUS_CODE_FIELD_NUMBER; + hash = (53 * hash) + getPlusCode().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.geocode.v4.GeocodeLocationResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.GeocodeLocationResponse 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.geocode.v4.GeocodeLocationResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.GeocodeLocationResponse 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.geocode.v4.GeocodeLocationResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.GeocodeLocationResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.geocode.v4.GeocodeLocationResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.GeocodeLocationResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.GeocodeLocationResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.GeocodeLocationResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.GeocodeLocationResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.GeocodeLocationResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geocode.v4.GeocodeLocationResponse 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for
+   * [GeocodeService.GeocodeLocation][google.maps.geocode.v4.GeocodeService.GeocodeLocation].
+   * 
+ * + * Protobuf type {@code google.maps.geocode.v4.GeocodeLocationResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.geocode.v4.GeocodeLocationResponse) + com.google.maps.geocode.v4.GeocodeLocationResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodeLocationResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodeLocationResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.GeocodeLocationResponse.class, + com.google.maps.geocode.v4.GeocodeLocationResponse.Builder.class); + } + + // Construct using com.google.maps.geocode.v4.GeocodeLocationResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetResultsFieldBuilder(); + internalGetPlusCodeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + } else { + results_ = null; + resultsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + plusCode_ = null; + if (plusCodeBuilder_ != null) { + plusCodeBuilder_.dispose(); + plusCodeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodeLocationResponse_descriptor; + } + + @java.lang.Override + public com.google.maps.geocode.v4.GeocodeLocationResponse getDefaultInstanceForType() { + return com.google.maps.geocode.v4.GeocodeLocationResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.geocode.v4.GeocodeLocationResponse build() { + com.google.maps.geocode.v4.GeocodeLocationResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.geocode.v4.GeocodeLocationResponse buildPartial() { + com.google.maps.geocode.v4.GeocodeLocationResponse result = + new com.google.maps.geocode.v4.GeocodeLocationResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.maps.geocode.v4.GeocodeLocationResponse result) { + if (resultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.results_ = results_; + } else { + result.results_ = resultsBuilder_.build(); + } + } + + private void buildPartial0(com.google.maps.geocode.v4.GeocodeLocationResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.plusCode_ = plusCodeBuilder_ == null ? plusCode_ : plusCodeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.geocode.v4.GeocodeLocationResponse) { + return mergeFrom((com.google.maps.geocode.v4.GeocodeLocationResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.geocode.v4.GeocodeLocationResponse other) { + if (other == com.google.maps.geocode.v4.GeocodeLocationResponse.getDefaultInstance()) + return this; + if (resultsBuilder_ == null) { + if (!other.results_.isEmpty()) { + if (results_.isEmpty()) { + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResultsIsMutable(); + results_.addAll(other.results_); + } + onChanged(); + } + } else { + if (!other.results_.isEmpty()) { + if (resultsBuilder_.isEmpty()) { + resultsBuilder_.dispose(); + resultsBuilder_ = null; + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + resultsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetResultsFieldBuilder() + : null; + } else { + resultsBuilder_.addAllMessages(other.results_); + } + } + } + if (other.hasPlusCode()) { + mergePlusCode(other.getPlusCode()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.maps.geocode.v4.GeocodeResult m = + input.readMessage( + com.google.maps.geocode.v4.GeocodeResult.parser(), extensionRegistry); + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(m); + } else { + resultsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetPlusCodeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List results_ = + java.util.Collections.emptyList(); + + private void ensureResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + results_ = new java.util.ArrayList(results_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.maps.geocode.v4.GeocodeResult, + com.google.maps.geocode.v4.GeocodeResult.Builder, + com.google.maps.geocode.v4.GeocodeResultOrBuilder> + resultsBuilder_; + + /** + * + * + *
+     * The geocoding result.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + public java.util.List getResultsList() { + if (resultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(results_); + } else { + return resultsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The geocoding result.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + public int getResultsCount() { + if (resultsBuilder_ == null) { + return results_.size(); + } else { + return resultsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The geocoding result.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + public com.google.maps.geocode.v4.GeocodeResult getResults(int index) { + if (resultsBuilder_ == null) { + return results_.get(index); + } else { + return resultsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The geocoding result.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + public Builder setResults(int index, com.google.maps.geocode.v4.GeocodeResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.set(index, value); + onChanged(); + } else { + resultsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The geocoding result.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + public Builder setResults( + int index, com.google.maps.geocode.v4.GeocodeResult.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.set(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The geocoding result.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + public Builder addResults(com.google.maps.geocode.v4.GeocodeResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(value); + onChanged(); + } else { + resultsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The geocoding result.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + public Builder addResults(int index, com.google.maps.geocode.v4.GeocodeResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(index, value); + onChanged(); + } else { + resultsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The geocoding result.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + public Builder addResults(com.google.maps.geocode.v4.GeocodeResult.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The geocoding result.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + public Builder addResults( + int index, com.google.maps.geocode.v4.GeocodeResult.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The geocoding result.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + public Builder addAllResults( + java.lang.Iterable values) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, results_); + onChanged(); + } else { + resultsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The geocoding result.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + public Builder clearResults() { + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + resultsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The geocoding result.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + public Builder removeResults(int index) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.remove(index); + onChanged(); + } else { + resultsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The geocoding result.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + public com.google.maps.geocode.v4.GeocodeResult.Builder getResultsBuilder(int index) { + return internalGetResultsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The geocoding result.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + public com.google.maps.geocode.v4.GeocodeResultOrBuilder getResultsOrBuilder(int index) { + if (resultsBuilder_ == null) { + return results_.get(index); + } else { + return resultsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The geocoding result.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + public java.util.List + getResultsOrBuilderList() { + if (resultsBuilder_ != null) { + return resultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(results_); + } + } + + /** + * + * + *
+     * The geocoding result.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + public com.google.maps.geocode.v4.GeocodeResult.Builder addResultsBuilder() { + return internalGetResultsFieldBuilder() + .addBuilder(com.google.maps.geocode.v4.GeocodeResult.getDefaultInstance()); + } + + /** + * + * + *
+     * The geocoding result.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + public com.google.maps.geocode.v4.GeocodeResult.Builder addResultsBuilder(int index) { + return internalGetResultsFieldBuilder() + .addBuilder(index, com.google.maps.geocode.v4.GeocodeResult.getDefaultInstance()); + } + + /** + * + * + *
+     * The geocoding result.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + public java.util.List + getResultsBuilderList() { + return internalGetResultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.maps.geocode.v4.GeocodeResult, + com.google.maps.geocode.v4.GeocodeResult.Builder, + com.google.maps.geocode.v4.GeocodeResultOrBuilder> + internalGetResultsFieldBuilder() { + if (resultsBuilder_ == null) { + resultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.maps.geocode.v4.GeocodeResult, + com.google.maps.geocode.v4.GeocodeResult.Builder, + com.google.maps.geocode.v4.GeocodeResultOrBuilder>( + results_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + results_ = null; + } + return resultsBuilder_; + } + + private com.google.maps.geocode.v4.PlusCode plusCode_; + private com.google.protobuf.SingleFieldBuilder< + com.google.maps.geocode.v4.PlusCode, + com.google.maps.geocode.v4.PlusCode.Builder, + com.google.maps.geocode.v4.PlusCodeOrBuilder> + plusCodeBuilder_; + + /** + * + * + *
+     * Plus code of the location in the request.
+     * 
+ * + * .google.maps.geocode.v4.PlusCode plus_code = 2; + * + * @return Whether the plusCode field is set. + */ + public boolean hasPlusCode() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Plus code of the location in the request.
+     * 
+ * + * .google.maps.geocode.v4.PlusCode plus_code = 2; + * + * @return The plusCode. + */ + public com.google.maps.geocode.v4.PlusCode getPlusCode() { + if (plusCodeBuilder_ == null) { + return plusCode_ == null + ? com.google.maps.geocode.v4.PlusCode.getDefaultInstance() + : plusCode_; + } else { + return plusCodeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Plus code of the location in the request.
+     * 
+ * + * .google.maps.geocode.v4.PlusCode plus_code = 2; + */ + public Builder setPlusCode(com.google.maps.geocode.v4.PlusCode value) { + if (plusCodeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + plusCode_ = value; + } else { + plusCodeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Plus code of the location in the request.
+     * 
+ * + * .google.maps.geocode.v4.PlusCode plus_code = 2; + */ + public Builder setPlusCode(com.google.maps.geocode.v4.PlusCode.Builder builderForValue) { + if (plusCodeBuilder_ == null) { + plusCode_ = builderForValue.build(); + } else { + plusCodeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Plus code of the location in the request.
+     * 
+ * + * .google.maps.geocode.v4.PlusCode plus_code = 2; + */ + public Builder mergePlusCode(com.google.maps.geocode.v4.PlusCode value) { + if (plusCodeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && plusCode_ != null + && plusCode_ != com.google.maps.geocode.v4.PlusCode.getDefaultInstance()) { + getPlusCodeBuilder().mergeFrom(value); + } else { + plusCode_ = value; + } + } else { + plusCodeBuilder_.mergeFrom(value); + } + if (plusCode_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Plus code of the location in the request.
+     * 
+ * + * .google.maps.geocode.v4.PlusCode plus_code = 2; + */ + public Builder clearPlusCode() { + bitField0_ = (bitField0_ & ~0x00000002); + plusCode_ = null; + if (plusCodeBuilder_ != null) { + plusCodeBuilder_.dispose(); + plusCodeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Plus code of the location in the request.
+     * 
+ * + * .google.maps.geocode.v4.PlusCode plus_code = 2; + */ + public com.google.maps.geocode.v4.PlusCode.Builder getPlusCodeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetPlusCodeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Plus code of the location in the request.
+     * 
+ * + * .google.maps.geocode.v4.PlusCode plus_code = 2; + */ + public com.google.maps.geocode.v4.PlusCodeOrBuilder getPlusCodeOrBuilder() { + if (plusCodeBuilder_ != null) { + return plusCodeBuilder_.getMessageOrBuilder(); + } else { + return plusCode_ == null + ? com.google.maps.geocode.v4.PlusCode.getDefaultInstance() + : plusCode_; + } + } + + /** + * + * + *
+     * Plus code of the location in the request.
+     * 
+ * + * .google.maps.geocode.v4.PlusCode plus_code = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.maps.geocode.v4.PlusCode, + com.google.maps.geocode.v4.PlusCode.Builder, + com.google.maps.geocode.v4.PlusCodeOrBuilder> + internalGetPlusCodeFieldBuilder() { + if (plusCodeBuilder_ == null) { + plusCodeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.maps.geocode.v4.PlusCode, + com.google.maps.geocode.v4.PlusCode.Builder, + com.google.maps.geocode.v4.PlusCodeOrBuilder>( + getPlusCode(), getParentForChildren(), isClean()); + plusCode_ = null; + } + return plusCodeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.maps.geocode.v4.GeocodeLocationResponse) + } + + // @@protoc_insertion_point(class_scope:google.maps.geocode.v4.GeocodeLocationResponse) + private static final com.google.maps.geocode.v4.GeocodeLocationResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.geocode.v4.GeocodeLocationResponse(); + } + + public static com.google.maps.geocode.v4.GeocodeLocationResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GeocodeLocationResponse 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.geocode.v4.GeocodeLocationResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodeLocationResponseOrBuilder.java b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodeLocationResponseOrBuilder.java new file mode 100644 index 000000000000..bfdc3767bad7 --- /dev/null +++ b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodeLocationResponseOrBuilder.java @@ -0,0 +1,121 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/maps/geocode/v4/geocode_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.geocode.v4; + +@com.google.protobuf.Generated +public interface GeocodeLocationResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.geocode.v4.GeocodeLocationResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The geocoding result.
+   * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + java.util.List getResultsList(); + + /** + * + * + *
+   * The geocoding result.
+   * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + com.google.maps.geocode.v4.GeocodeResult getResults(int index); + + /** + * + * + *
+   * The geocoding result.
+   * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + int getResultsCount(); + + /** + * + * + *
+   * The geocoding result.
+   * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + java.util.List + getResultsOrBuilderList(); + + /** + * + * + *
+   * The geocoding result.
+   * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult results = 1; + */ + com.google.maps.geocode.v4.GeocodeResultOrBuilder getResultsOrBuilder(int index); + + /** + * + * + *
+   * Plus code of the location in the request.
+   * 
+ * + * .google.maps.geocode.v4.PlusCode plus_code = 2; + * + * @return Whether the plusCode field is set. + */ + boolean hasPlusCode(); + + /** + * + * + *
+   * Plus code of the location in the request.
+   * 
+ * + * .google.maps.geocode.v4.PlusCode plus_code = 2; + * + * @return The plusCode. + */ + com.google.maps.geocode.v4.PlusCode getPlusCode(); + + /** + * + * + *
+   * Plus code of the location in the request.
+   * 
+ * + * .google.maps.geocode.v4.PlusCode plus_code = 2; + */ + com.google.maps.geocode.v4.PlusCodeOrBuilder getPlusCodeOrBuilder(); +} diff --git a/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodePlaceRequest.java b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodePlaceRequest.java new file mode 100644 index 000000000000..61691bbbad90 --- /dev/null +++ b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodePlaceRequest.java @@ -0,0 +1,987 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/maps/geocode/v4/geocode_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.geocode.v4; + +/** + * + * + *
+ * Request message for GeocodeService.GeocodePlace.
+ * 
+ * + * Protobuf type {@code google.maps.geocode.v4.GeocodePlaceRequest} + */ +@com.google.protobuf.Generated +public final class GeocodePlaceRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.maps.geocode.v4.GeocodePlaceRequest) + GeocodePlaceRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GeocodePlaceRequest"); + } + + // Use GeocodePlaceRequest.newBuilder() to construct. + private GeocodePlaceRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GeocodePlaceRequest() { + place_ = ""; + languageCode_ = ""; + regionCode_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodePlaceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodePlaceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.GeocodePlaceRequest.class, + com.google.maps.geocode.v4.GeocodePlaceRequest.Builder.class); + } + + public static final int PLACE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object place_ = ""; + + /** + * + * + *
+   * Required. Place identifier to geocode in the format of places/{place}.
+   * 
+ * + * string place = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + + /** + * + * + *
+   * Required. Place identifier to geocode in the format of places/{place}.
+   * 
+ * + * string place = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object languageCode_ = ""; + + /** + * + * + *
+   * Optional. Language in which the results should be returned.
+   * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Language in which the results should be returned.
+   * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REGION_CODE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object regionCode_ = ""; + + /** + * + * + *
+   * Optional. Region code. The region code, specified as a ccTLD ("top-level
+   * domain") two-character value. The parameter affects results based on
+   * applicable law.
+   * 
+ * + * string region_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The regionCode. + */ + @java.lang.Override + public java.lang.String getRegionCode() { + java.lang.Object ref = regionCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + regionCode_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Region code. The region code, specified as a ccTLD ("top-level
+   * domain") two-character value. The parameter affects results based on
+   * applicable law.
+   * 
+ * + * string region_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for regionCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRegionCodeBytes() { + java.lang.Object ref = regionCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + regionCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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.GeneratedMessage.isStringEmpty(place_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, place_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, languageCode_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(regionCode_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, regionCode_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(place_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, place_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, languageCode_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(regionCode_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, regionCode_); + } + 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.geocode.v4.GeocodePlaceRequest)) { + return super.equals(obj); + } + com.google.maps.geocode.v4.GeocodePlaceRequest other = + (com.google.maps.geocode.v4.GeocodePlaceRequest) obj; + + if (!getPlace().equals(other.getPlace())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (!getRegionCode().equals(other.getRegionCode())) 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 = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (37 * hash) + REGION_CODE_FIELD_NUMBER; + hash = (53 * hash) + getRegionCode().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.geocode.v4.GeocodePlaceRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.GeocodePlaceRequest 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.geocode.v4.GeocodePlaceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.GeocodePlaceRequest 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.geocode.v4.GeocodePlaceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.GeocodePlaceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.geocode.v4.GeocodePlaceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.GeocodePlaceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.GeocodePlaceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.GeocodePlaceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.GeocodePlaceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.GeocodePlaceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geocode.v4.GeocodePlaceRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for GeocodeService.GeocodePlace.
+   * 
+ * + * Protobuf type {@code google.maps.geocode.v4.GeocodePlaceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.geocode.v4.GeocodePlaceRequest) + com.google.maps.geocode.v4.GeocodePlaceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodePlaceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodePlaceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.GeocodePlaceRequest.class, + com.google.maps.geocode.v4.GeocodePlaceRequest.Builder.class); + } + + // Construct using com.google.maps.geocode.v4.GeocodePlaceRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + place_ = ""; + languageCode_ = ""; + regionCode_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodePlaceRequest_descriptor; + } + + @java.lang.Override + public com.google.maps.geocode.v4.GeocodePlaceRequest getDefaultInstanceForType() { + return com.google.maps.geocode.v4.GeocodePlaceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.geocode.v4.GeocodePlaceRequest build() { + com.google.maps.geocode.v4.GeocodePlaceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.geocode.v4.GeocodePlaceRequest buildPartial() { + com.google.maps.geocode.v4.GeocodePlaceRequest result = + new com.google.maps.geocode.v4.GeocodePlaceRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.geocode.v4.GeocodePlaceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.place_ = place_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.languageCode_ = languageCode_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.regionCode_ = regionCode_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.geocode.v4.GeocodePlaceRequest) { + return mergeFrom((com.google.maps.geocode.v4.GeocodePlaceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.geocode.v4.GeocodePlaceRequest other) { + if (other == com.google.maps.geocode.v4.GeocodePlaceRequest.getDefaultInstance()) return this; + if (!other.getPlace().isEmpty()) { + place_ = other.place_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getRegionCode().isEmpty()) { + regionCode_ = other.regionCode_; + bitField0_ |= 0x00000004; + 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 + case 18: + { + languageCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + regionCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + 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 bitField0_; + + private java.lang.Object place_ = ""; + + /** + * + * + *
+     * Required. Place identifier to geocode in the format of places/{place}.
+     * 
+ * + * string place = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + + /** + * + * + *
+     * Required. Place identifier to geocode in the format of places/{place}.
+     * 
+ * + * string place = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + + /** + * + * + *
+     * Required. Place identifier to geocode in the format of places/{place}.
+     * 
+ * + * string place = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + + /** + * + * + *
+     * Required. Place identifier to geocode in the format of places/{place}.
+     * 
+ * + * string place = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearPlace() { + place_ = getDefaultInstance().getPlace(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Place identifier to geocode in the format of places/{place}.
+     * 
+ * + * string place = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + + private java.lang.Object languageCode_ = ""; + + /** + * + * + *
+     * Optional. Language in which the results should be returned.
+     * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Language in which the results should be returned.
+     * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Language in which the results should be returned.
+     * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + languageCode_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Language in which the results should be returned.
+     * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + languageCode_ = getDefaultInstance().getLanguageCode(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Language in which the results should be returned.
+     * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + languageCode_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object regionCode_ = ""; + + /** + * + * + *
+     * Optional. Region code. The region code, specified as a ccTLD ("top-level
+     * domain") two-character value. The parameter affects results based on
+     * applicable law.
+     * 
+ * + * string region_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The regionCode. + */ + public java.lang.String getRegionCode() { + java.lang.Object ref = regionCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + regionCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Region code. The region code, specified as a ccTLD ("top-level
+     * domain") two-character value. The parameter affects results based on
+     * applicable law.
+     * 
+ * + * string region_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for regionCode. + */ + public com.google.protobuf.ByteString getRegionCodeBytes() { + java.lang.Object ref = regionCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + regionCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Region code. The region code, specified as a ccTLD ("top-level
+     * domain") two-character value. The parameter affects results based on
+     * applicable law.
+     * 
+ * + * string region_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The regionCode to set. + * @return This builder for chaining. + */ + public Builder setRegionCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + regionCode_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Region code. The region code, specified as a ccTLD ("top-level
+     * domain") two-character value. The parameter affects results based on
+     * applicable law.
+     * 
+ * + * string region_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRegionCode() { + regionCode_ = getDefaultInstance().getRegionCode(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Region code. The region code, specified as a ccTLD ("top-level
+     * domain") two-character value. The parameter affects results based on
+     * applicable law.
+     * 
+ * + * string region_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for regionCode to set. + * @return This builder for chaining. + */ + public Builder setRegionCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + regionCode_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.maps.geocode.v4.GeocodePlaceRequest) + } + + // @@protoc_insertion_point(class_scope:google.maps.geocode.v4.GeocodePlaceRequest) + private static final com.google.maps.geocode.v4.GeocodePlaceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.geocode.v4.GeocodePlaceRequest(); + } + + public static com.google.maps.geocode.v4.GeocodePlaceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GeocodePlaceRequest 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.geocode.v4.GeocodePlaceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodePlaceRequestOrBuilder.java b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodePlaceRequestOrBuilder.java new file mode 100644 index 000000000000..bb3949e266b4 --- /dev/null +++ b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodePlaceRequestOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/maps/geocode/v4/geocode_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.geocode.v4; + +@com.google.protobuf.Generated +public interface GeocodePlaceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.geocode.v4.GeocodePlaceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Place identifier to geocode in the format of places/{place}.
+   * 
+ * + * string place = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The place. + */ + java.lang.String getPlace(); + + /** + * + * + *
+   * Required. Place identifier to geocode in the format of places/{place}.
+   * 
+ * + * string place = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for place. + */ + com.google.protobuf.ByteString getPlaceBytes(); + + /** + * + * + *
+   * Optional. Language in which the results should be returned.
+   * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + + /** + * + * + *
+   * Optional. Language in which the results should be returned.
+   * 
+ * + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); + + /** + * + * + *
+   * Optional. Region code. The region code, specified as a ccTLD ("top-level
+   * domain") two-character value. The parameter affects results based on
+   * applicable law.
+   * 
+ * + * string region_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The regionCode. + */ + java.lang.String getRegionCode(); + + /** + * + * + *
+   * Optional. Region code. The region code, specified as a ccTLD ("top-level
+   * domain") two-character value. The parameter affects results based on
+   * applicable law.
+   * 
+ * + * string region_code = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for regionCode. + */ + com.google.protobuf.ByteString getRegionCodeBytes(); +} diff --git a/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodeResult.java b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodeResult.java new file mode 100644 index 000000000000..c4643cca2d9d --- /dev/null +++ b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodeResult.java @@ -0,0 +1,5704 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/maps/geocode/v4/geocode_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.geocode.v4; + +/** + * + * + *
+ * A geocode result contains geographic information about a place.
+ * 
+ * + * Protobuf type {@code google.maps.geocode.v4.GeocodeResult} + */ +@com.google.protobuf.Generated +public final class GeocodeResult extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.maps.geocode.v4.GeocodeResult) + GeocodeResultOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GeocodeResult"); + } + + // Use GeocodeResult.newBuilder() to construct. + private GeocodeResult(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GeocodeResult() { + place_ = ""; + placeId_ = ""; + granularity_ = 0; + formattedAddress_ = ""; + addressComponents_ = java.util.Collections.emptyList(); + postalCodeLocalities_ = java.util.Collections.emptyList(); + types_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodeResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodeResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.GeocodeResult.class, + com.google.maps.geocode.v4.GeocodeResult.Builder.class); + } + + /** + * + * + *
+   * The granularity of the location.
+   * 
+ * + * Protobuf enum {@code google.maps.geocode.v4.GeocodeResult.Granularity} + */ + public enum Granularity implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Do not use.
+     * 
+ * + * GRANULARITY_UNSPECIFIED = 0; + */ + GRANULARITY_UNSPECIFIED(0), + /** + * + * + *
+     * The non-interpolated location of an actual plot of land corresponding
+     * to the matched address.
+     * 
+ * + * ROOFTOP = 1; + */ + ROOFTOP(1), + /** + * + * + *
+     * Interpolated from a range of street numbers. For example, if we know
+     * that a segment of Amphitheatre Pkwy contains numbers 1600 - 1699, then
+     * 1650 might be placed halfway between its endpoints.
+     * 
+ * + * RANGE_INTERPOLATED = 2; + */ + RANGE_INTERPOLATED(2), + /** + * + * + *
+     * The geometric center of a feature for which we have polygonal data.
+     * 
+ * + * GEOMETRIC_CENTER = 3; + */ + GEOMETRIC_CENTER(3), + /** + * + * + *
+     * Everything else.
+     * 
+ * + * APPROXIMATE = 4; + */ + APPROXIMATE(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Granularity"); + } + + /** + * + * + *
+     * Do not use.
+     * 
+ * + * GRANULARITY_UNSPECIFIED = 0; + */ + public static final int GRANULARITY_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The non-interpolated location of an actual plot of land corresponding
+     * to the matched address.
+     * 
+ * + * ROOFTOP = 1; + */ + public static final int ROOFTOP_VALUE = 1; + + /** + * + * + *
+     * Interpolated from a range of street numbers. For example, if we know
+     * that a segment of Amphitheatre Pkwy contains numbers 1600 - 1699, then
+     * 1650 might be placed halfway between its endpoints.
+     * 
+ * + * RANGE_INTERPOLATED = 2; + */ + public static final int RANGE_INTERPOLATED_VALUE = 2; + + /** + * + * + *
+     * The geometric center of a feature for which we have polygonal data.
+     * 
+ * + * GEOMETRIC_CENTER = 3; + */ + public static final int GEOMETRIC_CENTER_VALUE = 3; + + /** + * + * + *
+     * Everything else.
+     * 
+ * + * APPROXIMATE = 4; + */ + public static final int APPROXIMATE_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 Granularity 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 Granularity forNumber(int value) { + switch (value) { + case 0: + return GRANULARITY_UNSPECIFIED; + case 1: + return ROOFTOP; + case 2: + return RANGE_INTERPOLATED; + case 3: + return GEOMETRIC_CENTER; + case 4: + return APPROXIMATE; + 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 Granularity findValueByNumber(int number) { + return Granularity.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.maps.geocode.v4.GeocodeResult.getDescriptor().getEnumTypes().get(0); + } + + private static final Granularity[] VALUES = values(); + + public static Granularity 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 Granularity(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.maps.geocode.v4.GeocodeResult.Granularity) + } + + public interface AddressComponentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.geocode.v4.GeocodeResult.AddressComponent) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The full text description or name of the address component. For example,
+     * an address component for the country Australia may have a long name of
+     * "Australia".
+     * 
+ * + * string long_text = 1; + * + * @return The longText. + */ + java.lang.String getLongText(); + + /** + * + * + *
+     * The full text description or name of the address component. For example,
+     * an address component for the country Australia may have a long name of
+     * "Australia".
+     * 
+ * + * string long_text = 1; + * + * @return The bytes for longText. + */ + com.google.protobuf.ByteString getLongTextBytes(); + + /** + * + * + *
+     * An abbreviated textual name for the address component, if available. For
+     * example, an address component for the country of Australia may have a
+     * short name of "AU".
+     * 
+ * + * string short_text = 2; + * + * @return The shortText. + */ + java.lang.String getShortText(); + + /** + * + * + *
+     * An abbreviated textual name for the address component, if available. For
+     * example, an address component for the country of Australia may have a
+     * short name of "AU".
+     * 
+ * + * string short_text = 2; + * + * @return The bytes for shortText. + */ + com.google.protobuf.ByteString getShortTextBytes(); + + /** + * + * + *
+     * An array indicating the type(s) of the address component.
+     *
+     * See
+     * https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types
+     * for more details.
+     * 
+ * + * repeated string types = 3; + * + * @return A list containing the types. + */ + java.util.List getTypesList(); + + /** + * + * + *
+     * An array indicating the type(s) of the address component.
+     *
+     * See
+     * https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types
+     * for more details.
+     * 
+ * + * repeated string types = 3; + * + * @return The count of types. + */ + int getTypesCount(); + + /** + * + * + *
+     * An array indicating the type(s) of the address component.
+     *
+     * See
+     * https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types
+     * for more details.
+     * 
+ * + * repeated string types = 3; + * + * @param index The index of the element to return. + * @return The types at the given index. + */ + java.lang.String getTypes(int index); + + /** + * + * + *
+     * An array indicating the type(s) of the address component.
+     *
+     * See
+     * https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types
+     * for more details.
+     * 
+ * + * repeated string types = 3; + * + * @param index The index of the value to return. + * @return The bytes of the types at the given index. + */ + com.google.protobuf.ByteString getTypesBytes(int index); + + /** + * + * + *
+     * The language used to format this component, in CLDR notation.
+     * 
+ * + * string language_code = 4; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + + /** + * + * + *
+     * The language used to format this component, in CLDR notation.
+     * 
+ * + * string language_code = 4; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); + } + + /** + * + * + *
+   * The structured components that form the formatted address, if this
+   * information is available.
+   * 
+ * + * Protobuf type {@code google.maps.geocode.v4.GeocodeResult.AddressComponent} + */ + public static final class AddressComponent extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.maps.geocode.v4.GeocodeResult.AddressComponent) + AddressComponentOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AddressComponent"); + } + + // Use AddressComponent.newBuilder() to construct. + private AddressComponent(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AddressComponent() { + longText_ = ""; + shortText_ = ""; + types_ = com.google.protobuf.LazyStringArrayList.emptyList(); + languageCode_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodeResult_AddressComponent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodeResult_AddressComponent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.GeocodeResult.AddressComponent.class, + com.google.maps.geocode.v4.GeocodeResult.AddressComponent.Builder.class); + } + + public static final int LONG_TEXT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object longText_ = ""; + + /** + * + * + *
+     * The full text description or name of the address component. For example,
+     * an address component for the country Australia may have a long name of
+     * "Australia".
+     * 
+ * + * string long_text = 1; + * + * @return The longText. + */ + @java.lang.Override + public java.lang.String getLongText() { + java.lang.Object ref = longText_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + longText_ = s; + return s; + } + } + + /** + * + * + *
+     * The full text description or name of the address component. For example,
+     * an address component for the country Australia may have a long name of
+     * "Australia".
+     * 
+ * + * string long_text = 1; + * + * @return The bytes for longText. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLongTextBytes() { + java.lang.Object ref = longText_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + longText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SHORT_TEXT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object shortText_ = ""; + + /** + * + * + *
+     * An abbreviated textual name for the address component, if available. For
+     * example, an address component for the country of Australia may have a
+     * short name of "AU".
+     * 
+ * + * string short_text = 2; + * + * @return The shortText. + */ + @java.lang.Override + public java.lang.String getShortText() { + java.lang.Object ref = shortText_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shortText_ = s; + return s; + } + } + + /** + * + * + *
+     * An abbreviated textual name for the address component, if available. For
+     * example, an address component for the country of Australia may have a
+     * short name of "AU".
+     * 
+ * + * string short_text = 2; + * + * @return The bytes for shortText. + */ + @java.lang.Override + public com.google.protobuf.ByteString getShortTextBytes() { + java.lang.Object ref = shortText_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + shortText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList types_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+     * An array indicating the type(s) of the address component.
+     *
+     * See
+     * https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types
+     * for more details.
+     * 
+ * + * repeated string types = 3; + * + * @return A list containing the types. + */ + public com.google.protobuf.ProtocolStringList getTypesList() { + return types_; + } + + /** + * + * + *
+     * An array indicating the type(s) of the address component.
+     *
+     * See
+     * https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types
+     * for more details.
+     * 
+ * + * repeated string types = 3; + * + * @return The count of types. + */ + public int getTypesCount() { + return types_.size(); + } + + /** + * + * + *
+     * An array indicating the type(s) of the address component.
+     *
+     * See
+     * https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types
+     * for more details.
+     * 
+ * + * repeated string types = 3; + * + * @param index The index of the element to return. + * @return The types at the given index. + */ + public java.lang.String getTypes(int index) { + return types_.get(index); + } + + /** + * + * + *
+     * An array indicating the type(s) of the address component.
+     *
+     * See
+     * https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types
+     * for more details.
+     * 
+ * + * repeated string types = 3; + * + * @param index The index of the value to return. + * @return The bytes of the types at the given index. + */ + public com.google.protobuf.ByteString getTypesBytes(int index) { + return types_.getByteString(index); + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object languageCode_ = ""; + + /** + * + * + *
+     * The language used to format this component, in CLDR notation.
+     * 
+ * + * string language_code = 4; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + + /** + * + * + *
+     * The language used to format this component, in CLDR notation.
+     * 
+ * + * string language_code = 4; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(longText_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, longText_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(shortText_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, shortText_); + } + for (int i = 0; i < types_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, types_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, languageCode_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(longText_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, longText_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(shortText_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, shortText_); + } + { + int dataSize = 0; + for (int i = 0; i < types_.size(); i++) { + dataSize += computeStringSizeNoTag(types_.getRaw(i)); + } + size += dataSize; + size += 1 * getTypesList().size(); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, languageCode_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.maps.geocode.v4.GeocodeResult.AddressComponent)) { + return super.equals(obj); + } + com.google.maps.geocode.v4.GeocodeResult.AddressComponent other = + (com.google.maps.geocode.v4.GeocodeResult.AddressComponent) obj; + + if (!getLongText().equals(other.getLongText())) return false; + if (!getShortText().equals(other.getShortText())) return false; + if (!getTypesList().equals(other.getTypesList())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LONG_TEXT_FIELD_NUMBER; + hash = (53 * hash) + getLongText().hashCode(); + hash = (37 * hash) + SHORT_TEXT_FIELD_NUMBER; + hash = (53 * hash) + getShortText().hashCode(); + if (getTypesCount() > 0) { + hash = (37 * hash) + TYPES_FIELD_NUMBER; + hash = (53 * hash) + getTypesList().hashCode(); + } + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.geocode.v4.GeocodeResult.AddressComponent parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.GeocodeResult.AddressComponent parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.geocode.v4.GeocodeResult.AddressComponent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.GeocodeResult.AddressComponent parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.geocode.v4.GeocodeResult.AddressComponent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.GeocodeResult.AddressComponent parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.geocode.v4.GeocodeResult.AddressComponent parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.GeocodeResult.AddressComponent parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.GeocodeResult.AddressComponent parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.GeocodeResult.AddressComponent parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.GeocodeResult.AddressComponent parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.GeocodeResult.AddressComponent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geocode.v4.GeocodeResult.AddressComponent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * The structured components that form the formatted address, if this
+     * information is available.
+     * 
+ * + * Protobuf type {@code google.maps.geocode.v4.GeocodeResult.AddressComponent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.geocode.v4.GeocodeResult.AddressComponent) + com.google.maps.geocode.v4.GeocodeResult.AddressComponentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodeResult_AddressComponent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodeResult_AddressComponent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.GeocodeResult.AddressComponent.class, + com.google.maps.geocode.v4.GeocodeResult.AddressComponent.Builder.class); + } + + // Construct using com.google.maps.geocode.v4.GeocodeResult.AddressComponent.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + longText_ = ""; + shortText_ = ""; + types_ = com.google.protobuf.LazyStringArrayList.emptyList(); + languageCode_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodeResult_AddressComponent_descriptor; + } + + @java.lang.Override + public com.google.maps.geocode.v4.GeocodeResult.AddressComponent getDefaultInstanceForType() { + return com.google.maps.geocode.v4.GeocodeResult.AddressComponent.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.geocode.v4.GeocodeResult.AddressComponent build() { + com.google.maps.geocode.v4.GeocodeResult.AddressComponent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.geocode.v4.GeocodeResult.AddressComponent buildPartial() { + com.google.maps.geocode.v4.GeocodeResult.AddressComponent result = + new com.google.maps.geocode.v4.GeocodeResult.AddressComponent(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.geocode.v4.GeocodeResult.AddressComponent result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.longText_ = longText_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.shortText_ = shortText_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + types_.makeImmutable(); + result.types_ = types_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.languageCode_ = languageCode_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.geocode.v4.GeocodeResult.AddressComponent) { + return mergeFrom((com.google.maps.geocode.v4.GeocodeResult.AddressComponent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.geocode.v4.GeocodeResult.AddressComponent other) { + if (other == com.google.maps.geocode.v4.GeocodeResult.AddressComponent.getDefaultInstance()) + return this; + if (!other.getLongText().isEmpty()) { + longText_ = other.longText_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getShortText().isEmpty()) { + shortText_ = other.shortText_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.types_.isEmpty()) { + if (types_.isEmpty()) { + types_ = other.types_; + bitField0_ |= 0x00000004; + } else { + ensureTypesIsMutable(); + types_.addAll(other.types_); + } + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + longText_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + shortText_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTypesIsMutable(); + types_.add(s); + break; + } // case 26 + case 34: + { + languageCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object longText_ = ""; + + /** + * + * + *
+       * The full text description or name of the address component. For example,
+       * an address component for the country Australia may have a long name of
+       * "Australia".
+       * 
+ * + * string long_text = 1; + * + * @return The longText. + */ + public java.lang.String getLongText() { + java.lang.Object ref = longText_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + longText_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * The full text description or name of the address component. For example,
+       * an address component for the country Australia may have a long name of
+       * "Australia".
+       * 
+ * + * string long_text = 1; + * + * @return The bytes for longText. + */ + public com.google.protobuf.ByteString getLongTextBytes() { + java.lang.Object ref = longText_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + longText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * The full text description or name of the address component. For example,
+       * an address component for the country Australia may have a long name of
+       * "Australia".
+       * 
+ * + * string long_text = 1; + * + * @param value The longText to set. + * @return This builder for chaining. + */ + public Builder setLongText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + longText_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * The full text description or name of the address component. For example,
+       * an address component for the country Australia may have a long name of
+       * "Australia".
+       * 
+ * + * string long_text = 1; + * + * @return This builder for chaining. + */ + public Builder clearLongText() { + longText_ = getDefaultInstance().getLongText(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * The full text description or name of the address component. For example,
+       * an address component for the country Australia may have a long name of
+       * "Australia".
+       * 
+ * + * string long_text = 1; + * + * @param value The bytes for longText to set. + * @return This builder for chaining. + */ + public Builder setLongTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + longText_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object shortText_ = ""; + + /** + * + * + *
+       * An abbreviated textual name for the address component, if available. For
+       * example, an address component for the country of Australia may have a
+       * short name of "AU".
+       * 
+ * + * string short_text = 2; + * + * @return The shortText. + */ + public java.lang.String getShortText() { + java.lang.Object ref = shortText_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shortText_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * An abbreviated textual name for the address component, if available. For
+       * example, an address component for the country of Australia may have a
+       * short name of "AU".
+       * 
+ * + * string short_text = 2; + * + * @return The bytes for shortText. + */ + public com.google.protobuf.ByteString getShortTextBytes() { + java.lang.Object ref = shortText_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + shortText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * An abbreviated textual name for the address component, if available. For
+       * example, an address component for the country of Australia may have a
+       * short name of "AU".
+       * 
+ * + * string short_text = 2; + * + * @param value The shortText to set. + * @return This builder for chaining. + */ + public Builder setShortText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + shortText_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * An abbreviated textual name for the address component, if available. For
+       * example, an address component for the country of Australia may have a
+       * short name of "AU".
+       * 
+ * + * string short_text = 2; + * + * @return This builder for chaining. + */ + public Builder clearShortText() { + shortText_ = getDefaultInstance().getShortText(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+       * An abbreviated textual name for the address component, if available. For
+       * example, an address component for the country of Australia may have a
+       * short name of "AU".
+       * 
+ * + * string short_text = 2; + * + * @param value The bytes for shortText to set. + * @return This builder for chaining. + */ + public Builder setShortTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + shortText_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList types_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureTypesIsMutable() { + if (!types_.isModifiable()) { + types_ = new com.google.protobuf.LazyStringArrayList(types_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+       * An array indicating the type(s) of the address component.
+       *
+       * See
+       * https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types
+       * for more details.
+       * 
+ * + * repeated string types = 3; + * + * @return A list containing the types. + */ + public com.google.protobuf.ProtocolStringList getTypesList() { + types_.makeImmutable(); + return types_; + } + + /** + * + * + *
+       * An array indicating the type(s) of the address component.
+       *
+       * See
+       * https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types
+       * for more details.
+       * 
+ * + * repeated string types = 3; + * + * @return The count of types. + */ + public int getTypesCount() { + return types_.size(); + } + + /** + * + * + *
+       * An array indicating the type(s) of the address component.
+       *
+       * See
+       * https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types
+       * for more details.
+       * 
+ * + * repeated string types = 3; + * + * @param index The index of the element to return. + * @return The types at the given index. + */ + public java.lang.String getTypes(int index) { + return types_.get(index); + } + + /** + * + * + *
+       * An array indicating the type(s) of the address component.
+       *
+       * See
+       * https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types
+       * for more details.
+       * 
+ * + * repeated string types = 3; + * + * @param index The index of the value to return. + * @return The bytes of the types at the given index. + */ + public com.google.protobuf.ByteString getTypesBytes(int index) { + return types_.getByteString(index); + } + + /** + * + * + *
+       * An array indicating the type(s) of the address component.
+       *
+       * See
+       * https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types
+       * for more details.
+       * 
+ * + * repeated string types = 3; + * + * @param index The index to set the value at. + * @param value The types to set. + * @return This builder for chaining. + */ + public Builder setTypes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypesIsMutable(); + types_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * An array indicating the type(s) of the address component.
+       *
+       * See
+       * https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types
+       * for more details.
+       * 
+ * + * repeated string types = 3; + * + * @param value The types to add. + * @return This builder for chaining. + */ + public Builder addTypes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypesIsMutable(); + types_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * An array indicating the type(s) of the address component.
+       *
+       * See
+       * https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types
+       * for more details.
+       * 
+ * + * repeated string types = 3; + * + * @param values The types to add. + * @return This builder for chaining. + */ + public Builder addAllTypes(java.lang.Iterable values) { + ensureTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, types_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * An array indicating the type(s) of the address component.
+       *
+       * See
+       * https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types
+       * for more details.
+       * 
+ * + * repeated string types = 3; + * + * @return This builder for chaining. + */ + public Builder clearTypes() { + types_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+       * An array indicating the type(s) of the address component.
+       *
+       * See
+       * https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types
+       * for more details.
+       * 
+ * + * repeated string types = 3; + * + * @param value The bytes of the types to add. + * @return This builder for chaining. + */ + public Builder addTypesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTypesIsMutable(); + types_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + + /** + * + * + *
+       * The language used to format this component, in CLDR notation.
+       * 
+ * + * string language_code = 4; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * The language used to format this component, in CLDR notation.
+       * 
+ * + * string language_code = 4; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * The language used to format this component, in CLDR notation.
+       * 
+ * + * string language_code = 4; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + languageCode_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * The language used to format this component, in CLDR notation.
+       * 
+ * + * string language_code = 4; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + languageCode_ = getDefaultInstance().getLanguageCode(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+       * The language used to format this component, in CLDR notation.
+       * 
+ * + * string language_code = 4; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + languageCode_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.maps.geocode.v4.GeocodeResult.AddressComponent) + } + + // @@protoc_insertion_point(class_scope:google.maps.geocode.v4.GeocodeResult.AddressComponent) + private static final com.google.maps.geocode.v4.GeocodeResult.AddressComponent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.geocode.v4.GeocodeResult.AddressComponent(); + } + + public static com.google.maps.geocode.v4.GeocodeResult.AddressComponent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AddressComponent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.maps.geocode.v4.GeocodeResult.AddressComponent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int PLACE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object place_ = ""; + + /** + * + * + *
+   * This Place's resource name, in `places/{placeId}` format.  Can be used to
+   * look up the Place.
+   * 
+ * + * string place = 1; + * + * @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; + } + } + + /** + * + * + *
+   * This Place's resource name, in `places/{placeId}` format.  Can be used to
+   * look up the Place.
+   * 
+ * + * string place = 1; + * + * @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; + } + } + + public static final int PLACE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object placeId_ = ""; + + /** + * + * + *
+   * The unique identifier of a place.
+   * 
+ * + * string place_id = 2; + * + * @return The placeId. + */ + @java.lang.Override + public java.lang.String getPlaceId() { + java.lang.Object ref = placeId_; + 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(); + placeId_ = s; + return s; + } + } + + /** + * + * + *
+   * The unique identifier of a place.
+   * 
+ * + * string place_id = 2; + * + * @return The bytes for placeId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPlaceIdBytes() { + java.lang.Object ref = placeId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + placeId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_FIELD_NUMBER = 3; + private com.google.type.LatLng location_; + + /** + * + * + *
+   * The latlng of this address.
+   * 
+ * + * .google.type.LatLng location = 3; + * + * @return Whether the location field is set. + */ + @java.lang.Override + public boolean hasLocation() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * The latlng of this address.
+   * 
+ * + * .google.type.LatLng location = 3; + * + * @return The location. + */ + @java.lang.Override + public com.google.type.LatLng getLocation() { + return location_ == null ? com.google.type.LatLng.getDefaultInstance() : location_; + } + + /** + * + * + *
+   * The latlng of this address.
+   * 
+ * + * .google.type.LatLng location = 3; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getLocationOrBuilder() { + return location_ == null ? com.google.type.LatLng.getDefaultInstance() : location_; + } + + public static final int GRANULARITY_FIELD_NUMBER = 4; + private int granularity_ = 0; + + /** + * + * + *
+   * The granularity of the location.
+   * 
+ * + * .google.maps.geocode.v4.GeocodeResult.Granularity granularity = 4; + * + * @return The enum numeric value on the wire for granularity. + */ + @java.lang.Override + public int getGranularityValue() { + return granularity_; + } + + /** + * + * + *
+   * The granularity of the location.
+   * 
+ * + * .google.maps.geocode.v4.GeocodeResult.Granularity granularity = 4; + * + * @return The granularity. + */ + @java.lang.Override + public com.google.maps.geocode.v4.GeocodeResult.Granularity getGranularity() { + com.google.maps.geocode.v4.GeocodeResult.Granularity result = + com.google.maps.geocode.v4.GeocodeResult.Granularity.forNumber(granularity_); + return result == null + ? com.google.maps.geocode.v4.GeocodeResult.Granularity.UNRECOGNIZED + : result; + } + + public static final int VIEWPORT_FIELD_NUMBER = 5; + private com.google.geo.type.Viewport viewport_; + + /** + * + * + *
+   * A viewport suitable for displaying the geocode result.
+   * 
+ * + * .google.geo.type.Viewport viewport = 5; + * + * @return Whether the viewport field is set. + */ + @java.lang.Override + public boolean hasViewport() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * A viewport suitable for displaying the geocode result.
+   * 
+ * + * .google.geo.type.Viewport viewport = 5; + * + * @return The viewport. + */ + @java.lang.Override + public com.google.geo.type.Viewport getViewport() { + return viewport_ == null ? com.google.geo.type.Viewport.getDefaultInstance() : viewport_; + } + + /** + * + * + *
+   * A viewport suitable for displaying the geocode result.
+   * 
+ * + * .google.geo.type.Viewport viewport = 5; + */ + @java.lang.Override + public com.google.geo.type.ViewportOrBuilder getViewportOrBuilder() { + return viewport_ == null ? com.google.geo.type.Viewport.getDefaultInstance() : viewport_; + } + + public static final int BOUNDS_FIELD_NUMBER = 6; + private com.google.geo.type.Viewport bounds_; + + /** + * + * + *
+   * A bounding box for the address.
+   * 
+ * + * .google.geo.type.Viewport bounds = 6; + * + * @return Whether the bounds field is set. + */ + @java.lang.Override + public boolean hasBounds() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * A bounding box for the address.
+   * 
+ * + * .google.geo.type.Viewport bounds = 6; + * + * @return The bounds. + */ + @java.lang.Override + public com.google.geo.type.Viewport getBounds() { + return bounds_ == null ? com.google.geo.type.Viewport.getDefaultInstance() : bounds_; + } + + /** + * + * + *
+   * A bounding box for the address.
+   * 
+ * + * .google.geo.type.Viewport bounds = 6; + */ + @java.lang.Override + public com.google.geo.type.ViewportOrBuilder getBoundsOrBuilder() { + return bounds_ == null ? com.google.geo.type.Viewport.getDefaultInstance() : bounds_; + } + + public static final int FORMATTED_ADDRESS_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object formattedAddress_ = ""; + + /** + * + * + *
+   * The one line formatted address.
+   * 
+ * + * string formatted_address = 7; + * + * @return The formattedAddress. + */ + @java.lang.Override + public java.lang.String getFormattedAddress() { + java.lang.Object ref = formattedAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + formattedAddress_ = s; + return s; + } + } + + /** + * + * + *
+   * The one line formatted address.
+   * 
+ * + * string formatted_address = 7; + * + * @return The bytes for formattedAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFormattedAddressBytes() { + java.lang.Object ref = formattedAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + formattedAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POSTAL_ADDRESS_FIELD_NUMBER = 8; + private com.google.type.PostalAddress postalAddress_; + + /** + * + * + *
+   * The address in postal address format.
+   * 
+ * + * .google.type.PostalAddress postal_address = 8; + * + * @return Whether the postalAddress field is set. + */ + @java.lang.Override + public boolean hasPostalAddress() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * The address in postal address format.
+   * 
+ * + * .google.type.PostalAddress postal_address = 8; + * + * @return The postalAddress. + */ + @java.lang.Override + public com.google.type.PostalAddress getPostalAddress() { + return postalAddress_ == null + ? com.google.type.PostalAddress.getDefaultInstance() + : postalAddress_; + } + + /** + * + * + *
+   * The address in postal address format.
+   * 
+ * + * .google.type.PostalAddress postal_address = 8; + */ + @java.lang.Override + public com.google.type.PostalAddressOrBuilder getPostalAddressOrBuilder() { + return postalAddress_ == null + ? com.google.type.PostalAddress.getDefaultInstance() + : postalAddress_; + } + + public static final int ADDRESS_COMPONENTS_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private java.util.List + addressComponents_; + + /** + * + * + *
+   * Repeated components for each locality level.
+   * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult.AddressComponent address_components = 9; + * + */ + @java.lang.Override + public java.util.List + getAddressComponentsList() { + return addressComponents_; + } + + /** + * + * + *
+   * Repeated components for each locality level.
+   * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult.AddressComponent address_components = 9; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.maps.geocode.v4.GeocodeResult.AddressComponentOrBuilder> + getAddressComponentsOrBuilderList() { + return addressComponents_; + } + + /** + * + * + *
+   * Repeated components for each locality level.
+   * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult.AddressComponent address_components = 9; + * + */ + @java.lang.Override + public int getAddressComponentsCount() { + return addressComponents_.size(); + } + + /** + * + * + *
+   * Repeated components for each locality level.
+   * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult.AddressComponent address_components = 9; + * + */ + @java.lang.Override + public com.google.maps.geocode.v4.GeocodeResult.AddressComponent getAddressComponents(int index) { + return addressComponents_.get(index); + } + + /** + * + * + *
+   * Repeated components for each locality level.
+   * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult.AddressComponent address_components = 9; + * + */ + @java.lang.Override + public com.google.maps.geocode.v4.GeocodeResult.AddressComponentOrBuilder + getAddressComponentsOrBuilder(int index) { + return addressComponents_.get(index); + } + + public static final int POSTAL_CODE_LOCALITIES_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private java.util.List postalCodeLocalities_; + + /** + * + * + *
+   * Complete list of localities contained in the postal code.
+   *
+   * This is only populated when the result is of type "postal_code".
+   * 
+ * + * repeated .google.type.LocalizedText postal_code_localities = 11; + */ + @java.lang.Override + public java.util.List getPostalCodeLocalitiesList() { + return postalCodeLocalities_; + } + + /** + * + * + *
+   * Complete list of localities contained in the postal code.
+   *
+   * This is only populated when the result is of type "postal_code".
+   * 
+ * + * repeated .google.type.LocalizedText postal_code_localities = 11; + */ + @java.lang.Override + public java.util.List + getPostalCodeLocalitiesOrBuilderList() { + return postalCodeLocalities_; + } + + /** + * + * + *
+   * Complete list of localities contained in the postal code.
+   *
+   * This is only populated when the result is of type "postal_code".
+   * 
+ * + * repeated .google.type.LocalizedText postal_code_localities = 11; + */ + @java.lang.Override + public int getPostalCodeLocalitiesCount() { + return postalCodeLocalities_.size(); + } + + /** + * + * + *
+   * Complete list of localities contained in the postal code.
+   *
+   * This is only populated when the result is of type "postal_code".
+   * 
+ * + * repeated .google.type.LocalizedText postal_code_localities = 11; + */ + @java.lang.Override + public com.google.type.LocalizedText getPostalCodeLocalities(int index) { + return postalCodeLocalities_.get(index); + } + + /** + * + * + *
+   * Complete list of localities contained in the postal code.
+   *
+   * This is only populated when the result is of type "postal_code".
+   * 
+ * + * repeated .google.type.LocalizedText postal_code_localities = 11; + */ + @java.lang.Override + public com.google.type.LocalizedTextOrBuilder getPostalCodeLocalitiesOrBuilder(int index) { + return postalCodeLocalities_.get(index); + } + + public static final int TYPES_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList types_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * A set of type tags for this result. For
+   * example, "political" and "administrative_area".
+   *
+   * For the complete list of possible values, see Table A and Table B at
+   * https://developers.google.com/maps/documentation/places/web-service/place-types.
+   * 
+ * + * repeated string types = 12; + * + * @return A list containing the types. + */ + public com.google.protobuf.ProtocolStringList getTypesList() { + return types_; + } + + /** + * + * + *
+   * A set of type tags for this result. For
+   * example, "political" and "administrative_area".
+   *
+   * For the complete list of possible values, see Table A and Table B at
+   * https://developers.google.com/maps/documentation/places/web-service/place-types.
+   * 
+ * + * repeated string types = 12; + * + * @return The count of types. + */ + public int getTypesCount() { + return types_.size(); + } + + /** + * + * + *
+   * A set of type tags for this result. For
+   * example, "political" and "administrative_area".
+   *
+   * For the complete list of possible values, see Table A and Table B at
+   * https://developers.google.com/maps/documentation/places/web-service/place-types.
+   * 
+ * + * repeated string types = 12; + * + * @param index The index of the element to return. + * @return The types at the given index. + */ + public java.lang.String getTypes(int index) { + return types_.get(index); + } + + /** + * + * + *
+   * A set of type tags for this result. For
+   * example, "political" and "administrative_area".
+   *
+   * For the complete list of possible values, see Table A and Table B at
+   * https://developers.google.com/maps/documentation/places/web-service/place-types.
+   * 
+ * + * repeated string types = 12; + * + * @param index The index of the value to return. + * @return The bytes of the types at the given index. + */ + public com.google.protobuf.ByteString getTypesBytes(int index) { + return types_.getByteString(index); + } + + public static final int PLUS_CODE_FIELD_NUMBER = 13; + private com.google.maps.geocode.v4.PlusCode plusCode_; + + /** + * + * + *
+   * Plus code of the location in this geocode.
+   * 
+ * + * .google.maps.geocode.v4.PlusCode plus_code = 13; + * + * @return Whether the plusCode field is set. + */ + @java.lang.Override + public boolean hasPlusCode() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * Plus code of the location in this geocode.
+   * 
+ * + * .google.maps.geocode.v4.PlusCode plus_code = 13; + * + * @return The plusCode. + */ + @java.lang.Override + public com.google.maps.geocode.v4.PlusCode getPlusCode() { + return plusCode_ == null ? com.google.maps.geocode.v4.PlusCode.getDefaultInstance() : plusCode_; + } + + /** + * + * + *
+   * Plus code of the location in this geocode.
+   * 
+ * + * .google.maps.geocode.v4.PlusCode plus_code = 13; + */ + @java.lang.Override + public com.google.maps.geocode.v4.PlusCodeOrBuilder getPlusCodeOrBuilder() { + return plusCode_ == null ? com.google.maps.geocode.v4.PlusCode.getDefaultInstance() : plusCode_; + } + + 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.GeneratedMessage.isStringEmpty(place_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, place_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(placeId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, placeId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getLocation()); + } + if (granularity_ + != com.google.maps.geocode.v4.GeocodeResult.Granularity.GRANULARITY_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, granularity_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getViewport()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(6, getBounds()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(formattedAddress_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, formattedAddress_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(8, getPostalAddress()); + } + for (int i = 0; i < addressComponents_.size(); i++) { + output.writeMessage(9, addressComponents_.get(i)); + } + for (int i = 0; i < postalCodeLocalities_.size(); i++) { + output.writeMessage(11, postalCodeLocalities_.get(i)); + } + for (int i = 0; i < types_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 12, types_.getRaw(i)); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(13, getPlusCode()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(place_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, place_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(placeId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, placeId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getLocation()); + } + if (granularity_ + != com.google.maps.geocode.v4.GeocodeResult.Granularity.GRANULARITY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, granularity_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getViewport()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getBounds()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(formattedAddress_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, formattedAddress_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getPostalAddress()); + } + for (int i = 0; i < addressComponents_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(9, addressComponents_.get(i)); + } + for (int i = 0; i < postalCodeLocalities_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 11, postalCodeLocalities_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < types_.size(); i++) { + dataSize += computeStringSizeNoTag(types_.getRaw(i)); + } + size += dataSize; + size += 1 * getTypesList().size(); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getPlusCode()); + } + 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.geocode.v4.GeocodeResult)) { + return super.equals(obj); + } + com.google.maps.geocode.v4.GeocodeResult other = (com.google.maps.geocode.v4.GeocodeResult) obj; + + if (!getPlace().equals(other.getPlace())) return false; + if (!getPlaceId().equals(other.getPlaceId())) return false; + if (hasLocation() != other.hasLocation()) return false; + if (hasLocation()) { + if (!getLocation().equals(other.getLocation())) return false; + } + if (granularity_ != other.granularity_) return false; + if (hasViewport() != other.hasViewport()) return false; + if (hasViewport()) { + if (!getViewport().equals(other.getViewport())) return false; + } + if (hasBounds() != other.hasBounds()) return false; + if (hasBounds()) { + if (!getBounds().equals(other.getBounds())) return false; + } + if (!getFormattedAddress().equals(other.getFormattedAddress())) return false; + if (hasPostalAddress() != other.hasPostalAddress()) return false; + if (hasPostalAddress()) { + if (!getPostalAddress().equals(other.getPostalAddress())) return false; + } + if (!getAddressComponentsList().equals(other.getAddressComponentsList())) return false; + if (!getPostalCodeLocalitiesList().equals(other.getPostalCodeLocalitiesList())) return false; + if (!getTypesList().equals(other.getTypesList())) return false; + if (hasPlusCode() != other.hasPlusCode()) return false; + if (hasPlusCode()) { + if (!getPlusCode().equals(other.getPlusCode())) 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 = (37 * hash) + PLACE_ID_FIELD_NUMBER; + hash = (53 * hash) + getPlaceId().hashCode(); + if (hasLocation()) { + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + } + hash = (37 * hash) + GRANULARITY_FIELD_NUMBER; + hash = (53 * hash) + granularity_; + if (hasViewport()) { + hash = (37 * hash) + VIEWPORT_FIELD_NUMBER; + hash = (53 * hash) + getViewport().hashCode(); + } + if (hasBounds()) { + hash = (37 * hash) + BOUNDS_FIELD_NUMBER; + hash = (53 * hash) + getBounds().hashCode(); + } + hash = (37 * hash) + FORMATTED_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getFormattedAddress().hashCode(); + if (hasPostalAddress()) { + hash = (37 * hash) + POSTAL_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getPostalAddress().hashCode(); + } + if (getAddressComponentsCount() > 0) { + hash = (37 * hash) + ADDRESS_COMPONENTS_FIELD_NUMBER; + hash = (53 * hash) + getAddressComponentsList().hashCode(); + } + if (getPostalCodeLocalitiesCount() > 0) { + hash = (37 * hash) + POSTAL_CODE_LOCALITIES_FIELD_NUMBER; + hash = (53 * hash) + getPostalCodeLocalitiesList().hashCode(); + } + if (getTypesCount() > 0) { + hash = (37 * hash) + TYPES_FIELD_NUMBER; + hash = (53 * hash) + getTypesList().hashCode(); + } + if (hasPlusCode()) { + hash = (37 * hash) + PLUS_CODE_FIELD_NUMBER; + hash = (53 * hash) + getPlusCode().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.geocode.v4.GeocodeResult parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.GeocodeResult 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.geocode.v4.GeocodeResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.GeocodeResult 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.geocode.v4.GeocodeResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.GeocodeResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.geocode.v4.GeocodeResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.GeocodeResult parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.GeocodeResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.GeocodeResult parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.GeocodeResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.GeocodeResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geocode.v4.GeocodeResult 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A geocode result contains geographic information about a place.
+   * 
+ * + * Protobuf type {@code google.maps.geocode.v4.GeocodeResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.geocode.v4.GeocodeResult) + com.google.maps.geocode.v4.GeocodeResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodeResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodeResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.GeocodeResult.class, + com.google.maps.geocode.v4.GeocodeResult.Builder.class); + } + + // Construct using com.google.maps.geocode.v4.GeocodeResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetLocationFieldBuilder(); + internalGetViewportFieldBuilder(); + internalGetBoundsFieldBuilder(); + internalGetPostalAddressFieldBuilder(); + internalGetAddressComponentsFieldBuilder(); + internalGetPostalCodeLocalitiesFieldBuilder(); + internalGetPlusCodeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + place_ = ""; + placeId_ = ""; + location_ = null; + if (locationBuilder_ != null) { + locationBuilder_.dispose(); + locationBuilder_ = null; + } + granularity_ = 0; + viewport_ = null; + if (viewportBuilder_ != null) { + viewportBuilder_.dispose(); + viewportBuilder_ = null; + } + bounds_ = null; + if (boundsBuilder_ != null) { + boundsBuilder_.dispose(); + boundsBuilder_ = null; + } + formattedAddress_ = ""; + postalAddress_ = null; + if (postalAddressBuilder_ != null) { + postalAddressBuilder_.dispose(); + postalAddressBuilder_ = null; + } + if (addressComponentsBuilder_ == null) { + addressComponents_ = java.util.Collections.emptyList(); + } else { + addressComponents_ = null; + addressComponentsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000100); + if (postalCodeLocalitiesBuilder_ == null) { + postalCodeLocalities_ = java.util.Collections.emptyList(); + } else { + postalCodeLocalities_ = null; + postalCodeLocalitiesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000200); + types_ = com.google.protobuf.LazyStringArrayList.emptyList(); + plusCode_ = null; + if (plusCodeBuilder_ != null) { + plusCodeBuilder_.dispose(); + plusCodeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_GeocodeResult_descriptor; + } + + @java.lang.Override + public com.google.maps.geocode.v4.GeocodeResult getDefaultInstanceForType() { + return com.google.maps.geocode.v4.GeocodeResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.geocode.v4.GeocodeResult build() { + com.google.maps.geocode.v4.GeocodeResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.geocode.v4.GeocodeResult buildPartial() { + com.google.maps.geocode.v4.GeocodeResult result = + new com.google.maps.geocode.v4.GeocodeResult(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.maps.geocode.v4.GeocodeResult result) { + if (addressComponentsBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0)) { + addressComponents_ = java.util.Collections.unmodifiableList(addressComponents_); + bitField0_ = (bitField0_ & ~0x00000100); + } + result.addressComponents_ = addressComponents_; + } else { + result.addressComponents_ = addressComponentsBuilder_.build(); + } + if (postalCodeLocalitiesBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0)) { + postalCodeLocalities_ = java.util.Collections.unmodifiableList(postalCodeLocalities_); + bitField0_ = (bitField0_ & ~0x00000200); + } + result.postalCodeLocalities_ = postalCodeLocalities_; + } else { + result.postalCodeLocalities_ = postalCodeLocalitiesBuilder_.build(); + } + } + + private void buildPartial0(com.google.maps.geocode.v4.GeocodeResult result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.place_ = place_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.placeId_ = placeId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.location_ = locationBuilder_ == null ? location_ : locationBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.granularity_ = granularity_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.viewport_ = viewportBuilder_ == null ? viewport_ : viewportBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.bounds_ = boundsBuilder_ == null ? bounds_ : boundsBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.formattedAddress_ = formattedAddress_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.postalAddress_ = + postalAddressBuilder_ == null ? postalAddress_ : postalAddressBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + types_.makeImmutable(); + result.types_ = types_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.plusCode_ = plusCodeBuilder_ == null ? plusCode_ : plusCodeBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.geocode.v4.GeocodeResult) { + return mergeFrom((com.google.maps.geocode.v4.GeocodeResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.geocode.v4.GeocodeResult other) { + if (other == com.google.maps.geocode.v4.GeocodeResult.getDefaultInstance()) return this; + if (!other.getPlace().isEmpty()) { + place_ = other.place_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPlaceId().isEmpty()) { + placeId_ = other.placeId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasLocation()) { + mergeLocation(other.getLocation()); + } + if (other.granularity_ != 0) { + setGranularityValue(other.getGranularityValue()); + } + if (other.hasViewport()) { + mergeViewport(other.getViewport()); + } + if (other.hasBounds()) { + mergeBounds(other.getBounds()); + } + if (!other.getFormattedAddress().isEmpty()) { + formattedAddress_ = other.formattedAddress_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.hasPostalAddress()) { + mergePostalAddress(other.getPostalAddress()); + } + if (addressComponentsBuilder_ == null) { + if (!other.addressComponents_.isEmpty()) { + if (addressComponents_.isEmpty()) { + addressComponents_ = other.addressComponents_; + bitField0_ = (bitField0_ & ~0x00000100); + } else { + ensureAddressComponentsIsMutable(); + addressComponents_.addAll(other.addressComponents_); + } + onChanged(); + } + } else { + if (!other.addressComponents_.isEmpty()) { + if (addressComponentsBuilder_.isEmpty()) { + addressComponentsBuilder_.dispose(); + addressComponentsBuilder_ = null; + addressComponents_ = other.addressComponents_; + bitField0_ = (bitField0_ & ~0x00000100); + addressComponentsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetAddressComponentsFieldBuilder() + : null; + } else { + addressComponentsBuilder_.addAllMessages(other.addressComponents_); + } + } + } + if (postalCodeLocalitiesBuilder_ == null) { + if (!other.postalCodeLocalities_.isEmpty()) { + if (postalCodeLocalities_.isEmpty()) { + postalCodeLocalities_ = other.postalCodeLocalities_; + bitField0_ = (bitField0_ & ~0x00000200); + } else { + ensurePostalCodeLocalitiesIsMutable(); + postalCodeLocalities_.addAll(other.postalCodeLocalities_); + } + onChanged(); + } + } else { + if (!other.postalCodeLocalities_.isEmpty()) { + if (postalCodeLocalitiesBuilder_.isEmpty()) { + postalCodeLocalitiesBuilder_.dispose(); + postalCodeLocalitiesBuilder_ = null; + postalCodeLocalities_ = other.postalCodeLocalities_; + bitField0_ = (bitField0_ & ~0x00000200); + postalCodeLocalitiesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetPostalCodeLocalitiesFieldBuilder() + : null; + } else { + postalCodeLocalitiesBuilder_.addAllMessages(other.postalCodeLocalities_); + } + } + } + if (!other.types_.isEmpty()) { + if (types_.isEmpty()) { + types_ = other.types_; + bitField0_ |= 0x00000400; + } else { + ensureTypesIsMutable(); + types_.addAll(other.types_); + } + onChanged(); + } + if (other.hasPlusCode()) { + mergePlusCode(other.getPlusCode()); + } + 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 + case 18: + { + placeId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetLocationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + granularity_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + input.readMessage( + internalGetViewportFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage(internalGetBoundsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + formattedAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + input.readMessage( + internalGetPostalAddressFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + com.google.maps.geocode.v4.GeocodeResult.AddressComponent m = + input.readMessage( + com.google.maps.geocode.v4.GeocodeResult.AddressComponent.parser(), + extensionRegistry); + if (addressComponentsBuilder_ == null) { + ensureAddressComponentsIsMutable(); + addressComponents_.add(m); + } else { + addressComponentsBuilder_.addMessage(m); + } + break; + } // case 74 + case 90: + { + com.google.type.LocalizedText m = + input.readMessage(com.google.type.LocalizedText.parser(), extensionRegistry); + if (postalCodeLocalitiesBuilder_ == null) { + ensurePostalCodeLocalitiesIsMutable(); + postalCodeLocalities_.add(m); + } else { + postalCodeLocalitiesBuilder_.addMessage(m); + } + break; + } // case 90 + case 98: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTypesIsMutable(); + types_.add(s); + break; + } // case 98 + case 106: + { + input.readMessage( + internalGetPlusCodeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 106 + 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_ = ""; + + /** + * + * + *
+     * This Place's resource name, in `places/{placeId}` format.  Can be used to
+     * look up the Place.
+     * 
+ * + * string place = 1; + * + * @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; + } + } + + /** + * + * + *
+     * This Place's resource name, in `places/{placeId}` format.  Can be used to
+     * look up the Place.
+     * 
+ * + * string place = 1; + * + * @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; + } + } + + /** + * + * + *
+     * This Place's resource name, in `places/{placeId}` format.  Can be used to
+     * look up the Place.
+     * 
+ * + * string place = 1; + * + * @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; + } + + /** + * + * + *
+     * This Place's resource name, in `places/{placeId}` format.  Can be used to
+     * look up the Place.
+     * 
+ * + * string place = 1; + * + * @return This builder for chaining. + */ + public Builder clearPlace() { + place_ = getDefaultInstance().getPlace(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * This Place's resource name, in `places/{placeId}` format.  Can be used to
+     * look up the Place.
+     * 
+ * + * string place = 1; + * + * @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; + } + + private java.lang.Object placeId_ = ""; + + /** + * + * + *
+     * The unique identifier of a place.
+     * 
+ * + * string place_id = 2; + * + * @return The placeId. + */ + public java.lang.String getPlaceId() { + java.lang.Object ref = placeId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + placeId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The unique identifier of a place.
+     * 
+ * + * string place_id = 2; + * + * @return The bytes for placeId. + */ + public com.google.protobuf.ByteString getPlaceIdBytes() { + java.lang.Object ref = placeId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + placeId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The unique identifier of a place.
+     * 
+ * + * string place_id = 2; + * + * @param value The placeId to set. + * @return This builder for chaining. + */ + public Builder setPlaceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + placeId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The unique identifier of a place.
+     * 
+ * + * string place_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearPlaceId() { + placeId_ = getDefaultInstance().getPlaceId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * The unique identifier of a place.
+     * 
+ * + * string place_id = 2; + * + * @param value The bytes for placeId to set. + * @return This builder for chaining. + */ + public Builder setPlaceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + placeId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.type.LatLng location_; + private com.google.protobuf.SingleFieldBuilder< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + locationBuilder_; + + /** + * + * + *
+     * The latlng of this address.
+     * 
+ * + * .google.type.LatLng location = 3; + * + * @return Whether the location field is set. + */ + public boolean hasLocation() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * The latlng of this address.
+     * 
+ * + * .google.type.LatLng location = 3; + * + * @return The location. + */ + public com.google.type.LatLng getLocation() { + if (locationBuilder_ == null) { + return location_ == null ? com.google.type.LatLng.getDefaultInstance() : location_; + } else { + return locationBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The latlng of this address.
+     * 
+ * + * .google.type.LatLng location = 3; + */ + public Builder setLocation(com.google.type.LatLng value) { + if (locationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + } else { + locationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The latlng of this address.
+     * 
+ * + * .google.type.LatLng location = 3; + */ + public Builder setLocation(com.google.type.LatLng.Builder builderForValue) { + if (locationBuilder_ == null) { + location_ = builderForValue.build(); + } else { + locationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The latlng of this address.
+     * 
+ * + * .google.type.LatLng location = 3; + */ + public Builder mergeLocation(com.google.type.LatLng value) { + if (locationBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && location_ != null + && location_ != com.google.type.LatLng.getDefaultInstance()) { + getLocationBuilder().mergeFrom(value); + } else { + location_ = value; + } + } else { + locationBuilder_.mergeFrom(value); + } + if (location_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The latlng of this address.
+     * 
+ * + * .google.type.LatLng location = 3; + */ + public Builder clearLocation() { + bitField0_ = (bitField0_ & ~0x00000004); + location_ = null; + if (locationBuilder_ != null) { + locationBuilder_.dispose(); + locationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The latlng of this address.
+     * 
+ * + * .google.type.LatLng location = 3; + */ + public com.google.type.LatLng.Builder getLocationBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetLocationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The latlng of this address.
+     * 
+ * + * .google.type.LatLng location = 3; + */ + public com.google.type.LatLngOrBuilder getLocationOrBuilder() { + if (locationBuilder_ != null) { + return locationBuilder_.getMessageOrBuilder(); + } else { + return location_ == null ? com.google.type.LatLng.getDefaultInstance() : location_; + } + } + + /** + * + * + *
+     * The latlng of this address.
+     * 
+ * + * .google.type.LatLng location = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + internalGetLocationFieldBuilder() { + if (locationBuilder_ == null) { + locationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.LatLng, + com.google.type.LatLng.Builder, + com.google.type.LatLngOrBuilder>(getLocation(), getParentForChildren(), isClean()); + location_ = null; + } + return locationBuilder_; + } + + private int granularity_ = 0; + + /** + * + * + *
+     * The granularity of the location.
+     * 
+ * + * .google.maps.geocode.v4.GeocodeResult.Granularity granularity = 4; + * + * @return The enum numeric value on the wire for granularity. + */ + @java.lang.Override + public int getGranularityValue() { + return granularity_; + } + + /** + * + * + *
+     * The granularity of the location.
+     * 
+ * + * .google.maps.geocode.v4.GeocodeResult.Granularity granularity = 4; + * + * @param value The enum numeric value on the wire for granularity to set. + * @return This builder for chaining. + */ + public Builder setGranularityValue(int value) { + granularity_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * The granularity of the location.
+     * 
+ * + * .google.maps.geocode.v4.GeocodeResult.Granularity granularity = 4; + * + * @return The granularity. + */ + @java.lang.Override + public com.google.maps.geocode.v4.GeocodeResult.Granularity getGranularity() { + com.google.maps.geocode.v4.GeocodeResult.Granularity result = + com.google.maps.geocode.v4.GeocodeResult.Granularity.forNumber(granularity_); + return result == null + ? com.google.maps.geocode.v4.GeocodeResult.Granularity.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * The granularity of the location.
+     * 
+ * + * .google.maps.geocode.v4.GeocodeResult.Granularity granularity = 4; + * + * @param value The granularity to set. + * @return This builder for chaining. + */ + public Builder setGranularity(com.google.maps.geocode.v4.GeocodeResult.Granularity value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + granularity_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * The granularity of the location.
+     * 
+ * + * .google.maps.geocode.v4.GeocodeResult.Granularity granularity = 4; + * + * @return This builder for chaining. + */ + public Builder clearGranularity() { + bitField0_ = (bitField0_ & ~0x00000008); + granularity_ = 0; + onChanged(); + return this; + } + + private com.google.geo.type.Viewport viewport_; + private com.google.protobuf.SingleFieldBuilder< + com.google.geo.type.Viewport, + com.google.geo.type.Viewport.Builder, + com.google.geo.type.ViewportOrBuilder> + viewportBuilder_; + + /** + * + * + *
+     * A viewport suitable for displaying the geocode result.
+     * 
+ * + * .google.geo.type.Viewport viewport = 5; + * + * @return Whether the viewport field is set. + */ + public boolean hasViewport() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * A viewport suitable for displaying the geocode result.
+     * 
+ * + * .google.geo.type.Viewport viewport = 5; + * + * @return The viewport. + */ + public com.google.geo.type.Viewport getViewport() { + if (viewportBuilder_ == null) { + return viewport_ == null ? com.google.geo.type.Viewport.getDefaultInstance() : viewport_; + } else { + return viewportBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * A viewport suitable for displaying the geocode result.
+     * 
+ * + * .google.geo.type.Viewport viewport = 5; + */ + public Builder setViewport(com.google.geo.type.Viewport value) { + if (viewportBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + viewport_ = value; + } else { + viewportBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * A viewport suitable for displaying the geocode result.
+     * 
+ * + * .google.geo.type.Viewport viewport = 5; + */ + public Builder setViewport(com.google.geo.type.Viewport.Builder builderForValue) { + if (viewportBuilder_ == null) { + viewport_ = builderForValue.build(); + } else { + viewportBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * A viewport suitable for displaying the geocode result.
+     * 
+ * + * .google.geo.type.Viewport viewport = 5; + */ + public Builder mergeViewport(com.google.geo.type.Viewport value) { + if (viewportBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && viewport_ != null + && viewport_ != com.google.geo.type.Viewport.getDefaultInstance()) { + getViewportBuilder().mergeFrom(value); + } else { + viewport_ = value; + } + } else { + viewportBuilder_.mergeFrom(value); + } + if (viewport_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * A viewport suitable for displaying the geocode result.
+     * 
+ * + * .google.geo.type.Viewport viewport = 5; + */ + public Builder clearViewport() { + bitField0_ = (bitField0_ & ~0x00000010); + viewport_ = null; + if (viewportBuilder_ != null) { + viewportBuilder_.dispose(); + viewportBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * A viewport suitable for displaying the geocode result.
+     * 
+ * + * .google.geo.type.Viewport viewport = 5; + */ + public com.google.geo.type.Viewport.Builder getViewportBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetViewportFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * A viewport suitable for displaying the geocode result.
+     * 
+ * + * .google.geo.type.Viewport viewport = 5; + */ + public com.google.geo.type.ViewportOrBuilder getViewportOrBuilder() { + if (viewportBuilder_ != null) { + return viewportBuilder_.getMessageOrBuilder(); + } else { + return viewport_ == null ? com.google.geo.type.Viewport.getDefaultInstance() : viewport_; + } + } + + /** + * + * + *
+     * A viewport suitable for displaying the geocode result.
+     * 
+ * + * .google.geo.type.Viewport viewport = 5; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.geo.type.Viewport, + com.google.geo.type.Viewport.Builder, + com.google.geo.type.ViewportOrBuilder> + internalGetViewportFieldBuilder() { + if (viewportBuilder_ == null) { + viewportBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.geo.type.Viewport, + com.google.geo.type.Viewport.Builder, + com.google.geo.type.ViewportOrBuilder>( + getViewport(), getParentForChildren(), isClean()); + viewport_ = null; + } + return viewportBuilder_; + } + + private com.google.geo.type.Viewport bounds_; + private com.google.protobuf.SingleFieldBuilder< + com.google.geo.type.Viewport, + com.google.geo.type.Viewport.Builder, + com.google.geo.type.ViewportOrBuilder> + boundsBuilder_; + + /** + * + * + *
+     * A bounding box for the address.
+     * 
+ * + * .google.geo.type.Viewport bounds = 6; + * + * @return Whether the bounds field is set. + */ + public boolean hasBounds() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * A bounding box for the address.
+     * 
+ * + * .google.geo.type.Viewport bounds = 6; + * + * @return The bounds. + */ + public com.google.geo.type.Viewport getBounds() { + if (boundsBuilder_ == null) { + return bounds_ == null ? com.google.geo.type.Viewport.getDefaultInstance() : bounds_; + } else { + return boundsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * A bounding box for the address.
+     * 
+ * + * .google.geo.type.Viewport bounds = 6; + */ + public Builder setBounds(com.google.geo.type.Viewport value) { + if (boundsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + bounds_ = value; + } else { + boundsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * A bounding box for the address.
+     * 
+ * + * .google.geo.type.Viewport bounds = 6; + */ + public Builder setBounds(com.google.geo.type.Viewport.Builder builderForValue) { + if (boundsBuilder_ == null) { + bounds_ = builderForValue.build(); + } else { + boundsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * A bounding box for the address.
+     * 
+ * + * .google.geo.type.Viewport bounds = 6; + */ + public Builder mergeBounds(com.google.geo.type.Viewport value) { + if (boundsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && bounds_ != null + && bounds_ != com.google.geo.type.Viewport.getDefaultInstance()) { + getBoundsBuilder().mergeFrom(value); + } else { + bounds_ = value; + } + } else { + boundsBuilder_.mergeFrom(value); + } + if (bounds_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * A bounding box for the address.
+     * 
+ * + * .google.geo.type.Viewport bounds = 6; + */ + public Builder clearBounds() { + bitField0_ = (bitField0_ & ~0x00000020); + bounds_ = null; + if (boundsBuilder_ != null) { + boundsBuilder_.dispose(); + boundsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * A bounding box for the address.
+     * 
+ * + * .google.geo.type.Viewport bounds = 6; + */ + public com.google.geo.type.Viewport.Builder getBoundsBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetBoundsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * A bounding box for the address.
+     * 
+ * + * .google.geo.type.Viewport bounds = 6; + */ + public com.google.geo.type.ViewportOrBuilder getBoundsOrBuilder() { + if (boundsBuilder_ != null) { + return boundsBuilder_.getMessageOrBuilder(); + } else { + return bounds_ == null ? com.google.geo.type.Viewport.getDefaultInstance() : bounds_; + } + } + + /** + * + * + *
+     * A bounding box for the address.
+     * 
+ * + * .google.geo.type.Viewport bounds = 6; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.geo.type.Viewport, + com.google.geo.type.Viewport.Builder, + com.google.geo.type.ViewportOrBuilder> + internalGetBoundsFieldBuilder() { + if (boundsBuilder_ == null) { + boundsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.geo.type.Viewport, + com.google.geo.type.Viewport.Builder, + com.google.geo.type.ViewportOrBuilder>( + getBounds(), getParentForChildren(), isClean()); + bounds_ = null; + } + return boundsBuilder_; + } + + private java.lang.Object formattedAddress_ = ""; + + /** + * + * + *
+     * The one line formatted address.
+     * 
+ * + * string formatted_address = 7; + * + * @return The formattedAddress. + */ + public java.lang.String getFormattedAddress() { + java.lang.Object ref = formattedAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + formattedAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The one line formatted address.
+     * 
+ * + * string formatted_address = 7; + * + * @return The bytes for formattedAddress. + */ + public com.google.protobuf.ByteString getFormattedAddressBytes() { + java.lang.Object ref = formattedAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + formattedAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The one line formatted address.
+     * 
+ * + * string formatted_address = 7; + * + * @param value The formattedAddress to set. + * @return This builder for chaining. + */ + public Builder setFormattedAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + formattedAddress_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * The one line formatted address.
+     * 
+ * + * string formatted_address = 7; + * + * @return This builder for chaining. + */ + public Builder clearFormattedAddress() { + formattedAddress_ = getDefaultInstance().getFormattedAddress(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
+     * The one line formatted address.
+     * 
+ * + * string formatted_address = 7; + * + * @param value The bytes for formattedAddress to set. + * @return This builder for chaining. + */ + public Builder setFormattedAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + formattedAddress_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private com.google.type.PostalAddress postalAddress_; + private com.google.protobuf.SingleFieldBuilder< + com.google.type.PostalAddress, + com.google.type.PostalAddress.Builder, + com.google.type.PostalAddressOrBuilder> + postalAddressBuilder_; + + /** + * + * + *
+     * The address in postal address format.
+     * 
+ * + * .google.type.PostalAddress postal_address = 8; + * + * @return Whether the postalAddress field is set. + */ + public boolean hasPostalAddress() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * The address in postal address format.
+     * 
+ * + * .google.type.PostalAddress postal_address = 8; + * + * @return The postalAddress. + */ + public com.google.type.PostalAddress getPostalAddress() { + if (postalAddressBuilder_ == null) { + return postalAddress_ == null + ? com.google.type.PostalAddress.getDefaultInstance() + : postalAddress_; + } else { + return postalAddressBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The address in postal address format.
+     * 
+ * + * .google.type.PostalAddress postal_address = 8; + */ + public Builder setPostalAddress(com.google.type.PostalAddress value) { + if (postalAddressBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + postalAddress_ = value; + } else { + postalAddressBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * The address in postal address format.
+     * 
+ * + * .google.type.PostalAddress postal_address = 8; + */ + public Builder setPostalAddress(com.google.type.PostalAddress.Builder builderForValue) { + if (postalAddressBuilder_ == null) { + postalAddress_ = builderForValue.build(); + } else { + postalAddressBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * The address in postal address format.
+     * 
+ * + * .google.type.PostalAddress postal_address = 8; + */ + public Builder mergePostalAddress(com.google.type.PostalAddress value) { + if (postalAddressBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && postalAddress_ != null + && postalAddress_ != com.google.type.PostalAddress.getDefaultInstance()) { + getPostalAddressBuilder().mergeFrom(value); + } else { + postalAddress_ = value; + } + } else { + postalAddressBuilder_.mergeFrom(value); + } + if (postalAddress_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The address in postal address format.
+     * 
+ * + * .google.type.PostalAddress postal_address = 8; + */ + public Builder clearPostalAddress() { + bitField0_ = (bitField0_ & ~0x00000080); + postalAddress_ = null; + if (postalAddressBuilder_ != null) { + postalAddressBuilder_.dispose(); + postalAddressBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The address in postal address format.
+     * 
+ * + * .google.type.PostalAddress postal_address = 8; + */ + public com.google.type.PostalAddress.Builder getPostalAddressBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return internalGetPostalAddressFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The address in postal address format.
+     * 
+ * + * .google.type.PostalAddress postal_address = 8; + */ + public com.google.type.PostalAddressOrBuilder getPostalAddressOrBuilder() { + if (postalAddressBuilder_ != null) { + return postalAddressBuilder_.getMessageOrBuilder(); + } else { + return postalAddress_ == null + ? com.google.type.PostalAddress.getDefaultInstance() + : postalAddress_; + } + } + + /** + * + * + *
+     * The address in postal address format.
+     * 
+ * + * .google.type.PostalAddress postal_address = 8; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.PostalAddress, + com.google.type.PostalAddress.Builder, + com.google.type.PostalAddressOrBuilder> + internalGetPostalAddressFieldBuilder() { + if (postalAddressBuilder_ == null) { + postalAddressBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.PostalAddress, + com.google.type.PostalAddress.Builder, + com.google.type.PostalAddressOrBuilder>( + getPostalAddress(), getParentForChildren(), isClean()); + postalAddress_ = null; + } + return postalAddressBuilder_; + } + + private java.util.List + addressComponents_ = java.util.Collections.emptyList(); + + private void ensureAddressComponentsIsMutable() { + if (!((bitField0_ & 0x00000100) != 0)) { + addressComponents_ = + new java.util.ArrayList( + addressComponents_); + bitField0_ |= 0x00000100; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.maps.geocode.v4.GeocodeResult.AddressComponent, + com.google.maps.geocode.v4.GeocodeResult.AddressComponent.Builder, + com.google.maps.geocode.v4.GeocodeResult.AddressComponentOrBuilder> + addressComponentsBuilder_; + + /** + * + * + *
+     * Repeated components for each locality level.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult.AddressComponent address_components = 9; + * + */ + public java.util.List + getAddressComponentsList() { + if (addressComponentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(addressComponents_); + } else { + return addressComponentsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Repeated components for each locality level.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult.AddressComponent address_components = 9; + * + */ + public int getAddressComponentsCount() { + if (addressComponentsBuilder_ == null) { + return addressComponents_.size(); + } else { + return addressComponentsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Repeated components for each locality level.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult.AddressComponent address_components = 9; + * + */ + public com.google.maps.geocode.v4.GeocodeResult.AddressComponent getAddressComponents( + int index) { + if (addressComponentsBuilder_ == null) { + return addressComponents_.get(index); + } else { + return addressComponentsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Repeated components for each locality level.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult.AddressComponent address_components = 9; + * + */ + public Builder setAddressComponents( + int index, com.google.maps.geocode.v4.GeocodeResult.AddressComponent value) { + if (addressComponentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAddressComponentsIsMutable(); + addressComponents_.set(index, value); + onChanged(); + } else { + addressComponentsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Repeated components for each locality level.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult.AddressComponent address_components = 9; + * + */ + public Builder setAddressComponents( + int index, + com.google.maps.geocode.v4.GeocodeResult.AddressComponent.Builder builderForValue) { + if (addressComponentsBuilder_ == null) { + ensureAddressComponentsIsMutable(); + addressComponents_.set(index, builderForValue.build()); + onChanged(); + } else { + addressComponentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Repeated components for each locality level.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult.AddressComponent address_components = 9; + * + */ + public Builder addAddressComponents( + com.google.maps.geocode.v4.GeocodeResult.AddressComponent value) { + if (addressComponentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAddressComponentsIsMutable(); + addressComponents_.add(value); + onChanged(); + } else { + addressComponentsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Repeated components for each locality level.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult.AddressComponent address_components = 9; + * + */ + public Builder addAddressComponents( + int index, com.google.maps.geocode.v4.GeocodeResult.AddressComponent value) { + if (addressComponentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAddressComponentsIsMutable(); + addressComponents_.add(index, value); + onChanged(); + } else { + addressComponentsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Repeated components for each locality level.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult.AddressComponent address_components = 9; + * + */ + public Builder addAddressComponents( + com.google.maps.geocode.v4.GeocodeResult.AddressComponent.Builder builderForValue) { + if (addressComponentsBuilder_ == null) { + ensureAddressComponentsIsMutable(); + addressComponents_.add(builderForValue.build()); + onChanged(); + } else { + addressComponentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Repeated components for each locality level.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult.AddressComponent address_components = 9; + * + */ + public Builder addAddressComponents( + int index, + com.google.maps.geocode.v4.GeocodeResult.AddressComponent.Builder builderForValue) { + if (addressComponentsBuilder_ == null) { + ensureAddressComponentsIsMutable(); + addressComponents_.add(index, builderForValue.build()); + onChanged(); + } else { + addressComponentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Repeated components for each locality level.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult.AddressComponent address_components = 9; + * + */ + public Builder addAllAddressComponents( + java.lang.Iterable + values) { + if (addressComponentsBuilder_ == null) { + ensureAddressComponentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, addressComponents_); + onChanged(); + } else { + addressComponentsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Repeated components for each locality level.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult.AddressComponent address_components = 9; + * + */ + public Builder clearAddressComponents() { + if (addressComponentsBuilder_ == null) { + addressComponents_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + } else { + addressComponentsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Repeated components for each locality level.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult.AddressComponent address_components = 9; + * + */ + public Builder removeAddressComponents(int index) { + if (addressComponentsBuilder_ == null) { + ensureAddressComponentsIsMutable(); + addressComponents_.remove(index); + onChanged(); + } else { + addressComponentsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Repeated components for each locality level.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult.AddressComponent address_components = 9; + * + */ + public com.google.maps.geocode.v4.GeocodeResult.AddressComponent.Builder + getAddressComponentsBuilder(int index) { + return internalGetAddressComponentsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Repeated components for each locality level.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult.AddressComponent address_components = 9; + * + */ + public com.google.maps.geocode.v4.GeocodeResult.AddressComponentOrBuilder + getAddressComponentsOrBuilder(int index) { + if (addressComponentsBuilder_ == null) { + return addressComponents_.get(index); + } else { + return addressComponentsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Repeated components for each locality level.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult.AddressComponent address_components = 9; + * + */ + public java.util.List< + ? extends com.google.maps.geocode.v4.GeocodeResult.AddressComponentOrBuilder> + getAddressComponentsOrBuilderList() { + if (addressComponentsBuilder_ != null) { + return addressComponentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(addressComponents_); + } + } + + /** + * + * + *
+     * Repeated components for each locality level.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult.AddressComponent address_components = 9; + * + */ + public com.google.maps.geocode.v4.GeocodeResult.AddressComponent.Builder + addAddressComponentsBuilder() { + return internalGetAddressComponentsFieldBuilder() + .addBuilder( + com.google.maps.geocode.v4.GeocodeResult.AddressComponent.getDefaultInstance()); + } + + /** + * + * + *
+     * Repeated components for each locality level.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult.AddressComponent address_components = 9; + * + */ + public com.google.maps.geocode.v4.GeocodeResult.AddressComponent.Builder + addAddressComponentsBuilder(int index) { + return internalGetAddressComponentsFieldBuilder() + .addBuilder( + index, + com.google.maps.geocode.v4.GeocodeResult.AddressComponent.getDefaultInstance()); + } + + /** + * + * + *
+     * Repeated components for each locality level.
+     * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult.AddressComponent address_components = 9; + * + */ + public java.util.List + getAddressComponentsBuilderList() { + return internalGetAddressComponentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.maps.geocode.v4.GeocodeResult.AddressComponent, + com.google.maps.geocode.v4.GeocodeResult.AddressComponent.Builder, + com.google.maps.geocode.v4.GeocodeResult.AddressComponentOrBuilder> + internalGetAddressComponentsFieldBuilder() { + if (addressComponentsBuilder_ == null) { + addressComponentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.maps.geocode.v4.GeocodeResult.AddressComponent, + com.google.maps.geocode.v4.GeocodeResult.AddressComponent.Builder, + com.google.maps.geocode.v4.GeocodeResult.AddressComponentOrBuilder>( + addressComponents_, + ((bitField0_ & 0x00000100) != 0), + getParentForChildren(), + isClean()); + addressComponents_ = null; + } + return addressComponentsBuilder_; + } + + private java.util.List postalCodeLocalities_ = + java.util.Collections.emptyList(); + + private void ensurePostalCodeLocalitiesIsMutable() { + if (!((bitField0_ & 0x00000200) != 0)) { + postalCodeLocalities_ = + new java.util.ArrayList(postalCodeLocalities_); + bitField0_ |= 0x00000200; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.type.LocalizedText, + com.google.type.LocalizedText.Builder, + com.google.type.LocalizedTextOrBuilder> + postalCodeLocalitiesBuilder_; + + /** + * + * + *
+     * Complete list of localities contained in the postal code.
+     *
+     * This is only populated when the result is of type "postal_code".
+     * 
+ * + * repeated .google.type.LocalizedText postal_code_localities = 11; + */ + public java.util.List getPostalCodeLocalitiesList() { + if (postalCodeLocalitiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(postalCodeLocalities_); + } else { + return postalCodeLocalitiesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Complete list of localities contained in the postal code.
+     *
+     * This is only populated when the result is of type "postal_code".
+     * 
+ * + * repeated .google.type.LocalizedText postal_code_localities = 11; + */ + public int getPostalCodeLocalitiesCount() { + if (postalCodeLocalitiesBuilder_ == null) { + return postalCodeLocalities_.size(); + } else { + return postalCodeLocalitiesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Complete list of localities contained in the postal code.
+     *
+     * This is only populated when the result is of type "postal_code".
+     * 
+ * + * repeated .google.type.LocalizedText postal_code_localities = 11; + */ + public com.google.type.LocalizedText getPostalCodeLocalities(int index) { + if (postalCodeLocalitiesBuilder_ == null) { + return postalCodeLocalities_.get(index); + } else { + return postalCodeLocalitiesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Complete list of localities contained in the postal code.
+     *
+     * This is only populated when the result is of type "postal_code".
+     * 
+ * + * repeated .google.type.LocalizedText postal_code_localities = 11; + */ + public Builder setPostalCodeLocalities(int index, com.google.type.LocalizedText value) { + if (postalCodeLocalitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePostalCodeLocalitiesIsMutable(); + postalCodeLocalities_.set(index, value); + onChanged(); + } else { + postalCodeLocalitiesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Complete list of localities contained in the postal code.
+     *
+     * This is only populated when the result is of type "postal_code".
+     * 
+ * + * repeated .google.type.LocalizedText postal_code_localities = 11; + */ + public Builder setPostalCodeLocalities( + int index, com.google.type.LocalizedText.Builder builderForValue) { + if (postalCodeLocalitiesBuilder_ == null) { + ensurePostalCodeLocalitiesIsMutable(); + postalCodeLocalities_.set(index, builderForValue.build()); + onChanged(); + } else { + postalCodeLocalitiesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Complete list of localities contained in the postal code.
+     *
+     * This is only populated when the result is of type "postal_code".
+     * 
+ * + * repeated .google.type.LocalizedText postal_code_localities = 11; + */ + public Builder addPostalCodeLocalities(com.google.type.LocalizedText value) { + if (postalCodeLocalitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePostalCodeLocalitiesIsMutable(); + postalCodeLocalities_.add(value); + onChanged(); + } else { + postalCodeLocalitiesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Complete list of localities contained in the postal code.
+     *
+     * This is only populated when the result is of type "postal_code".
+     * 
+ * + * repeated .google.type.LocalizedText postal_code_localities = 11; + */ + public Builder addPostalCodeLocalities(int index, com.google.type.LocalizedText value) { + if (postalCodeLocalitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePostalCodeLocalitiesIsMutable(); + postalCodeLocalities_.add(index, value); + onChanged(); + } else { + postalCodeLocalitiesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Complete list of localities contained in the postal code.
+     *
+     * This is only populated when the result is of type "postal_code".
+     * 
+ * + * repeated .google.type.LocalizedText postal_code_localities = 11; + */ + public Builder addPostalCodeLocalities(com.google.type.LocalizedText.Builder builderForValue) { + if (postalCodeLocalitiesBuilder_ == null) { + ensurePostalCodeLocalitiesIsMutable(); + postalCodeLocalities_.add(builderForValue.build()); + onChanged(); + } else { + postalCodeLocalitiesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Complete list of localities contained in the postal code.
+     *
+     * This is only populated when the result is of type "postal_code".
+     * 
+ * + * repeated .google.type.LocalizedText postal_code_localities = 11; + */ + public Builder addPostalCodeLocalities( + int index, com.google.type.LocalizedText.Builder builderForValue) { + if (postalCodeLocalitiesBuilder_ == null) { + ensurePostalCodeLocalitiesIsMutable(); + postalCodeLocalities_.add(index, builderForValue.build()); + onChanged(); + } else { + postalCodeLocalitiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Complete list of localities contained in the postal code.
+     *
+     * This is only populated when the result is of type "postal_code".
+     * 
+ * + * repeated .google.type.LocalizedText postal_code_localities = 11; + */ + public Builder addAllPostalCodeLocalities( + java.lang.Iterable values) { + if (postalCodeLocalitiesBuilder_ == null) { + ensurePostalCodeLocalitiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, postalCodeLocalities_); + onChanged(); + } else { + postalCodeLocalitiesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Complete list of localities contained in the postal code.
+     *
+     * This is only populated when the result is of type "postal_code".
+     * 
+ * + * repeated .google.type.LocalizedText postal_code_localities = 11; + */ + public Builder clearPostalCodeLocalities() { + if (postalCodeLocalitiesBuilder_ == null) { + postalCodeLocalities_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + } else { + postalCodeLocalitiesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Complete list of localities contained in the postal code.
+     *
+     * This is only populated when the result is of type "postal_code".
+     * 
+ * + * repeated .google.type.LocalizedText postal_code_localities = 11; + */ + public Builder removePostalCodeLocalities(int index) { + if (postalCodeLocalitiesBuilder_ == null) { + ensurePostalCodeLocalitiesIsMutable(); + postalCodeLocalities_.remove(index); + onChanged(); + } else { + postalCodeLocalitiesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Complete list of localities contained in the postal code.
+     *
+     * This is only populated when the result is of type "postal_code".
+     * 
+ * + * repeated .google.type.LocalizedText postal_code_localities = 11; + */ + public com.google.type.LocalizedText.Builder getPostalCodeLocalitiesBuilder(int index) { + return internalGetPostalCodeLocalitiesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Complete list of localities contained in the postal code.
+     *
+     * This is only populated when the result is of type "postal_code".
+     * 
+ * + * repeated .google.type.LocalizedText postal_code_localities = 11; + */ + public com.google.type.LocalizedTextOrBuilder getPostalCodeLocalitiesOrBuilder(int index) { + if (postalCodeLocalitiesBuilder_ == null) { + return postalCodeLocalities_.get(index); + } else { + return postalCodeLocalitiesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Complete list of localities contained in the postal code.
+     *
+     * This is only populated when the result is of type "postal_code".
+     * 
+ * + * repeated .google.type.LocalizedText postal_code_localities = 11; + */ + public java.util.List + getPostalCodeLocalitiesOrBuilderList() { + if (postalCodeLocalitiesBuilder_ != null) { + return postalCodeLocalitiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(postalCodeLocalities_); + } + } + + /** + * + * + *
+     * Complete list of localities contained in the postal code.
+     *
+     * This is only populated when the result is of type "postal_code".
+     * 
+ * + * repeated .google.type.LocalizedText postal_code_localities = 11; + */ + public com.google.type.LocalizedText.Builder addPostalCodeLocalitiesBuilder() { + return internalGetPostalCodeLocalitiesFieldBuilder() + .addBuilder(com.google.type.LocalizedText.getDefaultInstance()); + } + + /** + * + * + *
+     * Complete list of localities contained in the postal code.
+     *
+     * This is only populated when the result is of type "postal_code".
+     * 
+ * + * repeated .google.type.LocalizedText postal_code_localities = 11; + */ + public com.google.type.LocalizedText.Builder addPostalCodeLocalitiesBuilder(int index) { + return internalGetPostalCodeLocalitiesFieldBuilder() + .addBuilder(index, com.google.type.LocalizedText.getDefaultInstance()); + } + + /** + * + * + *
+     * Complete list of localities contained in the postal code.
+     *
+     * This is only populated when the result is of type "postal_code".
+     * 
+ * + * repeated .google.type.LocalizedText postal_code_localities = 11; + */ + public java.util.List + getPostalCodeLocalitiesBuilderList() { + return internalGetPostalCodeLocalitiesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.type.LocalizedText, + com.google.type.LocalizedText.Builder, + com.google.type.LocalizedTextOrBuilder> + internalGetPostalCodeLocalitiesFieldBuilder() { + if (postalCodeLocalitiesBuilder_ == null) { + postalCodeLocalitiesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.type.LocalizedText, + com.google.type.LocalizedText.Builder, + com.google.type.LocalizedTextOrBuilder>( + postalCodeLocalities_, + ((bitField0_ & 0x00000200) != 0), + getParentForChildren(), + isClean()); + postalCodeLocalities_ = null; + } + return postalCodeLocalitiesBuilder_; + } + + private com.google.protobuf.LazyStringArrayList types_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureTypesIsMutable() { + if (!types_.isModifiable()) { + types_ = new com.google.protobuf.LazyStringArrayList(types_); + } + bitField0_ |= 0x00000400; + } + + /** + * + * + *
+     * A set of type tags for this result. For
+     * example, "political" and "administrative_area".
+     *
+     * For the complete list of possible values, see Table A and Table B at
+     * https://developers.google.com/maps/documentation/places/web-service/place-types.
+     * 
+ * + * repeated string types = 12; + * + * @return A list containing the types. + */ + public com.google.protobuf.ProtocolStringList getTypesList() { + types_.makeImmutable(); + return types_; + } + + /** + * + * + *
+     * A set of type tags for this result. For
+     * example, "political" and "administrative_area".
+     *
+     * For the complete list of possible values, see Table A and Table B at
+     * https://developers.google.com/maps/documentation/places/web-service/place-types.
+     * 
+ * + * repeated string types = 12; + * + * @return The count of types. + */ + public int getTypesCount() { + return types_.size(); + } + + /** + * + * + *
+     * A set of type tags for this result. For
+     * example, "political" and "administrative_area".
+     *
+     * For the complete list of possible values, see Table A and Table B at
+     * https://developers.google.com/maps/documentation/places/web-service/place-types.
+     * 
+ * + * repeated string types = 12; + * + * @param index The index of the element to return. + * @return The types at the given index. + */ + public java.lang.String getTypes(int index) { + return types_.get(index); + } + + /** + * + * + *
+     * A set of type tags for this result. For
+     * example, "political" and "administrative_area".
+     *
+     * For the complete list of possible values, see Table A and Table B at
+     * https://developers.google.com/maps/documentation/places/web-service/place-types.
+     * 
+ * + * repeated string types = 12; + * + * @param index The index of the value to return. + * @return The bytes of the types at the given index. + */ + public com.google.protobuf.ByteString getTypesBytes(int index) { + return types_.getByteString(index); + } + + /** + * + * + *
+     * A set of type tags for this result. For
+     * example, "political" and "administrative_area".
+     *
+     * For the complete list of possible values, see Table A and Table B at
+     * https://developers.google.com/maps/documentation/places/web-service/place-types.
+     * 
+ * + * repeated string types = 12; + * + * @param index The index to set the value at. + * @param value The types to set. + * @return This builder for chaining. + */ + public Builder setTypes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypesIsMutable(); + types_.set(index, value); + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * A set of type tags for this result. For
+     * example, "political" and "administrative_area".
+     *
+     * For the complete list of possible values, see Table A and Table B at
+     * https://developers.google.com/maps/documentation/places/web-service/place-types.
+     * 
+ * + * repeated string types = 12; + * + * @param value The types to add. + * @return This builder for chaining. + */ + public Builder addTypes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypesIsMutable(); + types_.add(value); + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * A set of type tags for this result. For
+     * example, "political" and "administrative_area".
+     *
+     * For the complete list of possible values, see Table A and Table B at
+     * https://developers.google.com/maps/documentation/places/web-service/place-types.
+     * 
+ * + * repeated string types = 12; + * + * @param values The types to add. + * @return This builder for chaining. + */ + public Builder addAllTypes(java.lang.Iterable values) { + ensureTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, types_); + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * A set of type tags for this result. For
+     * example, "political" and "administrative_area".
+     *
+     * For the complete list of possible values, see Table A and Table B at
+     * https://developers.google.com/maps/documentation/places/web-service/place-types.
+     * 
+ * + * repeated string types = 12; + * + * @return This builder for chaining. + */ + public Builder clearTypes() { + types_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * A set of type tags for this result. For
+     * example, "political" and "administrative_area".
+     *
+     * For the complete list of possible values, see Table A and Table B at
+     * https://developers.google.com/maps/documentation/places/web-service/place-types.
+     * 
+ * + * repeated string types = 12; + * + * @param value The bytes of the types to add. + * @return This builder for chaining. + */ + public Builder addTypesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTypesIsMutable(); + types_.add(value); + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + private com.google.maps.geocode.v4.PlusCode plusCode_; + private com.google.protobuf.SingleFieldBuilder< + com.google.maps.geocode.v4.PlusCode, + com.google.maps.geocode.v4.PlusCode.Builder, + com.google.maps.geocode.v4.PlusCodeOrBuilder> + plusCodeBuilder_; + + /** + * + * + *
+     * Plus code of the location in this geocode.
+     * 
+ * + * .google.maps.geocode.v4.PlusCode plus_code = 13; + * + * @return Whether the plusCode field is set. + */ + public boolean hasPlusCode() { + return ((bitField0_ & 0x00000800) != 0); + } + + /** + * + * + *
+     * Plus code of the location in this geocode.
+     * 
+ * + * .google.maps.geocode.v4.PlusCode plus_code = 13; + * + * @return The plusCode. + */ + public com.google.maps.geocode.v4.PlusCode getPlusCode() { + if (plusCodeBuilder_ == null) { + return plusCode_ == null + ? com.google.maps.geocode.v4.PlusCode.getDefaultInstance() + : plusCode_; + } else { + return plusCodeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Plus code of the location in this geocode.
+     * 
+ * + * .google.maps.geocode.v4.PlusCode plus_code = 13; + */ + public Builder setPlusCode(com.google.maps.geocode.v4.PlusCode value) { + if (plusCodeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + plusCode_ = value; + } else { + plusCodeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Plus code of the location in this geocode.
+     * 
+ * + * .google.maps.geocode.v4.PlusCode plus_code = 13; + */ + public Builder setPlusCode(com.google.maps.geocode.v4.PlusCode.Builder builderForValue) { + if (plusCodeBuilder_ == null) { + plusCode_ = builderForValue.build(); + } else { + plusCodeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Plus code of the location in this geocode.
+     * 
+ * + * .google.maps.geocode.v4.PlusCode plus_code = 13; + */ + public Builder mergePlusCode(com.google.maps.geocode.v4.PlusCode value) { + if (plusCodeBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) + && plusCode_ != null + && plusCode_ != com.google.maps.geocode.v4.PlusCode.getDefaultInstance()) { + getPlusCodeBuilder().mergeFrom(value); + } else { + plusCode_ = value; + } + } else { + plusCodeBuilder_.mergeFrom(value); + } + if (plusCode_ != null) { + bitField0_ |= 0x00000800; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Plus code of the location in this geocode.
+     * 
+ * + * .google.maps.geocode.v4.PlusCode plus_code = 13; + */ + public Builder clearPlusCode() { + bitField0_ = (bitField0_ & ~0x00000800); + plusCode_ = null; + if (plusCodeBuilder_ != null) { + plusCodeBuilder_.dispose(); + plusCodeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Plus code of the location in this geocode.
+     * 
+ * + * .google.maps.geocode.v4.PlusCode plus_code = 13; + */ + public com.google.maps.geocode.v4.PlusCode.Builder getPlusCodeBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return internalGetPlusCodeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Plus code of the location in this geocode.
+     * 
+ * + * .google.maps.geocode.v4.PlusCode plus_code = 13; + */ + public com.google.maps.geocode.v4.PlusCodeOrBuilder getPlusCodeOrBuilder() { + if (plusCodeBuilder_ != null) { + return plusCodeBuilder_.getMessageOrBuilder(); + } else { + return plusCode_ == null + ? com.google.maps.geocode.v4.PlusCode.getDefaultInstance() + : plusCode_; + } + } + + /** + * + * + *
+     * Plus code of the location in this geocode.
+     * 
+ * + * .google.maps.geocode.v4.PlusCode plus_code = 13; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.maps.geocode.v4.PlusCode, + com.google.maps.geocode.v4.PlusCode.Builder, + com.google.maps.geocode.v4.PlusCodeOrBuilder> + internalGetPlusCodeFieldBuilder() { + if (plusCodeBuilder_ == null) { + plusCodeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.maps.geocode.v4.PlusCode, + com.google.maps.geocode.v4.PlusCode.Builder, + com.google.maps.geocode.v4.PlusCodeOrBuilder>( + getPlusCode(), getParentForChildren(), isClean()); + plusCode_ = null; + } + return plusCodeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.maps.geocode.v4.GeocodeResult) + } + + // @@protoc_insertion_point(class_scope:google.maps.geocode.v4.GeocodeResult) + private static final com.google.maps.geocode.v4.GeocodeResult DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.geocode.v4.GeocodeResult(); + } + + public static com.google.maps.geocode.v4.GeocodeResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GeocodeResult 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.geocode.v4.GeocodeResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodeResultOrBuilder.java b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodeResultOrBuilder.java new file mode 100644 index 000000000000..be4b49350e82 --- /dev/null +++ b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodeResultOrBuilder.java @@ -0,0 +1,518 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/maps/geocode/v4/geocode_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.geocode.v4; + +@com.google.protobuf.Generated +public interface GeocodeResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.geocode.v4.GeocodeResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * This Place's resource name, in `places/{placeId}` format.  Can be used to
+   * look up the Place.
+   * 
+ * + * string place = 1; + * + * @return The place. + */ + java.lang.String getPlace(); + + /** + * + * + *
+   * This Place's resource name, in `places/{placeId}` format.  Can be used to
+   * look up the Place.
+   * 
+ * + * string place = 1; + * + * @return The bytes for place. + */ + com.google.protobuf.ByteString getPlaceBytes(); + + /** + * + * + *
+   * The unique identifier of a place.
+   * 
+ * + * string place_id = 2; + * + * @return The placeId. + */ + java.lang.String getPlaceId(); + + /** + * + * + *
+   * The unique identifier of a place.
+   * 
+ * + * string place_id = 2; + * + * @return The bytes for placeId. + */ + com.google.protobuf.ByteString getPlaceIdBytes(); + + /** + * + * + *
+   * The latlng of this address.
+   * 
+ * + * .google.type.LatLng location = 3; + * + * @return Whether the location field is set. + */ + boolean hasLocation(); + + /** + * + * + *
+   * The latlng of this address.
+   * 
+ * + * .google.type.LatLng location = 3; + * + * @return The location. + */ + com.google.type.LatLng getLocation(); + + /** + * + * + *
+   * The latlng of this address.
+   * 
+ * + * .google.type.LatLng location = 3; + */ + com.google.type.LatLngOrBuilder getLocationOrBuilder(); + + /** + * + * + *
+   * The granularity of the location.
+   * 
+ * + * .google.maps.geocode.v4.GeocodeResult.Granularity granularity = 4; + * + * @return The enum numeric value on the wire for granularity. + */ + int getGranularityValue(); + + /** + * + * + *
+   * The granularity of the location.
+   * 
+ * + * .google.maps.geocode.v4.GeocodeResult.Granularity granularity = 4; + * + * @return The granularity. + */ + com.google.maps.geocode.v4.GeocodeResult.Granularity getGranularity(); + + /** + * + * + *
+   * A viewport suitable for displaying the geocode result.
+   * 
+ * + * .google.geo.type.Viewport viewport = 5; + * + * @return Whether the viewport field is set. + */ + boolean hasViewport(); + + /** + * + * + *
+   * A viewport suitable for displaying the geocode result.
+   * 
+ * + * .google.geo.type.Viewport viewport = 5; + * + * @return The viewport. + */ + com.google.geo.type.Viewport getViewport(); + + /** + * + * + *
+   * A viewport suitable for displaying the geocode result.
+   * 
+ * + * .google.geo.type.Viewport viewport = 5; + */ + com.google.geo.type.ViewportOrBuilder getViewportOrBuilder(); + + /** + * + * + *
+   * A bounding box for the address.
+   * 
+ * + * .google.geo.type.Viewport bounds = 6; + * + * @return Whether the bounds field is set. + */ + boolean hasBounds(); + + /** + * + * + *
+   * A bounding box for the address.
+   * 
+ * + * .google.geo.type.Viewport bounds = 6; + * + * @return The bounds. + */ + com.google.geo.type.Viewport getBounds(); + + /** + * + * + *
+   * A bounding box for the address.
+   * 
+ * + * .google.geo.type.Viewport bounds = 6; + */ + com.google.geo.type.ViewportOrBuilder getBoundsOrBuilder(); + + /** + * + * + *
+   * The one line formatted address.
+   * 
+ * + * string formatted_address = 7; + * + * @return The formattedAddress. + */ + java.lang.String getFormattedAddress(); + + /** + * + * + *
+   * The one line formatted address.
+   * 
+ * + * string formatted_address = 7; + * + * @return The bytes for formattedAddress. + */ + com.google.protobuf.ByteString getFormattedAddressBytes(); + + /** + * + * + *
+   * The address in postal address format.
+   * 
+ * + * .google.type.PostalAddress postal_address = 8; + * + * @return Whether the postalAddress field is set. + */ + boolean hasPostalAddress(); + + /** + * + * + *
+   * The address in postal address format.
+   * 
+ * + * .google.type.PostalAddress postal_address = 8; + * + * @return The postalAddress. + */ + com.google.type.PostalAddress getPostalAddress(); + + /** + * + * + *
+   * The address in postal address format.
+   * 
+ * + * .google.type.PostalAddress postal_address = 8; + */ + com.google.type.PostalAddressOrBuilder getPostalAddressOrBuilder(); + + /** + * + * + *
+   * Repeated components for each locality level.
+   * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult.AddressComponent address_components = 9; + * + */ + java.util.List + getAddressComponentsList(); + + /** + * + * + *
+   * Repeated components for each locality level.
+   * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult.AddressComponent address_components = 9; + * + */ + com.google.maps.geocode.v4.GeocodeResult.AddressComponent getAddressComponents(int index); + + /** + * + * + *
+   * Repeated components for each locality level.
+   * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult.AddressComponent address_components = 9; + * + */ + int getAddressComponentsCount(); + + /** + * + * + *
+   * Repeated components for each locality level.
+   * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult.AddressComponent address_components = 9; + * + */ + java.util.List + getAddressComponentsOrBuilderList(); + + /** + * + * + *
+   * Repeated components for each locality level.
+   * 
+ * + * repeated .google.maps.geocode.v4.GeocodeResult.AddressComponent address_components = 9; + * + */ + com.google.maps.geocode.v4.GeocodeResult.AddressComponentOrBuilder getAddressComponentsOrBuilder( + int index); + + /** + * + * + *
+   * Complete list of localities contained in the postal code.
+   *
+   * This is only populated when the result is of type "postal_code".
+   * 
+ * + * repeated .google.type.LocalizedText postal_code_localities = 11; + */ + java.util.List getPostalCodeLocalitiesList(); + + /** + * + * + *
+   * Complete list of localities contained in the postal code.
+   *
+   * This is only populated when the result is of type "postal_code".
+   * 
+ * + * repeated .google.type.LocalizedText postal_code_localities = 11; + */ + com.google.type.LocalizedText getPostalCodeLocalities(int index); + + /** + * + * + *
+   * Complete list of localities contained in the postal code.
+   *
+   * This is only populated when the result is of type "postal_code".
+   * 
+ * + * repeated .google.type.LocalizedText postal_code_localities = 11; + */ + int getPostalCodeLocalitiesCount(); + + /** + * + * + *
+   * Complete list of localities contained in the postal code.
+   *
+   * This is only populated when the result is of type "postal_code".
+   * 
+ * + * repeated .google.type.LocalizedText postal_code_localities = 11; + */ + java.util.List + getPostalCodeLocalitiesOrBuilderList(); + + /** + * + * + *
+   * Complete list of localities contained in the postal code.
+   *
+   * This is only populated when the result is of type "postal_code".
+   * 
+ * + * repeated .google.type.LocalizedText postal_code_localities = 11; + */ + com.google.type.LocalizedTextOrBuilder getPostalCodeLocalitiesOrBuilder(int index); + + /** + * + * + *
+   * A set of type tags for this result. For
+   * example, "political" and "administrative_area".
+   *
+   * For the complete list of possible values, see Table A and Table B at
+   * https://developers.google.com/maps/documentation/places/web-service/place-types.
+   * 
+ * + * repeated string types = 12; + * + * @return A list containing the types. + */ + java.util.List getTypesList(); + + /** + * + * + *
+   * A set of type tags for this result. For
+   * example, "political" and "administrative_area".
+   *
+   * For the complete list of possible values, see Table A and Table B at
+   * https://developers.google.com/maps/documentation/places/web-service/place-types.
+   * 
+ * + * repeated string types = 12; + * + * @return The count of types. + */ + int getTypesCount(); + + /** + * + * + *
+   * A set of type tags for this result. For
+   * example, "political" and "administrative_area".
+   *
+   * For the complete list of possible values, see Table A and Table B at
+   * https://developers.google.com/maps/documentation/places/web-service/place-types.
+   * 
+ * + * repeated string types = 12; + * + * @param index The index of the element to return. + * @return The types at the given index. + */ + java.lang.String getTypes(int index); + + /** + * + * + *
+   * A set of type tags for this result. For
+   * example, "political" and "administrative_area".
+   *
+   * For the complete list of possible values, see Table A and Table B at
+   * https://developers.google.com/maps/documentation/places/web-service/place-types.
+   * 
+ * + * repeated string types = 12; + * + * @param index The index of the value to return. + * @return The bytes of the types at the given index. + */ + com.google.protobuf.ByteString getTypesBytes(int index); + + /** + * + * + *
+   * Plus code of the location in this geocode.
+   * 
+ * + * .google.maps.geocode.v4.PlusCode plus_code = 13; + * + * @return Whether the plusCode field is set. + */ + boolean hasPlusCode(); + + /** + * + * + *
+   * Plus code of the location in this geocode.
+   * 
+ * + * .google.maps.geocode.v4.PlusCode plus_code = 13; + * + * @return The plusCode. + */ + com.google.maps.geocode.v4.PlusCode getPlusCode(); + + /** + * + * + *
+   * Plus code of the location in this geocode.
+   * 
+ * + * .google.maps.geocode.v4.PlusCode plus_code = 13; + */ + com.google.maps.geocode.v4.PlusCodeOrBuilder getPlusCodeOrBuilder(); +} diff --git a/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodeServiceProto.java b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodeServiceProto.java new file mode 100644 index 000000000000..e623b829c517 --- /dev/null +++ b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/GeocodeServiceProto.java @@ -0,0 +1,300 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/maps/geocode/v4/geocode_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.geocode.v4; + +@com.google.protobuf.Generated +public final class GeocodeServiceProto extends com.google.protobuf.GeneratedFile { + private GeocodeServiceProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GeocodeServiceProto"); + } + + 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_geocode_v4_GeocodeAddressRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_maps_geocode_v4_GeocodeAddressRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_geocode_v4_GeocodeAddressRequest_LocationBias_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_maps_geocode_v4_GeocodeAddressRequest_LocationBias_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_geocode_v4_GeocodeLocationRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_maps_geocode_v4_GeocodeLocationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_geocode_v4_GeocodePlaceRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_maps_geocode_v4_GeocodePlaceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_geocode_v4_PlusCode_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_maps_geocode_v4_PlusCode_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_geocode_v4_GeocodeResult_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_maps_geocode_v4_GeocodeResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_geocode_v4_GeocodeResult_AddressComponent_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_maps_geocode_v4_GeocodeResult_AddressComponent_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_geocode_v4_GeocodeAddressResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_maps_geocode_v4_GeocodeAddressResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_geocode_v4_GeocodeLocationResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_maps_geocode_v4_GeocodeLocationResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + ",google/maps/geocode/v4/geocode_service" + + ".proto\022\026google.maps.geocode.v4\032\034google/a" + + "pi/annotations.proto\032\027google/api/client." + + "proto\032\037google/api/field_behavior.proto\032\036" + + "google/geo/type/viewport.proto\032\030google/type/latlng.proto\032" + + " google/type/localized_text.proto\032 google/type/postal_address.proto\"\306\002\n" + + "\025GeocodeAddressRequest\022\027\n\r" + + "address_query\030\001 \001(\tH\000\022-\n" + + "\007address\030\002 \001(\0132\032.google.type.PostalAddressH\000\022V\n\r" + + "location_bias\030\003" + + " \001(\0132:.google.maps.geocode.v4.GeocodeAddressRequest.LocationBiasB\003\340A\001\022\032\n\r" + + "language_code\030\004 \001(\tB\003\340A\001\022\030\n" + + "\013region_code\030\005 \001(\tB\003\340A\001\032F\n" + + "\014LocationBias\022.\n" + + "\trectangle\030\001 \001(\0132\031.google.geo.type.ViewportH\000B\006\n" + + "\004typeB\017\n\r" + + "address_input\"\204\002\n" + + "\026GeocodeLocationRequest\022\030\n" + + "\016location_query\030\001 \001(\tH\000\022\'\n" + + "\010location\030\002 \001(\0132\023.google.type.LatLngH\000\022\032\n\r" + + "language_code\030\003 \001(\tB\003\340A\001\022\030\n" + + "\013region_code\030\004 \001(\tB\003\340A\001\022\022\n" + + "\005types\030\005 \003(\tB\003\340A\001\022K\n" + + "\013granularity\030\006 \003" + + "(\01621.google.maps.geocode.v4.GeocodeResult.GranularityB\003\340A\001B\020\n" + + "\016location_input\"_\n" + + "\023GeocodePlaceRequest\022\022\n" + + "\005place\030\001 \001(\tB\003\340A\002\022\032\n\r" + + "language_code\030\002 \001(\tB\003\340A\001\022\030\n" + + "\013region_code\030\003 \001(\tB\003\340A\001\"6\n" + + "\010PlusCode\022\023\n" + + "\013global_code\030\001 \001(\t\022\025\n\r" + + "compound_code\030\002 \001(\t\"\363\005\n\r" + + "GeocodeResult\022\r\n" + + "\005place\030\001 \001(\t\022\020\n" + + "\010place_id\030\002 \001(\t\022%\n" + + "\010location\030\003 \001(\0132\023.google.type.LatLng\022F\n" + + "\013granularity\030\004" + + " \001(\01621.google.maps.geocode.v4.GeocodeResult.Granularity\022+\n" + + "\010viewport\030\005 \001(\0132\031.google.geo.type.Viewport\022)\n" + + "\006bounds\030\006 \001(\0132\031.google.geo.type.Viewport\022\031\n" + + "\021formatted_address\030\007 \001(\t\0222\n" + + "\016postal_address\030\010 \001(\0132\032.google.type.PostalAddress\022R\n" + + "\022address_components\030\t \003(\01326.google.maps" + + ".geocode.v4.GeocodeResult.AddressComponent\022:\n" + + "\026postal_code_localities\030\013 \003(\0132\032.google.type.LocalizedText\022\r\n" + + "\005types\030\014 \003(\t\0223\n" + + "\tplus_code\030\r" + + " \001(\0132 .google.maps.geocode.v4.PlusCode\032_\n" + + "\020AddressComponent\022\021\n" + + "\tlong_text\030\001 \001(\t\022\022\n\n" + + "short_text\030\002 \001(\t\022\r\n" + + "\005types\030\003 \003(\t\022\025\n\r" + + "language_code\030\004 \001(\t\"v\n" + + "\013Granularity\022\033\n" + + "\027GRANULARITY_UNSPECIFIED\020\000\022\013\n" + + "\007ROOFTOP\020\001\022\026\n" + + "\022RANGE_INTERPOLATED\020\002\022\024\n" + + "\020GEOMETRIC_CENTER\020\003\022\017\n" + + "\013APPROXIMATE\020\004\"P\n" + + "\026GeocodeAddressResponse\0226\n" + + "\007results\030\001 \003(\0132%.google.maps.geocode.v4.GeocodeResult\"\206\001\n" + + "\027GeocodeLocationResponse\0226\n" + + "\007results\030\001 \003(\0132%.google.maps.geocode.v4.GeocodeResult\0223\n" + + "\tplus_code\030\002 \001(\0132 .google.maps.geocode.v4.PlusCode2\324\006\n" + + "\016GeocodeService\022\263\001\n" + + "\016GeocodeAddress\022-.google.maps.geocode.v4.GeocodeAdd" + + "ressRequest\032..google.maps.geocode.v4.Geo" + + "codeAddressResponse\"B\202\323\344\223\002<\022\023/v4/geocode" + + "/addressZ%\022#/v4/geocode/address/{address_query}\022\271\001\n" + + "\017GeocodeLocation\022..google.maps.geocode.v4.GeocodeLocationRequest\032/.go" + + "ogle.maps.geocode.v4.GeocodeLocationResp" + + "onse\"E\202\323\344\223\002?\022\024/v4/geocode/locationZ\'\022%/v4/geocode/location/{location_query}\022\210\001\n" + + "\014GeocodePlace\022+.google.maps.geocode.v4.Ge" + + "ocodePlaceRequest\032%.google.maps.geocode." + + "v4.GeocodeResult\"$\202\323\344\223\002\036\022\034/v4/geocode/{place=places/*}\032\304\002\312A" + + " geocoding-backend.googleapis.com\322A\235\002https://www.googleapis.c" + + "om/auth/cloud-platform,https://www.googleapis.com/auth/maps-platform.geocode,htt" + + "ps://www.googleapis.com/auth/maps-platform.geocode.address,https://www.googleapi" + + "s.com/auth/maps-platform.geocode.locatio" + + "n,https://www.googleapis.com/auth/maps-platform.geocode.placeB\304\001\n" + + "\032com.google.maps.geocode.v4B\023GeocodeServiceProtoP\001Z:clo" + + "ud.google.com/go/maps/geocode/apiv4/geoc" + + "odepb;geocodepb\242\002\004GMPG\252\002\026Google.Maps.Geo" + + "code.V4\312\002\026Google\\Maps\\Geocode\\V4\352\002\031Googl" + + "e::Maps::Geocode::V4b\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.geo.type.ViewportProto.getDescriptor(), + com.google.type.LatLngProto.getDescriptor(), + com.google.type.LocalizedTextProto.getDescriptor(), + com.google.type.PostalAddressProto.getDescriptor(), + }); + internal_static_google_maps_geocode_v4_GeocodeAddressRequest_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_maps_geocode_v4_GeocodeAddressRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_maps_geocode_v4_GeocodeAddressRequest_descriptor, + new java.lang.String[] { + "AddressQuery", + "Address", + "LocationBias", + "LanguageCode", + "RegionCode", + "AddressInput", + }); + internal_static_google_maps_geocode_v4_GeocodeAddressRequest_LocationBias_descriptor = + internal_static_google_maps_geocode_v4_GeocodeAddressRequest_descriptor.getNestedType(0); + internal_static_google_maps_geocode_v4_GeocodeAddressRequest_LocationBias_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_maps_geocode_v4_GeocodeAddressRequest_LocationBias_descriptor, + new java.lang.String[] { + "Rectangle", "Type", + }); + internal_static_google_maps_geocode_v4_GeocodeLocationRequest_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_maps_geocode_v4_GeocodeLocationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_maps_geocode_v4_GeocodeLocationRequest_descriptor, + new java.lang.String[] { + "LocationQuery", + "Location", + "LanguageCode", + "RegionCode", + "Types", + "Granularity", + "LocationInput", + }); + internal_static_google_maps_geocode_v4_GeocodePlaceRequest_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_maps_geocode_v4_GeocodePlaceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_maps_geocode_v4_GeocodePlaceRequest_descriptor, + new java.lang.String[] { + "Place", "LanguageCode", "RegionCode", + }); + internal_static_google_maps_geocode_v4_PlusCode_descriptor = getDescriptor().getMessageType(3); + internal_static_google_maps_geocode_v4_PlusCode_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_maps_geocode_v4_PlusCode_descriptor, + new java.lang.String[] { + "GlobalCode", "CompoundCode", + }); + internal_static_google_maps_geocode_v4_GeocodeResult_descriptor = + getDescriptor().getMessageType(4); + internal_static_google_maps_geocode_v4_GeocodeResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_maps_geocode_v4_GeocodeResult_descriptor, + new java.lang.String[] { + "Place", + "PlaceId", + "Location", + "Granularity", + "Viewport", + "Bounds", + "FormattedAddress", + "PostalAddress", + "AddressComponents", + "PostalCodeLocalities", + "Types", + "PlusCode", + }); + internal_static_google_maps_geocode_v4_GeocodeResult_AddressComponent_descriptor = + internal_static_google_maps_geocode_v4_GeocodeResult_descriptor.getNestedType(0); + internal_static_google_maps_geocode_v4_GeocodeResult_AddressComponent_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_maps_geocode_v4_GeocodeResult_AddressComponent_descriptor, + new java.lang.String[] { + "LongText", "ShortText", "Types", "LanguageCode", + }); + internal_static_google_maps_geocode_v4_GeocodeAddressResponse_descriptor = + getDescriptor().getMessageType(5); + internal_static_google_maps_geocode_v4_GeocodeAddressResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_maps_geocode_v4_GeocodeAddressResponse_descriptor, + new java.lang.String[] { + "Results", + }); + internal_static_google_maps_geocode_v4_GeocodeLocationResponse_descriptor = + getDescriptor().getMessageType(6); + internal_static_google_maps_geocode_v4_GeocodeLocationResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_maps_geocode_v4_GeocodeLocationResponse_descriptor, + new java.lang.String[] { + "Results", "PlusCode", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.geo.type.ViewportProto.getDescriptor(); + com.google.type.LatLngProto.getDescriptor(); + com.google.type.LocalizedTextProto.getDescriptor(); + com.google.type.PostalAddressProto.getDescriptor(); + 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); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/Landmark.java b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/Landmark.java new file mode 100644 index 000000000000..0e8a426344af --- /dev/null +++ b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/Landmark.java @@ -0,0 +1,1928 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/maps/geocode/v4/destination_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.geocode.v4; + +/** + * + * + *
+ * Landmarks are used to communicate where the destination is or help with
+ * arriving at the destination.
+ * 
+ * + * Protobuf type {@code google.maps.geocode.v4.Landmark} + */ +@com.google.protobuf.Generated +public final class Landmark extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.maps.geocode.v4.Landmark) + LandmarkOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Landmark"); + } + + // Use Landmark.newBuilder() to construct. + private Landmark(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Landmark() { + tags_ = emptyIntList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_Landmark_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_Landmark_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.Landmark.class, + com.google.maps.geocode.v4.Landmark.Builder.class); + } + + /** + * + * + *
+   * The list of all possible tags that describe how a landmark can be used in
+   * the context of a destination.
+   *
+   * If an address has both the `ADDRESS` and `ARRIVAL` tags, it means the
+   * landmark is both locally prominent and close to the destination.
+   * 
+ * + * Protobuf enum {@code google.maps.geocode.v4.Landmark.Tag} + */ + public enum Tag implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not used.
+     * 
+ * + * TAG_UNSPECIFIED = 0; + */ + TAG_UNSPECIFIED(0), + /** + * + * + *
+     * A locally prominent place that can be used to identify the general
+     * location of the destination. Typically within a few hundred meters of the
+     * destination. These are similar to the landmarks returned by the
+     * Address Descriptors feature of the Geocoding API:
+     * https://developers.google.com/maps/documentation/geocoding/address-descriptors/requests-address-descriptors.
+     * 
+ * + * ADDRESS = 1; + */ + ADDRESS(1), + /** + * + * + *
+     * A place that can be used to help arrive at the destination. Useful for
+     * navigation once you are close to the destination. For example, this
+     * landmark might be a place that is across the street from the destination.
+     * A landmark with this tag is typically closer to the destination than
+     * landmarks with the `ADDRESS` tag.
+     * 
+ * + * ARRIVAL = 2; + */ + ARRIVAL(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Tag"); + } + + /** + * + * + *
+     * Not used.
+     * 
+ * + * TAG_UNSPECIFIED = 0; + */ + public static final int TAG_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * A locally prominent place that can be used to identify the general
+     * location of the destination. Typically within a few hundred meters of the
+     * destination. These are similar to the landmarks returned by the
+     * Address Descriptors feature of the Geocoding API:
+     * https://developers.google.com/maps/documentation/geocoding/address-descriptors/requests-address-descriptors.
+     * 
+ * + * ADDRESS = 1; + */ + public static final int ADDRESS_VALUE = 1; + + /** + * + * + *
+     * A place that can be used to help arrive at the destination. Useful for
+     * navigation once you are close to the destination. For example, this
+     * landmark might be a place that is across the street from the destination.
+     * A landmark with this tag is typically closer to the destination than
+     * landmarks with the `ADDRESS` tag.
+     * 
+ * + * ARRIVAL = 2; + */ + public static final int ARRIVAL_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 Tag 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 Tag forNumber(int value) { + switch (value) { + case 0: + return TAG_UNSPECIFIED; + case 1: + return ADDRESS; + case 2: + return ARRIVAL; + 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 Tag findValueByNumber(int number) { + return Tag.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.maps.geocode.v4.Landmark.getDescriptor().getEnumTypes().get(0); + } + + private static final Tag[] VALUES = values(); + + public static Tag 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 Tag(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.maps.geocode.v4.Landmark.Tag) + } + + private int bitField0_; + private int landmarkCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object landmark_; + + public enum LandmarkCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PLACE(1), + LANDMARK_NOT_SET(0); + private final int value; + + private LandmarkCase(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 LandmarkCase valueOf(int value) { + return forNumber(value); + } + + public static LandmarkCase forNumber(int value) { + switch (value) { + case 1: + return PLACE; + case 0: + return LANDMARK_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public LandmarkCase getLandmarkCase() { + return LandmarkCase.forNumber(landmarkCase_); + } + + public static final int PLACE_FIELD_NUMBER = 1; + + /** + * + * + *
+   * The place that represents this landmark.
+   * 
+ * + * .google.maps.geocode.v4.PlaceView place = 1; + * + * @return Whether the place field is set. + */ + @java.lang.Override + public boolean hasPlace() { + return landmarkCase_ == 1; + } + + /** + * + * + *
+   * The place that represents this landmark.
+   * 
+ * + * .google.maps.geocode.v4.PlaceView place = 1; + * + * @return The place. + */ + @java.lang.Override + public com.google.maps.geocode.v4.PlaceView getPlace() { + if (landmarkCase_ == 1) { + return (com.google.maps.geocode.v4.PlaceView) landmark_; + } + return com.google.maps.geocode.v4.PlaceView.getDefaultInstance(); + } + + /** + * + * + *
+   * The place that represents this landmark.
+   * 
+ * + * .google.maps.geocode.v4.PlaceView place = 1; + */ + @java.lang.Override + public com.google.maps.geocode.v4.PlaceViewOrBuilder getPlaceOrBuilder() { + if (landmarkCase_ == 1) { + return (com.google.maps.geocode.v4.PlaceView) landmark_; + } + return com.google.maps.geocode.v4.PlaceView.getDefaultInstance(); + } + + public static final int RELATIONAL_DESCRIPTION_FIELD_NUMBER = 2; + private com.google.type.LocalizedText relationalDescription_; + + /** + * + * + *
+   * A human-readable description of how the destination relates to the
+   * landmark. For example: "Near the Empire State Building" or "Across from
+   * the White House".
+   * 
+ * + * .google.type.LocalizedText relational_description = 2; + * + * @return Whether the relationalDescription field is set. + */ + @java.lang.Override + public boolean hasRelationalDescription() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * A human-readable description of how the destination relates to the
+   * landmark. For example: "Near the Empire State Building" or "Across from
+   * the White House".
+   * 
+ * + * .google.type.LocalizedText relational_description = 2; + * + * @return The relationalDescription. + */ + @java.lang.Override + public com.google.type.LocalizedText getRelationalDescription() { + return relationalDescription_ == null + ? com.google.type.LocalizedText.getDefaultInstance() + : relationalDescription_; + } + + /** + * + * + *
+   * A human-readable description of how the destination relates to the
+   * landmark. For example: "Near the Empire State Building" or "Across from
+   * the White House".
+   * 
+ * + * .google.type.LocalizedText relational_description = 2; + */ + @java.lang.Override + public com.google.type.LocalizedTextOrBuilder getRelationalDescriptionOrBuilder() { + return relationalDescription_ == null + ? com.google.type.LocalizedText.getDefaultInstance() + : relationalDescription_; + } + + public static final int TAGS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList tags_ = emptyIntList(); + + private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.maps.geocode.v4.Landmark.Tag> + tags_converter_ = + new com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.maps.geocode.v4.Landmark.Tag>() { + public com.google.maps.geocode.v4.Landmark.Tag convert(int from) { + com.google.maps.geocode.v4.Landmark.Tag result = + com.google.maps.geocode.v4.Landmark.Tag.forNumber(from); + return result == null ? com.google.maps.geocode.v4.Landmark.Tag.UNRECOGNIZED : result; + } + }; + + /** + * + * + *
+   * Tags that describe how the landmark can be used in the context of the
+   * destination.
+   * 
+ * + * repeated .google.maps.geocode.v4.Landmark.Tag tags = 3; + * + * @return A list containing the tags. + */ + @java.lang.Override + public java.util.List getTagsList() { + return new com.google.protobuf.Internal.IntListAdapter( + tags_, tags_converter_); + } + + /** + * + * + *
+   * Tags that describe how the landmark can be used in the context of the
+   * destination.
+   * 
+ * + * repeated .google.maps.geocode.v4.Landmark.Tag tags = 3; + * + * @return The count of tags. + */ + @java.lang.Override + public int getTagsCount() { + return tags_.size(); + } + + /** + * + * + *
+   * Tags that describe how the landmark can be used in the context of the
+   * destination.
+   * 
+ * + * repeated .google.maps.geocode.v4.Landmark.Tag tags = 3; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + @java.lang.Override + public com.google.maps.geocode.v4.Landmark.Tag getTags(int index) { + return tags_converter_.convert(tags_.getInt(index)); + } + + /** + * + * + *
+   * Tags that describe how the landmark can be used in the context of the
+   * destination.
+   * 
+ * + * repeated .google.maps.geocode.v4.Landmark.Tag tags = 3; + * + * @return A list containing the enum numeric values on the wire for tags. + */ + @java.lang.Override + public java.util.List getTagsValueList() { + return tags_; + } + + /** + * + * + *
+   * Tags that describe how the landmark can be used in the context of the
+   * destination.
+   * 
+ * + * repeated .google.maps.geocode.v4.Landmark.Tag tags = 3; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of tags at the given index. + */ + @java.lang.Override + public int getTagsValue(int index) { + return tags_.getInt(index); + } + + private int tagsMemoizedSerializedSize; + + public static final int STRAIGHT_LINE_DISTANCE_METERS_FIELD_NUMBER = 4; + private double straightLineDistanceMeters_ = 0D; + + /** + * + * + *
+   * Output only. The straight-line distance from this landmark to the
+   * destination in meters.
+   * 
+ * + * double straight_line_distance_meters = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The straightLineDistanceMeters. + */ + @java.lang.Override + public double getStraightLineDistanceMeters() { + return straightLineDistanceMeters_; + } + + public static final int TRAVEL_DISTANCE_METERS_FIELD_NUMBER = 5; + private double travelDistanceMeters_ = 0D; + + /** + * + * + *
+   * Output only. The road-network distance from this landmark to the
+   * destination in meters.
+   * 
+ * + * double travel_distance_meters = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The travelDistanceMeters. + */ + @java.lang.Override + public double getTravelDistanceMeters() { + return travelDistanceMeters_; + } + + 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 (landmarkCase_ == 1) { + output.writeMessage(1, (com.google.maps.geocode.v4.PlaceView) landmark_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getRelationalDescription()); + } + if (getTagsList().size() > 0) { + output.writeUInt32NoTag(26); + output.writeUInt32NoTag(tagsMemoizedSerializedSize); + } + for (int i = 0; i < tags_.size(); i++) { + output.writeEnumNoTag(tags_.getInt(i)); + } + if (java.lang.Double.doubleToRawLongBits(straightLineDistanceMeters_) != 0) { + output.writeDouble(4, straightLineDistanceMeters_); + } + if (java.lang.Double.doubleToRawLongBits(travelDistanceMeters_) != 0) { + output.writeDouble(5, travelDistanceMeters_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (landmarkCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.maps.geocode.v4.PlaceView) landmark_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRelationalDescription()); + } + { + int dataSize = 0; + for (int i = 0; i < tags_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(tags_.getInt(i)); + } + size += dataSize; + if (!getTagsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + tagsMemoizedSerializedSize = dataSize; + } + if (java.lang.Double.doubleToRawLongBits(straightLineDistanceMeters_) != 0) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize(4, straightLineDistanceMeters_); + } + if (java.lang.Double.doubleToRawLongBits(travelDistanceMeters_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(5, travelDistanceMeters_); + } + 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.geocode.v4.Landmark)) { + return super.equals(obj); + } + com.google.maps.geocode.v4.Landmark other = (com.google.maps.geocode.v4.Landmark) obj; + + if (hasRelationalDescription() != other.hasRelationalDescription()) return false; + if (hasRelationalDescription()) { + if (!getRelationalDescription().equals(other.getRelationalDescription())) return false; + } + if (!tags_.equals(other.tags_)) return false; + if (java.lang.Double.doubleToLongBits(getStraightLineDistanceMeters()) + != java.lang.Double.doubleToLongBits(other.getStraightLineDistanceMeters())) return false; + if (java.lang.Double.doubleToLongBits(getTravelDistanceMeters()) + != java.lang.Double.doubleToLongBits(other.getTravelDistanceMeters())) return false; + if (!getLandmarkCase().equals(other.getLandmarkCase())) return false; + switch (landmarkCase_) { + 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(); + if (hasRelationalDescription()) { + hash = (37 * hash) + RELATIONAL_DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getRelationalDescription().hashCode(); + } + if (getTagsCount() > 0) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + tags_.hashCode(); + } + hash = (37 * hash) + STRAIGHT_LINE_DISTANCE_METERS_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getStraightLineDistanceMeters())); + hash = (37 * hash) + TRAVEL_DISTANCE_METERS_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getTravelDistanceMeters())); + switch (landmarkCase_) { + 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.geocode.v4.Landmark parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.Landmark 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.geocode.v4.Landmark parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.Landmark 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.geocode.v4.Landmark parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.Landmark parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.geocode.v4.Landmark parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.Landmark parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.Landmark parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.Landmark parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.Landmark parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.Landmark parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geocode.v4.Landmark 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Landmarks are used to communicate where the destination is or help with
+   * arriving at the destination.
+   * 
+ * + * Protobuf type {@code google.maps.geocode.v4.Landmark} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.geocode.v4.Landmark) + com.google.maps.geocode.v4.LandmarkOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_Landmark_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_Landmark_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.Landmark.class, + com.google.maps.geocode.v4.Landmark.Builder.class); + } + + // Construct using com.google.maps.geocode.v4.Landmark.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetRelationalDescriptionFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (placeBuilder_ != null) { + placeBuilder_.clear(); + } + relationalDescription_ = null; + if (relationalDescriptionBuilder_ != null) { + relationalDescriptionBuilder_.dispose(); + relationalDescriptionBuilder_ = null; + } + tags_ = emptyIntList(); + straightLineDistanceMeters_ = 0D; + travelDistanceMeters_ = 0D; + landmarkCase_ = 0; + landmark_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_Landmark_descriptor; + } + + @java.lang.Override + public com.google.maps.geocode.v4.Landmark getDefaultInstanceForType() { + return com.google.maps.geocode.v4.Landmark.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.geocode.v4.Landmark build() { + com.google.maps.geocode.v4.Landmark result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.geocode.v4.Landmark buildPartial() { + com.google.maps.geocode.v4.Landmark result = new com.google.maps.geocode.v4.Landmark(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.geocode.v4.Landmark result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.relationalDescription_ = + relationalDescriptionBuilder_ == null + ? relationalDescription_ + : relationalDescriptionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + tags_.makeImmutable(); + result.tags_ = tags_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.straightLineDistanceMeters_ = straightLineDistanceMeters_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.travelDistanceMeters_ = travelDistanceMeters_; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.maps.geocode.v4.Landmark result) { + result.landmarkCase_ = landmarkCase_; + result.landmark_ = this.landmark_; + if (landmarkCase_ == 1 && placeBuilder_ != null) { + result.landmark_ = placeBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.geocode.v4.Landmark) { + return mergeFrom((com.google.maps.geocode.v4.Landmark) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.geocode.v4.Landmark other) { + if (other == com.google.maps.geocode.v4.Landmark.getDefaultInstance()) return this; + if (other.hasRelationalDescription()) { + mergeRelationalDescription(other.getRelationalDescription()); + } + if (!other.tags_.isEmpty()) { + if (tags_.isEmpty()) { + tags_ = other.tags_; + tags_.makeImmutable(); + bitField0_ |= 0x00000004; + } else { + ensureTagsIsMutable(); + tags_.addAll(other.tags_); + } + onChanged(); + } + if (java.lang.Double.doubleToRawLongBits(other.getStraightLineDistanceMeters()) != 0) { + setStraightLineDistanceMeters(other.getStraightLineDistanceMeters()); + } + if (java.lang.Double.doubleToRawLongBits(other.getTravelDistanceMeters()) != 0) { + setTravelDistanceMeters(other.getTravelDistanceMeters()); + } + switch (other.getLandmarkCase()) { + case PLACE: + { + mergePlace(other.getPlace()); + break; + } + case LANDMARK_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(internalGetPlaceFieldBuilder().getBuilder(), extensionRegistry); + landmarkCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetRelationalDescriptionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + int tmpRaw = input.readEnum(); + ensureTagsIsMutable(); + tags_.addInt(tmpRaw); + break; + } // case 24 + case 26: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureTagsIsMutable(); + while (input.getBytesUntilLimit() > 0) { + tags_.addInt(input.readEnum()); + } + input.popLimit(limit); + break; + } // case 26 + case 33: + { + straightLineDistanceMeters_ = input.readDouble(); + bitField0_ |= 0x00000008; + break; + } // case 33 + case 41: + { + travelDistanceMeters_ = input.readDouble(); + bitField0_ |= 0x00000010; + break; + } // case 41 + 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 landmarkCase_ = 0; + private java.lang.Object landmark_; + + public LandmarkCase getLandmarkCase() { + return LandmarkCase.forNumber(landmarkCase_); + } + + public Builder clearLandmark() { + landmarkCase_ = 0; + landmark_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.maps.geocode.v4.PlaceView, + com.google.maps.geocode.v4.PlaceView.Builder, + com.google.maps.geocode.v4.PlaceViewOrBuilder> + placeBuilder_; + + /** + * + * + *
+     * The place that represents this landmark.
+     * 
+ * + * .google.maps.geocode.v4.PlaceView place = 1; + * + * @return Whether the place field is set. + */ + @java.lang.Override + public boolean hasPlace() { + return landmarkCase_ == 1; + } + + /** + * + * + *
+     * The place that represents this landmark.
+     * 
+ * + * .google.maps.geocode.v4.PlaceView place = 1; + * + * @return The place. + */ + @java.lang.Override + public com.google.maps.geocode.v4.PlaceView getPlace() { + if (placeBuilder_ == null) { + if (landmarkCase_ == 1) { + return (com.google.maps.geocode.v4.PlaceView) landmark_; + } + return com.google.maps.geocode.v4.PlaceView.getDefaultInstance(); + } else { + if (landmarkCase_ == 1) { + return placeBuilder_.getMessage(); + } + return com.google.maps.geocode.v4.PlaceView.getDefaultInstance(); + } + } + + /** + * + * + *
+     * The place that represents this landmark.
+     * 
+ * + * .google.maps.geocode.v4.PlaceView place = 1; + */ + public Builder setPlace(com.google.maps.geocode.v4.PlaceView value) { + if (placeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + landmark_ = value; + onChanged(); + } else { + placeBuilder_.setMessage(value); + } + landmarkCase_ = 1; + return this; + } + + /** + * + * + *
+     * The place that represents this landmark.
+     * 
+ * + * .google.maps.geocode.v4.PlaceView place = 1; + */ + public Builder setPlace(com.google.maps.geocode.v4.PlaceView.Builder builderForValue) { + if (placeBuilder_ == null) { + landmark_ = builderForValue.build(); + onChanged(); + } else { + placeBuilder_.setMessage(builderForValue.build()); + } + landmarkCase_ = 1; + return this; + } + + /** + * + * + *
+     * The place that represents this landmark.
+     * 
+ * + * .google.maps.geocode.v4.PlaceView place = 1; + */ + public Builder mergePlace(com.google.maps.geocode.v4.PlaceView value) { + if (placeBuilder_ == null) { + if (landmarkCase_ == 1 + && landmark_ != com.google.maps.geocode.v4.PlaceView.getDefaultInstance()) { + landmark_ = + com.google.maps.geocode.v4.PlaceView.newBuilder( + (com.google.maps.geocode.v4.PlaceView) landmark_) + .mergeFrom(value) + .buildPartial(); + } else { + landmark_ = value; + } + onChanged(); + } else { + if (landmarkCase_ == 1) { + placeBuilder_.mergeFrom(value); + } else { + placeBuilder_.setMessage(value); + } + } + landmarkCase_ = 1; + return this; + } + + /** + * + * + *
+     * The place that represents this landmark.
+     * 
+ * + * .google.maps.geocode.v4.PlaceView place = 1; + */ + public Builder clearPlace() { + if (placeBuilder_ == null) { + if (landmarkCase_ == 1) { + landmarkCase_ = 0; + landmark_ = null; + onChanged(); + } + } else { + if (landmarkCase_ == 1) { + landmarkCase_ = 0; + landmark_ = null; + } + placeBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The place that represents this landmark.
+     * 
+ * + * .google.maps.geocode.v4.PlaceView place = 1; + */ + public com.google.maps.geocode.v4.PlaceView.Builder getPlaceBuilder() { + return internalGetPlaceFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The place that represents this landmark.
+     * 
+ * + * .google.maps.geocode.v4.PlaceView place = 1; + */ + @java.lang.Override + public com.google.maps.geocode.v4.PlaceViewOrBuilder getPlaceOrBuilder() { + if ((landmarkCase_ == 1) && (placeBuilder_ != null)) { + return placeBuilder_.getMessageOrBuilder(); + } else { + if (landmarkCase_ == 1) { + return (com.google.maps.geocode.v4.PlaceView) landmark_; + } + return com.google.maps.geocode.v4.PlaceView.getDefaultInstance(); + } + } + + /** + * + * + *
+     * The place that represents this landmark.
+     * 
+ * + * .google.maps.geocode.v4.PlaceView place = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.maps.geocode.v4.PlaceView, + com.google.maps.geocode.v4.PlaceView.Builder, + com.google.maps.geocode.v4.PlaceViewOrBuilder> + internalGetPlaceFieldBuilder() { + if (placeBuilder_ == null) { + if (!(landmarkCase_ == 1)) { + landmark_ = com.google.maps.geocode.v4.PlaceView.getDefaultInstance(); + } + placeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.maps.geocode.v4.PlaceView, + com.google.maps.geocode.v4.PlaceView.Builder, + com.google.maps.geocode.v4.PlaceViewOrBuilder>( + (com.google.maps.geocode.v4.PlaceView) landmark_, + getParentForChildren(), + isClean()); + landmark_ = null; + } + landmarkCase_ = 1; + onChanged(); + return placeBuilder_; + } + + private com.google.type.LocalizedText relationalDescription_; + private com.google.protobuf.SingleFieldBuilder< + com.google.type.LocalizedText, + com.google.type.LocalizedText.Builder, + com.google.type.LocalizedTextOrBuilder> + relationalDescriptionBuilder_; + + /** + * + * + *
+     * A human-readable description of how the destination relates to the
+     * landmark. For example: "Near the Empire State Building" or "Across from
+     * the White House".
+     * 
+ * + * .google.type.LocalizedText relational_description = 2; + * + * @return Whether the relationalDescription field is set. + */ + public boolean hasRelationalDescription() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * A human-readable description of how the destination relates to the
+     * landmark. For example: "Near the Empire State Building" or "Across from
+     * the White House".
+     * 
+ * + * .google.type.LocalizedText relational_description = 2; + * + * @return The relationalDescription. + */ + public com.google.type.LocalizedText getRelationalDescription() { + if (relationalDescriptionBuilder_ == null) { + return relationalDescription_ == null + ? com.google.type.LocalizedText.getDefaultInstance() + : relationalDescription_; + } else { + return relationalDescriptionBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * A human-readable description of how the destination relates to the
+     * landmark. For example: "Near the Empire State Building" or "Across from
+     * the White House".
+     * 
+ * + * .google.type.LocalizedText relational_description = 2; + */ + public Builder setRelationalDescription(com.google.type.LocalizedText value) { + if (relationalDescriptionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + relationalDescription_ = value; + } else { + relationalDescriptionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A human-readable description of how the destination relates to the
+     * landmark. For example: "Near the Empire State Building" or "Across from
+     * the White House".
+     * 
+ * + * .google.type.LocalizedText relational_description = 2; + */ + public Builder setRelationalDescription(com.google.type.LocalizedText.Builder builderForValue) { + if (relationalDescriptionBuilder_ == null) { + relationalDescription_ = builderForValue.build(); + } else { + relationalDescriptionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A human-readable description of how the destination relates to the
+     * landmark. For example: "Near the Empire State Building" or "Across from
+     * the White House".
+     * 
+ * + * .google.type.LocalizedText relational_description = 2; + */ + public Builder mergeRelationalDescription(com.google.type.LocalizedText value) { + if (relationalDescriptionBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && relationalDescription_ != null + && relationalDescription_ != com.google.type.LocalizedText.getDefaultInstance()) { + getRelationalDescriptionBuilder().mergeFrom(value); + } else { + relationalDescription_ = value; + } + } else { + relationalDescriptionBuilder_.mergeFrom(value); + } + if (relationalDescription_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * A human-readable description of how the destination relates to the
+     * landmark. For example: "Near the Empire State Building" or "Across from
+     * the White House".
+     * 
+ * + * .google.type.LocalizedText relational_description = 2; + */ + public Builder clearRelationalDescription() { + bitField0_ = (bitField0_ & ~0x00000002); + relationalDescription_ = null; + if (relationalDescriptionBuilder_ != null) { + relationalDescriptionBuilder_.dispose(); + relationalDescriptionBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * A human-readable description of how the destination relates to the
+     * landmark. For example: "Near the Empire State Building" or "Across from
+     * the White House".
+     * 
+ * + * .google.type.LocalizedText relational_description = 2; + */ + public com.google.type.LocalizedText.Builder getRelationalDescriptionBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetRelationalDescriptionFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * A human-readable description of how the destination relates to the
+     * landmark. For example: "Near the Empire State Building" or "Across from
+     * the White House".
+     * 
+ * + * .google.type.LocalizedText relational_description = 2; + */ + public com.google.type.LocalizedTextOrBuilder getRelationalDescriptionOrBuilder() { + if (relationalDescriptionBuilder_ != null) { + return relationalDescriptionBuilder_.getMessageOrBuilder(); + } else { + return relationalDescription_ == null + ? com.google.type.LocalizedText.getDefaultInstance() + : relationalDescription_; + } + } + + /** + * + * + *
+     * A human-readable description of how the destination relates to the
+     * landmark. For example: "Near the Empire State Building" or "Across from
+     * the White House".
+     * 
+ * + * .google.type.LocalizedText relational_description = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.LocalizedText, + com.google.type.LocalizedText.Builder, + com.google.type.LocalizedTextOrBuilder> + internalGetRelationalDescriptionFieldBuilder() { + if (relationalDescriptionBuilder_ == null) { + relationalDescriptionBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.LocalizedText, + com.google.type.LocalizedText.Builder, + com.google.type.LocalizedTextOrBuilder>( + getRelationalDescription(), getParentForChildren(), isClean()); + relationalDescription_ = null; + } + return relationalDescriptionBuilder_; + } + + private com.google.protobuf.Internal.IntList tags_ = emptyIntList(); + + private void ensureTagsIsMutable() { + if (!tags_.isModifiable()) { + tags_ = makeMutableCopy(tags_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+     * Tags that describe how the landmark can be used in the context of the
+     * destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.Landmark.Tag tags = 3; + * + * @return A list containing the tags. + */ + public java.util.List getTagsList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.maps.geocode.v4.Landmark.Tag>(tags_, tags_converter_); + } + + /** + * + * + *
+     * Tags that describe how the landmark can be used in the context of the
+     * destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.Landmark.Tag tags = 3; + * + * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + + /** + * + * + *
+     * Tags that describe how the landmark can be used in the context of the
+     * destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.Landmark.Tag tags = 3; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + public com.google.maps.geocode.v4.Landmark.Tag getTags(int index) { + return tags_converter_.convert(tags_.getInt(index)); + } + + /** + * + * + *
+     * Tags that describe how the landmark can be used in the context of the
+     * destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.Landmark.Tag tags = 3; + * + * @param index The index to set the value at. + * @param value The tags to set. + * @return This builder for chaining. + */ + public Builder setTags(int index, com.google.maps.geocode.v4.Landmark.Tag value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.setInt(index, value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
+     * Tags that describe how the landmark can be used in the context of the
+     * destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.Landmark.Tag tags = 3; + * + * @param value The tags to add. + * @return This builder for chaining. + */ + public Builder addTags(com.google.maps.geocode.v4.Landmark.Tag value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.addInt(value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
+     * Tags that describe how the landmark can be used in the context of the
+     * destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.Landmark.Tag tags = 3; + * + * @param values The tags to add. + * @return This builder for chaining. + */ + public Builder addAllTags( + java.lang.Iterable values) { + ensureTagsIsMutable(); + for (com.google.maps.geocode.v4.Landmark.Tag value : values) { + tags_.addInt(value.getNumber()); + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Tags that describe how the landmark can be used in the context of the
+     * destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.Landmark.Tag tags = 3; + * + * @return This builder for chaining. + */ + public Builder clearTags() { + tags_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Tags that describe how the landmark can be used in the context of the
+     * destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.Landmark.Tag tags = 3; + * + * @return A list containing the enum numeric values on the wire for tags. + */ + public java.util.List getTagsValueList() { + tags_.makeImmutable(); + return tags_; + } + + /** + * + * + *
+     * Tags that describe how the landmark can be used in the context of the
+     * destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.Landmark.Tag tags = 3; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of tags at the given index. + */ + public int getTagsValue(int index) { + return tags_.getInt(index); + } + + /** + * + * + *
+     * Tags that describe how the landmark can be used in the context of the
+     * destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.Landmark.Tag tags = 3; + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for tags to set. + * @return This builder for chaining. + */ + public Builder setTagsValue(int index, int value) { + ensureTagsIsMutable(); + tags_.setInt(index, value); + onChanged(); + return this; + } + + /** + * + * + *
+     * Tags that describe how the landmark can be used in the context of the
+     * destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.Landmark.Tag tags = 3; + * + * @param value The enum numeric value on the wire for tags to add. + * @return This builder for chaining. + */ + public Builder addTagsValue(int value) { + ensureTagsIsMutable(); + tags_.addInt(value); + onChanged(); + return this; + } + + /** + * + * + *
+     * Tags that describe how the landmark can be used in the context of the
+     * destination.
+     * 
+ * + * repeated .google.maps.geocode.v4.Landmark.Tag tags = 3; + * + * @param values The enum numeric values on the wire for tags to add. + * @return This builder for chaining. + */ + public Builder addAllTagsValue(java.lang.Iterable values) { + ensureTagsIsMutable(); + for (int value : values) { + tags_.addInt(value); + } + onChanged(); + return this; + } + + private double straightLineDistanceMeters_; + + /** + * + * + *
+     * Output only. The straight-line distance from this landmark to the
+     * destination in meters.
+     * 
+ * + * double straight_line_distance_meters = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The straightLineDistanceMeters. + */ + @java.lang.Override + public double getStraightLineDistanceMeters() { + return straightLineDistanceMeters_; + } + + /** + * + * + *
+     * Output only. The straight-line distance from this landmark to the
+     * destination in meters.
+     * 
+ * + * double straight_line_distance_meters = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The straightLineDistanceMeters to set. + * @return This builder for chaining. + */ + public Builder setStraightLineDistanceMeters(double value) { + + straightLineDistanceMeters_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The straight-line distance from this landmark to the
+     * destination in meters.
+     * 
+ * + * double straight_line_distance_meters = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearStraightLineDistanceMeters() { + bitField0_ = (bitField0_ & ~0x00000008); + straightLineDistanceMeters_ = 0D; + onChanged(); + return this; + } + + private double travelDistanceMeters_; + + /** + * + * + *
+     * Output only. The road-network distance from this landmark to the
+     * destination in meters.
+     * 
+ * + * double travel_distance_meters = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The travelDistanceMeters. + */ + @java.lang.Override + public double getTravelDistanceMeters() { + return travelDistanceMeters_; + } + + /** + * + * + *
+     * Output only. The road-network distance from this landmark to the
+     * destination in meters.
+     * 
+ * + * double travel_distance_meters = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The travelDistanceMeters to set. + * @return This builder for chaining. + */ + public Builder setTravelDistanceMeters(double value) { + + travelDistanceMeters_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The road-network distance from this landmark to the
+     * destination in meters.
+     * 
+ * + * double travel_distance_meters = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTravelDistanceMeters() { + bitField0_ = (bitField0_ & ~0x00000010); + travelDistanceMeters_ = 0D; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.maps.geocode.v4.Landmark) + } + + // @@protoc_insertion_point(class_scope:google.maps.geocode.v4.Landmark) + private static final com.google.maps.geocode.v4.Landmark DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.geocode.v4.Landmark(); + } + + public static com.google.maps.geocode.v4.Landmark getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Landmark 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.geocode.v4.Landmark getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/LandmarkOrBuilder.java b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/LandmarkOrBuilder.java new file mode 100644 index 000000000000..611bcd129293 --- /dev/null +++ b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/LandmarkOrBuilder.java @@ -0,0 +1,211 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/maps/geocode/v4/destination_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.geocode.v4; + +@com.google.protobuf.Generated +public interface LandmarkOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.geocode.v4.Landmark) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The place that represents this landmark.
+   * 
+ * + * .google.maps.geocode.v4.PlaceView place = 1; + * + * @return Whether the place field is set. + */ + boolean hasPlace(); + + /** + * + * + *
+   * The place that represents this landmark.
+   * 
+ * + * .google.maps.geocode.v4.PlaceView place = 1; + * + * @return The place. + */ + com.google.maps.geocode.v4.PlaceView getPlace(); + + /** + * + * + *
+   * The place that represents this landmark.
+   * 
+ * + * .google.maps.geocode.v4.PlaceView place = 1; + */ + com.google.maps.geocode.v4.PlaceViewOrBuilder getPlaceOrBuilder(); + + /** + * + * + *
+   * A human-readable description of how the destination relates to the
+   * landmark. For example: "Near the Empire State Building" or "Across from
+   * the White House".
+   * 
+ * + * .google.type.LocalizedText relational_description = 2; + * + * @return Whether the relationalDescription field is set. + */ + boolean hasRelationalDescription(); + + /** + * + * + *
+   * A human-readable description of how the destination relates to the
+   * landmark. For example: "Near the Empire State Building" or "Across from
+   * the White House".
+   * 
+ * + * .google.type.LocalizedText relational_description = 2; + * + * @return The relationalDescription. + */ + com.google.type.LocalizedText getRelationalDescription(); + + /** + * + * + *
+   * A human-readable description of how the destination relates to the
+   * landmark. For example: "Near the Empire State Building" or "Across from
+   * the White House".
+   * 
+ * + * .google.type.LocalizedText relational_description = 2; + */ + com.google.type.LocalizedTextOrBuilder getRelationalDescriptionOrBuilder(); + + /** + * + * + *
+   * Tags that describe how the landmark can be used in the context of the
+   * destination.
+   * 
+ * + * repeated .google.maps.geocode.v4.Landmark.Tag tags = 3; + * + * @return A list containing the tags. + */ + java.util.List getTagsList(); + + /** + * + * + *
+   * Tags that describe how the landmark can be used in the context of the
+   * destination.
+   * 
+ * + * repeated .google.maps.geocode.v4.Landmark.Tag tags = 3; + * + * @return The count of tags. + */ + int getTagsCount(); + + /** + * + * + *
+   * Tags that describe how the landmark can be used in the context of the
+   * destination.
+   * 
+ * + * repeated .google.maps.geocode.v4.Landmark.Tag tags = 3; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + com.google.maps.geocode.v4.Landmark.Tag getTags(int index); + + /** + * + * + *
+   * Tags that describe how the landmark can be used in the context of the
+   * destination.
+   * 
+ * + * repeated .google.maps.geocode.v4.Landmark.Tag tags = 3; + * + * @return A list containing the enum numeric values on the wire for tags. + */ + java.util.List getTagsValueList(); + + /** + * + * + *
+   * Tags that describe how the landmark can be used in the context of the
+   * destination.
+   * 
+ * + * repeated .google.maps.geocode.v4.Landmark.Tag tags = 3; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of tags at the given index. + */ + int getTagsValue(int index); + + /** + * + * + *
+   * Output only. The straight-line distance from this landmark to the
+   * destination in meters.
+   * 
+ * + * double straight_line_distance_meters = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The straightLineDistanceMeters. + */ + double getStraightLineDistanceMeters(); + + /** + * + * + *
+   * Output only. The road-network distance from this landmark to the
+   * destination in meters.
+   * 
+ * + * double travel_distance_meters = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The travelDistanceMeters. + */ + double getTravelDistanceMeters(); + + com.google.maps.geocode.v4.Landmark.LandmarkCase getLandmarkCase(); +} diff --git a/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/NavigationPoint.java b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/NavigationPoint.java new file mode 100644 index 000000000000..41ffefeb5194 --- /dev/null +++ b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/NavigationPoint.java @@ -0,0 +1,2411 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/maps/geocode/v4/destination_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.geocode.v4; + +/** + * + * + *
+ * A navigation point is a location next to a road where navigation can end.
+ * 
+ * + * Protobuf type {@code google.maps.geocode.v4.NavigationPoint} + */ +@com.google.protobuf.Generated +public final class NavigationPoint extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.maps.geocode.v4.NavigationPoint) + NavigationPointOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "NavigationPoint"); + } + + // Use NavigationPoint.newBuilder() to construct. + private NavigationPoint(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private NavigationPoint() { + navigationPointToken_ = ""; + travelModes_ = emptyIntList(); + usages_ = emptyIntList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_NavigationPoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_NavigationPoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.NavigationPoint.class, + com.google.maps.geocode.v4.NavigationPoint.Builder.class); + } + + /** + * + * + *
+   * Travel modes that are appropriate for this navigation point.
+   * 
+ * + * Protobuf enum {@code google.maps.geocode.v4.NavigationPoint.TravelMode} + */ + public enum TravelMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not used.
+     * 
+ * + * TRAVEL_MODE_UNSPECIFIED = 0; + */ + TRAVEL_MODE_UNSPECIFIED(0), + /** + * + * + *
+     * Suitable for driving.
+     * 
+ * + * DRIVE = 1; + */ + DRIVE(1), + /** + * + * + *
+     * Suitable for walking.
+     * 
+ * + * WALK = 2; + */ + WALK(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TravelMode"); + } + + /** + * + * + *
+     * Not used.
+     * 
+ * + * TRAVEL_MODE_UNSPECIFIED = 0; + */ + public static final int TRAVEL_MODE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Suitable for driving.
+     * 
+ * + * DRIVE = 1; + */ + public static final int DRIVE_VALUE = 1; + + /** + * + * + *
+     * Suitable for walking.
+     * 
+ * + * WALK = 2; + */ + public static final int WALK_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 TravelMode 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 TravelMode forNumber(int value) { + switch (value) { + case 0: + return TRAVEL_MODE_UNSPECIFIED; + case 1: + return DRIVE; + case 2: + return WALK; + 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 TravelMode findValueByNumber(int number) { + return TravelMode.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.maps.geocode.v4.NavigationPoint.getDescriptor().getEnumTypes().get(0); + } + + private static final TravelMode[] VALUES = values(); + + public static TravelMode 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 TravelMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.maps.geocode.v4.NavigationPoint.TravelMode) + } + + /** + * + * + *
+   * Usages supported by this navigation point.
+   * New values may be added in the future.
+   * 
+ * + * Protobuf enum {@code google.maps.geocode.v4.NavigationPoint.Usage} + */ + public enum Usage implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not used.
+     * 
+ * + * USAGE_UNSPECIFIED = 0; + */ + USAGE_UNSPECIFIED(0), + /** + * + * + *
+     * Indicates that the usage type is unknown.
+     * 
+ * + * UNKNOWN = 1; + */ + UNKNOWN(1), + /** + * + * + *
+     * Suitable for dropping off a passenger. For example, a rideshare drop off
+     * location.
+     * 
+ * + * DROPOFF = 2; + */ + DROPOFF(2), + /** + * + * + *
+     * Suitable for picking up a passenger. For example, a rideshare pick up
+     * location.
+     * 
+ * + * PICKUP = 3; + */ + PICKUP(3), + /** + * + * + *
+     * Suitable for parking. For example, within a parking lot.
+     * 
+ * + * PARKING = 4; + */ + PARKING(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Usage"); + } + + /** + * + * + *
+     * Not used.
+     * 
+ * + * USAGE_UNSPECIFIED = 0; + */ + public static final int USAGE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Indicates that the usage type is unknown.
+     * 
+ * + * UNKNOWN = 1; + */ + public static final int UNKNOWN_VALUE = 1; + + /** + * + * + *
+     * Suitable for dropping off a passenger. For example, a rideshare drop off
+     * location.
+     * 
+ * + * DROPOFF = 2; + */ + public static final int DROPOFF_VALUE = 2; + + /** + * + * + *
+     * Suitable for picking up a passenger. For example, a rideshare pick up
+     * location.
+     * 
+ * + * PICKUP = 3; + */ + public static final int PICKUP_VALUE = 3; + + /** + * + * + *
+     * Suitable for parking. For example, within a parking lot.
+     * 
+ * + * PARKING = 4; + */ + public static final int PARKING_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 Usage 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 Usage forNumber(int value) { + switch (value) { + case 0: + return USAGE_UNSPECIFIED; + case 1: + return UNKNOWN; + case 2: + return DROPOFF; + case 3: + return PICKUP; + case 4: + return PARKING; + 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 Usage findValueByNumber(int number) { + return Usage.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.maps.geocode.v4.NavigationPoint.getDescriptor().getEnumTypes().get(1); + } + + private static final Usage[] VALUES = values(); + + public static Usage 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 Usage(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.maps.geocode.v4.NavigationPoint.Usage) + } + + private int bitField0_; + public static final int NAVIGATION_POINT_TOKEN_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object navigationPointToken_ = ""; + + /** + * + * + *
+   * Output only. A token that can be used to identify this navigation point.
+   * 
+ * + * string navigation_point_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The navigationPointToken. + */ + @java.lang.Override + public java.lang.String getNavigationPointToken() { + java.lang.Object ref = navigationPointToken_; + 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(); + navigationPointToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. A token that can be used to identify this navigation point.
+   * 
+ * + * string navigation_point_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for navigationPointToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNavigationPointTokenBytes() { + java.lang.Object ref = navigationPointToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + navigationPointToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private com.google.type.LocalizedText displayName_; + + /** + * + * + *
+   * The display name of this navigation point. For example, "5th Ave" or "Gate
+   * B".
+   * 
+ * + * .google.type.LocalizedText display_name = 2; + * + * @return Whether the displayName field is set. + */ + @java.lang.Override + public boolean hasDisplayName() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * The display name of this navigation point. For example, "5th Ave" or "Gate
+   * B".
+   * 
+ * + * .google.type.LocalizedText display_name = 2; + * + * @return The displayName. + */ + @java.lang.Override + public com.google.type.LocalizedText getDisplayName() { + return displayName_ == null ? com.google.type.LocalizedText.getDefaultInstance() : displayName_; + } + + /** + * + * + *
+   * The display name of this navigation point. For example, "5th Ave" or "Gate
+   * B".
+   * 
+ * + * .google.type.LocalizedText display_name = 2; + */ + @java.lang.Override + public com.google.type.LocalizedTextOrBuilder getDisplayNameOrBuilder() { + return displayName_ == null ? com.google.type.LocalizedText.getDefaultInstance() : displayName_; + } + + public static final int LOCATION_FIELD_NUMBER = 3; + private com.google.type.LatLng location_; + + /** + * + * + *
+   * A point next to the road segment where navigation should end. The point is
+   * intentionally slightly offset from the road's centerline to clearly mark
+   * the side of the road where the place is located.
+   * 
+ * + * .google.type.LatLng location = 3; + * + * @return Whether the location field is set. + */ + @java.lang.Override + public boolean hasLocation() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * A point next to the road segment where navigation should end. The point is
+   * intentionally slightly offset from the road's centerline to clearly mark
+   * the side of the road where the place is located.
+   * 
+ * + * .google.type.LatLng location = 3; + * + * @return The location. + */ + @java.lang.Override + public com.google.type.LatLng getLocation() { + return location_ == null ? com.google.type.LatLng.getDefaultInstance() : location_; + } + + /** + * + * + *
+   * A point next to the road segment where navigation should end. The point is
+   * intentionally slightly offset from the road's centerline to clearly mark
+   * the side of the road where the place is located.
+   * 
+ * + * .google.type.LatLng location = 3; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getLocationOrBuilder() { + return location_ == null ? com.google.type.LatLng.getDefaultInstance() : location_; + } + + public static final int TRAVEL_MODES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList travelModes_ = emptyIntList(); + + private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.maps.geocode.v4.NavigationPoint.TravelMode> + travelModes_converter_ = + new com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.maps.geocode.v4.NavigationPoint.TravelMode>() { + public com.google.maps.geocode.v4.NavigationPoint.TravelMode convert(int from) { + com.google.maps.geocode.v4.NavigationPoint.TravelMode result = + com.google.maps.geocode.v4.NavigationPoint.TravelMode.forNumber(from); + return result == null + ? com.google.maps.geocode.v4.NavigationPoint.TravelMode.UNRECOGNIZED + : result; + } + }; + + /** + * + * + *
+   * Travel modes that are appropriate for this navigation point.
+   * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 4; + * + * @return A list containing the travelModes. + */ + @java.lang.Override + public java.util.List + getTravelModesList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.maps.geocode.v4.NavigationPoint.TravelMode>( + travelModes_, travelModes_converter_); + } + + /** + * + * + *
+   * Travel modes that are appropriate for this navigation point.
+   * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 4; + * + * @return The count of travelModes. + */ + @java.lang.Override + public int getTravelModesCount() { + return travelModes_.size(); + } + + /** + * + * + *
+   * Travel modes that are appropriate for this navigation point.
+   * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 4; + * + * @param index The index of the element to return. + * @return The travelModes at the given index. + */ + @java.lang.Override + public com.google.maps.geocode.v4.NavigationPoint.TravelMode getTravelModes(int index) { + return travelModes_converter_.convert(travelModes_.getInt(index)); + } + + /** + * + * + *
+   * Travel modes that are appropriate for this navigation point.
+   * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 4; + * + * @return A list containing the enum numeric values on the wire for travelModes. + */ + @java.lang.Override + public java.util.List getTravelModesValueList() { + return travelModes_; + } + + /** + * + * + *
+   * Travel modes that are appropriate for this navigation point.
+   * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 4; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of travelModes at the given index. + */ + @java.lang.Override + public int getTravelModesValue(int index) { + return travelModes_.getInt(index); + } + + private int travelModesMemoizedSerializedSize; + + public static final int USAGES_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList usages_ = emptyIntList(); + + private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.maps.geocode.v4.NavigationPoint.Usage> + usages_converter_ = + new com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.maps.geocode.v4.NavigationPoint.Usage>() { + public com.google.maps.geocode.v4.NavigationPoint.Usage convert(int from) { + com.google.maps.geocode.v4.NavigationPoint.Usage result = + com.google.maps.geocode.v4.NavigationPoint.Usage.forNumber(from); + return result == null + ? com.google.maps.geocode.v4.NavigationPoint.Usage.UNRECOGNIZED + : result; + } + }; + + /** + * + * + *
+   * Lists `usages` supported by this navigation point. If empty, it does not
+   * necessarily mean its usage is restricted in any way. All navigation
+   * points can be used for general navigation.
+   * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.Usage usages = 5; + * + * @return A list containing the usages. + */ + @java.lang.Override + public java.util.List getUsagesList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.maps.geocode.v4.NavigationPoint.Usage>(usages_, usages_converter_); + } + + /** + * + * + *
+   * Lists `usages` supported by this navigation point. If empty, it does not
+   * necessarily mean its usage is restricted in any way. All navigation
+   * points can be used for general navigation.
+   * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.Usage usages = 5; + * + * @return The count of usages. + */ + @java.lang.Override + public int getUsagesCount() { + return usages_.size(); + } + + /** + * + * + *
+   * Lists `usages` supported by this navigation point. If empty, it does not
+   * necessarily mean its usage is restricted in any way. All navigation
+   * points can be used for general navigation.
+   * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.Usage usages = 5; + * + * @param index The index of the element to return. + * @return The usages at the given index. + */ + @java.lang.Override + public com.google.maps.geocode.v4.NavigationPoint.Usage getUsages(int index) { + return usages_converter_.convert(usages_.getInt(index)); + } + + /** + * + * + *
+   * Lists `usages` supported by this navigation point. If empty, it does not
+   * necessarily mean its usage is restricted in any way. All navigation
+   * points can be used for general navigation.
+   * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.Usage usages = 5; + * + * @return A list containing the enum numeric values on the wire for usages. + */ + @java.lang.Override + public java.util.List getUsagesValueList() { + return usages_; + } + + /** + * + * + *
+   * Lists `usages` supported by this navigation point. If empty, it does not
+   * necessarily mean its usage is restricted in any way. All navigation
+   * points can be used for general navigation.
+   * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.Usage usages = 5; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of usages at the given index. + */ + @java.lang.Override + public int getUsagesValue(int index) { + return usages_.getInt(index); + } + + private int usagesMemoizedSerializedSize; + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(navigationPointToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, navigationPointToken_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getDisplayName()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getLocation()); + } + if (getTravelModesList().size() > 0) { + output.writeUInt32NoTag(34); + output.writeUInt32NoTag(travelModesMemoizedSerializedSize); + } + for (int i = 0; i < travelModes_.size(); i++) { + output.writeEnumNoTag(travelModes_.getInt(i)); + } + if (getUsagesList().size() > 0) { + output.writeUInt32NoTag(42); + output.writeUInt32NoTag(usagesMemoizedSerializedSize); + } + for (int i = 0; i < usages_.size(); i++) { + output.writeEnumNoTag(usages_.getInt(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(navigationPointToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, navigationPointToken_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDisplayName()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getLocation()); + } + { + int dataSize = 0; + for (int i = 0; i < travelModes_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(travelModes_.getInt(i)); + } + size += dataSize; + if (!getTravelModesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + travelModesMemoizedSerializedSize = dataSize; + } + { + int dataSize = 0; + for (int i = 0; i < usages_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(usages_.getInt(i)); + } + size += dataSize; + if (!getUsagesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + usagesMemoizedSerializedSize = dataSize; + } + 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.geocode.v4.NavigationPoint)) { + return super.equals(obj); + } + com.google.maps.geocode.v4.NavigationPoint other = + (com.google.maps.geocode.v4.NavigationPoint) obj; + + if (!getNavigationPointToken().equals(other.getNavigationPointToken())) return false; + if (hasDisplayName() != other.hasDisplayName()) return false; + if (hasDisplayName()) { + if (!getDisplayName().equals(other.getDisplayName())) return false; + } + if (hasLocation() != other.hasLocation()) return false; + if (hasLocation()) { + if (!getLocation().equals(other.getLocation())) return false; + } + if (!travelModes_.equals(other.travelModes_)) return false; + if (!usages_.equals(other.usages_)) 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) + NAVIGATION_POINT_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNavigationPointToken().hashCode(); + if (hasDisplayName()) { + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + } + if (hasLocation()) { + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + } + if (getTravelModesCount() > 0) { + hash = (37 * hash) + TRAVEL_MODES_FIELD_NUMBER; + hash = (53 * hash) + travelModes_.hashCode(); + } + if (getUsagesCount() > 0) { + hash = (37 * hash) + USAGES_FIELD_NUMBER; + hash = (53 * hash) + usages_.hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.geocode.v4.NavigationPoint parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.NavigationPoint 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.geocode.v4.NavigationPoint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.NavigationPoint 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.geocode.v4.NavigationPoint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.NavigationPoint parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.geocode.v4.NavigationPoint parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.NavigationPoint parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.NavigationPoint parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.NavigationPoint parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.NavigationPoint parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.NavigationPoint parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geocode.v4.NavigationPoint 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A navigation point is a location next to a road where navigation can end.
+   * 
+ * + * Protobuf type {@code google.maps.geocode.v4.NavigationPoint} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.geocode.v4.NavigationPoint) + com.google.maps.geocode.v4.NavigationPointOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_NavigationPoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_NavigationPoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.NavigationPoint.class, + com.google.maps.geocode.v4.NavigationPoint.Builder.class); + } + + // Construct using com.google.maps.geocode.v4.NavigationPoint.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDisplayNameFieldBuilder(); + internalGetLocationFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + navigationPointToken_ = ""; + displayName_ = null; + if (displayNameBuilder_ != null) { + displayNameBuilder_.dispose(); + displayNameBuilder_ = null; + } + location_ = null; + if (locationBuilder_ != null) { + locationBuilder_.dispose(); + locationBuilder_ = null; + } + travelModes_ = emptyIntList(); + usages_ = emptyIntList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_NavigationPoint_descriptor; + } + + @java.lang.Override + public com.google.maps.geocode.v4.NavigationPoint getDefaultInstanceForType() { + return com.google.maps.geocode.v4.NavigationPoint.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.geocode.v4.NavigationPoint build() { + com.google.maps.geocode.v4.NavigationPoint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.geocode.v4.NavigationPoint buildPartial() { + com.google.maps.geocode.v4.NavigationPoint result = + new com.google.maps.geocode.v4.NavigationPoint(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.geocode.v4.NavigationPoint result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.navigationPointToken_ = navigationPointToken_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = + displayNameBuilder_ == null ? displayName_ : displayNameBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.location_ = locationBuilder_ == null ? location_ : locationBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + travelModes_.makeImmutable(); + result.travelModes_ = travelModes_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + usages_.makeImmutable(); + result.usages_ = usages_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.geocode.v4.NavigationPoint) { + return mergeFrom((com.google.maps.geocode.v4.NavigationPoint) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.geocode.v4.NavigationPoint other) { + if (other == com.google.maps.geocode.v4.NavigationPoint.getDefaultInstance()) return this; + if (!other.getNavigationPointToken().isEmpty()) { + navigationPointToken_ = other.navigationPointToken_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasDisplayName()) { + mergeDisplayName(other.getDisplayName()); + } + if (other.hasLocation()) { + mergeLocation(other.getLocation()); + } + if (!other.travelModes_.isEmpty()) { + if (travelModes_.isEmpty()) { + travelModes_ = other.travelModes_; + travelModes_.makeImmutable(); + bitField0_ |= 0x00000008; + } else { + ensureTravelModesIsMutable(); + travelModes_.addAll(other.travelModes_); + } + onChanged(); + } + if (!other.usages_.isEmpty()) { + if (usages_.isEmpty()) { + usages_ = other.usages_; + usages_.makeImmutable(); + bitField0_ |= 0x00000010; + } else { + ensureUsagesIsMutable(); + usages_.addAll(other.usages_); + } + 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: + { + navigationPointToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetDisplayNameFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetLocationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + int tmpRaw = input.readEnum(); + ensureTravelModesIsMutable(); + travelModes_.addInt(tmpRaw); + break; + } // case 32 + case 34: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureTravelModesIsMutable(); + while (input.getBytesUntilLimit() > 0) { + travelModes_.addInt(input.readEnum()); + } + input.popLimit(limit); + break; + } // case 34 + case 40: + { + int tmpRaw = input.readEnum(); + ensureUsagesIsMutable(); + usages_.addInt(tmpRaw); + break; + } // case 40 + case 42: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureUsagesIsMutable(); + while (input.getBytesUntilLimit() > 0) { + usages_.addInt(input.readEnum()); + } + input.popLimit(limit); + 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.lang.Object navigationPointToken_ = ""; + + /** + * + * + *
+     * Output only. A token that can be used to identify this navigation point.
+     * 
+ * + * string navigation_point_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The navigationPointToken. + */ + public java.lang.String getNavigationPointToken() { + java.lang.Object ref = navigationPointToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + navigationPointToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. A token that can be used to identify this navigation point.
+     * 
+ * + * string navigation_point_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for navigationPointToken. + */ + public com.google.protobuf.ByteString getNavigationPointTokenBytes() { + java.lang.Object ref = navigationPointToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + navigationPointToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. A token that can be used to identify this navigation point.
+     * 
+ * + * string navigation_point_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The navigationPointToken to set. + * @return This builder for chaining. + */ + public Builder setNavigationPointToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + navigationPointToken_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. A token that can be used to identify this navigation point.
+     * 
+ * + * string navigation_point_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearNavigationPointToken() { + navigationPointToken_ = getDefaultInstance().getNavigationPointToken(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. A token that can be used to identify this navigation point.
+     * 
+ * + * string navigation_point_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for navigationPointToken to set. + * @return This builder for chaining. + */ + public Builder setNavigationPointTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + navigationPointToken_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.type.LocalizedText displayName_; + private com.google.protobuf.SingleFieldBuilder< + com.google.type.LocalizedText, + com.google.type.LocalizedText.Builder, + com.google.type.LocalizedTextOrBuilder> + displayNameBuilder_; + + /** + * + * + *
+     * The display name of this navigation point. For example, "5th Ave" or "Gate
+     * B".
+     * 
+ * + * .google.type.LocalizedText display_name = 2; + * + * @return Whether the displayName field is set. + */ + public boolean hasDisplayName() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * The display name of this navigation point. For example, "5th Ave" or "Gate
+     * B".
+     * 
+ * + * .google.type.LocalizedText display_name = 2; + * + * @return The displayName. + */ + public com.google.type.LocalizedText getDisplayName() { + if (displayNameBuilder_ == null) { + return displayName_ == null + ? com.google.type.LocalizedText.getDefaultInstance() + : displayName_; + } else { + return displayNameBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The display name of this navigation point. For example, "5th Ave" or "Gate
+     * B".
+     * 
+ * + * .google.type.LocalizedText display_name = 2; + */ + public Builder setDisplayName(com.google.type.LocalizedText value) { + if (displayNameBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + } else { + displayNameBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The display name of this navigation point. For example, "5th Ave" or "Gate
+     * B".
+     * 
+ * + * .google.type.LocalizedText display_name = 2; + */ + public Builder setDisplayName(com.google.type.LocalizedText.Builder builderForValue) { + if (displayNameBuilder_ == null) { + displayName_ = builderForValue.build(); + } else { + displayNameBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The display name of this navigation point. For example, "5th Ave" or "Gate
+     * B".
+     * 
+ * + * .google.type.LocalizedText display_name = 2; + */ + public Builder mergeDisplayName(com.google.type.LocalizedText value) { + if (displayNameBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && displayName_ != null + && displayName_ != com.google.type.LocalizedText.getDefaultInstance()) { + getDisplayNameBuilder().mergeFrom(value); + } else { + displayName_ = value; + } + } else { + displayNameBuilder_.mergeFrom(value); + } + if (displayName_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The display name of this navigation point. For example, "5th Ave" or "Gate
+     * B".
+     * 
+ * + * .google.type.LocalizedText display_name = 2; + */ + public Builder clearDisplayName() { + bitField0_ = (bitField0_ & ~0x00000002); + displayName_ = null; + if (displayNameBuilder_ != null) { + displayNameBuilder_.dispose(); + displayNameBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The display name of this navigation point. For example, "5th Ave" or "Gate
+     * B".
+     * 
+ * + * .google.type.LocalizedText display_name = 2; + */ + public com.google.type.LocalizedText.Builder getDisplayNameBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetDisplayNameFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The display name of this navigation point. For example, "5th Ave" or "Gate
+     * B".
+     * 
+ * + * .google.type.LocalizedText display_name = 2; + */ + public com.google.type.LocalizedTextOrBuilder getDisplayNameOrBuilder() { + if (displayNameBuilder_ != null) { + return displayNameBuilder_.getMessageOrBuilder(); + } else { + return displayName_ == null + ? com.google.type.LocalizedText.getDefaultInstance() + : displayName_; + } + } + + /** + * + * + *
+     * The display name of this navigation point. For example, "5th Ave" or "Gate
+     * B".
+     * 
+ * + * .google.type.LocalizedText display_name = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.LocalizedText, + com.google.type.LocalizedText.Builder, + com.google.type.LocalizedTextOrBuilder> + internalGetDisplayNameFieldBuilder() { + if (displayNameBuilder_ == null) { + displayNameBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.LocalizedText, + com.google.type.LocalizedText.Builder, + com.google.type.LocalizedTextOrBuilder>( + getDisplayName(), getParentForChildren(), isClean()); + displayName_ = null; + } + return displayNameBuilder_; + } + + private com.google.type.LatLng location_; + private com.google.protobuf.SingleFieldBuilder< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + locationBuilder_; + + /** + * + * + *
+     * A point next to the road segment where navigation should end. The point is
+     * intentionally slightly offset from the road's centerline to clearly mark
+     * the side of the road where the place is located.
+     * 
+ * + * .google.type.LatLng location = 3; + * + * @return Whether the location field is set. + */ + public boolean hasLocation() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * A point next to the road segment where navigation should end. The point is
+     * intentionally slightly offset from the road's centerline to clearly mark
+     * the side of the road where the place is located.
+     * 
+ * + * .google.type.LatLng location = 3; + * + * @return The location. + */ + public com.google.type.LatLng getLocation() { + if (locationBuilder_ == null) { + return location_ == null ? com.google.type.LatLng.getDefaultInstance() : location_; + } else { + return locationBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * A point next to the road segment where navigation should end. The point is
+     * intentionally slightly offset from the road's centerline to clearly mark
+     * the side of the road where the place is located.
+     * 
+ * + * .google.type.LatLng location = 3; + */ + public Builder setLocation(com.google.type.LatLng value) { + if (locationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + } else { + locationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * A point next to the road segment where navigation should end. The point is
+     * intentionally slightly offset from the road's centerline to clearly mark
+     * the side of the road where the place is located.
+     * 
+ * + * .google.type.LatLng location = 3; + */ + public Builder setLocation(com.google.type.LatLng.Builder builderForValue) { + if (locationBuilder_ == null) { + location_ = builderForValue.build(); + } else { + locationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * A point next to the road segment where navigation should end. The point is
+     * intentionally slightly offset from the road's centerline to clearly mark
+     * the side of the road where the place is located.
+     * 
+ * + * .google.type.LatLng location = 3; + */ + public Builder mergeLocation(com.google.type.LatLng value) { + if (locationBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && location_ != null + && location_ != com.google.type.LatLng.getDefaultInstance()) { + getLocationBuilder().mergeFrom(value); + } else { + location_ = value; + } + } else { + locationBuilder_.mergeFrom(value); + } + if (location_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * A point next to the road segment where navigation should end. The point is
+     * intentionally slightly offset from the road's centerline to clearly mark
+     * the side of the road where the place is located.
+     * 
+ * + * .google.type.LatLng location = 3; + */ + public Builder clearLocation() { + bitField0_ = (bitField0_ & ~0x00000004); + location_ = null; + if (locationBuilder_ != null) { + locationBuilder_.dispose(); + locationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * A point next to the road segment where navigation should end. The point is
+     * intentionally slightly offset from the road's centerline to clearly mark
+     * the side of the road where the place is located.
+     * 
+ * + * .google.type.LatLng location = 3; + */ + public com.google.type.LatLng.Builder getLocationBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetLocationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * A point next to the road segment where navigation should end. The point is
+     * intentionally slightly offset from the road's centerline to clearly mark
+     * the side of the road where the place is located.
+     * 
+ * + * .google.type.LatLng location = 3; + */ + public com.google.type.LatLngOrBuilder getLocationOrBuilder() { + if (locationBuilder_ != null) { + return locationBuilder_.getMessageOrBuilder(); + } else { + return location_ == null ? com.google.type.LatLng.getDefaultInstance() : location_; + } + } + + /** + * + * + *
+     * A point next to the road segment where navigation should end. The point is
+     * intentionally slightly offset from the road's centerline to clearly mark
+     * the side of the road where the place is located.
+     * 
+ * + * .google.type.LatLng location = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + internalGetLocationFieldBuilder() { + if (locationBuilder_ == null) { + locationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.LatLng, + com.google.type.LatLng.Builder, + com.google.type.LatLngOrBuilder>(getLocation(), getParentForChildren(), isClean()); + location_ = null; + } + return locationBuilder_; + } + + private com.google.protobuf.Internal.IntList travelModes_ = emptyIntList(); + + private void ensureTravelModesIsMutable() { + if (!travelModes_.isModifiable()) { + travelModes_ = makeMutableCopy(travelModes_); + } + bitField0_ |= 0x00000008; + } + + /** + * + * + *
+     * Travel modes that are appropriate for this navigation point.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 4; + * + * @return A list containing the travelModes. + */ + public java.util.List + getTravelModesList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.maps.geocode.v4.NavigationPoint.TravelMode>( + travelModes_, travelModes_converter_); + } + + /** + * + * + *
+     * Travel modes that are appropriate for this navigation point.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 4; + * + * @return The count of travelModes. + */ + public int getTravelModesCount() { + return travelModes_.size(); + } + + /** + * + * + *
+     * Travel modes that are appropriate for this navigation point.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 4; + * + * @param index The index of the element to return. + * @return The travelModes at the given index. + */ + public com.google.maps.geocode.v4.NavigationPoint.TravelMode getTravelModes(int index) { + return travelModes_converter_.convert(travelModes_.getInt(index)); + } + + /** + * + * + *
+     * Travel modes that are appropriate for this navigation point.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 4; + * + * @param index The index to set the value at. + * @param value The travelModes to set. + * @return This builder for chaining. + */ + public Builder setTravelModes( + int index, com.google.maps.geocode.v4.NavigationPoint.TravelMode value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTravelModesIsMutable(); + travelModes_.setInt(index, value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
+     * Travel modes that are appropriate for this navigation point.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 4; + * + * @param value The travelModes to add. + * @return This builder for chaining. + */ + public Builder addTravelModes(com.google.maps.geocode.v4.NavigationPoint.TravelMode value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTravelModesIsMutable(); + travelModes_.addInt(value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
+     * Travel modes that are appropriate for this navigation point.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 4; + * + * @param values The travelModes to add. + * @return This builder for chaining. + */ + public Builder addAllTravelModes( + java.lang.Iterable + values) { + ensureTravelModesIsMutable(); + for (com.google.maps.geocode.v4.NavigationPoint.TravelMode value : values) { + travelModes_.addInt(value.getNumber()); + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Travel modes that are appropriate for this navigation point.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 4; + * + * @return This builder for chaining. + */ + public Builder clearTravelModes() { + travelModes_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Travel modes that are appropriate for this navigation point.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 4; + * + * @return A list containing the enum numeric values on the wire for travelModes. + */ + public java.util.List getTravelModesValueList() { + travelModes_.makeImmutable(); + return travelModes_; + } + + /** + * + * + *
+     * Travel modes that are appropriate for this navigation point.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 4; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of travelModes at the given index. + */ + public int getTravelModesValue(int index) { + return travelModes_.getInt(index); + } + + /** + * + * + *
+     * Travel modes that are appropriate for this navigation point.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 4; + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for travelModes to set. + * @return This builder for chaining. + */ + public Builder setTravelModesValue(int index, int value) { + ensureTravelModesIsMutable(); + travelModes_.setInt(index, value); + onChanged(); + return this; + } + + /** + * + * + *
+     * Travel modes that are appropriate for this navigation point.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 4; + * + * @param value The enum numeric value on the wire for travelModes to add. + * @return This builder for chaining. + */ + public Builder addTravelModesValue(int value) { + ensureTravelModesIsMutable(); + travelModes_.addInt(value); + onChanged(); + return this; + } + + /** + * + * + *
+     * Travel modes that are appropriate for this navigation point.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 4; + * + * @param values The enum numeric values on the wire for travelModes to add. + * @return This builder for chaining. + */ + public Builder addAllTravelModesValue(java.lang.Iterable values) { + ensureTravelModesIsMutable(); + for (int value : values) { + travelModes_.addInt(value); + } + onChanged(); + return this; + } + + private com.google.protobuf.Internal.IntList usages_ = emptyIntList(); + + private void ensureUsagesIsMutable() { + if (!usages_.isModifiable()) { + usages_ = makeMutableCopy(usages_); + } + bitField0_ |= 0x00000010; + } + + /** + * + * + *
+     * Lists `usages` supported by this navigation point. If empty, it does not
+     * necessarily mean its usage is restricted in any way. All navigation
+     * points can be used for general navigation.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.Usage usages = 5; + * + * @return A list containing the usages. + */ + public java.util.List getUsagesList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.maps.geocode.v4.NavigationPoint.Usage>(usages_, usages_converter_); + } + + /** + * + * + *
+     * Lists `usages` supported by this navigation point. If empty, it does not
+     * necessarily mean its usage is restricted in any way. All navigation
+     * points can be used for general navigation.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.Usage usages = 5; + * + * @return The count of usages. + */ + public int getUsagesCount() { + return usages_.size(); + } + + /** + * + * + *
+     * Lists `usages` supported by this navigation point. If empty, it does not
+     * necessarily mean its usage is restricted in any way. All navigation
+     * points can be used for general navigation.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.Usage usages = 5; + * + * @param index The index of the element to return. + * @return The usages at the given index. + */ + public com.google.maps.geocode.v4.NavigationPoint.Usage getUsages(int index) { + return usages_converter_.convert(usages_.getInt(index)); + } + + /** + * + * + *
+     * Lists `usages` supported by this navigation point. If empty, it does not
+     * necessarily mean its usage is restricted in any way. All navigation
+     * points can be used for general navigation.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.Usage usages = 5; + * + * @param index The index to set the value at. + * @param value The usages to set. + * @return This builder for chaining. + */ + public Builder setUsages(int index, com.google.maps.geocode.v4.NavigationPoint.Usage value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUsagesIsMutable(); + usages_.setInt(index, value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
+     * Lists `usages` supported by this navigation point. If empty, it does not
+     * necessarily mean its usage is restricted in any way. All navigation
+     * points can be used for general navigation.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.Usage usages = 5; + * + * @param value The usages to add. + * @return This builder for chaining. + */ + public Builder addUsages(com.google.maps.geocode.v4.NavigationPoint.Usage value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUsagesIsMutable(); + usages_.addInt(value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
+     * Lists `usages` supported by this navigation point. If empty, it does not
+     * necessarily mean its usage is restricted in any way. All navigation
+     * points can be used for general navigation.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.Usage usages = 5; + * + * @param values The usages to add. + * @return This builder for chaining. + */ + public Builder addAllUsages( + java.lang.Iterable values) { + ensureUsagesIsMutable(); + for (com.google.maps.geocode.v4.NavigationPoint.Usage value : values) { + usages_.addInt(value.getNumber()); + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Lists `usages` supported by this navigation point. If empty, it does not
+     * necessarily mean its usage is restricted in any way. All navigation
+     * points can be used for general navigation.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.Usage usages = 5; + * + * @return This builder for chaining. + */ + public Builder clearUsages() { + usages_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Lists `usages` supported by this navigation point. If empty, it does not
+     * necessarily mean its usage is restricted in any way. All navigation
+     * points can be used for general navigation.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.Usage usages = 5; + * + * @return A list containing the enum numeric values on the wire for usages. + */ + public java.util.List getUsagesValueList() { + usages_.makeImmutable(); + return usages_; + } + + /** + * + * + *
+     * Lists `usages` supported by this navigation point. If empty, it does not
+     * necessarily mean its usage is restricted in any way. All navigation
+     * points can be used for general navigation.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.Usage usages = 5; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of usages at the given index. + */ + public int getUsagesValue(int index) { + return usages_.getInt(index); + } + + /** + * + * + *
+     * Lists `usages` supported by this navigation point. If empty, it does not
+     * necessarily mean its usage is restricted in any way. All navigation
+     * points can be used for general navigation.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.Usage usages = 5; + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for usages to set. + * @return This builder for chaining. + */ + public Builder setUsagesValue(int index, int value) { + ensureUsagesIsMutable(); + usages_.setInt(index, value); + onChanged(); + return this; + } + + /** + * + * + *
+     * Lists `usages` supported by this navigation point. If empty, it does not
+     * necessarily mean its usage is restricted in any way. All navigation
+     * points can be used for general navigation.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.Usage usages = 5; + * + * @param value The enum numeric value on the wire for usages to add. + * @return This builder for chaining. + */ + public Builder addUsagesValue(int value) { + ensureUsagesIsMutable(); + usages_.addInt(value); + onChanged(); + return this; + } + + /** + * + * + *
+     * Lists `usages` supported by this navigation point. If empty, it does not
+     * necessarily mean its usage is restricted in any way. All navigation
+     * points can be used for general navigation.
+     * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.Usage usages = 5; + * + * @param values The enum numeric values on the wire for usages to add. + * @return This builder for chaining. + */ + public Builder addAllUsagesValue(java.lang.Iterable values) { + ensureUsagesIsMutable(); + for (int value : values) { + usages_.addInt(value); + } + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.maps.geocode.v4.NavigationPoint) + } + + // @@protoc_insertion_point(class_scope:google.maps.geocode.v4.NavigationPoint) + private static final com.google.maps.geocode.v4.NavigationPoint DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.geocode.v4.NavigationPoint(); + } + + public static com.google.maps.geocode.v4.NavigationPoint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NavigationPoint 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.geocode.v4.NavigationPoint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/NavigationPointOrBuilder.java b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/NavigationPointOrBuilder.java new file mode 100644 index 000000000000..5006a293006d --- /dev/null +++ b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/NavigationPointOrBuilder.java @@ -0,0 +1,281 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/maps/geocode/v4/destination_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.geocode.v4; + +@com.google.protobuf.Generated +public interface NavigationPointOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.geocode.v4.NavigationPoint) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. A token that can be used to identify this navigation point.
+   * 
+ * + * string navigation_point_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The navigationPointToken. + */ + java.lang.String getNavigationPointToken(); + + /** + * + * + *
+   * Output only. A token that can be used to identify this navigation point.
+   * 
+ * + * string navigation_point_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for navigationPointToken. + */ + com.google.protobuf.ByteString getNavigationPointTokenBytes(); + + /** + * + * + *
+   * The display name of this navigation point. For example, "5th Ave" or "Gate
+   * B".
+   * 
+ * + * .google.type.LocalizedText display_name = 2; + * + * @return Whether the displayName field is set. + */ + boolean hasDisplayName(); + + /** + * + * + *
+   * The display name of this navigation point. For example, "5th Ave" or "Gate
+   * B".
+   * 
+ * + * .google.type.LocalizedText display_name = 2; + * + * @return The displayName. + */ + com.google.type.LocalizedText getDisplayName(); + + /** + * + * + *
+   * The display name of this navigation point. For example, "5th Ave" or "Gate
+   * B".
+   * 
+ * + * .google.type.LocalizedText display_name = 2; + */ + com.google.type.LocalizedTextOrBuilder getDisplayNameOrBuilder(); + + /** + * + * + *
+   * A point next to the road segment where navigation should end. The point is
+   * intentionally slightly offset from the road's centerline to clearly mark
+   * the side of the road where the place is located.
+   * 
+ * + * .google.type.LatLng location = 3; + * + * @return Whether the location field is set. + */ + boolean hasLocation(); + + /** + * + * + *
+   * A point next to the road segment where navigation should end. The point is
+   * intentionally slightly offset from the road's centerline to clearly mark
+   * the side of the road where the place is located.
+   * 
+ * + * .google.type.LatLng location = 3; + * + * @return The location. + */ + com.google.type.LatLng getLocation(); + + /** + * + * + *
+   * A point next to the road segment where navigation should end. The point is
+   * intentionally slightly offset from the road's centerline to clearly mark
+   * the side of the road where the place is located.
+   * 
+ * + * .google.type.LatLng location = 3; + */ + com.google.type.LatLngOrBuilder getLocationOrBuilder(); + + /** + * + * + *
+   * Travel modes that are appropriate for this navigation point.
+   * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 4; + * + * @return A list containing the travelModes. + */ + java.util.List getTravelModesList(); + + /** + * + * + *
+   * Travel modes that are appropriate for this navigation point.
+   * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 4; + * + * @return The count of travelModes. + */ + int getTravelModesCount(); + + /** + * + * + *
+   * Travel modes that are appropriate for this navigation point.
+   * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 4; + * + * @param index The index of the element to return. + * @return The travelModes at the given index. + */ + com.google.maps.geocode.v4.NavigationPoint.TravelMode getTravelModes(int index); + + /** + * + * + *
+   * Travel modes that are appropriate for this navigation point.
+   * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 4; + * + * @return A list containing the enum numeric values on the wire for travelModes. + */ + java.util.List getTravelModesValueList(); + + /** + * + * + *
+   * Travel modes that are appropriate for this navigation point.
+   * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 4; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of travelModes at the given index. + */ + int getTravelModesValue(int index); + + /** + * + * + *
+   * Lists `usages` supported by this navigation point. If empty, it does not
+   * necessarily mean its usage is restricted in any way. All navigation
+   * points can be used for general navigation.
+   * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.Usage usages = 5; + * + * @return A list containing the usages. + */ + java.util.List getUsagesList(); + + /** + * + * + *
+   * Lists `usages` supported by this navigation point. If empty, it does not
+   * necessarily mean its usage is restricted in any way. All navigation
+   * points can be used for general navigation.
+   * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.Usage usages = 5; + * + * @return The count of usages. + */ + int getUsagesCount(); + + /** + * + * + *
+   * Lists `usages` supported by this navigation point. If empty, it does not
+   * necessarily mean its usage is restricted in any way. All navigation
+   * points can be used for general navigation.
+   * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.Usage usages = 5; + * + * @param index The index of the element to return. + * @return The usages at the given index. + */ + com.google.maps.geocode.v4.NavigationPoint.Usage getUsages(int index); + + /** + * + * + *
+   * Lists `usages` supported by this navigation point. If empty, it does not
+   * necessarily mean its usage is restricted in any way. All navigation
+   * points can be used for general navigation.
+   * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.Usage usages = 5; + * + * @return A list containing the enum numeric values on the wire for usages. + */ + java.util.List getUsagesValueList(); + + /** + * + * + *
+   * Lists `usages` supported by this navigation point. If empty, it does not
+   * necessarily mean its usage is restricted in any way. All navigation
+   * points can be used for general navigation.
+   * 
+ * + * repeated .google.maps.geocode.v4.NavigationPoint.Usage usages = 5; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of usages at the given index. + */ + int getUsagesValue(int index); +} diff --git a/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/PlaceView.java b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/PlaceView.java new file mode 100644 index 000000000000..bb6cc0076efc --- /dev/null +++ b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/PlaceView.java @@ -0,0 +1,3092 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/maps/geocode/v4/destination_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.geocode.v4; + +/** + * + * + *
+ * Represents a view of a
+ * [Place](https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places#resource:-place)
+ * in the Places API. It also provides additional information specific to
+ * destinations, such as the structure type and the display polygon.
+ *
+ * In some cases, a `PlaceView` with the same place ID might differ from what
+ * is being returned by the Places API for the `types` and
+ * `display_name` fields.
+ * 
+ * + * Protobuf type {@code google.maps.geocode.v4.PlaceView} + */ +@com.google.protobuf.Generated +public final class PlaceView extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.maps.geocode.v4.PlaceView) + PlaceViewOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PlaceView"); + } + + // Use PlaceView.newBuilder() to construct. + private PlaceView(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PlaceView() { + place_ = ""; + placeId_ = ""; + primaryType_ = ""; + types_ = com.google.protobuf.LazyStringArrayList.emptyList(); + formattedAddress_ = ""; + structureType_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_PlaceView_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_PlaceView_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.PlaceView.class, + com.google.maps.geocode.v4.PlaceView.Builder.class); + } + + /** + * + * + *
+   * The type of structure that this place represents.
+   * 
+ * + * Protobuf enum {@code google.maps.geocode.v4.PlaceView.StructureType} + */ + public enum StructureType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not used.
+     * 
+ * + * STRUCTURE_TYPE_UNSPECIFIED = 0; + */ + STRUCTURE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * A point location.
+     * 
+ * + * POINT = 1; + */ + POINT(1), + /** + * + * + *
+     * A sub-section of a building.
+     * 
+ * + * SECTION = 2; + */ + SECTION(2), + /** + * + * + *
+     * A building.
+     * 
+ * + * BUILDING = 3; + */ + BUILDING(3), + /** + * + * + *
+     * A large area that typically contains multiple buildings, such as a
+     * university campus, an apartment complex, or a shopping mall.
+     * 
+ * + * GROUNDS = 4; + */ + GROUNDS(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "StructureType"); + } + + /** + * + * + *
+     * Not used.
+     * 
+ * + * STRUCTURE_TYPE_UNSPECIFIED = 0; + */ + public static final int STRUCTURE_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * A point location.
+     * 
+ * + * POINT = 1; + */ + public static final int POINT_VALUE = 1; + + /** + * + * + *
+     * A sub-section of a building.
+     * 
+ * + * SECTION = 2; + */ + public static final int SECTION_VALUE = 2; + + /** + * + * + *
+     * A building.
+     * 
+ * + * BUILDING = 3; + */ + public static final int BUILDING_VALUE = 3; + + /** + * + * + *
+     * A large area that typically contains multiple buildings, such as a
+     * university campus, an apartment complex, or a shopping mall.
+     * 
+ * + * GROUNDS = 4; + */ + public static final int GROUNDS_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 StructureType 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 StructureType forNumber(int value) { + switch (value) { + case 0: + return STRUCTURE_TYPE_UNSPECIFIED; + case 1: + return POINT; + case 2: + return SECTION; + case 3: + return BUILDING; + case 4: + return GROUNDS; + 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 StructureType findValueByNumber(int number) { + return StructureType.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.maps.geocode.v4.PlaceView.getDescriptor().getEnumTypes().get(0); + } + + private static final StructureType[] VALUES = values(); + + public static StructureType 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 StructureType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.maps.geocode.v4.PlaceView.StructureType) + } + + private int bitField0_; + public static final int PLACE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object place_ = ""; + + /** + * + * + *
+   * This Place's resource name, in `places/{placeId}` format.  Can be used to
+   * look up the Place.
+   * 
+ * + * string place = 1; + * + * @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; + } + } + + /** + * + * + *
+   * This Place's resource name, in `places/{placeId}` format.  Can be used to
+   * look up the Place.
+   * 
+ * + * string place = 1; + * + * @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; + } + } + + public static final int PLACE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object placeId_ = ""; + + /** + * + * + *
+   * The unique identifier of a place.
+   * 
+ * + * string place_id = 2; + * + * @return The placeId. + */ + @java.lang.Override + public java.lang.String getPlaceId() { + java.lang.Object ref = placeId_; + 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(); + placeId_ = s; + return s; + } + } + + /** + * + * + *
+   * The unique identifier of a place.
+   * 
+ * + * string place_id = 2; + * + * @return The bytes for placeId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPlaceIdBytes() { + java.lang.Object ref = placeId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + placeId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 3; + private com.google.type.LocalizedText displayName_; + + /** + * + * + *
+   * Human readable place description. For example, "Gate B", "McDonalds"
+   * 
+ * + * .google.type.LocalizedText display_name = 3; + * + * @return Whether the displayName field is set. + */ + @java.lang.Override + public boolean hasDisplayName() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Human readable place description. For example, "Gate B", "McDonalds"
+   * 
+ * + * .google.type.LocalizedText display_name = 3; + * + * @return The displayName. + */ + @java.lang.Override + public com.google.type.LocalizedText getDisplayName() { + return displayName_ == null ? com.google.type.LocalizedText.getDefaultInstance() : displayName_; + } + + /** + * + * + *
+   * Human readable place description. For example, "Gate B", "McDonalds"
+   * 
+ * + * .google.type.LocalizedText display_name = 3; + */ + @java.lang.Override + public com.google.type.LocalizedTextOrBuilder getDisplayNameOrBuilder() { + return displayName_ == null ? com.google.type.LocalizedText.getDefaultInstance() : displayName_; + } + + public static final int PRIMARY_TYPE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object primaryType_ = ""; + + /** + * + * + *
+   * The primary place type of this place. See
+   * https://developers.google.com/maps/documentation/places/web-service/place-types
+   * for the list of possible values.
+   *
+   * Note: This field is not always populated. Be prepared to use the `types`
+   * field in such situations.
+   * 
+ * + * string primary_type = 4; + * + * @return The primaryType. + */ + @java.lang.Override + public java.lang.String getPrimaryType() { + java.lang.Object ref = primaryType_; + 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(); + primaryType_ = s; + return s; + } + } + + /** + * + * + *
+   * The primary place type of this place. See
+   * https://developers.google.com/maps/documentation/places/web-service/place-types
+   * for the list of possible values.
+   *
+   * Note: This field is not always populated. Be prepared to use the `types`
+   * field in such situations.
+   * 
+ * + * string primary_type = 4; + * + * @return The bytes for primaryType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPrimaryTypeBytes() { + java.lang.Object ref = primaryType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + primaryType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPES_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList types_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * All associated place types of this place. See
+   * https://developers.google.com/maps/documentation/places/web-service/place-types
+   * for the list of possible values.
+   * 
+ * + * repeated string types = 5; + * + * @return A list containing the types. + */ + public com.google.protobuf.ProtocolStringList getTypesList() { + return types_; + } + + /** + * + * + *
+   * All associated place types of this place. See
+   * https://developers.google.com/maps/documentation/places/web-service/place-types
+   * for the list of possible values.
+   * 
+ * + * repeated string types = 5; + * + * @return The count of types. + */ + public int getTypesCount() { + return types_.size(); + } + + /** + * + * + *
+   * All associated place types of this place. See
+   * https://developers.google.com/maps/documentation/places/web-service/place-types
+   * for the list of possible values.
+   * 
+ * + * repeated string types = 5; + * + * @param index The index of the element to return. + * @return The types at the given index. + */ + public java.lang.String getTypes(int index) { + return types_.get(index); + } + + /** + * + * + *
+   * All associated place types of this place. See
+   * https://developers.google.com/maps/documentation/places/web-service/place-types
+   * for the list of possible values.
+   * 
+ * + * repeated string types = 5; + * + * @param index The index of the value to return. + * @return The bytes of the types at the given index. + */ + public com.google.protobuf.ByteString getTypesBytes(int index) { + return types_.getByteString(index); + } + + public static final int FORMATTED_ADDRESS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object formattedAddress_ = ""; + + /** + * + * + *
+   * One line address.
+   * 
+ * + * string formatted_address = 6; + * + * @return The formattedAddress. + */ + @java.lang.Override + public java.lang.String getFormattedAddress() { + java.lang.Object ref = formattedAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + formattedAddress_ = s; + return s; + } + } + + /** + * + * + *
+   * One line address.
+   * 
+ * + * string formatted_address = 6; + * + * @return The bytes for formattedAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFormattedAddressBytes() { + java.lang.Object ref = formattedAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + formattedAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POSTAL_ADDRESS_FIELD_NUMBER = 7; + private com.google.type.PostalAddress postalAddress_; + + /** + * + * + *
+   * Structured address.
+   * 
+ * + * .google.type.PostalAddress postal_address = 7; + * + * @return Whether the postalAddress field is set. + */ + @java.lang.Override + public boolean hasPostalAddress() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Structured address.
+   * 
+ * + * .google.type.PostalAddress postal_address = 7; + * + * @return The postalAddress. + */ + @java.lang.Override + public com.google.type.PostalAddress getPostalAddress() { + return postalAddress_ == null + ? com.google.type.PostalAddress.getDefaultInstance() + : postalAddress_; + } + + /** + * + * + *
+   * Structured address.
+   * 
+ * + * .google.type.PostalAddress postal_address = 7; + */ + @java.lang.Override + public com.google.type.PostalAddressOrBuilder getPostalAddressOrBuilder() { + return postalAddress_ == null + ? com.google.type.PostalAddress.getDefaultInstance() + : postalAddress_; + } + + public static final int STRUCTURE_TYPE_FIELD_NUMBER = 8; + private int structureType_ = 0; + + /** + * + * + *
+   * The type of structure corresponding to this place.
+   * 
+ * + * .google.maps.geocode.v4.PlaceView.StructureType structure_type = 8; + * + * @return The enum numeric value on the wire for structureType. + */ + @java.lang.Override + public int getStructureTypeValue() { + return structureType_; + } + + /** + * + * + *
+   * The type of structure corresponding to this place.
+   * 
+ * + * .google.maps.geocode.v4.PlaceView.StructureType structure_type = 8; + * + * @return The structureType. + */ + @java.lang.Override + public com.google.maps.geocode.v4.PlaceView.StructureType getStructureType() { + com.google.maps.geocode.v4.PlaceView.StructureType result = + com.google.maps.geocode.v4.PlaceView.StructureType.forNumber(structureType_); + return result == null + ? com.google.maps.geocode.v4.PlaceView.StructureType.UNRECOGNIZED + : result; + } + + public static final int LOCATION_FIELD_NUMBER = 9; + private com.google.type.LatLng location_; + + /** + * + * + *
+   * The location of this place. For places with display polygons, this can
+   * represent a good spot to put a marker on the map.
+   * 
+ * + * .google.type.LatLng location = 9; + * + * @return Whether the location field is set. + */ + @java.lang.Override + public boolean hasLocation() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * The location of this place. For places with display polygons, this can
+   * represent a good spot to put a marker on the map.
+   * 
+ * + * .google.type.LatLng location = 9; + * + * @return The location. + */ + @java.lang.Override + public com.google.type.LatLng getLocation() { + return location_ == null ? com.google.type.LatLng.getDefaultInstance() : location_; + } + + /** + * + * + *
+   * The location of this place. For places with display polygons, this can
+   * represent a good spot to put a marker on the map.
+   * 
+ * + * .google.type.LatLng location = 9; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getLocationOrBuilder() { + return location_ == null ? com.google.type.LatLng.getDefaultInstance() : location_; + } + + public static final int DISPLAY_POLYGON_FIELD_NUMBER = 10; + private com.google.protobuf.Struct displayPolygon_; + + /** + * + * + *
+   * The polygon outline of the place in GeoJSON format, using the RFC 7946
+   * format: https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.6.
+   *
+   * Note: The RFC 7946 format supports MultiPolygons, so one `display_polygon`
+   * object can represent multiple polygons.
+   * 
+ * + * .google.protobuf.Struct display_polygon = 10; + * + * @return Whether the displayPolygon field is set. + */ + @java.lang.Override + public boolean hasDisplayPolygon() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * The polygon outline of the place in GeoJSON format, using the RFC 7946
+   * format: https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.6.
+   *
+   * Note: The RFC 7946 format supports MultiPolygons, so one `display_polygon`
+   * object can represent multiple polygons.
+   * 
+ * + * .google.protobuf.Struct display_polygon = 10; + * + * @return The displayPolygon. + */ + @java.lang.Override + public com.google.protobuf.Struct getDisplayPolygon() { + return displayPolygon_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : displayPolygon_; + } + + /** + * + * + *
+   * The polygon outline of the place in GeoJSON format, using the RFC 7946
+   * format: https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.6.
+   *
+   * Note: The RFC 7946 format supports MultiPolygons, so one `display_polygon`
+   * object can represent multiple polygons.
+   * 
+ * + * .google.protobuf.Struct display_polygon = 10; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getDisplayPolygonOrBuilder() { + return displayPolygon_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : displayPolygon_; + } + + 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.GeneratedMessage.isStringEmpty(place_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, place_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(placeId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, placeId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getDisplayName()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(primaryType_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, primaryType_); + } + for (int i = 0; i < types_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, types_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(formattedAddress_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, formattedAddress_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(7, getPostalAddress()); + } + if (structureType_ + != com.google.maps.geocode.v4.PlaceView.StructureType.STRUCTURE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(8, structureType_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(9, getLocation()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(10, getDisplayPolygon()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(place_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, place_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(placeId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, placeId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDisplayName()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(primaryType_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, primaryType_); + } + { + int dataSize = 0; + for (int i = 0; i < types_.size(); i++) { + dataSize += computeStringSizeNoTag(types_.getRaw(i)); + } + size += dataSize; + size += 1 * getTypesList().size(); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(formattedAddress_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, formattedAddress_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getPostalAddress()); + } + if (structureType_ + != com.google.maps.geocode.v4.PlaceView.StructureType.STRUCTURE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, structureType_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getLocation()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getDisplayPolygon()); + } + 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.geocode.v4.PlaceView)) { + return super.equals(obj); + } + com.google.maps.geocode.v4.PlaceView other = (com.google.maps.geocode.v4.PlaceView) obj; + + if (!getPlace().equals(other.getPlace())) return false; + if (!getPlaceId().equals(other.getPlaceId())) return false; + if (hasDisplayName() != other.hasDisplayName()) return false; + if (hasDisplayName()) { + if (!getDisplayName().equals(other.getDisplayName())) return false; + } + if (!getPrimaryType().equals(other.getPrimaryType())) return false; + if (!getTypesList().equals(other.getTypesList())) return false; + if (!getFormattedAddress().equals(other.getFormattedAddress())) return false; + if (hasPostalAddress() != other.hasPostalAddress()) return false; + if (hasPostalAddress()) { + if (!getPostalAddress().equals(other.getPostalAddress())) return false; + } + if (structureType_ != other.structureType_) return false; + if (hasLocation() != other.hasLocation()) return false; + if (hasLocation()) { + if (!getLocation().equals(other.getLocation())) return false; + } + if (hasDisplayPolygon() != other.hasDisplayPolygon()) return false; + if (hasDisplayPolygon()) { + if (!getDisplayPolygon().equals(other.getDisplayPolygon())) 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 = (37 * hash) + PLACE_ID_FIELD_NUMBER; + hash = (53 * hash) + getPlaceId().hashCode(); + if (hasDisplayName()) { + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + } + hash = (37 * hash) + PRIMARY_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getPrimaryType().hashCode(); + if (getTypesCount() > 0) { + hash = (37 * hash) + TYPES_FIELD_NUMBER; + hash = (53 * hash) + getTypesList().hashCode(); + } + hash = (37 * hash) + FORMATTED_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getFormattedAddress().hashCode(); + if (hasPostalAddress()) { + hash = (37 * hash) + POSTAL_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getPostalAddress().hashCode(); + } + hash = (37 * hash) + STRUCTURE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + structureType_; + if (hasLocation()) { + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + } + if (hasDisplayPolygon()) { + hash = (37 * hash) + DISPLAY_POLYGON_FIELD_NUMBER; + hash = (53 * hash) + getDisplayPolygon().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.geocode.v4.PlaceView parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.PlaceView 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.geocode.v4.PlaceView parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.PlaceView 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.geocode.v4.PlaceView parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.PlaceView parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.geocode.v4.PlaceView parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.PlaceView parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.PlaceView parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.PlaceView parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.PlaceView parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.PlaceView parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geocode.v4.PlaceView 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents a view of a
+   * [Place](https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places#resource:-place)
+   * in the Places API. It also provides additional information specific to
+   * destinations, such as the structure type and the display polygon.
+   *
+   * In some cases, a `PlaceView` with the same place ID might differ from what
+   * is being returned by the Places API for the `types` and
+   * `display_name` fields.
+   * 
+ * + * Protobuf type {@code google.maps.geocode.v4.PlaceView} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.geocode.v4.PlaceView) + com.google.maps.geocode.v4.PlaceViewOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_PlaceView_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_PlaceView_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.PlaceView.class, + com.google.maps.geocode.v4.PlaceView.Builder.class); + } + + // Construct using com.google.maps.geocode.v4.PlaceView.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDisplayNameFieldBuilder(); + internalGetPostalAddressFieldBuilder(); + internalGetLocationFieldBuilder(); + internalGetDisplayPolygonFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + place_ = ""; + placeId_ = ""; + displayName_ = null; + if (displayNameBuilder_ != null) { + displayNameBuilder_.dispose(); + displayNameBuilder_ = null; + } + primaryType_ = ""; + types_ = com.google.protobuf.LazyStringArrayList.emptyList(); + formattedAddress_ = ""; + postalAddress_ = null; + if (postalAddressBuilder_ != null) { + postalAddressBuilder_.dispose(); + postalAddressBuilder_ = null; + } + structureType_ = 0; + location_ = null; + if (locationBuilder_ != null) { + locationBuilder_.dispose(); + locationBuilder_ = null; + } + displayPolygon_ = null; + if (displayPolygonBuilder_ != null) { + displayPolygonBuilder_.dispose(); + displayPolygonBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_PlaceView_descriptor; + } + + @java.lang.Override + public com.google.maps.geocode.v4.PlaceView getDefaultInstanceForType() { + return com.google.maps.geocode.v4.PlaceView.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.geocode.v4.PlaceView build() { + com.google.maps.geocode.v4.PlaceView result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.geocode.v4.PlaceView buildPartial() { + com.google.maps.geocode.v4.PlaceView result = new com.google.maps.geocode.v4.PlaceView(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.geocode.v4.PlaceView result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.place_ = place_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.placeId_ = placeId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.displayName_ = + displayNameBuilder_ == null ? displayName_ : displayNameBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.primaryType_ = primaryType_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + types_.makeImmutable(); + result.types_ = types_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.formattedAddress_ = formattedAddress_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.postalAddress_ = + postalAddressBuilder_ == null ? postalAddress_ : postalAddressBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.structureType_ = structureType_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.location_ = locationBuilder_ == null ? location_ : locationBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.displayPolygon_ = + displayPolygonBuilder_ == null ? displayPolygon_ : displayPolygonBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.geocode.v4.PlaceView) { + return mergeFrom((com.google.maps.geocode.v4.PlaceView) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.geocode.v4.PlaceView other) { + if (other == com.google.maps.geocode.v4.PlaceView.getDefaultInstance()) return this; + if (!other.getPlace().isEmpty()) { + place_ = other.place_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPlaceId().isEmpty()) { + placeId_ = other.placeId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasDisplayName()) { + mergeDisplayName(other.getDisplayName()); + } + if (!other.getPrimaryType().isEmpty()) { + primaryType_ = other.primaryType_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.types_.isEmpty()) { + if (types_.isEmpty()) { + types_ = other.types_; + bitField0_ |= 0x00000010; + } else { + ensureTypesIsMutable(); + types_.addAll(other.types_); + } + onChanged(); + } + if (!other.getFormattedAddress().isEmpty()) { + formattedAddress_ = other.formattedAddress_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.hasPostalAddress()) { + mergePostalAddress(other.getPostalAddress()); + } + if (other.structureType_ != 0) { + setStructureTypeValue(other.getStructureTypeValue()); + } + if (other.hasLocation()) { + mergeLocation(other.getLocation()); + } + if (other.hasDisplayPolygon()) { + mergeDisplayPolygon(other.getDisplayPolygon()); + } + 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 + case 18: + { + placeId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetDisplayNameFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + primaryType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTypesIsMutable(); + types_.add(s); + break; + } // case 42 + case 50: + { + formattedAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetPostalAddressFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 64: + { + structureType_ = input.readEnum(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 74: + { + input.readMessage( + internalGetLocationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: + { + input.readMessage( + internalGetDisplayPolygonFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 82 + 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_ = ""; + + /** + * + * + *
+     * This Place's resource name, in `places/{placeId}` format.  Can be used to
+     * look up the Place.
+     * 
+ * + * string place = 1; + * + * @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; + } + } + + /** + * + * + *
+     * This Place's resource name, in `places/{placeId}` format.  Can be used to
+     * look up the Place.
+     * 
+ * + * string place = 1; + * + * @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; + } + } + + /** + * + * + *
+     * This Place's resource name, in `places/{placeId}` format.  Can be used to
+     * look up the Place.
+     * 
+ * + * string place = 1; + * + * @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; + } + + /** + * + * + *
+     * This Place's resource name, in `places/{placeId}` format.  Can be used to
+     * look up the Place.
+     * 
+ * + * string place = 1; + * + * @return This builder for chaining. + */ + public Builder clearPlace() { + place_ = getDefaultInstance().getPlace(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * This Place's resource name, in `places/{placeId}` format.  Can be used to
+     * look up the Place.
+     * 
+ * + * string place = 1; + * + * @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; + } + + private java.lang.Object placeId_ = ""; + + /** + * + * + *
+     * The unique identifier of a place.
+     * 
+ * + * string place_id = 2; + * + * @return The placeId. + */ + public java.lang.String getPlaceId() { + java.lang.Object ref = placeId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + placeId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The unique identifier of a place.
+     * 
+ * + * string place_id = 2; + * + * @return The bytes for placeId. + */ + public com.google.protobuf.ByteString getPlaceIdBytes() { + java.lang.Object ref = placeId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + placeId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The unique identifier of a place.
+     * 
+ * + * string place_id = 2; + * + * @param value The placeId to set. + * @return This builder for chaining. + */ + public Builder setPlaceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + placeId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The unique identifier of a place.
+     * 
+ * + * string place_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearPlaceId() { + placeId_ = getDefaultInstance().getPlaceId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * The unique identifier of a place.
+     * 
+ * + * string place_id = 2; + * + * @param value The bytes for placeId to set. + * @return This builder for chaining. + */ + public Builder setPlaceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + placeId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.type.LocalizedText displayName_; + private com.google.protobuf.SingleFieldBuilder< + com.google.type.LocalizedText, + com.google.type.LocalizedText.Builder, + com.google.type.LocalizedTextOrBuilder> + displayNameBuilder_; + + /** + * + * + *
+     * Human readable place description. For example, "Gate B", "McDonalds"
+     * 
+ * + * .google.type.LocalizedText display_name = 3; + * + * @return Whether the displayName field is set. + */ + public boolean hasDisplayName() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Human readable place description. For example, "Gate B", "McDonalds"
+     * 
+ * + * .google.type.LocalizedText display_name = 3; + * + * @return The displayName. + */ + public com.google.type.LocalizedText getDisplayName() { + if (displayNameBuilder_ == null) { + return displayName_ == null + ? com.google.type.LocalizedText.getDefaultInstance() + : displayName_; + } else { + return displayNameBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Human readable place description. For example, "Gate B", "McDonalds"
+     * 
+ * + * .google.type.LocalizedText display_name = 3; + */ + public Builder setDisplayName(com.google.type.LocalizedText value) { + if (displayNameBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + } else { + displayNameBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Human readable place description. For example, "Gate B", "McDonalds"
+     * 
+ * + * .google.type.LocalizedText display_name = 3; + */ + public Builder setDisplayName(com.google.type.LocalizedText.Builder builderForValue) { + if (displayNameBuilder_ == null) { + displayName_ = builderForValue.build(); + } else { + displayNameBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Human readable place description. For example, "Gate B", "McDonalds"
+     * 
+ * + * .google.type.LocalizedText display_name = 3; + */ + public Builder mergeDisplayName(com.google.type.LocalizedText value) { + if (displayNameBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && displayName_ != null + && displayName_ != com.google.type.LocalizedText.getDefaultInstance()) { + getDisplayNameBuilder().mergeFrom(value); + } else { + displayName_ = value; + } + } else { + displayNameBuilder_.mergeFrom(value); + } + if (displayName_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Human readable place description. For example, "Gate B", "McDonalds"
+     * 
+ * + * .google.type.LocalizedText display_name = 3; + */ + public Builder clearDisplayName() { + bitField0_ = (bitField0_ & ~0x00000004); + displayName_ = null; + if (displayNameBuilder_ != null) { + displayNameBuilder_.dispose(); + displayNameBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Human readable place description. For example, "Gate B", "McDonalds"
+     * 
+ * + * .google.type.LocalizedText display_name = 3; + */ + public com.google.type.LocalizedText.Builder getDisplayNameBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetDisplayNameFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Human readable place description. For example, "Gate B", "McDonalds"
+     * 
+ * + * .google.type.LocalizedText display_name = 3; + */ + public com.google.type.LocalizedTextOrBuilder getDisplayNameOrBuilder() { + if (displayNameBuilder_ != null) { + return displayNameBuilder_.getMessageOrBuilder(); + } else { + return displayName_ == null + ? com.google.type.LocalizedText.getDefaultInstance() + : displayName_; + } + } + + /** + * + * + *
+     * Human readable place description. For example, "Gate B", "McDonalds"
+     * 
+ * + * .google.type.LocalizedText display_name = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.LocalizedText, + com.google.type.LocalizedText.Builder, + com.google.type.LocalizedTextOrBuilder> + internalGetDisplayNameFieldBuilder() { + if (displayNameBuilder_ == null) { + displayNameBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.LocalizedText, + com.google.type.LocalizedText.Builder, + com.google.type.LocalizedTextOrBuilder>( + getDisplayName(), getParentForChildren(), isClean()); + displayName_ = null; + } + return displayNameBuilder_; + } + + private java.lang.Object primaryType_ = ""; + + /** + * + * + *
+     * The primary place type of this place. See
+     * https://developers.google.com/maps/documentation/places/web-service/place-types
+     * for the list of possible values.
+     *
+     * Note: This field is not always populated. Be prepared to use the `types`
+     * field in such situations.
+     * 
+ * + * string primary_type = 4; + * + * @return The primaryType. + */ + public java.lang.String getPrimaryType() { + java.lang.Object ref = primaryType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + primaryType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The primary place type of this place. See
+     * https://developers.google.com/maps/documentation/places/web-service/place-types
+     * for the list of possible values.
+     *
+     * Note: This field is not always populated. Be prepared to use the `types`
+     * field in such situations.
+     * 
+ * + * string primary_type = 4; + * + * @return The bytes for primaryType. + */ + public com.google.protobuf.ByteString getPrimaryTypeBytes() { + java.lang.Object ref = primaryType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + primaryType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The primary place type of this place. See
+     * https://developers.google.com/maps/documentation/places/web-service/place-types
+     * for the list of possible values.
+     *
+     * Note: This field is not always populated. Be prepared to use the `types`
+     * field in such situations.
+     * 
+ * + * string primary_type = 4; + * + * @param value The primaryType to set. + * @return This builder for chaining. + */ + public Builder setPrimaryType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + primaryType_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * The primary place type of this place. See
+     * https://developers.google.com/maps/documentation/places/web-service/place-types
+     * for the list of possible values.
+     *
+     * Note: This field is not always populated. Be prepared to use the `types`
+     * field in such situations.
+     * 
+ * + * string primary_type = 4; + * + * @return This builder for chaining. + */ + public Builder clearPrimaryType() { + primaryType_ = getDefaultInstance().getPrimaryType(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * The primary place type of this place. See
+     * https://developers.google.com/maps/documentation/places/web-service/place-types
+     * for the list of possible values.
+     *
+     * Note: This field is not always populated. Be prepared to use the `types`
+     * field in such situations.
+     * 
+ * + * string primary_type = 4; + * + * @param value The bytes for primaryType to set. + * @return This builder for chaining. + */ + public Builder setPrimaryTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + primaryType_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList types_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureTypesIsMutable() { + if (!types_.isModifiable()) { + types_ = new com.google.protobuf.LazyStringArrayList(types_); + } + bitField0_ |= 0x00000010; + } + + /** + * + * + *
+     * All associated place types of this place. See
+     * https://developers.google.com/maps/documentation/places/web-service/place-types
+     * for the list of possible values.
+     * 
+ * + * repeated string types = 5; + * + * @return A list containing the types. + */ + public com.google.protobuf.ProtocolStringList getTypesList() { + types_.makeImmutable(); + return types_; + } + + /** + * + * + *
+     * All associated place types of this place. See
+     * https://developers.google.com/maps/documentation/places/web-service/place-types
+     * for the list of possible values.
+     * 
+ * + * repeated string types = 5; + * + * @return The count of types. + */ + public int getTypesCount() { + return types_.size(); + } + + /** + * + * + *
+     * All associated place types of this place. See
+     * https://developers.google.com/maps/documentation/places/web-service/place-types
+     * for the list of possible values.
+     * 
+ * + * repeated string types = 5; + * + * @param index The index of the element to return. + * @return The types at the given index. + */ + public java.lang.String getTypes(int index) { + return types_.get(index); + } + + /** + * + * + *
+     * All associated place types of this place. See
+     * https://developers.google.com/maps/documentation/places/web-service/place-types
+     * for the list of possible values.
+     * 
+ * + * repeated string types = 5; + * + * @param index The index of the value to return. + * @return The bytes of the types at the given index. + */ + public com.google.protobuf.ByteString getTypesBytes(int index) { + return types_.getByteString(index); + } + + /** + * + * + *
+     * All associated place types of this place. See
+     * https://developers.google.com/maps/documentation/places/web-service/place-types
+     * for the list of possible values.
+     * 
+ * + * repeated string types = 5; + * + * @param index The index to set the value at. + * @param value The types to set. + * @return This builder for chaining. + */ + public Builder setTypes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypesIsMutable(); + types_.set(index, value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * All associated place types of this place. See
+     * https://developers.google.com/maps/documentation/places/web-service/place-types
+     * for the list of possible values.
+     * 
+ * + * repeated string types = 5; + * + * @param value The types to add. + * @return This builder for chaining. + */ + public Builder addTypes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypesIsMutable(); + types_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * All associated place types of this place. See
+     * https://developers.google.com/maps/documentation/places/web-service/place-types
+     * for the list of possible values.
+     * 
+ * + * repeated string types = 5; + * + * @param values The types to add. + * @return This builder for chaining. + */ + public Builder addAllTypes(java.lang.Iterable values) { + ensureTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, types_); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * All associated place types of this place. See
+     * https://developers.google.com/maps/documentation/places/web-service/place-types
+     * for the list of possible values.
+     * 
+ * + * repeated string types = 5; + * + * @return This builder for chaining. + */ + public Builder clearTypes() { + types_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * All associated place types of this place. See
+     * https://developers.google.com/maps/documentation/places/web-service/place-types
+     * for the list of possible values.
+     * 
+ * + * repeated string types = 5; + * + * @param value The bytes of the types to add. + * @return This builder for chaining. + */ + public Builder addTypesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTypesIsMutable(); + types_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object formattedAddress_ = ""; + + /** + * + * + *
+     * One line address.
+     * 
+ * + * string formatted_address = 6; + * + * @return The formattedAddress. + */ + public java.lang.String getFormattedAddress() { + java.lang.Object ref = formattedAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + formattedAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * One line address.
+     * 
+ * + * string formatted_address = 6; + * + * @return The bytes for formattedAddress. + */ + public com.google.protobuf.ByteString getFormattedAddressBytes() { + java.lang.Object ref = formattedAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + formattedAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * One line address.
+     * 
+ * + * string formatted_address = 6; + * + * @param value The formattedAddress to set. + * @return This builder for chaining. + */ + public Builder setFormattedAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + formattedAddress_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * One line address.
+     * 
+ * + * string formatted_address = 6; + * + * @return This builder for chaining. + */ + public Builder clearFormattedAddress() { + formattedAddress_ = getDefaultInstance().getFormattedAddress(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * One line address.
+     * 
+ * + * string formatted_address = 6; + * + * @param value The bytes for formattedAddress to set. + * @return This builder for chaining. + */ + public Builder setFormattedAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + formattedAddress_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.type.PostalAddress postalAddress_; + private com.google.protobuf.SingleFieldBuilder< + com.google.type.PostalAddress, + com.google.type.PostalAddress.Builder, + com.google.type.PostalAddressOrBuilder> + postalAddressBuilder_; + + /** + * + * + *
+     * Structured address.
+     * 
+ * + * .google.type.PostalAddress postal_address = 7; + * + * @return Whether the postalAddress field is set. + */ + public boolean hasPostalAddress() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Structured address.
+     * 
+ * + * .google.type.PostalAddress postal_address = 7; + * + * @return The postalAddress. + */ + public com.google.type.PostalAddress getPostalAddress() { + if (postalAddressBuilder_ == null) { + return postalAddress_ == null + ? com.google.type.PostalAddress.getDefaultInstance() + : postalAddress_; + } else { + return postalAddressBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Structured address.
+     * 
+ * + * .google.type.PostalAddress postal_address = 7; + */ + public Builder setPostalAddress(com.google.type.PostalAddress value) { + if (postalAddressBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + postalAddress_ = value; + } else { + postalAddressBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Structured address.
+     * 
+ * + * .google.type.PostalAddress postal_address = 7; + */ + public Builder setPostalAddress(com.google.type.PostalAddress.Builder builderForValue) { + if (postalAddressBuilder_ == null) { + postalAddress_ = builderForValue.build(); + } else { + postalAddressBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Structured address.
+     * 
+ * + * .google.type.PostalAddress postal_address = 7; + */ + public Builder mergePostalAddress(com.google.type.PostalAddress value) { + if (postalAddressBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && postalAddress_ != null + && postalAddress_ != com.google.type.PostalAddress.getDefaultInstance()) { + getPostalAddressBuilder().mergeFrom(value); + } else { + postalAddress_ = value; + } + } else { + postalAddressBuilder_.mergeFrom(value); + } + if (postalAddress_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Structured address.
+     * 
+ * + * .google.type.PostalAddress postal_address = 7; + */ + public Builder clearPostalAddress() { + bitField0_ = (bitField0_ & ~0x00000040); + postalAddress_ = null; + if (postalAddressBuilder_ != null) { + postalAddressBuilder_.dispose(); + postalAddressBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Structured address.
+     * 
+ * + * .google.type.PostalAddress postal_address = 7; + */ + public com.google.type.PostalAddress.Builder getPostalAddressBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetPostalAddressFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Structured address.
+     * 
+ * + * .google.type.PostalAddress postal_address = 7; + */ + public com.google.type.PostalAddressOrBuilder getPostalAddressOrBuilder() { + if (postalAddressBuilder_ != null) { + return postalAddressBuilder_.getMessageOrBuilder(); + } else { + return postalAddress_ == null + ? com.google.type.PostalAddress.getDefaultInstance() + : postalAddress_; + } + } + + /** + * + * + *
+     * Structured address.
+     * 
+ * + * .google.type.PostalAddress postal_address = 7; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.PostalAddress, + com.google.type.PostalAddress.Builder, + com.google.type.PostalAddressOrBuilder> + internalGetPostalAddressFieldBuilder() { + if (postalAddressBuilder_ == null) { + postalAddressBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.PostalAddress, + com.google.type.PostalAddress.Builder, + com.google.type.PostalAddressOrBuilder>( + getPostalAddress(), getParentForChildren(), isClean()); + postalAddress_ = null; + } + return postalAddressBuilder_; + } + + private int structureType_ = 0; + + /** + * + * + *
+     * The type of structure corresponding to this place.
+     * 
+ * + * .google.maps.geocode.v4.PlaceView.StructureType structure_type = 8; + * + * @return The enum numeric value on the wire for structureType. + */ + @java.lang.Override + public int getStructureTypeValue() { + return structureType_; + } + + /** + * + * + *
+     * The type of structure corresponding to this place.
+     * 
+ * + * .google.maps.geocode.v4.PlaceView.StructureType structure_type = 8; + * + * @param value The enum numeric value on the wire for structureType to set. + * @return This builder for chaining. + */ + public Builder setStructureTypeValue(int value) { + structureType_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * The type of structure corresponding to this place.
+     * 
+ * + * .google.maps.geocode.v4.PlaceView.StructureType structure_type = 8; + * + * @return The structureType. + */ + @java.lang.Override + public com.google.maps.geocode.v4.PlaceView.StructureType getStructureType() { + com.google.maps.geocode.v4.PlaceView.StructureType result = + com.google.maps.geocode.v4.PlaceView.StructureType.forNumber(structureType_); + return result == null + ? com.google.maps.geocode.v4.PlaceView.StructureType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * The type of structure corresponding to this place.
+     * 
+ * + * .google.maps.geocode.v4.PlaceView.StructureType structure_type = 8; + * + * @param value The structureType to set. + * @return This builder for chaining. + */ + public Builder setStructureType(com.google.maps.geocode.v4.PlaceView.StructureType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + structureType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * The type of structure corresponding to this place.
+     * 
+ * + * .google.maps.geocode.v4.PlaceView.StructureType structure_type = 8; + * + * @return This builder for chaining. + */ + public Builder clearStructureType() { + bitField0_ = (bitField0_ & ~0x00000080); + structureType_ = 0; + onChanged(); + return this; + } + + private com.google.type.LatLng location_; + private com.google.protobuf.SingleFieldBuilder< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + locationBuilder_; + + /** + * + * + *
+     * The location of this place. For places with display polygons, this can
+     * represent a good spot to put a marker on the map.
+     * 
+ * + * .google.type.LatLng location = 9; + * + * @return Whether the location field is set. + */ + public boolean hasLocation() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+     * The location of this place. For places with display polygons, this can
+     * represent a good spot to put a marker on the map.
+     * 
+ * + * .google.type.LatLng location = 9; + * + * @return The location. + */ + public com.google.type.LatLng getLocation() { + if (locationBuilder_ == null) { + return location_ == null ? com.google.type.LatLng.getDefaultInstance() : location_; + } else { + return locationBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The location of this place. For places with display polygons, this can
+     * represent a good spot to put a marker on the map.
+     * 
+ * + * .google.type.LatLng location = 9; + */ + public Builder setLocation(com.google.type.LatLng value) { + if (locationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + } else { + locationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * The location of this place. For places with display polygons, this can
+     * represent a good spot to put a marker on the map.
+     * 
+ * + * .google.type.LatLng location = 9; + */ + public Builder setLocation(com.google.type.LatLng.Builder builderForValue) { + if (locationBuilder_ == null) { + location_ = builderForValue.build(); + } else { + locationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * The location of this place. For places with display polygons, this can
+     * represent a good spot to put a marker on the map.
+     * 
+ * + * .google.type.LatLng location = 9; + */ + public Builder mergeLocation(com.google.type.LatLng value) { + if (locationBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && location_ != null + && location_ != com.google.type.LatLng.getDefaultInstance()) { + getLocationBuilder().mergeFrom(value); + } else { + location_ = value; + } + } else { + locationBuilder_.mergeFrom(value); + } + if (location_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The location of this place. For places with display polygons, this can
+     * represent a good spot to put a marker on the map.
+     * 
+ * + * .google.type.LatLng location = 9; + */ + public Builder clearLocation() { + bitField0_ = (bitField0_ & ~0x00000100); + location_ = null; + if (locationBuilder_ != null) { + locationBuilder_.dispose(); + locationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The location of this place. For places with display polygons, this can
+     * represent a good spot to put a marker on the map.
+     * 
+ * + * .google.type.LatLng location = 9; + */ + public com.google.type.LatLng.Builder getLocationBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return internalGetLocationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The location of this place. For places with display polygons, this can
+     * represent a good spot to put a marker on the map.
+     * 
+ * + * .google.type.LatLng location = 9; + */ + public com.google.type.LatLngOrBuilder getLocationOrBuilder() { + if (locationBuilder_ != null) { + return locationBuilder_.getMessageOrBuilder(); + } else { + return location_ == null ? com.google.type.LatLng.getDefaultInstance() : location_; + } + } + + /** + * + * + *
+     * The location of this place. For places with display polygons, this can
+     * represent a good spot to put a marker on the map.
+     * 
+ * + * .google.type.LatLng location = 9; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + internalGetLocationFieldBuilder() { + if (locationBuilder_ == null) { + locationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.LatLng, + com.google.type.LatLng.Builder, + com.google.type.LatLngOrBuilder>(getLocation(), getParentForChildren(), isClean()); + location_ = null; + } + return locationBuilder_; + } + + private com.google.protobuf.Struct displayPolygon_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + displayPolygonBuilder_; + + /** + * + * + *
+     * The polygon outline of the place in GeoJSON format, using the RFC 7946
+     * format: https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.6.
+     *
+     * Note: The RFC 7946 format supports MultiPolygons, so one `display_polygon`
+     * object can represent multiple polygons.
+     * 
+ * + * .google.protobuf.Struct display_polygon = 10; + * + * @return Whether the displayPolygon field is set. + */ + public boolean hasDisplayPolygon() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
+     * The polygon outline of the place in GeoJSON format, using the RFC 7946
+     * format: https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.6.
+     *
+     * Note: The RFC 7946 format supports MultiPolygons, so one `display_polygon`
+     * object can represent multiple polygons.
+     * 
+ * + * .google.protobuf.Struct display_polygon = 10; + * + * @return The displayPolygon. + */ + public com.google.protobuf.Struct getDisplayPolygon() { + if (displayPolygonBuilder_ == null) { + return displayPolygon_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : displayPolygon_; + } else { + return displayPolygonBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The polygon outline of the place in GeoJSON format, using the RFC 7946
+     * format: https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.6.
+     *
+     * Note: The RFC 7946 format supports MultiPolygons, so one `display_polygon`
+     * object can represent multiple polygons.
+     * 
+ * + * .google.protobuf.Struct display_polygon = 10; + */ + public Builder setDisplayPolygon(com.google.protobuf.Struct value) { + if (displayPolygonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + displayPolygon_ = value; + } else { + displayPolygonBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * The polygon outline of the place in GeoJSON format, using the RFC 7946
+     * format: https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.6.
+     *
+     * Note: The RFC 7946 format supports MultiPolygons, so one `display_polygon`
+     * object can represent multiple polygons.
+     * 
+ * + * .google.protobuf.Struct display_polygon = 10; + */ + public Builder setDisplayPolygon(com.google.protobuf.Struct.Builder builderForValue) { + if (displayPolygonBuilder_ == null) { + displayPolygon_ = builderForValue.build(); + } else { + displayPolygonBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * The polygon outline of the place in GeoJSON format, using the RFC 7946
+     * format: https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.6.
+     *
+     * Note: The RFC 7946 format supports MultiPolygons, so one `display_polygon`
+     * object can represent multiple polygons.
+     * 
+ * + * .google.protobuf.Struct display_polygon = 10; + */ + public Builder mergeDisplayPolygon(com.google.protobuf.Struct value) { + if (displayPolygonBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && displayPolygon_ != null + && displayPolygon_ != com.google.protobuf.Struct.getDefaultInstance()) { + getDisplayPolygonBuilder().mergeFrom(value); + } else { + displayPolygon_ = value; + } + } else { + displayPolygonBuilder_.mergeFrom(value); + } + if (displayPolygon_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The polygon outline of the place in GeoJSON format, using the RFC 7946
+     * format: https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.6.
+     *
+     * Note: The RFC 7946 format supports MultiPolygons, so one `display_polygon`
+     * object can represent multiple polygons.
+     * 
+ * + * .google.protobuf.Struct display_polygon = 10; + */ + public Builder clearDisplayPolygon() { + bitField0_ = (bitField0_ & ~0x00000200); + displayPolygon_ = null; + if (displayPolygonBuilder_ != null) { + displayPolygonBuilder_.dispose(); + displayPolygonBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The polygon outline of the place in GeoJSON format, using the RFC 7946
+     * format: https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.6.
+     *
+     * Note: The RFC 7946 format supports MultiPolygons, so one `display_polygon`
+     * object can represent multiple polygons.
+     * 
+ * + * .google.protobuf.Struct display_polygon = 10; + */ + public com.google.protobuf.Struct.Builder getDisplayPolygonBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return internalGetDisplayPolygonFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The polygon outline of the place in GeoJSON format, using the RFC 7946
+     * format: https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.6.
+     *
+     * Note: The RFC 7946 format supports MultiPolygons, so one `display_polygon`
+     * object can represent multiple polygons.
+     * 
+ * + * .google.protobuf.Struct display_polygon = 10; + */ + public com.google.protobuf.StructOrBuilder getDisplayPolygonOrBuilder() { + if (displayPolygonBuilder_ != null) { + return displayPolygonBuilder_.getMessageOrBuilder(); + } else { + return displayPolygon_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : displayPolygon_; + } + } + + /** + * + * + *
+     * The polygon outline of the place in GeoJSON format, using the RFC 7946
+     * format: https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.6.
+     *
+     * Note: The RFC 7946 format supports MultiPolygons, so one `display_polygon`
+     * object can represent multiple polygons.
+     * 
+ * + * .google.protobuf.Struct display_polygon = 10; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + internalGetDisplayPolygonFieldBuilder() { + if (displayPolygonBuilder_ == null) { + displayPolygonBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getDisplayPolygon(), getParentForChildren(), isClean()); + displayPolygon_ = null; + } + return displayPolygonBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.maps.geocode.v4.PlaceView) + } + + // @@protoc_insertion_point(class_scope:google.maps.geocode.v4.PlaceView) + private static final com.google.maps.geocode.v4.PlaceView DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.geocode.v4.PlaceView(); + } + + public static com.google.maps.geocode.v4.PlaceView getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PlaceView 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.geocode.v4.PlaceView getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/PlaceViewOrBuilder.java b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/PlaceViewOrBuilder.java new file mode 100644 index 000000000000..ee2bc3f7f111 --- /dev/null +++ b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/PlaceViewOrBuilder.java @@ -0,0 +1,395 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/maps/geocode/v4/destination_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.geocode.v4; + +@com.google.protobuf.Generated +public interface PlaceViewOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.geocode.v4.PlaceView) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * This Place's resource name, in `places/{placeId}` format.  Can be used to
+   * look up the Place.
+   * 
+ * + * string place = 1; + * + * @return The place. + */ + java.lang.String getPlace(); + + /** + * + * + *
+   * This Place's resource name, in `places/{placeId}` format.  Can be used to
+   * look up the Place.
+   * 
+ * + * string place = 1; + * + * @return The bytes for place. + */ + com.google.protobuf.ByteString getPlaceBytes(); + + /** + * + * + *
+   * The unique identifier of a place.
+   * 
+ * + * string place_id = 2; + * + * @return The placeId. + */ + java.lang.String getPlaceId(); + + /** + * + * + *
+   * The unique identifier of a place.
+   * 
+ * + * string place_id = 2; + * + * @return The bytes for placeId. + */ + com.google.protobuf.ByteString getPlaceIdBytes(); + + /** + * + * + *
+   * Human readable place description. For example, "Gate B", "McDonalds"
+   * 
+ * + * .google.type.LocalizedText display_name = 3; + * + * @return Whether the displayName field is set. + */ + boolean hasDisplayName(); + + /** + * + * + *
+   * Human readable place description. For example, "Gate B", "McDonalds"
+   * 
+ * + * .google.type.LocalizedText display_name = 3; + * + * @return The displayName. + */ + com.google.type.LocalizedText getDisplayName(); + + /** + * + * + *
+   * Human readable place description. For example, "Gate B", "McDonalds"
+   * 
+ * + * .google.type.LocalizedText display_name = 3; + */ + com.google.type.LocalizedTextOrBuilder getDisplayNameOrBuilder(); + + /** + * + * + *
+   * The primary place type of this place. See
+   * https://developers.google.com/maps/documentation/places/web-service/place-types
+   * for the list of possible values.
+   *
+   * Note: This field is not always populated. Be prepared to use the `types`
+   * field in such situations.
+   * 
+ * + * string primary_type = 4; + * + * @return The primaryType. + */ + java.lang.String getPrimaryType(); + + /** + * + * + *
+   * The primary place type of this place. See
+   * https://developers.google.com/maps/documentation/places/web-service/place-types
+   * for the list of possible values.
+   *
+   * Note: This field is not always populated. Be prepared to use the `types`
+   * field in such situations.
+   * 
+ * + * string primary_type = 4; + * + * @return The bytes for primaryType. + */ + com.google.protobuf.ByteString getPrimaryTypeBytes(); + + /** + * + * + *
+   * All associated place types of this place. See
+   * https://developers.google.com/maps/documentation/places/web-service/place-types
+   * for the list of possible values.
+   * 
+ * + * repeated string types = 5; + * + * @return A list containing the types. + */ + java.util.List getTypesList(); + + /** + * + * + *
+   * All associated place types of this place. See
+   * https://developers.google.com/maps/documentation/places/web-service/place-types
+   * for the list of possible values.
+   * 
+ * + * repeated string types = 5; + * + * @return The count of types. + */ + int getTypesCount(); + + /** + * + * + *
+   * All associated place types of this place. See
+   * https://developers.google.com/maps/documentation/places/web-service/place-types
+   * for the list of possible values.
+   * 
+ * + * repeated string types = 5; + * + * @param index The index of the element to return. + * @return The types at the given index. + */ + java.lang.String getTypes(int index); + + /** + * + * + *
+   * All associated place types of this place. See
+   * https://developers.google.com/maps/documentation/places/web-service/place-types
+   * for the list of possible values.
+   * 
+ * + * repeated string types = 5; + * + * @param index The index of the value to return. + * @return The bytes of the types at the given index. + */ + com.google.protobuf.ByteString getTypesBytes(int index); + + /** + * + * + *
+   * One line address.
+   * 
+ * + * string formatted_address = 6; + * + * @return The formattedAddress. + */ + java.lang.String getFormattedAddress(); + + /** + * + * + *
+   * One line address.
+   * 
+ * + * string formatted_address = 6; + * + * @return The bytes for formattedAddress. + */ + com.google.protobuf.ByteString getFormattedAddressBytes(); + + /** + * + * + *
+   * Structured address.
+   * 
+ * + * .google.type.PostalAddress postal_address = 7; + * + * @return Whether the postalAddress field is set. + */ + boolean hasPostalAddress(); + + /** + * + * + *
+   * Structured address.
+   * 
+ * + * .google.type.PostalAddress postal_address = 7; + * + * @return The postalAddress. + */ + com.google.type.PostalAddress getPostalAddress(); + + /** + * + * + *
+   * Structured address.
+   * 
+ * + * .google.type.PostalAddress postal_address = 7; + */ + com.google.type.PostalAddressOrBuilder getPostalAddressOrBuilder(); + + /** + * + * + *
+   * The type of structure corresponding to this place.
+   * 
+ * + * .google.maps.geocode.v4.PlaceView.StructureType structure_type = 8; + * + * @return The enum numeric value on the wire for structureType. + */ + int getStructureTypeValue(); + + /** + * + * + *
+   * The type of structure corresponding to this place.
+   * 
+ * + * .google.maps.geocode.v4.PlaceView.StructureType structure_type = 8; + * + * @return The structureType. + */ + com.google.maps.geocode.v4.PlaceView.StructureType getStructureType(); + + /** + * + * + *
+   * The location of this place. For places with display polygons, this can
+   * represent a good spot to put a marker on the map.
+   * 
+ * + * .google.type.LatLng location = 9; + * + * @return Whether the location field is set. + */ + boolean hasLocation(); + + /** + * + * + *
+   * The location of this place. For places with display polygons, this can
+   * represent a good spot to put a marker on the map.
+   * 
+ * + * .google.type.LatLng location = 9; + * + * @return The location. + */ + com.google.type.LatLng getLocation(); + + /** + * + * + *
+   * The location of this place. For places with display polygons, this can
+   * represent a good spot to put a marker on the map.
+   * 
+ * + * .google.type.LatLng location = 9; + */ + com.google.type.LatLngOrBuilder getLocationOrBuilder(); + + /** + * + * + *
+   * The polygon outline of the place in GeoJSON format, using the RFC 7946
+   * format: https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.6.
+   *
+   * Note: The RFC 7946 format supports MultiPolygons, so one `display_polygon`
+   * object can represent multiple polygons.
+   * 
+ * + * .google.protobuf.Struct display_polygon = 10; + * + * @return Whether the displayPolygon field is set. + */ + boolean hasDisplayPolygon(); + + /** + * + * + *
+   * The polygon outline of the place in GeoJSON format, using the RFC 7946
+   * format: https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.6.
+   *
+   * Note: The RFC 7946 format supports MultiPolygons, so one `display_polygon`
+   * object can represent multiple polygons.
+   * 
+ * + * .google.protobuf.Struct display_polygon = 10; + * + * @return The displayPolygon. + */ + com.google.protobuf.Struct getDisplayPolygon(); + + /** + * + * + *
+   * The polygon outline of the place in GeoJSON format, using the RFC 7946
+   * format: https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.6.
+   *
+   * Note: The RFC 7946 format supports MultiPolygons, so one `display_polygon`
+   * object can represent multiple polygons.
+   * 
+ * + * .google.protobuf.Struct display_polygon = 10; + */ + com.google.protobuf.StructOrBuilder getDisplayPolygonOrBuilder(); +} diff --git a/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/PlusCode.java b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/PlusCode.java new file mode 100644 index 000000000000..c491a9b9daf9 --- /dev/null +++ b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/PlusCode.java @@ -0,0 +1,806 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/maps/geocode/v4/geocode_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.geocode.v4; + +/** + * + * + *
+ * Plus code (http://plus.codes) is a location reference with two formats:
+ * global code defining a 14mx14m (1/8000th of a degree) or smaller rectangle,
+ * and compound code, replacing the prefix with a reference location.
+ * 
+ * + * Protobuf type {@code google.maps.geocode.v4.PlusCode} + */ +@com.google.protobuf.Generated +public final class PlusCode extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.maps.geocode.v4.PlusCode) + PlusCodeOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PlusCode"); + } + + // Use PlusCode.newBuilder() to construct. + private PlusCode(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PlusCode() { + globalCode_ = ""; + compoundCode_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_PlusCode_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_PlusCode_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.PlusCode.class, + com.google.maps.geocode.v4.PlusCode.Builder.class); + } + + public static final int GLOBAL_CODE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object globalCode_ = ""; + + /** + * + * + *
+   * Place's global (full) code, such as "9FWM33GV+HQ", representing an
+   * 1/8000 by 1/8000 degree area (~14 by 14 meters).
+   * 
+ * + * string global_code = 1; + * + * @return The globalCode. + */ + @java.lang.Override + public java.lang.String getGlobalCode() { + java.lang.Object ref = globalCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + globalCode_ = s; + return s; + } + } + + /** + * + * + *
+   * Place's global (full) code, such as "9FWM33GV+HQ", representing an
+   * 1/8000 by 1/8000 degree area (~14 by 14 meters).
+   * 
+ * + * string global_code = 1; + * + * @return The bytes for globalCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGlobalCodeBytes() { + java.lang.Object ref = globalCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + globalCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COMPOUND_CODE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object compoundCode_ = ""; + + /** + * + * + *
+   * Place's compound code, such as "33GV+HQ, Ramberg, Norway", containing
+   * the suffix of the global code and replacing the prefix with a formatted
+   * name of a reference entity.
+   * 
+ * + * string compound_code = 2; + * + * @return The compoundCode. + */ + @java.lang.Override + public java.lang.String getCompoundCode() { + java.lang.Object ref = compoundCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + compoundCode_ = s; + return s; + } + } + + /** + * + * + *
+   * Place's compound code, such as "33GV+HQ, Ramberg, Norway", containing
+   * the suffix of the global code and replacing the prefix with a formatted
+   * name of a reference entity.
+   * 
+ * + * string compound_code = 2; + * + * @return The bytes for compoundCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCompoundCodeBytes() { + java.lang.Object ref = compoundCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + compoundCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(globalCode_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, globalCode_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(compoundCode_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, compoundCode_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(globalCode_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, globalCode_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(compoundCode_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, compoundCode_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.maps.geocode.v4.PlusCode)) { + return super.equals(obj); + } + com.google.maps.geocode.v4.PlusCode other = (com.google.maps.geocode.v4.PlusCode) obj; + + if (!getGlobalCode().equals(other.getGlobalCode())) return false; + if (!getCompoundCode().equals(other.getCompoundCode())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GLOBAL_CODE_FIELD_NUMBER; + hash = (53 * hash) + getGlobalCode().hashCode(); + hash = (37 * hash) + COMPOUND_CODE_FIELD_NUMBER; + hash = (53 * hash) + getCompoundCode().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.geocode.v4.PlusCode parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.PlusCode parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.geocode.v4.PlusCode parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.PlusCode parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.geocode.v4.PlusCode parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.PlusCode parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.geocode.v4.PlusCode parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.PlusCode parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.PlusCode parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.PlusCode parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.PlusCode parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.PlusCode parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geocode.v4.PlusCode prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Plus code (http://plus.codes) is a location reference with two formats:
+   * global code defining a 14mx14m (1/8000th of a degree) or smaller rectangle,
+   * and compound code, replacing the prefix with a reference location.
+   * 
+ * + * Protobuf type {@code google.maps.geocode.v4.PlusCode} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.geocode.v4.PlusCode) + com.google.maps.geocode.v4.PlusCodeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_PlusCode_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_PlusCode_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.PlusCode.class, + com.google.maps.geocode.v4.PlusCode.Builder.class); + } + + // Construct using com.google.maps.geocode.v4.PlusCode.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + globalCode_ = ""; + compoundCode_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.geocode.v4.GeocodeServiceProto + .internal_static_google_maps_geocode_v4_PlusCode_descriptor; + } + + @java.lang.Override + public com.google.maps.geocode.v4.PlusCode getDefaultInstanceForType() { + return com.google.maps.geocode.v4.PlusCode.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.geocode.v4.PlusCode build() { + com.google.maps.geocode.v4.PlusCode result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.geocode.v4.PlusCode buildPartial() { + com.google.maps.geocode.v4.PlusCode result = new com.google.maps.geocode.v4.PlusCode(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.geocode.v4.PlusCode result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.globalCode_ = globalCode_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.compoundCode_ = compoundCode_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.geocode.v4.PlusCode) { + return mergeFrom((com.google.maps.geocode.v4.PlusCode) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.geocode.v4.PlusCode other) { + if (other == com.google.maps.geocode.v4.PlusCode.getDefaultInstance()) return this; + if (!other.getGlobalCode().isEmpty()) { + globalCode_ = other.globalCode_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getCompoundCode().isEmpty()) { + compoundCode_ = other.compoundCode_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + globalCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + compoundCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object globalCode_ = ""; + + /** + * + * + *
+     * Place's global (full) code, such as "9FWM33GV+HQ", representing an
+     * 1/8000 by 1/8000 degree area (~14 by 14 meters).
+     * 
+ * + * string global_code = 1; + * + * @return The globalCode. + */ + public java.lang.String getGlobalCode() { + java.lang.Object ref = globalCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + globalCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Place's global (full) code, such as "9FWM33GV+HQ", representing an
+     * 1/8000 by 1/8000 degree area (~14 by 14 meters).
+     * 
+ * + * string global_code = 1; + * + * @return The bytes for globalCode. + */ + public com.google.protobuf.ByteString getGlobalCodeBytes() { + java.lang.Object ref = globalCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + globalCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Place's global (full) code, such as "9FWM33GV+HQ", representing an
+     * 1/8000 by 1/8000 degree area (~14 by 14 meters).
+     * 
+ * + * string global_code = 1; + * + * @param value The globalCode to set. + * @return This builder for chaining. + */ + public Builder setGlobalCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + globalCode_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Place's global (full) code, such as "9FWM33GV+HQ", representing an
+     * 1/8000 by 1/8000 degree area (~14 by 14 meters).
+     * 
+ * + * string global_code = 1; + * + * @return This builder for chaining. + */ + public Builder clearGlobalCode() { + globalCode_ = getDefaultInstance().getGlobalCode(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Place's global (full) code, such as "9FWM33GV+HQ", representing an
+     * 1/8000 by 1/8000 degree area (~14 by 14 meters).
+     * 
+ * + * string global_code = 1; + * + * @param value The bytes for globalCode to set. + * @return This builder for chaining. + */ + public Builder setGlobalCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + globalCode_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object compoundCode_ = ""; + + /** + * + * + *
+     * Place's compound code, such as "33GV+HQ, Ramberg, Norway", containing
+     * the suffix of the global code and replacing the prefix with a formatted
+     * name of a reference entity.
+     * 
+ * + * string compound_code = 2; + * + * @return The compoundCode. + */ + public java.lang.String getCompoundCode() { + java.lang.Object ref = compoundCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + compoundCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Place's compound code, such as "33GV+HQ, Ramberg, Norway", containing
+     * the suffix of the global code and replacing the prefix with a formatted
+     * name of a reference entity.
+     * 
+ * + * string compound_code = 2; + * + * @return The bytes for compoundCode. + */ + public com.google.protobuf.ByteString getCompoundCodeBytes() { + java.lang.Object ref = compoundCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + compoundCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Place's compound code, such as "33GV+HQ, Ramberg, Norway", containing
+     * the suffix of the global code and replacing the prefix with a formatted
+     * name of a reference entity.
+     * 
+ * + * string compound_code = 2; + * + * @param value The compoundCode to set. + * @return This builder for chaining. + */ + public Builder setCompoundCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + compoundCode_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Place's compound code, such as "33GV+HQ, Ramberg, Norway", containing
+     * the suffix of the global code and replacing the prefix with a formatted
+     * name of a reference entity.
+     * 
+ * + * string compound_code = 2; + * + * @return This builder for chaining. + */ + public Builder clearCompoundCode() { + compoundCode_ = getDefaultInstance().getCompoundCode(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Place's compound code, such as "33GV+HQ, Ramberg, Norway", containing
+     * the suffix of the global code and replacing the prefix with a formatted
+     * name of a reference entity.
+     * 
+ * + * string compound_code = 2; + * + * @param value The bytes for compoundCode to set. + * @return This builder for chaining. + */ + public Builder setCompoundCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + compoundCode_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.maps.geocode.v4.PlusCode) + } + + // @@protoc_insertion_point(class_scope:google.maps.geocode.v4.PlusCode) + private static final com.google.maps.geocode.v4.PlusCode DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.geocode.v4.PlusCode(); + } + + public static com.google.maps.geocode.v4.PlusCode getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PlusCode parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.maps.geocode.v4.PlusCode getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/PlusCodeOrBuilder.java b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/PlusCodeOrBuilder.java new file mode 100644 index 000000000000..2a139c40bd0a --- /dev/null +++ b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/PlusCodeOrBuilder.java @@ -0,0 +1,86 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/maps/geocode/v4/geocode_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.geocode.v4; + +@com.google.protobuf.Generated +public interface PlusCodeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.geocode.v4.PlusCode) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Place's global (full) code, such as "9FWM33GV+HQ", representing an
+   * 1/8000 by 1/8000 degree area (~14 by 14 meters).
+   * 
+ * + * string global_code = 1; + * + * @return The globalCode. + */ + java.lang.String getGlobalCode(); + + /** + * + * + *
+   * Place's global (full) code, such as "9FWM33GV+HQ", representing an
+   * 1/8000 by 1/8000 degree area (~14 by 14 meters).
+   * 
+ * + * string global_code = 1; + * + * @return The bytes for globalCode. + */ + com.google.protobuf.ByteString getGlobalCodeBytes(); + + /** + * + * + *
+   * Place's compound code, such as "33GV+HQ, Ramberg, Norway", containing
+   * the suffix of the global code and replacing the prefix with a formatted
+   * name of a reference entity.
+   * 
+ * + * string compound_code = 2; + * + * @return The compoundCode. + */ + java.lang.String getCompoundCode(); + + /** + * + * + *
+   * Place's compound code, such as "33GV+HQ, Ramberg, Norway", containing
+   * the suffix of the global code and replacing the prefix with a formatted
+   * name of a reference entity.
+   * 
+ * + * string compound_code = 2; + * + * @return The bytes for compoundCode. + */ + com.google.protobuf.ByteString getCompoundCodeBytes(); +} diff --git a/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/SearchDestinationsRequest.java b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/SearchDestinationsRequest.java new file mode 100644 index 000000000000..07e47353b2fc --- /dev/null +++ b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/SearchDestinationsRequest.java @@ -0,0 +1,5794 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/maps/geocode/v4/destination_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.geocode.v4; + +/** + * + * + *
+ * Request message for DestinationService.SearchDestinations.
+ * 
+ * + * Protobuf type {@code google.maps.geocode.v4.SearchDestinationsRequest} + */ +@com.google.protobuf.Generated +public final class SearchDestinationsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.maps.geocode.v4.SearchDestinationsRequest) + SearchDestinationsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SearchDestinationsRequest"); + } + + // Use SearchDestinationsRequest.newBuilder() to construct. + private SearchDestinationsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SearchDestinationsRequest() { + travelModes_ = emptyIntList(); + languageCode_ = ""; + regionCode_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_SearchDestinationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_SearchDestinationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.SearchDestinationsRequest.class, + com.google.maps.geocode.v4.SearchDestinationsRequest.Builder.class); + } + + public interface AddressQueryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * A street address in postal address format.
+     * 
+ * + * .google.type.PostalAddress address = 1; + * + * @return Whether the address field is set. + */ + boolean hasAddress(); + + /** + * + * + *
+     * A street address in postal address format.
+     * 
+ * + * .google.type.PostalAddress address = 1; + * + * @return The address. + */ + com.google.type.PostalAddress getAddress(); + + /** + * + * + *
+     * A street address in postal address format.
+     * 
+ * + * .google.type.PostalAddress address = 1; + */ + com.google.type.PostalAddressOrBuilder getAddressOrBuilder(); + + /** + * + * + *
+     * A street address formatted as a single line.
+     * 
+ * + * string address_query = 2; + * + * @return Whether the addressQuery field is set. + */ + boolean hasAddressQuery(); + + /** + * + * + *
+     * A street address formatted as a single line.
+     * 
+ * + * string address_query = 2; + * + * @return The addressQuery. + */ + java.lang.String getAddressQuery(); + + /** + * + * + *
+     * A street address formatted as a single line.
+     * 
+ * + * string address_query = 2; + * + * @return The bytes for addressQuery. + */ + com.google.protobuf.ByteString getAddressQueryBytes(); + + com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery.KindCase getKindCase(); + } + + /** + * + * + *
+   * The street address that you want to search for. Specify addresses in
+   * accordance with the format used by the national postal service of the
+   * country concerned.
+   * 
+ * + * Protobuf type {@code google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery} + */ + public static final class AddressQuery extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery) + AddressQueryOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AddressQuery"); + } + + // Use AddressQuery.newBuilder() to construct. + private AddressQuery(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AddressQuery() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_SearchDestinationsRequest_AddressQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_SearchDestinationsRequest_AddressQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery.class, + com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery.Builder.class); + } + + private int kindCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object kind_; + + public enum KindCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ADDRESS(1), + ADDRESS_QUERY(2), + KIND_NOT_SET(0); + private final int value; + + private KindCase(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 KindCase valueOf(int value) { + return forNumber(value); + } + + public static KindCase forNumber(int value) { + switch (value) { + case 1: + return ADDRESS; + case 2: + return ADDRESS_QUERY; + case 0: + return KIND_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public KindCase getKindCase() { + return KindCase.forNumber(kindCase_); + } + + public static final int ADDRESS_FIELD_NUMBER = 1; + + /** + * + * + *
+     * A street address in postal address format.
+     * 
+ * + * .google.type.PostalAddress address = 1; + * + * @return Whether the address field is set. + */ + @java.lang.Override + public boolean hasAddress() { + return kindCase_ == 1; + } + + /** + * + * + *
+     * A street address in postal address format.
+     * 
+ * + * .google.type.PostalAddress address = 1; + * + * @return The address. + */ + @java.lang.Override + public com.google.type.PostalAddress getAddress() { + if (kindCase_ == 1) { + return (com.google.type.PostalAddress) kind_; + } + return com.google.type.PostalAddress.getDefaultInstance(); + } + + /** + * + * + *
+     * A street address in postal address format.
+     * 
+ * + * .google.type.PostalAddress address = 1; + */ + @java.lang.Override + public com.google.type.PostalAddressOrBuilder getAddressOrBuilder() { + if (kindCase_ == 1) { + return (com.google.type.PostalAddress) kind_; + } + return com.google.type.PostalAddress.getDefaultInstance(); + } + + public static final int ADDRESS_QUERY_FIELD_NUMBER = 2; + + /** + * + * + *
+     * A street address formatted as a single line.
+     * 
+ * + * string address_query = 2; + * + * @return Whether the addressQuery field is set. + */ + public boolean hasAddressQuery() { + return kindCase_ == 2; + } + + /** + * + * + *
+     * A street address formatted as a single line.
+     * 
+ * + * string address_query = 2; + * + * @return The addressQuery. + */ + public java.lang.String getAddressQuery() { + java.lang.Object ref = ""; + if (kindCase_ == 2) { + ref = kind_; + } + 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 (kindCase_ == 2) { + kind_ = s; + } + return s; + } + } + + /** + * + * + *
+     * A street address formatted as a single line.
+     * 
+ * + * string address_query = 2; + * + * @return The bytes for addressQuery. + */ + public com.google.protobuf.ByteString getAddressQueryBytes() { + java.lang.Object ref = ""; + if (kindCase_ == 2) { + ref = kind_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (kindCase_ == 2) { + kind_ = 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 (kindCase_ == 1) { + output.writeMessage(1, (com.google.type.PostalAddress) kind_); + } + if (kindCase_ == 2) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, kind_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (kindCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.type.PostalAddress) kind_); + } + if (kindCase_ == 2) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, kind_); + } + 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.geocode.v4.SearchDestinationsRequest.AddressQuery)) { + return super.equals(obj); + } + com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery other = + (com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery) obj; + + if (!getKindCase().equals(other.getKindCase())) return false; + switch (kindCase_) { + case 1: + if (!getAddress().equals(other.getAddress())) return false; + break; + case 2: + if (!getAddressQuery().equals(other.getAddressQuery())) 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 (kindCase_) { + case 1: + hash = (37 * hash) + ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getAddress().hashCode(); + break; + case 2: + hash = (37 * hash) + ADDRESS_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getAddressQuery().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery 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.geocode.v4.SearchDestinationsRequest.AddressQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery 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.geocode.v4.SearchDestinationsRequest.AddressQuery parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geocode.v4.SearchDestinationsRequest.AddressQuery 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * The street address that you want to search for. Specify addresses in
+     * accordance with the format used by the national postal service of the
+     * country concerned.
+     * 
+ * + * Protobuf type {@code google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery) + com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_SearchDestinationsRequest_AddressQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_SearchDestinationsRequest_AddressQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery.class, + com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery.Builder.class); + } + + // Construct using + // com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (addressBuilder_ != null) { + addressBuilder_.clear(); + } + kindCase_ = 0; + kind_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_SearchDestinationsRequest_AddressQuery_descriptor; + } + + @java.lang.Override + public com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery + getDefaultInstanceForType() { + return com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery build() { + com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery buildPartial() { + com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery result = + new com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery result) { + result.kindCase_ = kindCase_; + result.kind_ = this.kind_; + if (kindCase_ == 1 && addressBuilder_ != null) { + result.kind_ = addressBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery) { + return mergeFrom( + (com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery other) { + if (other + == com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery + .getDefaultInstance()) return this; + switch (other.getKindCase()) { + case ADDRESS: + { + mergeAddress(other.getAddress()); + break; + } + case ADDRESS_QUERY: + { + kindCase_ = 2; + kind_ = other.kind_; + onChanged(); + break; + } + case KIND_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( + internalGetAddressFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 1; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + kindCase_ = 2; + kind_ = s; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int kindCase_ = 0; + private java.lang.Object kind_; + + public KindCase getKindCase() { + return KindCase.forNumber(kindCase_); + } + + public Builder clearKind() { + kindCase_ = 0; + kind_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.type.PostalAddress, + com.google.type.PostalAddress.Builder, + com.google.type.PostalAddressOrBuilder> + addressBuilder_; + + /** + * + * + *
+       * A street address in postal address format.
+       * 
+ * + * .google.type.PostalAddress address = 1; + * + * @return Whether the address field is set. + */ + @java.lang.Override + public boolean hasAddress() { + return kindCase_ == 1; + } + + /** + * + * + *
+       * A street address in postal address format.
+       * 
+ * + * .google.type.PostalAddress address = 1; + * + * @return The address. + */ + @java.lang.Override + public com.google.type.PostalAddress getAddress() { + if (addressBuilder_ == null) { + if (kindCase_ == 1) { + return (com.google.type.PostalAddress) kind_; + } + return com.google.type.PostalAddress.getDefaultInstance(); + } else { + if (kindCase_ == 1) { + return addressBuilder_.getMessage(); + } + return com.google.type.PostalAddress.getDefaultInstance(); + } + } + + /** + * + * + *
+       * A street address in postal address format.
+       * 
+ * + * .google.type.PostalAddress address = 1; + */ + public Builder setAddress(com.google.type.PostalAddress value) { + if (addressBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + addressBuilder_.setMessage(value); + } + kindCase_ = 1; + return this; + } + + /** + * + * + *
+       * A street address in postal address format.
+       * 
+ * + * .google.type.PostalAddress address = 1; + */ + public Builder setAddress(com.google.type.PostalAddress.Builder builderForValue) { + if (addressBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + addressBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 1; + return this; + } + + /** + * + * + *
+       * A street address in postal address format.
+       * 
+ * + * .google.type.PostalAddress address = 1; + */ + public Builder mergeAddress(com.google.type.PostalAddress value) { + if (addressBuilder_ == null) { + if (kindCase_ == 1 && kind_ != com.google.type.PostalAddress.getDefaultInstance()) { + kind_ = + com.google.type.PostalAddress.newBuilder((com.google.type.PostalAddress) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 1) { + addressBuilder_.mergeFrom(value); + } else { + addressBuilder_.setMessage(value); + } + } + kindCase_ = 1; + return this; + } + + /** + * + * + *
+       * A street address in postal address format.
+       * 
+ * + * .google.type.PostalAddress address = 1; + */ + public Builder clearAddress() { + if (addressBuilder_ == null) { + if (kindCase_ == 1) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 1) { + kindCase_ = 0; + kind_ = null; + } + addressBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * A street address in postal address format.
+       * 
+ * + * .google.type.PostalAddress address = 1; + */ + public com.google.type.PostalAddress.Builder getAddressBuilder() { + return internalGetAddressFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * A street address in postal address format.
+       * 
+ * + * .google.type.PostalAddress address = 1; + */ + @java.lang.Override + public com.google.type.PostalAddressOrBuilder getAddressOrBuilder() { + if ((kindCase_ == 1) && (addressBuilder_ != null)) { + return addressBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 1) { + return (com.google.type.PostalAddress) kind_; + } + return com.google.type.PostalAddress.getDefaultInstance(); + } + } + + /** + * + * + *
+       * A street address in postal address format.
+       * 
+ * + * .google.type.PostalAddress address = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.PostalAddress, + com.google.type.PostalAddress.Builder, + com.google.type.PostalAddressOrBuilder> + internalGetAddressFieldBuilder() { + if (addressBuilder_ == null) { + if (!(kindCase_ == 1)) { + kind_ = com.google.type.PostalAddress.getDefaultInstance(); + } + addressBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.PostalAddress, + com.google.type.PostalAddress.Builder, + com.google.type.PostalAddressOrBuilder>( + (com.google.type.PostalAddress) kind_, getParentForChildren(), isClean()); + kind_ = null; + } + kindCase_ = 1; + onChanged(); + return addressBuilder_; + } + + /** + * + * + *
+       * A street address formatted as a single line.
+       * 
+ * + * string address_query = 2; + * + * @return Whether the addressQuery field is set. + */ + @java.lang.Override + public boolean hasAddressQuery() { + return kindCase_ == 2; + } + + /** + * + * + *
+       * A street address formatted as a single line.
+       * 
+ * + * string address_query = 2; + * + * @return The addressQuery. + */ + @java.lang.Override + public java.lang.String getAddressQuery() { + java.lang.Object ref = ""; + if (kindCase_ == 2) { + ref = kind_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (kindCase_ == 2) { + kind_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * A street address formatted as a single line.
+       * 
+ * + * string address_query = 2; + * + * @return The bytes for addressQuery. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAddressQueryBytes() { + java.lang.Object ref = ""; + if (kindCase_ == 2) { + ref = kind_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (kindCase_ == 2) { + kind_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * A street address formatted as a single line.
+       * 
+ * + * string address_query = 2; + * + * @param value The addressQuery to set. + * @return This builder for chaining. + */ + public Builder setAddressQuery(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kindCase_ = 2; + kind_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+       * A street address formatted as a single line.
+       * 
+ * + * string address_query = 2; + * + * @return This builder for chaining. + */ + public Builder clearAddressQuery() { + if (kindCase_ == 2) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * A street address formatted as a single line.
+       * 
+ * + * string address_query = 2; + * + * @param value The bytes for addressQuery to set. + * @return This builder for chaining. + */ + public Builder setAddressQueryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kindCase_ = 2; + kind_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery) + } + + // @@protoc_insertion_point(class_scope:google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery) + private static final com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery(); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AddressQuery 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.geocode.v4.SearchDestinationsRequest.AddressQuery + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface LocationQueryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * A precise LatLng location.
+     * 
+ * + * .google.type.LatLng location = 1; + * + * @return Whether the location field is set. + */ + boolean hasLocation(); + + /** + * + * + *
+     * A precise LatLng location.
+     * 
+ * + * .google.type.LatLng location = 1; + * + * @return The location. + */ + com.google.type.LatLng getLocation(); + + /** + * + * + *
+     * A precise LatLng location.
+     * 
+ * + * .google.type.LatLng location = 1; + */ + com.google.type.LatLngOrBuilder getLocationOrBuilder(); + + /** + * + * + *
+     * Optional. Filters to apply to destination candidates.
+     * 
+ * + * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter place_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the placeFilter field is set. + */ + boolean hasPlaceFilter(); + + /** + * + * + *
+     * Optional. Filters to apply to destination candidates.
+     * 
+ * + * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter place_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The placeFilter. + */ + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter getPlaceFilter(); + + /** + * + * + *
+     * Optional. Filters to apply to destination candidates.
+     * 
+ * + * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter place_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilterOrBuilder + getPlaceFilterOrBuilder(); + + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.KindCase getKindCase(); + } + + /** + * + * + *
+   * A location query to identify a nearby primary destination.
+   *
+   * Note: if the location query is within a building that contains subpremises,
+   * it is possible that the returned primary place is a subpremise. In these
+   * cases, the `containing_places` field will include the building.
+   * 
+ * + * Protobuf type {@code google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery} + */ + public static final class LocationQuery extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery) + LocationQueryOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "LocationQuery"); + } + + // Use LocationQuery.newBuilder() to construct. + private LocationQuery(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private LocationQuery() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_SearchDestinationsRequest_LocationQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_SearchDestinationsRequest_LocationQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.class, + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.Builder.class); + } + + public interface PlaceFilterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Optional. If specified, all destinations are guaranteed to have a
+       * primary place with this structure type. This can result in filtering
+       * out some destinations, or in coarsening/refining the returned
+       * destinations.
+       *
+       * For example, if `GROUNDS` is specified, all returned destinations will
+       * have a primary place with the `GROUNDS` structure type. This can
+       * result in filtering out some destinations that are not part of a
+       * grounds, or in coarsening the returned destinations to the grounds
+       * level.
+       *
+       * Another use of this field is to more easily extract building display
+       * polygons. For example, if `BUILDING` is specified, the primary place's
+       * display polygon will be for the building at the specified location.
+       * 
+ * + * + * .google.maps.geocode.v4.PlaceView.StructureType structure_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for structureType. + */ + int getStructureTypeValue(); + + /** + * + * + *
+       * Optional. If specified, all destinations are guaranteed to have a
+       * primary place with this structure type. This can result in filtering
+       * out some destinations, or in coarsening/refining the returned
+       * destinations.
+       *
+       * For example, if `GROUNDS` is specified, all returned destinations will
+       * have a primary place with the `GROUNDS` structure type. This can
+       * result in filtering out some destinations that are not part of a
+       * grounds, or in coarsening the returned destinations to the grounds
+       * level.
+       *
+       * Another use of this field is to more easily extract building display
+       * polygons. For example, if `BUILDING` is specified, the primary place's
+       * display polygon will be for the building at the specified location.
+       * 
+ * + * + * .google.maps.geocode.v4.PlaceView.StructureType structure_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The structureType. + */ + com.google.maps.geocode.v4.PlaceView.StructureType getStructureType(); + + /** + * + * + *
+       * Optional. If specified, only returns destinations that meet the
+       * corresponding addressability criteria.
+       * 
+ * + * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter.Addressability addressability = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for addressability. + */ + int getAddressabilityValue(); + + /** + * + * + *
+       * Optional. If specified, only returns destinations that meet the
+       * corresponding addressability criteria.
+       * 
+ * + * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter.Addressability addressability = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The addressability. + */ + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter.Addressability + getAddressability(); + } + + /** + * + * + *
+     * Filters to apply to destination candidates.
+     * 
+ * + * Protobuf type {@code + * google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter} + */ + public static final class PlaceFilter extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter) + PlaceFilterOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PlaceFilter"); + } + + // Use PlaceFilter.newBuilder() to construct. + private PlaceFilter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PlaceFilter() { + structureType_ = 0; + addressability_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_SearchDestinationsRequest_LocationQuery_PlaceFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_SearchDestinationsRequest_LocationQuery_PlaceFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + .class, + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + .Builder.class); + } + + /** + * + * + *
+       * Defines options for addressability filtering. New values may be added
+       * in the future.
+       * 
+ * + * Protobuf enum {@code + * google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter.Addressability} + */ + public enum Addressability implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+         * When unspecified, the service will choose a sensible default.
+         * 
+ * + * ADDRESSABILITY_UNSPECIFIED = 0; + */ + ADDRESSABILITY_UNSPECIFIED(0), + /** + * + * + *
+         * Addressability is not a filtering criteria. Destinations are returned
+         * regardless of their addressability.
+         * 
+ * + * ANY = 1; + */ + ANY(1), + /** + * + * + *
+         * All destinations returned will have a primary place with a street
+         * level address or name.
+         * 
+ * + * PRIMARY = 2; + */ + PRIMARY(2), + /** + * + * + *
+         * All destinations returned will have either a primary place or a
+         * subdestination with a street level address or name.
+         * 
+ * + * WEAK = 3; + */ + WEAK(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Addressability"); + } + + /** + * + * + *
+         * When unspecified, the service will choose a sensible default.
+         * 
+ * + * ADDRESSABILITY_UNSPECIFIED = 0; + */ + public static final int ADDRESSABILITY_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+         * Addressability is not a filtering criteria. Destinations are returned
+         * regardless of their addressability.
+         * 
+ * + * ANY = 1; + */ + public static final int ANY_VALUE = 1; + + /** + * + * + *
+         * All destinations returned will have a primary place with a street
+         * level address or name.
+         * 
+ * + * PRIMARY = 2; + */ + public static final int PRIMARY_VALUE = 2; + + /** + * + * + *
+         * All destinations returned will have either a primary place or a
+         * subdestination with a street level address or name.
+         * 
+ * + * WEAK = 3; + */ + public static final int WEAK_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Addressability 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 Addressability forNumber(int value) { + switch (value) { + case 0: + return ADDRESSABILITY_UNSPECIFIED; + case 1: + return ANY; + case 2: + return PRIMARY; + case 3: + return WEAK; + 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 Addressability findValueByNumber(int number) { + return Addressability.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Addressability[] VALUES = values(); + + public static Addressability 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 Addressability(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter.Addressability) + } + + public static final int STRUCTURE_TYPE_FIELD_NUMBER = 2; + private int structureType_ = 0; + + /** + * + * + *
+       * Optional. If specified, all destinations are guaranteed to have a
+       * primary place with this structure type. This can result in filtering
+       * out some destinations, or in coarsening/refining the returned
+       * destinations.
+       *
+       * For example, if `GROUNDS` is specified, all returned destinations will
+       * have a primary place with the `GROUNDS` structure type. This can
+       * result in filtering out some destinations that are not part of a
+       * grounds, or in coarsening the returned destinations to the grounds
+       * level.
+       *
+       * Another use of this field is to more easily extract building display
+       * polygons. For example, if `BUILDING` is specified, the primary place's
+       * display polygon will be for the building at the specified location.
+       * 
+ * + * + * .google.maps.geocode.v4.PlaceView.StructureType structure_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for structureType. + */ + @java.lang.Override + public int getStructureTypeValue() { + return structureType_; + } + + /** + * + * + *
+       * Optional. If specified, all destinations are guaranteed to have a
+       * primary place with this structure type. This can result in filtering
+       * out some destinations, or in coarsening/refining the returned
+       * destinations.
+       *
+       * For example, if `GROUNDS` is specified, all returned destinations will
+       * have a primary place with the `GROUNDS` structure type. This can
+       * result in filtering out some destinations that are not part of a
+       * grounds, or in coarsening the returned destinations to the grounds
+       * level.
+       *
+       * Another use of this field is to more easily extract building display
+       * polygons. For example, if `BUILDING` is specified, the primary place's
+       * display polygon will be for the building at the specified location.
+       * 
+ * + * + * .google.maps.geocode.v4.PlaceView.StructureType structure_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The structureType. + */ + @java.lang.Override + public com.google.maps.geocode.v4.PlaceView.StructureType getStructureType() { + com.google.maps.geocode.v4.PlaceView.StructureType result = + com.google.maps.geocode.v4.PlaceView.StructureType.forNumber(structureType_); + return result == null + ? com.google.maps.geocode.v4.PlaceView.StructureType.UNRECOGNIZED + : result; + } + + public static final int ADDRESSABILITY_FIELD_NUMBER = 3; + private int addressability_ = 0; + + /** + * + * + *
+       * Optional. If specified, only returns destinations that meet the
+       * corresponding addressability criteria.
+       * 
+ * + * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter.Addressability addressability = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for addressability. + */ + @java.lang.Override + public int getAddressabilityValue() { + return addressability_; + } + + /** + * + * + *
+       * Optional. If specified, only returns destinations that meet the
+       * corresponding addressability criteria.
+       * 
+ * + * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter.Addressability addressability = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The addressability. + */ + @java.lang.Override + public com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + .Addressability + getAddressability() { + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + .Addressability + result = + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + .Addressability.forNumber(addressability_); + return result == null + ? com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + .Addressability.UNRECOGNIZED + : result; + } + + 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 (structureType_ + != com.google.maps.geocode.v4.PlaceView.StructureType.STRUCTURE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, structureType_); + } + if (addressability_ + != com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + .Addressability.ADDRESSABILITY_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, addressability_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (structureType_ + != com.google.maps.geocode.v4.PlaceView.StructureType.STRUCTURE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, structureType_); + } + if (addressability_ + != com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + .Addressability.ADDRESSABILITY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, addressability_); + } + 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.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter)) { + return super.equals(obj); + } + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter other = + (com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter) obj; + + if (structureType_ != other.structureType_) return false; + if (addressability_ != other.addressability_) 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) + STRUCTURE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + structureType_; + hash = (37 * hash) + ADDRESSABILITY_FIELD_NUMBER; + hash = (53 * hash) + addressability_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + 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.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + 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.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+       * Filters to apply to destination candidates.
+       * 
+ * + * Protobuf type {@code + * google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter) + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_SearchDestinationsRequest_LocationQuery_PlaceFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_SearchDestinationsRequest_LocationQuery_PlaceFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + .class, + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + .Builder.class); + } + + // Construct using + // com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + structureType_ = 0; + addressability_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_SearchDestinationsRequest_LocationQuery_PlaceFilter_descriptor; + } + + @java.lang.Override + public com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + getDefaultInstanceForType() { + return com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + build() { + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + buildPartial() { + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter result = + new com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.structureType_ = structureType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.addressability_ = addressability_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter) { + return mergeFrom( + (com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter other) { + if (other + == com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + .getDefaultInstance()) return this; + if (other.structureType_ != 0) { + setStructureTypeValue(other.getStructureTypeValue()); + } + if (other.addressability_ != 0) { + setAddressabilityValue(other.getAddressabilityValue()); + } + 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 16: + { + structureType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 16 + case 24: + { + addressability_ = input.readEnum(); + bitField0_ |= 0x00000002; + 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 bitField0_; + + private int structureType_ = 0; + + /** + * + * + *
+         * Optional. If specified, all destinations are guaranteed to have a
+         * primary place with this structure type. This can result in filtering
+         * out some destinations, or in coarsening/refining the returned
+         * destinations.
+         *
+         * For example, if `GROUNDS` is specified, all returned destinations will
+         * have a primary place with the `GROUNDS` structure type. This can
+         * result in filtering out some destinations that are not part of a
+         * grounds, or in coarsening the returned destinations to the grounds
+         * level.
+         *
+         * Another use of this field is to more easily extract building display
+         * polygons. For example, if `BUILDING` is specified, the primary place's
+         * display polygon will be for the building at the specified location.
+         * 
+ * + * + * .google.maps.geocode.v4.PlaceView.StructureType structure_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for structureType. + */ + @java.lang.Override + public int getStructureTypeValue() { + return structureType_; + } + + /** + * + * + *
+         * Optional. If specified, all destinations are guaranteed to have a
+         * primary place with this structure type. This can result in filtering
+         * out some destinations, or in coarsening/refining the returned
+         * destinations.
+         *
+         * For example, if `GROUNDS` is specified, all returned destinations will
+         * have a primary place with the `GROUNDS` structure type. This can
+         * result in filtering out some destinations that are not part of a
+         * grounds, or in coarsening the returned destinations to the grounds
+         * level.
+         *
+         * Another use of this field is to more easily extract building display
+         * polygons. For example, if `BUILDING` is specified, the primary place's
+         * display polygon will be for the building at the specified location.
+         * 
+ * + * + * .google.maps.geocode.v4.PlaceView.StructureType structure_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for structureType to set. + * @return This builder for chaining. + */ + public Builder setStructureTypeValue(int value) { + structureType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. If specified, all destinations are guaranteed to have a
+         * primary place with this structure type. This can result in filtering
+         * out some destinations, or in coarsening/refining the returned
+         * destinations.
+         *
+         * For example, if `GROUNDS` is specified, all returned destinations will
+         * have a primary place with the `GROUNDS` structure type. This can
+         * result in filtering out some destinations that are not part of a
+         * grounds, or in coarsening the returned destinations to the grounds
+         * level.
+         *
+         * Another use of this field is to more easily extract building display
+         * polygons. For example, if `BUILDING` is specified, the primary place's
+         * display polygon will be for the building at the specified location.
+         * 
+ * + * + * .google.maps.geocode.v4.PlaceView.StructureType structure_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The structureType. + */ + @java.lang.Override + public com.google.maps.geocode.v4.PlaceView.StructureType getStructureType() { + com.google.maps.geocode.v4.PlaceView.StructureType result = + com.google.maps.geocode.v4.PlaceView.StructureType.forNumber(structureType_); + return result == null + ? com.google.maps.geocode.v4.PlaceView.StructureType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+         * Optional. If specified, all destinations are guaranteed to have a
+         * primary place with this structure type. This can result in filtering
+         * out some destinations, or in coarsening/refining the returned
+         * destinations.
+         *
+         * For example, if `GROUNDS` is specified, all returned destinations will
+         * have a primary place with the `GROUNDS` structure type. This can
+         * result in filtering out some destinations that are not part of a
+         * grounds, or in coarsening the returned destinations to the grounds
+         * level.
+         *
+         * Another use of this field is to more easily extract building display
+         * polygons. For example, if `BUILDING` is specified, the primary place's
+         * display polygon will be for the building at the specified location.
+         * 
+ * + * + * .google.maps.geocode.v4.PlaceView.StructureType structure_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The structureType to set. + * @return This builder for chaining. + */ + public Builder setStructureType(com.google.maps.geocode.v4.PlaceView.StructureType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + structureType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. If specified, all destinations are guaranteed to have a
+         * primary place with this structure type. This can result in filtering
+         * out some destinations, or in coarsening/refining the returned
+         * destinations.
+         *
+         * For example, if `GROUNDS` is specified, all returned destinations will
+         * have a primary place with the `GROUNDS` structure type. This can
+         * result in filtering out some destinations that are not part of a
+         * grounds, or in coarsening the returned destinations to the grounds
+         * level.
+         *
+         * Another use of this field is to more easily extract building display
+         * polygons. For example, if `BUILDING` is specified, the primary place's
+         * display polygon will be for the building at the specified location.
+         * 
+ * + * + * .google.maps.geocode.v4.PlaceView.StructureType structure_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearStructureType() { + bitField0_ = (bitField0_ & ~0x00000001); + structureType_ = 0; + onChanged(); + return this; + } + + private int addressability_ = 0; + + /** + * + * + *
+         * Optional. If specified, only returns destinations that meet the
+         * corresponding addressability criteria.
+         * 
+ * + * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter.Addressability addressability = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for addressability. + */ + @java.lang.Override + public int getAddressabilityValue() { + return addressability_; + } + + /** + * + * + *
+         * Optional. If specified, only returns destinations that meet the
+         * corresponding addressability criteria.
+         * 
+ * + * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter.Addressability addressability = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for addressability to set. + * @return This builder for chaining. + */ + public Builder setAddressabilityValue(int value) { + addressability_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. If specified, only returns destinations that meet the
+         * corresponding addressability criteria.
+         * 
+ * + * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter.Addressability addressability = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The addressability. + */ + @java.lang.Override + public com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + .Addressability + getAddressability() { + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + .Addressability + result = + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + .Addressability.forNumber(addressability_); + return result == null + ? com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + .Addressability.UNRECOGNIZED + : result; + } + + /** + * + * + *
+         * Optional. If specified, only returns destinations that meet the
+         * corresponding addressability criteria.
+         * 
+ * + * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter.Addressability addressability = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The addressability to set. + * @return This builder for chaining. + */ + public Builder setAddressability( + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + .Addressability + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + addressability_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. If specified, only returns destinations that meet the
+         * corresponding addressability criteria.
+         * 
+ * + * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter.Addressability addressability = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAddressability() { + bitField0_ = (bitField0_ & ~0x00000002); + addressability_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter) + } + + // @@protoc_insertion_point(class_scope:google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter) + private static final com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery + .PlaceFilter + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter(); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PlaceFilter 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.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + private int kindCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object kind_; + + public enum KindCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + LOCATION(1), + KIND_NOT_SET(0); + private final int value; + + private KindCase(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 KindCase valueOf(int value) { + return forNumber(value); + } + + public static KindCase forNumber(int value) { + switch (value) { + case 1: + return LOCATION; + case 0: + return KIND_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public KindCase getKindCase() { + return KindCase.forNumber(kindCase_); + } + + public static final int LOCATION_FIELD_NUMBER = 1; + + /** + * + * + *
+     * A precise LatLng location.
+     * 
+ * + * .google.type.LatLng location = 1; + * + * @return Whether the location field is set. + */ + @java.lang.Override + public boolean hasLocation() { + return kindCase_ == 1; + } + + /** + * + * + *
+     * A precise LatLng location.
+     * 
+ * + * .google.type.LatLng location = 1; + * + * @return The location. + */ + @java.lang.Override + public com.google.type.LatLng getLocation() { + if (kindCase_ == 1) { + return (com.google.type.LatLng) kind_; + } + return com.google.type.LatLng.getDefaultInstance(); + } + + /** + * + * + *
+     * A precise LatLng location.
+     * 
+ * + * .google.type.LatLng location = 1; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getLocationOrBuilder() { + if (kindCase_ == 1) { + return (com.google.type.LatLng) kind_; + } + return com.google.type.LatLng.getDefaultInstance(); + } + + public static final int PLACE_FILTER_FIELD_NUMBER = 2; + private com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + placeFilter_; + + /** + * + * + *
+     * Optional. Filters to apply to destination candidates.
+     * 
+ * + * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter place_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the placeFilter field is set. + */ + @java.lang.Override + public boolean hasPlaceFilter() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. Filters to apply to destination candidates.
+     * 
+ * + * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter place_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The placeFilter. + */ + @java.lang.Override + public com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + getPlaceFilter() { + return placeFilter_ == null + ? com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + .getDefaultInstance() + : placeFilter_; + } + + /** + * + * + *
+     * Optional. Filters to apply to destination candidates.
+     * 
+ * + * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter place_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilterOrBuilder + getPlaceFilterOrBuilder() { + return placeFilter_ == null + ? com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + .getDefaultInstance() + : placeFilter_; + } + + 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 (kindCase_ == 1) { + output.writeMessage(1, (com.google.type.LatLng) kind_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getPlaceFilter()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (kindCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.type.LatLng) kind_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPlaceFilter()); + } + 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.geocode.v4.SearchDestinationsRequest.LocationQuery)) { + return super.equals(obj); + } + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery other = + (com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery) obj; + + if (hasPlaceFilter() != other.hasPlaceFilter()) return false; + if (hasPlaceFilter()) { + if (!getPlaceFilter().equals(other.getPlaceFilter())) return false; + } + if (!getKindCase().equals(other.getKindCase())) return false; + switch (kindCase_) { + case 1: + if (!getLocation().equals(other.getLocation())) 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(); + if (hasPlaceFilter()) { + hash = (37 * hash) + PLACE_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getPlaceFilter().hashCode(); + } + switch (kindCase_) { + case 1: + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery 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.geocode.v4.SearchDestinationsRequest.LocationQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery 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.geocode.v4.SearchDestinationsRequest.LocationQuery parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geocode.v4.SearchDestinationsRequest.LocationQuery 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * A location query to identify a nearby primary destination.
+     *
+     * Note: if the location query is within a building that contains subpremises,
+     * it is possible that the returned primary place is a subpremise. In these
+     * cases, the `containing_places` field will include the building.
+     * 
+ * + * Protobuf type {@code google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery) + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_SearchDestinationsRequest_LocationQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_SearchDestinationsRequest_LocationQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.class, + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.Builder.class); + } + + // Construct using + // com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPlaceFilterFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (locationBuilder_ != null) { + locationBuilder_.clear(); + } + placeFilter_ = null; + if (placeFilterBuilder_ != null) { + placeFilterBuilder_.dispose(); + placeFilterBuilder_ = null; + } + kindCase_ = 0; + kind_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_SearchDestinationsRequest_LocationQuery_descriptor; + } + + @java.lang.Override + public com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery + getDefaultInstanceForType() { + return com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery build() { + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery buildPartial() { + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery result = + new com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.placeFilter_ = + placeFilterBuilder_ == null ? placeFilter_ : placeFilterBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs( + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery result) { + result.kindCase_ = kindCase_; + result.kind_ = this.kind_; + if (kindCase_ == 1 && locationBuilder_ != null) { + result.kind_ = locationBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery) { + return mergeFrom( + (com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery other) { + if (other + == com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery + .getDefaultInstance()) return this; + if (other.hasPlaceFilter()) { + mergePlaceFilter(other.getPlaceFilter()); + } + switch (other.getKindCase()) { + case LOCATION: + { + mergeLocation(other.getLocation()); + break; + } + case KIND_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( + internalGetLocationFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetPlaceFilterFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int kindCase_ = 0; + private java.lang.Object kind_; + + public KindCase getKindCase() { + return KindCase.forNumber(kindCase_); + } + + public Builder clearKind() { + kindCase_ = 0; + kind_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.type.LatLng, + com.google.type.LatLng.Builder, + com.google.type.LatLngOrBuilder> + locationBuilder_; + + /** + * + * + *
+       * A precise LatLng location.
+       * 
+ * + * .google.type.LatLng location = 1; + * + * @return Whether the location field is set. + */ + @java.lang.Override + public boolean hasLocation() { + return kindCase_ == 1; + } + + /** + * + * + *
+       * A precise LatLng location.
+       * 
+ * + * .google.type.LatLng location = 1; + * + * @return The location. + */ + @java.lang.Override + public com.google.type.LatLng getLocation() { + if (locationBuilder_ == null) { + if (kindCase_ == 1) { + return (com.google.type.LatLng) kind_; + } + return com.google.type.LatLng.getDefaultInstance(); + } else { + if (kindCase_ == 1) { + return locationBuilder_.getMessage(); + } + return com.google.type.LatLng.getDefaultInstance(); + } + } + + /** + * + * + *
+       * A precise LatLng location.
+       * 
+ * + * .google.type.LatLng location = 1; + */ + public Builder setLocation(com.google.type.LatLng value) { + if (locationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + locationBuilder_.setMessage(value); + } + kindCase_ = 1; + return this; + } + + /** + * + * + *
+       * A precise LatLng location.
+       * 
+ * + * .google.type.LatLng location = 1; + */ + public Builder setLocation(com.google.type.LatLng.Builder builderForValue) { + if (locationBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + locationBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 1; + return this; + } + + /** + * + * + *
+       * A precise LatLng location.
+       * 
+ * + * .google.type.LatLng location = 1; + */ + public Builder mergeLocation(com.google.type.LatLng value) { + if (locationBuilder_ == null) { + if (kindCase_ == 1 && kind_ != com.google.type.LatLng.getDefaultInstance()) { + kind_ = + com.google.type.LatLng.newBuilder((com.google.type.LatLng) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 1) { + locationBuilder_.mergeFrom(value); + } else { + locationBuilder_.setMessage(value); + } + } + kindCase_ = 1; + return this; + } + + /** + * + * + *
+       * A precise LatLng location.
+       * 
+ * + * .google.type.LatLng location = 1; + */ + public Builder clearLocation() { + if (locationBuilder_ == null) { + if (kindCase_ == 1) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 1) { + kindCase_ = 0; + kind_ = null; + } + locationBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * A precise LatLng location.
+       * 
+ * + * .google.type.LatLng location = 1; + */ + public com.google.type.LatLng.Builder getLocationBuilder() { + return internalGetLocationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * A precise LatLng location.
+       * 
+ * + * .google.type.LatLng location = 1; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getLocationOrBuilder() { + if ((kindCase_ == 1) && (locationBuilder_ != null)) { + return locationBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 1) { + return (com.google.type.LatLng) kind_; + } + return com.google.type.LatLng.getDefaultInstance(); + } + } + + /** + * + * + *
+       * A precise LatLng location.
+       * 
+ * + * .google.type.LatLng location = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.LatLng, + com.google.type.LatLng.Builder, + com.google.type.LatLngOrBuilder> + internalGetLocationFieldBuilder() { + if (locationBuilder_ == null) { + if (!(kindCase_ == 1)) { + kind_ = com.google.type.LatLng.getDefaultInstance(); + } + locationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.LatLng, + com.google.type.LatLng.Builder, + com.google.type.LatLngOrBuilder>( + (com.google.type.LatLng) kind_, getParentForChildren(), isClean()); + kind_ = null; + } + kindCase_ = 1; + onChanged(); + return locationBuilder_; + } + + private com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + placeFilter_; + private com.google.protobuf.SingleFieldBuilder< + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter, + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + .Builder, + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery + .PlaceFilterOrBuilder> + placeFilterBuilder_; + + /** + * + * + *
+       * Optional. Filters to apply to destination candidates.
+       * 
+ * + * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter place_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the placeFilter field is set. + */ + public boolean hasPlaceFilter() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+       * Optional. Filters to apply to destination candidates.
+       * 
+ * + * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter place_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The placeFilter. + */ + public com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + getPlaceFilter() { + if (placeFilterBuilder_ == null) { + return placeFilter_ == null + ? com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + .getDefaultInstance() + : placeFilter_; + } else { + return placeFilterBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Optional. Filters to apply to destination candidates.
+       * 
+ * + * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter place_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPlaceFilter( + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter value) { + if (placeFilterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + placeFilter_ = value; + } else { + placeFilterBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Filters to apply to destination candidates.
+       * 
+ * + * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter place_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPlaceFilter( + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter.Builder + builderForValue) { + if (placeFilterBuilder_ == null) { + placeFilter_ = builderForValue.build(); + } else { + placeFilterBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Filters to apply to destination candidates.
+       * 
+ * + * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter place_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePlaceFilter( + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter value) { + if (placeFilterBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && placeFilter_ != null + && placeFilter_ + != com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + .getDefaultInstance()) { + getPlaceFilterBuilder().mergeFrom(value); + } else { + placeFilter_ = value; + } + } else { + placeFilterBuilder_.mergeFrom(value); + } + if (placeFilter_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Optional. Filters to apply to destination candidates.
+       * 
+ * + * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter place_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPlaceFilter() { + bitField0_ = (bitField0_ & ~0x00000002); + placeFilter_ = null; + if (placeFilterBuilder_ != null) { + placeFilterBuilder_.dispose(); + placeFilterBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Filters to apply to destination candidates.
+       * 
+ * + * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter place_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter.Builder + getPlaceFilterBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetPlaceFilterFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Optional. Filters to apply to destination candidates.
+       * 
+ * + * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter place_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilterOrBuilder + getPlaceFilterOrBuilder() { + if (placeFilterBuilder_ != null) { + return placeFilterBuilder_.getMessageOrBuilder(); + } else { + return placeFilter_ == null + ? com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + .getDefaultInstance() + : placeFilter_; + } + } + + /** + * + * + *
+       * Optional. Filters to apply to destination candidates.
+       * 
+ * + * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter place_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter, + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + .Builder, + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery + .PlaceFilterOrBuilder> + internalGetPlaceFilterFieldBuilder() { + if (placeFilterBuilder_ == null) { + placeFilterBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter, + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.PlaceFilter + .Builder, + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery + .PlaceFilterOrBuilder>(getPlaceFilter(), getParentForChildren(), isClean()); + placeFilter_ = null; + } + return placeFilterBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery) + } + + // @@protoc_insertion_point(class_scope:google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery) + private static final com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery(); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LocationQuery 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.geocode.v4.SearchDestinationsRequest.LocationQuery + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int primaryQueryCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object primaryQuery_; + + public enum PrimaryQueryCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PLACE(1), + ADDRESS_QUERY(2), + LOCATION_QUERY(3), + PRIMARYQUERY_NOT_SET(0); + private final int value; + + private PrimaryQueryCase(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 PrimaryQueryCase valueOf(int value) { + return forNumber(value); + } + + public static PrimaryQueryCase forNumber(int value) { + switch (value) { + case 1: + return PLACE; + case 2: + return ADDRESS_QUERY; + case 3: + return LOCATION_QUERY; + case 0: + return PRIMARYQUERY_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public PrimaryQueryCase getPrimaryQueryCase() { + return PrimaryQueryCase.forNumber(primaryQueryCase_); + } + + public static final int PLACE_FIELD_NUMBER = 1; + + /** + * + * + *
+   * The resource name of a place, in `places/{place_id}` format.
+   * 
+ * + * string place = 1; + * + * @return Whether the place field is set. + */ + public boolean hasPlace() { + return primaryQueryCase_ == 1; + } + + /** + * + * + *
+   * The resource name of a place, in `places/{place_id}` format.
+   * 
+ * + * string place = 1; + * + * @return The place. + */ + public java.lang.String getPlace() { + java.lang.Object ref = ""; + if (primaryQueryCase_ == 1) { + ref = primaryQuery_; + } + 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 (primaryQueryCase_ == 1) { + primaryQuery_ = s; + } + return s; + } + } + + /** + * + * + *
+   * The resource name of a place, in `places/{place_id}` format.
+   * 
+ * + * string place = 1; + * + * @return The bytes for place. + */ + public com.google.protobuf.ByteString getPlaceBytes() { + java.lang.Object ref = ""; + if (primaryQueryCase_ == 1) { + ref = primaryQuery_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (primaryQueryCase_ == 1) { + primaryQuery_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ADDRESS_QUERY_FIELD_NUMBER = 2; + + /** + * + * + *
+   * A street address.
+   * 
+ * + * .google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery address_query = 2; + * + * @return Whether the addressQuery field is set. + */ + @java.lang.Override + public boolean hasAddressQuery() { + return primaryQueryCase_ == 2; + } + + /** + * + * + *
+   * A street address.
+   * 
+ * + * .google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery address_query = 2; + * + * @return The addressQuery. + */ + @java.lang.Override + public com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery getAddressQuery() { + if (primaryQueryCase_ == 2) { + return (com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery) primaryQuery_; + } + return com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery.getDefaultInstance(); + } + + /** + * + * + *
+   * A street address.
+   * 
+ * + * .google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery address_query = 2; + */ + @java.lang.Override + public com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQueryOrBuilder + getAddressQueryOrBuilder() { + if (primaryQueryCase_ == 2) { + return (com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery) primaryQuery_; + } + return com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery.getDefaultInstance(); + } + + public static final int LOCATION_QUERY_FIELD_NUMBER = 3; + + /** + * + * + *
+   * A precise location.
+   * 
+ * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery location_query = 3; + * + * + * @return Whether the locationQuery field is set. + */ + @java.lang.Override + public boolean hasLocationQuery() { + return primaryQueryCase_ == 3; + } + + /** + * + * + *
+   * A precise location.
+   * 
+ * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery location_query = 3; + * + * + * @return The locationQuery. + */ + @java.lang.Override + public com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery getLocationQuery() { + if (primaryQueryCase_ == 3) { + return (com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery) primaryQuery_; + } + return com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.getDefaultInstance(); + } + + /** + * + * + *
+   * A precise location.
+   * 
+ * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery location_query = 3; + * + */ + @java.lang.Override + public com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQueryOrBuilder + getLocationQueryOrBuilder() { + if (primaryQueryCase_ == 3) { + return (com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery) primaryQuery_; + } + return com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.getDefaultInstance(); + } + + public static final int TRAVEL_MODES_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList travelModes_ = emptyIntList(); + + private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.maps.geocode.v4.NavigationPoint.TravelMode> + travelModes_converter_ = + new com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.maps.geocode.v4.NavigationPoint.TravelMode>() { + public com.google.maps.geocode.v4.NavigationPoint.TravelMode convert(int from) { + com.google.maps.geocode.v4.NavigationPoint.TravelMode result = + com.google.maps.geocode.v4.NavigationPoint.TravelMode.forNumber(from); + return result == null + ? com.google.maps.geocode.v4.NavigationPoint.TravelMode.UNRECOGNIZED + : result; + } + }; + + /** + * + * + *
+   * Optional. The travel modes to filter navigation points for. This influences
+   * the `navigation_points` field returned in the response. If empty,
+   * navigation points of all travel modes are returned.
+   * 
+ * + * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the travelModes. + */ + @java.lang.Override + public java.util.List + getTravelModesList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.maps.geocode.v4.NavigationPoint.TravelMode>( + travelModes_, travelModes_converter_); + } + + /** + * + * + *
+   * Optional. The travel modes to filter navigation points for. This influences
+   * the `navigation_points` field returned in the response. If empty,
+   * navigation points of all travel modes are returned.
+   * 
+ * + * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of travelModes. + */ + @java.lang.Override + public int getTravelModesCount() { + return travelModes_.size(); + } + + /** + * + * + *
+   * Optional. The travel modes to filter navigation points for. This influences
+   * the `navigation_points` field returned in the response. If empty,
+   * navigation points of all travel modes are returned.
+   * 
+ * + * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The travelModes at the given index. + */ + @java.lang.Override + public com.google.maps.geocode.v4.NavigationPoint.TravelMode getTravelModes(int index) { + return travelModes_converter_.convert(travelModes_.getInt(index)); + } + + /** + * + * + *
+   * Optional. The travel modes to filter navigation points for. This influences
+   * the `navigation_points` field returned in the response. If empty,
+   * navigation points of all travel modes are returned.
+   * 
+ * + * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for travelModes. + */ + @java.lang.Override + public java.util.List getTravelModesValueList() { + return travelModes_; + } + + /** + * + * + *
+   * Optional. The travel modes to filter navigation points for. This influences
+   * the `navigation_points` field returned in the response. If empty,
+   * navigation points of all travel modes are returned.
+   * 
+ * + * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of travelModes at the given index. + */ + @java.lang.Override + public int getTravelModesValue(int index) { + return travelModes_.getInt(index); + } + + private int travelModesMemoizedSerializedSize; + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object languageCode_ = ""; + + /** + * + * + *
+   * Optional. Language in which the results should be returned.
+   * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Language in which the results should be returned.
+   * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REGION_CODE_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object regionCode_ = ""; + + /** + * + * + *
+   * Optional. Region code. The region code, specified as a ccTLD ("top-level
+   * domain") two-character value. The parameter affects results based on
+   * applicable law. This parameter also influences, but not fully restricts,
+   * results from the service.
+   * 
+ * + * string region_code = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The regionCode. + */ + @java.lang.Override + public java.lang.String getRegionCode() { + java.lang.Object ref = regionCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + regionCode_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Region code. The region code, specified as a ccTLD ("top-level
+   * domain") two-character value. The parameter affects results based on
+   * applicable law. This parameter also influences, but not fully restricts,
+   * results from the service.
+   * 
+ * + * string region_code = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for regionCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRegionCodeBytes() { + java.lang.Object ref = regionCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + regionCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (primaryQueryCase_ == 1) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, primaryQuery_); + } + if (primaryQueryCase_ == 2) { + output.writeMessage( + 2, (com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery) primaryQuery_); + } + if (primaryQueryCase_ == 3) { + output.writeMessage( + 3, (com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery) primaryQuery_); + } + if (getTravelModesList().size() > 0) { + output.writeUInt32NoTag(42); + output.writeUInt32NoTag(travelModesMemoizedSerializedSize); + } + for (int i = 0; i < travelModes_.size(); i++) { + output.writeEnumNoTag(travelModes_.getInt(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, languageCode_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(regionCode_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, regionCode_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (primaryQueryCase_ == 1) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, primaryQuery_); + } + if (primaryQueryCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery) primaryQuery_); + } + if (primaryQueryCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery) primaryQuery_); + } + { + int dataSize = 0; + for (int i = 0; i < travelModes_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(travelModes_.getInt(i)); + } + size += dataSize; + if (!getTravelModesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + travelModesMemoizedSerializedSize = dataSize; + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, languageCode_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(regionCode_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, regionCode_); + } + 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.geocode.v4.SearchDestinationsRequest)) { + return super.equals(obj); + } + com.google.maps.geocode.v4.SearchDestinationsRequest other = + (com.google.maps.geocode.v4.SearchDestinationsRequest) obj; + + if (!travelModes_.equals(other.travelModes_)) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (!getRegionCode().equals(other.getRegionCode())) return false; + if (!getPrimaryQueryCase().equals(other.getPrimaryQueryCase())) return false; + switch (primaryQueryCase_) { + case 1: + if (!getPlace().equals(other.getPlace())) return false; + break; + case 2: + if (!getAddressQuery().equals(other.getAddressQuery())) return false; + break; + case 3: + if (!getLocationQuery().equals(other.getLocationQuery())) 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(); + if (getTravelModesCount() > 0) { + hash = (37 * hash) + TRAVEL_MODES_FIELD_NUMBER; + hash = (53 * hash) + travelModes_.hashCode(); + } + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (37 * hash) + REGION_CODE_FIELD_NUMBER; + hash = (53 * hash) + getRegionCode().hashCode(); + switch (primaryQueryCase_) { + case 1: + hash = (37 * hash) + PLACE_FIELD_NUMBER; + hash = (53 * hash) + getPlace().hashCode(); + break; + case 2: + hash = (37 * hash) + ADDRESS_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getAddressQuery().hashCode(); + break; + case 3: + hash = (37 * hash) + LOCATION_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getLocationQuery().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest 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.geocode.v4.SearchDestinationsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest 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.geocode.v4.SearchDestinationsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geocode.v4.SearchDestinationsRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for DestinationService.SearchDestinations.
+   * 
+ * + * Protobuf type {@code google.maps.geocode.v4.SearchDestinationsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.geocode.v4.SearchDestinationsRequest) + com.google.maps.geocode.v4.SearchDestinationsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_SearchDestinationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_SearchDestinationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.SearchDestinationsRequest.class, + com.google.maps.geocode.v4.SearchDestinationsRequest.Builder.class); + } + + // Construct using com.google.maps.geocode.v4.SearchDestinationsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (addressQueryBuilder_ != null) { + addressQueryBuilder_.clear(); + } + if (locationQueryBuilder_ != null) { + locationQueryBuilder_.clear(); + } + travelModes_ = emptyIntList(); + languageCode_ = ""; + regionCode_ = ""; + primaryQueryCase_ = 0; + primaryQuery_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_SearchDestinationsRequest_descriptor; + } + + @java.lang.Override + public com.google.maps.geocode.v4.SearchDestinationsRequest getDefaultInstanceForType() { + return com.google.maps.geocode.v4.SearchDestinationsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.geocode.v4.SearchDestinationsRequest build() { + com.google.maps.geocode.v4.SearchDestinationsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.geocode.v4.SearchDestinationsRequest buildPartial() { + com.google.maps.geocode.v4.SearchDestinationsRequest result = + new com.google.maps.geocode.v4.SearchDestinationsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.geocode.v4.SearchDestinationsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000008) != 0)) { + travelModes_.makeImmutable(); + result.travelModes_ = travelModes_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.languageCode_ = languageCode_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.regionCode_ = regionCode_; + } + } + + private void buildPartialOneofs(com.google.maps.geocode.v4.SearchDestinationsRequest result) { + result.primaryQueryCase_ = primaryQueryCase_; + result.primaryQuery_ = this.primaryQuery_; + if (primaryQueryCase_ == 2 && addressQueryBuilder_ != null) { + result.primaryQuery_ = addressQueryBuilder_.build(); + } + if (primaryQueryCase_ == 3 && locationQueryBuilder_ != null) { + result.primaryQuery_ = locationQueryBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.geocode.v4.SearchDestinationsRequest) { + return mergeFrom((com.google.maps.geocode.v4.SearchDestinationsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.geocode.v4.SearchDestinationsRequest other) { + if (other == com.google.maps.geocode.v4.SearchDestinationsRequest.getDefaultInstance()) + return this; + if (!other.travelModes_.isEmpty()) { + if (travelModes_.isEmpty()) { + travelModes_ = other.travelModes_; + travelModes_.makeImmutable(); + bitField0_ |= 0x00000008; + } else { + ensureTravelModesIsMutable(); + travelModes_.addAll(other.travelModes_); + } + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getRegionCode().isEmpty()) { + regionCode_ = other.regionCode_; + bitField0_ |= 0x00000020; + onChanged(); + } + switch (other.getPrimaryQueryCase()) { + case PLACE: + { + primaryQueryCase_ = 1; + primaryQuery_ = other.primaryQuery_; + onChanged(); + break; + } + case ADDRESS_QUERY: + { + mergeAddressQuery(other.getAddressQuery()); + break; + } + case LOCATION_QUERY: + { + mergeLocationQuery(other.getLocationQuery()); + break; + } + case PRIMARYQUERY_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(); + primaryQueryCase_ = 1; + primaryQuery_ = s; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetAddressQueryFieldBuilder().getBuilder(), extensionRegistry); + primaryQueryCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetLocationQueryFieldBuilder().getBuilder(), extensionRegistry); + primaryQueryCase_ = 3; + break; + } // case 26 + case 40: + { + int tmpRaw = input.readEnum(); + ensureTravelModesIsMutable(); + travelModes_.addInt(tmpRaw); + break; + } // case 40 + case 42: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureTravelModesIsMutable(); + while (input.getBytesUntilLimit() > 0) { + travelModes_.addInt(input.readEnum()); + } + input.popLimit(limit); + break; + } // case 42 + case 50: + { + languageCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 50 + case 58: + { + regionCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 58 + 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 primaryQueryCase_ = 0; + private java.lang.Object primaryQuery_; + + public PrimaryQueryCase getPrimaryQueryCase() { + return PrimaryQueryCase.forNumber(primaryQueryCase_); + } + + public Builder clearPrimaryQuery() { + primaryQueryCase_ = 0; + primaryQuery_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * The resource name of a place, in `places/{place_id}` format.
+     * 
+ * + * string place = 1; + * + * @return Whether the place field is set. + */ + @java.lang.Override + public boolean hasPlace() { + return primaryQueryCase_ == 1; + } + + /** + * + * + *
+     * The resource name of a place, in `places/{place_id}` format.
+     * 
+ * + * string place = 1; + * + * @return The place. + */ + @java.lang.Override + public java.lang.String getPlace() { + java.lang.Object ref = ""; + if (primaryQueryCase_ == 1) { + ref = primaryQuery_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (primaryQueryCase_ == 1) { + primaryQuery_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The resource name of a place, in `places/{place_id}` format.
+     * 
+ * + * string place = 1; + * + * @return The bytes for place. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPlaceBytes() { + java.lang.Object ref = ""; + if (primaryQueryCase_ == 1) { + ref = primaryQuery_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (primaryQueryCase_ == 1) { + primaryQuery_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The resource name of a place, in `places/{place_id}` format.
+     * 
+ * + * string place = 1; + * + * @param value The place to set. + * @return This builder for chaining. + */ + public Builder setPlace(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + primaryQueryCase_ = 1; + primaryQuery_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * The resource name of a place, in `places/{place_id}` format.
+     * 
+ * + * string place = 1; + * + * @return This builder for chaining. + */ + public Builder clearPlace() { + if (primaryQueryCase_ == 1) { + primaryQueryCase_ = 0; + primaryQuery_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The resource name of a place, in `places/{place_id}` format.
+     * 
+ * + * string place = 1; + * + * @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); + primaryQueryCase_ = 1; + primaryQuery_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery, + com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery.Builder, + com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQueryOrBuilder> + addressQueryBuilder_; + + /** + * + * + *
+     * A street address.
+     * 
+ * + * .google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery address_query = 2; + * + * + * @return Whether the addressQuery field is set. + */ + @java.lang.Override + public boolean hasAddressQuery() { + return primaryQueryCase_ == 2; + } + + /** + * + * + *
+     * A street address.
+     * 
+ * + * .google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery address_query = 2; + * + * + * @return The addressQuery. + */ + @java.lang.Override + public com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery getAddressQuery() { + if (addressQueryBuilder_ == null) { + if (primaryQueryCase_ == 2) { + return (com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery) primaryQuery_; + } + return com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery + .getDefaultInstance(); + } else { + if (primaryQueryCase_ == 2) { + return addressQueryBuilder_.getMessage(); + } + return com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * A street address.
+     * 
+ * + * .google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery address_query = 2; + * + */ + public Builder setAddressQuery( + com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery value) { + if (addressQueryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + primaryQuery_ = value; + onChanged(); + } else { + addressQueryBuilder_.setMessage(value); + } + primaryQueryCase_ = 2; + return this; + } + + /** + * + * + *
+     * A street address.
+     * 
+ * + * .google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery address_query = 2; + * + */ + public Builder setAddressQuery( + com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery.Builder builderForValue) { + if (addressQueryBuilder_ == null) { + primaryQuery_ = builderForValue.build(); + onChanged(); + } else { + addressQueryBuilder_.setMessage(builderForValue.build()); + } + primaryQueryCase_ = 2; + return this; + } + + /** + * + * + *
+     * A street address.
+     * 
+ * + * .google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery address_query = 2; + * + */ + public Builder mergeAddressQuery( + com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery value) { + if (addressQueryBuilder_ == null) { + if (primaryQueryCase_ == 2 + && primaryQuery_ + != com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery + .getDefaultInstance()) { + primaryQuery_ = + com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery.newBuilder( + (com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery) + primaryQuery_) + .mergeFrom(value) + .buildPartial(); + } else { + primaryQuery_ = value; + } + onChanged(); + } else { + if (primaryQueryCase_ == 2) { + addressQueryBuilder_.mergeFrom(value); + } else { + addressQueryBuilder_.setMessage(value); + } + } + primaryQueryCase_ = 2; + return this; + } + + /** + * + * + *
+     * A street address.
+     * 
+ * + * .google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery address_query = 2; + * + */ + public Builder clearAddressQuery() { + if (addressQueryBuilder_ == null) { + if (primaryQueryCase_ == 2) { + primaryQueryCase_ = 0; + primaryQuery_ = null; + onChanged(); + } + } else { + if (primaryQueryCase_ == 2) { + primaryQueryCase_ = 0; + primaryQuery_ = null; + } + addressQueryBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A street address.
+     * 
+ * + * .google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery address_query = 2; + * + */ + public com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery.Builder + getAddressQueryBuilder() { + return internalGetAddressQueryFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * A street address.
+     * 
+ * + * .google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery address_query = 2; + * + */ + @java.lang.Override + public com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQueryOrBuilder + getAddressQueryOrBuilder() { + if ((primaryQueryCase_ == 2) && (addressQueryBuilder_ != null)) { + return addressQueryBuilder_.getMessageOrBuilder(); + } else { + if (primaryQueryCase_ == 2) { + return (com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery) primaryQuery_; + } + return com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * A street address.
+     * 
+ * + * .google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery address_query = 2; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery, + com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery.Builder, + com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQueryOrBuilder> + internalGetAddressQueryFieldBuilder() { + if (addressQueryBuilder_ == null) { + if (!(primaryQueryCase_ == 2)) { + primaryQuery_ = + com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery + .getDefaultInstance(); + } + addressQueryBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery, + com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery.Builder, + com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQueryOrBuilder>( + (com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery) primaryQuery_, + getParentForChildren(), + isClean()); + primaryQuery_ = null; + } + primaryQueryCase_ = 2; + onChanged(); + return addressQueryBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery, + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.Builder, + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQueryOrBuilder> + locationQueryBuilder_; + + /** + * + * + *
+     * A precise location.
+     * 
+ * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery location_query = 3; + * + * + * @return Whether the locationQuery field is set. + */ + @java.lang.Override + public boolean hasLocationQuery() { + return primaryQueryCase_ == 3; + } + + /** + * + * + *
+     * A precise location.
+     * 
+ * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery location_query = 3; + * + * + * @return The locationQuery. + */ + @java.lang.Override + public com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery getLocationQuery() { + if (locationQueryBuilder_ == null) { + if (primaryQueryCase_ == 3) { + return (com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery) primaryQuery_; + } + return com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery + .getDefaultInstance(); + } else { + if (primaryQueryCase_ == 3) { + return locationQueryBuilder_.getMessage(); + } + return com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * A precise location.
+     * 
+ * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery location_query = 3; + * + */ + public Builder setLocationQuery( + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery value) { + if (locationQueryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + primaryQuery_ = value; + onChanged(); + } else { + locationQueryBuilder_.setMessage(value); + } + primaryQueryCase_ = 3; + return this; + } + + /** + * + * + *
+     * A precise location.
+     * 
+ * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery location_query = 3; + * + */ + public Builder setLocationQuery( + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.Builder + builderForValue) { + if (locationQueryBuilder_ == null) { + primaryQuery_ = builderForValue.build(); + onChanged(); + } else { + locationQueryBuilder_.setMessage(builderForValue.build()); + } + primaryQueryCase_ = 3; + return this; + } + + /** + * + * + *
+     * A precise location.
+     * 
+ * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery location_query = 3; + * + */ + public Builder mergeLocationQuery( + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery value) { + if (locationQueryBuilder_ == null) { + if (primaryQueryCase_ == 3 + && primaryQuery_ + != com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery + .getDefaultInstance()) { + primaryQuery_ = + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.newBuilder( + (com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery) + primaryQuery_) + .mergeFrom(value) + .buildPartial(); + } else { + primaryQuery_ = value; + } + onChanged(); + } else { + if (primaryQueryCase_ == 3) { + locationQueryBuilder_.mergeFrom(value); + } else { + locationQueryBuilder_.setMessage(value); + } + } + primaryQueryCase_ = 3; + return this; + } + + /** + * + * + *
+     * A precise location.
+     * 
+ * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery location_query = 3; + * + */ + public Builder clearLocationQuery() { + if (locationQueryBuilder_ == null) { + if (primaryQueryCase_ == 3) { + primaryQueryCase_ = 0; + primaryQuery_ = null; + onChanged(); + } + } else { + if (primaryQueryCase_ == 3) { + primaryQueryCase_ = 0; + primaryQuery_ = null; + } + locationQueryBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A precise location.
+     * 
+ * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery location_query = 3; + * + */ + public com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.Builder + getLocationQueryBuilder() { + return internalGetLocationQueryFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * A precise location.
+     * 
+ * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery location_query = 3; + * + */ + @java.lang.Override + public com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQueryOrBuilder + getLocationQueryOrBuilder() { + if ((primaryQueryCase_ == 3) && (locationQueryBuilder_ != null)) { + return locationQueryBuilder_.getMessageOrBuilder(); + } else { + if (primaryQueryCase_ == 3) { + return (com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery) primaryQuery_; + } + return com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * A precise location.
+     * 
+ * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery location_query = 3; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery, + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.Builder, + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQueryOrBuilder> + internalGetLocationQueryFieldBuilder() { + if (locationQueryBuilder_ == null) { + if (!(primaryQueryCase_ == 3)) { + primaryQuery_ = + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery + .getDefaultInstance(); + } + locationQueryBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery, + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery.Builder, + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQueryOrBuilder>( + (com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery) primaryQuery_, + getParentForChildren(), + isClean()); + primaryQuery_ = null; + } + primaryQueryCase_ = 3; + onChanged(); + return locationQueryBuilder_; + } + + private com.google.protobuf.Internal.IntList travelModes_ = emptyIntList(); + + private void ensureTravelModesIsMutable() { + if (!travelModes_.isModifiable()) { + travelModes_ = makeMutableCopy(travelModes_); + } + bitField0_ |= 0x00000008; + } + + /** + * + * + *
+     * Optional. The travel modes to filter navigation points for. This influences
+     * the `navigation_points` field returned in the response. If empty,
+     * navigation points of all travel modes are returned.
+     * 
+ * + * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the travelModes. + */ + public java.util.List + getTravelModesList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.maps.geocode.v4.NavigationPoint.TravelMode>( + travelModes_, travelModes_converter_); + } + + /** + * + * + *
+     * Optional. The travel modes to filter navigation points for. This influences
+     * the `navigation_points` field returned in the response. If empty,
+     * navigation points of all travel modes are returned.
+     * 
+ * + * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of travelModes. + */ + public int getTravelModesCount() { + return travelModes_.size(); + } + + /** + * + * + *
+     * Optional. The travel modes to filter navigation points for. This influences
+     * the `navigation_points` field returned in the response. If empty,
+     * navigation points of all travel modes are returned.
+     * 
+ * + * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The travelModes at the given index. + */ + public com.google.maps.geocode.v4.NavigationPoint.TravelMode getTravelModes(int index) { + return travelModes_converter_.convert(travelModes_.getInt(index)); + } + + /** + * + * + *
+     * Optional. The travel modes to filter navigation points for. This influences
+     * the `navigation_points` field returned in the response. If empty,
+     * navigation points of all travel modes are returned.
+     * 
+ * + * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The travelModes to set. + * @return This builder for chaining. + */ + public Builder setTravelModes( + int index, com.google.maps.geocode.v4.NavigationPoint.TravelMode value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTravelModesIsMutable(); + travelModes_.setInt(index, value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The travel modes to filter navigation points for. This influences
+     * the `navigation_points` field returned in the response. If empty,
+     * navigation points of all travel modes are returned.
+     * 
+ * + * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The travelModes to add. + * @return This builder for chaining. + */ + public Builder addTravelModes(com.google.maps.geocode.v4.NavigationPoint.TravelMode value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTravelModesIsMutable(); + travelModes_.addInt(value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The travel modes to filter navigation points for. This influences
+     * the `navigation_points` field returned in the response. If empty,
+     * navigation points of all travel modes are returned.
+     * 
+ * + * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The travelModes to add. + * @return This builder for chaining. + */ + public Builder addAllTravelModes( + java.lang.Iterable + values) { + ensureTravelModesIsMutable(); + for (com.google.maps.geocode.v4.NavigationPoint.TravelMode value : values) { + travelModes_.addInt(value.getNumber()); + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The travel modes to filter navigation points for. This influences
+     * the `navigation_points` field returned in the response. If empty,
+     * navigation points of all travel modes are returned.
+     * 
+ * + * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearTravelModes() { + travelModes_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The travel modes to filter navigation points for. This influences
+     * the `navigation_points` field returned in the response. If empty,
+     * navigation points of all travel modes are returned.
+     * 
+ * + * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for travelModes. + */ + public java.util.List getTravelModesValueList() { + travelModes_.makeImmutable(); + return travelModes_; + } + + /** + * + * + *
+     * Optional. The travel modes to filter navigation points for. This influences
+     * the `navigation_points` field returned in the response. If empty,
+     * navigation points of all travel modes are returned.
+     * 
+ * + * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of travelModes at the given index. + */ + public int getTravelModesValue(int index) { + return travelModes_.getInt(index); + } + + /** + * + * + *
+     * Optional. The travel modes to filter navigation points for. This influences
+     * the `navigation_points` field returned in the response. If empty,
+     * navigation points of all travel modes are returned.
+     * 
+ * + * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for travelModes to set. + * @return This builder for chaining. + */ + public Builder setTravelModesValue(int index, int value) { + ensureTravelModesIsMutable(); + travelModes_.setInt(index, value); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The travel modes to filter navigation points for. This influences
+     * the `navigation_points` field returned in the response. If empty,
+     * navigation points of all travel modes are returned.
+     * 
+ * + * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for travelModes to add. + * @return This builder for chaining. + */ + public Builder addTravelModesValue(int value) { + ensureTravelModesIsMutable(); + travelModes_.addInt(value); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The travel modes to filter navigation points for. This influences
+     * the `navigation_points` field returned in the response. If empty,
+     * navigation points of all travel modes are returned.
+     * 
+ * + * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The enum numeric values on the wire for travelModes to add. + * @return This builder for chaining. + */ + public Builder addAllTravelModesValue(java.lang.Iterable values) { + ensureTravelModesIsMutable(); + for (int value : values) { + travelModes_.addInt(value); + } + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + + /** + * + * + *
+     * Optional. Language in which the results should be returned.
+     * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Language in which the results should be returned.
+     * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Language in which the results should be returned.
+     * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + languageCode_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Language in which the results should be returned.
+     * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + languageCode_ = getDefaultInstance().getLanguageCode(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Language in which the results should be returned.
+     * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + languageCode_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object regionCode_ = ""; + + /** + * + * + *
+     * Optional. Region code. The region code, specified as a ccTLD ("top-level
+     * domain") two-character value. The parameter affects results based on
+     * applicable law. This parameter also influences, but not fully restricts,
+     * results from the service.
+     * 
+ * + * string region_code = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The regionCode. + */ + public java.lang.String getRegionCode() { + java.lang.Object ref = regionCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + regionCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Region code. The region code, specified as a ccTLD ("top-level
+     * domain") two-character value. The parameter affects results based on
+     * applicable law. This parameter also influences, but not fully restricts,
+     * results from the service.
+     * 
+ * + * string region_code = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for regionCode. + */ + public com.google.protobuf.ByteString getRegionCodeBytes() { + java.lang.Object ref = regionCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + regionCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Region code. The region code, specified as a ccTLD ("top-level
+     * domain") two-character value. The parameter affects results based on
+     * applicable law. This parameter also influences, but not fully restricts,
+     * results from the service.
+     * 
+ * + * string region_code = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The regionCode to set. + * @return This builder for chaining. + */ + public Builder setRegionCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + regionCode_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Region code. The region code, specified as a ccTLD ("top-level
+     * domain") two-character value. The parameter affects results based on
+     * applicable law. This parameter also influences, but not fully restricts,
+     * results from the service.
+     * 
+ * + * string region_code = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRegionCode() { + regionCode_ = getDefaultInstance().getRegionCode(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Region code. The region code, specified as a ccTLD ("top-level
+     * domain") two-character value. The parameter affects results based on
+     * applicable law. This parameter also influences, but not fully restricts,
+     * results from the service.
+     * 
+ * + * string region_code = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for regionCode to set. + * @return This builder for chaining. + */ + public Builder setRegionCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + regionCode_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.maps.geocode.v4.SearchDestinationsRequest) + } + + // @@protoc_insertion_point(class_scope:google.maps.geocode.v4.SearchDestinationsRequest) + private static final com.google.maps.geocode.v4.SearchDestinationsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.geocode.v4.SearchDestinationsRequest(); + } + + public static com.google.maps.geocode.v4.SearchDestinationsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchDestinationsRequest 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.geocode.v4.SearchDestinationsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/SearchDestinationsRequestOrBuilder.java b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/SearchDestinationsRequestOrBuilder.java new file mode 100644 index 000000000000..d68778f585db --- /dev/null +++ b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/SearchDestinationsRequestOrBuilder.java @@ -0,0 +1,293 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/maps/geocode/v4/destination_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.geocode.v4; + +@com.google.protobuf.Generated +public interface SearchDestinationsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.geocode.v4.SearchDestinationsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of a place, in `places/{place_id}` format.
+   * 
+ * + * string place = 1; + * + * @return Whether the place field is set. + */ + boolean hasPlace(); + + /** + * + * + *
+   * The resource name of a place, in `places/{place_id}` format.
+   * 
+ * + * string place = 1; + * + * @return The place. + */ + java.lang.String getPlace(); + + /** + * + * + *
+   * The resource name of a place, in `places/{place_id}` format.
+   * 
+ * + * string place = 1; + * + * @return The bytes for place. + */ + com.google.protobuf.ByteString getPlaceBytes(); + + /** + * + * + *
+   * A street address.
+   * 
+ * + * .google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery address_query = 2; + * + * @return Whether the addressQuery field is set. + */ + boolean hasAddressQuery(); + + /** + * + * + *
+   * A street address.
+   * 
+ * + * .google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery address_query = 2; + * + * @return The addressQuery. + */ + com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery getAddressQuery(); + + /** + * + * + *
+   * A street address.
+   * 
+ * + * .google.maps.geocode.v4.SearchDestinationsRequest.AddressQuery address_query = 2; + */ + com.google.maps.geocode.v4.SearchDestinationsRequest.AddressQueryOrBuilder + getAddressQueryOrBuilder(); + + /** + * + * + *
+   * A precise location.
+   * 
+ * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery location_query = 3; + * + * + * @return Whether the locationQuery field is set. + */ + boolean hasLocationQuery(); + + /** + * + * + *
+   * A precise location.
+   * 
+ * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery location_query = 3; + * + * + * @return The locationQuery. + */ + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery getLocationQuery(); + + /** + * + * + *
+   * A precise location.
+   * 
+ * + * .google.maps.geocode.v4.SearchDestinationsRequest.LocationQuery location_query = 3; + * + */ + com.google.maps.geocode.v4.SearchDestinationsRequest.LocationQueryOrBuilder + getLocationQueryOrBuilder(); + + /** + * + * + *
+   * Optional. The travel modes to filter navigation points for. This influences
+   * the `navigation_points` field returned in the response. If empty,
+   * navigation points of all travel modes are returned.
+   * 
+ * + * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the travelModes. + */ + java.util.List getTravelModesList(); + + /** + * + * + *
+   * Optional. The travel modes to filter navigation points for. This influences
+   * the `navigation_points` field returned in the response. If empty,
+   * navigation points of all travel modes are returned.
+   * 
+ * + * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of travelModes. + */ + int getTravelModesCount(); + + /** + * + * + *
+   * Optional. The travel modes to filter navigation points for. This influences
+   * the `navigation_points` field returned in the response. If empty,
+   * navigation points of all travel modes are returned.
+   * 
+ * + * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The travelModes at the given index. + */ + com.google.maps.geocode.v4.NavigationPoint.TravelMode getTravelModes(int index); + + /** + * + * + *
+   * Optional. The travel modes to filter navigation points for. This influences
+   * the `navigation_points` field returned in the response. If empty,
+   * navigation points of all travel modes are returned.
+   * 
+ * + * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for travelModes. + */ + java.util.List getTravelModesValueList(); + + /** + * + * + *
+   * Optional. The travel modes to filter navigation points for. This influences
+   * the `navigation_points` field returned in the response. If empty,
+   * navigation points of all travel modes are returned.
+   * 
+ * + * + * repeated .google.maps.geocode.v4.NavigationPoint.TravelMode travel_modes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of travelModes at the given index. + */ + int getTravelModesValue(int index); + + /** + * + * + *
+   * Optional. Language in which the results should be returned.
+   * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + + /** + * + * + *
+   * Optional. Language in which the results should be returned.
+   * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); + + /** + * + * + *
+   * Optional. Region code. The region code, specified as a ccTLD ("top-level
+   * domain") two-character value. The parameter affects results based on
+   * applicable law. This parameter also influences, but not fully restricts,
+   * results from the service.
+   * 
+ * + * string region_code = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The regionCode. + */ + java.lang.String getRegionCode(); + + /** + * + * + *
+   * Optional. Region code. The region code, specified as a ccTLD ("top-level
+   * domain") two-character value. The parameter affects results based on
+   * applicable law. This parameter also influences, but not fully restricts,
+   * results from the service.
+   * 
+ * + * string region_code = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for regionCode. + */ + com.google.protobuf.ByteString getRegionCodeBytes(); + + com.google.maps.geocode.v4.SearchDestinationsRequest.PrimaryQueryCase getPrimaryQueryCase(); +} diff --git a/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/SearchDestinationsResponse.java b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/SearchDestinationsResponse.java new file mode 100644 index 000000000000..4112515f4ca3 --- /dev/null +++ b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/SearchDestinationsResponse.java @@ -0,0 +1,1016 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/maps/geocode/v4/destination_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.geocode.v4; + +/** + * + * + *
+ * Response message for DestinationService.SearchDestinations.
+ * 
+ * + * Protobuf type {@code google.maps.geocode.v4.SearchDestinationsResponse} + */ +@com.google.protobuf.Generated +public final class SearchDestinationsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.maps.geocode.v4.SearchDestinationsResponse) + SearchDestinationsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SearchDestinationsResponse"); + } + + // Use SearchDestinationsResponse.newBuilder() to construct. + private SearchDestinationsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SearchDestinationsResponse() { + destinations_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_SearchDestinationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_SearchDestinationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.SearchDestinationsResponse.class, + com.google.maps.geocode.v4.SearchDestinationsResponse.Builder.class); + } + + public static final int DESTINATIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List destinations_; + + /** + * + * + *
+   * A list of destinations.
+   *
+   * The service returns one result if a primary destination can be
+   * unambiguously identified from the primary query. Otherwise, the service
+   * might return multiple results for disambiguation or zero results.
+   * 
+ * + * repeated .google.maps.geocode.v4.Destination destinations = 1; + */ + @java.lang.Override + public java.util.List getDestinationsList() { + return destinations_; + } + + /** + * + * + *
+   * A list of destinations.
+   *
+   * The service returns one result if a primary destination can be
+   * unambiguously identified from the primary query. Otherwise, the service
+   * might return multiple results for disambiguation or zero results.
+   * 
+ * + * repeated .google.maps.geocode.v4.Destination destinations = 1; + */ + @java.lang.Override + public java.util.List + getDestinationsOrBuilderList() { + return destinations_; + } + + /** + * + * + *
+   * A list of destinations.
+   *
+   * The service returns one result if a primary destination can be
+   * unambiguously identified from the primary query. Otherwise, the service
+   * might return multiple results for disambiguation or zero results.
+   * 
+ * + * repeated .google.maps.geocode.v4.Destination destinations = 1; + */ + @java.lang.Override + public int getDestinationsCount() { + return destinations_.size(); + } + + /** + * + * + *
+   * A list of destinations.
+   *
+   * The service returns one result if a primary destination can be
+   * unambiguously identified from the primary query. Otherwise, the service
+   * might return multiple results for disambiguation or zero results.
+   * 
+ * + * repeated .google.maps.geocode.v4.Destination destinations = 1; + */ + @java.lang.Override + public com.google.maps.geocode.v4.Destination getDestinations(int index) { + return destinations_.get(index); + } + + /** + * + * + *
+   * A list of destinations.
+   *
+   * The service returns one result if a primary destination can be
+   * unambiguously identified from the primary query. Otherwise, the service
+   * might return multiple results for disambiguation or zero results.
+   * 
+ * + * repeated .google.maps.geocode.v4.Destination destinations = 1; + */ + @java.lang.Override + public com.google.maps.geocode.v4.DestinationOrBuilder getDestinationsOrBuilder(int index) { + return destinations_.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 < destinations_.size(); i++) { + output.writeMessage(1, destinations_.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 < destinations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, destinations_.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.geocode.v4.SearchDestinationsResponse)) { + return super.equals(obj); + } + com.google.maps.geocode.v4.SearchDestinationsResponse other = + (com.google.maps.geocode.v4.SearchDestinationsResponse) obj; + + if (!getDestinationsList().equals(other.getDestinationsList())) 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 (getDestinationsCount() > 0) { + hash = (37 * hash) + DESTINATIONS_FIELD_NUMBER; + hash = (53 * hash) + getDestinationsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.geocode.v4.SearchDestinationsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.SearchDestinationsResponse 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.geocode.v4.SearchDestinationsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.SearchDestinationsResponse 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.geocode.v4.SearchDestinationsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.geocode.v4.SearchDestinationsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.geocode.v4.SearchDestinationsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.SearchDestinationsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.SearchDestinationsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.SearchDestinationsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.geocode.v4.SearchDestinationsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.geocode.v4.SearchDestinationsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.geocode.v4.SearchDestinationsResponse 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for DestinationService.SearchDestinations.
+   * 
+ * + * Protobuf type {@code google.maps.geocode.v4.SearchDestinationsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.geocode.v4.SearchDestinationsResponse) + com.google.maps.geocode.v4.SearchDestinationsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_SearchDestinationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_SearchDestinationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.geocode.v4.SearchDestinationsResponse.class, + com.google.maps.geocode.v4.SearchDestinationsResponse.Builder.class); + } + + // Construct using com.google.maps.geocode.v4.SearchDestinationsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (destinationsBuilder_ == null) { + destinations_ = java.util.Collections.emptyList(); + } else { + destinations_ = null; + destinationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.geocode.v4.DestinationServiceProto + .internal_static_google_maps_geocode_v4_SearchDestinationsResponse_descriptor; + } + + @java.lang.Override + public com.google.maps.geocode.v4.SearchDestinationsResponse getDefaultInstanceForType() { + return com.google.maps.geocode.v4.SearchDestinationsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.geocode.v4.SearchDestinationsResponse build() { + com.google.maps.geocode.v4.SearchDestinationsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.geocode.v4.SearchDestinationsResponse buildPartial() { + com.google.maps.geocode.v4.SearchDestinationsResponse result = + new com.google.maps.geocode.v4.SearchDestinationsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.maps.geocode.v4.SearchDestinationsResponse result) { + if (destinationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + destinations_ = java.util.Collections.unmodifiableList(destinations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.destinations_ = destinations_; + } else { + result.destinations_ = destinationsBuilder_.build(); + } + } + + private void buildPartial0(com.google.maps.geocode.v4.SearchDestinationsResponse result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.geocode.v4.SearchDestinationsResponse) { + return mergeFrom((com.google.maps.geocode.v4.SearchDestinationsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.geocode.v4.SearchDestinationsResponse other) { + if (other == com.google.maps.geocode.v4.SearchDestinationsResponse.getDefaultInstance()) + return this; + if (destinationsBuilder_ == null) { + if (!other.destinations_.isEmpty()) { + if (destinations_.isEmpty()) { + destinations_ = other.destinations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDestinationsIsMutable(); + destinations_.addAll(other.destinations_); + } + onChanged(); + } + } else { + if (!other.destinations_.isEmpty()) { + if (destinationsBuilder_.isEmpty()) { + destinationsBuilder_.dispose(); + destinationsBuilder_ = null; + destinations_ = other.destinations_; + bitField0_ = (bitField0_ & ~0x00000001); + destinationsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetDestinationsFieldBuilder() + : null; + } else { + destinationsBuilder_.addAllMessages(other.destinations_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.maps.geocode.v4.Destination m = + input.readMessage( + com.google.maps.geocode.v4.Destination.parser(), extensionRegistry); + if (destinationsBuilder_ == null) { + ensureDestinationsIsMutable(); + destinations_.add(m); + } else { + destinationsBuilder_.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 destinations_ = + java.util.Collections.emptyList(); + + private void ensureDestinationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + destinations_ = + new java.util.ArrayList(destinations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.maps.geocode.v4.Destination, + com.google.maps.geocode.v4.Destination.Builder, + com.google.maps.geocode.v4.DestinationOrBuilder> + destinationsBuilder_; + + /** + * + * + *
+     * A list of destinations.
+     *
+     * The service returns one result if a primary destination can be
+     * unambiguously identified from the primary query. Otherwise, the service
+     * might return multiple results for disambiguation or zero results.
+     * 
+ * + * repeated .google.maps.geocode.v4.Destination destinations = 1; + */ + public java.util.List getDestinationsList() { + if (destinationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(destinations_); + } else { + return destinationsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * A list of destinations.
+     *
+     * The service returns one result if a primary destination can be
+     * unambiguously identified from the primary query. Otherwise, the service
+     * might return multiple results for disambiguation or zero results.
+     * 
+ * + * repeated .google.maps.geocode.v4.Destination destinations = 1; + */ + public int getDestinationsCount() { + if (destinationsBuilder_ == null) { + return destinations_.size(); + } else { + return destinationsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * A list of destinations.
+     *
+     * The service returns one result if a primary destination can be
+     * unambiguously identified from the primary query. Otherwise, the service
+     * might return multiple results for disambiguation or zero results.
+     * 
+ * + * repeated .google.maps.geocode.v4.Destination destinations = 1; + */ + public com.google.maps.geocode.v4.Destination getDestinations(int index) { + if (destinationsBuilder_ == null) { + return destinations_.get(index); + } else { + return destinationsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * A list of destinations.
+     *
+     * The service returns one result if a primary destination can be
+     * unambiguously identified from the primary query. Otherwise, the service
+     * might return multiple results for disambiguation or zero results.
+     * 
+ * + * repeated .google.maps.geocode.v4.Destination destinations = 1; + */ + public Builder setDestinations(int index, com.google.maps.geocode.v4.Destination value) { + if (destinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDestinationsIsMutable(); + destinations_.set(index, value); + onChanged(); + } else { + destinationsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * A list of destinations.
+     *
+     * The service returns one result if a primary destination can be
+     * unambiguously identified from the primary query. Otherwise, the service
+     * might return multiple results for disambiguation or zero results.
+     * 
+ * + * repeated .google.maps.geocode.v4.Destination destinations = 1; + */ + public Builder setDestinations( + int index, com.google.maps.geocode.v4.Destination.Builder builderForValue) { + if (destinationsBuilder_ == null) { + ensureDestinationsIsMutable(); + destinations_.set(index, builderForValue.build()); + onChanged(); + } else { + destinationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of destinations.
+     *
+     * The service returns one result if a primary destination can be
+     * unambiguously identified from the primary query. Otherwise, the service
+     * might return multiple results for disambiguation or zero results.
+     * 
+ * + * repeated .google.maps.geocode.v4.Destination destinations = 1; + */ + public Builder addDestinations(com.google.maps.geocode.v4.Destination value) { + if (destinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDestinationsIsMutable(); + destinations_.add(value); + onChanged(); + } else { + destinationsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * A list of destinations.
+     *
+     * The service returns one result if a primary destination can be
+     * unambiguously identified from the primary query. Otherwise, the service
+     * might return multiple results for disambiguation or zero results.
+     * 
+ * + * repeated .google.maps.geocode.v4.Destination destinations = 1; + */ + public Builder addDestinations(int index, com.google.maps.geocode.v4.Destination value) { + if (destinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDestinationsIsMutable(); + destinations_.add(index, value); + onChanged(); + } else { + destinationsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * A list of destinations.
+     *
+     * The service returns one result if a primary destination can be
+     * unambiguously identified from the primary query. Otherwise, the service
+     * might return multiple results for disambiguation or zero results.
+     * 
+ * + * repeated .google.maps.geocode.v4.Destination destinations = 1; + */ + public Builder addDestinations(com.google.maps.geocode.v4.Destination.Builder builderForValue) { + if (destinationsBuilder_ == null) { + ensureDestinationsIsMutable(); + destinations_.add(builderForValue.build()); + onChanged(); + } else { + destinationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of destinations.
+     *
+     * The service returns one result if a primary destination can be
+     * unambiguously identified from the primary query. Otherwise, the service
+     * might return multiple results for disambiguation or zero results.
+     * 
+ * + * repeated .google.maps.geocode.v4.Destination destinations = 1; + */ + public Builder addDestinations( + int index, com.google.maps.geocode.v4.Destination.Builder builderForValue) { + if (destinationsBuilder_ == null) { + ensureDestinationsIsMutable(); + destinations_.add(index, builderForValue.build()); + onChanged(); + } else { + destinationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of destinations.
+     *
+     * The service returns one result if a primary destination can be
+     * unambiguously identified from the primary query. Otherwise, the service
+     * might return multiple results for disambiguation or zero results.
+     * 
+ * + * repeated .google.maps.geocode.v4.Destination destinations = 1; + */ + public Builder addAllDestinations( + java.lang.Iterable values) { + if (destinationsBuilder_ == null) { + ensureDestinationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, destinations_); + onChanged(); + } else { + destinationsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * A list of destinations.
+     *
+     * The service returns one result if a primary destination can be
+     * unambiguously identified from the primary query. Otherwise, the service
+     * might return multiple results for disambiguation or zero results.
+     * 
+ * + * repeated .google.maps.geocode.v4.Destination destinations = 1; + */ + public Builder clearDestinations() { + if (destinationsBuilder_ == null) { + destinations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + destinationsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A list of destinations.
+     *
+     * The service returns one result if a primary destination can be
+     * unambiguously identified from the primary query. Otherwise, the service
+     * might return multiple results for disambiguation or zero results.
+     * 
+ * + * repeated .google.maps.geocode.v4.Destination destinations = 1; + */ + public Builder removeDestinations(int index) { + if (destinationsBuilder_ == null) { + ensureDestinationsIsMutable(); + destinations_.remove(index); + onChanged(); + } else { + destinationsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * A list of destinations.
+     *
+     * The service returns one result if a primary destination can be
+     * unambiguously identified from the primary query. Otherwise, the service
+     * might return multiple results for disambiguation or zero results.
+     * 
+ * + * repeated .google.maps.geocode.v4.Destination destinations = 1; + */ + public com.google.maps.geocode.v4.Destination.Builder getDestinationsBuilder(int index) { + return internalGetDestinationsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * A list of destinations.
+     *
+     * The service returns one result if a primary destination can be
+     * unambiguously identified from the primary query. Otherwise, the service
+     * might return multiple results for disambiguation or zero results.
+     * 
+ * + * repeated .google.maps.geocode.v4.Destination destinations = 1; + */ + public com.google.maps.geocode.v4.DestinationOrBuilder getDestinationsOrBuilder(int index) { + if (destinationsBuilder_ == null) { + return destinations_.get(index); + } else { + return destinationsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * A list of destinations.
+     *
+     * The service returns one result if a primary destination can be
+     * unambiguously identified from the primary query. Otherwise, the service
+     * might return multiple results for disambiguation or zero results.
+     * 
+ * + * repeated .google.maps.geocode.v4.Destination destinations = 1; + */ + public java.util.List + getDestinationsOrBuilderList() { + if (destinationsBuilder_ != null) { + return destinationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(destinations_); + } + } + + /** + * + * + *
+     * A list of destinations.
+     *
+     * The service returns one result if a primary destination can be
+     * unambiguously identified from the primary query. Otherwise, the service
+     * might return multiple results for disambiguation or zero results.
+     * 
+ * + * repeated .google.maps.geocode.v4.Destination destinations = 1; + */ + public com.google.maps.geocode.v4.Destination.Builder addDestinationsBuilder() { + return internalGetDestinationsFieldBuilder() + .addBuilder(com.google.maps.geocode.v4.Destination.getDefaultInstance()); + } + + /** + * + * + *
+     * A list of destinations.
+     *
+     * The service returns one result if a primary destination can be
+     * unambiguously identified from the primary query. Otherwise, the service
+     * might return multiple results for disambiguation or zero results.
+     * 
+ * + * repeated .google.maps.geocode.v4.Destination destinations = 1; + */ + public com.google.maps.geocode.v4.Destination.Builder addDestinationsBuilder(int index) { + return internalGetDestinationsFieldBuilder() + .addBuilder(index, com.google.maps.geocode.v4.Destination.getDefaultInstance()); + } + + /** + * + * + *
+     * A list of destinations.
+     *
+     * The service returns one result if a primary destination can be
+     * unambiguously identified from the primary query. Otherwise, the service
+     * might return multiple results for disambiguation or zero results.
+     * 
+ * + * repeated .google.maps.geocode.v4.Destination destinations = 1; + */ + public java.util.List + getDestinationsBuilderList() { + return internalGetDestinationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.maps.geocode.v4.Destination, + com.google.maps.geocode.v4.Destination.Builder, + com.google.maps.geocode.v4.DestinationOrBuilder> + internalGetDestinationsFieldBuilder() { + if (destinationsBuilder_ == null) { + destinationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.maps.geocode.v4.Destination, + com.google.maps.geocode.v4.Destination.Builder, + com.google.maps.geocode.v4.DestinationOrBuilder>( + destinations_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + destinations_ = null; + } + return destinationsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.maps.geocode.v4.SearchDestinationsResponse) + } + + // @@protoc_insertion_point(class_scope:google.maps.geocode.v4.SearchDestinationsResponse) + private static final com.google.maps.geocode.v4.SearchDestinationsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.geocode.v4.SearchDestinationsResponse(); + } + + public static com.google.maps.geocode.v4.SearchDestinationsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchDestinationsResponse 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.geocode.v4.SearchDestinationsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/SearchDestinationsResponseOrBuilder.java b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/SearchDestinationsResponseOrBuilder.java new file mode 100644 index 000000000000..eafb69831d94 --- /dev/null +++ b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/java/com/google/maps/geocode/v4/SearchDestinationsResponseOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/maps/geocode/v4/destination_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.geocode.v4; + +@com.google.protobuf.Generated +public interface SearchDestinationsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.geocode.v4.SearchDestinationsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of destinations.
+   *
+   * The service returns one result if a primary destination can be
+   * unambiguously identified from the primary query. Otherwise, the service
+   * might return multiple results for disambiguation or zero results.
+   * 
+ * + * repeated .google.maps.geocode.v4.Destination destinations = 1; + */ + java.util.List getDestinationsList(); + + /** + * + * + *
+   * A list of destinations.
+   *
+   * The service returns one result if a primary destination can be
+   * unambiguously identified from the primary query. Otherwise, the service
+   * might return multiple results for disambiguation or zero results.
+   * 
+ * + * repeated .google.maps.geocode.v4.Destination destinations = 1; + */ + com.google.maps.geocode.v4.Destination getDestinations(int index); + + /** + * + * + *
+   * A list of destinations.
+   *
+   * The service returns one result if a primary destination can be
+   * unambiguously identified from the primary query. Otherwise, the service
+   * might return multiple results for disambiguation or zero results.
+   * 
+ * + * repeated .google.maps.geocode.v4.Destination destinations = 1; + */ + int getDestinationsCount(); + + /** + * + * + *
+   * A list of destinations.
+   *
+   * The service returns one result if a primary destination can be
+   * unambiguously identified from the primary query. Otherwise, the service
+   * might return multiple results for disambiguation or zero results.
+   * 
+ * + * repeated .google.maps.geocode.v4.Destination destinations = 1; + */ + java.util.List + getDestinationsOrBuilderList(); + + /** + * + * + *
+   * A list of destinations.
+   *
+   * The service returns one result if a primary destination can be
+   * unambiguously identified from the primary query. Otherwise, the service
+   * might return multiple results for disambiguation or zero results.
+   * 
+ * + * repeated .google.maps.geocode.v4.Destination destinations = 1; + */ + com.google.maps.geocode.v4.DestinationOrBuilder getDestinationsOrBuilder(int index); +} diff --git a/java-maps-geocode/proto-google-maps-geocode-v4/src/main/proto/google/maps/geocode/v4/destination_service.proto b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/proto/google/maps/geocode/v4/destination_service.proto new file mode 100644 index 000000000000..721c927970ea --- /dev/null +++ b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/proto/google/maps/geocode/v4/destination_service.proto @@ -0,0 +1,435 @@ +// Copyright 2026 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.geocode.v4; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/protobuf/struct.proto"; +import "google/type/latlng.proto"; +import "google/type/localized_text.proto"; +import "google/type/postal_address.proto"; + +option csharp_namespace = "Google.Maps.Geocode.V4"; +option go_package = "cloud.google.com/go/maps/geocode/apiv4/geocodepb;geocodepb"; +option java_multiple_files = true; +option java_outer_classname = "DestinationServiceProto"; +option java_package = "com.google.maps.geocode.v4"; +option objc_class_prefix = "GMPG"; +option php_namespace = "Google\\Maps\\Geocode\\V4"; +option ruby_package = "Google::Maps::Geocode::V4"; + +// A service for retrieving destinations. +// +// A destination provides hierarchical context about a place, which +// allows you to, for example, find apartment buildings within a larger +// apartment complex and vice versa. It also provides navigation points suitable +// for use cases such as ridesharing or delivery. +service DestinationService { + option (google.api.default_host) = "geocoding-backend.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/maps-platform.destinations," + "https://www.googleapis.com/auth/maps-platform.geocode"; + + // This method performs a destination lookup and returns a list of + // destinations. + rpc SearchDestinations(SearchDestinationsRequest) + returns (SearchDestinationsResponse) { + option (google.api.http) = { + post: "/v4/geocode/destinations" + body: "*" + }; + } +} + +// Request message for DestinationService.SearchDestinations. +message SearchDestinationsRequest { + // The street address that you want to search for. Specify addresses in + // accordance with the format used by the national postal service of the + // country concerned. + message AddressQuery { + // The address query. + oneof kind { + // A street address in postal address format. + google.type.PostalAddress address = 1; + + // A street address formatted as a single line. + string address_query = 2; + } + } + + // A location query to identify a nearby primary destination. + // + // Note: if the location query is within a building that contains subpremises, + // it is possible that the returned primary place is a subpremise. In these + // cases, the `containing_places` field will include the building. + message LocationQuery { + // Filters to apply to destination candidates. + message PlaceFilter { + // Defines options for addressability filtering. New values may be added + // in the future. + enum Addressability { + // When unspecified, the service will choose a sensible default. + ADDRESSABILITY_UNSPECIFIED = 0; + + // Addressability is not a filtering criteria. Destinations are returned + // regardless of their addressability. + ANY = 1; + + // All destinations returned will have a primary place with a street + // level address or name. + PRIMARY = 2; + + // All destinations returned will have either a primary place or a + // subdestination with a street level address or name. + WEAK = 3; + } + + // Optional. If specified, all destinations are guaranteed to have a + // primary place with this structure type. This can result in filtering + // out some destinations, or in coarsening/refining the returned + // destinations. + // + // For example, if `GROUNDS` is specified, all returned destinations will + // have a primary place with the `GROUNDS` structure type. This can + // result in filtering out some destinations that are not part of a + // grounds, or in coarsening the returned destinations to the grounds + // level. + // + // Another use of this field is to more easily extract building display + // polygons. For example, if `BUILDING` is specified, the primary place's + // display polygon will be for the building at the specified location. + PlaceView.StructureType structure_type = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If specified, only returns destinations that meet the + // corresponding addressability criteria. + Addressability addressability = 3 + [(google.api.field_behavior) = OPTIONAL]; + } + + // The location query. + oneof kind { + // A precise LatLng location. + google.type.LatLng location = 1; + } + + // Optional. Filters to apply to destination candidates. + PlaceFilter place_filter = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Query for the primary destination. This can be either a place, a fully + // specified address, or a LatLng location. Some places and addresses with + // minimal information won't be able to be turned into a destination. + // + // The destinations are built around the specified primary query. + // + // Note: only places and addresses that can have a navigational destination + // are supported. For example, a place that represents a house or an apartment + // complex can be used as the primary query, but places that represent a + // locality or an administrative area cannot be used as the primary query. + oneof primary_query { + // The resource name of a place, in `places/{place_id}` format. + string place = 1; + + // A street address. + AddressQuery address_query = 2; + + // A precise location. + LocationQuery location_query = 3; + } + + // Optional. The travel modes to filter navigation points for. This influences + // the `navigation_points` field returned in the response. If empty, + // navigation points of all travel modes are returned. + repeated NavigationPoint.TravelMode travel_modes = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Language in which the results should be returned. + string language_code = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Region code. The region code, specified as a ccTLD ("top-level + // domain") two-character value. The parameter affects results based on + // applicable law. This parameter also influences, but not fully restricts, + // results from the service. + string region_code = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for DestinationService.SearchDestinations. +message SearchDestinationsResponse { + // A list of destinations. + // + // The service returns one result if a primary destination can be + // unambiguously identified from the primary query. Otherwise, the service + // might return multiple results for disambiguation or zero results. + repeated Destination destinations = 1; +} + +// A destination. This includes the primary place, related places, +// entrances, and navigation points. +message Destination { + // The primary place identified by the `primary_query` in the request. + PlaceView primary = 1; + + // The less precise places that the primary place is contained by. + // For example, the apartment complex that contains this building. + repeated PlaceView containing_places = 2; + + // More precise sub-destinations of the primary place. For example, units + // contained in a building. + // + // Note: compared to the + // [SubDestination](/maps/documentation/places/web-service/reference/rest/v1/places#SubDestination) + // returned by the Places API, this list of sub-destinations is more + // exhaustive, and each sub-destination contains more information. + repeated PlaceView sub_destinations = 3; + + // Landmarks that can be used to communicate where the destination is + // or help with arrival. + repeated Landmark landmarks = 4; + + // Entrances for this destination. + repeated Entrance entrances = 5; + + // Navigation points for this destination. + repeated NavigationPoint navigation_points = 6; +} + +// Represents a view of a +// [Place](https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places#resource:-place) +// in the Places API. It also provides additional information specific to +// destinations, such as the structure type and the display polygon. +// +// In some cases, a `PlaceView` with the same place ID might differ from what +// is being returned by the Places API for the `types` and +// `display_name` fields. +message PlaceView { + // The type of structure that this place represents. + enum StructureType { + // Not used. + STRUCTURE_TYPE_UNSPECIFIED = 0; + + // A point location. + POINT = 1; + + // A sub-section of a building. + SECTION = 2; + + // A building. + BUILDING = 3; + + // A large area that typically contains multiple buildings, such as a + // university campus, an apartment complex, or a shopping mall. + GROUNDS = 4; + } + + // This Place's resource name, in `places/{placeId}` format. Can be used to + // look up the Place. + string place = 1; + + // The unique identifier of a place. + string place_id = 2; + + // Human readable place description. For example, "Gate B", "McDonalds" + google.type.LocalizedText display_name = 3; + + // The primary place type of this place. See + // https://developers.google.com/maps/documentation/places/web-service/place-types + // for the list of possible values. + // + // Note: This field is not always populated. Be prepared to use the `types` + // field in such situations. + string primary_type = 4; + + // All associated place types of this place. See + // https://developers.google.com/maps/documentation/places/web-service/place-types + // for the list of possible values. + repeated string types = 5; + + // One line address. + string formatted_address = 6; + + // Structured address. + google.type.PostalAddress postal_address = 7; + + // The type of structure corresponding to this place. + StructureType structure_type = 8; + + // The location of this place. For places with display polygons, this can + // represent a good spot to put a marker on the map. + google.type.LatLng location = 9; + + // The polygon outline of the place in GeoJSON format, using the RFC 7946 + // format: https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.6. + // + // Note: The RFC 7946 format supports MultiPolygons, so one `display_polygon` + // object can represent multiple polygons. + google.protobuf.Struct display_polygon = 10; +} + +// An entrance is a single latitude/longitude coordinate pair that defines the +// location of an entry and exit point for a place. +message Entrance { + // Characteristics that describe an entrance. + enum Tag { + // Not used. + TAG_UNSPECIFIED = 0; + + // The entrance likely provides physical access to the primary place in + // the returned destination. A place can have multiple preferred entrances. + // If an entrance does not have this tag, it means the entrance is + // physically on the same building as the primary place, but does not + // necessarily provide access to the place. + // + // For example, if the primary place is a restaurant in a strip mall, the + // "PREFERRED" entrances will be the ones that likely lead into the + // restaurant itself, while the other returned entrances will be other + // entrances for the building, such as entrances into other restaurants in + // the strip mall. + // + // If the primary place is a building itself, the `PREFERRED` entrances + // will be the ones that lead into the "main" part of the building. For + // example, in a shopping center the `PREFERRED` entrances will be the ones + // that allow access to the main foyer area, but if an entrance only + // provides access to a store on the side of the building, it won't be a + // `PREFERRED` entrance. + // + // Note: a `PREFERRED` entrance might not provide access to the primary + // place, and a non-`PREFERRED` entrance might provide access to the + // primary place. + PREFERRED = 1; + } + + // The location of the entrance. + google.type.LatLng location = 2; + + // A list of tags that describe the entrance. + repeated Tag tags = 3; + + // The structure this entrance is physically located on, in + // `places/{place_id}` format. + string place = 4; +} + +// A navigation point is a location next to a road where navigation can end. +message NavigationPoint { + // Travel modes that are appropriate for this navigation point. + enum TravelMode { + // Not used. + TRAVEL_MODE_UNSPECIFIED = 0; + + // Suitable for driving. + DRIVE = 1; + + // Suitable for walking. + WALK = 2; + } + + // Usages supported by this navigation point. + // New values may be added in the future. + enum Usage { + // Not used. + USAGE_UNSPECIFIED = 0; + + // Indicates that the usage type is unknown. + UNKNOWN = 1; + + // Suitable for dropping off a passenger. For example, a rideshare drop off + // location. + DROPOFF = 2; + + // Suitable for picking up a passenger. For example, a rideshare pick up + // location. + PICKUP = 3; + + // Suitable for parking. For example, within a parking lot. + PARKING = 4; + } + + // Output only. A token that can be used to identify this navigation point. + string navigation_point_token = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The display name of this navigation point. For example, "5th Ave" or "Gate + // B". + google.type.LocalizedText display_name = 2; + + // A point next to the road segment where navigation should end. The point is + // intentionally slightly offset from the road's centerline to clearly mark + // the side of the road where the place is located. + google.type.LatLng location = 3; + + // Travel modes that are appropriate for this navigation point. + repeated TravelMode travel_modes = 4; + + // Lists `usages` supported by this navigation point. If empty, it does not + // necessarily mean its usage is restricted in any way. All navigation + // points can be used for general navigation. + repeated Usage usages = 5; +} + +// Landmarks are used to communicate where the destination is or help with +// arriving at the destination. +message Landmark { + // The list of all possible tags that describe how a landmark can be used in + // the context of a destination. + // + // If an address has both the `ADDRESS` and `ARRIVAL` tags, it means the + // landmark is both locally prominent and close to the destination. + enum Tag { + // Not used. + TAG_UNSPECIFIED = 0; + + // A locally prominent place that can be used to identify the general + // location of the destination. Typically within a few hundred meters of the + // destination. These are similar to the landmarks returned by the + // Address Descriptors feature of the Geocoding API: + // https://developers.google.com/maps/documentation/geocoding/address-descriptors/requests-address-descriptors. + ADDRESS = 1; + + // A place that can be used to help arrive at the destination. Useful for + // navigation once you are close to the destination. For example, this + // landmark might be a place that is across the street from the destination. + // A landmark with this tag is typically closer to the destination than + // landmarks with the `ADDRESS` tag. + ARRIVAL = 2; + } + + // The landmark. + oneof landmark { + // The place that represents this landmark. + PlaceView place = 1; + } + + // A human-readable description of how the destination relates to the + // landmark. For example: "Near the Empire State Building" or "Across from + // the White House". + google.type.LocalizedText relational_description = 2; + + // Tags that describe how the landmark can be used in the context of the + // destination. + repeated Tag tags = 3; + + // Output only. The straight-line distance from this landmark to the + // destination in meters. + double straight_line_distance_meters = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The road-network distance from this landmark to the + // destination in meters. + double travel_distance_meters = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-maps-geocode/proto-google-maps-geocode-v4/src/main/proto/google/maps/geocode/v4/geocode_service.proto b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/proto/google/maps/geocode/v4/geocode_service.proto new file mode 100644 index 000000000000..71b9caf0c4ad --- /dev/null +++ b/java-maps-geocode/proto-google-maps-geocode-v4/src/main/proto/google/maps/geocode/v4/geocode_service.proto @@ -0,0 +1,279 @@ +// Copyright 2026 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.geocode.v4; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/geo/type/viewport.proto"; +import "google/type/latlng.proto"; +import "google/type/localized_text.proto"; +import "google/type/postal_address.proto"; + +option csharp_namespace = "Google.Maps.Geocode.V4"; +option go_package = "cloud.google.com/go/maps/geocode/apiv4/geocodepb;geocodepb"; +option java_multiple_files = true; +option java_outer_classname = "GeocodeServiceProto"; +option java_package = "com.google.maps.geocode.v4"; +option objc_class_prefix = "GMPG"; +option php_namespace = "Google\\Maps\\Geocode\\V4"; +option ruby_package = "Google::Maps::Geocode::V4"; + +// A service for performing geocoding. +service GeocodeService { + option (google.api.default_host) = "geocoding-backend.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/maps-platform.geocode," + "https://www.googleapis.com/auth/maps-platform.geocode.address," + "https://www.googleapis.com/auth/maps-platform.geocode.location," + "https://www.googleapis.com/auth/maps-platform.geocode.place"; + + // This method performs an address geocode, which maps an address to a + // LatLng. It also provides structured information about the address. + rpc GeocodeAddress(GeocodeAddressRequest) returns (GeocodeAddressResponse) { + option (google.api.http) = { + get: "/v4/geocode/address" + additional_bindings { get: "/v4/geocode/address/{address_query}" } + }; + } + + // This method performs a location geocode, which maps a LatLng to an + // address. It also provides structured information about the address. + rpc GeocodeLocation(GeocodeLocationRequest) + returns (GeocodeLocationResponse) { + option (google.api.http) = { + get: "/v4/geocode/location" + additional_bindings { get: "/v4/geocode/location/{location_query}" } + }; + } + + // This method performs a geocode lookup using a place ID. + rpc GeocodePlace(GeocodePlaceRequest) returns (GeocodeResult) { + option (google.api.http) = { + get: "/v4/geocode/{place=places/*}" + }; + } +} + +// Request message for GeocodeService.GeocodeAddress. +message GeocodeAddressRequest { + // The region to search. This location serves as a bias which means results + // around the given location are preferred. + message LocationBias { + // Types of location bias. + oneof type { + // A rectangular box defined by northeast and southwest corner. + // `rectangle.high()` must be the northeast point of the rectangle + // viewport. `rectangle.low()` must be the southwest point of the + // rectangle viewport. `rectangle.low().latitude()` cannot be greater than + // `rectangle.high().latitude()`. This will result in an empty latitude + // range. A rectangle viewport cannot be wider than 180 degrees. + google.geo.type.Viewport rectangle = 1; + } + } + + // The address to geocode. + oneof address_input { + // The unstructured address to geocode. + string address_query = 1; + + // The structured address to geocode in postal address format. + google.type.PostalAddress address = 2; + } + + // Optional. The region to search. This location serves as a bias which means + // results around the given location are preferred. + LocationBias location_bias = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Language in which the results should be returned. + string language_code = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Region code. The region code, specified as a ccTLD ("top-level + // domain") two-character value. The parameter affects results based on + // applicable law. This parameter will also influence, but not fully restrict, + // results from the service. + string region_code = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for GeocodeService.GeocodeLocation. +message GeocodeLocationRequest { + // The location to geocode. + oneof location_input { + // The location in the format of "lat,lng" string. For example, + // "64.7611872,-18.4705364". + string location_query = 1; + + // The location in the structured format. + google.type.LatLng location = 2; + } + + // Optional. Language in which the results should be returned. + string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Region code. The region code, specified as a ccTLD ("top-level + // domain") two-character value. The parameter affects results based on + // applicable law. + string region_code = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A set of type tags to restrict the results. Results that do not + // have any of the specified types are removed. + // + // For the complete list of possible values, see Table A and Table B at + // https://developers.google.com/maps/documentation/places/web-service/place-types. + repeated string types = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A filter of one or more location granularity enums. + repeated GeocodeResult.Granularity granularity = 6 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for GeocodeService.GeocodePlace. +message GeocodePlaceRequest { + // Required. Place identifier to geocode in the format of places/{place}. + string place = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Language in which the results should be returned. + string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Region code. The region code, specified as a ccTLD ("top-level + // domain") two-character value. The parameter affects results based on + // applicable law. + string region_code = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Plus code (http://plus.codes) is a location reference with two formats: +// global code defining a 14mx14m (1/8000th of a degree) or smaller rectangle, +// and compound code, replacing the prefix with a reference location. +message PlusCode { + // Place's global (full) code, such as "9FWM33GV+HQ", representing an + // 1/8000 by 1/8000 degree area (~14 by 14 meters). + string global_code = 1; + + // Place's compound code, such as "33GV+HQ, Ramberg, Norway", containing + // the suffix of the global code and replacing the prefix with a formatted + // name of a reference entity. + string compound_code = 2; +} + +// A geocode result contains geographic information about a place. +message GeocodeResult { + // The structured components that form the formatted address, if this + // information is available. + message AddressComponent { + // The full text description or name of the address component. For example, + // an address component for the country Australia may have a long name of + // "Australia". + string long_text = 1; + + // An abbreviated textual name for the address component, if available. For + // example, an address component for the country of Australia may have a + // short name of "AU". + string short_text = 2; + + // An array indicating the type(s) of the address component. + // + // See + // https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types + // for more details. + repeated string types = 3; + + // The language used to format this component, in CLDR notation. + string language_code = 4; + } + + // The granularity of the location. + enum Granularity { + // Do not use. + GRANULARITY_UNSPECIFIED = 0; + + // The non-interpolated location of an actual plot of land corresponding + // to the matched address. + ROOFTOP = 1; + + // Interpolated from a range of street numbers. For example, if we know + // that a segment of Amphitheatre Pkwy contains numbers 1600 - 1699, then + // 1650 might be placed halfway between its endpoints. + RANGE_INTERPOLATED = 2; + + // The geometric center of a feature for which we have polygonal data. + GEOMETRIC_CENTER = 3; + + // Everything else. + APPROXIMATE = 4; + } + + // This Place's resource name, in `places/{placeId}` format. Can be used to + // look up the Place. + string place = 1; + + // The unique identifier of a place. + string place_id = 2; + + // The latlng of this address. + google.type.LatLng location = 3; + + // The granularity of the location. + Granularity granularity = 4; + + // A viewport suitable for displaying the geocode result. + google.geo.type.Viewport viewport = 5; + + // A bounding box for the address. + google.geo.type.Viewport bounds = 6; + + // The one line formatted address. + string formatted_address = 7; + + // The address in postal address format. + google.type.PostalAddress postal_address = 8; + + // Repeated components for each locality level. + repeated AddressComponent address_components = 9; + + // Complete list of localities contained in the postal code. + // + // This is only populated when the result is of type "postal_code". + repeated google.type.LocalizedText postal_code_localities = 11; + + // A set of type tags for this result. For + // example, "political" and "administrative_area". + // + // For the complete list of possible values, see Table A and Table B at + // https://developers.google.com/maps/documentation/places/web-service/place-types. + repeated string types = 12; + + // Plus code of the location in this geocode. + PlusCode plus_code = 13; +} + +// Response message for +// [GeocodeService.GeocodeAddress][google.maps.geocode.v4.GeocodeService.GeocodeAddress]. +message GeocodeAddressResponse { + // The geocoding result. + repeated GeocodeResult results = 1; +} + +// Response message for +// [GeocodeService.GeocodeLocation][google.maps.geocode.v4.GeocodeService.GeocodeLocation]. +message GeocodeLocationResponse { + // The geocoding result. + repeated GeocodeResult results = 1; + + // Plus code of the location in the request. + PlusCode plus_code = 2; +} diff --git a/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/destinationservice/create/SyncCreateSetCredentialsProvider.java b/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/destinationservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..cfbe9d9baeeb --- /dev/null +++ b/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/destinationservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.geocode.v4.samples; + +// [START backend_v4_generated_DestinationService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.maps.geocode.v4.DestinationServiceClient; +import com.google.maps.geocode.v4.DestinationServiceSettings; +import com.google.maps.geocode.v4.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 + DestinationServiceSettings destinationServiceSettings = + DestinationServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + DestinationServiceClient destinationServiceClient = + DestinationServiceClient.create(destinationServiceSettings); + } +} +// [END backend_v4_generated_DestinationService_Create_SetCredentialsProvider_sync] diff --git a/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/destinationservice/create/SyncCreateSetEndpoint.java b/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/destinationservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..a22f68148445 --- /dev/null +++ b/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/destinationservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.geocode.v4.samples; + +// [START backend_v4_generated_DestinationService_Create_SetEndpoint_sync] +import com.google.maps.geocode.v4.DestinationServiceClient; +import com.google.maps.geocode.v4.DestinationServiceSettings; +import com.google.maps.geocode.v4.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 + DestinationServiceSettings destinationServiceSettings = + DestinationServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + DestinationServiceClient destinationServiceClient = + DestinationServiceClient.create(destinationServiceSettings); + } +} +// [END backend_v4_generated_DestinationService_Create_SetEndpoint_sync] diff --git a/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/destinationservice/create/SyncCreateUseHttpJsonTransport.java b/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/destinationservice/create/SyncCreateUseHttpJsonTransport.java new file mode 100644 index 000000000000..99516526f8bf --- /dev/null +++ b/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/destinationservice/create/SyncCreateUseHttpJsonTransport.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 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.geocode.v4.samples; + +// [START backend_v4_generated_DestinationService_Create_UseHttpJsonTransport_sync] +import com.google.maps.geocode.v4.DestinationServiceClient; +import com.google.maps.geocode.v4.DestinationServiceSettings; + +public class SyncCreateUseHttpJsonTransport { + + public static void main(String[] args) throws Exception { + syncCreateUseHttpJsonTransport(); + } + + public static void syncCreateUseHttpJsonTransport() 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 + DestinationServiceSettings destinationServiceSettings = + DestinationServiceSettings.newHttpJsonBuilder().build(); + DestinationServiceClient destinationServiceClient = + DestinationServiceClient.create(destinationServiceSettings); + } +} +// [END backend_v4_generated_DestinationService_Create_UseHttpJsonTransport_sync] diff --git a/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/destinationservice/searchdestinations/AsyncSearchDestinations.java b/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/destinationservice/searchdestinations/AsyncSearchDestinations.java new file mode 100644 index 000000000000..56c05826c78e --- /dev/null +++ b/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/destinationservice/searchdestinations/AsyncSearchDestinations.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.geocode.v4.samples; + +// [START backend_v4_generated_DestinationService_SearchDestinations_async] +import com.google.api.core.ApiFuture; +import com.google.maps.geocode.v4.DestinationServiceClient; +import com.google.maps.geocode.v4.NavigationPoint; +import com.google.maps.geocode.v4.SearchDestinationsRequest; +import com.google.maps.geocode.v4.SearchDestinationsResponse; +import java.util.ArrayList; + +public class AsyncSearchDestinations { + + public static void main(String[] args) throws Exception { + asyncSearchDestinations(); + } + + public static void asyncSearchDestinations() 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 (DestinationServiceClient destinationServiceClient = DestinationServiceClient.create()) { + SearchDestinationsRequest request = + SearchDestinationsRequest.newBuilder() + .addAllTravelModes(new ArrayList()) + .setLanguageCode("languageCode-2092349083") + .setRegionCode("regionCode-1991004415") + .build(); + ApiFuture future = + destinationServiceClient.searchDestinationsCallable().futureCall(request); + // Do something. + SearchDestinationsResponse response = future.get(); + } + } +} +// [END backend_v4_generated_DestinationService_SearchDestinations_async] diff --git a/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/destinationservice/searchdestinations/SyncSearchDestinations.java b/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/destinationservice/searchdestinations/SyncSearchDestinations.java new file mode 100644 index 000000000000..0405ceed499e --- /dev/null +++ b/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/destinationservice/searchdestinations/SyncSearchDestinations.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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.geocode.v4.samples; + +// [START backend_v4_generated_DestinationService_SearchDestinations_sync] +import com.google.maps.geocode.v4.DestinationServiceClient; +import com.google.maps.geocode.v4.NavigationPoint; +import com.google.maps.geocode.v4.SearchDestinationsRequest; +import com.google.maps.geocode.v4.SearchDestinationsResponse; +import java.util.ArrayList; + +public class SyncSearchDestinations { + + public static void main(String[] args) throws Exception { + syncSearchDestinations(); + } + + public static void syncSearchDestinations() 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 (DestinationServiceClient destinationServiceClient = DestinationServiceClient.create()) { + SearchDestinationsRequest request = + SearchDestinationsRequest.newBuilder() + .addAllTravelModes(new ArrayList()) + .setLanguageCode("languageCode-2092349083") + .setRegionCode("regionCode-1991004415") + .build(); + SearchDestinationsResponse response = destinationServiceClient.searchDestinations(request); + } + } +} +// [END backend_v4_generated_DestinationService_SearchDestinations_sync] diff --git a/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/destinationservicesettings/searchdestinations/SyncSearchDestinations.java b/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/destinationservicesettings/searchdestinations/SyncSearchDestinations.java new file mode 100644 index 000000000000..e598630bd77f --- /dev/null +++ b/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/destinationservicesettings/searchdestinations/SyncSearchDestinations.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 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.geocode.v4.samples; + +// [START backend_v4_generated_DestinationServiceSettings_SearchDestinations_sync] +import com.google.maps.geocode.v4.DestinationServiceSettings; +import java.time.Duration; + +public class SyncSearchDestinations { + + public static void main(String[] args) throws Exception { + syncSearchDestinations(); + } + + public static void syncSearchDestinations() 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 + DestinationServiceSettings.Builder destinationServiceSettingsBuilder = + DestinationServiceSettings.newBuilder(); + destinationServiceSettingsBuilder + .searchDestinationsSettings() + .setRetrySettings( + destinationServiceSettingsBuilder + .searchDestinationsSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + DestinationServiceSettings destinationServiceSettings = + destinationServiceSettingsBuilder.build(); + } +} +// [END backend_v4_generated_DestinationServiceSettings_SearchDestinations_sync] diff --git a/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/geocodeservice/create/SyncCreateSetCredentialsProvider.java b/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/geocodeservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..b265b9f39a67 --- /dev/null +++ b/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/geocodeservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.geocode.v4.samples; + +// [START backend_v4_generated_GeocodeService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.maps.geocode.v4.GeocodeServiceClient; +import com.google.maps.geocode.v4.GeocodeServiceSettings; +import com.google.maps.geocode.v4.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 + GeocodeServiceSettings geocodeServiceSettings = + GeocodeServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + GeocodeServiceClient geocodeServiceClient = GeocodeServiceClient.create(geocodeServiceSettings); + } +} +// [END backend_v4_generated_GeocodeService_Create_SetCredentialsProvider_sync] diff --git a/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/geocodeservice/create/SyncCreateSetEndpoint.java b/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/geocodeservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..a0afc3ecee14 --- /dev/null +++ b/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/geocodeservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 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.geocode.v4.samples; + +// [START backend_v4_generated_GeocodeService_Create_SetEndpoint_sync] +import com.google.maps.geocode.v4.GeocodeServiceClient; +import com.google.maps.geocode.v4.GeocodeServiceSettings; +import com.google.maps.geocode.v4.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 + GeocodeServiceSettings geocodeServiceSettings = + GeocodeServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + GeocodeServiceClient geocodeServiceClient = GeocodeServiceClient.create(geocodeServiceSettings); + } +} +// [END backend_v4_generated_GeocodeService_Create_SetEndpoint_sync] diff --git a/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/geocodeservice/create/SyncCreateUseHttpJsonTransport.java b/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/geocodeservice/create/SyncCreateUseHttpJsonTransport.java new file mode 100644 index 000000000000..fde1ee13c232 --- /dev/null +++ b/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/geocodeservice/create/SyncCreateUseHttpJsonTransport.java @@ -0,0 +1,40 @@ +/* + * Copyright 2026 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.geocode.v4.samples; + +// [START backend_v4_generated_GeocodeService_Create_UseHttpJsonTransport_sync] +import com.google.maps.geocode.v4.GeocodeServiceClient; +import com.google.maps.geocode.v4.GeocodeServiceSettings; + +public class SyncCreateUseHttpJsonTransport { + + public static void main(String[] args) throws Exception { + syncCreateUseHttpJsonTransport(); + } + + public static void syncCreateUseHttpJsonTransport() 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 + GeocodeServiceSettings geocodeServiceSettings = + GeocodeServiceSettings.newHttpJsonBuilder().build(); + GeocodeServiceClient geocodeServiceClient = GeocodeServiceClient.create(geocodeServiceSettings); + } +} +// [END backend_v4_generated_GeocodeService_Create_UseHttpJsonTransport_sync] diff --git a/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/geocodeservice/geocodeaddress/AsyncGeocodeAddress.java b/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/geocodeservice/geocodeaddress/AsyncGeocodeAddress.java new file mode 100644 index 000000000000..e2ed0e2672f6 --- /dev/null +++ b/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/geocodeservice/geocodeaddress/AsyncGeocodeAddress.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 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.geocode.v4.samples; + +// [START backend_v4_generated_GeocodeService_GeocodeAddress_async] +import com.google.api.core.ApiFuture; +import com.google.maps.geocode.v4.GeocodeAddressRequest; +import com.google.maps.geocode.v4.GeocodeAddressResponse; +import com.google.maps.geocode.v4.GeocodeServiceClient; + +public class AsyncGeocodeAddress { + + public static void main(String[] args) throws Exception { + asyncGeocodeAddress(); + } + + public static void asyncGeocodeAddress() 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 (GeocodeServiceClient geocodeServiceClient = GeocodeServiceClient.create()) { + GeocodeAddressRequest request = + GeocodeAddressRequest.newBuilder() + .setLocationBias(GeocodeAddressRequest.LocationBias.newBuilder().build()) + .setLanguageCode("languageCode-2092349083") + .setRegionCode("regionCode-1991004415") + .build(); + ApiFuture future = + geocodeServiceClient.geocodeAddressCallable().futureCall(request); + // Do something. + GeocodeAddressResponse response = future.get(); + } + } +} +// [END backend_v4_generated_GeocodeService_GeocodeAddress_async] diff --git a/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/geocodeservice/geocodeaddress/SyncGeocodeAddress.java b/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/geocodeservice/geocodeaddress/SyncGeocodeAddress.java new file mode 100644 index 000000000000..46fa05787084 --- /dev/null +++ b/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/geocodeservice/geocodeaddress/SyncGeocodeAddress.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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.geocode.v4.samples; + +// [START backend_v4_generated_GeocodeService_GeocodeAddress_sync] +import com.google.maps.geocode.v4.GeocodeAddressRequest; +import com.google.maps.geocode.v4.GeocodeAddressResponse; +import com.google.maps.geocode.v4.GeocodeServiceClient; + +public class SyncGeocodeAddress { + + public static void main(String[] args) throws Exception { + syncGeocodeAddress(); + } + + public static void syncGeocodeAddress() 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 (GeocodeServiceClient geocodeServiceClient = GeocodeServiceClient.create()) { + GeocodeAddressRequest request = + GeocodeAddressRequest.newBuilder() + .setLocationBias(GeocodeAddressRequest.LocationBias.newBuilder().build()) + .setLanguageCode("languageCode-2092349083") + .setRegionCode("regionCode-1991004415") + .build(); + GeocodeAddressResponse response = geocodeServiceClient.geocodeAddress(request); + } + } +} +// [END backend_v4_generated_GeocodeService_GeocodeAddress_sync] diff --git a/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/geocodeservice/geocodelocation/AsyncGeocodeLocation.java b/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/geocodeservice/geocodelocation/AsyncGeocodeLocation.java new file mode 100644 index 000000000000..20b5e9e3050d --- /dev/null +++ b/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/geocodeservice/geocodelocation/AsyncGeocodeLocation.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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.geocode.v4.samples; + +// [START backend_v4_generated_GeocodeService_GeocodeLocation_async] +import com.google.api.core.ApiFuture; +import com.google.maps.geocode.v4.GeocodeLocationRequest; +import com.google.maps.geocode.v4.GeocodeLocationResponse; +import com.google.maps.geocode.v4.GeocodeResult; +import com.google.maps.geocode.v4.GeocodeServiceClient; +import java.util.ArrayList; + +public class AsyncGeocodeLocation { + + public static void main(String[] args) throws Exception { + asyncGeocodeLocation(); + } + + public static void asyncGeocodeLocation() 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 (GeocodeServiceClient geocodeServiceClient = GeocodeServiceClient.create()) { + GeocodeLocationRequest request = + GeocodeLocationRequest.newBuilder() + .setLanguageCode("languageCode-2092349083") + .setRegionCode("regionCode-1991004415") + .addAllTypes(new ArrayList()) + .addAllGranularity(new ArrayList()) + .build(); + ApiFuture future = + geocodeServiceClient.geocodeLocationCallable().futureCall(request); + // Do something. + GeocodeLocationResponse response = future.get(); + } + } +} +// [END backend_v4_generated_GeocodeService_GeocodeLocation_async] diff --git a/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/geocodeservice/geocodelocation/SyncGeocodeLocation.java b/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/geocodeservice/geocodelocation/SyncGeocodeLocation.java new file mode 100644 index 000000000000..f06b44f10b49 --- /dev/null +++ b/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/geocodeservice/geocodelocation/SyncGeocodeLocation.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 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.geocode.v4.samples; + +// [START backend_v4_generated_GeocodeService_GeocodeLocation_sync] +import com.google.maps.geocode.v4.GeocodeLocationRequest; +import com.google.maps.geocode.v4.GeocodeLocationResponse; +import com.google.maps.geocode.v4.GeocodeResult; +import com.google.maps.geocode.v4.GeocodeServiceClient; +import java.util.ArrayList; + +public class SyncGeocodeLocation { + + public static void main(String[] args) throws Exception { + syncGeocodeLocation(); + } + + public static void syncGeocodeLocation() 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 (GeocodeServiceClient geocodeServiceClient = GeocodeServiceClient.create()) { + GeocodeLocationRequest request = + GeocodeLocationRequest.newBuilder() + .setLanguageCode("languageCode-2092349083") + .setRegionCode("regionCode-1991004415") + .addAllTypes(new ArrayList()) + .addAllGranularity(new ArrayList()) + .build(); + GeocodeLocationResponse response = geocodeServiceClient.geocodeLocation(request); + } + } +} +// [END backend_v4_generated_GeocodeService_GeocodeLocation_sync] diff --git a/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/geocodeservice/geocodeplace/AsyncGeocodePlace.java b/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/geocodeservice/geocodeplace/AsyncGeocodePlace.java new file mode 100644 index 000000000000..23ca1a4d7064 --- /dev/null +++ b/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/geocodeservice/geocodeplace/AsyncGeocodePlace.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 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.geocode.v4.samples; + +// [START backend_v4_generated_GeocodeService_GeocodePlace_async] +import com.google.api.core.ApiFuture; +import com.google.maps.geocode.v4.GeocodePlaceRequest; +import com.google.maps.geocode.v4.GeocodeResult; +import com.google.maps.geocode.v4.GeocodeServiceClient; + +public class AsyncGeocodePlace { + + public static void main(String[] args) throws Exception { + asyncGeocodePlace(); + } + + public static void asyncGeocodePlace() 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 (GeocodeServiceClient geocodeServiceClient = GeocodeServiceClient.create()) { + GeocodePlaceRequest request = + GeocodePlaceRequest.newBuilder() + .setPlace("place106748167") + .setLanguageCode("languageCode-2092349083") + .setRegionCode("regionCode-1991004415") + .build(); + ApiFuture future = + geocodeServiceClient.geocodePlaceCallable().futureCall(request); + // Do something. + GeocodeResult response = future.get(); + } + } +} +// [END backend_v4_generated_GeocodeService_GeocodePlace_async] diff --git a/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/geocodeservice/geocodeplace/SyncGeocodePlace.java b/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/geocodeservice/geocodeplace/SyncGeocodePlace.java new file mode 100644 index 000000000000..62915f72a6b2 --- /dev/null +++ b/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/geocodeservice/geocodeplace/SyncGeocodePlace.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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.geocode.v4.samples; + +// [START backend_v4_generated_GeocodeService_GeocodePlace_sync] +import com.google.maps.geocode.v4.GeocodePlaceRequest; +import com.google.maps.geocode.v4.GeocodeResult; +import com.google.maps.geocode.v4.GeocodeServiceClient; + +public class SyncGeocodePlace { + + public static void main(String[] args) throws Exception { + syncGeocodePlace(); + } + + public static void syncGeocodePlace() 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 (GeocodeServiceClient geocodeServiceClient = GeocodeServiceClient.create()) { + GeocodePlaceRequest request = + GeocodePlaceRequest.newBuilder() + .setPlace("place106748167") + .setLanguageCode("languageCode-2092349083") + .setRegionCode("regionCode-1991004415") + .build(); + GeocodeResult response = geocodeServiceClient.geocodePlace(request); + } + } +} +// [END backend_v4_generated_GeocodeService_GeocodePlace_sync] diff --git a/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/geocodeservicesettings/geocodeaddress/SyncGeocodeAddress.java b/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/geocodeservicesettings/geocodeaddress/SyncGeocodeAddress.java new file mode 100644 index 000000000000..e05bb37fb472 --- /dev/null +++ b/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/geocodeservicesettings/geocodeaddress/SyncGeocodeAddress.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 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.geocode.v4.samples; + +// [START backend_v4_generated_GeocodeServiceSettings_GeocodeAddress_sync] +import com.google.maps.geocode.v4.GeocodeServiceSettings; +import java.time.Duration; + +public class SyncGeocodeAddress { + + public static void main(String[] args) throws Exception { + syncGeocodeAddress(); + } + + public static void syncGeocodeAddress() 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 + GeocodeServiceSettings.Builder geocodeServiceSettingsBuilder = + GeocodeServiceSettings.newBuilder(); + geocodeServiceSettingsBuilder + .geocodeAddressSettings() + .setRetrySettings( + geocodeServiceSettingsBuilder + .geocodeAddressSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + GeocodeServiceSettings geocodeServiceSettings = geocodeServiceSettingsBuilder.build(); + } +} +// [END backend_v4_generated_GeocodeServiceSettings_GeocodeAddress_sync] diff --git a/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/stub/destinationservicestubsettings/searchdestinations/SyncSearchDestinations.java b/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/stub/destinationservicestubsettings/searchdestinations/SyncSearchDestinations.java new file mode 100644 index 000000000000..60e1a439dfee --- /dev/null +++ b/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/stub/destinationservicestubsettings/searchdestinations/SyncSearchDestinations.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 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.geocode.v4.stub.samples; + +// [START backend_v4_generated_DestinationServiceStubSettings_SearchDestinations_sync] +import com.google.maps.geocode.v4.stub.DestinationServiceStubSettings; +import java.time.Duration; + +public class SyncSearchDestinations { + + public static void main(String[] args) throws Exception { + syncSearchDestinations(); + } + + public static void syncSearchDestinations() 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 + DestinationServiceStubSettings.Builder destinationServiceSettingsBuilder = + DestinationServiceStubSettings.newBuilder(); + destinationServiceSettingsBuilder + .searchDestinationsSettings() + .setRetrySettings( + destinationServiceSettingsBuilder + .searchDestinationsSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + DestinationServiceStubSettings destinationServiceSettings = + destinationServiceSettingsBuilder.build(); + } +} +// [END backend_v4_generated_DestinationServiceStubSettings_SearchDestinations_sync] diff --git a/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/stub/geocodeservicestubsettings/geocodeaddress/SyncGeocodeAddress.java b/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/stub/geocodeservicestubsettings/geocodeaddress/SyncGeocodeAddress.java new file mode 100644 index 000000000000..62c8f7101fae --- /dev/null +++ b/java-maps-geocode/samples/snippets/generated/com/google/maps/geocode/v4/stub/geocodeservicestubsettings/geocodeaddress/SyncGeocodeAddress.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 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.geocode.v4.stub.samples; + +// [START backend_v4_generated_GeocodeServiceStubSettings_GeocodeAddress_sync] +import com.google.maps.geocode.v4.stub.GeocodeServiceStubSettings; +import java.time.Duration; + +public class SyncGeocodeAddress { + + public static void main(String[] args) throws Exception { + syncGeocodeAddress(); + } + + public static void syncGeocodeAddress() 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 + GeocodeServiceStubSettings.Builder geocodeServiceSettingsBuilder = + GeocodeServiceStubSettings.newBuilder(); + geocodeServiceSettingsBuilder + .geocodeAddressSettings() + .setRetrySettings( + geocodeServiceSettingsBuilder + .geocodeAddressSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + GeocodeServiceStubSettings geocodeServiceSettings = geocodeServiceSettingsBuilder.build(); + } +} +// [END backend_v4_generated_GeocodeServiceStubSettings_GeocodeAddress_sync] diff --git a/pom.xml b/pom.xml index c0cc59c21227..5ba7094bce5f 100644 --- a/pom.xml +++ b/pom.xml @@ -148,6 +148,7 @@ java-maps-area-insights java-maps-fleetengine java-maps-fleetengine-delivery + java-maps-geocode java-maps-mapsplatformdatasets java-maps-places java-maps-routeoptimization diff --git a/versions.txt b/versions.txt index 50e82916f5f6..d9af7cc15d35 100644 --- a/versions.txt +++ b/versions.txt @@ -1028,3 +1028,6 @@ proto-google-cloud-storage-v2:2.64.1:2.64.2-SNAPSHOT google-cloud-storage-control:2.64.1:2.64.2-SNAPSHOT proto-google-cloud-storage-control-v2:2.64.1:2.64.2-SNAPSHOT grpc-google-cloud-storage-control-v2:2.64.1:2.64.2-SNAPSHOT +google-maps-geocode:0.0.0:0.0.1-SNAPSHOT +proto-google-maps-geocode-v4:0.0.0:0.0.1-SNAPSHOT +grpc-google-maps-geocode-v4:0.0.0:0.0.1-SNAPSHOT