From d9501e71b95bf6acd48e70fe9e17953bb838a021 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Thu, 19 Mar 2026 15:42:21 +0000 Subject: [PATCH 1/3] feat: [navigationconnect] new module for navigationconnect --- generation_config.yaml | 278 +++++++++++++++++++++++++++-------------- 1 file changed, 182 insertions(+), 96 deletions(-) diff --git a/generation_config.yaml b/generation_config.yaml index 4dd452c45d78..08c308e2655f 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 @@ -363,7 +365,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 @@ -403,7 +406,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 @@ -464,7 +468,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 @@ -499,7 +504,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 @@ -528,7 +534,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 @@ -544,7 +551,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 @@ -590,8 +598,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: @@ -599,11 +607,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 @@ -624,11 +634,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 @@ -644,10 +654,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 @@ -655,16 +667,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 @@ -736,14 +751,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 @@ -856,7 +872,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 @@ -899,7 +916,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 @@ -913,7 +931,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 @@ -1089,11 +1108,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 @@ -1124,7 +1145,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 @@ -1134,14 +1156,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 @@ -1197,11 +1221,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 @@ -1239,9 +1265,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 @@ -1333,7 +1361,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 @@ -1349,7 +1378,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 @@ -1404,7 +1434,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 @@ -1430,7 +1461,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 @@ -1481,7 +1513,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 @@ -1510,7 +1543,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 @@ -1536,7 +1570,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 @@ -1548,12 +1583,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 @@ -1565,12 +1602,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 @@ -1583,14 +1622,30 @@ libraries: - 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 GAPICs: - proto_path: google/maps/mapsplatformdatasets/v1 +- api_shortname: navigationconnect + name_pretty: Navigation Connect API + product_documentation: https://developers.google.com/maps/documentation/navigation/connect + api_description: Navigation Connect API + client_documentation: + https://cloud.google.com/java/docs/reference/google-maps-navigationconnect/latest/overview + release_level: preview + distribution_name: com.google.maps:google-maps-navigationconnect + api_id: navigationconnect.googleapis.com + library_type: GAPIC_AUTO + group_id: com.google.maps + cloud_api: false + GAPICs: + - proto_path: google/maps/navconnect/v1 + library_name: maps-navigationconnect + requires_billing: true - api_shortname: maps-places name_pretty: Places API (New) product_documentation: https://developers.google.com/maps/documentation/places/web-service/ @@ -1607,7 +1662,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 @@ -1618,8 +1674,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 @@ -1707,7 +1765,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 @@ -1745,7 +1804,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 @@ -1762,7 +1822,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 @@ -1797,7 +1858,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 @@ -1837,7 +1899,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 @@ -1867,7 +1930,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 @@ -1899,7 +1963,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 @@ -1917,7 +1982,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 @@ -1973,7 +2039,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 @@ -1986,7 +2053,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 @@ -2107,7 +2175,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 @@ -2149,8 +2218,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 @@ -2295,7 +2364,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 @@ -2311,7 +2381,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 @@ -2326,7 +2397,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 @@ -2353,7 +2425,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 @@ -2368,7 +2441,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 @@ -2383,7 +2457,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 @@ -2398,7 +2473,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 @@ -2413,7 +2489,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 @@ -2429,7 +2506,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 @@ -2456,7 +2534,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 @@ -2468,11 +2547,13 @@ libraries: library_name: shopping-merchant-reviews - 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 @@ -2512,7 +2593,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 @@ -2626,7 +2708,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 @@ -2649,7 +2732,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 @@ -2729,7 +2813,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 @@ -2770,14 +2855,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: '' @@ -2829,7 +2914,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 From b8a9507ad1354d3ad98fdad0d846e13c01869a65 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Thu, 19 Mar 2026 16:29:19 +0000 Subject: [PATCH 2/3] chore: generate libraries at Thu Mar 19 16:27:38 UTC 2026 --- .../.OwlBot-hermetic.yaml | 35 + .../.repo-metadata.json | 16 + java-maps-navigationconnect/README.md | 182 + .../google-maps-navigationconnect-bom/pom.xml | 43 + .../google-maps-navigationconnect/pom.xml | 115 + .../v1/NavConnectServiceClient.java | 439 +++ .../v1/NavConnectServiceSettings.java | 226 ++ .../maps/navconnect/v1/gapic_metadata.json | 24 + .../maps/navconnect/v1/package-info.java | 45 + .../GrpcNavConnectServiceCallableFactory.java | 113 + .../v1/stub/GrpcNavConnectServiceStub.java | 190 ++ ...pJsonNavConnectServiceCallableFactory.java | 101 + .../stub/HttpJsonNavConnectServiceStub.java | 254 ++ .../v1/stub/NavConnectServiceStub.java | 45 + .../stub/NavConnectServiceStubSettings.java | 385 +++ .../reflect-config.json | 1478 ++++++++ .../navconnect/v1/MockNavConnectService.java | 59 + .../v1/MockNavConnectServiceImpl.java | 100 + .../NavConnectServiceClientHttpJsonTest.java | 231 ++ .../v1/NavConnectServiceClientTest.java | 219 ++ .../pom.xml | 45 + .../navconnect/v1/NavConnectServiceGrpc.java | 536 +++ java-maps-navigationconnect/owlbot.py | 38 + java-maps-navigationconnect/pom.xml | 55 + .../clirr-ignored-differences.xml | 80 + .../pom.xml | 37 + .../google/maps/navconnect/v1/AuthToken.java | 910 +++++ .../navconnect/v1/AuthTokenOrBuilder.java | 96 + .../maps/navconnect/v1/CreateTripRequest.java | 1122 ++++++ .../v1/CreateTripRequestOrBuilder.java | 132 + .../maps/navconnect/v1/GetTripRequest.java | 616 ++++ .../v1/GetTripRequestOrBuilder.java | 60 + .../google/maps/navconnect/v1/Location.java | 1290 +++++++ .../maps/navconnect/v1/LocationOrBuilder.java | 148 + .../navconnect/v1/NavConnectServiceProto.java | 283 ++ .../com/google/maps/navconnect/v1/Stop.java | 680 ++++ .../maps/navconnect/v1/StopOrBuilder.java | 65 + .../com/google/maps/navconnect/v1/Trip.java | 3035 +++++++++++++++++ .../google/maps/navconnect/v1/TripConfig.java | 1086 ++++++ .../navconnect/v1/TripConfigOrBuilder.java | 139 + .../maps/navconnect/v1/TripExecution.java | 2410 +++++++++++++ .../navconnect/v1/TripExecutionOrBuilder.java | 338 ++ .../google/maps/navconnect/v1/TripName.java | 191 ++ .../maps/navconnect/v1/TripOrBuilder.java | 376 ++ .../navconnect/v1/navconnect_service.proto | 263 ++ .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../SyncCreateUseHttpJsonTransport.java | 41 + .../createtrip/AsyncCreateTrip.java | 50 + .../createtrip/SyncCreateTrip.java | 47 + .../SyncCreateTripStringTripString.java | 43 + .../gettrip/AsyncGetTrip.java | 49 + .../gettrip/SyncGetTrip.java | 46 + .../gettrip/SyncGetTripString.java | 42 + .../gettrip/SyncGetTripTripname.java | 42 + .../createtrip/SyncCreateTrip.java | 56 + .../createtrip/SyncCreateTrip.java | 57 + pom.xml | 1 + versions.txt | 3 + 59 files changed, 18895 insertions(+) create mode 100644 java-maps-navigationconnect/.OwlBot-hermetic.yaml create mode 100644 java-maps-navigationconnect/.repo-metadata.json create mode 100644 java-maps-navigationconnect/README.md create mode 100644 java-maps-navigationconnect/google-maps-navigationconnect-bom/pom.xml create mode 100644 java-maps-navigationconnect/google-maps-navigationconnect/pom.xml create mode 100644 java-maps-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/NavConnectServiceClient.java create mode 100644 java-maps-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/NavConnectServiceSettings.java create mode 100644 java-maps-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/gapic_metadata.json create mode 100644 java-maps-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/package-info.java create mode 100644 java-maps-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/stub/GrpcNavConnectServiceCallableFactory.java create mode 100644 java-maps-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/stub/GrpcNavConnectServiceStub.java create mode 100644 java-maps-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/stub/HttpJsonNavConnectServiceCallableFactory.java create mode 100644 java-maps-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/stub/HttpJsonNavConnectServiceStub.java create mode 100644 java-maps-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/stub/NavConnectServiceStub.java create mode 100644 java-maps-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/stub/NavConnectServiceStubSettings.java create mode 100644 java-maps-navigationconnect/google-maps-navigationconnect/src/main/resources/META-INF/native-image/com.google.maps.navconnect.v1/reflect-config.json create mode 100644 java-maps-navigationconnect/google-maps-navigationconnect/src/test/java/com/google/maps/navconnect/v1/MockNavConnectService.java create mode 100644 java-maps-navigationconnect/google-maps-navigationconnect/src/test/java/com/google/maps/navconnect/v1/MockNavConnectServiceImpl.java create mode 100644 java-maps-navigationconnect/google-maps-navigationconnect/src/test/java/com/google/maps/navconnect/v1/NavConnectServiceClientHttpJsonTest.java create mode 100644 java-maps-navigationconnect/google-maps-navigationconnect/src/test/java/com/google/maps/navconnect/v1/NavConnectServiceClientTest.java create mode 100644 java-maps-navigationconnect/grpc-google-maps-navigationconnect-v1/pom.xml create mode 100644 java-maps-navigationconnect/grpc-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/NavConnectServiceGrpc.java create mode 100644 java-maps-navigationconnect/owlbot.py create mode 100644 java-maps-navigationconnect/pom.xml create mode 100644 java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/clirr-ignored-differences.xml create mode 100644 java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/pom.xml create mode 100644 java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/AuthToken.java create mode 100644 java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/AuthTokenOrBuilder.java create mode 100644 java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/CreateTripRequest.java create mode 100644 java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/CreateTripRequestOrBuilder.java create mode 100644 java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/GetTripRequest.java create mode 100644 java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/GetTripRequestOrBuilder.java create mode 100644 java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/Location.java create mode 100644 java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/LocationOrBuilder.java create mode 100644 java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/NavConnectServiceProto.java create mode 100644 java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/Stop.java create mode 100644 java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/StopOrBuilder.java create mode 100644 java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/Trip.java create mode 100644 java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/TripConfig.java create mode 100644 java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/TripConfigOrBuilder.java create mode 100644 java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/TripExecution.java create mode 100644 java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/TripExecutionOrBuilder.java create mode 100644 java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/TripName.java create mode 100644 java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/TripOrBuilder.java create mode 100644 java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/proto/google/maps/navconnect/v1/navconnect_service.proto create mode 100644 java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/create/SyncCreateSetEndpoint.java create mode 100644 java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/create/SyncCreateUseHttpJsonTransport.java create mode 100644 java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/createtrip/AsyncCreateTrip.java create mode 100644 java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/createtrip/SyncCreateTrip.java create mode 100644 java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/createtrip/SyncCreateTripStringTripString.java create mode 100644 java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/gettrip/AsyncGetTrip.java create mode 100644 java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/gettrip/SyncGetTrip.java create mode 100644 java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/gettrip/SyncGetTripString.java create mode 100644 java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/gettrip/SyncGetTripTripname.java create mode 100644 java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservicesettings/createtrip/SyncCreateTrip.java create mode 100644 java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/stub/navconnectservicestubsettings/createtrip/SyncCreateTrip.java diff --git a/java-maps-navigationconnect/.OwlBot-hermetic.yaml b/java-maps-navigationconnect/.OwlBot-hermetic.yaml new file mode 100644 index 000000000000..92fce92b8539 --- /dev/null +++ b/java-maps-navigationconnect/.OwlBot-hermetic.yaml @@ -0,0 +1,35 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +deep-remove-regex: +- "/java-maps-navigationconnect/grpc-google-.*/src" +- "/java-maps-navigationconnect/proto-google-.*/src" +- "/java-maps-navigationconnect/google-.*/src" +- "/java-maps-navigationconnect/samples/snippets/generated" + +deep-preserve-regex: +- "/java-maps-navigationconnect/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" + +deep-copy-regex: +- source: "/google/maps/navconnect/(v.*)/.*-java/proto-google-.*/src" + dest: "/owl-bot-staging/java-maps-navigationconnect/$1/proto-google-maps-navigationconnect-$1/src" +- source: "/google/maps/navconnect/(v.*)/.*-java/grpc-google-.*/src" + dest: "/owl-bot-staging/java-maps-navigationconnect/$1/grpc-google-maps-navigationconnect-$1/src" +- source: "/google/maps/navconnect/(v.*)/.*-java/gapic-google-.*/src" + dest: "/owl-bot-staging/java-maps-navigationconnect/$1/google-maps-navigationconnect/src" +- source: "/google/maps/navconnect/(v.*)/.*-java/samples/snippets/generated" + dest: "/owl-bot-staging/java-maps-navigationconnect/$1/samples/snippets/generated" + +api-name: navigationconnect \ No newline at end of file diff --git a/java-maps-navigationconnect/.repo-metadata.json b/java-maps-navigationconnect/.repo-metadata.json new file mode 100644 index 000000000000..b34949f8b161 --- /dev/null +++ b/java-maps-navigationconnect/.repo-metadata.json @@ -0,0 +1,16 @@ +{ + "api_shortname": "navigationconnect", + "name_pretty": "Navigation Connect API", + "product_documentation": "https://developers.google.com/maps/documentation/navigation/connect", + "api_description": "Navigation Connect API", + "client_documentation": "https://cloud.google.com/java/docs/reference/google-maps-navigationconnect/latest/overview", + "release_level": "preview", + "transport": "both", + "language": "java", + "repo": "googleapis/google-cloud-java", + "repo_short": "java-maps-navigationconnect", + "distribution_name": "com.google.maps:google-maps-navigationconnect", + "api_id": "navigationconnect.googleapis.com", + "library_type": "GAPIC_AUTO", + "requires_billing": true +} \ No newline at end of file diff --git a/java-maps-navigationconnect/README.md b/java-maps-navigationconnect/README.md new file mode 100644 index 000000000000..d177b6413bea --- /dev/null +++ b/java-maps-navigationconnect/README.md @@ -0,0 +1,182 @@ +# Google Navigation Connect API Client for Java + +Java idiomatic client for [Navigation Connect 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-navigationconnect + 0.0.0 + +``` + +If you are using Gradle without BOM, add this to your dependencies: + +```Groovy +implementation 'com.google.maps:google-maps-navigationconnect:0.0.0' +``` + +If you are using SBT, add this to your dependencies: + +```Scala +libraryDependencies += "com.google.maps" % "google-maps-navigationconnect" % "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 Navigation Connect API APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the Navigation Connect API API calls. + +## Getting Started + +### Prerequisites + +You will need a [Google Cloud Platform Console][developer-console] project with the Navigation Connect API [API enabled][enable-api]. +You will need to [enable billing][enable-billing] to use Google Navigation Connect 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-navigationconnect` library. See the [Quickstart](#quickstart) section +to add `google-maps-navigationconnect` as a dependency in your code. + +## About Navigation Connect API + + +[Navigation Connect API][product-docs] Navigation Connect API + +See the [Navigation Connect API client library docs][javadocs] to learn how to +use this Navigation Connect API Client Library. + + + + + + +## Troubleshooting + +To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. + +## Transport + +Navigation Connect 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/navigation/connect +[javadocs]: https://cloud.google.com/java/docs/reference/google-maps-navigationconnect/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-navigationconnect.svg +[maven-version-link]: https://central.sonatype.com/artifact/com.google.maps/google-maps-navigationconnect/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=navigationconnect.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-navigationconnect/google-maps-navigationconnect-bom/pom.xml b/java-maps-navigationconnect/google-maps-navigationconnect-bom/pom.xml new file mode 100644 index 000000000000..f520996a7664 --- /dev/null +++ b/java-maps-navigationconnect/google-maps-navigationconnect-bom/pom.xml @@ -0,0 +1,43 @@ + + + 4.0.0 + com.google.maps + google-maps-navigationconnect-bom + 0.0.1-SNAPSHOT + pom + + com.google.cloud + google-cloud-pom-parent + 1.82.0-SNAPSHOT + ../../google-cloud-pom-parent/pom.xml + + + Google Navigation Connect API BOM + + BOM for Navigation Connect API + + + + true + + + + + + com.google.maps + google-maps-navigationconnect + 0.0.1-SNAPSHOT + + + com.google.maps.api.grpc + grpc-google-maps-navigationconnect-v1 + 0.0.1-SNAPSHOT + + + com.google.maps.api.grpc + proto-google-maps-navigationconnect-v1 + 0.0.1-SNAPSHOT + + + + diff --git a/java-maps-navigationconnect/google-maps-navigationconnect/pom.xml b/java-maps-navigationconnect/google-maps-navigationconnect/pom.xml new file mode 100644 index 000000000000..13139681a451 --- /dev/null +++ b/java-maps-navigationconnect/google-maps-navigationconnect/pom.xml @@ -0,0 +1,115 @@ + + + 4.0.0 + com.google.maps + google-maps-navigationconnect + 0.0.1-SNAPSHOT + jar + Google Navigation Connect API + Navigation Connect API Navigation Connect API + + com.google.maps + google-maps-navigationconnect-parent + 0.0.1-SNAPSHOT + + + google-maps-navigationconnect + + + + 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-navigationconnect-v1 + + + 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-navigationconnect-v1 + test + + + + com.google.api + gax + testlib + test + + + com.google.api + gax-grpc + testlib + test + + + com.google.api + gax-httpjson + testlib + test + + + diff --git a/java-maps-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/NavConnectServiceClient.java b/java-maps-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/NavConnectServiceClient.java new file mode 100644 index 000000000000..f8d548129279 --- /dev/null +++ b/java-maps-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/NavConnectServiceClient.java @@ -0,0 +1,439 @@ +/* + * 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.navconnect.v1; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.maps.navconnect.v1.stub.NavConnectServiceStub; +import com.google.maps.navconnect.v1.stub.NavConnectServiceStubSettings; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service for NavConnect clients to create and get trips. + * + *

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 (NavConnectServiceClient navConnectServiceClient = NavConnectServiceClient.create()) {
+ *   String parent = "parent-995424086";
+ *   Trip trip = Trip.newBuilder().build();
+ *   String tripId = "tripId-865466336";
+ *   Trip response = navConnectServiceClient.createTrip(parent, trip, tripId);
+ * }
+ * }
+ * + *

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

CreateTrip

Creates a trip. This must be called before the mobile application can start the trip. The returned trip will have the `auth_token` field set.

+ *

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

+ *
    + *
  • createTrip(CreateTripRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createTrip(String parent, Trip trip, String tripId) + *

+ *

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

+ *
    + *
  • createTripCallable() + *

+ *

GetTrip

Gets a trip.

+ *

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

+ *
    + *
  • getTrip(GetTripRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getTrip(TripName name) + *

  • getTrip(String name) + *

+ *

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

+ *
    + *
  • getTripCallable() + *

+ *
+ * + *

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 NavConnectServiceSettings 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
+ * NavConnectServiceSettings navConnectServiceSettings =
+ *     NavConnectServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * NavConnectServiceClient navConnectServiceClient =
+ *     NavConnectServiceClient.create(navConnectServiceSettings);
+ * }
+ * + *

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
+ * NavConnectServiceSettings navConnectServiceSettings =
+ *     NavConnectServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * NavConnectServiceClient navConnectServiceClient =
+ *     NavConnectServiceClient.create(navConnectServiceSettings);
+ * }
+ * + *

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
+ * NavConnectServiceSettings navConnectServiceSettings =
+ *     NavConnectServiceSettings.newHttpJsonBuilder().build();
+ * NavConnectServiceClient navConnectServiceClient =
+ *     NavConnectServiceClient.create(navConnectServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class NavConnectServiceClient implements BackgroundResource { + private final NavConnectServiceSettings settings; + private final NavConnectServiceStub stub; + + /** Constructs an instance of NavConnectServiceClient with default settings. */ + public static final NavConnectServiceClient create() throws IOException { + return create(NavConnectServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of NavConnectServiceClient, 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 NavConnectServiceClient create(NavConnectServiceSettings settings) + throws IOException { + return new NavConnectServiceClient(settings); + } + + /** + * Constructs an instance of NavConnectServiceClient, using the given stub for making calls. This + * is for advanced usage - prefer using create(NavConnectServiceSettings). + */ + public static final NavConnectServiceClient create(NavConnectServiceStub stub) { + return new NavConnectServiceClient(stub); + } + + /** + * Constructs an instance of NavConnectServiceClient, 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 NavConnectServiceClient(NavConnectServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((NavConnectServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected NavConnectServiceClient(NavConnectServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final NavConnectServiceSettings getSettings() { + return settings; + } + + public NavConnectServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a trip. This must be called before the mobile application can start the trip. The + * returned trip will have the `auth_token` field set. + * + *

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 (NavConnectServiceClient navConnectServiceClient = NavConnectServiceClient.create()) {
+   *   String parent = "parent-995424086";
+   *   Trip trip = Trip.newBuilder().build();
+   *   String tripId = "tripId-865466336";
+   *   Trip response = navConnectServiceClient.createTrip(parent, trip, tripId);
+   * }
+   * }
+ * + * @param parent Required. The parent resource under which this trip will be created. Format: + * projects/{project_number} + * @param trip Required. The trip to create. + * @param tripId Required. The ID to use for the trip, which will become the final component of + * the trip's resource name. + *

This value must be a valid RFC-4122 UUID. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Trip createTrip(String parent, Trip trip, String tripId) { + CreateTripRequest request = + CreateTripRequest.newBuilder().setParent(parent).setTrip(trip).setTripId(tripId).build(); + return createTrip(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a trip. This must be called before the mobile application can start the trip. The + * returned trip will have the `auth_token` field set. + * + *

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 (NavConnectServiceClient navConnectServiceClient = NavConnectServiceClient.create()) {
+   *   CreateTripRequest request =
+   *       CreateTripRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setTripId("tripId-865466336")
+   *           .setTrip(Trip.newBuilder().build())
+   *           .build();
+   *   Trip response = navConnectServiceClient.createTrip(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 Trip createTrip(CreateTripRequest request) { + return createTripCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a trip. This must be called before the mobile application can start the trip. The + * returned trip will have the `auth_token` field set. + * + *

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 (NavConnectServiceClient navConnectServiceClient = NavConnectServiceClient.create()) {
+   *   CreateTripRequest request =
+   *       CreateTripRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setTripId("tripId-865466336")
+   *           .setTrip(Trip.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = navConnectServiceClient.createTripCallable().futureCall(request);
+   *   // Do something.
+   *   Trip response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createTripCallable() { + return stub.createTripCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a trip. + * + *

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 (NavConnectServiceClient navConnectServiceClient = NavConnectServiceClient.create()) {
+   *   TripName name = TripName.of("[PROJECT]", "[TRIP]");
+   *   Trip response = navConnectServiceClient.getTrip(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the trip to get. Format: + * projects/{project}/trips/{trip_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Trip getTrip(TripName name) { + GetTripRequest request = + GetTripRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getTrip(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a trip. + * + *

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 (NavConnectServiceClient navConnectServiceClient = NavConnectServiceClient.create()) {
+   *   String name = TripName.of("[PROJECT]", "[TRIP]").toString();
+   *   Trip response = navConnectServiceClient.getTrip(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the trip to get. Format: + * projects/{project}/trips/{trip_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Trip getTrip(String name) { + GetTripRequest request = GetTripRequest.newBuilder().setName(name).build(); + return getTrip(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a trip. + * + *

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 (NavConnectServiceClient navConnectServiceClient = NavConnectServiceClient.create()) {
+   *   GetTripRequest request =
+   *       GetTripRequest.newBuilder()
+   *           .setName(TripName.of("[PROJECT]", "[TRIP]").toString())
+   *           .build();
+   *   Trip response = navConnectServiceClient.getTrip(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 Trip getTrip(GetTripRequest request) { + return getTripCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a trip. + * + *

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 (NavConnectServiceClient navConnectServiceClient = NavConnectServiceClient.create()) {
+   *   GetTripRequest request =
+   *       GetTripRequest.newBuilder()
+   *           .setName(TripName.of("[PROJECT]", "[TRIP]").toString())
+   *           .build();
+   *   ApiFuture future = navConnectServiceClient.getTripCallable().futureCall(request);
+   *   // Do something.
+   *   Trip response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getTripCallable() { + return stub.getTripCallable(); + } + + @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-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/NavConnectServiceSettings.java b/java-maps-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/NavConnectServiceSettings.java new file mode 100644 index 000000000000..9fbdebd6c704 --- /dev/null +++ b/java-maps-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/NavConnectServiceSettings.java @@ -0,0 +1,226 @@ +/* + * 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.navconnect.v1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.maps.navconnect.v1.stub.NavConnectServiceStubSettings; +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 NavConnectServiceClient}. + * + *

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

    + *
  • The default service address (navigationconnect.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 createTrip: + * + *

{@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
+ * NavConnectServiceSettings.Builder navConnectServiceSettingsBuilder =
+ *     NavConnectServiceSettings.newBuilder();
+ * navConnectServiceSettingsBuilder
+ *     .createTripSettings()
+ *     .setRetrySettings(
+ *         navConnectServiceSettingsBuilder
+ *             .createTripSettings()
+ *             .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());
+ * NavConnectServiceSettings navConnectServiceSettings = navConnectServiceSettingsBuilder.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 NavConnectServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createTrip. */ + public UnaryCallSettings createTripSettings() { + return ((NavConnectServiceStubSettings) getStubSettings()).createTripSettings(); + } + + /** Returns the object with the settings used for calls to getTrip. */ + public UnaryCallSettings getTripSettings() { + return ((NavConnectServiceStubSettings) getStubSettings()).getTripSettings(); + } + + public static final NavConnectServiceSettings create(NavConnectServiceStubSettings stub) + throws IOException { + return new NavConnectServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return NavConnectServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return NavConnectServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return NavConnectServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return NavConnectServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return NavConnectServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return NavConnectServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return NavConnectServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return NavConnectServiceStubSettings.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 NavConnectServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for NavConnectServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(NavConnectServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(NavConnectServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(NavConnectServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(NavConnectServiceStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(NavConnectServiceStubSettings.newHttpJsonBuilder()); + } + + public NavConnectServiceStubSettings.Builder getStubSettingsBuilder() { + return ((NavConnectServiceStubSettings.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 createTrip. */ + public UnaryCallSettings.Builder createTripSettings() { + return getStubSettingsBuilder().createTripSettings(); + } + + /** Returns the builder for the settings used for calls to getTrip. */ + public UnaryCallSettings.Builder getTripSettings() { + return getStubSettingsBuilder().getTripSettings(); + } + + @Override + public NavConnectServiceSettings build() throws IOException { + return new NavConnectServiceSettings(this); + } + } +} diff --git a/java-maps-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/gapic_metadata.json b/java-maps-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/gapic_metadata.json new file mode 100644 index 000000000000..2fe8ff69a3ab --- /dev/null +++ b/java-maps-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/gapic_metadata.json @@ -0,0 +1,24 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.maps.navconnect.v1", + "libraryPackage": "com.google.maps.navconnect.v1", + "services": { + "NavConnectService": { + "clients": { + "grpc": { + "libraryClient": "NavConnectServiceClient", + "rpcs": { + "CreateTrip": { + "methods": ["createTrip", "createTrip", "createTripCallable"] + }, + "GetTrip": { + "methods": ["getTrip", "getTrip", "getTrip", "getTripCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-maps-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/package-info.java b/java-maps-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/package-info.java new file mode 100644 index 000000000000..8356be091209 --- /dev/null +++ b/java-maps-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/package-info.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. + */ + +/** + * A client to Navigation Connect API + * + *

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

======================= NavConnectServiceClient ======================= + * + *

Service Description: Service for NavConnect clients to create and get trips. + * + *

Sample for NavConnectServiceClient: + * + *

{@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 (NavConnectServiceClient navConnectServiceClient = NavConnectServiceClient.create()) {
+ *   String parent = "parent-995424086";
+ *   Trip trip = Trip.newBuilder().build();
+ *   String tripId = "tripId-865466336";
+ *   Trip response = navConnectServiceClient.createTrip(parent, trip, tripId);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.maps.navconnect.v1; + +import javax.annotation.Generated; diff --git a/java-maps-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/stub/GrpcNavConnectServiceCallableFactory.java b/java-maps-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/stub/GrpcNavConnectServiceCallableFactory.java new file mode 100644 index 000000000000..f1931b96094c --- /dev/null +++ b/java-maps-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/stub/GrpcNavConnectServiceCallableFactory.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.navconnect.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the NavConnectService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcNavConnectServiceCallableFactory 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-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/stub/GrpcNavConnectServiceStub.java b/java-maps-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/stub/GrpcNavConnectServiceStub.java new file mode 100644 index 000000000000..d739f148bf1e --- /dev/null +++ b/java-maps-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/stub/GrpcNavConnectServiceStub.java @@ -0,0 +1,190 @@ +/* + * 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.navconnect.v1.stub; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.maps.navconnect.v1.CreateTripRequest; +import com.google.maps.navconnect.v1.GetTripRequest; +import com.google.maps.navconnect.v1.Trip; +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 NavConnectService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcNavConnectServiceStub extends NavConnectServiceStub { + private static final MethodDescriptor createTripMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.maps.navconnect.v1.NavConnectService/CreateTrip") + .setRequestMarshaller(ProtoUtils.marshaller(CreateTripRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Trip.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor getTripMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.maps.navconnect.v1.NavConnectService/GetTrip") + .setRequestMarshaller(ProtoUtils.marshaller(GetTripRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Trip.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private final UnaryCallable createTripCallable; + private final UnaryCallable getTripCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcNavConnectServiceStub create(NavConnectServiceStubSettings settings) + throws IOException { + return new GrpcNavConnectServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcNavConnectServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcNavConnectServiceStub( + NavConnectServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcNavConnectServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcNavConnectServiceStub( + NavConnectServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcNavConnectServiceStub, 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 GrpcNavConnectServiceStub( + NavConnectServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcNavConnectServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcNavConnectServiceStub, 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 GrpcNavConnectServiceStub( + NavConnectServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createTripTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createTripMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getTripTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getTripMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.createTripCallable = + callableFactory.createUnaryCallable( + createTripTransportSettings, settings.createTripSettings(), clientContext); + this.getTripCallable = + callableFactory.createUnaryCallable( + getTripTransportSettings, settings.getTripSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable createTripCallable() { + return createTripCallable; + } + + @Override + public UnaryCallable getTripCallable() { + return getTripCallable; + } + + @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-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/stub/HttpJsonNavConnectServiceCallableFactory.java b/java-maps-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/stub/HttpJsonNavConnectServiceCallableFactory.java new file mode 100644 index 000000000000..8a5f419a0456 --- /dev/null +++ b/java-maps-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/stub/HttpJsonNavConnectServiceCallableFactory.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.navconnect.v1.stub; + +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the NavConnectService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class HttpJsonNavConnectServiceCallableFactory + 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-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/stub/HttpJsonNavConnectServiceStub.java b/java-maps-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/stub/HttpJsonNavConnectServiceStub.java new file mode 100644 index 000000000000..89296f4aad04 --- /dev/null +++ b/java-maps-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/stub/HttpJsonNavConnectServiceStub.java @@ -0,0 +1,254 @@ +/* + * 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.navconnect.v1.stub; + +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.maps.navconnect.v1.CreateTripRequest; +import com.google.maps.navconnect.v1.GetTripRequest; +import com.google.maps.navconnect.v1.Trip; +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 NavConnectService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class HttpJsonNavConnectServiceStub extends NavConnectServiceStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor createTripMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.maps.navconnect.v1.NavConnectService/CreateTrip") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*}/trips", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "tripId", request.getTripId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create().toBody("trip", request.getTrip(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Trip.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getTripMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.maps.navconnect.v1.NavConnectService/GetTrip") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/trips/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Trip.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable createTripCallable; + private final UnaryCallable getTripCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonNavConnectServiceStub create(NavConnectServiceStubSettings settings) + throws IOException { + return new HttpJsonNavConnectServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonNavConnectServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonNavConnectServiceStub( + NavConnectServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonNavConnectServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonNavConnectServiceStub( + NavConnectServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonNavConnectServiceStub, 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 HttpJsonNavConnectServiceStub( + NavConnectServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonNavConnectServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonNavConnectServiceStub, 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 HttpJsonNavConnectServiceStub( + NavConnectServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings createTripTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createTripMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getTripTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getTripMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.createTripCallable = + callableFactory.createUnaryCallable( + createTripTransportSettings, settings.createTripSettings(), clientContext); + this.getTripCallable = + callableFactory.createUnaryCallable( + getTripTransportSettings, settings.getTripSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(createTripMethodDescriptor); + methodDescriptors.add(getTripMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable createTripCallable() { + return createTripCallable; + } + + @Override + public UnaryCallable getTripCallable() { + return getTripCallable; + } + + @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-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/stub/NavConnectServiceStub.java b/java-maps-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/stub/NavConnectServiceStub.java new file mode 100644 index 000000000000..22c1d4bf354e --- /dev/null +++ b/java-maps-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/stub/NavConnectServiceStub.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.navconnect.v1.stub; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.maps.navconnect.v1.CreateTripRequest; +import com.google.maps.navconnect.v1.GetTripRequest; +import com.google.maps.navconnect.v1.Trip; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the NavConnectService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class NavConnectServiceStub implements BackgroundResource { + + public UnaryCallable createTripCallable() { + throw new UnsupportedOperationException("Not implemented: createTripCallable()"); + } + + public UnaryCallable getTripCallable() { + throw new UnsupportedOperationException("Not implemented: getTripCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-maps-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/stub/NavConnectServiceStubSettings.java b/java-maps-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/stub/NavConnectServiceStubSettings.java new file mode 100644 index 000000000000..9c19caeb8638 --- /dev/null +++ b/java-maps-navigationconnect/google-maps-navigationconnect/src/main/java/com/google/maps/navconnect/v1/stub/NavConnectServiceStubSettings.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. + */ + +package com.google.maps.navconnect.v1.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.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.navconnect.v1.CreateTripRequest; +import com.google.maps.navconnect.v1.GetTripRequest; +import com.google.maps.navconnect.v1.Trip; +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 NavConnectServiceStub}. + * + *

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

    + *
  • The default service address (navigationconnect.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 createTrip: + * + *

{@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
+ * NavConnectServiceStubSettings.Builder navConnectServiceSettingsBuilder =
+ *     NavConnectServiceStubSettings.newBuilder();
+ * navConnectServiceSettingsBuilder
+ *     .createTripSettings()
+ *     .setRetrySettings(
+ *         navConnectServiceSettingsBuilder
+ *             .createTripSettings()
+ *             .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());
+ * NavConnectServiceStubSettings navConnectServiceSettings =
+ *     navConnectServiceSettingsBuilder.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 NavConnectServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings createTripSettings; + private final UnaryCallSettings getTripSettings; + + /** Returns the object with the settings used for calls to createTrip. */ + public UnaryCallSettings createTripSettings() { + return createTripSettings; + } + + /** Returns the object with the settings used for calls to getTrip. */ + public UnaryCallSettings getTripSettings() { + return getTripSettings; + } + + public NavConnectServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcNavConnectServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonNavConnectServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "navigationconnect"; + } + + /** 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 "navigationconnect.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "navigationconnect.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(NavConnectServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(NavConnectServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return NavConnectServiceStubSettings.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 NavConnectServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createTripSettings = settingsBuilder.createTripSettings().build(); + getTripSettings = settingsBuilder.getTripSettings().build(); + } + + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.maps:google-maps-navigationconnect") + .setRepository("googleapis/google-cloud-java") + .build(); + } + + /** Builder for NavConnectServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder createTripSettings; + private final UnaryCallSettings.Builder getTripSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + 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() + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_1_params", settings); + 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); + + createTripSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getTripSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(createTripSettings, getTripSettings); + initDefaults(this); + } + + protected Builder(NavConnectServiceStubSettings settings) { + super(settings); + + createTripSettings = settings.createTripSettings.toBuilder(); + getTripSettings = settings.getTripSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(createTripSettings, getTripSettings); + } + + 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 + .createTripSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getTripSettings() + .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 createTrip. */ + public UnaryCallSettings.Builder createTripSettings() { + return createTripSettings; + } + + /** Returns the builder for the settings used for calls to getTrip. */ + public UnaryCallSettings.Builder getTripSettings() { + return getTripSettings; + } + + @Override + public NavConnectServiceStubSettings build() throws IOException { + return new NavConnectServiceStubSettings(this); + } + } +} diff --git a/java-maps-navigationconnect/google-maps-navigationconnect/src/main/resources/META-INF/native-image/com.google.maps.navconnect.v1/reflect-config.json b/java-maps-navigationconnect/google-maps-navigationconnect/src/main/resources/META-INF/native-image/com.google.maps.navconnect.v1/reflect-config.json new file mode 100644 index 000000000000..59e8138b8982 --- /dev/null +++ b/java-maps-navigationconnect/google-maps-navigationconnect/src/main/resources/META-INF/native-image/com.google.maps.navconnect.v1/reflect-config.json @@ -0,0 +1,1478 @@ +[ + { + "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.FieldInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldInfo$Format", + "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.api.TypeReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.TypeReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.navconnect.v1.AuthToken", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.navconnect.v1.AuthToken$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.navconnect.v1.CreateTripRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.navconnect.v1.CreateTripRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.navconnect.v1.GetTripRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.navconnect.v1.GetTripRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.navconnect.v1.Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.navconnect.v1.Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.navconnect.v1.Stop", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.navconnect.v1.Stop$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.navconnect.v1.Trip", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.navconnect.v1.Trip$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.navconnect.v1.Trip$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.navconnect.v1.TripConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.navconnect.v1.TripConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.navconnect.v1.TripExecution", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.navconnect.v1.TripExecution$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.FieldMask", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.LatLng", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.LatLng$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + } +] \ No newline at end of file diff --git a/java-maps-navigationconnect/google-maps-navigationconnect/src/test/java/com/google/maps/navconnect/v1/MockNavConnectService.java b/java-maps-navigationconnect/google-maps-navigationconnect/src/test/java/com/google/maps/navconnect/v1/MockNavConnectService.java new file mode 100644 index 000000000000..7fb139101534 --- /dev/null +++ b/java-maps-navigationconnect/google-maps-navigationconnect/src/test/java/com/google/maps/navconnect/v1/MockNavConnectService.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.navconnect.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockNavConnectService implements MockGrpcService { + private final MockNavConnectServiceImpl serviceImpl; + + public MockNavConnectService() { + serviceImpl = new MockNavConnectServiceImpl(); + } + + @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-navigationconnect/google-maps-navigationconnect/src/test/java/com/google/maps/navconnect/v1/MockNavConnectServiceImpl.java b/java-maps-navigationconnect/google-maps-navigationconnect/src/test/java/com/google/maps/navconnect/v1/MockNavConnectServiceImpl.java new file mode 100644 index 000000000000..9dce5ed6c5f7 --- /dev/null +++ b/java-maps-navigationconnect/google-maps-navigationconnect/src/test/java/com/google/maps/navconnect/v1/MockNavConnectServiceImpl.java @@ -0,0 +1,100 @@ +/* + * 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.navconnect.v1; + +import com.google.api.core.BetaApi; +import com.google.maps.navconnect.v1.NavConnectServiceGrpc.NavConnectServiceImplBase; +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 MockNavConnectServiceImpl extends NavConnectServiceImplBase { + private List requests; + private Queue responses; + + public MockNavConnectServiceImpl() { + 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 createTrip(CreateTripRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Trip) { + requests.add(request); + responseObserver.onNext(((Trip) 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 CreateTrip, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Trip.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getTrip(GetTripRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Trip) { + requests.add(request); + responseObserver.onNext(((Trip) 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 GetTrip, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Trip.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-maps-navigationconnect/google-maps-navigationconnect/src/test/java/com/google/maps/navconnect/v1/NavConnectServiceClientHttpJsonTest.java b/java-maps-navigationconnect/google-maps-navigationconnect/src/test/java/com/google/maps/navconnect/v1/NavConnectServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..d113b51f849d --- /dev/null +++ b/java-maps-navigationconnect/google-maps-navigationconnect/src/test/java/com/google/maps/navconnect/v1/NavConnectServiceClientHttpJsonTest.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.navconnect.v1; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.maps.navconnect.v1.stub.HttpJsonNavConnectServiceStub; +import com.google.protobuf.Timestamp; +import java.io.IOException; +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 NavConnectServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static NavConnectServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonNavConnectServiceStub.getMethodDescriptors(), + NavConnectServiceSettings.getDefaultEndpoint()); + NavConnectServiceSettings settings = + NavConnectServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + NavConnectServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = NavConnectServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void createTripTest() throws Exception { + Trip expectedResponse = + Trip.newBuilder() + .setName(TripName.of("[PROJECT]", "[TRIP]").toString()) + .setConfig(TripConfig.newBuilder().build()) + .setAndroidAppId("androidAppId-1019476499") + .setIosAppId("iosAppId1395980047") + .setAuthToken(AuthToken.newBuilder().build()) + .setExecution(TripExecution.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-2353"; + Trip trip = Trip.newBuilder().build(); + String tripId = "tripId-865466336"; + + Trip actualResponse = client.createTrip(parent, trip, tripId); + 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 createTripExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-2353"; + Trip trip = Trip.newBuilder().build(); + String tripId = "tripId-865466336"; + client.createTrip(parent, trip, tripId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getTripTest() throws Exception { + Trip expectedResponse = + Trip.newBuilder() + .setName(TripName.of("[PROJECT]", "[TRIP]").toString()) + .setConfig(TripConfig.newBuilder().build()) + .setAndroidAppId("androidAppId-1019476499") + .setIosAppId("iosAppId1395980047") + .setAuthToken(AuthToken.newBuilder().build()) + .setExecution(TripExecution.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + TripName name = TripName.of("[PROJECT]", "[TRIP]"); + + Trip actualResponse = client.getTrip(name); + 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 getTripExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + TripName name = TripName.of("[PROJECT]", "[TRIP]"); + client.getTrip(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getTripTest2() throws Exception { + Trip expectedResponse = + Trip.newBuilder() + .setName(TripName.of("[PROJECT]", "[TRIP]").toString()) + .setConfig(TripConfig.newBuilder().build()) + .setAndroidAppId("androidAppId-1019476499") + .setIosAppId("iosAppId1395980047") + .setAuthToken(AuthToken.newBuilder().build()) + .setExecution(TripExecution.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-4742/trips/trip-4742"; + + Trip actualResponse = client.getTrip(name); + 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 getTripExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-4742/trips/trip-4742"; + client.getTrip(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-maps-navigationconnect/google-maps-navigationconnect/src/test/java/com/google/maps/navconnect/v1/NavConnectServiceClientTest.java b/java-maps-navigationconnect/google-maps-navigationconnect/src/test/java/com/google/maps/navconnect/v1/NavConnectServiceClientTest.java new file mode 100644 index 000000000000..540f69ef030a --- /dev/null +++ b/java-maps-navigationconnect/google-maps-navigationconnect/src/test/java/com/google/maps/navconnect/v1/NavConnectServiceClientTest.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.navconnect.v1; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +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 NavConnectServiceClientTest { + private static MockNavConnectService mockNavConnectService; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private NavConnectServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockNavConnectService = new MockNavConnectService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockNavConnectService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + NavConnectServiceSettings settings = + NavConnectServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = NavConnectServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createTripTest() throws Exception { + Trip expectedResponse = + Trip.newBuilder() + .setName(TripName.of("[PROJECT]", "[TRIP]").toString()) + .setConfig(TripConfig.newBuilder().build()) + .setAndroidAppId("androidAppId-1019476499") + .setIosAppId("iosAppId1395980047") + .setAuthToken(AuthToken.newBuilder().build()) + .setExecution(TripExecution.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockNavConnectService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + Trip trip = Trip.newBuilder().build(); + String tripId = "tripId-865466336"; + + Trip actualResponse = client.createTrip(parent, trip, tripId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNavConnectService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateTripRequest actualRequest = ((CreateTripRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(trip, actualRequest.getTrip()); + Assert.assertEquals(tripId, actualRequest.getTripId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createTripExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNavConnectService.addException(exception); + + try { + String parent = "parent-995424086"; + Trip trip = Trip.newBuilder().build(); + String tripId = "tripId-865466336"; + client.createTrip(parent, trip, tripId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getTripTest() throws Exception { + Trip expectedResponse = + Trip.newBuilder() + .setName(TripName.of("[PROJECT]", "[TRIP]").toString()) + .setConfig(TripConfig.newBuilder().build()) + .setAndroidAppId("androidAppId-1019476499") + .setIosAppId("iosAppId1395980047") + .setAuthToken(AuthToken.newBuilder().build()) + .setExecution(TripExecution.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockNavConnectService.addResponse(expectedResponse); + + TripName name = TripName.of("[PROJECT]", "[TRIP]"); + + Trip actualResponse = client.getTrip(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNavConnectService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetTripRequest actualRequest = ((GetTripRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getTripExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNavConnectService.addException(exception); + + try { + TripName name = TripName.of("[PROJECT]", "[TRIP]"); + client.getTrip(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getTripTest2() throws Exception { + Trip expectedResponse = + Trip.newBuilder() + .setName(TripName.of("[PROJECT]", "[TRIP]").toString()) + .setConfig(TripConfig.newBuilder().build()) + .setAndroidAppId("androidAppId-1019476499") + .setIosAppId("iosAppId1395980047") + .setAuthToken(AuthToken.newBuilder().build()) + .setExecution(TripExecution.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockNavConnectService.addResponse(expectedResponse); + + String name = "name3373707"; + + Trip actualResponse = client.getTrip(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNavConnectService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetTripRequest actualRequest = ((GetTripRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getTripExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNavConnectService.addException(exception); + + try { + String name = "name3373707"; + client.getTrip(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-maps-navigationconnect/grpc-google-maps-navigationconnect-v1/pom.xml b/java-maps-navigationconnect/grpc-google-maps-navigationconnect-v1/pom.xml new file mode 100644 index 000000000000..a2a75afe1820 --- /dev/null +++ b/java-maps-navigationconnect/grpc-google-maps-navigationconnect-v1/pom.xml @@ -0,0 +1,45 @@ + + 4.0.0 + com.google.maps.api.grpc + grpc-google-maps-navigationconnect-v1 + 0.0.1-SNAPSHOT + grpc-google-maps-navigationconnect-v1 + GRPC library for google-maps-navigationconnect + + com.google.maps + google-maps-navigationconnect-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-navigationconnect-v1 + + + com.google.guava + guava + + + diff --git a/java-maps-navigationconnect/grpc-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/NavConnectServiceGrpc.java b/java-maps-navigationconnect/grpc-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/NavConnectServiceGrpc.java new file mode 100644 index 000000000000..754c73c6a316 --- /dev/null +++ b/java-maps-navigationconnect/grpc-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/NavConnectServiceGrpc.java @@ -0,0 +1,536 @@ +/* + * 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.navconnect.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service for NavConnect clients to create and get trips.
+ * 
+ */ +@io.grpc.stub.annotations.GrpcGenerated +public final class NavConnectServiceGrpc { + + private NavConnectServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = "google.maps.navconnect.v1.NavConnectService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.maps.navconnect.v1.CreateTripRequest, com.google.maps.navconnect.v1.Trip> + getCreateTripMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateTrip", + requestType = com.google.maps.navconnect.v1.CreateTripRequest.class, + responseType = com.google.maps.navconnect.v1.Trip.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.maps.navconnect.v1.CreateTripRequest, com.google.maps.navconnect.v1.Trip> + getCreateTripMethod() { + io.grpc.MethodDescriptor< + com.google.maps.navconnect.v1.CreateTripRequest, com.google.maps.navconnect.v1.Trip> + getCreateTripMethod; + if ((getCreateTripMethod = NavConnectServiceGrpc.getCreateTripMethod) == null) { + synchronized (NavConnectServiceGrpc.class) { + if ((getCreateTripMethod = NavConnectServiceGrpc.getCreateTripMethod) == null) { + NavConnectServiceGrpc.getCreateTripMethod = + getCreateTripMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateTrip")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.maps.navconnect.v1.CreateTripRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.maps.navconnect.v1.Trip.getDefaultInstance())) + .setSchemaDescriptor( + new NavConnectServiceMethodDescriptorSupplier("CreateTrip")) + .build(); + } + } + } + return getCreateTripMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.maps.navconnect.v1.GetTripRequest, com.google.maps.navconnect.v1.Trip> + getGetTripMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetTrip", + requestType = com.google.maps.navconnect.v1.GetTripRequest.class, + responseType = com.google.maps.navconnect.v1.Trip.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.maps.navconnect.v1.GetTripRequest, com.google.maps.navconnect.v1.Trip> + getGetTripMethod() { + io.grpc.MethodDescriptor< + com.google.maps.navconnect.v1.GetTripRequest, com.google.maps.navconnect.v1.Trip> + getGetTripMethod; + if ((getGetTripMethod = NavConnectServiceGrpc.getGetTripMethod) == null) { + synchronized (NavConnectServiceGrpc.class) { + if ((getGetTripMethod = NavConnectServiceGrpc.getGetTripMethod) == null) { + NavConnectServiceGrpc.getGetTripMethod = + getGetTripMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTrip")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.maps.navconnect.v1.GetTripRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.maps.navconnect.v1.Trip.getDefaultInstance())) + .setSchemaDescriptor(new NavConnectServiceMethodDescriptorSupplier("GetTrip")) + .build(); + } + } + } + return getGetTripMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static NavConnectServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public NavConnectServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NavConnectServiceStub(channel, callOptions); + } + }; + return NavConnectServiceStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static NavConnectServiceBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public NavConnectServiceBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NavConnectServiceBlockingV2Stub(channel, callOptions); + } + }; + return NavConnectServiceBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static NavConnectServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public NavConnectServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NavConnectServiceBlockingStub(channel, callOptions); + } + }; + return NavConnectServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static NavConnectServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public NavConnectServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NavConnectServiceFutureStub(channel, callOptions); + } + }; + return NavConnectServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service for NavConnect clients to create and get trips.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Creates a trip. This must be called before the mobile application can start
+     * the trip. The returned trip will have the `auth_token` field set.
+     * 
+ */ + default void createTrip( + com.google.maps.navconnect.v1.CreateTripRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateTripMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a trip.
+     * 
+ */ + default void getTrip( + com.google.maps.navconnect.v1.GetTripRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTripMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service NavConnectService. + * + *
+   * Service for NavConnect clients to create and get trips.
+   * 
+ */ + public abstract static class NavConnectServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return NavConnectServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service NavConnectService. + * + *
+   * Service for NavConnect clients to create and get trips.
+   * 
+ */ + public static final class NavConnectServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private NavConnectServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected NavConnectServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NavConnectServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a trip. This must be called before the mobile application can start
+     * the trip. The returned trip will have the `auth_token` field set.
+     * 
+ */ + public void createTrip( + com.google.maps.navconnect.v1.CreateTripRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateTripMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Gets a trip.
+     * 
+ */ + public void getTrip( + com.google.maps.navconnect.v1.GetTripRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetTripMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service NavConnectService. + * + *
+   * Service for NavConnect clients to create and get trips.
+   * 
+ */ + public static final class NavConnectServiceBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private NavConnectServiceBlockingV2Stub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected NavConnectServiceBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NavConnectServiceBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a trip. This must be called before the mobile application can start
+     * the trip. The returned trip will have the `auth_token` field set.
+     * 
+ */ + public com.google.maps.navconnect.v1.Trip createTrip( + com.google.maps.navconnect.v1.CreateTripRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateTripMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a trip.
+     * 
+ */ + public com.google.maps.navconnect.v1.Trip getTrip( + com.google.maps.navconnect.v1.GetTripRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetTripMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service NavConnectService. + * + *
+   * Service for NavConnect clients to create and get trips.
+   * 
+ */ + public static final class NavConnectServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private NavConnectServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected NavConnectServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NavConnectServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a trip. This must be called before the mobile application can start
+     * the trip. The returned trip will have the `auth_token` field set.
+     * 
+ */ + public com.google.maps.navconnect.v1.Trip createTrip( + com.google.maps.navconnect.v1.CreateTripRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateTripMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a trip.
+     * 
+ */ + public com.google.maps.navconnect.v1.Trip getTrip( + com.google.maps.navconnect.v1.GetTripRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetTripMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service NavConnectService. + * + *
+   * Service for NavConnect clients to create and get trips.
+   * 
+ */ + public static final class NavConnectServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private NavConnectServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected NavConnectServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NavConnectServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a trip. This must be called before the mobile application can start
+     * the trip. The returned trip will have the `auth_token` field set.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createTrip(com.google.maps.navconnect.v1.CreateTripRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateTripMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a trip.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getTrip(com.google.maps.navconnect.v1.GetTripRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetTripMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_TRIP = 0; + private static final int METHODID_GET_TRIP = 1; + + 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_CREATE_TRIP: + serviceImpl.createTrip( + (com.google.maps.navconnect.v1.CreateTripRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_TRIP: + serviceImpl.getTrip( + (com.google.maps.navconnect.v1.GetTripRequest) 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( + getCreateTripMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.maps.navconnect.v1.CreateTripRequest, + com.google.maps.navconnect.v1.Trip>(service, METHODID_CREATE_TRIP))) + .addMethod( + getGetTripMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.maps.navconnect.v1.GetTripRequest, + com.google.maps.navconnect.v1.Trip>(service, METHODID_GET_TRIP))) + .build(); + } + + private abstract static class NavConnectServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + NavConnectServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.maps.navconnect.v1.NavConnectServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("NavConnectService"); + } + } + + private static final class NavConnectServiceFileDescriptorSupplier + extends NavConnectServiceBaseDescriptorSupplier { + NavConnectServiceFileDescriptorSupplier() {} + } + + private static final class NavConnectServiceMethodDescriptorSupplier + extends NavConnectServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + NavConnectServiceMethodDescriptorSupplier(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 (NavConnectServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new NavConnectServiceFileDescriptorSupplier()) + .addMethod(getCreateTripMethod()) + .addMethod(getGetTripMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-maps-navigationconnect/owlbot.py b/java-maps-navigationconnect/owlbot.py new file mode 100644 index 000000000000..6da47954339a --- /dev/null +++ b/java-maps-navigationconnect/owlbot.py @@ -0,0 +1,38 @@ +# 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-navigationconnect/pom.xml b/java-maps-navigationconnect/pom.xml new file mode 100644 index 000000000000..459c43b20602 --- /dev/null +++ b/java-maps-navigationconnect/pom.xml @@ -0,0 +1,55 @@ + + + 4.0.0 + com.google.maps + google-maps-navigationconnect-parent + pom + 0.0.1-SNAPSHOT + Google Navigation Connect API Parent + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-jar-parent + 1.82.0-SNAPSHOT + ../google-cloud-jar-parent/pom.xml + + + + UTF-8 + UTF-8 + github + google-maps-navigationconnect-parent + + + + + + com.google.maps + google-maps-navigationconnect + 0.0.1-SNAPSHOT + + + com.google.maps.api.grpc + grpc-google-maps-navigationconnect-v1 + 0.0.1-SNAPSHOT + + + com.google.maps.api.grpc + proto-google-maps-navigationconnect-v1 + 0.0.1-SNAPSHOT + + + + + + + google-maps-navigationconnect + grpc-google-maps-navigationconnect-v1 + proto-google-maps-navigationconnect-v1 + google-maps-navigationconnect-bom + + + diff --git a/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/clirr-ignored-differences.xml b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/clirr-ignored-differences.xml new file mode 100644 index 000000000000..c89c585aa38d --- /dev/null +++ b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/clirr-ignored-differences.xml @@ -0,0 +1,80 @@ + + + + + 7012 + com/google/maps/navconnect/v1/*OrBuilder + * get*(*) + + + 7012 + com/google/maps/navconnect/v1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/maps/navconnect/v1/*OrBuilder + boolean has*(*) + + + + 7006 + com/google/maps/navconnect/v1/** + * getDefaultInstanceForType() + ** + + + 7006 + com/google/maps/navconnect/v1/** + * addRepeatedField(*) + ** + + + 7006 + com/google/maps/navconnect/v1/** + * clear() + ** + + + 7006 + com/google/maps/navconnect/v1/** + * clearField(*) + ** + + + 7006 + com/google/maps/navconnect/v1/** + * clearOneof(*) + ** + + + 7006 + com/google/maps/navconnect/v1/** + * clone() + ** + + + 7006 + com/google/maps/navconnect/v1/** + * mergeUnknownFields(*) + ** + + + 7006 + com/google/maps/navconnect/v1/** + * setField(*) + ** + + + 7006 + com/google/maps/navconnect/v1/** + * setRepeatedField(*) + ** + + + 7006 + com/google/maps/navconnect/v1/** + * setUnknownFields(*) + ** + + diff --git a/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/pom.xml b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/pom.xml new file mode 100644 index 000000000000..6ba118bb297b --- /dev/null +++ b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/pom.xml @@ -0,0 +1,37 @@ + + 4.0.0 + com.google.maps.api.grpc + proto-google-maps-navigationconnect-v1 + 0.0.1-SNAPSHOT + proto-google-maps-navigationconnect-v1 + Proto library for google-maps-navigationconnect + + com.google.maps + google-maps-navigationconnect-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-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/AuthToken.java b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/AuthToken.java new file mode 100644 index 000000000000..7734a9e93186 --- /dev/null +++ b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/AuthToken.java @@ -0,0 +1,910 @@ +/* + * 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/navconnect/v1/navconnect_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.navconnect.v1; + +/** + * + * + *
+ * An authentication token.
+ * 
+ * + * Protobuf type {@code google.maps.navconnect.v1.AuthToken} + */ +@com.google.protobuf.Generated +public final class AuthToken extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.maps.navconnect.v1.AuthToken) + AuthTokenOrBuilder { + 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= */ "", + "AuthToken"); + } + + // Use AuthToken.newBuilder() to construct. + private AuthToken(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AuthToken() { + token_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_AuthToken_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_AuthToken_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.navconnect.v1.AuthToken.class, + com.google.maps.navconnect.v1.AuthToken.Builder.class); + } + + private int bitField0_; + public static final int TOKEN_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object token_ = ""; + + /** + * + * + *
+   * Output only. The authentication token that should be passed to the mobile
+   * application.
+   * 
+ * + * string token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The token. + */ + @java.lang.Override + public java.lang.String getToken() { + java.lang.Object ref = token_; + 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(); + token_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The authentication token that should be passed to the mobile
+   * application.
+   * 
+ * + * string token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for token. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXPIRE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp expireTime_; + + /** + * + * + *
+   * Output only. Time at which the authentication token will expire.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expireTime field is set. + */ + @java.lang.Override + public boolean hasExpireTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. Time at which the authentication token will expire.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expireTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getExpireTime() { + return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; + } + + /** + * + * + *
+   * Output only. Time at which the authentication token will expire.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { + return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; + } + + 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(token_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, token_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getExpireTime()); + } + 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(token_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, token_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getExpireTime()); + } + 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.navconnect.v1.AuthToken)) { + return super.equals(obj); + } + com.google.maps.navconnect.v1.AuthToken other = (com.google.maps.navconnect.v1.AuthToken) obj; + + if (!getToken().equals(other.getToken())) return false; + if (hasExpireTime() != other.hasExpireTime()) return false; + if (hasExpireTime()) { + if (!getExpireTime().equals(other.getExpireTime())) 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) + TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getToken().hashCode(); + if (hasExpireTime()) { + hash = (37 * hash) + EXPIRE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getExpireTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.navconnect.v1.AuthToken parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.navconnect.v1.AuthToken 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.navconnect.v1.AuthToken parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.navconnect.v1.AuthToken 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.navconnect.v1.AuthToken parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.navconnect.v1.AuthToken parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.navconnect.v1.AuthToken parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.navconnect.v1.AuthToken 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.navconnect.v1.AuthToken parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.navconnect.v1.AuthToken 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.navconnect.v1.AuthToken parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.navconnect.v1.AuthToken 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.navconnect.v1.AuthToken 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 authentication token.
+   * 
+ * + * Protobuf type {@code google.maps.navconnect.v1.AuthToken} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.navconnect.v1.AuthToken) + com.google.maps.navconnect.v1.AuthTokenOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_AuthToken_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_AuthToken_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.navconnect.v1.AuthToken.class, + com.google.maps.navconnect.v1.AuthToken.Builder.class); + } + + // Construct using com.google.maps.navconnect.v1.AuthToken.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetExpireTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + token_ = ""; + expireTime_ = null; + if (expireTimeBuilder_ != null) { + expireTimeBuilder_.dispose(); + expireTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_AuthToken_descriptor; + } + + @java.lang.Override + public com.google.maps.navconnect.v1.AuthToken getDefaultInstanceForType() { + return com.google.maps.navconnect.v1.AuthToken.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.navconnect.v1.AuthToken build() { + com.google.maps.navconnect.v1.AuthToken result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.navconnect.v1.AuthToken buildPartial() { + com.google.maps.navconnect.v1.AuthToken result = + new com.google.maps.navconnect.v1.AuthToken(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.navconnect.v1.AuthToken result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.token_ = token_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.expireTime_ = expireTimeBuilder_ == null ? expireTime_ : expireTimeBuilder_.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.navconnect.v1.AuthToken) { + return mergeFrom((com.google.maps.navconnect.v1.AuthToken) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.navconnect.v1.AuthToken other) { + if (other == com.google.maps.navconnect.v1.AuthToken.getDefaultInstance()) return this; + if (!other.getToken().isEmpty()) { + token_ = other.token_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasExpireTime()) { + mergeExpireTime(other.getExpireTime()); + } + 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: + { + token_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetExpireTimeFieldBuilder().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.lang.Object token_ = ""; + + /** + * + * + *
+     * Output only. The authentication token that should be passed to the mobile
+     * application.
+     * 
+ * + * string token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The token. + */ + public java.lang.String getToken() { + java.lang.Object ref = token_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + token_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The authentication token that should be passed to the mobile
+     * application.
+     * 
+ * + * string token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for token. + */ + public com.google.protobuf.ByteString getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The authentication token that should be passed to the mobile
+     * application.
+     * 
+ * + * string token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The token to set. + * @return This builder for chaining. + */ + public Builder setToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + token_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The authentication token that should be passed to the mobile
+     * application.
+     * 
+ * + * string token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearToken() { + token_ = getDefaultInstance().getToken(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The authentication token that should be passed to the mobile
+     * application.
+     * 
+ * + * string token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for token to set. + * @return This builder for chaining. + */ + public Builder setTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + token_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp expireTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + expireTimeBuilder_; + + /** + * + * + *
+     * Output only. Time at which the authentication token will expire.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expireTime field is set. + */ + public boolean hasExpireTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. Time at which the authentication token will expire.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expireTime. + */ + public com.google.protobuf.Timestamp getExpireTime() { + if (expireTimeBuilder_ == null) { + return expireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expireTime_; + } else { + return expireTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Time at which the authentication token will expire.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExpireTime(com.google.protobuf.Timestamp value) { + if (expireTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expireTime_ = value; + } else { + expireTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Time at which the authentication token will expire.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (expireTimeBuilder_ == null) { + expireTime_ = builderForValue.build(); + } else { + expireTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Time at which the authentication token will expire.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeExpireTime(com.google.protobuf.Timestamp value) { + if (expireTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && expireTime_ != null + && expireTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getExpireTimeBuilder().mergeFrom(value); + } else { + expireTime_ = value; + } + } else { + expireTimeBuilder_.mergeFrom(value); + } + if (expireTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Time at which the authentication token will expire.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearExpireTime() { + bitField0_ = (bitField0_ & ~0x00000002); + expireTime_ = null; + if (expireTimeBuilder_ != null) { + expireTimeBuilder_.dispose(); + expireTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Time at which the authentication token will expire.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetExpireTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Time at which the authentication token will expire.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { + if (expireTimeBuilder_ != null) { + return expireTimeBuilder_.getMessageOrBuilder(); + } else { + return expireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expireTime_; + } + } + + /** + * + * + *
+     * Output only. Time at which the authentication token will expire.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetExpireTimeFieldBuilder() { + if (expireTimeBuilder_ == null) { + expireTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getExpireTime(), getParentForChildren(), isClean()); + expireTime_ = null; + } + return expireTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.maps.navconnect.v1.AuthToken) + } + + // @@protoc_insertion_point(class_scope:google.maps.navconnect.v1.AuthToken) + private static final com.google.maps.navconnect.v1.AuthToken DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.navconnect.v1.AuthToken(); + } + + public static com.google.maps.navconnect.v1.AuthToken getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuthToken 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.navconnect.v1.AuthToken getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/AuthTokenOrBuilder.java b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/AuthTokenOrBuilder.java new file mode 100644 index 000000000000..02ee560c9a15 --- /dev/null +++ b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/AuthTokenOrBuilder.java @@ -0,0 +1,96 @@ +/* + * 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/navconnect/v1/navconnect_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.navconnect.v1; + +@com.google.protobuf.Generated +public interface AuthTokenOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.navconnect.v1.AuthToken) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The authentication token that should be passed to the mobile
+   * application.
+   * 
+ * + * string token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The token. + */ + java.lang.String getToken(); + + /** + * + * + *
+   * Output only. The authentication token that should be passed to the mobile
+   * application.
+   * 
+ * + * string token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for token. + */ + com.google.protobuf.ByteString getTokenBytes(); + + /** + * + * + *
+   * Output only. Time at which the authentication token will expire.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expireTime field is set. + */ + boolean hasExpireTime(); + + /** + * + * + *
+   * Output only. Time at which the authentication token will expire.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expireTime. + */ + com.google.protobuf.Timestamp getExpireTime(); + + /** + * + * + *
+   * Output only. Time at which the authentication token will expire.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder(); +} diff --git a/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/CreateTripRequest.java b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/CreateTripRequest.java new file mode 100644 index 000000000000..96e2be9c8404 --- /dev/null +++ b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/CreateTripRequest.java @@ -0,0 +1,1122 @@ +/* + * 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/navconnect/v1/navconnect_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.navconnect.v1; + +/** + * + * + *
+ * Request message for NavConnectService.CreateTrip.
+ * 
+ * + * Protobuf type {@code google.maps.navconnect.v1.CreateTripRequest} + */ +@com.google.protobuf.Generated +public final class CreateTripRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.maps.navconnect.v1.CreateTripRequest) + CreateTripRequestOrBuilder { + 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= */ "", + "CreateTripRequest"); + } + + // Use CreateTripRequest.newBuilder() to construct. + private CreateTripRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateTripRequest() { + parent_ = ""; + tripId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_CreateTripRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_CreateTripRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.navconnect.v1.CreateTripRequest.class, + com.google.maps.navconnect.v1.CreateTripRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource under which this trip will be created.
+   * Format: projects/{project_number}
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The parent resource under which this trip will be created.
+   * Format: projects/{project_number}
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRIP_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object tripId_ = ""; + + /** + * + * + *
+   * Required. The ID to use for the trip, which will become the final component
+   * of the trip's resource name.
+   *
+   * This value must be a valid RFC-4122 UUID.
+   * 
+ * + * + * string trip_id = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return The tripId. + */ + @java.lang.Override + public java.lang.String getTripId() { + java.lang.Object ref = tripId_; + 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(); + tripId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The ID to use for the trip, which will become the final component
+   * of the trip's resource name.
+   *
+   * This value must be a valid RFC-4122 UUID.
+   * 
+ * + * + * string trip_id = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return The bytes for tripId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTripIdBytes() { + java.lang.Object ref = tripId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tripId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRIP_FIELD_NUMBER = 3; + private com.google.maps.navconnect.v1.Trip trip_; + + /** + * + * + *
+   * Required. The trip to create.
+   * 
+ * + * .google.maps.navconnect.v1.Trip trip = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the trip field is set. + */ + @java.lang.Override + public boolean hasTrip() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The trip to create.
+   * 
+ * + * .google.maps.navconnect.v1.Trip trip = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The trip. + */ + @java.lang.Override + public com.google.maps.navconnect.v1.Trip getTrip() { + return trip_ == null ? com.google.maps.navconnect.v1.Trip.getDefaultInstance() : trip_; + } + + /** + * + * + *
+   * Required. The trip to create.
+   * 
+ * + * .google.maps.navconnect.v1.Trip trip = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.maps.navconnect.v1.TripOrBuilder getTripOrBuilder() { + return trip_ == null ? com.google.maps.navconnect.v1.Trip.getDefaultInstance() : trip_; + } + + 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(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tripId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, tripId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getTrip()); + } + 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(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tripId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, tripId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTrip()); + } + 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.navconnect.v1.CreateTripRequest)) { + return super.equals(obj); + } + com.google.maps.navconnect.v1.CreateTripRequest other = + (com.google.maps.navconnect.v1.CreateTripRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getTripId().equals(other.getTripId())) return false; + if (hasTrip() != other.hasTrip()) return false; + if (hasTrip()) { + if (!getTrip().equals(other.getTrip())) 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) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + TRIP_ID_FIELD_NUMBER; + hash = (53 * hash) + getTripId().hashCode(); + if (hasTrip()) { + hash = (37 * hash) + TRIP_FIELD_NUMBER; + hash = (53 * hash) + getTrip().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.navconnect.v1.CreateTripRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.navconnect.v1.CreateTripRequest 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.navconnect.v1.CreateTripRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.navconnect.v1.CreateTripRequest 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.navconnect.v1.CreateTripRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.navconnect.v1.CreateTripRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.navconnect.v1.CreateTripRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.navconnect.v1.CreateTripRequest 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.navconnect.v1.CreateTripRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.navconnect.v1.CreateTripRequest 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.navconnect.v1.CreateTripRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.navconnect.v1.CreateTripRequest 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.navconnect.v1.CreateTripRequest 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 NavConnectService.CreateTrip.
+   * 
+ * + * Protobuf type {@code google.maps.navconnect.v1.CreateTripRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.navconnect.v1.CreateTripRequest) + com.google.maps.navconnect.v1.CreateTripRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_CreateTripRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_CreateTripRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.navconnect.v1.CreateTripRequest.class, + com.google.maps.navconnect.v1.CreateTripRequest.Builder.class); + } + + // Construct using com.google.maps.navconnect.v1.CreateTripRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetTripFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + tripId_ = ""; + trip_ = null; + if (tripBuilder_ != null) { + tripBuilder_.dispose(); + tripBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_CreateTripRequest_descriptor; + } + + @java.lang.Override + public com.google.maps.navconnect.v1.CreateTripRequest getDefaultInstanceForType() { + return com.google.maps.navconnect.v1.CreateTripRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.navconnect.v1.CreateTripRequest build() { + com.google.maps.navconnect.v1.CreateTripRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.navconnect.v1.CreateTripRequest buildPartial() { + com.google.maps.navconnect.v1.CreateTripRequest result = + new com.google.maps.navconnect.v1.CreateTripRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.navconnect.v1.CreateTripRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.tripId_ = tripId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.trip_ = tripBuilder_ == null ? trip_ : tripBuilder_.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.navconnect.v1.CreateTripRequest) { + return mergeFrom((com.google.maps.navconnect.v1.CreateTripRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.navconnect.v1.CreateTripRequest other) { + if (other == com.google.maps.navconnect.v1.CreateTripRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getTripId().isEmpty()) { + tripId_ = other.tripId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasTrip()) { + mergeTrip(other.getTrip()); + } + 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: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + tripId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(internalGetTripFieldBuilder().getBuilder(), extensionRegistry); + 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 parent_ = ""; + + /** + * + * + *
+     * Required. The parent resource under which this trip will be created.
+     * Format: projects/{project_number}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource under which this trip will be created.
+     * Format: projects/{project_number}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource under which this trip will be created.
+     * Format: projects/{project_number}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource under which this trip will be created.
+     * Format: projects/{project_number}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource under which this trip will be created.
+     * Format: projects/{project_number}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object tripId_ = ""; + + /** + * + * + *
+     * Required. The ID to use for the trip, which will become the final component
+     * of the trip's resource name.
+     *
+     * This value must be a valid RFC-4122 UUID.
+     * 
+ * + * + * string trip_id = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return The tripId. + */ + public java.lang.String getTripId() { + java.lang.Object ref = tripId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tripId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the trip, which will become the final component
+     * of the trip's resource name.
+     *
+     * This value must be a valid RFC-4122 UUID.
+     * 
+ * + * + * string trip_id = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return The bytes for tripId. + */ + public com.google.protobuf.ByteString getTripIdBytes() { + java.lang.Object ref = tripId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tripId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the trip, which will become the final component
+     * of the trip's resource name.
+     *
+     * This value must be a valid RFC-4122 UUID.
+     * 
+ * + * + * string trip_id = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @param value The tripId to set. + * @return This builder for chaining. + */ + public Builder setTripId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tripId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the trip, which will become the final component
+     * of the trip's resource name.
+     *
+     * This value must be a valid RFC-4122 UUID.
+     * 
+ * + * + * string trip_id = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearTripId() { + tripId_ = getDefaultInstance().getTripId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the trip, which will become the final component
+     * of the trip's resource name.
+     *
+     * This value must be a valid RFC-4122 UUID.
+     * 
+ * + * + * string trip_id = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for tripId to set. + * @return This builder for chaining. + */ + public Builder setTripIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tripId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.maps.navconnect.v1.Trip trip_; + private com.google.protobuf.SingleFieldBuilder< + com.google.maps.navconnect.v1.Trip, + com.google.maps.navconnect.v1.Trip.Builder, + com.google.maps.navconnect.v1.TripOrBuilder> + tripBuilder_; + + /** + * + * + *
+     * Required. The trip to create.
+     * 
+ * + * .google.maps.navconnect.v1.Trip trip = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the trip field is set. + */ + public boolean hasTrip() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. The trip to create.
+     * 
+ * + * .google.maps.navconnect.v1.Trip trip = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The trip. + */ + public com.google.maps.navconnect.v1.Trip getTrip() { + if (tripBuilder_ == null) { + return trip_ == null ? com.google.maps.navconnect.v1.Trip.getDefaultInstance() : trip_; + } else { + return tripBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The trip to create.
+     * 
+ * + * .google.maps.navconnect.v1.Trip trip = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTrip(com.google.maps.navconnect.v1.Trip value) { + if (tripBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + trip_ = value; + } else { + tripBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The trip to create.
+     * 
+ * + * .google.maps.navconnect.v1.Trip trip = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTrip(com.google.maps.navconnect.v1.Trip.Builder builderForValue) { + if (tripBuilder_ == null) { + trip_ = builderForValue.build(); + } else { + tripBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The trip to create.
+     * 
+ * + * .google.maps.navconnect.v1.Trip trip = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTrip(com.google.maps.navconnect.v1.Trip value) { + if (tripBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && trip_ != null + && trip_ != com.google.maps.navconnect.v1.Trip.getDefaultInstance()) { + getTripBuilder().mergeFrom(value); + } else { + trip_ = value; + } + } else { + tripBuilder_.mergeFrom(value); + } + if (trip_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The trip to create.
+     * 
+ * + * .google.maps.navconnect.v1.Trip trip = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTrip() { + bitField0_ = (bitField0_ & ~0x00000004); + trip_ = null; + if (tripBuilder_ != null) { + tripBuilder_.dispose(); + tripBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The trip to create.
+     * 
+ * + * .google.maps.navconnect.v1.Trip trip = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.maps.navconnect.v1.Trip.Builder getTripBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetTripFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The trip to create.
+     * 
+ * + * .google.maps.navconnect.v1.Trip trip = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.maps.navconnect.v1.TripOrBuilder getTripOrBuilder() { + if (tripBuilder_ != null) { + return tripBuilder_.getMessageOrBuilder(); + } else { + return trip_ == null ? com.google.maps.navconnect.v1.Trip.getDefaultInstance() : trip_; + } + } + + /** + * + * + *
+     * Required. The trip to create.
+     * 
+ * + * .google.maps.navconnect.v1.Trip trip = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.maps.navconnect.v1.Trip, + com.google.maps.navconnect.v1.Trip.Builder, + com.google.maps.navconnect.v1.TripOrBuilder> + internalGetTripFieldBuilder() { + if (tripBuilder_ == null) { + tripBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.maps.navconnect.v1.Trip, + com.google.maps.navconnect.v1.Trip.Builder, + com.google.maps.navconnect.v1.TripOrBuilder>( + getTrip(), getParentForChildren(), isClean()); + trip_ = null; + } + return tripBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.maps.navconnect.v1.CreateTripRequest) + } + + // @@protoc_insertion_point(class_scope:google.maps.navconnect.v1.CreateTripRequest) + private static final com.google.maps.navconnect.v1.CreateTripRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.navconnect.v1.CreateTripRequest(); + } + + public static com.google.maps.navconnect.v1.CreateTripRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateTripRequest 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.navconnect.v1.CreateTripRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/CreateTripRequestOrBuilder.java b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/CreateTripRequestOrBuilder.java new file mode 100644 index 000000000000..38eea539a648 --- /dev/null +++ b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/CreateTripRequestOrBuilder.java @@ -0,0 +1,132 @@ +/* + * 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/navconnect/v1/navconnect_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.navconnect.v1; + +@com.google.protobuf.Generated +public interface CreateTripRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.navconnect.v1.CreateTripRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource under which this trip will be created.
+   * Format: projects/{project_number}
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource under which this trip will be created.
+   * Format: projects/{project_number}
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The ID to use for the trip, which will become the final component
+   * of the trip's resource name.
+   *
+   * This value must be a valid RFC-4122 UUID.
+   * 
+ * + * + * string trip_id = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return The tripId. + */ + java.lang.String getTripId(); + + /** + * + * + *
+   * Required. The ID to use for the trip, which will become the final component
+   * of the trip's resource name.
+   *
+   * This value must be a valid RFC-4122 UUID.
+   * 
+ * + * + * string trip_id = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return The bytes for tripId. + */ + com.google.protobuf.ByteString getTripIdBytes(); + + /** + * + * + *
+   * Required. The trip to create.
+   * 
+ * + * .google.maps.navconnect.v1.Trip trip = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the trip field is set. + */ + boolean hasTrip(); + + /** + * + * + *
+   * Required. The trip to create.
+   * 
+ * + * .google.maps.navconnect.v1.Trip trip = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The trip. + */ + com.google.maps.navconnect.v1.Trip getTrip(); + + /** + * + * + *
+   * Required. The trip to create.
+   * 
+ * + * .google.maps.navconnect.v1.Trip trip = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.maps.navconnect.v1.TripOrBuilder getTripOrBuilder(); +} diff --git a/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/GetTripRequest.java b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/GetTripRequest.java new file mode 100644 index 000000000000..566e59103103 --- /dev/null +++ b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/GetTripRequest.java @@ -0,0 +1,616 @@ +/* + * 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/navconnect/v1/navconnect_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.navconnect.v1; + +/** + * + * + *
+ * Request message for NavConnectService.GetTrip.
+ * 
+ * + * Protobuf type {@code google.maps.navconnect.v1.GetTripRequest} + */ +@com.google.protobuf.Generated +public final class GetTripRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.maps.navconnect.v1.GetTripRequest) + GetTripRequestOrBuilder { + 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= */ "", + "GetTripRequest"); + } + + // Use GetTripRequest.newBuilder() to construct. + private GetTripRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetTripRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_GetTripRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_GetTripRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.navconnect.v1.GetTripRequest.class, + com.google.maps.navconnect.v1.GetTripRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The resource name of the trip to get.
+   * Format: projects/{project}/trips/{trip_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The resource name of the trip to get.
+   * Format: projects/{project}/trips/{trip_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + 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.navconnect.v1.GetTripRequest)) { + return super.equals(obj); + } + com.google.maps.navconnect.v1.GetTripRequest other = + (com.google.maps.navconnect.v1.GetTripRequest) obj; + + if (!getName().equals(other.getName())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.navconnect.v1.GetTripRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.navconnect.v1.GetTripRequest 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.navconnect.v1.GetTripRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.navconnect.v1.GetTripRequest 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.navconnect.v1.GetTripRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.navconnect.v1.GetTripRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.navconnect.v1.GetTripRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.navconnect.v1.GetTripRequest 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.navconnect.v1.GetTripRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.navconnect.v1.GetTripRequest 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.navconnect.v1.GetTripRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.navconnect.v1.GetTripRequest 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.navconnect.v1.GetTripRequest 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 NavConnectService.GetTrip.
+   * 
+ * + * Protobuf type {@code google.maps.navconnect.v1.GetTripRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.navconnect.v1.GetTripRequest) + com.google.maps.navconnect.v1.GetTripRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_GetTripRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_GetTripRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.navconnect.v1.GetTripRequest.class, + com.google.maps.navconnect.v1.GetTripRequest.Builder.class); + } + + // Construct using com.google.maps.navconnect.v1.GetTripRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_GetTripRequest_descriptor; + } + + @java.lang.Override + public com.google.maps.navconnect.v1.GetTripRequest getDefaultInstanceForType() { + return com.google.maps.navconnect.v1.GetTripRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.navconnect.v1.GetTripRequest build() { + com.google.maps.navconnect.v1.GetTripRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.navconnect.v1.GetTripRequest buildPartial() { + com.google.maps.navconnect.v1.GetTripRequest result = + new com.google.maps.navconnect.v1.GetTripRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.navconnect.v1.GetTripRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.navconnect.v1.GetTripRequest) { + return mergeFrom((com.google.maps.navconnect.v1.GetTripRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.navconnect.v1.GetTripRequest other) { + if (other == com.google.maps.navconnect.v1.GetTripRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The resource name of the trip to get.
+     * Format: projects/{project}/trips/{trip_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The resource name of the trip to get.
+     * Format: projects/{project}/trips/{trip_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The resource name of the trip to get.
+     * Format: projects/{project}/trips/{trip_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource name of the trip to get.
+     * Format: projects/{project}/trips/{trip_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource name of the trip to get.
+     * Format: projects/{project}/trips/{trip_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.maps.navconnect.v1.GetTripRequest) + } + + // @@protoc_insertion_point(class_scope:google.maps.navconnect.v1.GetTripRequest) + private static final com.google.maps.navconnect.v1.GetTripRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.navconnect.v1.GetTripRequest(); + } + + public static com.google.maps.navconnect.v1.GetTripRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetTripRequest 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.navconnect.v1.GetTripRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/GetTripRequestOrBuilder.java b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/GetTripRequestOrBuilder.java new file mode 100644 index 000000000000..c855d5042fc4 --- /dev/null +++ b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/GetTripRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * 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/navconnect/v1/navconnect_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.navconnect.v1; + +@com.google.protobuf.Generated +public interface GetTripRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.navconnect.v1.GetTripRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the trip to get.
+   * Format: projects/{project}/trips/{trip_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The resource name of the trip to get.
+   * Format: projects/{project}/trips/{trip_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/Location.java b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/Location.java new file mode 100644 index 000000000000..46ce15a720bd --- /dev/null +++ b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/Location.java @@ -0,0 +1,1290 @@ +/* + * 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/navconnect/v1/navconnect_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.navconnect.v1; + +/** + * + * + *
+ * A location as reported by the mobile application.
+ * 
+ * + * Protobuf type {@code google.maps.navconnect.v1.Location} + */ +@com.google.protobuf.Generated +public final class Location extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.maps.navconnect.v1.Location) + LocationOrBuilder { + 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= */ "", + "Location"); + } + + // Use Location.newBuilder() to construct. + private Location(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Location() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_Location_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_Location_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.navconnect.v1.Location.class, + com.google.maps.navconnect.v1.Location.Builder.class); + } + + private int bitField0_; + public static final int POINT_FIELD_NUMBER = 1; + private com.google.type.LatLng point_; + + /** + * + * + *
+   * Output only. The location lat/lng.
+   * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the point field is set. + */ + @java.lang.Override + public boolean hasPoint() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The location lat/lng.
+   * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The point. + */ + @java.lang.Override + public com.google.type.LatLng getPoint() { + return point_ == null ? com.google.type.LatLng.getDefaultInstance() : point_; + } + + /** + * + * + *
+   * Output only. The location lat/lng.
+   * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getPointOrBuilder() { + return point_ == null ? com.google.type.LatLng.getDefaultInstance() : point_; + } + + public static final int SOURCE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp sourceTime_; + + /** + * + * + *
+   * Output only. The time when the location was sourced as denoted by the
+   * client.
+   * 
+ * + * .google.protobuf.Timestamp source_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the sourceTime field is set. + */ + @java.lang.Override + public boolean hasSourceTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time when the location was sourced as denoted by the
+   * client.
+   * 
+ * + * .google.protobuf.Timestamp source_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The sourceTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getSourceTime() { + return sourceTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : sourceTime_; + } + + /** + * + * + *
+   * Output only. The time when the location was sourced as denoted by the
+   * client.
+   * 
+ * + * .google.protobuf.Timestamp source_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getSourceTimeOrBuilder() { + return sourceTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : sourceTime_; + } + + public static final int SERVER_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp serverTime_; + + /** + * + * + *
+   * Output only. The time at which the server received this location update.
+   * 
+ * + * .google.protobuf.Timestamp server_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the serverTime field is set. + */ + @java.lang.Override + public boolean hasServerTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. The time at which the server received this location update.
+   * 
+ * + * .google.protobuf.Timestamp server_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The serverTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getServerTime() { + return serverTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : serverTime_; + } + + /** + * + * + *
+   * Output only. The time at which the server received this location update.
+   * 
+ * + * .google.protobuf.Timestamp server_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getServerTimeOrBuilder() { + return serverTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : serverTime_; + } + + 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, getPoint()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getSourceTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getServerTime()); + } + 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, getPoint()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSourceTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getServerTime()); + } + 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.navconnect.v1.Location)) { + return super.equals(obj); + } + com.google.maps.navconnect.v1.Location other = (com.google.maps.navconnect.v1.Location) obj; + + if (hasPoint() != other.hasPoint()) return false; + if (hasPoint()) { + if (!getPoint().equals(other.getPoint())) return false; + } + if (hasSourceTime() != other.hasSourceTime()) return false; + if (hasSourceTime()) { + if (!getSourceTime().equals(other.getSourceTime())) return false; + } + if (hasServerTime() != other.hasServerTime()) return false; + if (hasServerTime()) { + if (!getServerTime().equals(other.getServerTime())) 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 (hasPoint()) { + hash = (37 * hash) + POINT_FIELD_NUMBER; + hash = (53 * hash) + getPoint().hashCode(); + } + if (hasSourceTime()) { + hash = (37 * hash) + SOURCE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getSourceTime().hashCode(); + } + if (hasServerTime()) { + hash = (37 * hash) + SERVER_TIME_FIELD_NUMBER; + hash = (53 * hash) + getServerTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.navconnect.v1.Location parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.navconnect.v1.Location parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.navconnect.v1.Location parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.navconnect.v1.Location parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.navconnect.v1.Location parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.navconnect.v1.Location parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.navconnect.v1.Location parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.navconnect.v1.Location 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.navconnect.v1.Location parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.navconnect.v1.Location 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.navconnect.v1.Location parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.navconnect.v1.Location 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.navconnect.v1.Location prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A location as reported by the mobile application.
+   * 
+ * + * Protobuf type {@code google.maps.navconnect.v1.Location} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.navconnect.v1.Location) + com.google.maps.navconnect.v1.LocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_Location_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_Location_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.navconnect.v1.Location.class, + com.google.maps.navconnect.v1.Location.Builder.class); + } + + // Construct using com.google.maps.navconnect.v1.Location.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPointFieldBuilder(); + internalGetSourceTimeFieldBuilder(); + internalGetServerTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + point_ = null; + if (pointBuilder_ != null) { + pointBuilder_.dispose(); + pointBuilder_ = null; + } + sourceTime_ = null; + if (sourceTimeBuilder_ != null) { + sourceTimeBuilder_.dispose(); + sourceTimeBuilder_ = null; + } + serverTime_ = null; + if (serverTimeBuilder_ != null) { + serverTimeBuilder_.dispose(); + serverTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_Location_descriptor; + } + + @java.lang.Override + public com.google.maps.navconnect.v1.Location getDefaultInstanceForType() { + return com.google.maps.navconnect.v1.Location.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.navconnect.v1.Location build() { + com.google.maps.navconnect.v1.Location result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.navconnect.v1.Location buildPartial() { + com.google.maps.navconnect.v1.Location result = + new com.google.maps.navconnect.v1.Location(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.navconnect.v1.Location result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.point_ = pointBuilder_ == null ? point_ : pointBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.sourceTime_ = sourceTimeBuilder_ == null ? sourceTime_ : sourceTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.serverTime_ = serverTimeBuilder_ == null ? serverTime_ : serverTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.navconnect.v1.Location) { + return mergeFrom((com.google.maps.navconnect.v1.Location) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.navconnect.v1.Location other) { + if (other == com.google.maps.navconnect.v1.Location.getDefaultInstance()) return this; + if (other.hasPoint()) { + mergePoint(other.getPoint()); + } + if (other.hasSourceTime()) { + mergeSourceTime(other.getSourceTime()); + } + if (other.hasServerTime()) { + mergeServerTime(other.getServerTime()); + } + 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(internalGetPointFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetSourceTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetServerTimeFieldBuilder().getBuilder(), extensionRegistry); + 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 com.google.type.LatLng point_; + private com.google.protobuf.SingleFieldBuilder< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + pointBuilder_; + + /** + * + * + *
+     * Output only. The location lat/lng.
+     * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the point field is set. + */ + public boolean hasPoint() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Output only. The location lat/lng.
+     * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The point. + */ + public com.google.type.LatLng getPoint() { + if (pointBuilder_ == null) { + return point_ == null ? com.google.type.LatLng.getDefaultInstance() : point_; + } else { + return pointBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The location lat/lng.
+     * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setPoint(com.google.type.LatLng value) { + if (pointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + point_ = value; + } else { + pointBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The location lat/lng.
+     * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setPoint(com.google.type.LatLng.Builder builderForValue) { + if (pointBuilder_ == null) { + point_ = builderForValue.build(); + } else { + pointBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The location lat/lng.
+     * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergePoint(com.google.type.LatLng value) { + if (pointBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && point_ != null + && point_ != com.google.type.LatLng.getDefaultInstance()) { + getPointBuilder().mergeFrom(value); + } else { + point_ = value; + } + } else { + pointBuilder_.mergeFrom(value); + } + if (point_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The location lat/lng.
+     * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearPoint() { + bitField0_ = (bitField0_ & ~0x00000001); + point_ = null; + if (pointBuilder_ != null) { + pointBuilder_.dispose(); + pointBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The location lat/lng.
+     * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.type.LatLng.Builder getPointBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetPointFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The location lat/lng.
+     * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.type.LatLngOrBuilder getPointOrBuilder() { + if (pointBuilder_ != null) { + return pointBuilder_.getMessageOrBuilder(); + } else { + return point_ == null ? com.google.type.LatLng.getDefaultInstance() : point_; + } + } + + /** + * + * + *
+     * Output only. The location lat/lng.
+     * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + internalGetPointFieldBuilder() { + if (pointBuilder_ == null) { + pointBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.LatLng, + com.google.type.LatLng.Builder, + com.google.type.LatLngOrBuilder>(getPoint(), getParentForChildren(), isClean()); + point_ = null; + } + return pointBuilder_; + } + + private com.google.protobuf.Timestamp sourceTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + sourceTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when the location was sourced as denoted by the
+     * client.
+     * 
+ * + * + * .google.protobuf.Timestamp source_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the sourceTime field is set. + */ + public boolean hasSourceTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. The time when the location was sourced as denoted by the
+     * client.
+     * 
+ * + * + * .google.protobuf.Timestamp source_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The sourceTime. + */ + public com.google.protobuf.Timestamp getSourceTime() { + if (sourceTimeBuilder_ == null) { + return sourceTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : sourceTime_; + } else { + return sourceTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time when the location was sourced as denoted by the
+     * client.
+     * 
+ * + * + * .google.protobuf.Timestamp source_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSourceTime(com.google.protobuf.Timestamp value) { + if (sourceTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sourceTime_ = value; + } else { + sourceTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the location was sourced as denoted by the
+     * client.
+     * 
+ * + * + * .google.protobuf.Timestamp source_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSourceTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (sourceTimeBuilder_ == null) { + sourceTime_ = builderForValue.build(); + } else { + sourceTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the location was sourced as denoted by the
+     * client.
+     * 
+ * + * + * .google.protobuf.Timestamp source_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeSourceTime(com.google.protobuf.Timestamp value) { + if (sourceTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && sourceTime_ != null + && sourceTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getSourceTimeBuilder().mergeFrom(value); + } else { + sourceTime_ = value; + } + } else { + sourceTimeBuilder_.mergeFrom(value); + } + if (sourceTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when the location was sourced as denoted by the
+     * client.
+     * 
+ * + * + * .google.protobuf.Timestamp source_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearSourceTime() { + bitField0_ = (bitField0_ & ~0x00000002); + sourceTime_ = null; + if (sourceTimeBuilder_ != null) { + sourceTimeBuilder_.dispose(); + sourceTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the location was sourced as denoted by the
+     * client.
+     * 
+ * + * + * .google.protobuf.Timestamp source_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getSourceTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetSourceTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when the location was sourced as denoted by the
+     * client.
+     * 
+ * + * + * .google.protobuf.Timestamp source_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getSourceTimeOrBuilder() { + if (sourceTimeBuilder_ != null) { + return sourceTimeBuilder_.getMessageOrBuilder(); + } else { + return sourceTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : sourceTime_; + } + } + + /** + * + * + *
+     * Output only. The time when the location was sourced as denoted by the
+     * client.
+     * 
+ * + * + * .google.protobuf.Timestamp source_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetSourceTimeFieldBuilder() { + if (sourceTimeBuilder_ == null) { + sourceTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getSourceTime(), getParentForChildren(), isClean()); + sourceTime_ = null; + } + return sourceTimeBuilder_; + } + + private com.google.protobuf.Timestamp serverTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + serverTimeBuilder_; + + /** + * + * + *
+     * Output only. The time at which the server received this location update.
+     * 
+ * + * + * .google.protobuf.Timestamp server_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the serverTime field is set. + */ + public boolean hasServerTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. The time at which the server received this location update.
+     * 
+ * + * + * .google.protobuf.Timestamp server_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The serverTime. + */ + public com.google.protobuf.Timestamp getServerTime() { + if (serverTimeBuilder_ == null) { + return serverTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : serverTime_; + } else { + return serverTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time at which the server received this location update.
+     * 
+ * + * + * .google.protobuf.Timestamp server_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setServerTime(com.google.protobuf.Timestamp value) { + if (serverTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serverTime_ = value; + } else { + serverTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time at which the server received this location update.
+     * 
+ * + * + * .google.protobuf.Timestamp server_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setServerTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (serverTimeBuilder_ == null) { + serverTime_ = builderForValue.build(); + } else { + serverTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time at which the server received this location update.
+     * 
+ * + * + * .google.protobuf.Timestamp server_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeServerTime(com.google.protobuf.Timestamp value) { + if (serverTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && serverTime_ != null + && serverTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getServerTimeBuilder().mergeFrom(value); + } else { + serverTime_ = value; + } + } else { + serverTimeBuilder_.mergeFrom(value); + } + if (serverTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time at which the server received this location update.
+     * 
+ * + * + * .google.protobuf.Timestamp server_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearServerTime() { + bitField0_ = (bitField0_ & ~0x00000004); + serverTime_ = null; + if (serverTimeBuilder_ != null) { + serverTimeBuilder_.dispose(); + serverTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time at which the server received this location update.
+     * 
+ * + * + * .google.protobuf.Timestamp server_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getServerTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetServerTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time at which the server received this location update.
+     * 
+ * + * + * .google.protobuf.Timestamp server_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getServerTimeOrBuilder() { + if (serverTimeBuilder_ != null) { + return serverTimeBuilder_.getMessageOrBuilder(); + } else { + return serverTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : serverTime_; + } + } + + /** + * + * + *
+     * Output only. The time at which the server received this location update.
+     * 
+ * + * + * .google.protobuf.Timestamp server_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetServerTimeFieldBuilder() { + if (serverTimeBuilder_ == null) { + serverTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getServerTime(), getParentForChildren(), isClean()); + serverTime_ = null; + } + return serverTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.maps.navconnect.v1.Location) + } + + // @@protoc_insertion_point(class_scope:google.maps.navconnect.v1.Location) + private static final com.google.maps.navconnect.v1.Location DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.navconnect.v1.Location(); + } + + public static com.google.maps.navconnect.v1.Location getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Location parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.maps.navconnect.v1.Location getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/LocationOrBuilder.java b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/LocationOrBuilder.java new file mode 100644 index 000000000000..e208726406eb --- /dev/null +++ b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/LocationOrBuilder.java @@ -0,0 +1,148 @@ +/* + * 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/navconnect/v1/navconnect_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.navconnect.v1; + +@com.google.protobuf.Generated +public interface LocationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.navconnect.v1.Location) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The location lat/lng.
+   * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the point field is set. + */ + boolean hasPoint(); + + /** + * + * + *
+   * Output only. The location lat/lng.
+   * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The point. + */ + com.google.type.LatLng getPoint(); + + /** + * + * + *
+   * Output only. The location lat/lng.
+   * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.type.LatLngOrBuilder getPointOrBuilder(); + + /** + * + * + *
+   * Output only. The time when the location was sourced as denoted by the
+   * client.
+   * 
+ * + * .google.protobuf.Timestamp source_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the sourceTime field is set. + */ + boolean hasSourceTime(); + + /** + * + * + *
+   * Output only. The time when the location was sourced as denoted by the
+   * client.
+   * 
+ * + * .google.protobuf.Timestamp source_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The sourceTime. + */ + com.google.protobuf.Timestamp getSourceTime(); + + /** + * + * + *
+   * Output only. The time when the location was sourced as denoted by the
+   * client.
+   * 
+ * + * .google.protobuf.Timestamp source_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getSourceTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time at which the server received this location update.
+   * 
+ * + * .google.protobuf.Timestamp server_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the serverTime field is set. + */ + boolean hasServerTime(); + + /** + * + * + *
+   * Output only. The time at which the server received this location update.
+   * 
+ * + * .google.protobuf.Timestamp server_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The serverTime. + */ + com.google.protobuf.Timestamp getServerTime(); + + /** + * + * + *
+   * Output only. The time at which the server received this location update.
+   * 
+ * + * .google.protobuf.Timestamp server_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getServerTimeOrBuilder(); +} diff --git a/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/NavConnectServiceProto.java b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/NavConnectServiceProto.java new file mode 100644 index 000000000000..9c60385ece6c --- /dev/null +++ b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/NavConnectServiceProto.java @@ -0,0 +1,283 @@ +/* + * 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/navconnect/v1/navconnect_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.navconnect.v1; + +@com.google.protobuf.Generated +public final class NavConnectServiceProto extends com.google.protobuf.GeneratedFile { + private NavConnectServiceProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "NavConnectServiceProto"); + } + + 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_navconnect_v1_Trip_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_maps_navconnect_v1_Trip_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_navconnect_v1_TripConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_maps_navconnect_v1_TripConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_navconnect_v1_AuthToken_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_maps_navconnect_v1_AuthToken_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_navconnect_v1_TripExecution_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_maps_navconnect_v1_TripExecution_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_navconnect_v1_Stop_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_maps_navconnect_v1_Stop_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_navconnect_v1_Location_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_maps_navconnect_v1_Location_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_navconnect_v1_CreateTripRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_maps_navconnect_v1_CreateTripRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_navconnect_v1_GetTripRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_maps_navconnect_v1_GetTripRequest_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" + + "2google/maps/navconnect/v1/navconnect_s" + + "ervice.proto\022\031google.maps.navconnect.v1\032" + + "\034google/api/annotations.proto\032\027google/ap" + + "i/client.proto\032\037google/api/field_behavio" + + "r.proto\032\033google/api/field_info.proto\032\031go" + + "ogle/api/resource.proto\032\036google/protobuf/duration.proto\032" + + " google/protobuf/field_m" + + "ask.proto\032\037google/protobuf/timestamp.proto\032\030google/type/latlng.proto\"\377\004\n" + + "\004Trip\022\024\n" + + "\004name\030\001 \001(\tB\006\340A\003\340A\010\022:\n" + + "\006config\030\007 \001(\0132%.go" + + "ogle.maps.navconnect.v1.TripConfigB\003\340A\005\022\036\n" + + "\016android_app_id\030\010 \001(\tB\006\340A\004\340A\005\022\032\n\n" + + "ios_app_id\030\t \001(\tB\006\340A\004\340A\005\022=\n\n" + + "auth_token\030\002 \001(\0132" + + "$.google.maps.navconnect.v1.AuthTokenB\003\340A\003\0229\n" + + "\005state\030\003" + + " \001(\0162%.google.maps.navconnect.v1.Trip.StateB\003\340A\003\022@\n" + + "\texecution\030\004 \001(\013" + + "2(.google.maps.navconnect.v1.TripExecutionB\003\340A\003\0224\n" + + "\013create_time\030\005 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\006 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\"n\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\007\n" + + "\003NEW\020\001\022\013\n" + + "\007ENROUTE\020\002\022\013\n" + + "\007ARRIVED\020\003\022\r\n" + + "\tSUSPENDED\020\004\022\n\n" + + "\006FAILED\020\005\022\020\n" + + "\014CLIENT_ERROR\020\006:Q\352AN\n" + + "\036navcon" + + "nect.googleapis.com/Trip\022\037projects/{project}/trips/{trip}*\005trips2\004trip\"\220\001\n\n" + + "TripConfig\022*\n" + + "\035enable_high_frequency_updates\030\001 \001(\010B\003\340A\001\022\032\n\r" + + "enable_pubsub\030\002 \001(\010B\003\340A\001\022:\n" + + "\021pubsub_field_mask\030\003" + + " \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\"U\n" + + "\tAuthToken\022\022\n" + + "\005token\030\001 \001(\tB\003\340A\003\0224\n" + + "\013expire_time\030\002" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\"\212\004\n\r" + + "TripExecution\0228\n" + + "\006origin\030\001 \001(\0132#.google.maps.navconnect.v1.LocationB\003\340A\003\0229\n" + + "\013destination\030\002 \001(" + + "\0132\037.google.maps.navconnect.v1.StopB\003\340A\003\022:\n" + + "\010location\030\003" + + " \001(\0132#.google.maps.navconnect.v1.LocationB\003\340A\003\0229\n" + + "\021traveled_duration\030\004" + + " \001(\0132\031.google.protobuf.DurationB\003\340A\003\022:\n" + + "\022remaining_duration\030\005" + + " \001(\0132\031.google.protobuf.DurationB\003\340A\003\022*\n" + + "\030traveled_distance_meters\030\006 \001(\005B\003\340A\003H\000\210\001\001\022+\n" + + "\031remaining_distance_meters\030\007 \001(\005B\003\340A\003H\001\210\001\001\022%\n" + + "\023stop_added_in_route\030\010 \001(\010B\003\340A\003H\002\210\001\001B\033\n" + + "\031_traveled_distance_metersB\034\n" + + "\032_remaining_distance_metersB\026\n" + + "\024_stop_added_in_route\"/\n" + + "\004Stop\022\'\n" + + "\005point\030\001 \001(\0132\023.google.type.LatLngB\003\340A\002\"\237\001\n" + + "\010Location\022\'\n" + + "\005point\030\001 \001(\0132\023.google.type.LatLngB\003\340A\003\0224\n" + + "\013source_time\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013server_time\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\"z\n" + + "\021CreateTripRequest\022\023\n" + + "\006parent\030\001 \001(\tB\003\340A\002\022\034\n" + + "\007trip_id\030\002 \001(\tB\013\340A\002\342\214\317\327\010\002\010\001\0222\n" + + "\004trip\030\003 \001(\0132\037.google.maps.navconnect.v1.TripB\003\340A\002\"F\n" + + "\016GetTripRequest\0224\n" + + "\004name\030\001 \001(\tB&\340A\002\372A \n" + + "\036navconnect.googleapis.com/Trip2\220\003\n" + + "\021NavConnectService\022\236\001\n\n" + + "CreateTrip\022,.google.maps.navconnect.v1.CreateTripRequest\032" + + "\037.google.maps.navconnect.v1.Trip\"A\332A\023par" + + "ent,trip,trip_id\202\323\344\223\002%\"\035/v1/{parent=projects/*}/trips:\004trip\022\203\001\n" + + "\007GetTrip\022).google.maps.navconnect.v1.GetTripRequest\032\037.goo" + + "gle.maps.navconnect.v1.Trip\",\332A\004name\202\323\344\223\002\037\022\035/v1/{name=projects/*/trips/*}\032T\312A" + + " navigationconnect.googleapis.com\322A.https:/" + + "/www.googleapis.com/auth/cloud-platformB~\n" + + "\035com.google.maps.navconnect.v1B\026NavCon" + + "nectServiceProtoP\001ZCcloud.google.com/go/maps/navconnect/apiv1/navconnectpb;navco" + + "nnectpbb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.FieldInfoProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.type.LatLngProto.getDescriptor(), + }); + internal_static_google_maps_navconnect_v1_Trip_descriptor = getDescriptor().getMessageType(0); + internal_static_google_maps_navconnect_v1_Trip_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_maps_navconnect_v1_Trip_descriptor, + new java.lang.String[] { + "Name", + "Config", + "AndroidAppId", + "IosAppId", + "AuthToken", + "State", + "Execution", + "CreateTime", + "UpdateTime", + }); + internal_static_google_maps_navconnect_v1_TripConfig_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_maps_navconnect_v1_TripConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_maps_navconnect_v1_TripConfig_descriptor, + new java.lang.String[] { + "EnableHighFrequencyUpdates", "EnablePubsub", "PubsubFieldMask", + }); + internal_static_google_maps_navconnect_v1_AuthToken_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_maps_navconnect_v1_AuthToken_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_maps_navconnect_v1_AuthToken_descriptor, + new java.lang.String[] { + "Token", "ExpireTime", + }); + internal_static_google_maps_navconnect_v1_TripExecution_descriptor = + getDescriptor().getMessageType(3); + internal_static_google_maps_navconnect_v1_TripExecution_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_maps_navconnect_v1_TripExecution_descriptor, + new java.lang.String[] { + "Origin", + "Destination", + "Location", + "TraveledDuration", + "RemainingDuration", + "TraveledDistanceMeters", + "RemainingDistanceMeters", + "StopAddedInRoute", + }); + internal_static_google_maps_navconnect_v1_Stop_descriptor = getDescriptor().getMessageType(4); + internal_static_google_maps_navconnect_v1_Stop_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_maps_navconnect_v1_Stop_descriptor, + new java.lang.String[] { + "Point", + }); + internal_static_google_maps_navconnect_v1_Location_descriptor = + getDescriptor().getMessageType(5); + internal_static_google_maps_navconnect_v1_Location_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_maps_navconnect_v1_Location_descriptor, + new java.lang.String[] { + "Point", "SourceTime", "ServerTime", + }); + internal_static_google_maps_navconnect_v1_CreateTripRequest_descriptor = + getDescriptor().getMessageType(6); + internal_static_google_maps_navconnect_v1_CreateTripRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_maps_navconnect_v1_CreateTripRequest_descriptor, + new java.lang.String[] { + "Parent", "TripId", "Trip", + }); + internal_static_google_maps_navconnect_v1_GetTripRequest_descriptor = + getDescriptor().getMessageType(7); + internal_static_google_maps_navconnect_v1_GetTripRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_maps_navconnect_v1_GetTripRequest_descriptor, + new java.lang.String[] { + "Name", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.FieldInfoProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.type.LatLngProto.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.FieldInfoProto.fieldInfo); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/Stop.java b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/Stop.java new file mode 100644 index 000000000000..353545e71e78 --- /dev/null +++ b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/Stop.java @@ -0,0 +1,680 @@ +/* + * 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/navconnect/v1/navconnect_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.navconnect.v1; + +/** + * + * + *
+ * A stop in the trip where some task is to be performed.
+ * 
+ * + * Protobuf type {@code google.maps.navconnect.v1.Stop} + */ +@com.google.protobuf.Generated +public final class Stop extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.maps.navconnect.v1.Stop) + StopOrBuilder { + 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= */ "", + "Stop"); + } + + // Use Stop.newBuilder() to construct. + private Stop(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Stop() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_Stop_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_Stop_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.navconnect.v1.Stop.class, + com.google.maps.navconnect.v1.Stop.Builder.class); + } + + private int bitField0_; + public static final int POINT_FIELD_NUMBER = 1; + private com.google.type.LatLng point_; + + /** + * + * + *
+   * Required. The location of the stop as a lat/lng.
+   * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the point field is set. + */ + @java.lang.Override + public boolean hasPoint() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The location of the stop as a lat/lng.
+   * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The point. + */ + @java.lang.Override + public com.google.type.LatLng getPoint() { + return point_ == null ? com.google.type.LatLng.getDefaultInstance() : point_; + } + + /** + * + * + *
+   * Required. The location of the stop as a lat/lng.
+   * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getPointOrBuilder() { + return point_ == null ? com.google.type.LatLng.getDefaultInstance() : point_; + } + + 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, getPoint()); + } + 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, getPoint()); + } + 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.navconnect.v1.Stop)) { + return super.equals(obj); + } + com.google.maps.navconnect.v1.Stop other = (com.google.maps.navconnect.v1.Stop) obj; + + if (hasPoint() != other.hasPoint()) return false; + if (hasPoint()) { + if (!getPoint().equals(other.getPoint())) 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 (hasPoint()) { + hash = (37 * hash) + POINT_FIELD_NUMBER; + hash = (53 * hash) + getPoint().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.navconnect.v1.Stop parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.navconnect.v1.Stop 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.navconnect.v1.Stop parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.navconnect.v1.Stop 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.navconnect.v1.Stop parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.navconnect.v1.Stop parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.navconnect.v1.Stop parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.navconnect.v1.Stop 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.navconnect.v1.Stop parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.navconnect.v1.Stop 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.navconnect.v1.Stop parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.navconnect.v1.Stop 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.navconnect.v1.Stop 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 stop in the trip where some task is to be performed.
+   * 
+ * + * Protobuf type {@code google.maps.navconnect.v1.Stop} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.navconnect.v1.Stop) + com.google.maps.navconnect.v1.StopOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_Stop_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_Stop_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.navconnect.v1.Stop.class, + com.google.maps.navconnect.v1.Stop.Builder.class); + } + + // Construct using com.google.maps.navconnect.v1.Stop.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPointFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + point_ = null; + if (pointBuilder_ != null) { + pointBuilder_.dispose(); + pointBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_Stop_descriptor; + } + + @java.lang.Override + public com.google.maps.navconnect.v1.Stop getDefaultInstanceForType() { + return com.google.maps.navconnect.v1.Stop.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.navconnect.v1.Stop build() { + com.google.maps.navconnect.v1.Stop result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.navconnect.v1.Stop buildPartial() { + com.google.maps.navconnect.v1.Stop result = new com.google.maps.navconnect.v1.Stop(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.navconnect.v1.Stop result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.point_ = pointBuilder_ == null ? point_ : pointBuilder_.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.navconnect.v1.Stop) { + return mergeFrom((com.google.maps.navconnect.v1.Stop) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.navconnect.v1.Stop other) { + if (other == com.google.maps.navconnect.v1.Stop.getDefaultInstance()) return this; + if (other.hasPoint()) { + mergePoint(other.getPoint()); + } + 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(internalGetPointFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.type.LatLng point_; + private com.google.protobuf.SingleFieldBuilder< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + pointBuilder_; + + /** + * + * + *
+     * Required. The location of the stop as a lat/lng.
+     * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the point field is set. + */ + public boolean hasPoint() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The location of the stop as a lat/lng.
+     * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The point. + */ + public com.google.type.LatLng getPoint() { + if (pointBuilder_ == null) { + return point_ == null ? com.google.type.LatLng.getDefaultInstance() : point_; + } else { + return pointBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The location of the stop as a lat/lng.
+     * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setPoint(com.google.type.LatLng value) { + if (pointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + point_ = value; + } else { + pointBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The location of the stop as a lat/lng.
+     * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setPoint(com.google.type.LatLng.Builder builderForValue) { + if (pointBuilder_ == null) { + point_ = builderForValue.build(); + } else { + pointBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The location of the stop as a lat/lng.
+     * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergePoint(com.google.type.LatLng value) { + if (pointBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && point_ != null + && point_ != com.google.type.LatLng.getDefaultInstance()) { + getPointBuilder().mergeFrom(value); + } else { + point_ = value; + } + } else { + pointBuilder_.mergeFrom(value); + } + if (point_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The location of the stop as a lat/lng.
+     * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearPoint() { + bitField0_ = (bitField0_ & ~0x00000001); + point_ = null; + if (pointBuilder_ != null) { + pointBuilder_.dispose(); + pointBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The location of the stop as a lat/lng.
+     * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.type.LatLng.Builder getPointBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetPointFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The location of the stop as a lat/lng.
+     * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.type.LatLngOrBuilder getPointOrBuilder() { + if (pointBuilder_ != null) { + return pointBuilder_.getMessageOrBuilder(); + } else { + return point_ == null ? com.google.type.LatLng.getDefaultInstance() : point_; + } + } + + /** + * + * + *
+     * Required. The location of the stop as a lat/lng.
+     * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + internalGetPointFieldBuilder() { + if (pointBuilder_ == null) { + pointBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.LatLng, + com.google.type.LatLng.Builder, + com.google.type.LatLngOrBuilder>(getPoint(), getParentForChildren(), isClean()); + point_ = null; + } + return pointBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.maps.navconnect.v1.Stop) + } + + // @@protoc_insertion_point(class_scope:google.maps.navconnect.v1.Stop) + private static final com.google.maps.navconnect.v1.Stop DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.navconnect.v1.Stop(); + } + + public static com.google.maps.navconnect.v1.Stop getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Stop 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.navconnect.v1.Stop getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/StopOrBuilder.java b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/StopOrBuilder.java new file mode 100644 index 000000000000..ced603e5f3ab --- /dev/null +++ b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/StopOrBuilder.java @@ -0,0 +1,65 @@ +/* + * 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/navconnect/v1/navconnect_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.navconnect.v1; + +@com.google.protobuf.Generated +public interface StopOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.navconnect.v1.Stop) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The location of the stop as a lat/lng.
+   * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the point field is set. + */ + boolean hasPoint(); + + /** + * + * + *
+   * Required. The location of the stop as a lat/lng.
+   * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The point. + */ + com.google.type.LatLng getPoint(); + + /** + * + * + *
+   * Required. The location of the stop as a lat/lng.
+   * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.type.LatLngOrBuilder getPointOrBuilder(); +} diff --git a/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/Trip.java b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/Trip.java new file mode 100644 index 000000000000..f05a2608c78e --- /dev/null +++ b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/Trip.java @@ -0,0 +1,3035 @@ +/* + * 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/navconnect/v1/navconnect_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.navconnect.v1; + +/** + * + * + *
+ * A trip.
+ * 
+ * + * Protobuf type {@code google.maps.navconnect.v1.Trip} + */ +@com.google.protobuf.Generated +public final class Trip extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.maps.navconnect.v1.Trip) + TripOrBuilder { + 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= */ "", + "Trip"); + } + + // Use Trip.newBuilder() to construct. + private Trip(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Trip() { + name_ = ""; + androidAppId_ = ""; + iosAppId_ = ""; + state_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_Trip_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_Trip_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.navconnect.v1.Trip.class, + com.google.maps.navconnect.v1.Trip.Builder.class); + } + + /** + * + * + *
+   * All possible trip states.
+   * 
+ * + * Protobuf enum {@code google.maps.navconnect.v1.Trip.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The trip state is unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The trip was created but has not yet started.
+     * 
+ * + * NEW = 1; + */ + NEW(1), + /** + * + * + *
+     * The transporter is enroute to the destination.
+     * 
+ * + * ENROUTE = 2; + */ + ENROUTE(2), + /** + * + * + *
+     * The transporter arrived at the destination.
+     * 
+ * + * ARRIVED = 3; + */ + ARRIVED(3), + /** + * + * + *
+     * The trip was suspended.
+     * 
+ * + * SUSPENDED = 4; + */ + SUSPENDED(4), + /** + * + * + *
+     * The trip failed to complete successfully.
+     * 
+ * + * FAILED = 5; + */ + FAILED(5), + /** + * + * + *
+     * The trip failed due to a client error.
+     * 
+ * + * CLIENT_ERROR = 6; + */ + CLIENT_ERROR(6), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "State"); + } + + /** + * + * + *
+     * The trip state is unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The trip was created but has not yet started.
+     * 
+ * + * NEW = 1; + */ + public static final int NEW_VALUE = 1; + + /** + * + * + *
+     * The transporter is enroute to the destination.
+     * 
+ * + * ENROUTE = 2; + */ + public static final int ENROUTE_VALUE = 2; + + /** + * + * + *
+     * The transporter arrived at the destination.
+     * 
+ * + * ARRIVED = 3; + */ + public static final int ARRIVED_VALUE = 3; + + /** + * + * + *
+     * The trip was suspended.
+     * 
+ * + * SUSPENDED = 4; + */ + public static final int SUSPENDED_VALUE = 4; + + /** + * + * + *
+     * The trip failed to complete successfully.
+     * 
+ * + * FAILED = 5; + */ + public static final int FAILED_VALUE = 5; + + /** + * + * + *
+     * The trip failed due to a client error.
+     * 
+ * + * CLIENT_ERROR = 6; + */ + public static final int CLIENT_ERROR_VALUE = 6; + + 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 State 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 State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return NEW; + case 2: + return ENROUTE; + case 3: + return ARRIVED; + case 4: + return SUSPENDED; + case 5: + return FAILED; + case 6: + return CLIENT_ERROR; + 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 State findValueByNumber(int number) { + return State.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.navconnect.v1.Trip.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State 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 State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.maps.navconnect.v1.Trip.State) + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Output only. Identifier. The resource name of the trip.
+   * Format: projects/{project_number}/trips/{trip_id}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Identifier. The resource name of the trip.
+   * Format: projects/{project_number}/trips/{trip_id}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIG_FIELD_NUMBER = 7; + private com.google.maps.navconnect.v1.TripConfig config_; + + /** + * + * + *
+   * Immutable. The configuration for the trip.
+   * 
+ * + * + * .google.maps.navconnect.v1.TripConfig config = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the config field is set. + */ + @java.lang.Override + public boolean hasConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Immutable. The configuration for the trip.
+   * 
+ * + * + * .google.maps.navconnect.v1.TripConfig config = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The config. + */ + @java.lang.Override + public com.google.maps.navconnect.v1.TripConfig getConfig() { + return config_ == null + ? com.google.maps.navconnect.v1.TripConfig.getDefaultInstance() + : config_; + } + + /** + * + * + *
+   * Immutable. The configuration for the trip.
+   * 
+ * + * + * .google.maps.navconnect.v1.TripConfig config = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.maps.navconnect.v1.TripConfigOrBuilder getConfigOrBuilder() { + return config_ == null + ? com.google.maps.navconnect.v1.TripConfig.getDefaultInstance() + : config_; + } + + public static final int ANDROID_APP_ID_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object androidAppId_ = ""; + + /** + * + * + *
+   * Input only. Immutable. The Android application ID of the mobile application
+   * that will use the trip. At least one of `android_app_id` or `ios_app_id`
+   * must be set.
+   * 
+ * + * + * string android_app_id = 8 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The androidAppId. + */ + @java.lang.Override + public java.lang.String getAndroidAppId() { + java.lang.Object ref = androidAppId_; + 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(); + androidAppId_ = s; + return s; + } + } + + /** + * + * + *
+   * Input only. Immutable. The Android application ID of the mobile application
+   * that will use the trip. At least one of `android_app_id` or `ios_app_id`
+   * must be set.
+   * 
+ * + * + * string android_app_id = 8 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for androidAppId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAndroidAppIdBytes() { + java.lang.Object ref = androidAppId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + androidAppId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IOS_APP_ID_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private volatile java.lang.Object iosAppId_ = ""; + + /** + * + * + *
+   * Input only. Immutable. The iOS bundle ID of the mobile application that
+   * will use the trip. At least one of `android_app_id` or `ios_app_id` must be
+   * set.
+   * 
+ * + * + * string ios_app_id = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The iosAppId. + */ + @java.lang.Override + public java.lang.String getIosAppId() { + java.lang.Object ref = iosAppId_; + 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(); + iosAppId_ = s; + return s; + } + } + + /** + * + * + *
+   * Input only. Immutable. The iOS bundle ID of the mobile application that
+   * will use the trip. At least one of `android_app_id` or `ios_app_id` must be
+   * set.
+   * 
+ * + * + * string ios_app_id = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for iosAppId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIosAppIdBytes() { + java.lang.Object ref = iosAppId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + iosAppId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUTH_TOKEN_FIELD_NUMBER = 2; + private com.google.maps.navconnect.v1.AuthToken authToken_; + + /** + * + * + *
+   * Output only. An opaque token that authorizes access to begin a NavConnect
+   * trip in Google Maps or Waze and grants these applications access to update
+   * the trip. Only returned by `CreateTrip`.
+   * 
+ * + * + * .google.maps.navconnect.v1.AuthToken auth_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the authToken field is set. + */ + @java.lang.Override + public boolean hasAuthToken() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. An opaque token that authorizes access to begin a NavConnect
+   * trip in Google Maps or Waze and grants these applications access to update
+   * the trip. Only returned by `CreateTrip`.
+   * 
+ * + * + * .google.maps.navconnect.v1.AuthToken auth_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The authToken. + */ + @java.lang.Override + public com.google.maps.navconnect.v1.AuthToken getAuthToken() { + return authToken_ == null + ? com.google.maps.navconnect.v1.AuthToken.getDefaultInstance() + : authToken_; + } + + /** + * + * + *
+   * Output only. An opaque token that authorizes access to begin a NavConnect
+   * trip in Google Maps or Waze and grants these applications access to update
+   * the trip. Only returned by `CreateTrip`.
+   * 
+ * + * + * .google.maps.navconnect.v1.AuthToken auth_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.maps.navconnect.v1.AuthTokenOrBuilder getAuthTokenOrBuilder() { + return authToken_ == null + ? com.google.maps.navconnect.v1.AuthToken.getDefaultInstance() + : authToken_; + } + + public static final int STATE_FIELD_NUMBER = 3; + private int state_ = 0; + + /** + * + * + *
+   * Output only. The Trip state.
+   * 
+ * + * + * .google.maps.navconnect.v1.Trip.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+   * Output only. The Trip state.
+   * 
+ * + * + * .google.maps.navconnect.v1.Trip.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.maps.navconnect.v1.Trip.State getState() { + com.google.maps.navconnect.v1.Trip.State result = + com.google.maps.navconnect.v1.Trip.State.forNumber(state_); + return result == null ? com.google.maps.navconnect.v1.Trip.State.UNRECOGNIZED : result; + } + + public static final int EXECUTION_FIELD_NUMBER = 4; + private com.google.maps.navconnect.v1.TripExecution execution_; + + /** + * + * + *
+   * Output only. The latest data about the execution of the trip. This may not
+   * be set if the trip is in an error state.
+   * 
+ * + * + * .google.maps.navconnect.v1.TripExecution execution = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the execution field is set. + */ + @java.lang.Override + public boolean hasExecution() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. The latest data about the execution of the trip. This may not
+   * be set if the trip is in an error state.
+   * 
+ * + * + * .google.maps.navconnect.v1.TripExecution execution = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The execution. + */ + @java.lang.Override + public com.google.maps.navconnect.v1.TripExecution getExecution() { + return execution_ == null + ? com.google.maps.navconnect.v1.TripExecution.getDefaultInstance() + : execution_; + } + + /** + * + * + *
+   * Output only. The latest data about the execution of the trip. This may not
+   * be set if the trip is in an error state.
+   * 
+ * + * + * .google.maps.navconnect.v1.TripExecution execution = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.maps.navconnect.v1.TripExecutionOrBuilder getExecutionOrBuilder() { + return execution_ == null + ? com.google.maps.navconnect.v1.TripExecution.getDefaultInstance() + : execution_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. Time according to the server when the trip was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Output only. Time according to the server when the trip was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. Time according to the server when the trip was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. Time at which the server received the latest trip update.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * Output only. Time at which the server received the latest trip update.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. Time at which the server received the latest trip update.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + 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(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getAuthToken()); + } + if (state_ != com.google.maps.navconnect.v1.Trip.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, state_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(4, getExecution()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(5, getCreateTime()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(6, getUpdateTime()); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(7, getConfig()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(androidAppId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 8, androidAppId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(iosAppId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 9, iosAppId_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAuthToken()); + } + if (state_ != com.google.maps.navconnect.v1.Trip.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, state_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getExecution()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getUpdateTime()); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getConfig()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(androidAppId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(8, androidAppId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(iosAppId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(9, iosAppId_); + } + 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.navconnect.v1.Trip)) { + return super.equals(obj); + } + com.google.maps.navconnect.v1.Trip other = (com.google.maps.navconnect.v1.Trip) obj; + + if (!getName().equals(other.getName())) return false; + if (hasConfig() != other.hasConfig()) return false; + if (hasConfig()) { + if (!getConfig().equals(other.getConfig())) return false; + } + if (!getAndroidAppId().equals(other.getAndroidAppId())) return false; + if (!getIosAppId().equals(other.getIosAppId())) return false; + if (hasAuthToken() != other.hasAuthToken()) return false; + if (hasAuthToken()) { + if (!getAuthToken().equals(other.getAuthToken())) return false; + } + if (state_ != other.state_) return false; + if (hasExecution() != other.hasExecution()) return false; + if (hasExecution()) { + if (!getExecution().equals(other.getExecution())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasConfig()) { + hash = (37 * hash) + CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getConfig().hashCode(); + } + hash = (37 * hash) + ANDROID_APP_ID_FIELD_NUMBER; + hash = (53 * hash) + getAndroidAppId().hashCode(); + hash = (37 * hash) + IOS_APP_ID_FIELD_NUMBER; + hash = (53 * hash) + getIosAppId().hashCode(); + if (hasAuthToken()) { + hash = (37 * hash) + AUTH_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getAuthToken().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasExecution()) { + hash = (37 * hash) + EXECUTION_FIELD_NUMBER; + hash = (53 * hash) + getExecution().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.navconnect.v1.Trip parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.navconnect.v1.Trip 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.navconnect.v1.Trip parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.navconnect.v1.Trip 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.navconnect.v1.Trip parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.navconnect.v1.Trip parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.navconnect.v1.Trip parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.navconnect.v1.Trip 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.navconnect.v1.Trip parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.navconnect.v1.Trip 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.navconnect.v1.Trip parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.navconnect.v1.Trip 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.navconnect.v1.Trip 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 trip.
+   * 
+ * + * Protobuf type {@code google.maps.navconnect.v1.Trip} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.navconnect.v1.Trip) + com.google.maps.navconnect.v1.TripOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_Trip_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_Trip_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.navconnect.v1.Trip.class, + com.google.maps.navconnect.v1.Trip.Builder.class); + } + + // Construct using com.google.maps.navconnect.v1.Trip.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetConfigFieldBuilder(); + internalGetAuthTokenFieldBuilder(); + internalGetExecutionFieldBuilder(); + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + config_ = null; + if (configBuilder_ != null) { + configBuilder_.dispose(); + configBuilder_ = null; + } + androidAppId_ = ""; + iosAppId_ = ""; + authToken_ = null; + if (authTokenBuilder_ != null) { + authTokenBuilder_.dispose(); + authTokenBuilder_ = null; + } + state_ = 0; + execution_ = null; + if (executionBuilder_ != null) { + executionBuilder_.dispose(); + executionBuilder_ = null; + } + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_Trip_descriptor; + } + + @java.lang.Override + public com.google.maps.navconnect.v1.Trip getDefaultInstanceForType() { + return com.google.maps.navconnect.v1.Trip.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.navconnect.v1.Trip build() { + com.google.maps.navconnect.v1.Trip result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.navconnect.v1.Trip buildPartial() { + com.google.maps.navconnect.v1.Trip result = new com.google.maps.navconnect.v1.Trip(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.navconnect.v1.Trip result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.config_ = configBuilder_ == null ? config_ : configBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.androidAppId_ = androidAppId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.iosAppId_ = iosAppId_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.authToken_ = authTokenBuilder_ == null ? authToken_ : authTokenBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.execution_ = executionBuilder_ == null ? execution_ : executionBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.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.navconnect.v1.Trip) { + return mergeFrom((com.google.maps.navconnect.v1.Trip) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.navconnect.v1.Trip other) { + if (other == com.google.maps.navconnect.v1.Trip.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasConfig()) { + mergeConfig(other.getConfig()); + } + if (!other.getAndroidAppId().isEmpty()) { + androidAppId_ = other.androidAppId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getIosAppId().isEmpty()) { + iosAppId_ = other.iosAppId_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasAuthToken()) { + mergeAuthToken(other.getAuthToken()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasExecution()) { + mergeExecution(other.getExecution()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetAuthTokenFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 18 + case 24: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 24 + case 34: + { + input.readMessage( + internalGetExecutionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 50 + case 58: + { + input.readMessage(internalGetConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 58 + case 66: + { + androidAppId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 66 + case 74: + { + iosAppId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 74 + 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 name_ = ""; + + /** + * + * + *
+     * Output only. Identifier. The resource name of the trip.
+     * Format: projects/{project_number}/trips/{trip_id}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Identifier. The resource name of the trip.
+     * Format: projects/{project_number}/trips/{trip_id}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Identifier. The resource name of the trip.
+     * Format: projects/{project_number}/trips/{trip_id}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Identifier. The resource name of the trip.
+     * Format: projects/{project_number}/trips/{trip_id}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Identifier. The resource name of the trip.
+     * Format: projects/{project_number}/trips/{trip_id}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.maps.navconnect.v1.TripConfig config_; + private com.google.protobuf.SingleFieldBuilder< + com.google.maps.navconnect.v1.TripConfig, + com.google.maps.navconnect.v1.TripConfig.Builder, + com.google.maps.navconnect.v1.TripConfigOrBuilder> + configBuilder_; + + /** + * + * + *
+     * Immutable. The configuration for the trip.
+     * 
+ * + * + * .google.maps.navconnect.v1.TripConfig config = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the config field is set. + */ + public boolean hasConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Immutable. The configuration for the trip.
+     * 
+ * + * + * .google.maps.navconnect.v1.TripConfig config = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The config. + */ + public com.google.maps.navconnect.v1.TripConfig getConfig() { + if (configBuilder_ == null) { + return config_ == null + ? com.google.maps.navconnect.v1.TripConfig.getDefaultInstance() + : config_; + } else { + return configBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Immutable. The configuration for the trip.
+     * 
+ * + * + * .google.maps.navconnect.v1.TripConfig config = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setConfig(com.google.maps.navconnect.v1.TripConfig value) { + if (configBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + config_ = value; + } else { + configBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The configuration for the trip.
+     * 
+ * + * + * .google.maps.navconnect.v1.TripConfig config = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setConfig(com.google.maps.navconnect.v1.TripConfig.Builder builderForValue) { + if (configBuilder_ == null) { + config_ = builderForValue.build(); + } else { + configBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The configuration for the trip.
+     * 
+ * + * + * .google.maps.navconnect.v1.TripConfig config = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder mergeConfig(com.google.maps.navconnect.v1.TripConfig value) { + if (configBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && config_ != null + && config_ != com.google.maps.navconnect.v1.TripConfig.getDefaultInstance()) { + getConfigBuilder().mergeFrom(value); + } else { + config_ = value; + } + } else { + configBuilder_.mergeFrom(value); + } + if (config_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Immutable. The configuration for the trip.
+     * 
+ * + * + * .google.maps.navconnect.v1.TripConfig config = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder clearConfig() { + bitField0_ = (bitField0_ & ~0x00000002); + config_ = null; + if (configBuilder_ != null) { + configBuilder_.dispose(); + configBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The configuration for the trip.
+     * 
+ * + * + * .google.maps.navconnect.v1.TripConfig config = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.maps.navconnect.v1.TripConfig.Builder getConfigBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Immutable. The configuration for the trip.
+     * 
+ * + * + * .google.maps.navconnect.v1.TripConfig config = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.maps.navconnect.v1.TripConfigOrBuilder getConfigOrBuilder() { + if (configBuilder_ != null) { + return configBuilder_.getMessageOrBuilder(); + } else { + return config_ == null + ? com.google.maps.navconnect.v1.TripConfig.getDefaultInstance() + : config_; + } + } + + /** + * + * + *
+     * Immutable. The configuration for the trip.
+     * 
+ * + * + * .google.maps.navconnect.v1.TripConfig config = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.maps.navconnect.v1.TripConfig, + com.google.maps.navconnect.v1.TripConfig.Builder, + com.google.maps.navconnect.v1.TripConfigOrBuilder> + internalGetConfigFieldBuilder() { + if (configBuilder_ == null) { + configBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.maps.navconnect.v1.TripConfig, + com.google.maps.navconnect.v1.TripConfig.Builder, + com.google.maps.navconnect.v1.TripConfigOrBuilder>( + getConfig(), getParentForChildren(), isClean()); + config_ = null; + } + return configBuilder_; + } + + private java.lang.Object androidAppId_ = ""; + + /** + * + * + *
+     * Input only. Immutable. The Android application ID of the mobile application
+     * that will use the trip. At least one of `android_app_id` or `ios_app_id`
+     * must be set.
+     * 
+ * + * + * string android_app_id = 8 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The androidAppId. + */ + public java.lang.String getAndroidAppId() { + java.lang.Object ref = androidAppId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + androidAppId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Input only. Immutable. The Android application ID of the mobile application
+     * that will use the trip. At least one of `android_app_id` or `ios_app_id`
+     * must be set.
+     * 
+ * + * + * string android_app_id = 8 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for androidAppId. + */ + public com.google.protobuf.ByteString getAndroidAppIdBytes() { + java.lang.Object ref = androidAppId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + androidAppId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Input only. Immutable. The Android application ID of the mobile application
+     * that will use the trip. At least one of `android_app_id` or `ios_app_id`
+     * must be set.
+     * 
+ * + * + * string android_app_id = 8 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The androidAppId to set. + * @return This builder for chaining. + */ + public Builder setAndroidAppId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + androidAppId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Input only. Immutable. The Android application ID of the mobile application
+     * that will use the trip. At least one of `android_app_id` or `ios_app_id`
+     * must be set.
+     * 
+ * + * + * string android_app_id = 8 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearAndroidAppId() { + androidAppId_ = getDefaultInstance().getAndroidAppId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Input only. Immutable. The Android application ID of the mobile application
+     * that will use the trip. At least one of `android_app_id` or `ios_app_id`
+     * must be set.
+     * 
+ * + * + * string android_app_id = 8 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The bytes for androidAppId to set. + * @return This builder for chaining. + */ + public Builder setAndroidAppIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + androidAppId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object iosAppId_ = ""; + + /** + * + * + *
+     * Input only. Immutable. The iOS bundle ID of the mobile application that
+     * will use the trip. At least one of `android_app_id` or `ios_app_id` must be
+     * set.
+     * 
+ * + * + * string ios_app_id = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The iosAppId. + */ + public java.lang.String getIosAppId() { + java.lang.Object ref = iosAppId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + iosAppId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Input only. Immutable. The iOS bundle ID of the mobile application that
+     * will use the trip. At least one of `android_app_id` or `ios_app_id` must be
+     * set.
+     * 
+ * + * + * string ios_app_id = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for iosAppId. + */ + public com.google.protobuf.ByteString getIosAppIdBytes() { + java.lang.Object ref = iosAppId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + iosAppId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Input only. Immutable. The iOS bundle ID of the mobile application that
+     * will use the trip. At least one of `android_app_id` or `ios_app_id` must be
+     * set.
+     * 
+ * + * + * string ios_app_id = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The iosAppId to set. + * @return This builder for chaining. + */ + public Builder setIosAppId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + iosAppId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Input only. Immutable. The iOS bundle ID of the mobile application that
+     * will use the trip. At least one of `android_app_id` or `ios_app_id` must be
+     * set.
+     * 
+ * + * + * string ios_app_id = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearIosAppId() { + iosAppId_ = getDefaultInstance().getIosAppId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Input only. Immutable. The iOS bundle ID of the mobile application that
+     * will use the trip. At least one of `android_app_id` or `ios_app_id` must be
+     * set.
+     * 
+ * + * + * string ios_app_id = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The bytes for iosAppId to set. + * @return This builder for chaining. + */ + public Builder setIosAppIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + iosAppId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.maps.navconnect.v1.AuthToken authToken_; + private com.google.protobuf.SingleFieldBuilder< + com.google.maps.navconnect.v1.AuthToken, + com.google.maps.navconnect.v1.AuthToken.Builder, + com.google.maps.navconnect.v1.AuthTokenOrBuilder> + authTokenBuilder_; + + /** + * + * + *
+     * Output only. An opaque token that authorizes access to begin a NavConnect
+     * trip in Google Maps or Waze and grants these applications access to update
+     * the trip. Only returned by `CreateTrip`.
+     * 
+ * + * + * .google.maps.navconnect.v1.AuthToken auth_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the authToken field is set. + */ + public boolean hasAuthToken() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Output only. An opaque token that authorizes access to begin a NavConnect
+     * trip in Google Maps or Waze and grants these applications access to update
+     * the trip. Only returned by `CreateTrip`.
+     * 
+ * + * + * .google.maps.navconnect.v1.AuthToken auth_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The authToken. + */ + public com.google.maps.navconnect.v1.AuthToken getAuthToken() { + if (authTokenBuilder_ == null) { + return authToken_ == null + ? com.google.maps.navconnect.v1.AuthToken.getDefaultInstance() + : authToken_; + } else { + return authTokenBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. An opaque token that authorizes access to begin a NavConnect
+     * trip in Google Maps or Waze and grants these applications access to update
+     * the trip. Only returned by `CreateTrip`.
+     * 
+ * + * + * .google.maps.navconnect.v1.AuthToken auth_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAuthToken(com.google.maps.navconnect.v1.AuthToken value) { + if (authTokenBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + authToken_ = value; + } else { + authTokenBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. An opaque token that authorizes access to begin a NavConnect
+     * trip in Google Maps or Waze and grants these applications access to update
+     * the trip. Only returned by `CreateTrip`.
+     * 
+ * + * + * .google.maps.navconnect.v1.AuthToken auth_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAuthToken(com.google.maps.navconnect.v1.AuthToken.Builder builderForValue) { + if (authTokenBuilder_ == null) { + authToken_ = builderForValue.build(); + } else { + authTokenBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. An opaque token that authorizes access to begin a NavConnect
+     * trip in Google Maps or Waze and grants these applications access to update
+     * the trip. Only returned by `CreateTrip`.
+     * 
+ * + * + * .google.maps.navconnect.v1.AuthToken auth_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeAuthToken(com.google.maps.navconnect.v1.AuthToken value) { + if (authTokenBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && authToken_ != null + && authToken_ != com.google.maps.navconnect.v1.AuthToken.getDefaultInstance()) { + getAuthTokenBuilder().mergeFrom(value); + } else { + authToken_ = value; + } + } else { + authTokenBuilder_.mergeFrom(value); + } + if (authToken_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. An opaque token that authorizes access to begin a NavConnect
+     * trip in Google Maps or Waze and grants these applications access to update
+     * the trip. Only returned by `CreateTrip`.
+     * 
+ * + * + * .google.maps.navconnect.v1.AuthToken auth_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearAuthToken() { + bitField0_ = (bitField0_ & ~0x00000010); + authToken_ = null; + if (authTokenBuilder_ != null) { + authTokenBuilder_.dispose(); + authTokenBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. An opaque token that authorizes access to begin a NavConnect
+     * trip in Google Maps or Waze and grants these applications access to update
+     * the trip. Only returned by `CreateTrip`.
+     * 
+ * + * + * .google.maps.navconnect.v1.AuthToken auth_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.maps.navconnect.v1.AuthToken.Builder getAuthTokenBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetAuthTokenFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. An opaque token that authorizes access to begin a NavConnect
+     * trip in Google Maps or Waze and grants these applications access to update
+     * the trip. Only returned by `CreateTrip`.
+     * 
+ * + * + * .google.maps.navconnect.v1.AuthToken auth_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.maps.navconnect.v1.AuthTokenOrBuilder getAuthTokenOrBuilder() { + if (authTokenBuilder_ != null) { + return authTokenBuilder_.getMessageOrBuilder(); + } else { + return authToken_ == null + ? com.google.maps.navconnect.v1.AuthToken.getDefaultInstance() + : authToken_; + } + } + + /** + * + * + *
+     * Output only. An opaque token that authorizes access to begin a NavConnect
+     * trip in Google Maps or Waze and grants these applications access to update
+     * the trip. Only returned by `CreateTrip`.
+     * 
+ * + * + * .google.maps.navconnect.v1.AuthToken auth_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.maps.navconnect.v1.AuthToken, + com.google.maps.navconnect.v1.AuthToken.Builder, + com.google.maps.navconnect.v1.AuthTokenOrBuilder> + internalGetAuthTokenFieldBuilder() { + if (authTokenBuilder_ == null) { + authTokenBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.maps.navconnect.v1.AuthToken, + com.google.maps.navconnect.v1.AuthToken.Builder, + com.google.maps.navconnect.v1.AuthTokenOrBuilder>( + getAuthToken(), getParentForChildren(), isClean()); + authToken_ = null; + } + return authTokenBuilder_; + } + + private int state_ = 0; + + /** + * + * + *
+     * Output only. The Trip state.
+     * 
+ * + * + * .google.maps.navconnect.v1.Trip.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+     * Output only. The Trip state.
+     * 
+ * + * + * .google.maps.navconnect.v1.Trip.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The Trip state.
+     * 
+ * + * + * .google.maps.navconnect.v1.Trip.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.maps.navconnect.v1.Trip.State getState() { + com.google.maps.navconnect.v1.Trip.State result = + com.google.maps.navconnect.v1.Trip.State.forNumber(state_); + return result == null ? com.google.maps.navconnect.v1.Trip.State.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Output only. The Trip state.
+     * 
+ * + * + * .google.maps.navconnect.v1.Trip.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.maps.navconnect.v1.Trip.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The Trip state.
+     * 
+ * + * + * .google.maps.navconnect.v1.Trip.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000020); + state_ = 0; + onChanged(); + return this; + } + + private com.google.maps.navconnect.v1.TripExecution execution_; + private com.google.protobuf.SingleFieldBuilder< + com.google.maps.navconnect.v1.TripExecution, + com.google.maps.navconnect.v1.TripExecution.Builder, + com.google.maps.navconnect.v1.TripExecutionOrBuilder> + executionBuilder_; + + /** + * + * + *
+     * Output only. The latest data about the execution of the trip. This may not
+     * be set if the trip is in an error state.
+     * 
+ * + * + * .google.maps.navconnect.v1.TripExecution execution = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the execution field is set. + */ + public boolean hasExecution() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Output only. The latest data about the execution of the trip. This may not
+     * be set if the trip is in an error state.
+     * 
+ * + * + * .google.maps.navconnect.v1.TripExecution execution = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The execution. + */ + public com.google.maps.navconnect.v1.TripExecution getExecution() { + if (executionBuilder_ == null) { + return execution_ == null + ? com.google.maps.navconnect.v1.TripExecution.getDefaultInstance() + : execution_; + } else { + return executionBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The latest data about the execution of the trip. This may not
+     * be set if the trip is in an error state.
+     * 
+ * + * + * .google.maps.navconnect.v1.TripExecution execution = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExecution(com.google.maps.navconnect.v1.TripExecution value) { + if (executionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + execution_ = value; + } else { + executionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The latest data about the execution of the trip. This may not
+     * be set if the trip is in an error state.
+     * 
+ * + * + * .google.maps.navconnect.v1.TripExecution execution = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExecution( + com.google.maps.navconnect.v1.TripExecution.Builder builderForValue) { + if (executionBuilder_ == null) { + execution_ = builderForValue.build(); + } else { + executionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The latest data about the execution of the trip. This may not
+     * be set if the trip is in an error state.
+     * 
+ * + * + * .google.maps.navconnect.v1.TripExecution execution = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeExecution(com.google.maps.navconnect.v1.TripExecution value) { + if (executionBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && execution_ != null + && execution_ != com.google.maps.navconnect.v1.TripExecution.getDefaultInstance()) { + getExecutionBuilder().mergeFrom(value); + } else { + execution_ = value; + } + } else { + executionBuilder_.mergeFrom(value); + } + if (execution_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The latest data about the execution of the trip. This may not
+     * be set if the trip is in an error state.
+     * 
+ * + * + * .google.maps.navconnect.v1.TripExecution execution = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearExecution() { + bitField0_ = (bitField0_ & ~0x00000040); + execution_ = null; + if (executionBuilder_ != null) { + executionBuilder_.dispose(); + executionBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The latest data about the execution of the trip. This may not
+     * be set if the trip is in an error state.
+     * 
+ * + * + * .google.maps.navconnect.v1.TripExecution execution = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.maps.navconnect.v1.TripExecution.Builder getExecutionBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetExecutionFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The latest data about the execution of the trip. This may not
+     * be set if the trip is in an error state.
+     * 
+ * + * + * .google.maps.navconnect.v1.TripExecution execution = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.maps.navconnect.v1.TripExecutionOrBuilder getExecutionOrBuilder() { + if (executionBuilder_ != null) { + return executionBuilder_.getMessageOrBuilder(); + } else { + return execution_ == null + ? com.google.maps.navconnect.v1.TripExecution.getDefaultInstance() + : execution_; + } + } + + /** + * + * + *
+     * Output only. The latest data about the execution of the trip. This may not
+     * be set if the trip is in an error state.
+     * 
+ * + * + * .google.maps.navconnect.v1.TripExecution execution = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.maps.navconnect.v1.TripExecution, + com.google.maps.navconnect.v1.TripExecution.Builder, + com.google.maps.navconnect.v1.TripExecutionOrBuilder> + internalGetExecutionFieldBuilder() { + if (executionBuilder_ == null) { + executionBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.maps.navconnect.v1.TripExecution, + com.google.maps.navconnect.v1.TripExecution.Builder, + com.google.maps.navconnect.v1.TripExecutionOrBuilder>( + getExecution(), getParentForChildren(), isClean()); + execution_ = null; + } + return executionBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. Time according to the server when the trip was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Output only. Time according to the server when the trip was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Time according to the server when the trip was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Time according to the server when the trip was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Time according to the server when the trip was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Time according to the server when the trip was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000080); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Time according to the server when the trip was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Time according to the server when the trip was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. Time according to the server when the trip was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. Time at which the server received the latest trip update.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+     * Output only. Time at which the server received the latest trip update.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Time at which the server received the latest trip update.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Time at which the server received the latest trip update.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Time at which the server received the latest trip update.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Time at which the server received the latest trip update.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000100); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Time at which the server received the latest trip update.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Time at which the server received the latest trip update.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. Time at which the server received the latest trip update.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.maps.navconnect.v1.Trip) + } + + // @@protoc_insertion_point(class_scope:google.maps.navconnect.v1.Trip) + private static final com.google.maps.navconnect.v1.Trip DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.navconnect.v1.Trip(); + } + + public static com.google.maps.navconnect.v1.Trip getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Trip 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.navconnect.v1.Trip getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/TripConfig.java b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/TripConfig.java new file mode 100644 index 000000000000..7a513170bac3 --- /dev/null +++ b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/TripConfig.java @@ -0,0 +1,1086 @@ +/* + * 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/navconnect/v1/navconnect_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.navconnect.v1; + +/** + * + * + *
+ * Configuration for the trip.
+ * 
+ * + * Protobuf type {@code google.maps.navconnect.v1.TripConfig} + */ +@com.google.protobuf.Generated +public final class TripConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.maps.navconnect.v1.TripConfig) + TripConfigOrBuilder { + 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= */ "", + "TripConfig"); + } + + // Use TripConfig.newBuilder() to construct. + private TripConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private TripConfig() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_TripConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_TripConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.navconnect.v1.TripConfig.class, + com.google.maps.navconnect.v1.TripConfig.Builder.class); + } + + private int bitField0_; + public static final int ENABLE_HIGH_FREQUENCY_UPDATES_FIELD_NUMBER = 1; + private boolean enableHighFrequencyUpdates_ = false; + + /** + * + * + *
+   * Optional. Whether to enable high frequency trip updates.
+   *
+   * NOTE: Enabling this feature logs the trip under Enterprise Tier usage, and
+   * is subject to Enterprise Tier rates.
+   * 
+ * + * bool enable_high_frequency_updates = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableHighFrequencyUpdates. + */ + @java.lang.Override + public boolean getEnableHighFrequencyUpdates() { + return enableHighFrequencyUpdates_; + } + + public static final int ENABLE_PUBSUB_FIELD_NUMBER = 2; + private boolean enablePubsub_ = false; + + /** + * + * + *
+   * Optional. Whether to enable pubsub notifications for the trip.
+   * 
+ * + * bool enable_pubsub = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enablePubsub. + */ + @java.lang.Override + public boolean getEnablePubsub() { + return enablePubsub_; + } + + public static final int PUBSUB_FIELD_MASK_FIELD_NUMBER = 3; + private com.google.protobuf.FieldMask pubsubFieldMask_; + + /** + * + * + *
+   * Optional. If set, only the specified subset of the Trip fields will be
+   * included in the pubsub notifications.
+   *
+   * If not set, all Trip fields will be included in the pubsub notifications
+   * (default behavior).
+   *
+   * The following fields are not supported:
+   *
+   * * `android_app_id`
+   * * `ios_app_id`
+   * * `auth_token`
+   * * `config`
+   *
+   * NOTE: This field is ignored if `enable_pubsub` is false.
+   * 
+ * + * + * .google.protobuf.FieldMask pubsub_field_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the pubsubFieldMask field is set. + */ + @java.lang.Override + public boolean hasPubsubFieldMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. If set, only the specified subset of the Trip fields will be
+   * included in the pubsub notifications.
+   *
+   * If not set, all Trip fields will be included in the pubsub notifications
+   * (default behavior).
+   *
+   * The following fields are not supported:
+   *
+   * * `android_app_id`
+   * * `ios_app_id`
+   * * `auth_token`
+   * * `config`
+   *
+   * NOTE: This field is ignored if `enable_pubsub` is false.
+   * 
+ * + * + * .google.protobuf.FieldMask pubsub_field_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The pubsubFieldMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getPubsubFieldMask() { + return pubsubFieldMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : pubsubFieldMask_; + } + + /** + * + * + *
+   * Optional. If set, only the specified subset of the Trip fields will be
+   * included in the pubsub notifications.
+   *
+   * If not set, all Trip fields will be included in the pubsub notifications
+   * (default behavior).
+   *
+   * The following fields are not supported:
+   *
+   * * `android_app_id`
+   * * `ios_app_id`
+   * * `auth_token`
+   * * `config`
+   *
+   * NOTE: This field is ignored if `enable_pubsub` is false.
+   * 
+ * + * + * .google.protobuf.FieldMask pubsub_field_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getPubsubFieldMaskOrBuilder() { + return pubsubFieldMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : pubsubFieldMask_; + } + + 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 (enableHighFrequencyUpdates_ != false) { + output.writeBool(1, enableHighFrequencyUpdates_); + } + if (enablePubsub_ != false) { + output.writeBool(2, enablePubsub_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getPubsubFieldMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enableHighFrequencyUpdates_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enableHighFrequencyUpdates_); + } + if (enablePubsub_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, enablePubsub_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPubsubFieldMask()); + } + 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.navconnect.v1.TripConfig)) { + return super.equals(obj); + } + com.google.maps.navconnect.v1.TripConfig other = (com.google.maps.navconnect.v1.TripConfig) obj; + + if (getEnableHighFrequencyUpdates() != other.getEnableHighFrequencyUpdates()) return false; + if (getEnablePubsub() != other.getEnablePubsub()) return false; + if (hasPubsubFieldMask() != other.hasPubsubFieldMask()) return false; + if (hasPubsubFieldMask()) { + if (!getPubsubFieldMask().equals(other.getPubsubFieldMask())) 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) + ENABLE_HIGH_FREQUENCY_UPDATES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableHighFrequencyUpdates()); + hash = (37 * hash) + ENABLE_PUBSUB_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnablePubsub()); + if (hasPubsubFieldMask()) { + hash = (37 * hash) + PUBSUB_FIELD_MASK_FIELD_NUMBER; + hash = (53 * hash) + getPubsubFieldMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.navconnect.v1.TripConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.navconnect.v1.TripConfig 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.navconnect.v1.TripConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.navconnect.v1.TripConfig 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.navconnect.v1.TripConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.navconnect.v1.TripConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.navconnect.v1.TripConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.navconnect.v1.TripConfig 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.navconnect.v1.TripConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.navconnect.v1.TripConfig 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.navconnect.v1.TripConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.navconnect.v1.TripConfig 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.navconnect.v1.TripConfig 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; + } + + /** + * + * + *
+   * Configuration for the trip.
+   * 
+ * + * Protobuf type {@code google.maps.navconnect.v1.TripConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.navconnect.v1.TripConfig) + com.google.maps.navconnect.v1.TripConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_TripConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_TripConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.navconnect.v1.TripConfig.class, + com.google.maps.navconnect.v1.TripConfig.Builder.class); + } + + // Construct using com.google.maps.navconnect.v1.TripConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPubsubFieldMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enableHighFrequencyUpdates_ = false; + enablePubsub_ = false; + pubsubFieldMask_ = null; + if (pubsubFieldMaskBuilder_ != null) { + pubsubFieldMaskBuilder_.dispose(); + pubsubFieldMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_TripConfig_descriptor; + } + + @java.lang.Override + public com.google.maps.navconnect.v1.TripConfig getDefaultInstanceForType() { + return com.google.maps.navconnect.v1.TripConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.navconnect.v1.TripConfig build() { + com.google.maps.navconnect.v1.TripConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.navconnect.v1.TripConfig buildPartial() { + com.google.maps.navconnect.v1.TripConfig result = + new com.google.maps.navconnect.v1.TripConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.navconnect.v1.TripConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enableHighFrequencyUpdates_ = enableHighFrequencyUpdates_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.enablePubsub_ = enablePubsub_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pubsubFieldMask_ = + pubsubFieldMaskBuilder_ == null ? pubsubFieldMask_ : pubsubFieldMaskBuilder_.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.navconnect.v1.TripConfig) { + return mergeFrom((com.google.maps.navconnect.v1.TripConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.navconnect.v1.TripConfig other) { + if (other == com.google.maps.navconnect.v1.TripConfig.getDefaultInstance()) return this; + if (other.getEnableHighFrequencyUpdates() != false) { + setEnableHighFrequencyUpdates(other.getEnableHighFrequencyUpdates()); + } + if (other.getEnablePubsub() != false) { + setEnablePubsub(other.getEnablePubsub()); + } + if (other.hasPubsubFieldMask()) { + mergePubsubFieldMask(other.getPubsubFieldMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + enableHighFrequencyUpdates_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + enablePubsub_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + input.readMessage( + internalGetPubsubFieldMaskFieldBuilder().getBuilder(), extensionRegistry); + 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 boolean enableHighFrequencyUpdates_; + + /** + * + * + *
+     * Optional. Whether to enable high frequency trip updates.
+     *
+     * NOTE: Enabling this feature logs the trip under Enterprise Tier usage, and
+     * is subject to Enterprise Tier rates.
+     * 
+ * + * bool enable_high_frequency_updates = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enableHighFrequencyUpdates. + */ + @java.lang.Override + public boolean getEnableHighFrequencyUpdates() { + return enableHighFrequencyUpdates_; + } + + /** + * + * + *
+     * Optional. Whether to enable high frequency trip updates.
+     *
+     * NOTE: Enabling this feature logs the trip under Enterprise Tier usage, and
+     * is subject to Enterprise Tier rates.
+     * 
+ * + * bool enable_high_frequency_updates = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enableHighFrequencyUpdates to set. + * @return This builder for chaining. + */ + public Builder setEnableHighFrequencyUpdates(boolean value) { + + enableHighFrequencyUpdates_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Whether to enable high frequency trip updates.
+     *
+     * NOTE: Enabling this feature logs the trip under Enterprise Tier usage, and
+     * is subject to Enterprise Tier rates.
+     * 
+ * + * bool enable_high_frequency_updates = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearEnableHighFrequencyUpdates() { + bitField0_ = (bitField0_ & ~0x00000001); + enableHighFrequencyUpdates_ = false; + onChanged(); + return this; + } + + private boolean enablePubsub_; + + /** + * + * + *
+     * Optional. Whether to enable pubsub notifications for the trip.
+     * 
+ * + * bool enable_pubsub = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enablePubsub. + */ + @java.lang.Override + public boolean getEnablePubsub() { + return enablePubsub_; + } + + /** + * + * + *
+     * Optional. Whether to enable pubsub notifications for the trip.
+     * 
+ * + * bool enable_pubsub = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The enablePubsub to set. + * @return This builder for chaining. + */ + public Builder setEnablePubsub(boolean value) { + + enablePubsub_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Whether to enable pubsub notifications for the trip.
+     * 
+ * + * bool enable_pubsub = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEnablePubsub() { + bitField0_ = (bitField0_ & ~0x00000002); + enablePubsub_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.FieldMask pubsubFieldMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + pubsubFieldMaskBuilder_; + + /** + * + * + *
+     * Optional. If set, only the specified subset of the Trip fields will be
+     * included in the pubsub notifications.
+     *
+     * If not set, all Trip fields will be included in the pubsub notifications
+     * (default behavior).
+     *
+     * The following fields are not supported:
+     *
+     * * `android_app_id`
+     * * `ios_app_id`
+     * * `auth_token`
+     * * `config`
+     *
+     * NOTE: This field is ignored if `enable_pubsub` is false.
+     * 
+ * + * + * .google.protobuf.FieldMask pubsub_field_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the pubsubFieldMask field is set. + */ + public boolean hasPubsubFieldMask() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. If set, only the specified subset of the Trip fields will be
+     * included in the pubsub notifications.
+     *
+     * If not set, all Trip fields will be included in the pubsub notifications
+     * (default behavior).
+     *
+     * The following fields are not supported:
+     *
+     * * `android_app_id`
+     * * `ios_app_id`
+     * * `auth_token`
+     * * `config`
+     *
+     * NOTE: This field is ignored if `enable_pubsub` is false.
+     * 
+ * + * + * .google.protobuf.FieldMask pubsub_field_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The pubsubFieldMask. + */ + public com.google.protobuf.FieldMask getPubsubFieldMask() { + if (pubsubFieldMaskBuilder_ == null) { + return pubsubFieldMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : pubsubFieldMask_; + } else { + return pubsubFieldMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. If set, only the specified subset of the Trip fields will be
+     * included in the pubsub notifications.
+     *
+     * If not set, all Trip fields will be included in the pubsub notifications
+     * (default behavior).
+     *
+     * The following fields are not supported:
+     *
+     * * `android_app_id`
+     * * `ios_app_id`
+     * * `auth_token`
+     * * `config`
+     *
+     * NOTE: This field is ignored if `enable_pubsub` is false.
+     * 
+ * + * + * .google.protobuf.FieldMask pubsub_field_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPubsubFieldMask(com.google.protobuf.FieldMask value) { + if (pubsubFieldMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pubsubFieldMask_ = value; + } else { + pubsubFieldMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set, only the specified subset of the Trip fields will be
+     * included in the pubsub notifications.
+     *
+     * If not set, all Trip fields will be included in the pubsub notifications
+     * (default behavior).
+     *
+     * The following fields are not supported:
+     *
+     * * `android_app_id`
+     * * `ios_app_id`
+     * * `auth_token`
+     * * `config`
+     *
+     * NOTE: This field is ignored if `enable_pubsub` is false.
+     * 
+ * + * + * .google.protobuf.FieldMask pubsub_field_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPubsubFieldMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (pubsubFieldMaskBuilder_ == null) { + pubsubFieldMask_ = builderForValue.build(); + } else { + pubsubFieldMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set, only the specified subset of the Trip fields will be
+     * included in the pubsub notifications.
+     *
+     * If not set, all Trip fields will be included in the pubsub notifications
+     * (default behavior).
+     *
+     * The following fields are not supported:
+     *
+     * * `android_app_id`
+     * * `ios_app_id`
+     * * `auth_token`
+     * * `config`
+     *
+     * NOTE: This field is ignored if `enable_pubsub` is false.
+     * 
+ * + * + * .google.protobuf.FieldMask pubsub_field_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePubsubFieldMask(com.google.protobuf.FieldMask value) { + if (pubsubFieldMaskBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && pubsubFieldMask_ != null + && pubsubFieldMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getPubsubFieldMaskBuilder().mergeFrom(value); + } else { + pubsubFieldMask_ = value; + } + } else { + pubsubFieldMaskBuilder_.mergeFrom(value); + } + if (pubsubFieldMask_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. If set, only the specified subset of the Trip fields will be
+     * included in the pubsub notifications.
+     *
+     * If not set, all Trip fields will be included in the pubsub notifications
+     * (default behavior).
+     *
+     * The following fields are not supported:
+     *
+     * * `android_app_id`
+     * * `ios_app_id`
+     * * `auth_token`
+     * * `config`
+     *
+     * NOTE: This field is ignored if `enable_pubsub` is false.
+     * 
+ * + * + * .google.protobuf.FieldMask pubsub_field_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPubsubFieldMask() { + bitField0_ = (bitField0_ & ~0x00000004); + pubsubFieldMask_ = null; + if (pubsubFieldMaskBuilder_ != null) { + pubsubFieldMaskBuilder_.dispose(); + pubsubFieldMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set, only the specified subset of the Trip fields will be
+     * included in the pubsub notifications.
+     *
+     * If not set, all Trip fields will be included in the pubsub notifications
+     * (default behavior).
+     *
+     * The following fields are not supported:
+     *
+     * * `android_app_id`
+     * * `ios_app_id`
+     * * `auth_token`
+     * * `config`
+     *
+     * NOTE: This field is ignored if `enable_pubsub` is false.
+     * 
+ * + * + * .google.protobuf.FieldMask pubsub_field_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getPubsubFieldMaskBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetPubsubFieldMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. If set, only the specified subset of the Trip fields will be
+     * included in the pubsub notifications.
+     *
+     * If not set, all Trip fields will be included in the pubsub notifications
+     * (default behavior).
+     *
+     * The following fields are not supported:
+     *
+     * * `android_app_id`
+     * * `ios_app_id`
+     * * `auth_token`
+     * * `config`
+     *
+     * NOTE: This field is ignored if `enable_pubsub` is false.
+     * 
+ * + * + * .google.protobuf.FieldMask pubsub_field_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getPubsubFieldMaskOrBuilder() { + if (pubsubFieldMaskBuilder_ != null) { + return pubsubFieldMaskBuilder_.getMessageOrBuilder(); + } else { + return pubsubFieldMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : pubsubFieldMask_; + } + } + + /** + * + * + *
+     * Optional. If set, only the specified subset of the Trip fields will be
+     * included in the pubsub notifications.
+     *
+     * If not set, all Trip fields will be included in the pubsub notifications
+     * (default behavior).
+     *
+     * The following fields are not supported:
+     *
+     * * `android_app_id`
+     * * `ios_app_id`
+     * * `auth_token`
+     * * `config`
+     *
+     * NOTE: This field is ignored if `enable_pubsub` is false.
+     * 
+ * + * + * .google.protobuf.FieldMask pubsub_field_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetPubsubFieldMaskFieldBuilder() { + if (pubsubFieldMaskBuilder_ == null) { + pubsubFieldMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getPubsubFieldMask(), getParentForChildren(), isClean()); + pubsubFieldMask_ = null; + } + return pubsubFieldMaskBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.maps.navconnect.v1.TripConfig) + } + + // @@protoc_insertion_point(class_scope:google.maps.navconnect.v1.TripConfig) + private static final com.google.maps.navconnect.v1.TripConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.navconnect.v1.TripConfig(); + } + + public static com.google.maps.navconnect.v1.TripConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TripConfig 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.navconnect.v1.TripConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/TripConfigOrBuilder.java b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/TripConfigOrBuilder.java new file mode 100644 index 000000000000..50dc3a432f6c --- /dev/null +++ b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/TripConfigOrBuilder.java @@ -0,0 +1,139 @@ +/* + * 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/navconnect/v1/navconnect_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.navconnect.v1; + +@com.google.protobuf.Generated +public interface TripConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.navconnect.v1.TripConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Whether to enable high frequency trip updates.
+   *
+   * NOTE: Enabling this feature logs the trip under Enterprise Tier usage, and
+   * is subject to Enterprise Tier rates.
+   * 
+ * + * bool enable_high_frequency_updates = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableHighFrequencyUpdates. + */ + boolean getEnableHighFrequencyUpdates(); + + /** + * + * + *
+   * Optional. Whether to enable pubsub notifications for the trip.
+   * 
+ * + * bool enable_pubsub = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enablePubsub. + */ + boolean getEnablePubsub(); + + /** + * + * + *
+   * Optional. If set, only the specified subset of the Trip fields will be
+   * included in the pubsub notifications.
+   *
+   * If not set, all Trip fields will be included in the pubsub notifications
+   * (default behavior).
+   *
+   * The following fields are not supported:
+   *
+   * * `android_app_id`
+   * * `ios_app_id`
+   * * `auth_token`
+   * * `config`
+   *
+   * NOTE: This field is ignored if `enable_pubsub` is false.
+   * 
+ * + * + * .google.protobuf.FieldMask pubsub_field_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the pubsubFieldMask field is set. + */ + boolean hasPubsubFieldMask(); + + /** + * + * + *
+   * Optional. If set, only the specified subset of the Trip fields will be
+   * included in the pubsub notifications.
+   *
+   * If not set, all Trip fields will be included in the pubsub notifications
+   * (default behavior).
+   *
+   * The following fields are not supported:
+   *
+   * * `android_app_id`
+   * * `ios_app_id`
+   * * `auth_token`
+   * * `config`
+   *
+   * NOTE: This field is ignored if `enable_pubsub` is false.
+   * 
+ * + * + * .google.protobuf.FieldMask pubsub_field_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The pubsubFieldMask. + */ + com.google.protobuf.FieldMask getPubsubFieldMask(); + + /** + * + * + *
+   * Optional. If set, only the specified subset of the Trip fields will be
+   * included in the pubsub notifications.
+   *
+   * If not set, all Trip fields will be included in the pubsub notifications
+   * (default behavior).
+   *
+   * The following fields are not supported:
+   *
+   * * `android_app_id`
+   * * `ios_app_id`
+   * * `auth_token`
+   * * `config`
+   *
+   * NOTE: This field is ignored if `enable_pubsub` is false.
+   * 
+ * + * + * .google.protobuf.FieldMask pubsub_field_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getPubsubFieldMaskOrBuilder(); +} diff --git a/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/TripExecution.java b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/TripExecution.java new file mode 100644 index 000000000000..fcee38c62960 --- /dev/null +++ b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/TripExecution.java @@ -0,0 +1,2410 @@ +/* + * 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/navconnect/v1/navconnect_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.navconnect.v1; + +/** + * + * + *
+ * Data about the execution of the trip.
+ * 
+ * + * Protobuf type {@code google.maps.navconnect.v1.TripExecution} + */ +@com.google.protobuf.Generated +public final class TripExecution extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.maps.navconnect.v1.TripExecution) + TripExecutionOrBuilder { + 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= */ "", + "TripExecution"); + } + + // Use TripExecution.newBuilder() to construct. + private TripExecution(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private TripExecution() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_TripExecution_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_TripExecution_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.navconnect.v1.TripExecution.class, + com.google.maps.navconnect.v1.TripExecution.Builder.class); + } + + private int bitField0_; + public static final int ORIGIN_FIELD_NUMBER = 1; + private com.google.maps.navconnect.v1.Location origin_; + + /** + * + * + *
+   * Output only. Origin of the trip which is generally the transporter's
+   * location at start of the NavConnect trip.
+   * 
+ * + * + * .google.maps.navconnect.v1.Location origin = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the origin field is set. + */ + @java.lang.Override + public boolean hasOrigin() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. Origin of the trip which is generally the transporter's
+   * location at start of the NavConnect trip.
+   * 
+ * + * + * .google.maps.navconnect.v1.Location origin = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The origin. + */ + @java.lang.Override + public com.google.maps.navconnect.v1.Location getOrigin() { + return origin_ == null ? com.google.maps.navconnect.v1.Location.getDefaultInstance() : origin_; + } + + /** + * + * + *
+   * Output only. Origin of the trip which is generally the transporter's
+   * location at start of the NavConnect trip.
+   * 
+ * + * + * .google.maps.navconnect.v1.Location origin = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.maps.navconnect.v1.LocationOrBuilder getOriginOrBuilder() { + return origin_ == null ? com.google.maps.navconnect.v1.Location.getDefaultInstance() : origin_; + } + + public static final int DESTINATION_FIELD_NUMBER = 2; + private com.google.maps.navconnect.v1.Stop destination_; + + /** + * + * + *
+   * Output only. The destination of the trip as reported by the mobile
+   * application.
+   * 
+ * + * + * .google.maps.navconnect.v1.Stop destination = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the destination field is set. + */ + @java.lang.Override + public boolean hasDestination() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The destination of the trip as reported by the mobile
+   * application.
+   * 
+ * + * + * .google.maps.navconnect.v1.Stop destination = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The destination. + */ + @java.lang.Override + public com.google.maps.navconnect.v1.Stop getDestination() { + return destination_ == null + ? com.google.maps.navconnect.v1.Stop.getDefaultInstance() + : destination_; + } + + /** + * + * + *
+   * Output only. The destination of the trip as reported by the mobile
+   * application.
+   * 
+ * + * + * .google.maps.navconnect.v1.Stop destination = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.maps.navconnect.v1.StopOrBuilder getDestinationOrBuilder() { + return destination_ == null + ? com.google.maps.navconnect.v1.Stop.getDefaultInstance() + : destination_; + } + + public static final int LOCATION_FIELD_NUMBER = 3; + private com.google.maps.navconnect.v1.Location location_; + + /** + * + * + *
+   * Output only. The location signal representing the last known location of
+   * the transporter. This will be the road snapped location if available.
+   * 
+ * + * + * .google.maps.navconnect.v1.Location location = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the location field is set. + */ + @java.lang.Override + public boolean hasLocation() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. The location signal representing the last known location of
+   * the transporter. This will be the road snapped location if available.
+   * 
+ * + * + * .google.maps.navconnect.v1.Location location = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The location. + */ + @java.lang.Override + public com.google.maps.navconnect.v1.Location getLocation() { + return location_ == null + ? com.google.maps.navconnect.v1.Location.getDefaultInstance() + : location_; + } + + /** + * + * + *
+   * Output only. The location signal representing the last known location of
+   * the transporter. This will be the road snapped location if available.
+   * 
+ * + * + * .google.maps.navconnect.v1.Location location = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.maps.navconnect.v1.LocationOrBuilder getLocationOrBuilder() { + return location_ == null + ? com.google.maps.navconnect.v1.Location.getDefaultInstance() + : location_; + } + + public static final int TRAVELED_DURATION_FIELD_NUMBER = 4; + private com.google.protobuf.Duration traveledDuration_; + + /** + * + * + *
+   * Output only. Time traveled thus far.
+   * 
+ * + * + * .google.protobuf.Duration traveled_duration = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the traveledDuration field is set. + */ + @java.lang.Override + public boolean hasTraveledDuration() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Output only. Time traveled thus far.
+   * 
+ * + * + * .google.protobuf.Duration traveled_duration = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The traveledDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getTraveledDuration() { + return traveledDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : traveledDuration_; + } + + /** + * + * + *
+   * Output only. Time traveled thus far.
+   * 
+ * + * + * .google.protobuf.Duration traveled_duration = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTraveledDurationOrBuilder() { + return traveledDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : traveledDuration_; + } + + public static final int REMAINING_DURATION_FIELD_NUMBER = 5; + private com.google.protobuf.Duration remainingDuration_; + + /** + * + * + *
+   * Output only. Time left on this trip as estimated by Google.
+   * 
+ * + * + * .google.protobuf.Duration remaining_duration = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the remainingDuration field is set. + */ + @java.lang.Override + public boolean hasRemainingDuration() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * Output only. Time left on this trip as estimated by Google.
+   * 
+ * + * + * .google.protobuf.Duration remaining_duration = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The remainingDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getRemainingDuration() { + return remainingDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : remainingDuration_; + } + + /** + * + * + *
+   * Output only. Time left on this trip as estimated by Google.
+   * 
+ * + * + * .google.protobuf.Duration remaining_duration = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getRemainingDurationOrBuilder() { + return remainingDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : remainingDuration_; + } + + public static final int TRAVELED_DISTANCE_METERS_FIELD_NUMBER = 6; + private int traveledDistanceMeters_ = 0; + + /** + * + * + *
+   * Output only. Distance traveled from the origin in meters.
+   * 
+ * + * optional int32 traveled_distance_meters = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the traveledDistanceMeters field is set. + */ + @java.lang.Override + public boolean hasTraveledDistanceMeters() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+   * Output only. Distance traveled from the origin in meters.
+   * 
+ * + * optional int32 traveled_distance_meters = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The traveledDistanceMeters. + */ + @java.lang.Override + public int getTraveledDistanceMeters() { + return traveledDistanceMeters_; + } + + public static final int REMAINING_DISTANCE_METERS_FIELD_NUMBER = 7; + private int remainingDistanceMeters_ = 0; + + /** + * + * + *
+   * Output only. Distance remaining to the destination in meters.
+   * 
+ * + * + * optional int32 remaining_distance_meters = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the remainingDistanceMeters field is set. + */ + @java.lang.Override + public boolean hasRemainingDistanceMeters() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+   * Output only. Distance remaining to the destination in meters.
+   * 
+ * + * + * optional int32 remaining_distance_meters = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The remainingDistanceMeters. + */ + @java.lang.Override + public int getRemainingDistanceMeters() { + return remainingDistanceMeters_; + } + + public static final int STOP_ADDED_IN_ROUTE_FIELD_NUMBER = 8; + private boolean stopAddedInRoute_ = false; + + /** + * + * + *
+   * Output only. Indicates whether a stop was added along the route.
+   * 
+ * + * optional bool stop_added_in_route = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the stopAddedInRoute field is set. + */ + @java.lang.Override + public boolean hasStopAddedInRoute() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+   * Output only. Indicates whether a stop was added along the route.
+   * 
+ * + * optional bool stop_added_in_route = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The stopAddedInRoute. + */ + @java.lang.Override + public boolean getStopAddedInRoute() { + return stopAddedInRoute_; + } + + 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, getOrigin()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getDestination()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getLocation()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(4, getTraveledDuration()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(5, getRemainingDuration()); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeInt32(6, traveledDistanceMeters_); + } + if (((bitField0_ & 0x00000040) != 0)) { + output.writeInt32(7, remainingDistanceMeters_); + } + if (((bitField0_ & 0x00000080) != 0)) { + output.writeBool(8, stopAddedInRoute_); + } + 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, getOrigin()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDestination()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getLocation()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getTraveledDuration()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getRemainingDuration()); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, traveledDistanceMeters_); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(7, remainingDistanceMeters_); + } + if (((bitField0_ & 0x00000080) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, stopAddedInRoute_); + } + 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.navconnect.v1.TripExecution)) { + return super.equals(obj); + } + com.google.maps.navconnect.v1.TripExecution other = + (com.google.maps.navconnect.v1.TripExecution) obj; + + if (hasOrigin() != other.hasOrigin()) return false; + if (hasOrigin()) { + if (!getOrigin().equals(other.getOrigin())) return false; + } + if (hasDestination() != other.hasDestination()) return false; + if (hasDestination()) { + if (!getDestination().equals(other.getDestination())) return false; + } + if (hasLocation() != other.hasLocation()) return false; + if (hasLocation()) { + if (!getLocation().equals(other.getLocation())) return false; + } + if (hasTraveledDuration() != other.hasTraveledDuration()) return false; + if (hasTraveledDuration()) { + if (!getTraveledDuration().equals(other.getTraveledDuration())) return false; + } + if (hasRemainingDuration() != other.hasRemainingDuration()) return false; + if (hasRemainingDuration()) { + if (!getRemainingDuration().equals(other.getRemainingDuration())) return false; + } + if (hasTraveledDistanceMeters() != other.hasTraveledDistanceMeters()) return false; + if (hasTraveledDistanceMeters()) { + if (getTraveledDistanceMeters() != other.getTraveledDistanceMeters()) return false; + } + if (hasRemainingDistanceMeters() != other.hasRemainingDistanceMeters()) return false; + if (hasRemainingDistanceMeters()) { + if (getRemainingDistanceMeters() != other.getRemainingDistanceMeters()) return false; + } + if (hasStopAddedInRoute() != other.hasStopAddedInRoute()) return false; + if (hasStopAddedInRoute()) { + if (getStopAddedInRoute() != other.getStopAddedInRoute()) 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 (hasOrigin()) { + hash = (37 * hash) + ORIGIN_FIELD_NUMBER; + hash = (53 * hash) + getOrigin().hashCode(); + } + if (hasDestination()) { + hash = (37 * hash) + DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getDestination().hashCode(); + } + if (hasLocation()) { + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + } + if (hasTraveledDuration()) { + hash = (37 * hash) + TRAVELED_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getTraveledDuration().hashCode(); + } + if (hasRemainingDuration()) { + hash = (37 * hash) + REMAINING_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getRemainingDuration().hashCode(); + } + if (hasTraveledDistanceMeters()) { + hash = (37 * hash) + TRAVELED_DISTANCE_METERS_FIELD_NUMBER; + hash = (53 * hash) + getTraveledDistanceMeters(); + } + if (hasRemainingDistanceMeters()) { + hash = (37 * hash) + REMAINING_DISTANCE_METERS_FIELD_NUMBER; + hash = (53 * hash) + getRemainingDistanceMeters(); + } + if (hasStopAddedInRoute()) { + hash = (37 * hash) + STOP_ADDED_IN_ROUTE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getStopAddedInRoute()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.navconnect.v1.TripExecution parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.navconnect.v1.TripExecution 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.navconnect.v1.TripExecution parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.navconnect.v1.TripExecution 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.navconnect.v1.TripExecution parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.navconnect.v1.TripExecution parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.navconnect.v1.TripExecution parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.navconnect.v1.TripExecution 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.navconnect.v1.TripExecution parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.navconnect.v1.TripExecution 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.navconnect.v1.TripExecution parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.maps.navconnect.v1.TripExecution 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.navconnect.v1.TripExecution 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; + } + + /** + * + * + *
+   * Data about the execution of the trip.
+   * 
+ * + * Protobuf type {@code google.maps.navconnect.v1.TripExecution} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.navconnect.v1.TripExecution) + com.google.maps.navconnect.v1.TripExecutionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_TripExecution_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_TripExecution_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.navconnect.v1.TripExecution.class, + com.google.maps.navconnect.v1.TripExecution.Builder.class); + } + + // Construct using com.google.maps.navconnect.v1.TripExecution.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetOriginFieldBuilder(); + internalGetDestinationFieldBuilder(); + internalGetLocationFieldBuilder(); + internalGetTraveledDurationFieldBuilder(); + internalGetRemainingDurationFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + origin_ = null; + if (originBuilder_ != null) { + originBuilder_.dispose(); + originBuilder_ = null; + } + destination_ = null; + if (destinationBuilder_ != null) { + destinationBuilder_.dispose(); + destinationBuilder_ = null; + } + location_ = null; + if (locationBuilder_ != null) { + locationBuilder_.dispose(); + locationBuilder_ = null; + } + traveledDuration_ = null; + if (traveledDurationBuilder_ != null) { + traveledDurationBuilder_.dispose(); + traveledDurationBuilder_ = null; + } + remainingDuration_ = null; + if (remainingDurationBuilder_ != null) { + remainingDurationBuilder_.dispose(); + remainingDurationBuilder_ = null; + } + traveledDistanceMeters_ = 0; + remainingDistanceMeters_ = 0; + stopAddedInRoute_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.navconnect.v1.NavConnectServiceProto + .internal_static_google_maps_navconnect_v1_TripExecution_descriptor; + } + + @java.lang.Override + public com.google.maps.navconnect.v1.TripExecution getDefaultInstanceForType() { + return com.google.maps.navconnect.v1.TripExecution.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.navconnect.v1.TripExecution build() { + com.google.maps.navconnect.v1.TripExecution result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.navconnect.v1.TripExecution buildPartial() { + com.google.maps.navconnect.v1.TripExecution result = + new com.google.maps.navconnect.v1.TripExecution(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.navconnect.v1.TripExecution result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.origin_ = originBuilder_ == null ? origin_ : originBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.destination_ = + destinationBuilder_ == null ? destination_ : destinationBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.location_ = locationBuilder_ == null ? location_ : locationBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.traveledDuration_ = + traveledDurationBuilder_ == null ? traveledDuration_ : traveledDurationBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.remainingDuration_ = + remainingDurationBuilder_ == null + ? remainingDuration_ + : remainingDurationBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.traveledDistanceMeters_ = traveledDistanceMeters_; + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.remainingDistanceMeters_ = remainingDistanceMeters_; + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.stopAddedInRoute_ = stopAddedInRoute_; + to_bitField0_ |= 0x00000080; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.navconnect.v1.TripExecution) { + return mergeFrom((com.google.maps.navconnect.v1.TripExecution) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.navconnect.v1.TripExecution other) { + if (other == com.google.maps.navconnect.v1.TripExecution.getDefaultInstance()) return this; + if (other.hasOrigin()) { + mergeOrigin(other.getOrigin()); + } + if (other.hasDestination()) { + mergeDestination(other.getDestination()); + } + if (other.hasLocation()) { + mergeLocation(other.getLocation()); + } + if (other.hasTraveledDuration()) { + mergeTraveledDuration(other.getTraveledDuration()); + } + if (other.hasRemainingDuration()) { + mergeRemainingDuration(other.getRemainingDuration()); + } + if (other.hasTraveledDistanceMeters()) { + setTraveledDistanceMeters(other.getTraveledDistanceMeters()); + } + if (other.hasRemainingDistanceMeters()) { + setRemainingDistanceMeters(other.getRemainingDistanceMeters()); + } + if (other.hasStopAddedInRoute()) { + setStopAddedInRoute(other.getStopAddedInRoute()); + } + 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(internalGetOriginFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetDestinationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetLocationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetTraveledDurationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetRemainingDurationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + traveledDistanceMeters_ = input.readInt32(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: + { + remainingDistanceMeters_ = input.readInt32(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 64: + { + stopAddedInRoute_ = input.readBool(); + bitField0_ |= 0x00000080; + break; + } // case 64 + 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.navconnect.v1.Location origin_; + private com.google.protobuf.SingleFieldBuilder< + com.google.maps.navconnect.v1.Location, + com.google.maps.navconnect.v1.Location.Builder, + com.google.maps.navconnect.v1.LocationOrBuilder> + originBuilder_; + + /** + * + * + *
+     * Output only. Origin of the trip which is generally the transporter's
+     * location at start of the NavConnect trip.
+     * 
+ * + * + * .google.maps.navconnect.v1.Location origin = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the origin field is set. + */ + public boolean hasOrigin() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Output only. Origin of the trip which is generally the transporter's
+     * location at start of the NavConnect trip.
+     * 
+ * + * + * .google.maps.navconnect.v1.Location origin = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The origin. + */ + public com.google.maps.navconnect.v1.Location getOrigin() { + if (originBuilder_ == null) { + return origin_ == null + ? com.google.maps.navconnect.v1.Location.getDefaultInstance() + : origin_; + } else { + return originBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Origin of the trip which is generally the transporter's
+     * location at start of the NavConnect trip.
+     * 
+ * + * + * .google.maps.navconnect.v1.Location origin = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setOrigin(com.google.maps.navconnect.v1.Location value) { + if (originBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + origin_ = value; + } else { + originBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Origin of the trip which is generally the transporter's
+     * location at start of the NavConnect trip.
+     * 
+ * + * + * .google.maps.navconnect.v1.Location origin = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setOrigin(com.google.maps.navconnect.v1.Location.Builder builderForValue) { + if (originBuilder_ == null) { + origin_ = builderForValue.build(); + } else { + originBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Origin of the trip which is generally the transporter's
+     * location at start of the NavConnect trip.
+     * 
+ * + * + * .google.maps.navconnect.v1.Location origin = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeOrigin(com.google.maps.navconnect.v1.Location value) { + if (originBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && origin_ != null + && origin_ != com.google.maps.navconnect.v1.Location.getDefaultInstance()) { + getOriginBuilder().mergeFrom(value); + } else { + origin_ = value; + } + } else { + originBuilder_.mergeFrom(value); + } + if (origin_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Origin of the trip which is generally the transporter's
+     * location at start of the NavConnect trip.
+     * 
+ * + * + * .google.maps.navconnect.v1.Location origin = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearOrigin() { + bitField0_ = (bitField0_ & ~0x00000001); + origin_ = null; + if (originBuilder_ != null) { + originBuilder_.dispose(); + originBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Origin of the trip which is generally the transporter's
+     * location at start of the NavConnect trip.
+     * 
+ * + * + * .google.maps.navconnect.v1.Location origin = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.maps.navconnect.v1.Location.Builder getOriginBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetOriginFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Origin of the trip which is generally the transporter's
+     * location at start of the NavConnect trip.
+     * 
+ * + * + * .google.maps.navconnect.v1.Location origin = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.maps.navconnect.v1.LocationOrBuilder getOriginOrBuilder() { + if (originBuilder_ != null) { + return originBuilder_.getMessageOrBuilder(); + } else { + return origin_ == null + ? com.google.maps.navconnect.v1.Location.getDefaultInstance() + : origin_; + } + } + + /** + * + * + *
+     * Output only. Origin of the trip which is generally the transporter's
+     * location at start of the NavConnect trip.
+     * 
+ * + * + * .google.maps.navconnect.v1.Location origin = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.maps.navconnect.v1.Location, + com.google.maps.navconnect.v1.Location.Builder, + com.google.maps.navconnect.v1.LocationOrBuilder> + internalGetOriginFieldBuilder() { + if (originBuilder_ == null) { + originBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.maps.navconnect.v1.Location, + com.google.maps.navconnect.v1.Location.Builder, + com.google.maps.navconnect.v1.LocationOrBuilder>( + getOrigin(), getParentForChildren(), isClean()); + origin_ = null; + } + return originBuilder_; + } + + private com.google.maps.navconnect.v1.Stop destination_; + private com.google.protobuf.SingleFieldBuilder< + com.google.maps.navconnect.v1.Stop, + com.google.maps.navconnect.v1.Stop.Builder, + com.google.maps.navconnect.v1.StopOrBuilder> + destinationBuilder_; + + /** + * + * + *
+     * Output only. The destination of the trip as reported by the mobile
+     * application.
+     * 
+ * + * + * .google.maps.navconnect.v1.Stop destination = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the destination field is set. + */ + public boolean hasDestination() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. The destination of the trip as reported by the mobile
+     * application.
+     * 
+ * + * + * .google.maps.navconnect.v1.Stop destination = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The destination. + */ + public com.google.maps.navconnect.v1.Stop getDestination() { + if (destinationBuilder_ == null) { + return destination_ == null + ? com.google.maps.navconnect.v1.Stop.getDefaultInstance() + : destination_; + } else { + return destinationBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The destination of the trip as reported by the mobile
+     * application.
+     * 
+ * + * + * .google.maps.navconnect.v1.Stop destination = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDestination(com.google.maps.navconnect.v1.Stop value) { + if (destinationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + destination_ = value; + } else { + destinationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The destination of the trip as reported by the mobile
+     * application.
+     * 
+ * + * + * .google.maps.navconnect.v1.Stop destination = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDestination(com.google.maps.navconnect.v1.Stop.Builder builderForValue) { + if (destinationBuilder_ == null) { + destination_ = builderForValue.build(); + } else { + destinationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The destination of the trip as reported by the mobile
+     * application.
+     * 
+ * + * + * .google.maps.navconnect.v1.Stop destination = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDestination(com.google.maps.navconnect.v1.Stop value) { + if (destinationBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && destination_ != null + && destination_ != com.google.maps.navconnect.v1.Stop.getDefaultInstance()) { + getDestinationBuilder().mergeFrom(value); + } else { + destination_ = value; + } + } else { + destinationBuilder_.mergeFrom(value); + } + if (destination_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The destination of the trip as reported by the mobile
+     * application.
+     * 
+ * + * + * .google.maps.navconnect.v1.Stop destination = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDestination() { + bitField0_ = (bitField0_ & ~0x00000002); + destination_ = null; + if (destinationBuilder_ != null) { + destinationBuilder_.dispose(); + destinationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The destination of the trip as reported by the mobile
+     * application.
+     * 
+ * + * + * .google.maps.navconnect.v1.Stop destination = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.maps.navconnect.v1.Stop.Builder getDestinationBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetDestinationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The destination of the trip as reported by the mobile
+     * application.
+     * 
+ * + * + * .google.maps.navconnect.v1.Stop destination = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.maps.navconnect.v1.StopOrBuilder getDestinationOrBuilder() { + if (destinationBuilder_ != null) { + return destinationBuilder_.getMessageOrBuilder(); + } else { + return destination_ == null + ? com.google.maps.navconnect.v1.Stop.getDefaultInstance() + : destination_; + } + } + + /** + * + * + *
+     * Output only. The destination of the trip as reported by the mobile
+     * application.
+     * 
+ * + * + * .google.maps.navconnect.v1.Stop destination = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.maps.navconnect.v1.Stop, + com.google.maps.navconnect.v1.Stop.Builder, + com.google.maps.navconnect.v1.StopOrBuilder> + internalGetDestinationFieldBuilder() { + if (destinationBuilder_ == null) { + destinationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.maps.navconnect.v1.Stop, + com.google.maps.navconnect.v1.Stop.Builder, + com.google.maps.navconnect.v1.StopOrBuilder>( + getDestination(), getParentForChildren(), isClean()); + destination_ = null; + } + return destinationBuilder_; + } + + private com.google.maps.navconnect.v1.Location location_; + private com.google.protobuf.SingleFieldBuilder< + com.google.maps.navconnect.v1.Location, + com.google.maps.navconnect.v1.Location.Builder, + com.google.maps.navconnect.v1.LocationOrBuilder> + locationBuilder_; + + /** + * + * + *
+     * Output only. The location signal representing the last known location of
+     * the transporter. This will be the road snapped location if available.
+     * 
+ * + * + * .google.maps.navconnect.v1.Location location = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the location field is set. + */ + public boolean hasLocation() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. The location signal representing the last known location of
+     * the transporter. This will be the road snapped location if available.
+     * 
+ * + * + * .google.maps.navconnect.v1.Location location = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The location. + */ + public com.google.maps.navconnect.v1.Location getLocation() { + if (locationBuilder_ == null) { + return location_ == null + ? com.google.maps.navconnect.v1.Location.getDefaultInstance() + : location_; + } else { + return locationBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The location signal representing the last known location of
+     * the transporter. This will be the road snapped location if available.
+     * 
+ * + * + * .google.maps.navconnect.v1.Location location = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLocation(com.google.maps.navconnect.v1.Location value) { + if (locationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + } else { + locationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The location signal representing the last known location of
+     * the transporter. This will be the road snapped location if available.
+     * 
+ * + * + * .google.maps.navconnect.v1.Location location = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLocation(com.google.maps.navconnect.v1.Location.Builder builderForValue) { + if (locationBuilder_ == null) { + location_ = builderForValue.build(); + } else { + locationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The location signal representing the last known location of
+     * the transporter. This will be the road snapped location if available.
+     * 
+ * + * + * .google.maps.navconnect.v1.Location location = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeLocation(com.google.maps.navconnect.v1.Location value) { + if (locationBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && location_ != null + && location_ != com.google.maps.navconnect.v1.Location.getDefaultInstance()) { + getLocationBuilder().mergeFrom(value); + } else { + location_ = value; + } + } else { + locationBuilder_.mergeFrom(value); + } + if (location_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The location signal representing the last known location of
+     * the transporter. This will be the road snapped location if available.
+     * 
+ * + * + * .google.maps.navconnect.v1.Location location = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearLocation() { + bitField0_ = (bitField0_ & ~0x00000004); + location_ = null; + if (locationBuilder_ != null) { + locationBuilder_.dispose(); + locationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The location signal representing the last known location of
+     * the transporter. This will be the road snapped location if available.
+     * 
+ * + * + * .google.maps.navconnect.v1.Location location = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.maps.navconnect.v1.Location.Builder getLocationBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetLocationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The location signal representing the last known location of
+     * the transporter. This will be the road snapped location if available.
+     * 
+ * + * + * .google.maps.navconnect.v1.Location location = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.maps.navconnect.v1.LocationOrBuilder getLocationOrBuilder() { + if (locationBuilder_ != null) { + return locationBuilder_.getMessageOrBuilder(); + } else { + return location_ == null + ? com.google.maps.navconnect.v1.Location.getDefaultInstance() + : location_; + } + } + + /** + * + * + *
+     * Output only. The location signal representing the last known location of
+     * the transporter. This will be the road snapped location if available.
+     * 
+ * + * + * .google.maps.navconnect.v1.Location location = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.maps.navconnect.v1.Location, + com.google.maps.navconnect.v1.Location.Builder, + com.google.maps.navconnect.v1.LocationOrBuilder> + internalGetLocationFieldBuilder() { + if (locationBuilder_ == null) { + locationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.maps.navconnect.v1.Location, + com.google.maps.navconnect.v1.Location.Builder, + com.google.maps.navconnect.v1.LocationOrBuilder>( + getLocation(), getParentForChildren(), isClean()); + location_ = null; + } + return locationBuilder_; + } + + private com.google.protobuf.Duration traveledDuration_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + traveledDurationBuilder_; + + /** + * + * + *
+     * Output only. Time traveled thus far.
+     * 
+ * + * + * .google.protobuf.Duration traveled_duration = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the traveledDuration field is set. + */ + public boolean hasTraveledDuration() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Output only. Time traveled thus far.
+     * 
+ * + * + * .google.protobuf.Duration traveled_duration = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The traveledDuration. + */ + public com.google.protobuf.Duration getTraveledDuration() { + if (traveledDurationBuilder_ == null) { + return traveledDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : traveledDuration_; + } else { + return traveledDurationBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Time traveled thus far.
+     * 
+ * + * + * .google.protobuf.Duration traveled_duration = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTraveledDuration(com.google.protobuf.Duration value) { + if (traveledDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + traveledDuration_ = value; + } else { + traveledDurationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Time traveled thus far.
+     * 
+ * + * + * .google.protobuf.Duration traveled_duration = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTraveledDuration(com.google.protobuf.Duration.Builder builderForValue) { + if (traveledDurationBuilder_ == null) { + traveledDuration_ = builderForValue.build(); + } else { + traveledDurationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Time traveled thus far.
+     * 
+ * + * + * .google.protobuf.Duration traveled_duration = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeTraveledDuration(com.google.protobuf.Duration value) { + if (traveledDurationBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && traveledDuration_ != null + && traveledDuration_ != com.google.protobuf.Duration.getDefaultInstance()) { + getTraveledDurationBuilder().mergeFrom(value); + } else { + traveledDuration_ = value; + } + } else { + traveledDurationBuilder_.mergeFrom(value); + } + if (traveledDuration_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Time traveled thus far.
+     * 
+ * + * + * .google.protobuf.Duration traveled_duration = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearTraveledDuration() { + bitField0_ = (bitField0_ & ~0x00000008); + traveledDuration_ = null; + if (traveledDurationBuilder_ != null) { + traveledDurationBuilder_.dispose(); + traveledDurationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Time traveled thus far.
+     * 
+ * + * + * .google.protobuf.Duration traveled_duration = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Duration.Builder getTraveledDurationBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetTraveledDurationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Time traveled thus far.
+     * 
+ * + * + * .google.protobuf.Duration traveled_duration = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.DurationOrBuilder getTraveledDurationOrBuilder() { + if (traveledDurationBuilder_ != null) { + return traveledDurationBuilder_.getMessageOrBuilder(); + } else { + return traveledDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : traveledDuration_; + } + } + + /** + * + * + *
+     * Output only. Time traveled thus far.
+     * 
+ * + * + * .google.protobuf.Duration traveled_duration = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetTraveledDurationFieldBuilder() { + if (traveledDurationBuilder_ == null) { + traveledDurationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getTraveledDuration(), getParentForChildren(), isClean()); + traveledDuration_ = null; + } + return traveledDurationBuilder_; + } + + private com.google.protobuf.Duration remainingDuration_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + remainingDurationBuilder_; + + /** + * + * + *
+     * Output only. Time left on this trip as estimated by Google.
+     * 
+ * + * + * .google.protobuf.Duration remaining_duration = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the remainingDuration field is set. + */ + public boolean hasRemainingDuration() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Output only. Time left on this trip as estimated by Google.
+     * 
+ * + * + * .google.protobuf.Duration remaining_duration = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The remainingDuration. + */ + public com.google.protobuf.Duration getRemainingDuration() { + if (remainingDurationBuilder_ == null) { + return remainingDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : remainingDuration_; + } else { + return remainingDurationBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Time left on this trip as estimated by Google.
+     * 
+ * + * + * .google.protobuf.Duration remaining_duration = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRemainingDuration(com.google.protobuf.Duration value) { + if (remainingDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + remainingDuration_ = value; + } else { + remainingDurationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Time left on this trip as estimated by Google.
+     * 
+ * + * + * .google.protobuf.Duration remaining_duration = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRemainingDuration(com.google.protobuf.Duration.Builder builderForValue) { + if (remainingDurationBuilder_ == null) { + remainingDuration_ = builderForValue.build(); + } else { + remainingDurationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Time left on this trip as estimated by Google.
+     * 
+ * + * + * .google.protobuf.Duration remaining_duration = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeRemainingDuration(com.google.protobuf.Duration value) { + if (remainingDurationBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && remainingDuration_ != null + && remainingDuration_ != com.google.protobuf.Duration.getDefaultInstance()) { + getRemainingDurationBuilder().mergeFrom(value); + } else { + remainingDuration_ = value; + } + } else { + remainingDurationBuilder_.mergeFrom(value); + } + if (remainingDuration_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Time left on this trip as estimated by Google.
+     * 
+ * + * + * .google.protobuf.Duration remaining_duration = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearRemainingDuration() { + bitField0_ = (bitField0_ & ~0x00000010); + remainingDuration_ = null; + if (remainingDurationBuilder_ != null) { + remainingDurationBuilder_.dispose(); + remainingDurationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Time left on this trip as estimated by Google.
+     * 
+ * + * + * .google.protobuf.Duration remaining_duration = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Duration.Builder getRemainingDurationBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetRemainingDurationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Time left on this trip as estimated by Google.
+     * 
+ * + * + * .google.protobuf.Duration remaining_duration = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.DurationOrBuilder getRemainingDurationOrBuilder() { + if (remainingDurationBuilder_ != null) { + return remainingDurationBuilder_.getMessageOrBuilder(); + } else { + return remainingDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : remainingDuration_; + } + } + + /** + * + * + *
+     * Output only. Time left on this trip as estimated by Google.
+     * 
+ * + * + * .google.protobuf.Duration remaining_duration = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetRemainingDurationFieldBuilder() { + if (remainingDurationBuilder_ == null) { + remainingDurationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getRemainingDuration(), getParentForChildren(), isClean()); + remainingDuration_ = null; + } + return remainingDurationBuilder_; + } + + private int traveledDistanceMeters_; + + /** + * + * + *
+     * Output only. Distance traveled from the origin in meters.
+     * 
+ * + * + * optional int32 traveled_distance_meters = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the traveledDistanceMeters field is set. + */ + @java.lang.Override + public boolean hasTraveledDistanceMeters() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Output only. Distance traveled from the origin in meters.
+     * 
+ * + * + * optional int32 traveled_distance_meters = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The traveledDistanceMeters. + */ + @java.lang.Override + public int getTraveledDistanceMeters() { + return traveledDistanceMeters_; + } + + /** + * + * + *
+     * Output only. Distance traveled from the origin in meters.
+     * 
+ * + * + * optional int32 traveled_distance_meters = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The traveledDistanceMeters to set. + * @return This builder for chaining. + */ + public Builder setTraveledDistanceMeters(int value) { + + traveledDistanceMeters_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Distance traveled from the origin in meters.
+     * 
+ * + * + * optional int32 traveled_distance_meters = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearTraveledDistanceMeters() { + bitField0_ = (bitField0_ & ~0x00000020); + traveledDistanceMeters_ = 0; + onChanged(); + return this; + } + + private int remainingDistanceMeters_; + + /** + * + * + *
+     * Output only. Distance remaining to the destination in meters.
+     * 
+ * + * + * optional int32 remaining_distance_meters = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the remainingDistanceMeters field is set. + */ + @java.lang.Override + public boolean hasRemainingDistanceMeters() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Output only. Distance remaining to the destination in meters.
+     * 
+ * + * + * optional int32 remaining_distance_meters = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The remainingDistanceMeters. + */ + @java.lang.Override + public int getRemainingDistanceMeters() { + return remainingDistanceMeters_; + } + + /** + * + * + *
+     * Output only. Distance remaining to the destination in meters.
+     * 
+ * + * + * optional int32 remaining_distance_meters = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The remainingDistanceMeters to set. + * @return This builder for chaining. + */ + public Builder setRemainingDistanceMeters(int value) { + + remainingDistanceMeters_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Distance remaining to the destination in meters.
+     * 
+ * + * + * optional int32 remaining_distance_meters = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearRemainingDistanceMeters() { + bitField0_ = (bitField0_ & ~0x00000040); + remainingDistanceMeters_ = 0; + onChanged(); + return this; + } + + private boolean stopAddedInRoute_; + + /** + * + * + *
+     * Output only. Indicates whether a stop was added along the route.
+     * 
+ * + * optional bool stop_added_in_route = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the stopAddedInRoute field is set. + */ + @java.lang.Override + public boolean hasStopAddedInRoute() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Output only. Indicates whether a stop was added along the route.
+     * 
+ * + * optional bool stop_added_in_route = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The stopAddedInRoute. + */ + @java.lang.Override + public boolean getStopAddedInRoute() { + return stopAddedInRoute_; + } + + /** + * + * + *
+     * Output only. Indicates whether a stop was added along the route.
+     * 
+ * + * optional bool stop_added_in_route = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The stopAddedInRoute to set. + * @return This builder for chaining. + */ + public Builder setStopAddedInRoute(boolean value) { + + stopAddedInRoute_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Indicates whether a stop was added along the route.
+     * 
+ * + * optional bool stop_added_in_route = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearStopAddedInRoute() { + bitField0_ = (bitField0_ & ~0x00000080); + stopAddedInRoute_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.maps.navconnect.v1.TripExecution) + } + + // @@protoc_insertion_point(class_scope:google.maps.navconnect.v1.TripExecution) + private static final com.google.maps.navconnect.v1.TripExecution DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.navconnect.v1.TripExecution(); + } + + public static com.google.maps.navconnect.v1.TripExecution getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TripExecution 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.navconnect.v1.TripExecution getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/TripExecutionOrBuilder.java b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/TripExecutionOrBuilder.java new file mode 100644 index 000000000000..f3ae7a1844a5 --- /dev/null +++ b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/TripExecutionOrBuilder.java @@ -0,0 +1,338 @@ +/* + * 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/navconnect/v1/navconnect_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.navconnect.v1; + +@com.google.protobuf.Generated +public interface TripExecutionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.navconnect.v1.TripExecution) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Origin of the trip which is generally the transporter's
+   * location at start of the NavConnect trip.
+   * 
+ * + * + * .google.maps.navconnect.v1.Location origin = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the origin field is set. + */ + boolean hasOrigin(); + + /** + * + * + *
+   * Output only. Origin of the trip which is generally the transporter's
+   * location at start of the NavConnect trip.
+   * 
+ * + * + * .google.maps.navconnect.v1.Location origin = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The origin. + */ + com.google.maps.navconnect.v1.Location getOrigin(); + + /** + * + * + *
+   * Output only. Origin of the trip which is generally the transporter's
+   * location at start of the NavConnect trip.
+   * 
+ * + * + * .google.maps.navconnect.v1.Location origin = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.maps.navconnect.v1.LocationOrBuilder getOriginOrBuilder(); + + /** + * + * + *
+   * Output only. The destination of the trip as reported by the mobile
+   * application.
+   * 
+ * + * + * .google.maps.navconnect.v1.Stop destination = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the destination field is set. + */ + boolean hasDestination(); + + /** + * + * + *
+   * Output only. The destination of the trip as reported by the mobile
+   * application.
+   * 
+ * + * + * .google.maps.navconnect.v1.Stop destination = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The destination. + */ + com.google.maps.navconnect.v1.Stop getDestination(); + + /** + * + * + *
+   * Output only. The destination of the trip as reported by the mobile
+   * application.
+   * 
+ * + * + * .google.maps.navconnect.v1.Stop destination = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.maps.navconnect.v1.StopOrBuilder getDestinationOrBuilder(); + + /** + * + * + *
+   * Output only. The location signal representing the last known location of
+   * the transporter. This will be the road snapped location if available.
+   * 
+ * + * + * .google.maps.navconnect.v1.Location location = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the location field is set. + */ + boolean hasLocation(); + + /** + * + * + *
+   * Output only. The location signal representing the last known location of
+   * the transporter. This will be the road snapped location if available.
+   * 
+ * + * + * .google.maps.navconnect.v1.Location location = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The location. + */ + com.google.maps.navconnect.v1.Location getLocation(); + + /** + * + * + *
+   * Output only. The location signal representing the last known location of
+   * the transporter. This will be the road snapped location if available.
+   * 
+ * + * + * .google.maps.navconnect.v1.Location location = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.maps.navconnect.v1.LocationOrBuilder getLocationOrBuilder(); + + /** + * + * + *
+   * Output only. Time traveled thus far.
+   * 
+ * + * + * .google.protobuf.Duration traveled_duration = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the traveledDuration field is set. + */ + boolean hasTraveledDuration(); + + /** + * + * + *
+   * Output only. Time traveled thus far.
+   * 
+ * + * + * .google.protobuf.Duration traveled_duration = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The traveledDuration. + */ + com.google.protobuf.Duration getTraveledDuration(); + + /** + * + * + *
+   * Output only. Time traveled thus far.
+   * 
+ * + * + * .google.protobuf.Duration traveled_duration = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.DurationOrBuilder getTraveledDurationOrBuilder(); + + /** + * + * + *
+   * Output only. Time left on this trip as estimated by Google.
+   * 
+ * + * + * .google.protobuf.Duration remaining_duration = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the remainingDuration field is set. + */ + boolean hasRemainingDuration(); + + /** + * + * + *
+   * Output only. Time left on this trip as estimated by Google.
+   * 
+ * + * + * .google.protobuf.Duration remaining_duration = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The remainingDuration. + */ + com.google.protobuf.Duration getRemainingDuration(); + + /** + * + * + *
+   * Output only. Time left on this trip as estimated by Google.
+   * 
+ * + * + * .google.protobuf.Duration remaining_duration = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.DurationOrBuilder getRemainingDurationOrBuilder(); + + /** + * + * + *
+   * Output only. Distance traveled from the origin in meters.
+   * 
+ * + * optional int32 traveled_distance_meters = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the traveledDistanceMeters field is set. + */ + boolean hasTraveledDistanceMeters(); + + /** + * + * + *
+   * Output only. Distance traveled from the origin in meters.
+   * 
+ * + * optional int32 traveled_distance_meters = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The traveledDistanceMeters. + */ + int getTraveledDistanceMeters(); + + /** + * + * + *
+   * Output only. Distance remaining to the destination in meters.
+   * 
+ * + * + * optional int32 remaining_distance_meters = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the remainingDistanceMeters field is set. + */ + boolean hasRemainingDistanceMeters(); + + /** + * + * + *
+   * Output only. Distance remaining to the destination in meters.
+   * 
+ * + * + * optional int32 remaining_distance_meters = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The remainingDistanceMeters. + */ + int getRemainingDistanceMeters(); + + /** + * + * + *
+   * Output only. Indicates whether a stop was added along the route.
+   * 
+ * + * optional bool stop_added_in_route = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the stopAddedInRoute field is set. + */ + boolean hasStopAddedInRoute(); + + /** + * + * + *
+   * Output only. Indicates whether a stop was added along the route.
+   * 
+ * + * optional bool stop_added_in_route = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The stopAddedInRoute. + */ + boolean getStopAddedInRoute(); +} diff --git a/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/TripName.java b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/TripName.java new file mode 100644 index 000000000000..0297d4873976 --- /dev/null +++ b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/TripName.java @@ -0,0 +1,191 @@ +/* + * 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.navconnect.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class TripName implements ResourceName { + private static final PathTemplate PROJECT_TRIP = + PathTemplate.createWithoutUrlEncoding("projects/{project}/trips/{trip}"); + private volatile Map fieldValuesMap; + private final String project; + private final String trip; + + @Deprecated + protected TripName() { + project = null; + trip = null; + } + + private TripName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + trip = Preconditions.checkNotNull(builder.getTrip()); + } + + public String getProject() { + return project; + } + + public String getTrip() { + return trip; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static TripName of(String project, String trip) { + return newBuilder().setProject(project).setTrip(trip).build(); + } + + public static String format(String project, String trip) { + return newBuilder().setProject(project).setTrip(trip).build().toString(); + } + + public static TripName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_TRIP.validatedMatch( + formattedString, "TripName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("trip")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (TripName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_TRIP.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (trip != null) { + fieldMapBuilder.put("trip", trip); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_TRIP.instantiate("project", project, "trip", trip); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + TripName that = ((TripName) o); + return Objects.equals(this.project, that.project) && Objects.equals(this.trip, that.trip); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(trip); + return h; + } + + /** Builder for projects/{project}/trips/{trip}. */ + public static class Builder { + private String project; + private String trip; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getTrip() { + return trip; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setTrip(String trip) { + this.trip = trip; + return this; + } + + private Builder(TripName tripName) { + this.project = tripName.project; + this.trip = tripName.trip; + } + + public TripName build() { + return new TripName(this); + } + } +} diff --git a/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/TripOrBuilder.java b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/TripOrBuilder.java new file mode 100644 index 000000000000..b3fda2694562 --- /dev/null +++ b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/java/com/google/maps/navconnect/v1/TripOrBuilder.java @@ -0,0 +1,376 @@ +/* + * 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/navconnect/v1/navconnect_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.maps.navconnect.v1; + +@com.google.protobuf.Generated +public interface TripOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.navconnect.v1.Trip) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Identifier. The resource name of the trip.
+   * Format: projects/{project_number}/trips/{trip_id}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Output only. Identifier. The resource name of the trip.
+   * Format: projects/{project_number}/trips/{trip_id}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Immutable. The configuration for the trip.
+   * 
+ * + * + * .google.maps.navconnect.v1.TripConfig config = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the config field is set. + */ + boolean hasConfig(); + + /** + * + * + *
+   * Immutable. The configuration for the trip.
+   * 
+ * + * + * .google.maps.navconnect.v1.TripConfig config = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The config. + */ + com.google.maps.navconnect.v1.TripConfig getConfig(); + + /** + * + * + *
+   * Immutable. The configuration for the trip.
+   * 
+ * + * + * .google.maps.navconnect.v1.TripConfig config = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.maps.navconnect.v1.TripConfigOrBuilder getConfigOrBuilder(); + + /** + * + * + *
+   * Input only. Immutable. The Android application ID of the mobile application
+   * that will use the trip. At least one of `android_app_id` or `ios_app_id`
+   * must be set.
+   * 
+ * + * + * string android_app_id = 8 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The androidAppId. + */ + java.lang.String getAndroidAppId(); + + /** + * + * + *
+   * Input only. Immutable. The Android application ID of the mobile application
+   * that will use the trip. At least one of `android_app_id` or `ios_app_id`
+   * must be set.
+   * 
+ * + * + * string android_app_id = 8 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for androidAppId. + */ + com.google.protobuf.ByteString getAndroidAppIdBytes(); + + /** + * + * + *
+   * Input only. Immutable. The iOS bundle ID of the mobile application that
+   * will use the trip. At least one of `android_app_id` or `ios_app_id` must be
+   * set.
+   * 
+ * + * + * string ios_app_id = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The iosAppId. + */ + java.lang.String getIosAppId(); + + /** + * + * + *
+   * Input only. Immutable. The iOS bundle ID of the mobile application that
+   * will use the trip. At least one of `android_app_id` or `ios_app_id` must be
+   * set.
+   * 
+ * + * + * string ios_app_id = 9 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for iosAppId. + */ + com.google.protobuf.ByteString getIosAppIdBytes(); + + /** + * + * + *
+   * Output only. An opaque token that authorizes access to begin a NavConnect
+   * trip in Google Maps or Waze and grants these applications access to update
+   * the trip. Only returned by `CreateTrip`.
+   * 
+ * + * + * .google.maps.navconnect.v1.AuthToken auth_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the authToken field is set. + */ + boolean hasAuthToken(); + + /** + * + * + *
+   * Output only. An opaque token that authorizes access to begin a NavConnect
+   * trip in Google Maps or Waze and grants these applications access to update
+   * the trip. Only returned by `CreateTrip`.
+   * 
+ * + * + * .google.maps.navconnect.v1.AuthToken auth_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The authToken. + */ + com.google.maps.navconnect.v1.AuthToken getAuthToken(); + + /** + * + * + *
+   * Output only. An opaque token that authorizes access to begin a NavConnect
+   * trip in Google Maps or Waze and grants these applications access to update
+   * the trip. Only returned by `CreateTrip`.
+   * 
+ * + * + * .google.maps.navconnect.v1.AuthToken auth_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.maps.navconnect.v1.AuthTokenOrBuilder getAuthTokenOrBuilder(); + + /** + * + * + *
+   * Output only. The Trip state.
+   * 
+ * + * + * .google.maps.navconnect.v1.Trip.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
+   * Output only. The Trip state.
+   * 
+ * + * + * .google.maps.navconnect.v1.Trip.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.maps.navconnect.v1.Trip.State getState(); + + /** + * + * + *
+   * Output only. The latest data about the execution of the trip. This may not
+   * be set if the trip is in an error state.
+   * 
+ * + * + * .google.maps.navconnect.v1.TripExecution execution = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the execution field is set. + */ + boolean hasExecution(); + + /** + * + * + *
+   * Output only. The latest data about the execution of the trip. This may not
+   * be set if the trip is in an error state.
+   * 
+ * + * + * .google.maps.navconnect.v1.TripExecution execution = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The execution. + */ + com.google.maps.navconnect.v1.TripExecution getExecution(); + + /** + * + * + *
+   * Output only. The latest data about the execution of the trip. This may not
+   * be set if the trip is in an error state.
+   * 
+ * + * + * .google.maps.navconnect.v1.TripExecution execution = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.maps.navconnect.v1.TripExecutionOrBuilder getExecutionOrBuilder(); + + /** + * + * + *
+   * Output only. Time according to the server when the trip was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. Time according to the server when the trip was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. Time according to the server when the trip was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time at which the server received the latest trip update.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. Time at which the server received the latest trip update.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. Time at which the server received the latest trip update.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/proto/google/maps/navconnect/v1/navconnect_service.proto b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/proto/google/maps/navconnect/v1/navconnect_service.proto new file mode 100644 index 000000000000..a5292fcf612c --- /dev/null +++ b/java-maps-navigationconnect/proto-google-maps-navigationconnect-v1/src/main/proto/google/maps/navconnect/v1/navconnect_service.proto @@ -0,0 +1,263 @@ +// 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.navconnect.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/type/latlng.proto"; + +option go_package = "cloud.google.com/go/maps/navconnect/apiv1/navconnectpb;navconnectpb"; +option java_multiple_files = true; +option java_outer_classname = "NavConnectServiceProto"; +option java_package = "com.google.maps.navconnect.v1"; + +// Service for NavConnect clients to create and get trips. +service NavConnectService { + option (google.api.default_host) = "navigationconnect.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a trip. This must be called before the mobile application can start + // the trip. The returned trip will have the `auth_token` field set. + rpc CreateTrip(CreateTripRequest) returns (Trip) { + option (google.api.http) = { + post: "/v1/{parent=projects/*}/trips" + body: "trip" + }; + option (google.api.method_signature) = "parent,trip,trip_id"; + } + + // Gets a trip. + rpc GetTrip(GetTripRequest) returns (Trip) { + option (google.api.http) = { + get: "/v1/{name=projects/*/trips/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// A trip. +message Trip { + option (google.api.resource) = { + type: "navconnect.googleapis.com/Trip" + pattern: "projects/{project}/trips/{trip}" + plural: "trips" + singular: "trip" + }; + + // All possible trip states. + enum State { + // The trip state is unspecified. + STATE_UNSPECIFIED = 0; + + // The trip was created but has not yet started. + NEW = 1; + + // The transporter is enroute to the destination. + ENROUTE = 2; + + // The transporter arrived at the destination. + ARRIVED = 3; + + // The trip was suspended. + SUSPENDED = 4; + + // The trip failed to complete successfully. + FAILED = 5; + + // The trip failed due to a client error. + CLIENT_ERROR = 6; + } + + // Output only. Identifier. The resource name of the trip. + // Format: projects/{project_number}/trips/{trip_id}. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IDENTIFIER + ]; + + // Immutable. The configuration for the trip. + TripConfig config = 7 [(google.api.field_behavior) = IMMUTABLE]; + + // Input only. Immutable. The Android application ID of the mobile application + // that will use the trip. At least one of `android_app_id` or `ios_app_id` + // must be set. + string android_app_id = 8 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Input only. Immutable. The iOS bundle ID of the mobile application that + // will use the trip. At least one of `android_app_id` or `ios_app_id` must be + // set. + string ios_app_id = 9 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Output only. An opaque token that authorizes access to begin a NavConnect + // trip in Google Maps or Waze and grants these applications access to update + // the trip. Only returned by `CreateTrip`. + AuthToken auth_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Trip state. + State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The latest data about the execution of the trip. This may not + // be set if the trip is in an error state. + TripExecution execution = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time according to the server when the trip was created. + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the server received the latest trip update. + google.protobuf.Timestamp update_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Configuration for the trip. +message TripConfig { + // Optional. Whether to enable high frequency trip updates. + // + // NOTE: Enabling this feature logs the trip under Enterprise Tier usage, and + // is subject to Enterprise Tier rates. + bool enable_high_frequency_updates = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether to enable pubsub notifications for the trip. + bool enable_pubsub = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, only the specified subset of the Trip fields will be + // included in the pubsub notifications. + // + // If not set, all Trip fields will be included in the pubsub notifications + // (default behavior). + // + // The following fields are not supported: + // + // * `android_app_id` + // * `ios_app_id` + // * `auth_token` + // * `config` + // + // NOTE: This field is ignored if `enable_pubsub` is false. + google.protobuf.FieldMask pubsub_field_mask = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// An authentication token. +message AuthToken { + // Output only. The authentication token that should be passed to the mobile + // application. + string token = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the authentication token will expire. + google.protobuf.Timestamp expire_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Data about the execution of the trip. +message TripExecution { + // Output only. Origin of the trip which is generally the transporter's + // location at start of the NavConnect trip. + Location origin = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The destination of the trip as reported by the mobile + // application. + Stop destination = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The location signal representing the last known location of + // the transporter. This will be the road snapped location if available. + Location location = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time traveled thus far. + google.protobuf.Duration traveled_duration = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time left on this trip as estimated by Google. + google.protobuf.Duration remaining_duration = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Distance traveled from the origin in meters. + optional int32 traveled_distance_meters = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Distance remaining to the destination in meters. + optional int32 remaining_distance_meters = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Indicates whether a stop was added along the route. + optional bool stop_added_in_route = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A stop in the trip where some task is to be performed. +message Stop { + // Required. The location of the stop as a lat/lng. + google.type.LatLng point = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// A location as reported by the mobile application. +message Location { + // Output only. The location lat/lng. + google.type.LatLng point = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the location was sourced as denoted by the + // client. + google.protobuf.Timestamp source_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which the server received this location update. + google.protobuf.Timestamp server_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for NavConnectService.CreateTrip. +message CreateTripRequest { + // Required. The parent resource under which this trip will be created. + // Format: projects/{project_number} + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the trip, which will become the final component + // of the trip's resource name. + // + // This value must be a valid RFC-4122 UUID. + string trip_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = REQUIRED + ]; + + // Required. The trip to create. + Trip trip = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for NavConnectService.GetTrip. +message GetTripRequest { + // Required. The resource name of the trip to get. + // Format: projects/{project}/trips/{trip_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "navconnect.googleapis.com/Trip" } + ]; +} diff --git a/java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/create/SyncCreateSetCredentialsProvider.java b/java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..a00416faa6bb --- /dev/null +++ b/java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/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.navconnect.v1.samples; + +// [START navigationconnect_v1_generated_NavConnectService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.maps.navconnect.v1.NavConnectServiceClient; +import com.google.maps.navconnect.v1.NavConnectServiceSettings; +import com.google.maps.navconnect.v1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NavConnectServiceSettings navConnectServiceSettings = + NavConnectServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + NavConnectServiceClient navConnectServiceClient = + NavConnectServiceClient.create(navConnectServiceSettings); + } +} +// [END navigationconnect_v1_generated_NavConnectService_Create_SetCredentialsProvider_sync] diff --git a/java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/create/SyncCreateSetEndpoint.java b/java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..a97014e07b4f --- /dev/null +++ b/java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/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.navconnect.v1.samples; + +// [START navigationconnect_v1_generated_NavConnectService_Create_SetEndpoint_sync] +import com.google.maps.navconnect.v1.NavConnectServiceClient; +import com.google.maps.navconnect.v1.NavConnectServiceSettings; +import com.google.maps.navconnect.v1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + NavConnectServiceSettings navConnectServiceSettings = + NavConnectServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + NavConnectServiceClient navConnectServiceClient = + NavConnectServiceClient.create(navConnectServiceSettings); + } +} +// [END navigationconnect_v1_generated_NavConnectService_Create_SetEndpoint_sync] diff --git a/java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/create/SyncCreateUseHttpJsonTransport.java b/java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/create/SyncCreateUseHttpJsonTransport.java new file mode 100644 index 000000000000..d5f5d3e1ee6c --- /dev/null +++ b/java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/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.navconnect.v1.samples; + +// [START navigationconnect_v1_generated_NavConnectService_Create_UseHttpJsonTransport_sync] +import com.google.maps.navconnect.v1.NavConnectServiceClient; +import com.google.maps.navconnect.v1.NavConnectServiceSettings; + +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 + NavConnectServiceSettings navConnectServiceSettings = + NavConnectServiceSettings.newHttpJsonBuilder().build(); + NavConnectServiceClient navConnectServiceClient = + NavConnectServiceClient.create(navConnectServiceSettings); + } +} +// [END navigationconnect_v1_generated_NavConnectService_Create_UseHttpJsonTransport_sync] diff --git a/java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/createtrip/AsyncCreateTrip.java b/java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/createtrip/AsyncCreateTrip.java new file mode 100644 index 000000000000..a1b7782a6a1e --- /dev/null +++ b/java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/createtrip/AsyncCreateTrip.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.navconnect.v1.samples; + +// [START navigationconnect_v1_generated_NavConnectService_CreateTrip_async] +import com.google.api.core.ApiFuture; +import com.google.maps.navconnect.v1.CreateTripRequest; +import com.google.maps.navconnect.v1.NavConnectServiceClient; +import com.google.maps.navconnect.v1.Trip; + +public class AsyncCreateTrip { + + public static void main(String[] args) throws Exception { + asyncCreateTrip(); + } + + public static void asyncCreateTrip() 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 (NavConnectServiceClient navConnectServiceClient = NavConnectServiceClient.create()) { + CreateTripRequest request = + CreateTripRequest.newBuilder() + .setParent("parent-995424086") + .setTripId("tripId-865466336") + .setTrip(Trip.newBuilder().build()) + .build(); + ApiFuture future = navConnectServiceClient.createTripCallable().futureCall(request); + // Do something. + Trip response = future.get(); + } + } +} +// [END navigationconnect_v1_generated_NavConnectService_CreateTrip_async] diff --git a/java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/createtrip/SyncCreateTrip.java b/java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/createtrip/SyncCreateTrip.java new file mode 100644 index 000000000000..797bed911929 --- /dev/null +++ b/java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/createtrip/SyncCreateTrip.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.navconnect.v1.samples; + +// [START navigationconnect_v1_generated_NavConnectService_CreateTrip_sync] +import com.google.maps.navconnect.v1.CreateTripRequest; +import com.google.maps.navconnect.v1.NavConnectServiceClient; +import com.google.maps.navconnect.v1.Trip; + +public class SyncCreateTrip { + + public static void main(String[] args) throws Exception { + syncCreateTrip(); + } + + public static void syncCreateTrip() 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 (NavConnectServiceClient navConnectServiceClient = NavConnectServiceClient.create()) { + CreateTripRequest request = + CreateTripRequest.newBuilder() + .setParent("parent-995424086") + .setTripId("tripId-865466336") + .setTrip(Trip.newBuilder().build()) + .build(); + Trip response = navConnectServiceClient.createTrip(request); + } + } +} +// [END navigationconnect_v1_generated_NavConnectService_CreateTrip_sync] diff --git a/java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/createtrip/SyncCreateTripStringTripString.java b/java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/createtrip/SyncCreateTripStringTripString.java new file mode 100644 index 000000000000..0a7babb5c67c --- /dev/null +++ b/java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/createtrip/SyncCreateTripStringTripString.java @@ -0,0 +1,43 @@ +/* + * 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.navconnect.v1.samples; + +// [START navigationconnect_v1_generated_NavConnectService_CreateTrip_StringTripString_sync] +import com.google.maps.navconnect.v1.NavConnectServiceClient; +import com.google.maps.navconnect.v1.Trip; + +public class SyncCreateTripStringTripString { + + public static void main(String[] args) throws Exception { + syncCreateTripStringTripString(); + } + + public static void syncCreateTripStringTripString() 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 (NavConnectServiceClient navConnectServiceClient = NavConnectServiceClient.create()) { + String parent = "parent-995424086"; + Trip trip = Trip.newBuilder().build(); + String tripId = "tripId-865466336"; + Trip response = navConnectServiceClient.createTrip(parent, trip, tripId); + } + } +} +// [END navigationconnect_v1_generated_NavConnectService_CreateTrip_StringTripString_sync] diff --git a/java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/gettrip/AsyncGetTrip.java b/java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/gettrip/AsyncGetTrip.java new file mode 100644 index 000000000000..05481eec7628 --- /dev/null +++ b/java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/gettrip/AsyncGetTrip.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.navconnect.v1.samples; + +// [START navigationconnect_v1_generated_NavConnectService_GetTrip_async] +import com.google.api.core.ApiFuture; +import com.google.maps.navconnect.v1.GetTripRequest; +import com.google.maps.navconnect.v1.NavConnectServiceClient; +import com.google.maps.navconnect.v1.Trip; +import com.google.maps.navconnect.v1.TripName; + +public class AsyncGetTrip { + + public static void main(String[] args) throws Exception { + asyncGetTrip(); + } + + public static void asyncGetTrip() 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 (NavConnectServiceClient navConnectServiceClient = NavConnectServiceClient.create()) { + GetTripRequest request = + GetTripRequest.newBuilder() + .setName(TripName.of("[PROJECT]", "[TRIP]").toString()) + .build(); + ApiFuture future = navConnectServiceClient.getTripCallable().futureCall(request); + // Do something. + Trip response = future.get(); + } + } +} +// [END navigationconnect_v1_generated_NavConnectService_GetTrip_async] diff --git a/java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/gettrip/SyncGetTrip.java b/java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/gettrip/SyncGetTrip.java new file mode 100644 index 000000000000..e4cc553d0f9f --- /dev/null +++ b/java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/gettrip/SyncGetTrip.java @@ -0,0 +1,46 @@ +/* + * 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.navconnect.v1.samples; + +// [START navigationconnect_v1_generated_NavConnectService_GetTrip_sync] +import com.google.maps.navconnect.v1.GetTripRequest; +import com.google.maps.navconnect.v1.NavConnectServiceClient; +import com.google.maps.navconnect.v1.Trip; +import com.google.maps.navconnect.v1.TripName; + +public class SyncGetTrip { + + public static void main(String[] args) throws Exception { + syncGetTrip(); + } + + public static void syncGetTrip() 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 (NavConnectServiceClient navConnectServiceClient = NavConnectServiceClient.create()) { + GetTripRequest request = + GetTripRequest.newBuilder() + .setName(TripName.of("[PROJECT]", "[TRIP]").toString()) + .build(); + Trip response = navConnectServiceClient.getTrip(request); + } + } +} +// [END navigationconnect_v1_generated_NavConnectService_GetTrip_sync] diff --git a/java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/gettrip/SyncGetTripString.java b/java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/gettrip/SyncGetTripString.java new file mode 100644 index 000000000000..78e52b51a2f9 --- /dev/null +++ b/java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/gettrip/SyncGetTripString.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.navconnect.v1.samples; + +// [START navigationconnect_v1_generated_NavConnectService_GetTrip_String_sync] +import com.google.maps.navconnect.v1.NavConnectServiceClient; +import com.google.maps.navconnect.v1.Trip; +import com.google.maps.navconnect.v1.TripName; + +public class SyncGetTripString { + + public static void main(String[] args) throws Exception { + syncGetTripString(); + } + + public static void syncGetTripString() 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 (NavConnectServiceClient navConnectServiceClient = NavConnectServiceClient.create()) { + String name = TripName.of("[PROJECT]", "[TRIP]").toString(); + Trip response = navConnectServiceClient.getTrip(name); + } + } +} +// [END navigationconnect_v1_generated_NavConnectService_GetTrip_String_sync] diff --git a/java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/gettrip/SyncGetTripTripname.java b/java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/gettrip/SyncGetTripTripname.java new file mode 100644 index 000000000000..6d98a2f8bdb2 --- /dev/null +++ b/java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservice/gettrip/SyncGetTripTripname.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.navconnect.v1.samples; + +// [START navigationconnect_v1_generated_NavConnectService_GetTrip_Tripname_sync] +import com.google.maps.navconnect.v1.NavConnectServiceClient; +import com.google.maps.navconnect.v1.Trip; +import com.google.maps.navconnect.v1.TripName; + +public class SyncGetTripTripname { + + public static void main(String[] args) throws Exception { + syncGetTripTripname(); + } + + public static void syncGetTripTripname() 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 (NavConnectServiceClient navConnectServiceClient = NavConnectServiceClient.create()) { + TripName name = TripName.of("[PROJECT]", "[TRIP]"); + Trip response = navConnectServiceClient.getTrip(name); + } + } +} +// [END navigationconnect_v1_generated_NavConnectService_GetTrip_Tripname_sync] diff --git a/java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservicesettings/createtrip/SyncCreateTrip.java b/java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservicesettings/createtrip/SyncCreateTrip.java new file mode 100644 index 000000000000..be47cfcb874b --- /dev/null +++ b/java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/navconnectservicesettings/createtrip/SyncCreateTrip.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.navconnect.v1.samples; + +// [START navigationconnect_v1_generated_NavConnectServiceSettings_CreateTrip_sync] +import com.google.maps.navconnect.v1.NavConnectServiceSettings; +import java.time.Duration; + +public class SyncCreateTrip { + + public static void main(String[] args) throws Exception { + syncCreateTrip(); + } + + public static void syncCreateTrip() 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 + NavConnectServiceSettings.Builder navConnectServiceSettingsBuilder = + NavConnectServiceSettings.newBuilder(); + navConnectServiceSettingsBuilder + .createTripSettings() + .setRetrySettings( + navConnectServiceSettingsBuilder + .createTripSettings() + .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()); + NavConnectServiceSettings navConnectServiceSettings = navConnectServiceSettingsBuilder.build(); + } +} +// [END navigationconnect_v1_generated_NavConnectServiceSettings_CreateTrip_sync] diff --git a/java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/stub/navconnectservicestubsettings/createtrip/SyncCreateTrip.java b/java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/stub/navconnectservicestubsettings/createtrip/SyncCreateTrip.java new file mode 100644 index 000000000000..33509f99ba05 --- /dev/null +++ b/java-maps-navigationconnect/samples/snippets/generated/com/google/maps/navconnect/v1/stub/navconnectservicestubsettings/createtrip/SyncCreateTrip.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.navconnect.v1.stub.samples; + +// [START navigationconnect_v1_generated_NavConnectServiceStubSettings_CreateTrip_sync] +import com.google.maps.navconnect.v1.stub.NavConnectServiceStubSettings; +import java.time.Duration; + +public class SyncCreateTrip { + + public static void main(String[] args) throws Exception { + syncCreateTrip(); + } + + public static void syncCreateTrip() 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 + NavConnectServiceStubSettings.Builder navConnectServiceSettingsBuilder = + NavConnectServiceStubSettings.newBuilder(); + navConnectServiceSettingsBuilder + .createTripSettings() + .setRetrySettings( + navConnectServiceSettingsBuilder + .createTripSettings() + .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()); + NavConnectServiceStubSettings navConnectServiceSettings = + navConnectServiceSettingsBuilder.build(); + } +} +// [END navigationconnect_v1_generated_NavConnectServiceStubSettings_CreateTrip_sync] diff --git a/pom.xml b/pom.xml index 76fbb03a2f1f..7bf4ebce5257 100644 --- a/pom.xml +++ b/pom.xml @@ -148,6 +148,7 @@ java-maps-fleetengine java-maps-fleetengine-delivery java-maps-mapsplatformdatasets + java-maps-navigationconnect java-maps-places java-maps-routeoptimization java-maps-routing diff --git a/versions.txt b/versions.txt index af9a5462d534..b6172576a8e3 100644 --- a/versions.txt +++ b/versions.txt @@ -980,3 +980,6 @@ proto-google-cloud-networkconnectivity-v1beta:1.86.0:1.87.0-SNAPSHOT grpc-google-cloud-networkconnectivity-v1beta:1.86.0:1.87.0-SNAPSHOT proto-google-cloud-hypercomputecluster-v1:0.7.0:0.8.0-SNAPSHOT grpc-google-cloud-hypercomputecluster-v1:0.7.0:0.8.0-SNAPSHOT +google-maps-navigationconnect:0.0.0:0.0.1-SNAPSHOT +proto-google-maps-navigationconnect-v1:0.0.0:0.0.1-SNAPSHOT +grpc-google-maps-navigationconnect-v1:0.0.0:0.0.1-SNAPSHOT From 99a59f8cd14f501e9d3d34491ce8d1b3996a7e2a Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Thu, 19 Mar 2026 16:33:46 +0000 Subject: [PATCH 3/3] chore: generate libraries at Thu Mar 19 16:32:05 UTC 2026 --- java-maps-navigationconnect/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java-maps-navigationconnect/pom.xml b/java-maps-navigationconnect/pom.xml index 459c43b20602..641bea7cd4f7 100644 --- a/java-maps-navigationconnect/pom.xml +++ b/java-maps-navigationconnect/pom.xml @@ -52,4 +52,4 @@ google-maps-navigationconnect-bom - +