diff --git a/generation_config.yaml b/generation_config.yaml index ffe4ac94d60d..643965133ad3 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1274,6 +1274,25 @@ libraries: GAPICs: - proto_path: google/maps/areainsights/v1 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 + 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 + release_level: preview + distribution_name: com.google.maps:google-maps-fleetengine + api_id: maps-fleetengine.googleapis.com + library_type: GAPIC_AUTO + group_id: com.google.maps + cloud_api: false + GAPICs: + - proto_path: google/maps/fleetengine/v1 + requires_billing: true - api_shortname: maps-mapsplatformdatasets name_pretty: Maps Platform Datasets API product_documentation: https://developers.google.com/maps/documentation diff --git a/java-maps-fleetengine/.OwlBot-hermetic.yaml b/java-maps-fleetengine/.OwlBot-hermetic.yaml new file mode 100644 index 000000000000..6248bc68e648 --- /dev/null +++ b/java-maps-fleetengine/.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-fleetengine/grpc-google-.*/src" +- "/java-maps-fleetengine/proto-google-.*/src" +- "/java-maps-fleetengine/google-.*/src" +- "/java-maps-fleetengine/samples/snippets/generated" + +deep-preserve-regex: +- "/java-maps-fleetengine/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" + +deep-copy-regex: +- source: "/google/maps/fleetengine/(v.*)/.*-java/proto-google-.*/src" + dest: "/owl-bot-staging/java-maps-fleetengine/$1/proto-google-maps-fleetengine-$1/src" +- source: "/google/maps/fleetengine/(v.*)/.*-java/grpc-google-.*/src" + dest: "/owl-bot-staging/java-maps-fleetengine/$1/grpc-google-maps-fleetengine-$1/src" +- source: "/google/maps/fleetengine/(v.*)/.*-java/gapic-google-.*/src" + dest: "/owl-bot-staging/java-maps-fleetengine/$1/google-maps-fleetengine/src" +- source: "/google/maps/fleetengine/(v.*)/.*-java/samples/snippets/generated" + dest: "/owl-bot-staging/java-maps-fleetengine/$1/samples/snippets/generated" + +api-name: maps-fleetengine \ No newline at end of file diff --git a/java-maps-fleetengine/.repo-metadata.json b/java-maps-fleetengine/.repo-metadata.json new file mode 100644 index 000000000000..92c2f940f88b --- /dev/null +++ b/java-maps-fleetengine/.repo-metadata.json @@ -0,0 +1,16 @@ +{ + "api_shortname": "maps-fleetengine", + "name_pretty": "Local Rides and Deliveries API", + "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", + "release_level": "preview", + "transport": "grpc", + "language": "java", + "repo": "googleapis/google-cloud-java", + "repo_short": "java-maps-fleetengine", + "distribution_name": "com.google.maps:google-maps-fleetengine", + "api_id": "maps-fleetengine.googleapis.com", + "library_type": "GAPIC_AUTO", + "requires_billing": true +} \ No newline at end of file diff --git a/java-maps-fleetengine/README.md b/java-maps-fleetengine/README.md new file mode 100644 index 000000000000..e717c624dfbf --- /dev/null +++ b/java-maps-fleetengine/README.md @@ -0,0 +1,224 @@ +# Google Local Rides and Deliveries API Client for Java + +Java idiomatic client for [Local Rides and Deliveries API][product-docs]. + +[![Maven][maven-version-image]][maven-version-link] +![Stability][stability-image] + +- [Product Documentation][product-docs] +- [Client Library Documentation][javadocs] + +> Note: This client is a work-in-progress, and may occasionally +> make backwards-incompatible changes. + + +## Quickstart + + +If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: + +```xml + + + + com.google.cloud + libraries-bom + 26.50.0 + pom + import + + + + + + + com.google.maps + google-maps-fleetengine + + +``` + +If you are using Maven without the BOM, add this to your dependencies: + + +```xml + + com.google.maps + google-maps-fleetengine + 0.0.0 + +``` + +If you are using Gradle without BOM, add this to your dependencies: + +```Groovy +implementation 'com.google.maps:google-maps-fleetengine:0.0.0' +``` + +If you are using SBT, add this to your dependencies: + +```Scala +libraryDependencies += "com.google.maps" % "google-maps-fleetengine" % "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 Local Rides and Deliveries API APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the Local Rides and Deliveries API API calls. + +## Getting Started + +### Prerequisites + +You will need a [Google Cloud Platform Console][developer-console] project with the Local Rides and Deliveries API [API enabled][enable-api]. +You will need to [enable billing][enable-billing] to use Google Local Rides and Deliveries 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-fleetengine` library. See the [Quickstart](#quickstart) section +to add `google-maps-fleetengine` as a dependency in your code. + +## About Local Rides and Deliveries API + + +[Local Rides and Deliveries API][product-docs] 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. + +See the [Local Rides and Deliveries API client library docs][javadocs] to learn how to +use this Local Rides and Deliveries API Client Library. + + + + + + +## Troubleshooting + +To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. + +## Transport + +Local Rides and Deliveries API uses gRPC for the transport layer. + +## Supported Java Versions + +Java 8 or above is required for using this client. + +Google's Java client libraries, +[Google Cloud Client Libraries][cloudlibs] +and +[Google Cloud API Libraries][apilibs], +follow the +[Oracle Java SE support roadmap][oracle] +(see the Oracle Java SE Product Releases section). + +### For new development + +In general, new feature development occurs with support for the lowest Java +LTS version covered by Oracle's Premier Support (which typically lasts 5 years +from initial General Availability). If the minimum required JVM for a given +library is changed, it is accompanied by a [semver][semver] major release. + +Java 11 and (in September 2021) Java 17 are the best choices for new +development. + +### Keeping production systems current + +Google tests its client libraries with all current LTS versions covered by +Oracle's Extended Support (which typically lasts 8 years from initial +General Availability). + +#### Legacy support + +Google's client libraries support legacy versions of Java runtimes with long +term stable libraries that don't receive feature updates on a best efforts basis +as it may not be possible to backport all patches. + +Google provides updates on a best efforts basis to apps that continue to use +Java 7, though apps might need to upgrade to current versions of the library +that supports their JVM. + +#### Where to find specific information + +The latest versions and the supported Java versions are identified on +the individual GitHub repository `github.com/GoogleAPIs/java-SERVICENAME` +and on [google-cloud-java][g-c-j]. + +## Versioning + + +This library follows [Semantic Versioning](http://semver.org/). + + +It is currently in major version zero (``0.y.z``), which means that anything may change at any time +and the public API should not be considered stable. + + +## Contributing + + +Contributions to this library are always welcome and highly encouraged. + +See [CONTRIBUTING][contributing] for more information how to get started. + +Please note that this project is released with a Contributor Code of Conduct. By participating in +this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more +information. + + +## License + +Apache 2.0 - See [LICENSE][license] for more information. + +## CI Status + +Java Version | Status +------------ | ------ +Java 8 | [![Kokoro CI][kokoro-badge-image-2]][kokoro-badge-link-2] +Java 8 OSX | [![Kokoro CI][kokoro-badge-image-3]][kokoro-badge-link-3] +Java 8 Windows | [![Kokoro CI][kokoro-badge-image-4]][kokoro-badge-link-4] +Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5] + +Java is a registered trademark of Oracle and/or its affiliates. + +[product-docs]: https://developers.google.com/maps/documentation/transportation-logistics/mobility +[javadocs]: https://cloud.google.com/java/docs/reference/google-maps-fleetengine/latest/overview +[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java7.svg +[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java7.html +[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8.svg +[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8.html +[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-osx.svg +[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-osx.html +[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-win.svg +[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-win.html +[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.svg +[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html +[stability-image]: https://img.shields.io/badge/stability-preview-yellow +[maven-version-image]: https://img.shields.io/maven-central/v/com.google.maps/google-maps-fleetengine.svg +[maven-version-link]: https://central.sonatype.com/artifact/com.google.maps/google-maps-fleetengine/0.0.0 +[authentication]: https://github.com/googleapis/google-cloud-java#authentication +[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes +[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles +[iam-policy]: https://cloud.google.com/iam/docs/overview#cloud-iam-policy +[developer-console]: https://console.developers.google.com/ +[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects +[cloud-cli]: https://cloud.google.com/cli +[troubleshooting]: https://github.com/googleapis/google-cloud-java/blob/main/TROUBLESHOOTING.md +[contributing]: https://github.com/googleapis/google-cloud-java/blob/main/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/google-cloud-java/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/google-cloud-java/blob/main/LICENSE +[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing +[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=maps-fleetengine.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-fleetengine/google-maps-fleetengine-bom/pom.xml b/java-maps-fleetengine/google-maps-fleetengine-bom/pom.xml new file mode 100644 index 000000000000..8752b39e3a1e --- /dev/null +++ b/java-maps-fleetengine/google-maps-fleetengine-bom/pom.xml @@ -0,0 +1,43 @@ + + + 4.0.0 + com.google.maps + google-maps-fleetengine-bom + 0.0.1-SNAPSHOT + pom + + com.google.cloud + google-cloud-pom-parent + 1.48.0-SNAPSHOT + ../../google-cloud-pom-parent/pom.xml + + + Google Local Rides and Deliveries API BOM + + BOM for Local Rides and Deliveries API + + + + true + + + + + + com.google.maps + google-maps-fleetengine + 0.0.1-SNAPSHOT + + + com.google.maps.api.grpc + grpc-google-maps-fleetengine-v1 + 0.0.1-SNAPSHOT + + + com.google.maps.api.grpc + proto-google-maps-fleetengine-v1 + 0.0.1-SNAPSHOT + + + + diff --git a/java-maps-fleetengine/google-maps-fleetengine/pom.xml b/java-maps-fleetengine/google-maps-fleetengine/pom.xml new file mode 100644 index 000000000000..60923fa87d8b --- /dev/null +++ b/java-maps-fleetengine/google-maps-fleetengine/pom.xml @@ -0,0 +1,115 @@ + + + 4.0.0 + com.google.maps + google-maps-fleetengine + 0.0.1-SNAPSHOT + jar + Google Local Rides and Deliveries API + Local Rides and Deliveries API 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. + + com.google.maps + google-maps-fleetengine-parent + 0.0.1-SNAPSHOT + + + google-maps-fleetengine + + + + 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-fleetengine-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-fleetengine-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-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/TripServiceClient.java b/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/TripServiceClient.java new file mode 100644 index 000000000000..ab0d91f69781 --- /dev/null +++ b/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/TripServiceClient.java @@ -0,0 +1,700 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.fleetengine.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.maps.fleetengine.v1.stub.TripServiceStub; +import com.google.maps.fleetengine.v1.stub.TripServiceStubSettings; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Trip management service. + * + *

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 (TripServiceClient tripServiceClient = TripServiceClient.create()) {
+ *   CreateTripRequest request =
+ *       CreateTripRequest.newBuilder()
+ *           .setHeader(RequestHeader.newBuilder().build())
+ *           .setParent(TripName.of("[PROVIDER]", "[TRIP]").toString())
+ *           .setTripId("tripId-865466336")
+ *           .setTrip(Trip.newBuilder().build())
+ *           .build();
+ *   Trip response = tripServiceClient.createTrip(request);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the TripServiceClient 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 in the Fleet Engine and returns the new trip.

+ *

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

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

+ *

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

Get information about a single trip.

+ *

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

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

+ *

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

+ *
    + *
  • getTripCallable() + *

+ *

ReportBillableTrip

Report billable trip usage.

+ *

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

+ *
    + *
  • reportBillableTrip(ReportBillableTripRequest request) + *

+ *

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

+ *
    + *
  • reportBillableTripCallable() + *

+ *

SearchTrips

Get all the trips for a specific vehicle.

+ *

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

+ *
    + *
  • searchTrips(SearchTripsRequest request) + *

+ *

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

+ *
    + *
  • searchTripsPagedCallable() + *

  • searchTripsCallable() + *

+ *

UpdateTrip

Updates trip data.

+ *

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

+ *
    + *
  • updateTrip(UpdateTripRequest request) + *

+ *

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

+ *
    + *
  • updateTripCallable() + *

+ *
+ * + *

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 TripServiceSettings 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
+ * TripServiceSettings tripServiceSettings =
+ *     TripServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * TripServiceClient tripServiceClient = TripServiceClient.create(tripServiceSettings);
+ * }
+ * + *

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
+ * TripServiceSettings tripServiceSettings =
+ *     TripServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * TripServiceClient tripServiceClient = TripServiceClient.create(tripServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class TripServiceClient implements BackgroundResource { + private final TripServiceSettings settings; + private final TripServiceStub stub; + + /** Constructs an instance of TripServiceClient with default settings. */ + public static final TripServiceClient create() throws IOException { + return create(TripServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of TripServiceClient, 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 TripServiceClient create(TripServiceSettings settings) throws IOException { + return new TripServiceClient(settings); + } + + /** + * Constructs an instance of TripServiceClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(TripServiceSettings). + */ + public static final TripServiceClient create(TripServiceStub stub) { + return new TripServiceClient(stub); + } + + /** + * Constructs an instance of TripServiceClient, 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 TripServiceClient(TripServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((TripServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected TripServiceClient(TripServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final TripServiceSettings getSettings() { + return settings; + } + + public TripServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a trip in the Fleet Engine and returns the new 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 (TripServiceClient tripServiceClient = TripServiceClient.create()) {
+   *   CreateTripRequest request =
+   *       CreateTripRequest.newBuilder()
+   *           .setHeader(RequestHeader.newBuilder().build())
+   *           .setParent(TripName.of("[PROVIDER]", "[TRIP]").toString())
+   *           .setTripId("tripId-865466336")
+   *           .setTrip(Trip.newBuilder().build())
+   *           .build();
+   *   Trip response = tripServiceClient.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 in the Fleet Engine and returns the new 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 (TripServiceClient tripServiceClient = TripServiceClient.create()) {
+   *   CreateTripRequest request =
+   *       CreateTripRequest.newBuilder()
+   *           .setHeader(RequestHeader.newBuilder().build())
+   *           .setParent(TripName.of("[PROVIDER]", "[TRIP]").toString())
+   *           .setTripId("tripId-865466336")
+   *           .setTrip(Trip.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = tripServiceClient.createTripCallable().futureCall(request);
+   *   // Do something.
+   *   Trip response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createTripCallable() { + return stub.createTripCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get information about a single 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 (TripServiceClient tripServiceClient = TripServiceClient.create()) {
+   *   GetTripRequest request =
+   *       GetTripRequest.newBuilder()
+   *           .setHeader(RequestHeader.newBuilder().build())
+   *           .setName(TripName.of("[PROVIDER]", "[TRIP]").toString())
+   *           .setView(TripView.forNumber(0))
+   *           .setCurrentRouteSegmentVersion(Timestamp.newBuilder().build())
+   *           .setRemainingWaypointsVersion(Timestamp.newBuilder().build())
+   *           .setRouteFormatType(PolylineFormatType.forNumber(0))
+   *           .setCurrentRouteSegmentTrafficVersion(Timestamp.newBuilder().build())
+   *           .setRemainingWaypointsRouteVersion(Timestamp.newBuilder().build())
+   *           .build();
+   *   Trip response = tripServiceClient.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. + /** + * Get information about a single 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 (TripServiceClient tripServiceClient = TripServiceClient.create()) {
+   *   GetTripRequest request =
+   *       GetTripRequest.newBuilder()
+   *           .setHeader(RequestHeader.newBuilder().build())
+   *           .setName(TripName.of("[PROVIDER]", "[TRIP]").toString())
+   *           .setView(TripView.forNumber(0))
+   *           .setCurrentRouteSegmentVersion(Timestamp.newBuilder().build())
+   *           .setRemainingWaypointsVersion(Timestamp.newBuilder().build())
+   *           .setRouteFormatType(PolylineFormatType.forNumber(0))
+   *           .setCurrentRouteSegmentTrafficVersion(Timestamp.newBuilder().build())
+   *           .setRemainingWaypointsRouteVersion(Timestamp.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = tripServiceClient.getTripCallable().futureCall(request);
+   *   // Do something.
+   *   Trip response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getTripCallable() { + return stub.getTripCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Report billable trip usage. + * + *

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 (TripServiceClient tripServiceClient = TripServiceClient.create()) {
+   *   ReportBillableTripRequest request =
+   *       ReportBillableTripRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setCountryCode("countryCode-1477067101")
+   *           .setPlatform(BillingPlatformIdentifier.forNumber(0))
+   *           .addAllRelatedIds(new ArrayList())
+   *           .build();
+   *   tripServiceClient.reportBillableTrip(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 void reportBillableTrip(ReportBillableTripRequest request) { + reportBillableTripCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Report billable trip usage. + * + *

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 (TripServiceClient tripServiceClient = TripServiceClient.create()) {
+   *   ReportBillableTripRequest request =
+   *       ReportBillableTripRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setCountryCode("countryCode-1477067101")
+   *           .setPlatform(BillingPlatformIdentifier.forNumber(0))
+   *           .addAllRelatedIds(new ArrayList())
+   *           .build();
+   *   ApiFuture future = tripServiceClient.reportBillableTripCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable reportBillableTripCallable() { + return stub.reportBillableTripCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get all the trips for a specific vehicle. + * + *

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 (TripServiceClient tripServiceClient = TripServiceClient.create()) {
+   *   SearchTripsRequest request =
+   *       SearchTripsRequest.newBuilder()
+   *           .setHeader(RequestHeader.newBuilder().build())
+   *           .setParent("parent-995424086")
+   *           .setVehicleId("vehicleId-1984135833")
+   *           .setActiveTripsOnly(true)
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setMinimumStaleness(Duration.newBuilder().build())
+   *           .build();
+   *   for (Trip element : tripServiceClient.searchTrips(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 SearchTripsPagedResponse searchTrips(SearchTripsRequest request) { + return searchTripsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get all the trips for a specific vehicle. + * + *

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 (TripServiceClient tripServiceClient = TripServiceClient.create()) {
+   *   SearchTripsRequest request =
+   *       SearchTripsRequest.newBuilder()
+   *           .setHeader(RequestHeader.newBuilder().build())
+   *           .setParent("parent-995424086")
+   *           .setVehicleId("vehicleId-1984135833")
+   *           .setActiveTripsOnly(true)
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setMinimumStaleness(Duration.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = tripServiceClient.searchTripsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Trip element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + searchTripsPagedCallable() { + return stub.searchTripsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get all the trips for a specific vehicle. + * + *

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 (TripServiceClient tripServiceClient = TripServiceClient.create()) {
+   *   SearchTripsRequest request =
+   *       SearchTripsRequest.newBuilder()
+   *           .setHeader(RequestHeader.newBuilder().build())
+   *           .setParent("parent-995424086")
+   *           .setVehicleId("vehicleId-1984135833")
+   *           .setActiveTripsOnly(true)
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setMinimumStaleness(Duration.newBuilder().build())
+   *           .build();
+   *   while (true) {
+   *     SearchTripsResponse response = tripServiceClient.searchTripsCallable().call(request);
+   *     for (Trip element : response.getTripsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable searchTripsCallable() { + return stub.searchTripsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates trip data. + * + *

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 (TripServiceClient tripServiceClient = TripServiceClient.create()) {
+   *   UpdateTripRequest request =
+   *       UpdateTripRequest.newBuilder()
+   *           .setHeader(RequestHeader.newBuilder().build())
+   *           .setName("name3373707")
+   *           .setTrip(Trip.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Trip response = tripServiceClient.updateTrip(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 updateTrip(UpdateTripRequest request) { + return updateTripCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates trip data. + * + *

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 (TripServiceClient tripServiceClient = TripServiceClient.create()) {
+   *   UpdateTripRequest request =
+   *       UpdateTripRequest.newBuilder()
+   *           .setHeader(RequestHeader.newBuilder().build())
+   *           .setName("name3373707")
+   *           .setTrip(Trip.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = tripServiceClient.updateTripCallable().futureCall(request);
+   *   // Do something.
+   *   Trip response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateTripCallable() { + return stub.updateTripCallable(); + } + + @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); + } + + public static class SearchTripsPagedResponse + extends AbstractPagedListResponse< + SearchTripsRequest, + SearchTripsResponse, + Trip, + SearchTripsPage, + SearchTripsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + SearchTripsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new SearchTripsPagedResponse(input), MoreExecutors.directExecutor()); + } + + private SearchTripsPagedResponse(SearchTripsPage page) { + super(page, SearchTripsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class SearchTripsPage + extends AbstractPage { + + private SearchTripsPage( + PageContext context, + SearchTripsResponse response) { + super(context, response); + } + + private static SearchTripsPage createEmptyPage() { + return new SearchTripsPage(null, null); + } + + @Override + protected SearchTripsPage createPage( + PageContext context, + SearchTripsResponse response) { + return new SearchTripsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class SearchTripsFixedSizeCollection + extends AbstractFixedSizeCollection< + SearchTripsRequest, + SearchTripsResponse, + Trip, + SearchTripsPage, + SearchTripsFixedSizeCollection> { + + private SearchTripsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static SearchTripsFixedSizeCollection createEmptyCollection() { + return new SearchTripsFixedSizeCollection(null, 0); + } + + @Override + protected SearchTripsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new SearchTripsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/TripServiceSettings.java b/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/TripServiceSettings.java new file mode 100644 index 000000000000..8a9a2ee345ee --- /dev/null +++ b/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/TripServiceSettings.java @@ -0,0 +1,243 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.fleetengine.v1; + +import static com.google.maps.fleetengine.v1.TripServiceClient.SearchTripsPagedResponse; + +import com.google.api.core.ApiFunction; +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.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.maps.fleetengine.v1.stub.TripServiceStubSettings; +import com.google.protobuf.Empty; +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 TripServiceClient}. + * + *

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

    + *
  • The default service address (fleetengine.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
+ * TripServiceSettings.Builder tripServiceSettingsBuilder = TripServiceSettings.newBuilder();
+ * tripServiceSettingsBuilder
+ *     .createTripSettings()
+ *     .setRetrySettings(
+ *         tripServiceSettingsBuilder
+ *             .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());
+ * TripServiceSettings tripServiceSettings = tripServiceSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for + * additional support in setting retries. + */ +@Generated("by gapic-generator-java") +public class TripServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createTrip. */ + public UnaryCallSettings createTripSettings() { + return ((TripServiceStubSettings) getStubSettings()).createTripSettings(); + } + + /** Returns the object with the settings used for calls to getTrip. */ + public UnaryCallSettings getTripSettings() { + return ((TripServiceStubSettings) getStubSettings()).getTripSettings(); + } + + /** Returns the object with the settings used for calls to reportBillableTrip. */ + public UnaryCallSettings reportBillableTripSettings() { + return ((TripServiceStubSettings) getStubSettings()).reportBillableTripSettings(); + } + + /** Returns the object with the settings used for calls to searchTrips. */ + public PagedCallSettings + searchTripsSettings() { + return ((TripServiceStubSettings) getStubSettings()).searchTripsSettings(); + } + + /** Returns the object with the settings used for calls to updateTrip. */ + public UnaryCallSettings updateTripSettings() { + return ((TripServiceStubSettings) getStubSettings()).updateTripSettings(); + } + + public static final TripServiceSettings create(TripServiceStubSettings stub) throws IOException { + return new TripServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return TripServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return TripServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return TripServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return TripServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return TripServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return TripServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return TripServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** 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 TripServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for TripServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(TripServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(TripServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(TripServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(TripServiceStubSettings.newBuilder()); + } + + public TripServiceStubSettings.Builder getStubSettingsBuilder() { + return ((TripServiceStubSettings.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(); + } + + /** Returns the builder for the settings used for calls to reportBillableTrip. */ + public UnaryCallSettings.Builder + reportBillableTripSettings() { + return getStubSettingsBuilder().reportBillableTripSettings(); + } + + /** Returns the builder for the settings used for calls to searchTrips. */ + public PagedCallSettings.Builder< + SearchTripsRequest, SearchTripsResponse, SearchTripsPagedResponse> + searchTripsSettings() { + return getStubSettingsBuilder().searchTripsSettings(); + } + + /** Returns the builder for the settings used for calls to updateTrip. */ + public UnaryCallSettings.Builder updateTripSettings() { + return getStubSettingsBuilder().updateTripSettings(); + } + + @Override + public TripServiceSettings build() throws IOException { + return new TripServiceSettings(this); + } + } +} diff --git a/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/VehicleServiceClient.java b/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/VehicleServiceClient.java new file mode 100644 index 000000000000..e03cfa2fa926 --- /dev/null +++ b/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/VehicleServiceClient.java @@ -0,0 +1,958 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.fleetengine.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.maps.fleetengine.v1.stub.VehicleServiceStub; +import com.google.maps.fleetengine.v1.stub.VehicleServiceStubSettings; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Vehicle management service. + * + *

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 (VehicleServiceClient vehicleServiceClient = VehicleServiceClient.create()) {
+ *   CreateVehicleRequest request =
+ *       CreateVehicleRequest.newBuilder()
+ *           .setHeader(RequestHeader.newBuilder().build())
+ *           .setParent("parent-995424086")
+ *           .setVehicleId("vehicleId-1984135833")
+ *           .setVehicle(Vehicle.newBuilder().build())
+ *           .build();
+ *   Vehicle response = vehicleServiceClient.createVehicle(request);
+ * }
+ * }
+ * + *

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

CreateVehicle

Instantiates a new vehicle associated with an on-demand rideshare or deliveries provider. Each `Vehicle` must have a unique vehicle ID. + *

The following `Vehicle` fields are required when creating a `Vehicle`: + *

    + *
  • `vehicleState` + *
  • `supportedTripTypes` + *
  • `maximumCapacity` + *
  • `vehicleType` + *
+ *

The following `Vehicle` fields are ignored when creating a `Vehicle`: + *

    + *
  • `name` + *
  • `currentTrips` + *
  • `availableCapacity` + *
  • `current_route_segment` + *
  • `current_route_segment_end_point` + *
  • `current_route_segment_version` + *
  • `current_route_segment_traffic` + *
  • `route` + *
  • `waypoints` + *
  • `waypoints_version` + *
  • `remaining_distance_meters` + *
  • `remaining_time_seconds` + *
  • `eta_to_next_waypoint` + *
  • `navigation_status` + *
+ *

All other fields are optional and used if provided.

+ *

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

+ *
    + *
  • createVehicle(CreateVehicleRequest request) + *

+ *

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

+ *
    + *
  • createVehicleCallable() + *

+ *

GetVehicle

Returns a vehicle from the Fleet Engine.

+ *

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

+ *
    + *
  • getVehicle(GetVehicleRequest request) + *

+ *

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

+ *
    + *
  • getVehicleCallable() + *

+ *

UpdateVehicle

Writes updated vehicle data to the Fleet Engine. + *

When updating a `Vehicle`, the following fields cannot be updated since they are managed by the server: + *

    + *
  • `currentTrips` + *
  • `availableCapacity` + *
  • `current_route_segment_version` + *
  • `waypoints_version` + *
+ *

The vehicle `name` also cannot be updated. + *

If the `attributes` field is updated, **all** the vehicle's attributes are replaced with the attributes provided in the request. If you want to update only some attributes, see the `UpdateVehicleAttributes` method. Likewise, the `waypoints` field can be updated, but must contain all the waypoints currently on the vehicle, and no other waypoints.

+ *

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

+ *
    + *
  • updateVehicle(UpdateVehicleRequest request) + *

+ *

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

+ *
    + *
  • updateVehicleCallable() + *

+ *

UpdateVehicleAttributes

Partially updates a vehicle's attributes. Only the attributes mentioned in the request will be updated, other attributes will NOT be altered. Note: this is different in `UpdateVehicle`, where the whole `attributes` field will be replaced by the one in `UpdateVehicleRequest`, attributes not in the request would be removed.

+ *

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

+ *
    + *
  • updateVehicleAttributes(UpdateVehicleAttributesRequest request) + *

+ *

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

+ *
    + *
  • updateVehicleAttributesCallable() + *

+ *

ListVehicles

Returns a paginated list of vehicles associated with a provider that match the request options.

+ *

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

+ *
    + *
  • listVehicles(ListVehiclesRequest request) + *

+ *

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

+ *
    + *
  • listVehiclesPagedCallable() + *

  • listVehiclesCallable() + *

+ *

SearchVehicles

Returns a list of vehicles that match the request options.

+ *

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

+ *
    + *
  • searchVehicles(SearchVehiclesRequest request) + *

+ *

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

+ *
    + *
  • searchVehiclesCallable() + *

+ *
+ * + *

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 VehicleServiceSettings 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
+ * VehicleServiceSettings vehicleServiceSettings =
+ *     VehicleServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * VehicleServiceClient vehicleServiceClient = VehicleServiceClient.create(vehicleServiceSettings);
+ * }
+ * + *

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
+ * VehicleServiceSettings vehicleServiceSettings =
+ *     VehicleServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * VehicleServiceClient vehicleServiceClient = VehicleServiceClient.create(vehicleServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class VehicleServiceClient implements BackgroundResource { + private final VehicleServiceSettings settings; + private final VehicleServiceStub stub; + + /** Constructs an instance of VehicleServiceClient with default settings. */ + public static final VehicleServiceClient create() throws IOException { + return create(VehicleServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of VehicleServiceClient, 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 VehicleServiceClient create(VehicleServiceSettings settings) + throws IOException { + return new VehicleServiceClient(settings); + } + + /** + * Constructs an instance of VehicleServiceClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(VehicleServiceSettings). + */ + public static final VehicleServiceClient create(VehicleServiceStub stub) { + return new VehicleServiceClient(stub); + } + + /** + * Constructs an instance of VehicleServiceClient, 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 VehicleServiceClient(VehicleServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((VehicleServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected VehicleServiceClient(VehicleServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final VehicleServiceSettings getSettings() { + return settings; + } + + public VehicleServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Instantiates a new vehicle associated with an on-demand rideshare or deliveries provider. Each + * `Vehicle` must have a unique vehicle ID. + * + *

The following `Vehicle` fields are required when creating a `Vehicle`: + * + *

    + *
  • `vehicleState` + *
  • `supportedTripTypes` + *
  • `maximumCapacity` + *
  • `vehicleType` + *
+ * + *

The following `Vehicle` fields are ignored when creating a `Vehicle`: + * + *

    + *
  • `name` + *
  • `currentTrips` + *
  • `availableCapacity` + *
  • `current_route_segment` + *
  • `current_route_segment_end_point` + *
  • `current_route_segment_version` + *
  • `current_route_segment_traffic` + *
  • `route` + *
  • `waypoints` + *
  • `waypoints_version` + *
  • `remaining_distance_meters` + *
  • `remaining_time_seconds` + *
  • `eta_to_next_waypoint` + *
  • `navigation_status` + *
+ * + *

All other fields are optional and used if provided. + * + *

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 (VehicleServiceClient vehicleServiceClient = VehicleServiceClient.create()) {
+   *   CreateVehicleRequest request =
+   *       CreateVehicleRequest.newBuilder()
+   *           .setHeader(RequestHeader.newBuilder().build())
+   *           .setParent("parent-995424086")
+   *           .setVehicleId("vehicleId-1984135833")
+   *           .setVehicle(Vehicle.newBuilder().build())
+   *           .build();
+   *   Vehicle response = vehicleServiceClient.createVehicle(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 Vehicle createVehicle(CreateVehicleRequest request) { + return createVehicleCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Instantiates a new vehicle associated with an on-demand rideshare or deliveries provider. Each + * `Vehicle` must have a unique vehicle ID. + * + *

The following `Vehicle` fields are required when creating a `Vehicle`: + * + *

    + *
  • `vehicleState` + *
  • `supportedTripTypes` + *
  • `maximumCapacity` + *
  • `vehicleType` + *
+ * + *

The following `Vehicle` fields are ignored when creating a `Vehicle`: + * + *

    + *
  • `name` + *
  • `currentTrips` + *
  • `availableCapacity` + *
  • `current_route_segment` + *
  • `current_route_segment_end_point` + *
  • `current_route_segment_version` + *
  • `current_route_segment_traffic` + *
  • `route` + *
  • `waypoints` + *
  • `waypoints_version` + *
  • `remaining_distance_meters` + *
  • `remaining_time_seconds` + *
  • `eta_to_next_waypoint` + *
  • `navigation_status` + *
+ * + *

All other fields are optional and used if provided. + * + *

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 (VehicleServiceClient vehicleServiceClient = VehicleServiceClient.create()) {
+   *   CreateVehicleRequest request =
+   *       CreateVehicleRequest.newBuilder()
+   *           .setHeader(RequestHeader.newBuilder().build())
+   *           .setParent("parent-995424086")
+   *           .setVehicleId("vehicleId-1984135833")
+   *           .setVehicle(Vehicle.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = vehicleServiceClient.createVehicleCallable().futureCall(request);
+   *   // Do something.
+   *   Vehicle response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createVehicleCallable() { + return stub.createVehicleCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a vehicle from the Fleet Engine. + * + *

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 (VehicleServiceClient vehicleServiceClient = VehicleServiceClient.create()) {
+   *   GetVehicleRequest request =
+   *       GetVehicleRequest.newBuilder()
+   *           .setHeader(RequestHeader.newBuilder().build())
+   *           .setName(VehicleName.of("[PROVIDER]", "[VEHICLE]").toString())
+   *           .setCurrentRouteSegmentVersion(Timestamp.newBuilder().build())
+   *           .setWaypointsVersion(Timestamp.newBuilder().build())
+   *           .build();
+   *   Vehicle response = vehicleServiceClient.getVehicle(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 Vehicle getVehicle(GetVehicleRequest request) { + return getVehicleCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a vehicle from the Fleet Engine. + * + *

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 (VehicleServiceClient vehicleServiceClient = VehicleServiceClient.create()) {
+   *   GetVehicleRequest request =
+   *       GetVehicleRequest.newBuilder()
+   *           .setHeader(RequestHeader.newBuilder().build())
+   *           .setName(VehicleName.of("[PROVIDER]", "[VEHICLE]").toString())
+   *           .setCurrentRouteSegmentVersion(Timestamp.newBuilder().build())
+   *           .setWaypointsVersion(Timestamp.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = vehicleServiceClient.getVehicleCallable().futureCall(request);
+   *   // Do something.
+   *   Vehicle response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getVehicleCallable() { + return stub.getVehicleCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Writes updated vehicle data to the Fleet Engine. + * + *

When updating a `Vehicle`, the following fields cannot be updated since they are managed by + * the server: + * + *

    + *
  • `currentTrips` + *
  • `availableCapacity` + *
  • `current_route_segment_version` + *
  • `waypoints_version` + *
+ * + *

The vehicle `name` also cannot be updated. + * + *

If the `attributes` field is updated, **all** the vehicle's attributes are + * replaced with the attributes provided in the request. If you want to update only some + * attributes, see the `UpdateVehicleAttributes` method. Likewise, the `waypoints` field can be + * updated, but must contain all the waypoints currently on the vehicle, and no other waypoints. + * + *

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 (VehicleServiceClient vehicleServiceClient = VehicleServiceClient.create()) {
+   *   UpdateVehicleRequest request =
+   *       UpdateVehicleRequest.newBuilder()
+   *           .setHeader(RequestHeader.newBuilder().build())
+   *           .setName("name3373707")
+   *           .setVehicle(Vehicle.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Vehicle response = vehicleServiceClient.updateVehicle(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 Vehicle updateVehicle(UpdateVehicleRequest request) { + return updateVehicleCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Writes updated vehicle data to the Fleet Engine. + * + *

When updating a `Vehicle`, the following fields cannot be updated since they are managed by + * the server: + * + *

    + *
  • `currentTrips` + *
  • `availableCapacity` + *
  • `current_route_segment_version` + *
  • `waypoints_version` + *
+ * + *

The vehicle `name` also cannot be updated. + * + *

If the `attributes` field is updated, **all** the vehicle's attributes are + * replaced with the attributes provided in the request. If you want to update only some + * attributes, see the `UpdateVehicleAttributes` method. Likewise, the `waypoints` field can be + * updated, but must contain all the waypoints currently on the vehicle, and no other waypoints. + * + *

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 (VehicleServiceClient vehicleServiceClient = VehicleServiceClient.create()) {
+   *   UpdateVehicleRequest request =
+   *       UpdateVehicleRequest.newBuilder()
+   *           .setHeader(RequestHeader.newBuilder().build())
+   *           .setName("name3373707")
+   *           .setVehicle(Vehicle.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = vehicleServiceClient.updateVehicleCallable().futureCall(request);
+   *   // Do something.
+   *   Vehicle response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateVehicleCallable() { + return stub.updateVehicleCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Partially updates a vehicle's attributes. Only the attributes mentioned in the request will be + * updated, other attributes will NOT be altered. Note: this is different in `UpdateVehicle`, + * where the whole `attributes` field will be replaced by the one in `UpdateVehicleRequest`, + * attributes not in the request would be removed. + * + *

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 (VehicleServiceClient vehicleServiceClient = VehicleServiceClient.create()) {
+   *   UpdateVehicleAttributesRequest request =
+   *       UpdateVehicleAttributesRequest.newBuilder()
+   *           .setHeader(RequestHeader.newBuilder().build())
+   *           .setName("name3373707")
+   *           .addAllAttributes(new ArrayList())
+   *           .build();
+   *   UpdateVehicleAttributesResponse response =
+   *       vehicleServiceClient.updateVehicleAttributes(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 UpdateVehicleAttributesResponse updateVehicleAttributes( + UpdateVehicleAttributesRequest request) { + return updateVehicleAttributesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Partially updates a vehicle's attributes. Only the attributes mentioned in the request will be + * updated, other attributes will NOT be altered. Note: this is different in `UpdateVehicle`, + * where the whole `attributes` field will be replaced by the one in `UpdateVehicleRequest`, + * attributes not in the request would be removed. + * + *

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 (VehicleServiceClient vehicleServiceClient = VehicleServiceClient.create()) {
+   *   UpdateVehicleAttributesRequest request =
+   *       UpdateVehicleAttributesRequest.newBuilder()
+   *           .setHeader(RequestHeader.newBuilder().build())
+   *           .setName("name3373707")
+   *           .addAllAttributes(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       vehicleServiceClient.updateVehicleAttributesCallable().futureCall(request);
+   *   // Do something.
+   *   UpdateVehicleAttributesResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateVehicleAttributesCallable() { + return stub.updateVehicleAttributesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a paginated list of vehicles associated with a provider that match the request options. + * + *

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 (VehicleServiceClient vehicleServiceClient = VehicleServiceClient.create()) {
+   *   ListVehiclesRequest request =
+   *       ListVehiclesRequest.newBuilder()
+   *           .setHeader(RequestHeader.newBuilder().build())
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setMinimumCapacity(Int32Value.newBuilder().build())
+   *           .addAllTripTypes(new ArrayList())
+   *           .setMaximumStaleness(Duration.newBuilder().build())
+   *           .addAllVehicleTypeCategories(new ArrayList())
+   *           .addAllRequiredAttributes(new ArrayList())
+   *           .addAllRequiredOneOfAttributes(new ArrayList())
+   *           .addAllRequiredOneOfAttributeSets(new ArrayList())
+   *           .setVehicleState(VehicleState.forNumber(0))
+   *           .setOnTripOnly(true)
+   *           .setFilter("filter-1274492040")
+   *           .setViewport(Viewport.newBuilder().build())
+   *           .build();
+   *   for (Vehicle element : vehicleServiceClient.listVehicles(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 ListVehiclesPagedResponse listVehicles(ListVehiclesRequest request) { + return listVehiclesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a paginated list of vehicles associated with a provider that match the request options. + * + *

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 (VehicleServiceClient vehicleServiceClient = VehicleServiceClient.create()) {
+   *   ListVehiclesRequest request =
+   *       ListVehiclesRequest.newBuilder()
+   *           .setHeader(RequestHeader.newBuilder().build())
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setMinimumCapacity(Int32Value.newBuilder().build())
+   *           .addAllTripTypes(new ArrayList())
+   *           .setMaximumStaleness(Duration.newBuilder().build())
+   *           .addAllVehicleTypeCategories(new ArrayList())
+   *           .addAllRequiredAttributes(new ArrayList())
+   *           .addAllRequiredOneOfAttributes(new ArrayList())
+   *           .addAllRequiredOneOfAttributeSets(new ArrayList())
+   *           .setVehicleState(VehicleState.forNumber(0))
+   *           .setOnTripOnly(true)
+   *           .setFilter("filter-1274492040")
+   *           .setViewport(Viewport.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       vehicleServiceClient.listVehiclesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Vehicle element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listVehiclesPagedCallable() { + return stub.listVehiclesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a paginated list of vehicles associated with a provider that match the request options. + * + *

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 (VehicleServiceClient vehicleServiceClient = VehicleServiceClient.create()) {
+   *   ListVehiclesRequest request =
+   *       ListVehiclesRequest.newBuilder()
+   *           .setHeader(RequestHeader.newBuilder().build())
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setMinimumCapacity(Int32Value.newBuilder().build())
+   *           .addAllTripTypes(new ArrayList())
+   *           .setMaximumStaleness(Duration.newBuilder().build())
+   *           .addAllVehicleTypeCategories(new ArrayList())
+   *           .addAllRequiredAttributes(new ArrayList())
+   *           .addAllRequiredOneOfAttributes(new ArrayList())
+   *           .addAllRequiredOneOfAttributeSets(new ArrayList())
+   *           .setVehicleState(VehicleState.forNumber(0))
+   *           .setOnTripOnly(true)
+   *           .setFilter("filter-1274492040")
+   *           .setViewport(Viewport.newBuilder().build())
+   *           .build();
+   *   while (true) {
+   *     ListVehiclesResponse response = vehicleServiceClient.listVehiclesCallable().call(request);
+   *     for (Vehicle element : response.getVehiclesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listVehiclesCallable() { + return stub.listVehiclesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of vehicles that match the request options. + * + *

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 (VehicleServiceClient vehicleServiceClient = VehicleServiceClient.create()) {
+   *   SearchVehiclesRequest request =
+   *       SearchVehiclesRequest.newBuilder()
+   *           .setHeader(RequestHeader.newBuilder().build())
+   *           .setParent("parent-995424086")
+   *           .setPickupPoint(TerminalLocation.newBuilder().build())
+   *           .setDropoffPoint(TerminalLocation.newBuilder().build())
+   *           .setPickupRadiusMeters(-254656044)
+   *           .setCount(94851343)
+   *           .setMinimumCapacity(518841803)
+   *           .addAllTripTypes(new ArrayList())
+   *           .setMaximumStaleness(Duration.newBuilder().build())
+   *           .addAllVehicleTypes(new ArrayList())
+   *           .addAllRequiredAttributes(new ArrayList())
+   *           .addAllRequiredOneOfAttributes(new ArrayList())
+   *           .addAllRequiredOneOfAttributeSets(new ArrayList())
+   *           .setIncludeBackToBack(true)
+   *           .setTripId("tripId-865466336")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   SearchVehiclesResponse response = vehicleServiceClient.searchVehicles(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 SearchVehiclesResponse searchVehicles(SearchVehiclesRequest request) { + return searchVehiclesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of vehicles that match the request options. + * + *

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 (VehicleServiceClient vehicleServiceClient = VehicleServiceClient.create()) {
+   *   SearchVehiclesRequest request =
+   *       SearchVehiclesRequest.newBuilder()
+   *           .setHeader(RequestHeader.newBuilder().build())
+   *           .setParent("parent-995424086")
+   *           .setPickupPoint(TerminalLocation.newBuilder().build())
+   *           .setDropoffPoint(TerminalLocation.newBuilder().build())
+   *           .setPickupRadiusMeters(-254656044)
+   *           .setCount(94851343)
+   *           .setMinimumCapacity(518841803)
+   *           .addAllTripTypes(new ArrayList())
+   *           .setMaximumStaleness(Duration.newBuilder().build())
+   *           .addAllVehicleTypes(new ArrayList())
+   *           .addAllRequiredAttributes(new ArrayList())
+   *           .addAllRequiredOneOfAttributes(new ArrayList())
+   *           .addAllRequiredOneOfAttributeSets(new ArrayList())
+   *           .setIncludeBackToBack(true)
+   *           .setTripId("tripId-865466336")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future =
+   *       vehicleServiceClient.searchVehiclesCallable().futureCall(request);
+   *   // Do something.
+   *   SearchVehiclesResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + searchVehiclesCallable() { + return stub.searchVehiclesCallable(); + } + + @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); + } + + public static class ListVehiclesPagedResponse + extends AbstractPagedListResponse< + ListVehiclesRequest, + ListVehiclesResponse, + Vehicle, + ListVehiclesPage, + ListVehiclesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListVehiclesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListVehiclesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListVehiclesPagedResponse(ListVehiclesPage page) { + super(page, ListVehiclesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListVehiclesPage + extends AbstractPage { + + private ListVehiclesPage( + PageContext context, + ListVehiclesResponse response) { + super(context, response); + } + + private static ListVehiclesPage createEmptyPage() { + return new ListVehiclesPage(null, null); + } + + @Override + protected ListVehiclesPage createPage( + PageContext context, + ListVehiclesResponse response) { + return new ListVehiclesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListVehiclesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListVehiclesRequest, + ListVehiclesResponse, + Vehicle, + ListVehiclesPage, + ListVehiclesFixedSizeCollection> { + + private ListVehiclesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListVehiclesFixedSizeCollection createEmptyCollection() { + return new ListVehiclesFixedSizeCollection(null, 0); + } + + @Override + protected ListVehiclesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListVehiclesFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/VehicleServiceSettings.java b/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/VehicleServiceSettings.java new file mode 100644 index 000000000000..69cb7505a43a --- /dev/null +++ b/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/VehicleServiceSettings.java @@ -0,0 +1,257 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.fleetengine.v1; + +import static com.google.maps.fleetengine.v1.VehicleServiceClient.ListVehiclesPagedResponse; + +import com.google.api.core.ApiFunction; +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.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.maps.fleetengine.v1.stub.VehicleServiceStubSettings; +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 VehicleServiceClient}. + * + *

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

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

{@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
+ * VehicleServiceSettings.Builder vehicleServiceSettingsBuilder =
+ *     VehicleServiceSettings.newBuilder();
+ * vehicleServiceSettingsBuilder
+ *     .createVehicleSettings()
+ *     .setRetrySettings(
+ *         vehicleServiceSettingsBuilder
+ *             .createVehicleSettings()
+ *             .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());
+ * VehicleServiceSettings vehicleServiceSettings = vehicleServiceSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for + * additional support in setting retries. + */ +@Generated("by gapic-generator-java") +public class VehicleServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createVehicle. */ + public UnaryCallSettings createVehicleSettings() { + return ((VehicleServiceStubSettings) getStubSettings()).createVehicleSettings(); + } + + /** Returns the object with the settings used for calls to getVehicle. */ + public UnaryCallSettings getVehicleSettings() { + return ((VehicleServiceStubSettings) getStubSettings()).getVehicleSettings(); + } + + /** Returns the object with the settings used for calls to updateVehicle. */ + public UnaryCallSettings updateVehicleSettings() { + return ((VehicleServiceStubSettings) getStubSettings()).updateVehicleSettings(); + } + + /** Returns the object with the settings used for calls to updateVehicleAttributes. */ + public UnaryCallSettings + updateVehicleAttributesSettings() { + return ((VehicleServiceStubSettings) getStubSettings()).updateVehicleAttributesSettings(); + } + + /** Returns the object with the settings used for calls to listVehicles. */ + public PagedCallSettings + listVehiclesSettings() { + return ((VehicleServiceStubSettings) getStubSettings()).listVehiclesSettings(); + } + + /** Returns the object with the settings used for calls to searchVehicles. */ + public UnaryCallSettings searchVehiclesSettings() { + return ((VehicleServiceStubSettings) getStubSettings()).searchVehiclesSettings(); + } + + public static final VehicleServiceSettings create(VehicleServiceStubSettings stub) + throws IOException { + return new VehicleServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return VehicleServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return VehicleServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return VehicleServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return VehicleServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return VehicleServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return VehicleServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return VehicleServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** 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 VehicleServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for VehicleServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(VehicleServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(VehicleServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(VehicleServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(VehicleServiceStubSettings.newBuilder()); + } + + public VehicleServiceStubSettings.Builder getStubSettingsBuilder() { + return ((VehicleServiceStubSettings.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 createVehicle. */ + public UnaryCallSettings.Builder createVehicleSettings() { + return getStubSettingsBuilder().createVehicleSettings(); + } + + /** Returns the builder for the settings used for calls to getVehicle. */ + public UnaryCallSettings.Builder getVehicleSettings() { + return getStubSettingsBuilder().getVehicleSettings(); + } + + /** Returns the builder for the settings used for calls to updateVehicle. */ + public UnaryCallSettings.Builder updateVehicleSettings() { + return getStubSettingsBuilder().updateVehicleSettings(); + } + + /** Returns the builder for the settings used for calls to updateVehicleAttributes. */ + public UnaryCallSettings.Builder< + UpdateVehicleAttributesRequest, UpdateVehicleAttributesResponse> + updateVehicleAttributesSettings() { + return getStubSettingsBuilder().updateVehicleAttributesSettings(); + } + + /** Returns the builder for the settings used for calls to listVehicles. */ + public PagedCallSettings.Builder< + ListVehiclesRequest, ListVehiclesResponse, ListVehiclesPagedResponse> + listVehiclesSettings() { + return getStubSettingsBuilder().listVehiclesSettings(); + } + + /** Returns the builder for the settings used for calls to searchVehicles. */ + public UnaryCallSettings.Builder + searchVehiclesSettings() { + return getStubSettingsBuilder().searchVehiclesSettings(); + } + + @Override + public VehicleServiceSettings build() throws IOException { + return new VehicleServiceSettings(this); + } + } +} diff --git a/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/gapic_metadata.json b/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/gapic_metadata.json new file mode 100644 index 000000000000..f291e98931e0 --- /dev/null +++ b/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/gapic_metadata.json @@ -0,0 +1,60 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "maps.fleetengine.v1", + "libraryPackage": "com.google.maps.fleetengine.v1", + "services": { + "TripService": { + "clients": { + "grpc": { + "libraryClient": "TripServiceClient", + "rpcs": { + "CreateTrip": { + "methods": ["createTrip", "createTripCallable"] + }, + "GetTrip": { + "methods": ["getTrip", "getTripCallable"] + }, + "ReportBillableTrip": { + "methods": ["reportBillableTrip", "reportBillableTripCallable"] + }, + "SearchTrips": { + "methods": ["searchTrips", "searchTripsPagedCallable", "searchTripsCallable"] + }, + "UpdateTrip": { + "methods": ["updateTrip", "updateTripCallable"] + } + } + } + } + }, + "VehicleService": { + "clients": { + "grpc": { + "libraryClient": "VehicleServiceClient", + "rpcs": { + "CreateVehicle": { + "methods": ["createVehicle", "createVehicleCallable"] + }, + "GetVehicle": { + "methods": ["getVehicle", "getVehicleCallable"] + }, + "ListVehicles": { + "methods": ["listVehicles", "listVehiclesPagedCallable", "listVehiclesCallable"] + }, + "SearchVehicles": { + "methods": ["searchVehicles", "searchVehiclesCallable"] + }, + "UpdateVehicle": { + "methods": ["updateVehicle", "updateVehicleCallable"] + }, + "UpdateVehicleAttributes": { + "methods": ["updateVehicleAttributes", "updateVehicleAttributesCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/package-info.java b/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/package-info.java new file mode 100644 index 000000000000..f41d7981b505 --- /dev/null +++ b/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/package-info.java @@ -0,0 +1,73 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * A client to Local Rides and Deliveries API + * + *

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

======================= TripServiceClient ======================= + * + *

Service Description: Trip management service. + * + *

Sample for TripServiceClient: + * + *

{@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 (TripServiceClient tripServiceClient = TripServiceClient.create()) {
+ *   CreateTripRequest request =
+ *       CreateTripRequest.newBuilder()
+ *           .setHeader(RequestHeader.newBuilder().build())
+ *           .setParent(TripName.of("[PROVIDER]", "[TRIP]").toString())
+ *           .setTripId("tripId-865466336")
+ *           .setTrip(Trip.newBuilder().build())
+ *           .build();
+ *   Trip response = tripServiceClient.createTrip(request);
+ * }
+ * }
+ * + *

======================= VehicleServiceClient ======================= + * + *

Service Description: Vehicle management service. + * + *

Sample for VehicleServiceClient: + * + *

{@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 (VehicleServiceClient vehicleServiceClient = VehicleServiceClient.create()) {
+ *   CreateVehicleRequest request =
+ *       CreateVehicleRequest.newBuilder()
+ *           .setHeader(RequestHeader.newBuilder().build())
+ *           .setParent("parent-995424086")
+ *           .setVehicleId("vehicleId-1984135833")
+ *           .setVehicle(Vehicle.newBuilder().build())
+ *           .build();
+ *   Vehicle response = vehicleServiceClient.createVehicle(request);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.maps.fleetengine.v1; + +import javax.annotation.Generated; diff --git a/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/stub/GrpcTripServiceCallableFactory.java b/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/stub/GrpcTripServiceCallableFactory.java new file mode 100644 index 000000000000..ededf3fd83f6 --- /dev/null +++ b/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/stub/GrpcTripServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.fleetengine.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 TripService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcTripServiceCallableFactory 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-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/stub/GrpcTripServiceStub.java b/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/stub/GrpcTripServiceStub.java new file mode 100644 index 000000000000..85d6ef9dc1c2 --- /dev/null +++ b/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/stub/GrpcTripServiceStub.java @@ -0,0 +1,303 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.fleetengine.v1.stub; + +import static com.google.maps.fleetengine.v1.TripServiceClient.SearchTripsPagedResponse; + +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.api.pathtemplate.PathTemplate; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.maps.fleetengine.v1.CreateTripRequest; +import com.google.maps.fleetengine.v1.GetTripRequest; +import com.google.maps.fleetengine.v1.ReportBillableTripRequest; +import com.google.maps.fleetengine.v1.SearchTripsRequest; +import com.google.maps.fleetengine.v1.SearchTripsResponse; +import com.google.maps.fleetengine.v1.Trip; +import com.google.maps.fleetengine.v1.UpdateTripRequest; +import com.google.protobuf.Empty; +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 TripService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcTripServiceStub extends TripServiceStub { + private static final MethodDescriptor createTripMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("maps.fleetengine.v1.TripService/CreateTrip") + .setRequestMarshaller(ProtoUtils.marshaller(CreateTripRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Trip.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getTripMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("maps.fleetengine.v1.TripService/GetTrip") + .setRequestMarshaller(ProtoUtils.marshaller(GetTripRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Trip.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + reportBillableTripMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("maps.fleetengine.v1.TripService/ReportBillableTrip") + .setRequestMarshaller( + ProtoUtils.marshaller(ReportBillableTripRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + searchTripsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("maps.fleetengine.v1.TripService/SearchTrips") + .setRequestMarshaller(ProtoUtils.marshaller(SearchTripsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(SearchTripsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor updateTripMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("maps.fleetengine.v1.TripService/UpdateTrip") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateTripRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Trip.getDefaultInstance())) + .build(); + + private final UnaryCallable createTripCallable; + private final UnaryCallable getTripCallable; + private final UnaryCallable reportBillableTripCallable; + private final UnaryCallable searchTripsCallable; + private final UnaryCallable + searchTripsPagedCallable; + private final UnaryCallable updateTripCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + private static final PathTemplate CREATE_TRIP_0_PATH_TEMPLATE = + PathTemplate.create("{provider_id=providers/*}"); + private static final PathTemplate GET_TRIP_0_PATH_TEMPLATE = + PathTemplate.create("{provider_id=providers/*}"); + private static final PathTemplate REPORT_BILLABLE_TRIP_0_PATH_TEMPLATE = + PathTemplate.create("{provider_id=providers/*}"); + private static final PathTemplate SEARCH_TRIPS_0_PATH_TEMPLATE = + PathTemplate.create("{provider_id=providers/*}"); + private static final PathTemplate UPDATE_TRIP_0_PATH_TEMPLATE = + PathTemplate.create("{provider_id=providers/*}"); + + public static final GrpcTripServiceStub create(TripServiceStubSettings settings) + throws IOException { + return new GrpcTripServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcTripServiceStub create(ClientContext clientContext) throws IOException { + return new GrpcTripServiceStub(TripServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcTripServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcTripServiceStub( + TripServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcTripServiceStub, 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 GrpcTripServiceStub(TripServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcTripServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcTripServiceStub, 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 GrpcTripServiceStub( + TripServiceStubSettings 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(request.getParent(), "provider_id", CREATE_TRIP_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + GrpcCallSettings getTripTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getTripMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getName(), "provider_id", GET_TRIP_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + GrpcCallSettings reportBillableTripTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(reportBillableTripMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + request.getName(), "provider_id", REPORT_BILLABLE_TRIP_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + GrpcCallSettings searchTripsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(searchTripsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getParent(), "provider_id", SEARCH_TRIPS_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + GrpcCallSettings updateTripTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateTripMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getName(), "provider_id", UPDATE_TRIP_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + + this.createTripCallable = + callableFactory.createUnaryCallable( + createTripTransportSettings, settings.createTripSettings(), clientContext); + this.getTripCallable = + callableFactory.createUnaryCallable( + getTripTransportSettings, settings.getTripSettings(), clientContext); + this.reportBillableTripCallable = + callableFactory.createUnaryCallable( + reportBillableTripTransportSettings, + settings.reportBillableTripSettings(), + clientContext); + this.searchTripsCallable = + callableFactory.createUnaryCallable( + searchTripsTransportSettings, settings.searchTripsSettings(), clientContext); + this.searchTripsPagedCallable = + callableFactory.createPagedCallable( + searchTripsTransportSettings, settings.searchTripsSettings(), clientContext); + this.updateTripCallable = + callableFactory.createUnaryCallable( + updateTripTransportSettings, settings.updateTripSettings(), 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 UnaryCallable reportBillableTripCallable() { + return reportBillableTripCallable; + } + + @Override + public UnaryCallable searchTripsCallable() { + return searchTripsCallable; + } + + @Override + public UnaryCallable searchTripsPagedCallable() { + return searchTripsPagedCallable; + } + + @Override + public UnaryCallable updateTripCallable() { + return updateTripCallable; + } + + @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-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/stub/GrpcVehicleServiceCallableFactory.java b/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/stub/GrpcVehicleServiceCallableFactory.java new file mode 100644 index 000000000000..0c5d6a7472c3 --- /dev/null +++ b/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/stub/GrpcVehicleServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.fleetengine.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 VehicleService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcVehicleServiceCallableFactory 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-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/stub/GrpcVehicleServiceStub.java b/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/stub/GrpcVehicleServiceStub.java new file mode 100644 index 000000000000..60b3852292ef --- /dev/null +++ b/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/stub/GrpcVehicleServiceStub.java @@ -0,0 +1,354 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.fleetengine.v1.stub; + +import static com.google.maps.fleetengine.v1.VehicleServiceClient.ListVehiclesPagedResponse; + +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.api.pathtemplate.PathTemplate; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.maps.fleetengine.v1.CreateVehicleRequest; +import com.google.maps.fleetengine.v1.GetVehicleRequest; +import com.google.maps.fleetengine.v1.ListVehiclesRequest; +import com.google.maps.fleetengine.v1.ListVehiclesResponse; +import com.google.maps.fleetengine.v1.SearchVehiclesRequest; +import com.google.maps.fleetengine.v1.SearchVehiclesResponse; +import com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest; +import com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse; +import com.google.maps.fleetengine.v1.UpdateVehicleRequest; +import com.google.maps.fleetengine.v1.Vehicle; +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 VehicleService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcVehicleServiceStub extends VehicleServiceStub { + private static final MethodDescriptor + createVehicleMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("maps.fleetengine.v1.VehicleService/CreateVehicle") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateVehicleRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Vehicle.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getVehicleMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("maps.fleetengine.v1.VehicleService/GetVehicle") + .setRequestMarshaller(ProtoUtils.marshaller(GetVehicleRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Vehicle.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateVehicleMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("maps.fleetengine.v1.VehicleService/UpdateVehicle") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateVehicleRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Vehicle.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + UpdateVehicleAttributesRequest, UpdateVehicleAttributesResponse> + updateVehicleAttributesMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("maps.fleetengine.v1.VehicleService/UpdateVehicleAttributes") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateVehicleAttributesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(UpdateVehicleAttributesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listVehiclesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("maps.fleetengine.v1.VehicleService/ListVehicles") + .setRequestMarshaller(ProtoUtils.marshaller(ListVehiclesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListVehiclesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + searchVehiclesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("maps.fleetengine.v1.VehicleService/SearchVehicles") + .setRequestMarshaller( + ProtoUtils.marshaller(SearchVehiclesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(SearchVehiclesResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable createVehicleCallable; + private final UnaryCallable getVehicleCallable; + private final UnaryCallable updateVehicleCallable; + private final UnaryCallable + updateVehicleAttributesCallable; + private final UnaryCallable listVehiclesCallable; + private final UnaryCallable + listVehiclesPagedCallable; + private final UnaryCallable searchVehiclesCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + private static final PathTemplate CREATE_VEHICLE_0_PATH_TEMPLATE = + PathTemplate.create("{provider_id=providers/*}"); + private static final PathTemplate GET_VEHICLE_0_PATH_TEMPLATE = + PathTemplate.create("{provider_id=providers/*}"); + private static final PathTemplate UPDATE_VEHICLE_0_PATH_TEMPLATE = + PathTemplate.create("{provider_id=providers/*}"); + private static final PathTemplate UPDATE_VEHICLE_ATTRIBUTES_0_PATH_TEMPLATE = + PathTemplate.create("{provider_id=providers/*}"); + private static final PathTemplate LIST_VEHICLES_0_PATH_TEMPLATE = + PathTemplate.create("{provider_id=providers/*}"); + private static final PathTemplate SEARCH_VEHICLES_0_PATH_TEMPLATE = + PathTemplate.create("{provider_id=providers/*}"); + + public static final GrpcVehicleServiceStub create(VehicleServiceStubSettings settings) + throws IOException { + return new GrpcVehicleServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcVehicleServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcVehicleServiceStub( + VehicleServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcVehicleServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcVehicleServiceStub( + VehicleServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcVehicleServiceStub, 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 GrpcVehicleServiceStub(VehicleServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcVehicleServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcVehicleServiceStub, 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 GrpcVehicleServiceStub( + VehicleServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createVehicleTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createVehicleMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getParent(), "provider_id", CREATE_VEHICLE_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + GrpcCallSettings getVehicleTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getVehicleMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getName(), "provider_id", GET_VEHICLE_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + GrpcCallSettings updateVehicleTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateVehicleMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getName(), "provider_id", UPDATE_VEHICLE_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + GrpcCallSettings + updateVehicleAttributesTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(updateVehicleAttributesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + request.getName(), + "provider_id", + UPDATE_VEHICLE_ATTRIBUTES_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + GrpcCallSettings listVehiclesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listVehiclesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getParent(), "provider_id", LIST_VEHICLES_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + GrpcCallSettings + searchVehiclesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(searchVehiclesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + request.getParent(), "provider_id", SEARCH_VEHICLES_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + + this.createVehicleCallable = + callableFactory.createUnaryCallable( + createVehicleTransportSettings, settings.createVehicleSettings(), clientContext); + this.getVehicleCallable = + callableFactory.createUnaryCallable( + getVehicleTransportSettings, settings.getVehicleSettings(), clientContext); + this.updateVehicleCallable = + callableFactory.createUnaryCallable( + updateVehicleTransportSettings, settings.updateVehicleSettings(), clientContext); + this.updateVehicleAttributesCallable = + callableFactory.createUnaryCallable( + updateVehicleAttributesTransportSettings, + settings.updateVehicleAttributesSettings(), + clientContext); + this.listVehiclesCallable = + callableFactory.createUnaryCallable( + listVehiclesTransportSettings, settings.listVehiclesSettings(), clientContext); + this.listVehiclesPagedCallable = + callableFactory.createPagedCallable( + listVehiclesTransportSettings, settings.listVehiclesSettings(), clientContext); + this.searchVehiclesCallable = + callableFactory.createUnaryCallable( + searchVehiclesTransportSettings, settings.searchVehiclesSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable createVehicleCallable() { + return createVehicleCallable; + } + + @Override + public UnaryCallable getVehicleCallable() { + return getVehicleCallable; + } + + @Override + public UnaryCallable updateVehicleCallable() { + return updateVehicleCallable; + } + + @Override + public UnaryCallable + updateVehicleAttributesCallable() { + return updateVehicleAttributesCallable; + } + + @Override + public UnaryCallable listVehiclesCallable() { + return listVehiclesCallable; + } + + @Override + public UnaryCallable listVehiclesPagedCallable() { + return listVehiclesPagedCallable; + } + + @Override + public UnaryCallable searchVehiclesCallable() { + return searchVehiclesCallable; + } + + @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-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/stub/TripServiceStub.java b/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/stub/TripServiceStub.java new file mode 100644 index 000000000000..1afc611c2f96 --- /dev/null +++ b/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/stub/TripServiceStub.java @@ -0,0 +1,68 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.fleetengine.v1.stub; + +import static com.google.maps.fleetengine.v1.TripServiceClient.SearchTripsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.maps.fleetengine.v1.CreateTripRequest; +import com.google.maps.fleetengine.v1.GetTripRequest; +import com.google.maps.fleetengine.v1.ReportBillableTripRequest; +import com.google.maps.fleetengine.v1.SearchTripsRequest; +import com.google.maps.fleetengine.v1.SearchTripsResponse; +import com.google.maps.fleetengine.v1.Trip; +import com.google.maps.fleetengine.v1.UpdateTripRequest; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the TripService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class TripServiceStub implements BackgroundResource { + + public UnaryCallable createTripCallable() { + throw new UnsupportedOperationException("Not implemented: createTripCallable()"); + } + + public UnaryCallable getTripCallable() { + throw new UnsupportedOperationException("Not implemented: getTripCallable()"); + } + + public UnaryCallable reportBillableTripCallable() { + throw new UnsupportedOperationException("Not implemented: reportBillableTripCallable()"); + } + + public UnaryCallable searchTripsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: searchTripsPagedCallable()"); + } + + public UnaryCallable searchTripsCallable() { + throw new UnsupportedOperationException("Not implemented: searchTripsCallable()"); + } + + public UnaryCallable updateTripCallable() { + throw new UnsupportedOperationException("Not implemented: updateTripCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/stub/TripServiceStubSettings.java b/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/stub/TripServiceStubSettings.java new file mode 100644 index 000000000000..5f567ca6e16e --- /dev/null +++ b/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/stub/TripServiceStubSettings.java @@ -0,0 +1,463 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.fleetengine.v1.stub; + +import static com.google.maps.fleetengine.v1.TripServiceClient.SearchTripsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +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.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +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.api.gax.rpc.UnaryCallable; +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.fleetengine.v1.CreateTripRequest; +import com.google.maps.fleetengine.v1.GetTripRequest; +import com.google.maps.fleetengine.v1.ReportBillableTripRequest; +import com.google.maps.fleetengine.v1.SearchTripsRequest; +import com.google.maps.fleetengine.v1.SearchTripsResponse; +import com.google.maps.fleetengine.v1.Trip; +import com.google.maps.fleetengine.v1.UpdateTripRequest; +import com.google.protobuf.Empty; +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 TripServiceStub}. + * + *

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

    + *
  • The default service address (fleetengine.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
+ * TripServiceStubSettings.Builder tripServiceSettingsBuilder =
+ *     TripServiceStubSettings.newBuilder();
+ * tripServiceSettingsBuilder
+ *     .createTripSettings()
+ *     .setRetrySettings(
+ *         tripServiceSettingsBuilder
+ *             .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());
+ * TripServiceStubSettings tripServiceSettings = tripServiceSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for + * additional support in setting retries. + */ +@Generated("by gapic-generator-java") +public class TripServiceStubSettings 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; + private final UnaryCallSettings reportBillableTripSettings; + private final PagedCallSettings + searchTripsSettings; + private final UnaryCallSettings updateTripSettings; + + private static final PagedListDescriptor + SEARCH_TRIPS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public SearchTripsRequest injectToken(SearchTripsRequest payload, String token) { + return SearchTripsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public SearchTripsRequest injectPageSize(SearchTripsRequest payload, int pageSize) { + return SearchTripsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(SearchTripsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(SearchTripsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(SearchTripsResponse payload) { + return payload.getTripsList(); + } + }; + + private static final PagedListResponseFactory< + SearchTripsRequest, SearchTripsResponse, SearchTripsPagedResponse> + SEARCH_TRIPS_PAGE_STR_FACT = + new PagedListResponseFactory< + SearchTripsRequest, SearchTripsResponse, SearchTripsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + SearchTripsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, SEARCH_TRIPS_PAGE_STR_DESC, request, context); + return SearchTripsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** 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; + } + + /** Returns the object with the settings used for calls to reportBillableTrip. */ + public UnaryCallSettings reportBillableTripSettings() { + return reportBillableTripSettings; + } + + /** Returns the object with the settings used for calls to searchTrips. */ + public PagedCallSettings + searchTripsSettings() { + return searchTripsSettings; + } + + /** Returns the object with the settings used for calls to updateTrip. */ + public UnaryCallSettings updateTripSettings() { + return updateTripSettings; + } + + public TripServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcTripServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "fleetengine"; + } + + /** 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 "fleetengine.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "fleetengine.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 ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(TripServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** 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 TripServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createTripSettings = settingsBuilder.createTripSettings().build(); + getTripSettings = settingsBuilder.getTripSettings().build(); + reportBillableTripSettings = settingsBuilder.reportBillableTripSettings().build(); + searchTripsSettings = settingsBuilder.searchTripsSettings().build(); + updateTripSettings = settingsBuilder.updateTripSettings().build(); + } + + /** Builder for TripServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder createTripSettings; + private final UnaryCallSettings.Builder getTripSettings; + private final UnaryCallSettings.Builder + reportBillableTripSettings; + private final PagedCallSettings.Builder< + SearchTripsRequest, SearchTripsResponse, SearchTripsPagedResponse> + searchTripsSettings; + private final UnaryCallSettings.Builder updateTripSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelayDuration(Duration.ofMillis(10000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(15000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(15000L)) + .setTotalTimeoutDuration(Duration.ofMillis(15000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createTripSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getTripSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + reportBillableTripSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + searchTripsSettings = PagedCallSettings.newBuilder(SEARCH_TRIPS_PAGE_STR_FACT); + updateTripSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createTripSettings, + getTripSettings, + reportBillableTripSettings, + searchTripsSettings, + updateTripSettings); + initDefaults(this); + } + + protected Builder(TripServiceStubSettings settings) { + super(settings); + + createTripSettings = settings.createTripSettings.toBuilder(); + getTripSettings = settings.getTripSettings.toBuilder(); + reportBillableTripSettings = settings.reportBillableTripSettings.toBuilder(); + searchTripsSettings = settings.searchTripsSettings.toBuilder(); + updateTripSettings = settings.updateTripSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createTripSettings, + getTripSettings, + reportBillableTripSettings, + searchTripsSettings, + updateTripSettings); + } + + 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 initDefaults(Builder builder) { + builder + .createTripSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getTripSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .reportBillableTripSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .searchTripsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateTripSettings() + .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; + } + + /** Returns the builder for the settings used for calls to reportBillableTrip. */ + public UnaryCallSettings.Builder + reportBillableTripSettings() { + return reportBillableTripSettings; + } + + /** Returns the builder for the settings used for calls to searchTrips. */ + public PagedCallSettings.Builder< + SearchTripsRequest, SearchTripsResponse, SearchTripsPagedResponse> + searchTripsSettings() { + return searchTripsSettings; + } + + /** Returns the builder for the settings used for calls to updateTrip. */ + public UnaryCallSettings.Builder updateTripSettings() { + return updateTripSettings; + } + + @Override + public TripServiceStubSettings build() throws IOException { + return new TripServiceStubSettings(this); + } + } +} diff --git a/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/stub/VehicleServiceStub.java b/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/stub/VehicleServiceStub.java new file mode 100644 index 000000000000..14267b94cde7 --- /dev/null +++ b/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/stub/VehicleServiceStub.java @@ -0,0 +1,75 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.fleetengine.v1.stub; + +import static com.google.maps.fleetengine.v1.VehicleServiceClient.ListVehiclesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.maps.fleetengine.v1.CreateVehicleRequest; +import com.google.maps.fleetengine.v1.GetVehicleRequest; +import com.google.maps.fleetengine.v1.ListVehiclesRequest; +import com.google.maps.fleetengine.v1.ListVehiclesResponse; +import com.google.maps.fleetengine.v1.SearchVehiclesRequest; +import com.google.maps.fleetengine.v1.SearchVehiclesResponse; +import com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest; +import com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse; +import com.google.maps.fleetengine.v1.UpdateVehicleRequest; +import com.google.maps.fleetengine.v1.Vehicle; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the VehicleService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class VehicleServiceStub implements BackgroundResource { + + public UnaryCallable createVehicleCallable() { + throw new UnsupportedOperationException("Not implemented: createVehicleCallable()"); + } + + public UnaryCallable getVehicleCallable() { + throw new UnsupportedOperationException("Not implemented: getVehicleCallable()"); + } + + public UnaryCallable updateVehicleCallable() { + throw new UnsupportedOperationException("Not implemented: updateVehicleCallable()"); + } + + public UnaryCallable + updateVehicleAttributesCallable() { + throw new UnsupportedOperationException("Not implemented: updateVehicleAttributesCallable()"); + } + + public UnaryCallable listVehiclesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listVehiclesPagedCallable()"); + } + + public UnaryCallable listVehiclesCallable() { + throw new UnsupportedOperationException("Not implemented: listVehiclesCallable()"); + } + + public UnaryCallable searchVehiclesCallable() { + throw new UnsupportedOperationException("Not implemented: searchVehiclesCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/stub/VehicleServiceStubSettings.java b/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/stub/VehicleServiceStubSettings.java new file mode 100644 index 000000000000..e01fba77dc64 --- /dev/null +++ b/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/stub/VehicleServiceStubSettings.java @@ -0,0 +1,495 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.fleetengine.v1.stub; + +import static com.google.maps.fleetengine.v1.VehicleServiceClient.ListVehiclesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +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.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +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.api.gax.rpc.UnaryCallable; +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.fleetengine.v1.CreateVehicleRequest; +import com.google.maps.fleetengine.v1.GetVehicleRequest; +import com.google.maps.fleetengine.v1.ListVehiclesRequest; +import com.google.maps.fleetengine.v1.ListVehiclesResponse; +import com.google.maps.fleetengine.v1.SearchVehiclesRequest; +import com.google.maps.fleetengine.v1.SearchVehiclesResponse; +import com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest; +import com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse; +import com.google.maps.fleetengine.v1.UpdateVehicleRequest; +import com.google.maps.fleetengine.v1.Vehicle; +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 VehicleServiceStub}. + * + *

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

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

{@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
+ * VehicleServiceStubSettings.Builder vehicleServiceSettingsBuilder =
+ *     VehicleServiceStubSettings.newBuilder();
+ * vehicleServiceSettingsBuilder
+ *     .createVehicleSettings()
+ *     .setRetrySettings(
+ *         vehicleServiceSettingsBuilder
+ *             .createVehicleSettings()
+ *             .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());
+ * VehicleServiceStubSettings vehicleServiceSettings = vehicleServiceSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for + * additional support in setting retries. + */ +@Generated("by gapic-generator-java") +public class VehicleServiceStubSettings 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 createVehicleSettings; + private final UnaryCallSettings getVehicleSettings; + private final UnaryCallSettings updateVehicleSettings; + private final UnaryCallSettings + updateVehicleAttributesSettings; + private final PagedCallSettings< + ListVehiclesRequest, ListVehiclesResponse, ListVehiclesPagedResponse> + listVehiclesSettings; + private final UnaryCallSettings + searchVehiclesSettings; + + private static final PagedListDescriptor + LIST_VEHICLES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListVehiclesRequest injectToken(ListVehiclesRequest payload, String token) { + return ListVehiclesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListVehiclesRequest injectPageSize(ListVehiclesRequest payload, int pageSize) { + return ListVehiclesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListVehiclesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListVehiclesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListVehiclesResponse payload) { + return payload.getVehiclesList(); + } + }; + + private static final PagedListResponseFactory< + ListVehiclesRequest, ListVehiclesResponse, ListVehiclesPagedResponse> + LIST_VEHICLES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListVehiclesRequest, ListVehiclesResponse, ListVehiclesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListVehiclesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_VEHICLES_PAGE_STR_DESC, request, context); + return ListVehiclesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createVehicle. */ + public UnaryCallSettings createVehicleSettings() { + return createVehicleSettings; + } + + /** Returns the object with the settings used for calls to getVehicle. */ + public UnaryCallSettings getVehicleSettings() { + return getVehicleSettings; + } + + /** Returns the object with the settings used for calls to updateVehicle. */ + public UnaryCallSettings updateVehicleSettings() { + return updateVehicleSettings; + } + + /** Returns the object with the settings used for calls to updateVehicleAttributes. */ + public UnaryCallSettings + updateVehicleAttributesSettings() { + return updateVehicleAttributesSettings; + } + + /** Returns the object with the settings used for calls to listVehicles. */ + public PagedCallSettings + listVehiclesSettings() { + return listVehiclesSettings; + } + + /** Returns the object with the settings used for calls to searchVehicles. */ + public UnaryCallSettings searchVehiclesSettings() { + return searchVehiclesSettings; + } + + public VehicleServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcVehicleServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "fleetengine"; + } + + /** 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 "fleetengine.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "fleetengine.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 ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(VehicleServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** 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 VehicleServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createVehicleSettings = settingsBuilder.createVehicleSettings().build(); + getVehicleSettings = settingsBuilder.getVehicleSettings().build(); + updateVehicleSettings = settingsBuilder.updateVehicleSettings().build(); + updateVehicleAttributesSettings = settingsBuilder.updateVehicleAttributesSettings().build(); + listVehiclesSettings = settingsBuilder.listVehiclesSettings().build(); + searchVehiclesSettings = settingsBuilder.searchVehiclesSettings().build(); + } + + /** Builder for VehicleServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder createVehicleSettings; + private final UnaryCallSettings.Builder getVehicleSettings; + private final UnaryCallSettings.Builder updateVehicleSettings; + private final UnaryCallSettings.Builder< + UpdateVehicleAttributesRequest, UpdateVehicleAttributesResponse> + updateVehicleAttributesSettings; + private final PagedCallSettings.Builder< + ListVehiclesRequest, ListVehiclesResponse, ListVehiclesPagedResponse> + listVehiclesSettings; + private final UnaryCallSettings.Builder + searchVehiclesSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelayDuration(Duration.ofMillis(10000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(15000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(15000L)) + .setTotalTimeoutDuration(Duration.ofMillis(15000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createVehicleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getVehicleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateVehicleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateVehicleAttributesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listVehiclesSettings = PagedCallSettings.newBuilder(LIST_VEHICLES_PAGE_STR_FACT); + searchVehiclesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createVehicleSettings, + getVehicleSettings, + updateVehicleSettings, + updateVehicleAttributesSettings, + listVehiclesSettings, + searchVehiclesSettings); + initDefaults(this); + } + + protected Builder(VehicleServiceStubSettings settings) { + super(settings); + + createVehicleSettings = settings.createVehicleSettings.toBuilder(); + getVehicleSettings = settings.getVehicleSettings.toBuilder(); + updateVehicleSettings = settings.updateVehicleSettings.toBuilder(); + updateVehicleAttributesSettings = settings.updateVehicleAttributesSettings.toBuilder(); + listVehiclesSettings = settings.listVehiclesSettings.toBuilder(); + searchVehiclesSettings = settings.searchVehiclesSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createVehicleSettings, + getVehicleSettings, + updateVehicleSettings, + updateVehicleAttributesSettings, + listVehiclesSettings, + searchVehiclesSettings); + } + + 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 initDefaults(Builder builder) { + builder + .createVehicleSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getVehicleSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateVehicleSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateVehicleAttributesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listVehiclesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .searchVehiclesSettings() + .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 createVehicle. */ + public UnaryCallSettings.Builder createVehicleSettings() { + return createVehicleSettings; + } + + /** Returns the builder for the settings used for calls to getVehicle. */ + public UnaryCallSettings.Builder getVehicleSettings() { + return getVehicleSettings; + } + + /** Returns the builder for the settings used for calls to updateVehicle. */ + public UnaryCallSettings.Builder updateVehicleSettings() { + return updateVehicleSettings; + } + + /** Returns the builder for the settings used for calls to updateVehicleAttributes. */ + public UnaryCallSettings.Builder< + UpdateVehicleAttributesRequest, UpdateVehicleAttributesResponse> + updateVehicleAttributesSettings() { + return updateVehicleAttributesSettings; + } + + /** Returns the builder for the settings used for calls to listVehicles. */ + public PagedCallSettings.Builder< + ListVehiclesRequest, ListVehiclesResponse, ListVehiclesPagedResponse> + listVehiclesSettings() { + return listVehiclesSettings; + } + + /** Returns the builder for the settings used for calls to searchVehicles. */ + public UnaryCallSettings.Builder + searchVehiclesSettings() { + return searchVehiclesSettings; + } + + @Override + public VehicleServiceStubSettings build() throws IOException { + return new VehicleServiceStubSettings(this); + } + } +} diff --git a/java-maps-fleetengine/google-maps-fleetengine/src/main/resources/META-INF/native-image/com.google.maps.fleetengine.v1/reflect-config.json b/java-maps-fleetengine/google-maps-fleetengine/src/main/resources/META-INF/native-image/com.google.maps.fleetengine.v1/reflect-config.json new file mode 100644 index 000000000000..fed05dd706fd --- /dev/null +++ b/java-maps-fleetengine/google-maps-fleetengine/src/main/resources/META-INF/native-image/com.google.maps.fleetengine.v1/reflect-config.json @@ -0,0 +1,2288 @@ +[ + { + "name": "com.google.api.ClientLibraryDestination", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibraryOrganization", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldBehavior", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.LaunchStage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$ExperimentalFeatures", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$ExperimentalFeatures$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$History", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Style", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RoutingParameter", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RoutingParameter$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RoutingRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RoutingRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.SelectiveGapicGeneration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.SelectiveGapicGeneration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.geo.type.Viewport", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.geo.type.Viewport$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.BatteryInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.BatteryInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.BatteryStatus", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.BillingPlatformIdentifier", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.ConsumableTrafficPolyline", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.ConsumableTrafficPolyline$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.CreateTripRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.CreateTripRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.CreateVehicleRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.CreateVehicleRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.DeviceSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.DeviceSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.GetTripRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.GetTripRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.GetVehicleRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.GetVehicleRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.LicensePlate", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.LicensePlate$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.ListVehiclesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.ListVehiclesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.ListVehiclesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.ListVehiclesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.LocationPowerSaveMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.LocationSensor", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.NavigationStatus", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.PolylineFormatType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.PowerSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.ReportBillableTripRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.ReportBillableTripRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.ReportBillableTripRequest$SolutionType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.RequestHeader", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.RequestHeader$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.RequestHeader$Platform", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.RequestHeader$SdkType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.SearchTripsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.SearchTripsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.SearchTripsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.SearchTripsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.SearchVehiclesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.SearchVehiclesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.SearchVehiclesRequest$CurrentTripsPresent", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.SearchVehiclesRequest$VehicleMatchOrder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.SearchVehiclesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.SearchVehiclesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.SpeedReadingInterval", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.SpeedReadingInterval$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.SpeedReadingInterval$Speed", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.StopLocation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.StopLocation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.TerminalLocation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.TerminalLocation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.TerminalPointId", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.TerminalPointId$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.TrafficPolylineData", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.TrafficPolylineData$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.Trip", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.Trip$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.TripStatus", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.TripType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.TripView", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.TripWaypoint", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.TripWaypoint$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.UpdateTripRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.UpdateTripRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.UpdateVehicleRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.UpdateVehicleRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.Vehicle", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.Vehicle$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.Vehicle$VehicleType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.Vehicle$VehicleType$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.Vehicle$VehicleType$Category", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.VehicleAttribute", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.VehicleAttribute$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.VehicleAttributeList", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.VehicleAttributeList$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.VehicleLocation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.VehicleLocation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.VehicleMatch", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.VehicleMatch$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.VehicleMatch$VehicleMatchType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.VehicleState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.VisualTrafficReportPolylineRendering", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.VisualTrafficReportPolylineRendering$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.VisualTrafficReportPolylineRendering$RoadStretch", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.VisualTrafficReportPolylineRendering$RoadStretch$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.VisualTrafficReportPolylineRendering$RoadStretch$Style", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.Waypoint", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.Waypoint$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.maps.fleetengine.v1.WaypointType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.BoolValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.BoolValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.BytesValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.BytesValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$Edition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$VerificationState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnumType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$FieldPresence", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$JsonFormat", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$MessageEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$RepeatedFieldEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Utf8Validation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Label", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$CType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$JSType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionRetention", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionTargetType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$OptimizeMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Semantic", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$IdempotencyLevel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DoubleValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DoubleValue$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.Empty", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty$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.FloatValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FloatValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Int32Value", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Int32Value$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Int64Value", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Int64Value$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.StringValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.StringValue$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.protobuf.UInt32Value", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.UInt32Value$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.UInt64Value", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.UInt64Value$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-fleetengine/google-maps-fleetengine/src/test/java/com/google/maps/fleetengine/v1/MockTripService.java b/java-maps-fleetengine/google-maps-fleetengine/src/test/java/com/google/maps/fleetengine/v1/MockTripService.java new file mode 100644 index 000000000000..83b2ffaaba1b --- /dev/null +++ b/java-maps-fleetengine/google-maps-fleetengine/src/test/java/com/google/maps/fleetengine/v1/MockTripService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.fleetengine.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 MockTripService implements MockGrpcService { + private final MockTripServiceImpl serviceImpl; + + public MockTripService() { + serviceImpl = new MockTripServiceImpl(); + } + + @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-fleetengine/google-maps-fleetengine/src/test/java/com/google/maps/fleetengine/v1/MockTripServiceImpl.java b/java-maps-fleetengine/google-maps-fleetengine/src/test/java/com/google/maps/fleetengine/v1/MockTripServiceImpl.java new file mode 100644 index 000000000000..5a082afe8c86 --- /dev/null +++ b/java-maps-fleetengine/google-maps-fleetengine/src/test/java/com/google/maps/fleetengine/v1/MockTripServiceImpl.java @@ -0,0 +1,163 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.fleetengine.v1; + +import com.google.api.core.BetaApi; +import com.google.maps.fleetengine.v1.TripServiceGrpc.TripServiceImplBase; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +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 MockTripServiceImpl extends TripServiceImplBase { + private List requests; + private Queue responses; + + public MockTripServiceImpl() { + 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()))); + } + } + + @Override + public void reportBillableTrip( + ReportBillableTripRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) 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 ReportBillableTrip, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void searchTrips( + SearchTripsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SearchTripsResponse) { + requests.add(request); + responseObserver.onNext(((SearchTripsResponse) 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 SearchTrips, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SearchTripsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateTrip(UpdateTripRequest 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 UpdateTrip, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Trip.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-maps-fleetengine/google-maps-fleetengine/src/test/java/com/google/maps/fleetengine/v1/MockVehicleService.java b/java-maps-fleetengine/google-maps-fleetengine/src/test/java/com/google/maps/fleetengine/v1/MockVehicleService.java new file mode 100644 index 000000000000..924fc6c619aa --- /dev/null +++ b/java-maps-fleetengine/google-maps-fleetengine/src/test/java/com/google/maps/fleetengine/v1/MockVehicleService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.fleetengine.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 MockVehicleService implements MockGrpcService { + private final MockVehicleServiceImpl serviceImpl; + + public MockVehicleService() { + serviceImpl = new MockVehicleServiceImpl(); + } + + @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-fleetengine/google-maps-fleetengine/src/test/java/com/google/maps/fleetengine/v1/MockVehicleServiceImpl.java b/java-maps-fleetengine/google-maps-fleetengine/src/test/java/com/google/maps/fleetengine/v1/MockVehicleServiceImpl.java new file mode 100644 index 000000000000..f50231c6a3f3 --- /dev/null +++ b/java-maps-fleetengine/google-maps-fleetengine/src/test/java/com/google/maps/fleetengine/v1/MockVehicleServiceImpl.java @@ -0,0 +1,186 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.fleetengine.v1; + +import com.google.api.core.BetaApi; +import com.google.maps.fleetengine.v1.VehicleServiceGrpc.VehicleServiceImplBase; +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 MockVehicleServiceImpl extends VehicleServiceImplBase { + private List requests; + private Queue responses; + + public MockVehicleServiceImpl() { + 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 createVehicle( + CreateVehicleRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Vehicle) { + requests.add(request); + responseObserver.onNext(((Vehicle) 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 CreateVehicle, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Vehicle.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getVehicle(GetVehicleRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Vehicle) { + requests.add(request); + responseObserver.onNext(((Vehicle) 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 GetVehicle, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Vehicle.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateVehicle( + UpdateVehicleRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Vehicle) { + requests.add(request); + responseObserver.onNext(((Vehicle) 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 UpdateVehicle, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Vehicle.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateVehicleAttributes( + UpdateVehicleAttributesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof UpdateVehicleAttributesResponse) { + requests.add(request); + responseObserver.onNext(((UpdateVehicleAttributesResponse) 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 UpdateVehicleAttributes, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + UpdateVehicleAttributesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listVehicles( + ListVehiclesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListVehiclesResponse) { + requests.add(request); + responseObserver.onNext(((ListVehiclesResponse) 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 ListVehicles, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListVehiclesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void searchVehicles( + SearchVehiclesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SearchVehiclesResponse) { + requests.add(request); + responseObserver.onNext(((SearchVehiclesResponse) 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 SearchVehicles, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SearchVehiclesResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-maps-fleetengine/google-maps-fleetengine/src/test/java/com/google/maps/fleetengine/v1/TripServiceClientTest.java b/java-maps-fleetengine/google-maps-fleetengine/src/test/java/com/google/maps/fleetengine/v1/TripServiceClientTest.java new file mode 100644 index 000000000000..1b3ae8e7f0fb --- /dev/null +++ b/java-maps-fleetengine/google-maps-fleetengine/src/test/java/com/google/maps/fleetengine/v1/TripServiceClientTest.java @@ -0,0 +1,478 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.fleetengine.v1; + +import static com.google.maps.fleetengine.v1.TripServiceClient.SearchTripsPagedResponse; + +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.common.collect.Lists; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Duration; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Int32Value; +import com.google.protobuf.Timestamp; +import com.google.type.LatLng; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class TripServiceClientTest { + private static MockServiceHelper mockServiceHelper; + private static MockTripService mockTripService; + private LocalChannelProvider channelProvider; + private TripServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockTripService = new MockTripService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockTripService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + TripServiceSettings settings = + TripServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = TripServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createTripTest() throws Exception { + Trip expectedResponse = + Trip.newBuilder() + .setName(TripName.of("[PROVIDER]", "[TRIP]").toString()) + .setVehicleId("vehicleId-1984135833") + .setTripStatus(TripStatus.forNumber(0)) + .setTripType(TripType.forNumber(0)) + .setPickupPoint(TerminalLocation.newBuilder().build()) + .setActualPickupPoint(StopLocation.newBuilder().build()) + .setActualPickupArrivalPoint(StopLocation.newBuilder().build()) + .setPickupTime(Timestamp.newBuilder().build()) + .addAllIntermediateDestinations(new ArrayList()) + .setIntermediateDestinationsVersion(Timestamp.newBuilder().build()) + .setIntermediateDestinationIndex(-144716901) + .addAllActualIntermediateDestinationArrivalPoints(new ArrayList()) + .addAllActualIntermediateDestinations(new ArrayList()) + .setDropoffPoint(TerminalLocation.newBuilder().build()) + .setActualDropoffPoint(StopLocation.newBuilder().build()) + .setDropoffTime(Timestamp.newBuilder().build()) + .addAllRemainingWaypoints(new ArrayList()) + .addAllVehicleWaypoints(new ArrayList()) + .addAllRoute(new ArrayList()) + .setCurrentRouteSegment("currentRouteSegment29209795") + .setCurrentRouteSegmentVersion(Timestamp.newBuilder().build()) + .setCurrentRouteSegmentTraffic(ConsumableTrafficPolyline.newBuilder().build()) + .setCurrentRouteSegmentTrafficVersion(Timestamp.newBuilder().build()) + .setCurrentRouteSegmentEndPoint(TripWaypoint.newBuilder().build()) + .setRemainingDistanceMeters(Int32Value.newBuilder().build()) + .setEtaToFirstWaypoint(Timestamp.newBuilder().build()) + .setRemainingTimeToFirstWaypoint(Duration.newBuilder().build()) + .setRemainingWaypointsVersion(Timestamp.newBuilder().build()) + .setRemainingWaypointsRouteVersion(Timestamp.newBuilder().build()) + .setNumberOfPassengers(-674364405) + .setLastLocation(VehicleLocation.newBuilder().build()) + .setLastLocationSnappable(true) + .setView(TripView.forNumber(0)) + .build(); + mockTripService.addResponse(expectedResponse); + + CreateTripRequest request = + CreateTripRequest.newBuilder() + .setHeader(RequestHeader.newBuilder().build()) + .setParent(TripName.of("[PROVIDER]", "[TRIP]").toString()) + .setTripId("tripId-865466336") + .setTrip(Trip.newBuilder().build()) + .build(); + + Trip actualResponse = client.createTrip(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTripService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateTripRequest actualRequest = ((CreateTripRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getHeader(), actualRequest.getHeader()); + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getTripId(), actualRequest.getTripId()); + Assert.assertEquals(request.getTrip(), actualRequest.getTrip()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createTripExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTripService.addException(exception); + + try { + CreateTripRequest request = + CreateTripRequest.newBuilder() + .setHeader(RequestHeader.newBuilder().build()) + .setParent(TripName.of("[PROVIDER]", "[TRIP]").toString()) + .setTripId("tripId-865466336") + .setTrip(Trip.newBuilder().build()) + .build(); + client.createTrip(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getTripTest() throws Exception { + Trip expectedResponse = + Trip.newBuilder() + .setName(TripName.of("[PROVIDER]", "[TRIP]").toString()) + .setVehicleId("vehicleId-1984135833") + .setTripStatus(TripStatus.forNumber(0)) + .setTripType(TripType.forNumber(0)) + .setPickupPoint(TerminalLocation.newBuilder().build()) + .setActualPickupPoint(StopLocation.newBuilder().build()) + .setActualPickupArrivalPoint(StopLocation.newBuilder().build()) + .setPickupTime(Timestamp.newBuilder().build()) + .addAllIntermediateDestinations(new ArrayList()) + .setIntermediateDestinationsVersion(Timestamp.newBuilder().build()) + .setIntermediateDestinationIndex(-144716901) + .addAllActualIntermediateDestinationArrivalPoints(new ArrayList()) + .addAllActualIntermediateDestinations(new ArrayList()) + .setDropoffPoint(TerminalLocation.newBuilder().build()) + .setActualDropoffPoint(StopLocation.newBuilder().build()) + .setDropoffTime(Timestamp.newBuilder().build()) + .addAllRemainingWaypoints(new ArrayList()) + .addAllVehicleWaypoints(new ArrayList()) + .addAllRoute(new ArrayList()) + .setCurrentRouteSegment("currentRouteSegment29209795") + .setCurrentRouteSegmentVersion(Timestamp.newBuilder().build()) + .setCurrentRouteSegmentTraffic(ConsumableTrafficPolyline.newBuilder().build()) + .setCurrentRouteSegmentTrafficVersion(Timestamp.newBuilder().build()) + .setCurrentRouteSegmentEndPoint(TripWaypoint.newBuilder().build()) + .setRemainingDistanceMeters(Int32Value.newBuilder().build()) + .setEtaToFirstWaypoint(Timestamp.newBuilder().build()) + .setRemainingTimeToFirstWaypoint(Duration.newBuilder().build()) + .setRemainingWaypointsVersion(Timestamp.newBuilder().build()) + .setRemainingWaypointsRouteVersion(Timestamp.newBuilder().build()) + .setNumberOfPassengers(-674364405) + .setLastLocation(VehicleLocation.newBuilder().build()) + .setLastLocationSnappable(true) + .setView(TripView.forNumber(0)) + .build(); + mockTripService.addResponse(expectedResponse); + + GetTripRequest request = + GetTripRequest.newBuilder() + .setHeader(RequestHeader.newBuilder().build()) + .setName(TripName.of("[PROVIDER]", "[TRIP]").toString()) + .setView(TripView.forNumber(0)) + .setCurrentRouteSegmentVersion(Timestamp.newBuilder().build()) + .setRemainingWaypointsVersion(Timestamp.newBuilder().build()) + .setRouteFormatType(PolylineFormatType.forNumber(0)) + .setCurrentRouteSegmentTrafficVersion(Timestamp.newBuilder().build()) + .setRemainingWaypointsRouteVersion(Timestamp.newBuilder().build()) + .build(); + + Trip actualResponse = client.getTrip(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTripService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetTripRequest actualRequest = ((GetTripRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getHeader(), actualRequest.getHeader()); + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getView(), actualRequest.getView()); + Assert.assertEquals( + request.getCurrentRouteSegmentVersion(), actualRequest.getCurrentRouteSegmentVersion()); + Assert.assertEquals( + request.getRemainingWaypointsVersion(), actualRequest.getRemainingWaypointsVersion()); + Assert.assertEquals(request.getRouteFormatType(), actualRequest.getRouteFormatType()); + Assert.assertEquals( + request.getCurrentRouteSegmentTrafficVersion(), + actualRequest.getCurrentRouteSegmentTrafficVersion()); + Assert.assertEquals( + request.getRemainingWaypointsRouteVersion(), + actualRequest.getRemainingWaypointsRouteVersion()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getTripExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTripService.addException(exception); + + try { + GetTripRequest request = + GetTripRequest.newBuilder() + .setHeader(RequestHeader.newBuilder().build()) + .setName(TripName.of("[PROVIDER]", "[TRIP]").toString()) + .setView(TripView.forNumber(0)) + .setCurrentRouteSegmentVersion(Timestamp.newBuilder().build()) + .setRemainingWaypointsVersion(Timestamp.newBuilder().build()) + .setRouteFormatType(PolylineFormatType.forNumber(0)) + .setCurrentRouteSegmentTrafficVersion(Timestamp.newBuilder().build()) + .setRemainingWaypointsRouteVersion(Timestamp.newBuilder().build()) + .build(); + client.getTrip(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void reportBillableTripTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockTripService.addResponse(expectedResponse); + + ReportBillableTripRequest request = + ReportBillableTripRequest.newBuilder() + .setName("name3373707") + .setCountryCode("countryCode-1477067101") + .setPlatform(BillingPlatformIdentifier.forNumber(0)) + .addAllRelatedIds(new ArrayList()) + .build(); + + client.reportBillableTrip(request); + + List actualRequests = mockTripService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ReportBillableTripRequest actualRequest = ((ReportBillableTripRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getCountryCode(), actualRequest.getCountryCode()); + Assert.assertEquals(request.getPlatform(), actualRequest.getPlatform()); + Assert.assertEquals(request.getRelatedIdsList(), actualRequest.getRelatedIdsList()); + Assert.assertEquals(request.getSolutionType(), actualRequest.getSolutionType()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void reportBillableTripExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTripService.addException(exception); + + try { + ReportBillableTripRequest request = + ReportBillableTripRequest.newBuilder() + .setName("name3373707") + .setCountryCode("countryCode-1477067101") + .setPlatform(BillingPlatformIdentifier.forNumber(0)) + .addAllRelatedIds(new ArrayList()) + .build(); + client.reportBillableTrip(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchTripsTest() throws Exception { + Trip responsesElement = Trip.newBuilder().build(); + SearchTripsResponse expectedResponse = + SearchTripsResponse.newBuilder() + .setNextPageToken("") + .addAllTrips(Arrays.asList(responsesElement)) + .build(); + mockTripService.addResponse(expectedResponse); + + SearchTripsRequest request = + SearchTripsRequest.newBuilder() + .setHeader(RequestHeader.newBuilder().build()) + .setParent("parent-995424086") + .setVehicleId("vehicleId-1984135833") + .setActiveTripsOnly(true) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setMinimumStaleness(Duration.newBuilder().build()) + .build(); + + SearchTripsPagedResponse pagedListResponse = client.searchTrips(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTripsList().get(0), resources.get(0)); + + List actualRequests = mockTripService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchTripsRequest actualRequest = ((SearchTripsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getHeader(), actualRequest.getHeader()); + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getVehicleId(), actualRequest.getVehicleId()); + Assert.assertEquals(request.getActiveTripsOnly(), actualRequest.getActiveTripsOnly()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertEquals(request.getMinimumStaleness(), actualRequest.getMinimumStaleness()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchTripsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTripService.addException(exception); + + try { + SearchTripsRequest request = + SearchTripsRequest.newBuilder() + .setHeader(RequestHeader.newBuilder().build()) + .setParent("parent-995424086") + .setVehicleId("vehicleId-1984135833") + .setActiveTripsOnly(true) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setMinimumStaleness(Duration.newBuilder().build()) + .build(); + client.searchTrips(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateTripTest() throws Exception { + Trip expectedResponse = + Trip.newBuilder() + .setName(TripName.of("[PROVIDER]", "[TRIP]").toString()) + .setVehicleId("vehicleId-1984135833") + .setTripStatus(TripStatus.forNumber(0)) + .setTripType(TripType.forNumber(0)) + .setPickupPoint(TerminalLocation.newBuilder().build()) + .setActualPickupPoint(StopLocation.newBuilder().build()) + .setActualPickupArrivalPoint(StopLocation.newBuilder().build()) + .setPickupTime(Timestamp.newBuilder().build()) + .addAllIntermediateDestinations(new ArrayList()) + .setIntermediateDestinationsVersion(Timestamp.newBuilder().build()) + .setIntermediateDestinationIndex(-144716901) + .addAllActualIntermediateDestinationArrivalPoints(new ArrayList()) + .addAllActualIntermediateDestinations(new ArrayList()) + .setDropoffPoint(TerminalLocation.newBuilder().build()) + .setActualDropoffPoint(StopLocation.newBuilder().build()) + .setDropoffTime(Timestamp.newBuilder().build()) + .addAllRemainingWaypoints(new ArrayList()) + .addAllVehicleWaypoints(new ArrayList()) + .addAllRoute(new ArrayList()) + .setCurrentRouteSegment("currentRouteSegment29209795") + .setCurrentRouteSegmentVersion(Timestamp.newBuilder().build()) + .setCurrentRouteSegmentTraffic(ConsumableTrafficPolyline.newBuilder().build()) + .setCurrentRouteSegmentTrafficVersion(Timestamp.newBuilder().build()) + .setCurrentRouteSegmentEndPoint(TripWaypoint.newBuilder().build()) + .setRemainingDistanceMeters(Int32Value.newBuilder().build()) + .setEtaToFirstWaypoint(Timestamp.newBuilder().build()) + .setRemainingTimeToFirstWaypoint(Duration.newBuilder().build()) + .setRemainingWaypointsVersion(Timestamp.newBuilder().build()) + .setRemainingWaypointsRouteVersion(Timestamp.newBuilder().build()) + .setNumberOfPassengers(-674364405) + .setLastLocation(VehicleLocation.newBuilder().build()) + .setLastLocationSnappable(true) + .setView(TripView.forNumber(0)) + .build(); + mockTripService.addResponse(expectedResponse); + + UpdateTripRequest request = + UpdateTripRequest.newBuilder() + .setHeader(RequestHeader.newBuilder().build()) + .setName("name3373707") + .setTrip(Trip.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Trip actualResponse = client.updateTrip(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTripService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateTripRequest actualRequest = ((UpdateTripRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getHeader(), actualRequest.getHeader()); + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getTrip(), actualRequest.getTrip()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateTripExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTripService.addException(exception); + + try { + UpdateTripRequest request = + UpdateTripRequest.newBuilder() + .setHeader(RequestHeader.newBuilder().build()) + .setName("name3373707") + .setTrip(Trip.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.updateTrip(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-maps-fleetengine/google-maps-fleetengine/src/test/java/com/google/maps/fleetengine/v1/VehicleServiceClientTest.java b/java-maps-fleetengine/google-maps-fleetengine/src/test/java/com/google/maps/fleetengine/v1/VehicleServiceClientTest.java new file mode 100644 index 000000000000..d14e03aa5130 --- /dev/null +++ b/java-maps-fleetengine/google-maps-fleetengine/src/test/java/com/google/maps/fleetengine/v1/VehicleServiceClientTest.java @@ -0,0 +1,550 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.fleetengine.v1; + +import static com.google.maps.fleetengine.v1.VehicleServiceClient.ListVehiclesPagedResponse; + +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.common.collect.Lists; +import com.google.geo.type.Viewport; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Duration; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Int32Value; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class VehicleServiceClientTest { + private static MockServiceHelper mockServiceHelper; + private static MockVehicleService mockVehicleService; + private LocalChannelProvider channelProvider; + private VehicleServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockVehicleService = new MockVehicleService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockVehicleService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + VehicleServiceSettings settings = + VehicleServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = VehicleServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createVehicleTest() throws Exception { + Vehicle expectedResponse = + Vehicle.newBuilder() + .setName(VehicleName.of("[PROVIDER]", "[VEHICLE]").toString()) + .setVehicleState(VehicleState.forNumber(0)) + .addAllSupportedTripTypes(new ArrayList()) + .addAllCurrentTrips(new ArrayList()) + .setLastLocation(VehicleLocation.newBuilder().build()) + .setMaximumCapacity(582710265) + .addAllAttributes(new ArrayList()) + .setVehicleType(Vehicle.VehicleType.newBuilder().build()) + .setLicensePlate(LicensePlate.newBuilder().build()) + .addAllRoute(new ArrayList()) + .setCurrentRouteSegment("currentRouteSegment29209795") + .setCurrentRouteSegmentTraffic(TrafficPolylineData.newBuilder().build()) + .setCurrentRouteSegmentVersion(Timestamp.newBuilder().build()) + .setCurrentRouteSegmentEndPoint(TripWaypoint.newBuilder().build()) + .setRemainingDistanceMeters(Int32Value.newBuilder().build()) + .setEtaToFirstWaypoint(Timestamp.newBuilder().build()) + .setRemainingTimeSeconds(Int32Value.newBuilder().build()) + .addAllWaypoints(new ArrayList()) + .setWaypointsVersion(Timestamp.newBuilder().build()) + .setBackToBackEnabled(true) + .setNavigationStatus(NavigationStatus.forNumber(0)) + .setDeviceSettings(DeviceSettings.newBuilder().build()) + .build(); + mockVehicleService.addResponse(expectedResponse); + + CreateVehicleRequest request = + CreateVehicleRequest.newBuilder() + .setHeader(RequestHeader.newBuilder().build()) + .setParent("parent-995424086") + .setVehicleId("vehicleId-1984135833") + .setVehicle(Vehicle.newBuilder().build()) + .build(); + + Vehicle actualResponse = client.createVehicle(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockVehicleService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateVehicleRequest actualRequest = ((CreateVehicleRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getHeader(), actualRequest.getHeader()); + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getVehicleId(), actualRequest.getVehicleId()); + Assert.assertEquals(request.getVehicle(), actualRequest.getVehicle()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createVehicleExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockVehicleService.addException(exception); + + try { + CreateVehicleRequest request = + CreateVehicleRequest.newBuilder() + .setHeader(RequestHeader.newBuilder().build()) + .setParent("parent-995424086") + .setVehicleId("vehicleId-1984135833") + .setVehicle(Vehicle.newBuilder().build()) + .build(); + client.createVehicle(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getVehicleTest() throws Exception { + Vehicle expectedResponse = + Vehicle.newBuilder() + .setName(VehicleName.of("[PROVIDER]", "[VEHICLE]").toString()) + .setVehicleState(VehicleState.forNumber(0)) + .addAllSupportedTripTypes(new ArrayList()) + .addAllCurrentTrips(new ArrayList()) + .setLastLocation(VehicleLocation.newBuilder().build()) + .setMaximumCapacity(582710265) + .addAllAttributes(new ArrayList()) + .setVehicleType(Vehicle.VehicleType.newBuilder().build()) + .setLicensePlate(LicensePlate.newBuilder().build()) + .addAllRoute(new ArrayList()) + .setCurrentRouteSegment("currentRouteSegment29209795") + .setCurrentRouteSegmentTraffic(TrafficPolylineData.newBuilder().build()) + .setCurrentRouteSegmentVersion(Timestamp.newBuilder().build()) + .setCurrentRouteSegmentEndPoint(TripWaypoint.newBuilder().build()) + .setRemainingDistanceMeters(Int32Value.newBuilder().build()) + .setEtaToFirstWaypoint(Timestamp.newBuilder().build()) + .setRemainingTimeSeconds(Int32Value.newBuilder().build()) + .addAllWaypoints(new ArrayList()) + .setWaypointsVersion(Timestamp.newBuilder().build()) + .setBackToBackEnabled(true) + .setNavigationStatus(NavigationStatus.forNumber(0)) + .setDeviceSettings(DeviceSettings.newBuilder().build()) + .build(); + mockVehicleService.addResponse(expectedResponse); + + GetVehicleRequest request = + GetVehicleRequest.newBuilder() + .setHeader(RequestHeader.newBuilder().build()) + .setName(VehicleName.of("[PROVIDER]", "[VEHICLE]").toString()) + .setCurrentRouteSegmentVersion(Timestamp.newBuilder().build()) + .setWaypointsVersion(Timestamp.newBuilder().build()) + .build(); + + Vehicle actualResponse = client.getVehicle(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockVehicleService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetVehicleRequest actualRequest = ((GetVehicleRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getHeader(), actualRequest.getHeader()); + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals( + request.getCurrentRouteSegmentVersion(), actualRequest.getCurrentRouteSegmentVersion()); + Assert.assertEquals(request.getWaypointsVersion(), actualRequest.getWaypointsVersion()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getVehicleExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockVehicleService.addException(exception); + + try { + GetVehicleRequest request = + GetVehicleRequest.newBuilder() + .setHeader(RequestHeader.newBuilder().build()) + .setName(VehicleName.of("[PROVIDER]", "[VEHICLE]").toString()) + .setCurrentRouteSegmentVersion(Timestamp.newBuilder().build()) + .setWaypointsVersion(Timestamp.newBuilder().build()) + .build(); + client.getVehicle(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateVehicleTest() throws Exception { + Vehicle expectedResponse = + Vehicle.newBuilder() + .setName(VehicleName.of("[PROVIDER]", "[VEHICLE]").toString()) + .setVehicleState(VehicleState.forNumber(0)) + .addAllSupportedTripTypes(new ArrayList()) + .addAllCurrentTrips(new ArrayList()) + .setLastLocation(VehicleLocation.newBuilder().build()) + .setMaximumCapacity(582710265) + .addAllAttributes(new ArrayList()) + .setVehicleType(Vehicle.VehicleType.newBuilder().build()) + .setLicensePlate(LicensePlate.newBuilder().build()) + .addAllRoute(new ArrayList()) + .setCurrentRouteSegment("currentRouteSegment29209795") + .setCurrentRouteSegmentTraffic(TrafficPolylineData.newBuilder().build()) + .setCurrentRouteSegmentVersion(Timestamp.newBuilder().build()) + .setCurrentRouteSegmentEndPoint(TripWaypoint.newBuilder().build()) + .setRemainingDistanceMeters(Int32Value.newBuilder().build()) + .setEtaToFirstWaypoint(Timestamp.newBuilder().build()) + .setRemainingTimeSeconds(Int32Value.newBuilder().build()) + .addAllWaypoints(new ArrayList()) + .setWaypointsVersion(Timestamp.newBuilder().build()) + .setBackToBackEnabled(true) + .setNavigationStatus(NavigationStatus.forNumber(0)) + .setDeviceSettings(DeviceSettings.newBuilder().build()) + .build(); + mockVehicleService.addResponse(expectedResponse); + + UpdateVehicleRequest request = + UpdateVehicleRequest.newBuilder() + .setHeader(RequestHeader.newBuilder().build()) + .setName("name3373707") + .setVehicle(Vehicle.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Vehicle actualResponse = client.updateVehicle(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockVehicleService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateVehicleRequest actualRequest = ((UpdateVehicleRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getHeader(), actualRequest.getHeader()); + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getVehicle(), actualRequest.getVehicle()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateVehicleExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockVehicleService.addException(exception); + + try { + UpdateVehicleRequest request = + UpdateVehicleRequest.newBuilder() + .setHeader(RequestHeader.newBuilder().build()) + .setName("name3373707") + .setVehicle(Vehicle.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.updateVehicle(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateVehicleAttributesTest() throws Exception { + UpdateVehicleAttributesResponse expectedResponse = + UpdateVehicleAttributesResponse.newBuilder() + .addAllAttributes(new ArrayList()) + .build(); + mockVehicleService.addResponse(expectedResponse); + + UpdateVehicleAttributesRequest request = + UpdateVehicleAttributesRequest.newBuilder() + .setHeader(RequestHeader.newBuilder().build()) + .setName("name3373707") + .addAllAttributes(new ArrayList()) + .build(); + + UpdateVehicleAttributesResponse actualResponse = client.updateVehicleAttributes(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockVehicleService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateVehicleAttributesRequest actualRequest = + ((UpdateVehicleAttributesRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getHeader(), actualRequest.getHeader()); + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getAttributesList(), actualRequest.getAttributesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateVehicleAttributesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockVehicleService.addException(exception); + + try { + UpdateVehicleAttributesRequest request = + UpdateVehicleAttributesRequest.newBuilder() + .setHeader(RequestHeader.newBuilder().build()) + .setName("name3373707") + .addAllAttributes(new ArrayList()) + .build(); + client.updateVehicleAttributes(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listVehiclesTest() throws Exception { + Vehicle responsesElement = Vehicle.newBuilder().build(); + ListVehiclesResponse expectedResponse = + ListVehiclesResponse.newBuilder() + .setNextPageToken("") + .addAllVehicles(Arrays.asList(responsesElement)) + .build(); + mockVehicleService.addResponse(expectedResponse); + + ListVehiclesRequest request = + ListVehiclesRequest.newBuilder() + .setHeader(RequestHeader.newBuilder().build()) + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setMinimumCapacity(Int32Value.newBuilder().build()) + .addAllTripTypes(new ArrayList()) + .setMaximumStaleness(Duration.newBuilder().build()) + .addAllVehicleTypeCategories(new ArrayList()) + .addAllRequiredAttributes(new ArrayList()) + .addAllRequiredOneOfAttributes(new ArrayList()) + .addAllRequiredOneOfAttributeSets(new ArrayList()) + .setVehicleState(VehicleState.forNumber(0)) + .setOnTripOnly(true) + .setFilter("filter-1274492040") + .setViewport(Viewport.newBuilder().build()) + .build(); + + ListVehiclesPagedResponse pagedListResponse = client.listVehicles(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getVehiclesList().get(0), resources.get(0)); + + List actualRequests = mockVehicleService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListVehiclesRequest actualRequest = ((ListVehiclesRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getHeader(), actualRequest.getHeader()); + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertEquals(request.getMinimumCapacity(), actualRequest.getMinimumCapacity()); + Assert.assertEquals(request.getTripTypesList(), actualRequest.getTripTypesList()); + Assert.assertEquals(request.getMaximumStaleness(), actualRequest.getMaximumStaleness()); + Assert.assertEquals( + request.getVehicleTypeCategoriesList(), actualRequest.getVehicleTypeCategoriesList()); + Assert.assertEquals( + request.getRequiredAttributesList(), actualRequest.getRequiredAttributesList()); + Assert.assertEquals( + request.getRequiredOneOfAttributesList(), actualRequest.getRequiredOneOfAttributesList()); + Assert.assertEquals( + request.getRequiredOneOfAttributeSetsList(), + actualRequest.getRequiredOneOfAttributeSetsList()); + Assert.assertEquals(request.getVehicleState(), actualRequest.getVehicleState()); + Assert.assertEquals(request.getOnTripOnly(), actualRequest.getOnTripOnly()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getViewport(), actualRequest.getViewport()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listVehiclesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockVehicleService.addException(exception); + + try { + ListVehiclesRequest request = + ListVehiclesRequest.newBuilder() + .setHeader(RequestHeader.newBuilder().build()) + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setMinimumCapacity(Int32Value.newBuilder().build()) + .addAllTripTypes(new ArrayList()) + .setMaximumStaleness(Duration.newBuilder().build()) + .addAllVehicleTypeCategories(new ArrayList()) + .addAllRequiredAttributes(new ArrayList()) + .addAllRequiredOneOfAttributes(new ArrayList()) + .addAllRequiredOneOfAttributeSets(new ArrayList()) + .setVehicleState(VehicleState.forNumber(0)) + .setOnTripOnly(true) + .setFilter("filter-1274492040") + .setViewport(Viewport.newBuilder().build()) + .build(); + client.listVehicles(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchVehiclesTest() throws Exception { + SearchVehiclesResponse expectedResponse = + SearchVehiclesResponse.newBuilder().addAllMatches(new ArrayList()).build(); + mockVehicleService.addResponse(expectedResponse); + + SearchVehiclesRequest request = + SearchVehiclesRequest.newBuilder() + .setHeader(RequestHeader.newBuilder().build()) + .setParent("parent-995424086") + .setPickupPoint(TerminalLocation.newBuilder().build()) + .setDropoffPoint(TerminalLocation.newBuilder().build()) + .setPickupRadiusMeters(-254656044) + .setCount(94851343) + .setMinimumCapacity(518841803) + .addAllTripTypes(new ArrayList()) + .setMaximumStaleness(Duration.newBuilder().build()) + .addAllVehicleTypes(new ArrayList()) + .addAllRequiredAttributes(new ArrayList()) + .addAllRequiredOneOfAttributes(new ArrayList()) + .addAllRequiredOneOfAttributeSets(new ArrayList()) + .setIncludeBackToBack(true) + .setTripId("tripId-865466336") + .setFilter("filter-1274492040") + .build(); + + SearchVehiclesResponse actualResponse = client.searchVehicles(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockVehicleService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchVehiclesRequest actualRequest = ((SearchVehiclesRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getHeader(), actualRequest.getHeader()); + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getPickupPoint(), actualRequest.getPickupPoint()); + Assert.assertEquals(request.getDropoffPoint(), actualRequest.getDropoffPoint()); + Assert.assertEquals(request.getPickupRadiusMeters(), actualRequest.getPickupRadiusMeters()); + Assert.assertEquals(request.getCount(), actualRequest.getCount()); + Assert.assertEquals(request.getMinimumCapacity(), actualRequest.getMinimumCapacity()); + Assert.assertEquals(request.getTripTypesList(), actualRequest.getTripTypesList()); + Assert.assertEquals(request.getMaximumStaleness(), actualRequest.getMaximumStaleness()); + Assert.assertEquals(request.getVehicleTypesList(), actualRequest.getVehicleTypesList()); + Assert.assertEquals( + request.getRequiredAttributesList(), actualRequest.getRequiredAttributesList()); + Assert.assertEquals( + request.getRequiredOneOfAttributesList(), actualRequest.getRequiredOneOfAttributesList()); + Assert.assertEquals( + request.getRequiredOneOfAttributeSetsList(), + actualRequest.getRequiredOneOfAttributeSetsList()); + Assert.assertEquals(request.getOrderBy(), actualRequest.getOrderBy()); + Assert.assertEquals(request.getIncludeBackToBack(), actualRequest.getIncludeBackToBack()); + Assert.assertEquals(request.getTripId(), actualRequest.getTripId()); + Assert.assertEquals(request.getCurrentTripsPresent(), actualRequest.getCurrentTripsPresent()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchVehiclesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockVehicleService.addException(exception); + + try { + SearchVehiclesRequest request = + SearchVehiclesRequest.newBuilder() + .setHeader(RequestHeader.newBuilder().build()) + .setParent("parent-995424086") + .setPickupPoint(TerminalLocation.newBuilder().build()) + .setDropoffPoint(TerminalLocation.newBuilder().build()) + .setPickupRadiusMeters(-254656044) + .setCount(94851343) + .setMinimumCapacity(518841803) + .addAllTripTypes(new ArrayList()) + .setMaximumStaleness(Duration.newBuilder().build()) + .addAllVehicleTypes(new ArrayList()) + .addAllRequiredAttributes(new ArrayList()) + .addAllRequiredOneOfAttributes(new ArrayList()) + .addAllRequiredOneOfAttributeSets(new ArrayList()) + .setIncludeBackToBack(true) + .setTripId("tripId-865466336") + .setFilter("filter-1274492040") + .build(); + client.searchVehicles(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-maps-fleetengine/grpc-google-maps-fleetengine-v1/pom.xml b/java-maps-fleetengine/grpc-google-maps-fleetengine-v1/pom.xml new file mode 100644 index 000000000000..4d6df8cd63b1 --- /dev/null +++ b/java-maps-fleetengine/grpc-google-maps-fleetengine-v1/pom.xml @@ -0,0 +1,45 @@ + + 4.0.0 + com.google.maps.api.grpc + grpc-google-maps-fleetengine-v1 + 0.0.1-SNAPSHOT + grpc-google-maps-fleetengine-v1 + GRPC library for google-maps-fleetengine + + com.google.maps + google-maps-fleetengine-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-fleetengine-v1 + + + com.google.guava + guava + + + diff --git a/java-maps-fleetengine/grpc-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TripServiceGrpc.java b/java-maps-fleetengine/grpc-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TripServiceGrpc.java new file mode 100644 index 000000000000..afa3356fda7b --- /dev/null +++ b/java-maps-fleetengine/grpc-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TripServiceGrpc.java @@ -0,0 +1,811 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.maps.fleetengine.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Trip management service.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/maps/fleetengine/v1/trip_api.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class TripServiceGrpc { + + private TripServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = "maps.fleetengine.v1.TripService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.maps.fleetengine.v1.CreateTripRequest, com.google.maps.fleetengine.v1.Trip> + getCreateTripMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateTrip", + requestType = com.google.maps.fleetengine.v1.CreateTripRequest.class, + responseType = com.google.maps.fleetengine.v1.Trip.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.maps.fleetengine.v1.CreateTripRequest, com.google.maps.fleetengine.v1.Trip> + getCreateTripMethod() { + io.grpc.MethodDescriptor< + com.google.maps.fleetengine.v1.CreateTripRequest, com.google.maps.fleetengine.v1.Trip> + getCreateTripMethod; + if ((getCreateTripMethod = TripServiceGrpc.getCreateTripMethod) == null) { + synchronized (TripServiceGrpc.class) { + if ((getCreateTripMethod = TripServiceGrpc.getCreateTripMethod) == null) { + TripServiceGrpc.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.fleetengine.v1.CreateTripRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.maps.fleetengine.v1.Trip.getDefaultInstance())) + .setSchemaDescriptor(new TripServiceMethodDescriptorSupplier("CreateTrip")) + .build(); + } + } + } + return getCreateTripMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.maps.fleetengine.v1.GetTripRequest, com.google.maps.fleetengine.v1.Trip> + getGetTripMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetTrip", + requestType = com.google.maps.fleetengine.v1.GetTripRequest.class, + responseType = com.google.maps.fleetengine.v1.Trip.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.maps.fleetengine.v1.GetTripRequest, com.google.maps.fleetengine.v1.Trip> + getGetTripMethod() { + io.grpc.MethodDescriptor< + com.google.maps.fleetengine.v1.GetTripRequest, com.google.maps.fleetengine.v1.Trip> + getGetTripMethod; + if ((getGetTripMethod = TripServiceGrpc.getGetTripMethod) == null) { + synchronized (TripServiceGrpc.class) { + if ((getGetTripMethod = TripServiceGrpc.getGetTripMethod) == null) { + TripServiceGrpc.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.fleetengine.v1.GetTripRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.maps.fleetengine.v1.Trip.getDefaultInstance())) + .setSchemaDescriptor(new TripServiceMethodDescriptorSupplier("GetTrip")) + .build(); + } + } + } + return getGetTripMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.maps.fleetengine.v1.ReportBillableTripRequest, com.google.protobuf.Empty> + getReportBillableTripMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ReportBillableTrip", + requestType = com.google.maps.fleetengine.v1.ReportBillableTripRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.maps.fleetengine.v1.ReportBillableTripRequest, com.google.protobuf.Empty> + getReportBillableTripMethod() { + io.grpc.MethodDescriptor< + com.google.maps.fleetengine.v1.ReportBillableTripRequest, com.google.protobuf.Empty> + getReportBillableTripMethod; + if ((getReportBillableTripMethod = TripServiceGrpc.getReportBillableTripMethod) == null) { + synchronized (TripServiceGrpc.class) { + if ((getReportBillableTripMethod = TripServiceGrpc.getReportBillableTripMethod) == null) { + TripServiceGrpc.getReportBillableTripMethod = + getReportBillableTripMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ReportBillableTrip")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.maps.fleetengine.v1.ReportBillableTripRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new TripServiceMethodDescriptorSupplier("ReportBillableTrip")) + .build(); + } + } + } + return getReportBillableTripMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.maps.fleetengine.v1.SearchTripsRequest, + com.google.maps.fleetengine.v1.SearchTripsResponse> + getSearchTripsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SearchTrips", + requestType = com.google.maps.fleetengine.v1.SearchTripsRequest.class, + responseType = com.google.maps.fleetengine.v1.SearchTripsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.maps.fleetengine.v1.SearchTripsRequest, + com.google.maps.fleetengine.v1.SearchTripsResponse> + getSearchTripsMethod() { + io.grpc.MethodDescriptor< + com.google.maps.fleetengine.v1.SearchTripsRequest, + com.google.maps.fleetengine.v1.SearchTripsResponse> + getSearchTripsMethod; + if ((getSearchTripsMethod = TripServiceGrpc.getSearchTripsMethod) == null) { + synchronized (TripServiceGrpc.class) { + if ((getSearchTripsMethod = TripServiceGrpc.getSearchTripsMethod) == null) { + TripServiceGrpc.getSearchTripsMethod = + getSearchTripsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SearchTrips")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.maps.fleetengine.v1.SearchTripsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.maps.fleetengine.v1.SearchTripsResponse + .getDefaultInstance())) + .setSchemaDescriptor(new TripServiceMethodDescriptorSupplier("SearchTrips")) + .build(); + } + } + } + return getSearchTripsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.maps.fleetengine.v1.UpdateTripRequest, com.google.maps.fleetengine.v1.Trip> + getUpdateTripMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateTrip", + requestType = com.google.maps.fleetengine.v1.UpdateTripRequest.class, + responseType = com.google.maps.fleetengine.v1.Trip.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.maps.fleetengine.v1.UpdateTripRequest, com.google.maps.fleetengine.v1.Trip> + getUpdateTripMethod() { + io.grpc.MethodDescriptor< + com.google.maps.fleetengine.v1.UpdateTripRequest, com.google.maps.fleetengine.v1.Trip> + getUpdateTripMethod; + if ((getUpdateTripMethod = TripServiceGrpc.getUpdateTripMethod) == null) { + synchronized (TripServiceGrpc.class) { + if ((getUpdateTripMethod = TripServiceGrpc.getUpdateTripMethod) == null) { + TripServiceGrpc.getUpdateTripMethod = + getUpdateTripMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateTrip")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.maps.fleetengine.v1.UpdateTripRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.maps.fleetengine.v1.Trip.getDefaultInstance())) + .setSchemaDescriptor(new TripServiceMethodDescriptorSupplier("UpdateTrip")) + .build(); + } + } + } + return getUpdateTripMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static TripServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public TripServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TripServiceStub(channel, callOptions); + } + }; + return TripServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static TripServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public TripServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TripServiceBlockingStub(channel, callOptions); + } + }; + return TripServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static TripServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public TripServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TripServiceFutureStub(channel, callOptions); + } + }; + return TripServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Trip management service.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Creates a trip in the Fleet Engine and returns the new trip.
+     * 
+ */ + default void createTrip( + com.google.maps.fleetengine.v1.CreateTripRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateTripMethod(), responseObserver); + } + + /** + * + * + *
+     * Get information about a single trip.
+     * 
+ */ + default void getTrip( + com.google.maps.fleetengine.v1.GetTripRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTripMethod(), responseObserver); + } + + /** + * + * + *
+     * Report billable trip usage.
+     * 
+ */ + default void reportBillableTrip( + com.google.maps.fleetengine.v1.ReportBillableTripRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getReportBillableTripMethod(), responseObserver); + } + + /** + * + * + *
+     * Get all the trips for a specific vehicle.
+     * 
+ */ + default void searchTrips( + com.google.maps.fleetengine.v1.SearchTripsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSearchTripsMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates trip data.
+     * 
+ */ + default void updateTrip( + com.google.maps.fleetengine.v1.UpdateTripRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateTripMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service TripService. + * + *
+   * Trip management service.
+   * 
+ */ + public abstract static class TripServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return TripServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service TripService. + * + *
+   * Trip management service.
+   * 
+ */ + public static final class TripServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private TripServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected TripServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TripServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a trip in the Fleet Engine and returns the new trip.
+     * 
+ */ + public void createTrip( + com.google.maps.fleetengine.v1.CreateTripRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateTripMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Get information about a single trip.
+     * 
+ */ + public void getTrip( + com.google.maps.fleetengine.v1.GetTripRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetTripMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Report billable trip usage.
+     * 
+ */ + public void reportBillableTrip( + com.google.maps.fleetengine.v1.ReportBillableTripRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getReportBillableTripMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Get all the trips for a specific vehicle.
+     * 
+ */ + public void searchTrips( + com.google.maps.fleetengine.v1.SearchTripsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSearchTripsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates trip data.
+     * 
+ */ + public void updateTrip( + com.google.maps.fleetengine.v1.UpdateTripRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateTripMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service TripService. + * + *
+   * Trip management service.
+   * 
+ */ + public static final class TripServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private TripServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected TripServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TripServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a trip in the Fleet Engine and returns the new trip.
+     * 
+ */ + public com.google.maps.fleetengine.v1.Trip createTrip( + com.google.maps.fleetengine.v1.CreateTripRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateTripMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get information about a single trip.
+     * 
+ */ + public com.google.maps.fleetengine.v1.Trip getTrip( + com.google.maps.fleetengine.v1.GetTripRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetTripMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Report billable trip usage.
+     * 
+ */ + public com.google.protobuf.Empty reportBillableTrip( + com.google.maps.fleetengine.v1.ReportBillableTripRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getReportBillableTripMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get all the trips for a specific vehicle.
+     * 
+ */ + public com.google.maps.fleetengine.v1.SearchTripsResponse searchTrips( + com.google.maps.fleetengine.v1.SearchTripsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSearchTripsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates trip data.
+     * 
+ */ + public com.google.maps.fleetengine.v1.Trip updateTrip( + com.google.maps.fleetengine.v1.UpdateTripRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateTripMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service TripService. + * + *
+   * Trip management service.
+   * 
+ */ + public static final class TripServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private TripServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected TripServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TripServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a trip in the Fleet Engine and returns the new trip.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createTrip(com.google.maps.fleetengine.v1.CreateTripRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateTripMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Get information about a single trip.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getTrip(com.google.maps.fleetengine.v1.GetTripRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetTripMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Report billable trip usage.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + reportBillableTrip(com.google.maps.fleetengine.v1.ReportBillableTripRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getReportBillableTripMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Get all the trips for a specific vehicle.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.maps.fleetengine.v1.SearchTripsResponse> + searchTrips(com.google.maps.fleetengine.v1.SearchTripsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSearchTripsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates trip data.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateTrip(com.google.maps.fleetengine.v1.UpdateTripRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateTripMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_TRIP = 0; + private static final int METHODID_GET_TRIP = 1; + private static final int METHODID_REPORT_BILLABLE_TRIP = 2; + private static final int METHODID_SEARCH_TRIPS = 3; + private static final int METHODID_UPDATE_TRIP = 4; + + 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.fleetengine.v1.CreateTripRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_TRIP: + serviceImpl.getTrip( + (com.google.maps.fleetengine.v1.GetTripRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REPORT_BILLABLE_TRIP: + serviceImpl.reportBillableTrip( + (com.google.maps.fleetengine.v1.ReportBillableTripRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SEARCH_TRIPS: + serviceImpl.searchTrips( + (com.google.maps.fleetengine.v1.SearchTripsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_TRIP: + serviceImpl.updateTrip( + (com.google.maps.fleetengine.v1.UpdateTripRequest) 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.fleetengine.v1.CreateTripRequest, + com.google.maps.fleetengine.v1.Trip>(service, METHODID_CREATE_TRIP))) + .addMethod( + getGetTripMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.maps.fleetengine.v1.GetTripRequest, + com.google.maps.fleetengine.v1.Trip>(service, METHODID_GET_TRIP))) + .addMethod( + getReportBillableTripMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.maps.fleetengine.v1.ReportBillableTripRequest, + com.google.protobuf.Empty>(service, METHODID_REPORT_BILLABLE_TRIP))) + .addMethod( + getSearchTripsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.maps.fleetengine.v1.SearchTripsRequest, + com.google.maps.fleetengine.v1.SearchTripsResponse>( + service, METHODID_SEARCH_TRIPS))) + .addMethod( + getUpdateTripMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.maps.fleetengine.v1.UpdateTripRequest, + com.google.maps.fleetengine.v1.Trip>(service, METHODID_UPDATE_TRIP))) + .build(); + } + + private abstract static class TripServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + TripServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.maps.fleetengine.v1.TripApi.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("TripService"); + } + } + + private static final class TripServiceFileDescriptorSupplier + extends TripServiceBaseDescriptorSupplier { + TripServiceFileDescriptorSupplier() {} + } + + private static final class TripServiceMethodDescriptorSupplier + extends TripServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + TripServiceMethodDescriptorSupplier(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 (TripServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new TripServiceFileDescriptorSupplier()) + .addMethod(getCreateTripMethod()) + .addMethod(getGetTripMethod()) + .addMethod(getReportBillableTripMethod()) + .addMethod(getSearchTripsMethod()) + .addMethod(getUpdateTripMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-maps-fleetengine/grpc-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleServiceGrpc.java b/java-maps-fleetengine/grpc-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleServiceGrpc.java new file mode 100644 index 000000000000..d9dfa5b2ac16 --- /dev/null +++ b/java-maps-fleetengine/grpc-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleServiceGrpc.java @@ -0,0 +1,1126 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.maps.fleetengine.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Vehicle management service.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/maps/fleetengine/v1/vehicle_api.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class VehicleServiceGrpc { + + private VehicleServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = "maps.fleetengine.v1.VehicleService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.maps.fleetengine.v1.CreateVehicleRequest, + com.google.maps.fleetengine.v1.Vehicle> + getCreateVehicleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateVehicle", + requestType = com.google.maps.fleetengine.v1.CreateVehicleRequest.class, + responseType = com.google.maps.fleetengine.v1.Vehicle.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.maps.fleetengine.v1.CreateVehicleRequest, + com.google.maps.fleetengine.v1.Vehicle> + getCreateVehicleMethod() { + io.grpc.MethodDescriptor< + com.google.maps.fleetengine.v1.CreateVehicleRequest, + com.google.maps.fleetengine.v1.Vehicle> + getCreateVehicleMethod; + if ((getCreateVehicleMethod = VehicleServiceGrpc.getCreateVehicleMethod) == null) { + synchronized (VehicleServiceGrpc.class) { + if ((getCreateVehicleMethod = VehicleServiceGrpc.getCreateVehicleMethod) == null) { + VehicleServiceGrpc.getCreateVehicleMethod = + getCreateVehicleMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateVehicle")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.maps.fleetengine.v1.CreateVehicleRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.maps.fleetengine.v1.Vehicle.getDefaultInstance())) + .setSchemaDescriptor( + new VehicleServiceMethodDescriptorSupplier("CreateVehicle")) + .build(); + } + } + } + return getCreateVehicleMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.maps.fleetengine.v1.GetVehicleRequest, com.google.maps.fleetengine.v1.Vehicle> + getGetVehicleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetVehicle", + requestType = com.google.maps.fleetengine.v1.GetVehicleRequest.class, + responseType = com.google.maps.fleetengine.v1.Vehicle.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.maps.fleetengine.v1.GetVehicleRequest, com.google.maps.fleetengine.v1.Vehicle> + getGetVehicleMethod() { + io.grpc.MethodDescriptor< + com.google.maps.fleetengine.v1.GetVehicleRequest, + com.google.maps.fleetengine.v1.Vehicle> + getGetVehicleMethod; + if ((getGetVehicleMethod = VehicleServiceGrpc.getGetVehicleMethod) == null) { + synchronized (VehicleServiceGrpc.class) { + if ((getGetVehicleMethod = VehicleServiceGrpc.getGetVehicleMethod) == null) { + VehicleServiceGrpc.getGetVehicleMethod = + getGetVehicleMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetVehicle")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.maps.fleetengine.v1.GetVehicleRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.maps.fleetengine.v1.Vehicle.getDefaultInstance())) + .setSchemaDescriptor(new VehicleServiceMethodDescriptorSupplier("GetVehicle")) + .build(); + } + } + } + return getGetVehicleMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.maps.fleetengine.v1.UpdateVehicleRequest, + com.google.maps.fleetengine.v1.Vehicle> + getUpdateVehicleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateVehicle", + requestType = com.google.maps.fleetengine.v1.UpdateVehicleRequest.class, + responseType = com.google.maps.fleetengine.v1.Vehicle.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.maps.fleetengine.v1.UpdateVehicleRequest, + com.google.maps.fleetengine.v1.Vehicle> + getUpdateVehicleMethod() { + io.grpc.MethodDescriptor< + com.google.maps.fleetengine.v1.UpdateVehicleRequest, + com.google.maps.fleetengine.v1.Vehicle> + getUpdateVehicleMethod; + if ((getUpdateVehicleMethod = VehicleServiceGrpc.getUpdateVehicleMethod) == null) { + synchronized (VehicleServiceGrpc.class) { + if ((getUpdateVehicleMethod = VehicleServiceGrpc.getUpdateVehicleMethod) == null) { + VehicleServiceGrpc.getUpdateVehicleMethod = + getUpdateVehicleMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateVehicle")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.maps.fleetengine.v1.UpdateVehicleRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.maps.fleetengine.v1.Vehicle.getDefaultInstance())) + .setSchemaDescriptor( + new VehicleServiceMethodDescriptorSupplier("UpdateVehicle")) + .build(); + } + } + } + return getUpdateVehicleMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest, + com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse> + getUpdateVehicleAttributesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateVehicleAttributes", + requestType = com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest.class, + responseType = com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest, + com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse> + getUpdateVehicleAttributesMethod() { + io.grpc.MethodDescriptor< + com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest, + com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse> + getUpdateVehicleAttributesMethod; + if ((getUpdateVehicleAttributesMethod = VehicleServiceGrpc.getUpdateVehicleAttributesMethod) + == null) { + synchronized (VehicleServiceGrpc.class) { + if ((getUpdateVehicleAttributesMethod = VehicleServiceGrpc.getUpdateVehicleAttributesMethod) + == null) { + VehicleServiceGrpc.getUpdateVehicleAttributesMethod = + getUpdateVehicleAttributesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateVehicleAttributes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new VehicleServiceMethodDescriptorSupplier("UpdateVehicleAttributes")) + .build(); + } + } + } + return getUpdateVehicleAttributesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.maps.fleetengine.v1.ListVehiclesRequest, + com.google.maps.fleetengine.v1.ListVehiclesResponse> + getListVehiclesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListVehicles", + requestType = com.google.maps.fleetengine.v1.ListVehiclesRequest.class, + responseType = com.google.maps.fleetengine.v1.ListVehiclesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.maps.fleetengine.v1.ListVehiclesRequest, + com.google.maps.fleetengine.v1.ListVehiclesResponse> + getListVehiclesMethod() { + io.grpc.MethodDescriptor< + com.google.maps.fleetengine.v1.ListVehiclesRequest, + com.google.maps.fleetengine.v1.ListVehiclesResponse> + getListVehiclesMethod; + if ((getListVehiclesMethod = VehicleServiceGrpc.getListVehiclesMethod) == null) { + synchronized (VehicleServiceGrpc.class) { + if ((getListVehiclesMethod = VehicleServiceGrpc.getListVehiclesMethod) == null) { + VehicleServiceGrpc.getListVehiclesMethod = + getListVehiclesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListVehicles")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.maps.fleetengine.v1.ListVehiclesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.maps.fleetengine.v1.ListVehiclesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new VehicleServiceMethodDescriptorSupplier("ListVehicles")) + .build(); + } + } + } + return getListVehiclesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.maps.fleetengine.v1.SearchVehiclesRequest, + com.google.maps.fleetengine.v1.SearchVehiclesResponse> + getSearchVehiclesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SearchVehicles", + requestType = com.google.maps.fleetengine.v1.SearchVehiclesRequest.class, + responseType = com.google.maps.fleetengine.v1.SearchVehiclesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.maps.fleetengine.v1.SearchVehiclesRequest, + com.google.maps.fleetengine.v1.SearchVehiclesResponse> + getSearchVehiclesMethod() { + io.grpc.MethodDescriptor< + com.google.maps.fleetengine.v1.SearchVehiclesRequest, + com.google.maps.fleetengine.v1.SearchVehiclesResponse> + getSearchVehiclesMethod; + if ((getSearchVehiclesMethod = VehicleServiceGrpc.getSearchVehiclesMethod) == null) { + synchronized (VehicleServiceGrpc.class) { + if ((getSearchVehiclesMethod = VehicleServiceGrpc.getSearchVehiclesMethod) == null) { + VehicleServiceGrpc.getSearchVehiclesMethod = + getSearchVehiclesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SearchVehicles")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.maps.fleetengine.v1.SearchVehiclesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.maps.fleetengine.v1.SearchVehiclesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new VehicleServiceMethodDescriptorSupplier("SearchVehicles")) + .build(); + } + } + } + return getSearchVehiclesMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static VehicleServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public VehicleServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new VehicleServiceStub(channel, callOptions); + } + }; + return VehicleServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static VehicleServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public VehicleServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new VehicleServiceBlockingStub(channel, callOptions); + } + }; + return VehicleServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static VehicleServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public VehicleServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new VehicleServiceFutureStub(channel, callOptions); + } + }; + return VehicleServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Vehicle management service.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Instantiates a new vehicle associated with an on-demand rideshare or
+     * deliveries provider. Each `Vehicle` must have a unique vehicle ID.
+     * The following `Vehicle` fields are required when creating a `Vehicle`:
+     * * `vehicleState`
+     * * `supportedTripTypes`
+     * * `maximumCapacity`
+     * * `vehicleType`
+     * The following `Vehicle` fields are ignored when creating a `Vehicle`:
+     * * `name`
+     * * `currentTrips`
+     * * `availableCapacity`
+     * * `current_route_segment`
+     * * `current_route_segment_end_point`
+     * * `current_route_segment_version`
+     * * `current_route_segment_traffic`
+     * * `route`
+     * * `waypoints`
+     * * `waypoints_version`
+     * * `remaining_distance_meters`
+     * * `remaining_time_seconds`
+     * * `eta_to_next_waypoint`
+     * * `navigation_status`
+     * All other fields are optional and used if provided.
+     * 
+ */ + default void createVehicle( + com.google.maps.fleetengine.v1.CreateVehicleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateVehicleMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns a vehicle from the Fleet Engine.
+     * 
+ */ + default void getVehicle( + com.google.maps.fleetengine.v1.GetVehicleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetVehicleMethod(), responseObserver); + } + + /** + * + * + *
+     * Writes updated vehicle data to the Fleet Engine.
+     * When updating a `Vehicle`, the following fields cannot be updated since
+     * they are managed by the server:
+     * * `currentTrips`
+     * * `availableCapacity`
+     * * `current_route_segment_version`
+     * * `waypoints_version`
+     * The vehicle `name` also cannot be updated.
+     * If the `attributes` field is updated, **all** the vehicle's attributes are
+     * replaced with the attributes provided in the request. If you want to update
+     * only some attributes, see the `UpdateVehicleAttributes` method. Likewise,
+     * the `waypoints` field can be updated, but must contain all the waypoints
+     * currently on the vehicle, and no other waypoints.
+     * 
+ */ + default void updateVehicle( + com.google.maps.fleetengine.v1.UpdateVehicleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateVehicleMethod(), responseObserver); + } + + /** + * + * + *
+     * Partially updates a vehicle's attributes.
+     * Only the attributes mentioned in the request will be updated, other
+     * attributes will NOT be altered. Note: this is different in `UpdateVehicle`,
+     * where the whole `attributes` field will be replaced by the one in
+     * `UpdateVehicleRequest`, attributes not in the request would be removed.
+     * 
+ */ + default void updateVehicleAttributes( + com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateVehicleAttributesMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns a paginated list of vehicles associated with
+     * a provider that match the request options.
+     * 
+ */ + default void listVehicles( + com.google.maps.fleetengine.v1.ListVehiclesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListVehiclesMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns a list of vehicles that match the request options.
+     * 
+ */ + default void searchVehicles( + com.google.maps.fleetengine.v1.SearchVehiclesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSearchVehiclesMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service VehicleService. + * + *
+   * Vehicle management service.
+   * 
+ */ + public abstract static class VehicleServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return VehicleServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service VehicleService. + * + *
+   * Vehicle management service.
+   * 
+ */ + public static final class VehicleServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private VehicleServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected VehicleServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new VehicleServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Instantiates a new vehicle associated with an on-demand rideshare or
+     * deliveries provider. Each `Vehicle` must have a unique vehicle ID.
+     * The following `Vehicle` fields are required when creating a `Vehicle`:
+     * * `vehicleState`
+     * * `supportedTripTypes`
+     * * `maximumCapacity`
+     * * `vehicleType`
+     * The following `Vehicle` fields are ignored when creating a `Vehicle`:
+     * * `name`
+     * * `currentTrips`
+     * * `availableCapacity`
+     * * `current_route_segment`
+     * * `current_route_segment_end_point`
+     * * `current_route_segment_version`
+     * * `current_route_segment_traffic`
+     * * `route`
+     * * `waypoints`
+     * * `waypoints_version`
+     * * `remaining_distance_meters`
+     * * `remaining_time_seconds`
+     * * `eta_to_next_waypoint`
+     * * `navigation_status`
+     * All other fields are optional and used if provided.
+     * 
+ */ + public void createVehicle( + com.google.maps.fleetengine.v1.CreateVehicleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateVehicleMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns a vehicle from the Fleet Engine.
+     * 
+ */ + public void getVehicle( + com.google.maps.fleetengine.v1.GetVehicleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetVehicleMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Writes updated vehicle data to the Fleet Engine.
+     * When updating a `Vehicle`, the following fields cannot be updated since
+     * they are managed by the server:
+     * * `currentTrips`
+     * * `availableCapacity`
+     * * `current_route_segment_version`
+     * * `waypoints_version`
+     * The vehicle `name` also cannot be updated.
+     * If the `attributes` field is updated, **all** the vehicle's attributes are
+     * replaced with the attributes provided in the request. If you want to update
+     * only some attributes, see the `UpdateVehicleAttributes` method. Likewise,
+     * the `waypoints` field can be updated, but must contain all the waypoints
+     * currently on the vehicle, and no other waypoints.
+     * 
+ */ + public void updateVehicle( + com.google.maps.fleetengine.v1.UpdateVehicleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateVehicleMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Partially updates a vehicle's attributes.
+     * Only the attributes mentioned in the request will be updated, other
+     * attributes will NOT be altered. Note: this is different in `UpdateVehicle`,
+     * where the whole `attributes` field will be replaced by the one in
+     * `UpdateVehicleRequest`, attributes not in the request would be removed.
+     * 
+ */ + public void updateVehicleAttributes( + com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateVehicleAttributesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns a paginated list of vehicles associated with
+     * a provider that match the request options.
+     * 
+ */ + public void listVehicles( + com.google.maps.fleetengine.v1.ListVehiclesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListVehiclesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns a list of vehicles that match the request options.
+     * 
+ */ + public void searchVehicles( + com.google.maps.fleetengine.v1.SearchVehiclesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSearchVehiclesMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service VehicleService. + * + *
+   * Vehicle management service.
+   * 
+ */ + public static final class VehicleServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private VehicleServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected VehicleServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new VehicleServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Instantiates a new vehicle associated with an on-demand rideshare or
+     * deliveries provider. Each `Vehicle` must have a unique vehicle ID.
+     * The following `Vehicle` fields are required when creating a `Vehicle`:
+     * * `vehicleState`
+     * * `supportedTripTypes`
+     * * `maximumCapacity`
+     * * `vehicleType`
+     * The following `Vehicle` fields are ignored when creating a `Vehicle`:
+     * * `name`
+     * * `currentTrips`
+     * * `availableCapacity`
+     * * `current_route_segment`
+     * * `current_route_segment_end_point`
+     * * `current_route_segment_version`
+     * * `current_route_segment_traffic`
+     * * `route`
+     * * `waypoints`
+     * * `waypoints_version`
+     * * `remaining_distance_meters`
+     * * `remaining_time_seconds`
+     * * `eta_to_next_waypoint`
+     * * `navigation_status`
+     * All other fields are optional and used if provided.
+     * 
+ */ + public com.google.maps.fleetengine.v1.Vehicle createVehicle( + com.google.maps.fleetengine.v1.CreateVehicleRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateVehicleMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns a vehicle from the Fleet Engine.
+     * 
+ */ + public com.google.maps.fleetengine.v1.Vehicle getVehicle( + com.google.maps.fleetengine.v1.GetVehicleRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetVehicleMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Writes updated vehicle data to the Fleet Engine.
+     * When updating a `Vehicle`, the following fields cannot be updated since
+     * they are managed by the server:
+     * * `currentTrips`
+     * * `availableCapacity`
+     * * `current_route_segment_version`
+     * * `waypoints_version`
+     * The vehicle `name` also cannot be updated.
+     * If the `attributes` field is updated, **all** the vehicle's attributes are
+     * replaced with the attributes provided in the request. If you want to update
+     * only some attributes, see the `UpdateVehicleAttributes` method. Likewise,
+     * the `waypoints` field can be updated, but must contain all the waypoints
+     * currently on the vehicle, and no other waypoints.
+     * 
+ */ + public com.google.maps.fleetengine.v1.Vehicle updateVehicle( + com.google.maps.fleetengine.v1.UpdateVehicleRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateVehicleMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Partially updates a vehicle's attributes.
+     * Only the attributes mentioned in the request will be updated, other
+     * attributes will NOT be altered. Note: this is different in `UpdateVehicle`,
+     * where the whole `attributes` field will be replaced by the one in
+     * `UpdateVehicleRequest`, attributes not in the request would be removed.
+     * 
+ */ + public com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse updateVehicleAttributes( + com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateVehicleAttributesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns a paginated list of vehicles associated with
+     * a provider that match the request options.
+     * 
+ */ + public com.google.maps.fleetengine.v1.ListVehiclesResponse listVehicles( + com.google.maps.fleetengine.v1.ListVehiclesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListVehiclesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns a list of vehicles that match the request options.
+     * 
+ */ + public com.google.maps.fleetengine.v1.SearchVehiclesResponse searchVehicles( + com.google.maps.fleetengine.v1.SearchVehiclesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSearchVehiclesMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service VehicleService. + * + *
+   * Vehicle management service.
+   * 
+ */ + public static final class VehicleServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private VehicleServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected VehicleServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new VehicleServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Instantiates a new vehicle associated with an on-demand rideshare or
+     * deliveries provider. Each `Vehicle` must have a unique vehicle ID.
+     * The following `Vehicle` fields are required when creating a `Vehicle`:
+     * * `vehicleState`
+     * * `supportedTripTypes`
+     * * `maximumCapacity`
+     * * `vehicleType`
+     * The following `Vehicle` fields are ignored when creating a `Vehicle`:
+     * * `name`
+     * * `currentTrips`
+     * * `availableCapacity`
+     * * `current_route_segment`
+     * * `current_route_segment_end_point`
+     * * `current_route_segment_version`
+     * * `current_route_segment_traffic`
+     * * `route`
+     * * `waypoints`
+     * * `waypoints_version`
+     * * `remaining_distance_meters`
+     * * `remaining_time_seconds`
+     * * `eta_to_next_waypoint`
+     * * `navigation_status`
+     * All other fields are optional and used if provided.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.maps.fleetengine.v1.Vehicle> + createVehicle(com.google.maps.fleetengine.v1.CreateVehicleRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateVehicleMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns a vehicle from the Fleet Engine.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.maps.fleetengine.v1.Vehicle> + getVehicle(com.google.maps.fleetengine.v1.GetVehicleRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetVehicleMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Writes updated vehicle data to the Fleet Engine.
+     * When updating a `Vehicle`, the following fields cannot be updated since
+     * they are managed by the server:
+     * * `currentTrips`
+     * * `availableCapacity`
+     * * `current_route_segment_version`
+     * * `waypoints_version`
+     * The vehicle `name` also cannot be updated.
+     * If the `attributes` field is updated, **all** the vehicle's attributes are
+     * replaced with the attributes provided in the request. If you want to update
+     * only some attributes, see the `UpdateVehicleAttributes` method. Likewise,
+     * the `waypoints` field can be updated, but must contain all the waypoints
+     * currently on the vehicle, and no other waypoints.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.maps.fleetengine.v1.Vehicle> + updateVehicle(com.google.maps.fleetengine.v1.UpdateVehicleRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateVehicleMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Partially updates a vehicle's attributes.
+     * Only the attributes mentioned in the request will be updated, other
+     * attributes will NOT be altered. Note: this is different in `UpdateVehicle`,
+     * where the whole `attributes` field will be replaced by the one in
+     * `UpdateVehicleRequest`, attributes not in the request would be removed.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse> + updateVehicleAttributes( + com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateVehicleAttributesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns a paginated list of vehicles associated with
+     * a provider that match the request options.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.maps.fleetengine.v1.ListVehiclesResponse> + listVehicles(com.google.maps.fleetengine.v1.ListVehiclesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListVehiclesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns a list of vehicles that match the request options.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.maps.fleetengine.v1.SearchVehiclesResponse> + searchVehicles(com.google.maps.fleetengine.v1.SearchVehiclesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSearchVehiclesMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_VEHICLE = 0; + private static final int METHODID_GET_VEHICLE = 1; + private static final int METHODID_UPDATE_VEHICLE = 2; + private static final int METHODID_UPDATE_VEHICLE_ATTRIBUTES = 3; + private static final int METHODID_LIST_VEHICLES = 4; + private static final int METHODID_SEARCH_VEHICLES = 5; + + 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_VEHICLE: + serviceImpl.createVehicle( + (com.google.maps.fleetengine.v1.CreateVehicleRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_VEHICLE: + serviceImpl.getVehicle( + (com.google.maps.fleetengine.v1.GetVehicleRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_VEHICLE: + serviceImpl.updateVehicle( + (com.google.maps.fleetengine.v1.UpdateVehicleRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_VEHICLE_ATTRIBUTES: + serviceImpl.updateVehicleAttributes( + (com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse>) + responseObserver); + break; + case METHODID_LIST_VEHICLES: + serviceImpl.listVehicles( + (com.google.maps.fleetengine.v1.ListVehiclesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_SEARCH_VEHICLES: + serviceImpl.searchVehicles( + (com.google.maps.fleetengine.v1.SearchVehiclesRequest) 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( + getCreateVehicleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.maps.fleetengine.v1.CreateVehicleRequest, + com.google.maps.fleetengine.v1.Vehicle>(service, METHODID_CREATE_VEHICLE))) + .addMethod( + getGetVehicleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.maps.fleetengine.v1.GetVehicleRequest, + com.google.maps.fleetengine.v1.Vehicle>(service, METHODID_GET_VEHICLE))) + .addMethod( + getUpdateVehicleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.maps.fleetengine.v1.UpdateVehicleRequest, + com.google.maps.fleetengine.v1.Vehicle>(service, METHODID_UPDATE_VEHICLE))) + .addMethod( + getUpdateVehicleAttributesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest, + com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse>( + service, METHODID_UPDATE_VEHICLE_ATTRIBUTES))) + .addMethod( + getListVehiclesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.maps.fleetengine.v1.ListVehiclesRequest, + com.google.maps.fleetengine.v1.ListVehiclesResponse>( + service, METHODID_LIST_VEHICLES))) + .addMethod( + getSearchVehiclesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.maps.fleetengine.v1.SearchVehiclesRequest, + com.google.maps.fleetengine.v1.SearchVehiclesResponse>( + service, METHODID_SEARCH_VEHICLES))) + .build(); + } + + private abstract static class VehicleServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + VehicleServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.maps.fleetengine.v1.VehicleApi.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("VehicleService"); + } + } + + private static final class VehicleServiceFileDescriptorSupplier + extends VehicleServiceBaseDescriptorSupplier { + VehicleServiceFileDescriptorSupplier() {} + } + + private static final class VehicleServiceMethodDescriptorSupplier + extends VehicleServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + VehicleServiceMethodDescriptorSupplier(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 (VehicleServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new VehicleServiceFileDescriptorSupplier()) + .addMethod(getCreateVehicleMethod()) + .addMethod(getGetVehicleMethod()) + .addMethod(getUpdateVehicleMethod()) + .addMethod(getUpdateVehicleAttributesMethod()) + .addMethod(getListVehiclesMethod()) + .addMethod(getSearchVehiclesMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-maps-fleetengine/owlbot.py b/java-maps-fleetengine/owlbot.py new file mode 100644 index 000000000000..2ba11e6bba67 --- /dev/null +++ b/java-maps-fleetengine/owlbot.py @@ -0,0 +1,36 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import synthtool as s +from synthtool.languages import java + + +for library in s.get_staging_dirs(): + # put any special-case replacements here + s.move(library) + +s.remove_staging_dirs() +java.common_templates(monorepo=True, excludes=[ + ".github/*", + ".kokoro/*", + "samples/*", + "CODE_OF_CONDUCT.md", + "CONTRIBUTING.md", + "LICENSE", + "SECURITY.md", + "java.header", + "license-checks.xml", + "renovate.json", + ".gitignore" +]) \ No newline at end of file diff --git a/java-maps-fleetengine/pom.xml b/java-maps-fleetengine/pom.xml new file mode 100644 index 000000000000..e6c830d4e565 --- /dev/null +++ b/java-maps-fleetengine/pom.xml @@ -0,0 +1,55 @@ + + + 4.0.0 + com.google.maps + google-maps-fleetengine-parent + pom + 0.0.1-SNAPSHOT + Google Local Rides and Deliveries API Parent + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-jar-parent + 1.48.0-SNAPSHOT + ../google-cloud-jar-parent/pom.xml + + + + UTF-8 + UTF-8 + github + google-maps-fleetengine-parent + + + + + + com.google.maps + google-maps-fleetengine + 0.0.1-SNAPSHOT + + + com.google.maps.api.grpc + grpc-google-maps-fleetengine-v1 + 0.0.1-SNAPSHOT + + + com.google.maps.api.grpc + proto-google-maps-fleetengine-v1 + 0.0.1-SNAPSHOT + + + + + + + google-maps-fleetengine + grpc-google-maps-fleetengine-v1 + proto-google-maps-fleetengine-v1 + google-maps-fleetengine-bom + + + diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/clirr-ignored-differences.xml b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/clirr-ignored-differences.xml new file mode 100644 index 000000000000..70e35c15384c --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/clirr-ignored-differences.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/pom.xml b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/pom.xml new file mode 100644 index 000000000000..9457812bc0e0 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/pom.xml @@ -0,0 +1,37 @@ + + 4.0.0 + com.google.maps.api.grpc + proto-google-maps-fleetengine-v1 + 0.0.1-SNAPSHOT + proto-google-maps-fleetengine-v1 + Proto library for google-maps-fleetengine + + com.google.maps + google-maps-fleetengine-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-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/BatteryInfo.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/BatteryInfo.java new file mode 100644 index 000000000000..a40eb7059565 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/BatteryInfo.java @@ -0,0 +1,836 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicles.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * Information about the device's battery.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.v1.BatteryInfo} + */ +public final class BatteryInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.v1.BatteryInfo) + BatteryInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatteryInfo.newBuilder() to construct. + private BatteryInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatteryInfo() { + batteryStatus_ = 0; + powerSource_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatteryInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.Vehicles + .internal_static_maps_fleetengine_v1_BatteryInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.Vehicles + .internal_static_maps_fleetengine_v1_BatteryInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.BatteryInfo.class, + com.google.maps.fleetengine.v1.BatteryInfo.Builder.class); + } + + public static final int BATTERY_STATUS_FIELD_NUMBER = 1; + private int batteryStatus_ = 0; + /** + * + * + *
+   * Status of the battery, whether full or charging etc.
+   * 
+ * + * .maps.fleetengine.v1.BatteryStatus battery_status = 1; + * + * @return The enum numeric value on the wire for batteryStatus. + */ + @java.lang.Override + public int getBatteryStatusValue() { + return batteryStatus_; + } + /** + * + * + *
+   * Status of the battery, whether full or charging etc.
+   * 
+ * + * .maps.fleetengine.v1.BatteryStatus battery_status = 1; + * + * @return The batteryStatus. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.BatteryStatus getBatteryStatus() { + com.google.maps.fleetengine.v1.BatteryStatus result = + com.google.maps.fleetengine.v1.BatteryStatus.forNumber(batteryStatus_); + return result == null ? com.google.maps.fleetengine.v1.BatteryStatus.UNRECOGNIZED : result; + } + + public static final int POWER_SOURCE_FIELD_NUMBER = 2; + private int powerSource_ = 0; + /** + * + * + *
+   * Status of battery power source.
+   * 
+ * + * .maps.fleetengine.v1.PowerSource power_source = 2; + * + * @return The enum numeric value on the wire for powerSource. + */ + @java.lang.Override + public int getPowerSourceValue() { + return powerSource_; + } + /** + * + * + *
+   * Status of battery power source.
+   * 
+ * + * .maps.fleetengine.v1.PowerSource power_source = 2; + * + * @return The powerSource. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.PowerSource getPowerSource() { + com.google.maps.fleetengine.v1.PowerSource result = + com.google.maps.fleetengine.v1.PowerSource.forNumber(powerSource_); + return result == null ? com.google.maps.fleetengine.v1.PowerSource.UNRECOGNIZED : result; + } + + public static final int BATTERY_PERCENTAGE_FIELD_NUMBER = 3; + private float batteryPercentage_ = 0F; + /** + * + * + *
+   * Current battery percentage [0-100].
+   * 
+ * + * float battery_percentage = 3; + * + * @return The batteryPercentage. + */ + @java.lang.Override + public float getBatteryPercentage() { + return batteryPercentage_; + } + + 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 (batteryStatus_ + != com.google.maps.fleetengine.v1.BatteryStatus.UNKNOWN_BATTERY_STATUS.getNumber()) { + output.writeEnum(1, batteryStatus_); + } + if (powerSource_ + != com.google.maps.fleetengine.v1.PowerSource.UNKNOWN_POWER_SOURCE.getNumber()) { + output.writeEnum(2, powerSource_); + } + if (java.lang.Float.floatToRawIntBits(batteryPercentage_) != 0) { + output.writeFloat(3, batteryPercentage_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (batteryStatus_ + != com.google.maps.fleetengine.v1.BatteryStatus.UNKNOWN_BATTERY_STATUS.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, batteryStatus_); + } + if (powerSource_ + != com.google.maps.fleetengine.v1.PowerSource.UNKNOWN_POWER_SOURCE.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, powerSource_); + } + if (java.lang.Float.floatToRawIntBits(batteryPercentage_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, batteryPercentage_); + } + 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.fleetengine.v1.BatteryInfo)) { + return super.equals(obj); + } + com.google.maps.fleetengine.v1.BatteryInfo other = + (com.google.maps.fleetengine.v1.BatteryInfo) obj; + + if (batteryStatus_ != other.batteryStatus_) return false; + if (powerSource_ != other.powerSource_) return false; + if (java.lang.Float.floatToIntBits(getBatteryPercentage()) + != java.lang.Float.floatToIntBits(other.getBatteryPercentage())) 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) + BATTERY_STATUS_FIELD_NUMBER; + hash = (53 * hash) + batteryStatus_; + hash = (37 * hash) + POWER_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + powerSource_; + hash = (37 * hash) + BATTERY_PERCENTAGE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getBatteryPercentage()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.fleetengine.v1.BatteryInfo parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.BatteryInfo 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.fleetengine.v1.BatteryInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.BatteryInfo 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.fleetengine.v1.BatteryInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.BatteryInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.BatteryInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.BatteryInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.BatteryInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.BatteryInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.BatteryInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.BatteryInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.fleetengine.v1.BatteryInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Information about the device's battery.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.v1.BatteryInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.v1.BatteryInfo) + com.google.maps.fleetengine.v1.BatteryInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.Vehicles + .internal_static_maps_fleetengine_v1_BatteryInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.Vehicles + .internal_static_maps_fleetengine_v1_BatteryInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.BatteryInfo.class, + com.google.maps.fleetengine.v1.BatteryInfo.Builder.class); + } + + // Construct using com.google.maps.fleetengine.v1.BatteryInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + batteryStatus_ = 0; + powerSource_ = 0; + batteryPercentage_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.fleetengine.v1.Vehicles + .internal_static_maps_fleetengine_v1_BatteryInfo_descriptor; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.BatteryInfo getDefaultInstanceForType() { + return com.google.maps.fleetengine.v1.BatteryInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.BatteryInfo build() { + com.google.maps.fleetengine.v1.BatteryInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.BatteryInfo buildPartial() { + com.google.maps.fleetengine.v1.BatteryInfo result = + new com.google.maps.fleetengine.v1.BatteryInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.fleetengine.v1.BatteryInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.batteryStatus_ = batteryStatus_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.powerSource_ = powerSource_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.batteryPercentage_ = batteryPercentage_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.fleetengine.v1.BatteryInfo) { + return mergeFrom((com.google.maps.fleetengine.v1.BatteryInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.fleetengine.v1.BatteryInfo other) { + if (other == com.google.maps.fleetengine.v1.BatteryInfo.getDefaultInstance()) return this; + if (other.batteryStatus_ != 0) { + setBatteryStatusValue(other.getBatteryStatusValue()); + } + if (other.powerSource_ != 0) { + setPowerSourceValue(other.getPowerSourceValue()); + } + if (other.getBatteryPercentage() != 0F) { + setBatteryPercentage(other.getBatteryPercentage()); + } + 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: + { + batteryStatus_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + powerSource_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 29: + { + batteryPercentage_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } // case 29 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int batteryStatus_ = 0; + /** + * + * + *
+     * Status of the battery, whether full or charging etc.
+     * 
+ * + * .maps.fleetengine.v1.BatteryStatus battery_status = 1; + * + * @return The enum numeric value on the wire for batteryStatus. + */ + @java.lang.Override + public int getBatteryStatusValue() { + return batteryStatus_; + } + /** + * + * + *
+     * Status of the battery, whether full or charging etc.
+     * 
+ * + * .maps.fleetengine.v1.BatteryStatus battery_status = 1; + * + * @param value The enum numeric value on the wire for batteryStatus to set. + * @return This builder for chaining. + */ + public Builder setBatteryStatusValue(int value) { + batteryStatus_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Status of the battery, whether full or charging etc.
+     * 
+ * + * .maps.fleetengine.v1.BatteryStatus battery_status = 1; + * + * @return The batteryStatus. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.BatteryStatus getBatteryStatus() { + com.google.maps.fleetengine.v1.BatteryStatus result = + com.google.maps.fleetengine.v1.BatteryStatus.forNumber(batteryStatus_); + return result == null ? com.google.maps.fleetengine.v1.BatteryStatus.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Status of the battery, whether full or charging etc.
+     * 
+ * + * .maps.fleetengine.v1.BatteryStatus battery_status = 1; + * + * @param value The batteryStatus to set. + * @return This builder for chaining. + */ + public Builder setBatteryStatus(com.google.maps.fleetengine.v1.BatteryStatus value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + batteryStatus_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Status of the battery, whether full or charging etc.
+     * 
+ * + * .maps.fleetengine.v1.BatteryStatus battery_status = 1; + * + * @return This builder for chaining. + */ + public Builder clearBatteryStatus() { + bitField0_ = (bitField0_ & ~0x00000001); + batteryStatus_ = 0; + onChanged(); + return this; + } + + private int powerSource_ = 0; + /** + * + * + *
+     * Status of battery power source.
+     * 
+ * + * .maps.fleetengine.v1.PowerSource power_source = 2; + * + * @return The enum numeric value on the wire for powerSource. + */ + @java.lang.Override + public int getPowerSourceValue() { + return powerSource_; + } + /** + * + * + *
+     * Status of battery power source.
+     * 
+ * + * .maps.fleetengine.v1.PowerSource power_source = 2; + * + * @param value The enum numeric value on the wire for powerSource to set. + * @return This builder for chaining. + */ + public Builder setPowerSourceValue(int value) { + powerSource_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Status of battery power source.
+     * 
+ * + * .maps.fleetengine.v1.PowerSource power_source = 2; + * + * @return The powerSource. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.PowerSource getPowerSource() { + com.google.maps.fleetengine.v1.PowerSource result = + com.google.maps.fleetengine.v1.PowerSource.forNumber(powerSource_); + return result == null ? com.google.maps.fleetengine.v1.PowerSource.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Status of battery power source.
+     * 
+ * + * .maps.fleetengine.v1.PowerSource power_source = 2; + * + * @param value The powerSource to set. + * @return This builder for chaining. + */ + public Builder setPowerSource(com.google.maps.fleetengine.v1.PowerSource value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + powerSource_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Status of battery power source.
+     * 
+ * + * .maps.fleetengine.v1.PowerSource power_source = 2; + * + * @return This builder for chaining. + */ + public Builder clearPowerSource() { + bitField0_ = (bitField0_ & ~0x00000002); + powerSource_ = 0; + onChanged(); + return this; + } + + private float batteryPercentage_; + /** + * + * + *
+     * Current battery percentage [0-100].
+     * 
+ * + * float battery_percentage = 3; + * + * @return The batteryPercentage. + */ + @java.lang.Override + public float getBatteryPercentage() { + return batteryPercentage_; + } + /** + * + * + *
+     * Current battery percentage [0-100].
+     * 
+ * + * float battery_percentage = 3; + * + * @param value The batteryPercentage to set. + * @return This builder for chaining. + */ + public Builder setBatteryPercentage(float value) { + + batteryPercentage_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Current battery percentage [0-100].
+     * 
+ * + * float battery_percentage = 3; + * + * @return This builder for chaining. + */ + public Builder clearBatteryPercentage() { + bitField0_ = (bitField0_ & ~0x00000004); + batteryPercentage_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:maps.fleetengine.v1.BatteryInfo) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.v1.BatteryInfo) + private static final com.google.maps.fleetengine.v1.BatteryInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.fleetengine.v1.BatteryInfo(); + } + + public static com.google.maps.fleetengine.v1.BatteryInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatteryInfo 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.fleetengine.v1.BatteryInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/BatteryInfoOrBuilder.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/BatteryInfoOrBuilder.java new file mode 100644 index 000000000000..d9268f93fc19 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/BatteryInfoOrBuilder.java @@ -0,0 +1,89 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicles.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public interface BatteryInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.v1.BatteryInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Status of the battery, whether full or charging etc.
+   * 
+ * + * .maps.fleetengine.v1.BatteryStatus battery_status = 1; + * + * @return The enum numeric value on the wire for batteryStatus. + */ + int getBatteryStatusValue(); + /** + * + * + *
+   * Status of the battery, whether full or charging etc.
+   * 
+ * + * .maps.fleetengine.v1.BatteryStatus battery_status = 1; + * + * @return The batteryStatus. + */ + com.google.maps.fleetengine.v1.BatteryStatus getBatteryStatus(); + + /** + * + * + *
+   * Status of battery power source.
+   * 
+ * + * .maps.fleetengine.v1.PowerSource power_source = 2; + * + * @return The enum numeric value on the wire for powerSource. + */ + int getPowerSourceValue(); + /** + * + * + *
+   * Status of battery power source.
+   * 
+ * + * .maps.fleetengine.v1.PowerSource power_source = 2; + * + * @return The powerSource. + */ + com.google.maps.fleetengine.v1.PowerSource getPowerSource(); + + /** + * + * + *
+   * Current battery percentage [0-100].
+   * 
+ * + * float battery_percentage = 3; + * + * @return The batteryPercentage. + */ + float getBatteryPercentage(); +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/BatteryStatus.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/BatteryStatus.java new file mode 100644 index 000000000000..f2351201cd41 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/BatteryStatus.java @@ -0,0 +1,243 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicles.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * Status of the battery, whether full or charging etc.
+ * 
+ * + * Protobuf enum {@code maps.fleetengine.v1.BatteryStatus} + */ +public enum BatteryStatus implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Battery status unknown.
+   * 
+ * + * UNKNOWN_BATTERY_STATUS = 0; + */ + UNKNOWN_BATTERY_STATUS(0), + /** + * + * + *
+   * Battery is being charged.
+   * 
+ * + * BATTERY_STATUS_CHARGING = 1; + */ + BATTERY_STATUS_CHARGING(1), + /** + * + * + *
+   * Battery is discharging.
+   * 
+ * + * BATTERY_STATUS_DISCHARGING = 2; + */ + BATTERY_STATUS_DISCHARGING(2), + /** + * + * + *
+   * Battery is full.
+   * 
+ * + * BATTERY_STATUS_FULL = 3; + */ + BATTERY_STATUS_FULL(3), + /** + * + * + *
+   * Battery is not charging.
+   * 
+ * + * BATTERY_STATUS_NOT_CHARGING = 4; + */ + BATTERY_STATUS_NOT_CHARGING(4), + /** + * + * + *
+   * Battery is low on power.
+   * 
+ * + * BATTERY_STATUS_POWER_LOW = 5; + */ + BATTERY_STATUS_POWER_LOW(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Battery status unknown.
+   * 
+ * + * UNKNOWN_BATTERY_STATUS = 0; + */ + public static final int UNKNOWN_BATTERY_STATUS_VALUE = 0; + /** + * + * + *
+   * Battery is being charged.
+   * 
+ * + * BATTERY_STATUS_CHARGING = 1; + */ + public static final int BATTERY_STATUS_CHARGING_VALUE = 1; + /** + * + * + *
+   * Battery is discharging.
+   * 
+ * + * BATTERY_STATUS_DISCHARGING = 2; + */ + public static final int BATTERY_STATUS_DISCHARGING_VALUE = 2; + /** + * + * + *
+   * Battery is full.
+   * 
+ * + * BATTERY_STATUS_FULL = 3; + */ + public static final int BATTERY_STATUS_FULL_VALUE = 3; + /** + * + * + *
+   * Battery is not charging.
+   * 
+ * + * BATTERY_STATUS_NOT_CHARGING = 4; + */ + public static final int BATTERY_STATUS_NOT_CHARGING_VALUE = 4; + /** + * + * + *
+   * Battery is low on power.
+   * 
+ * + * BATTERY_STATUS_POWER_LOW = 5; + */ + public static final int BATTERY_STATUS_POWER_LOW_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static BatteryStatus 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 BatteryStatus forNumber(int value) { + switch (value) { + case 0: + return UNKNOWN_BATTERY_STATUS; + case 1: + return BATTERY_STATUS_CHARGING; + case 2: + return BATTERY_STATUS_DISCHARGING; + case 3: + return BATTERY_STATUS_FULL; + case 4: + return BATTERY_STATUS_NOT_CHARGING; + case 5: + return BATTERY_STATUS_POWER_LOW; + 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 BatteryStatus findValueByNumber(int number) { + return BatteryStatus.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.maps.fleetengine.v1.Vehicles.getDescriptor().getEnumTypes().get(2); + } + + private static final BatteryStatus[] VALUES = values(); + + public static BatteryStatus 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 BatteryStatus(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:maps.fleetengine.v1.BatteryStatus) +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/BillingPlatformIdentifier.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/BillingPlatformIdentifier.java new file mode 100644 index 000000000000..33a87b60115c --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/BillingPlatformIdentifier.java @@ -0,0 +1,246 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/trips.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * A set of values that indicate upon which platform the request was issued.
+ * 
+ * + * Protobuf enum {@code maps.fleetengine.v1.BillingPlatformIdentifier} + */ +public enum BillingPlatformIdentifier implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Default. Used for unspecified platforms.
+   * 
+ * + * BILLING_PLATFORM_IDENTIFIER_UNSPECIFIED = 0; + */ + BILLING_PLATFORM_IDENTIFIER_UNSPECIFIED(0), + /** + * + * + *
+   * The platform is a client server.
+   * 
+ * + * SERVER = 1; + */ + SERVER(1), + /** + * + * + *
+   * The platform is a web browser.
+   * 
+ * + * WEB = 2; + */ + WEB(2), + /** + * + * + *
+   * The platform is an Android mobile device.
+   * 
+ * + * ANDROID = 3; + */ + ANDROID(3), + /** + * + * + *
+   * The platform is an IOS mobile device.
+   * 
+ * + * IOS = 4; + */ + IOS(4), + /** + * + * + *
+   * Other platforms that are not listed in this enumeration.
+   * 
+ * + * OTHERS = 5; + */ + OTHERS(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Default. Used for unspecified platforms.
+   * 
+ * + * BILLING_PLATFORM_IDENTIFIER_UNSPECIFIED = 0; + */ + public static final int BILLING_PLATFORM_IDENTIFIER_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * The platform is a client server.
+   * 
+ * + * SERVER = 1; + */ + public static final int SERVER_VALUE = 1; + /** + * + * + *
+   * The platform is a web browser.
+   * 
+ * + * WEB = 2; + */ + public static final int WEB_VALUE = 2; + /** + * + * + *
+   * The platform is an Android mobile device.
+   * 
+ * + * ANDROID = 3; + */ + public static final int ANDROID_VALUE = 3; + /** + * + * + *
+   * The platform is an IOS mobile device.
+   * 
+ * + * IOS = 4; + */ + public static final int IOS_VALUE = 4; + /** + * + * + *
+   * Other platforms that are not listed in this enumeration.
+   * 
+ * + * OTHERS = 5; + */ + public static final int OTHERS_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static BillingPlatformIdentifier 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 BillingPlatformIdentifier forNumber(int value) { + switch (value) { + case 0: + return BILLING_PLATFORM_IDENTIFIER_UNSPECIFIED; + case 1: + return SERVER; + case 2: + return WEB; + case 3: + return ANDROID; + case 4: + return IOS; + case 5: + return OTHERS; + 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 BillingPlatformIdentifier findValueByNumber(int number) { + return BillingPlatformIdentifier.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.maps.fleetengine.v1.Trips.getDescriptor().getEnumTypes().get(1); + } + + private static final BillingPlatformIdentifier[] VALUES = values(); + + public static BillingPlatformIdentifier 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 BillingPlatformIdentifier(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:maps.fleetengine.v1.BillingPlatformIdentifier) +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/ConsumableTrafficPolyline.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/ConsumableTrafficPolyline.java new file mode 100644 index 000000000000..b8a2a307a8a0 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/ConsumableTrafficPolyline.java @@ -0,0 +1,1182 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/traffic.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * Traffic density along a Vehicle's path.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.v1.ConsumableTrafficPolyline} + */ +public final class ConsumableTrafficPolyline extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.v1.ConsumableTrafficPolyline) + ConsumableTrafficPolylineOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConsumableTrafficPolyline.newBuilder() to construct. + private ConsumableTrafficPolyline(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConsumableTrafficPolyline() { + speedReadingInterval_ = java.util.Collections.emptyList(); + encodedPathToWaypoint_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ConsumableTrafficPolyline(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.TrafficProto + .internal_static_maps_fleetengine_v1_ConsumableTrafficPolyline_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.TrafficProto + .internal_static_maps_fleetengine_v1_ConsumableTrafficPolyline_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.ConsumableTrafficPolyline.class, + com.google.maps.fleetengine.v1.ConsumableTrafficPolyline.Builder.class); + } + + public static final int SPEED_READING_INTERVAL_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List speedReadingInterval_; + /** + * + * + *
+   * Traffic speed along the path from the previous waypoint to the current
+   * waypoint.
+   * 
+ * + * repeated .maps.fleetengine.v1.SpeedReadingInterval speed_reading_interval = 1; + */ + @java.lang.Override + public java.util.List + getSpeedReadingIntervalList() { + return speedReadingInterval_; + } + /** + * + * + *
+   * Traffic speed along the path from the previous waypoint to the current
+   * waypoint.
+   * 
+ * + * repeated .maps.fleetengine.v1.SpeedReadingInterval speed_reading_interval = 1; + */ + @java.lang.Override + public java.util.List + getSpeedReadingIntervalOrBuilderList() { + return speedReadingInterval_; + } + /** + * + * + *
+   * Traffic speed along the path from the previous waypoint to the current
+   * waypoint.
+   * 
+ * + * repeated .maps.fleetengine.v1.SpeedReadingInterval speed_reading_interval = 1; + */ + @java.lang.Override + public int getSpeedReadingIntervalCount() { + return speedReadingInterval_.size(); + } + /** + * + * + *
+   * Traffic speed along the path from the previous waypoint to the current
+   * waypoint.
+   * 
+ * + * repeated .maps.fleetengine.v1.SpeedReadingInterval speed_reading_interval = 1; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.SpeedReadingInterval getSpeedReadingInterval(int index) { + return speedReadingInterval_.get(index); + } + /** + * + * + *
+   * Traffic speed along the path from the previous waypoint to the current
+   * waypoint.
+   * 
+ * + * repeated .maps.fleetengine.v1.SpeedReadingInterval speed_reading_interval = 1; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.SpeedReadingIntervalOrBuilder + getSpeedReadingIntervalOrBuilder(int index) { + return speedReadingInterval_.get(index); + } + + public static final int ENCODED_PATH_TO_WAYPOINT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object encodedPathToWaypoint_ = ""; + /** + * + * + *
+   * The path the driver is taking from the previous waypoint to the current
+   * waypoint. This path has landmarks in it so clients can show traffic markers
+   * along the path (see `speed_reading_interval`).  Decoding is not yet
+   * supported.
+   * 
+ * + * string encoded_path_to_waypoint = 2; + * + * @return The encodedPathToWaypoint. + */ + @java.lang.Override + public java.lang.String getEncodedPathToWaypoint() { + java.lang.Object ref = encodedPathToWaypoint_; + 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(); + encodedPathToWaypoint_ = s; + return s; + } + } + /** + * + * + *
+   * The path the driver is taking from the previous waypoint to the current
+   * waypoint. This path has landmarks in it so clients can show traffic markers
+   * along the path (see `speed_reading_interval`).  Decoding is not yet
+   * supported.
+   * 
+ * + * string encoded_path_to_waypoint = 2; + * + * @return The bytes for encodedPathToWaypoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEncodedPathToWaypointBytes() { + java.lang.Object ref = encodedPathToWaypoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + encodedPathToWaypoint_ = 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 { + for (int i = 0; i < speedReadingInterval_.size(); i++) { + output.writeMessage(1, speedReadingInterval_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(encodedPathToWaypoint_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, encodedPathToWaypoint_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < speedReadingInterval_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, speedReadingInterval_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(encodedPathToWaypoint_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, encodedPathToWaypoint_); + } + 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.fleetengine.v1.ConsumableTrafficPolyline)) { + return super.equals(obj); + } + com.google.maps.fleetengine.v1.ConsumableTrafficPolyline other = + (com.google.maps.fleetengine.v1.ConsumableTrafficPolyline) obj; + + if (!getSpeedReadingIntervalList().equals(other.getSpeedReadingIntervalList())) return false; + if (!getEncodedPathToWaypoint().equals(other.getEncodedPathToWaypoint())) 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 (getSpeedReadingIntervalCount() > 0) { + hash = (37 * hash) + SPEED_READING_INTERVAL_FIELD_NUMBER; + hash = (53 * hash) + getSpeedReadingIntervalList().hashCode(); + } + hash = (37 * hash) + ENCODED_PATH_TO_WAYPOINT_FIELD_NUMBER; + hash = (53 * hash) + getEncodedPathToWaypoint().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.fleetengine.v1.ConsumableTrafficPolyline parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.ConsumableTrafficPolyline 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.fleetengine.v1.ConsumableTrafficPolyline parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.ConsumableTrafficPolyline 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.fleetengine.v1.ConsumableTrafficPolyline parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.ConsumableTrafficPolyline parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.ConsumableTrafficPolyline parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.ConsumableTrafficPolyline parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.ConsumableTrafficPolyline parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.ConsumableTrafficPolyline parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.ConsumableTrafficPolyline parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.ConsumableTrafficPolyline parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.maps.fleetengine.v1.ConsumableTrafficPolyline prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Traffic density along a Vehicle's path.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.v1.ConsumableTrafficPolyline} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.v1.ConsumableTrafficPolyline) + com.google.maps.fleetengine.v1.ConsumableTrafficPolylineOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.TrafficProto + .internal_static_maps_fleetengine_v1_ConsumableTrafficPolyline_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.TrafficProto + .internal_static_maps_fleetengine_v1_ConsumableTrafficPolyline_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.ConsumableTrafficPolyline.class, + com.google.maps.fleetengine.v1.ConsumableTrafficPolyline.Builder.class); + } + + // Construct using com.google.maps.fleetengine.v1.ConsumableTrafficPolyline.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (speedReadingIntervalBuilder_ == null) { + speedReadingInterval_ = java.util.Collections.emptyList(); + } else { + speedReadingInterval_ = null; + speedReadingIntervalBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + encodedPathToWaypoint_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.fleetengine.v1.TrafficProto + .internal_static_maps_fleetengine_v1_ConsumableTrafficPolyline_descriptor; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.ConsumableTrafficPolyline getDefaultInstanceForType() { + return com.google.maps.fleetengine.v1.ConsumableTrafficPolyline.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.ConsumableTrafficPolyline build() { + com.google.maps.fleetengine.v1.ConsumableTrafficPolyline result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.ConsumableTrafficPolyline buildPartial() { + com.google.maps.fleetengine.v1.ConsumableTrafficPolyline result = + new com.google.maps.fleetengine.v1.ConsumableTrafficPolyline(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.maps.fleetengine.v1.ConsumableTrafficPolyline result) { + if (speedReadingIntervalBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + speedReadingInterval_ = java.util.Collections.unmodifiableList(speedReadingInterval_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.speedReadingInterval_ = speedReadingInterval_; + } else { + result.speedReadingInterval_ = speedReadingIntervalBuilder_.build(); + } + } + + private void buildPartial0(com.google.maps.fleetengine.v1.ConsumableTrafficPolyline result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.encodedPathToWaypoint_ = encodedPathToWaypoint_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.fleetengine.v1.ConsumableTrafficPolyline) { + return mergeFrom((com.google.maps.fleetengine.v1.ConsumableTrafficPolyline) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.fleetengine.v1.ConsumableTrafficPolyline other) { + if (other == com.google.maps.fleetengine.v1.ConsumableTrafficPolyline.getDefaultInstance()) + return this; + if (speedReadingIntervalBuilder_ == null) { + if (!other.speedReadingInterval_.isEmpty()) { + if (speedReadingInterval_.isEmpty()) { + speedReadingInterval_ = other.speedReadingInterval_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSpeedReadingIntervalIsMutable(); + speedReadingInterval_.addAll(other.speedReadingInterval_); + } + onChanged(); + } + } else { + if (!other.speedReadingInterval_.isEmpty()) { + if (speedReadingIntervalBuilder_.isEmpty()) { + speedReadingIntervalBuilder_.dispose(); + speedReadingIntervalBuilder_ = null; + speedReadingInterval_ = other.speedReadingInterval_; + bitField0_ = (bitField0_ & ~0x00000001); + speedReadingIntervalBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSpeedReadingIntervalFieldBuilder() + : null; + } else { + speedReadingIntervalBuilder_.addAllMessages(other.speedReadingInterval_); + } + } + } + if (!other.getEncodedPathToWaypoint().isEmpty()) { + encodedPathToWaypoint_ = other.encodedPathToWaypoint_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.maps.fleetengine.v1.SpeedReadingInterval m = + input.readMessage( + com.google.maps.fleetengine.v1.SpeedReadingInterval.parser(), + extensionRegistry); + if (speedReadingIntervalBuilder_ == null) { + ensureSpeedReadingIntervalIsMutable(); + speedReadingInterval_.add(m); + } else { + speedReadingIntervalBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + encodedPathToWaypoint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + speedReadingInterval_ = java.util.Collections.emptyList(); + + private void ensureSpeedReadingIntervalIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + speedReadingInterval_ = + new java.util.ArrayList( + speedReadingInterval_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.SpeedReadingInterval, + com.google.maps.fleetengine.v1.SpeedReadingInterval.Builder, + com.google.maps.fleetengine.v1.SpeedReadingIntervalOrBuilder> + speedReadingIntervalBuilder_; + + /** + * + * + *
+     * Traffic speed along the path from the previous waypoint to the current
+     * waypoint.
+     * 
+ * + * repeated .maps.fleetengine.v1.SpeedReadingInterval speed_reading_interval = 1; + */ + public java.util.List + getSpeedReadingIntervalList() { + if (speedReadingIntervalBuilder_ == null) { + return java.util.Collections.unmodifiableList(speedReadingInterval_); + } else { + return speedReadingIntervalBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Traffic speed along the path from the previous waypoint to the current
+     * waypoint.
+     * 
+ * + * repeated .maps.fleetengine.v1.SpeedReadingInterval speed_reading_interval = 1; + */ + public int getSpeedReadingIntervalCount() { + if (speedReadingIntervalBuilder_ == null) { + return speedReadingInterval_.size(); + } else { + return speedReadingIntervalBuilder_.getCount(); + } + } + /** + * + * + *
+     * Traffic speed along the path from the previous waypoint to the current
+     * waypoint.
+     * 
+ * + * repeated .maps.fleetengine.v1.SpeedReadingInterval speed_reading_interval = 1; + */ + public com.google.maps.fleetengine.v1.SpeedReadingInterval getSpeedReadingInterval(int index) { + if (speedReadingIntervalBuilder_ == null) { + return speedReadingInterval_.get(index); + } else { + return speedReadingIntervalBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Traffic speed along the path from the previous waypoint to the current
+     * waypoint.
+     * 
+ * + * repeated .maps.fleetengine.v1.SpeedReadingInterval speed_reading_interval = 1; + */ + public Builder setSpeedReadingInterval( + int index, com.google.maps.fleetengine.v1.SpeedReadingInterval value) { + if (speedReadingIntervalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpeedReadingIntervalIsMutable(); + speedReadingInterval_.set(index, value); + onChanged(); + } else { + speedReadingIntervalBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Traffic speed along the path from the previous waypoint to the current
+     * waypoint.
+     * 
+ * + * repeated .maps.fleetengine.v1.SpeedReadingInterval speed_reading_interval = 1; + */ + public Builder setSpeedReadingInterval( + int index, com.google.maps.fleetengine.v1.SpeedReadingInterval.Builder builderForValue) { + if (speedReadingIntervalBuilder_ == null) { + ensureSpeedReadingIntervalIsMutable(); + speedReadingInterval_.set(index, builderForValue.build()); + onChanged(); + } else { + speedReadingIntervalBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Traffic speed along the path from the previous waypoint to the current
+     * waypoint.
+     * 
+ * + * repeated .maps.fleetengine.v1.SpeedReadingInterval speed_reading_interval = 1; + */ + public Builder addSpeedReadingInterval( + com.google.maps.fleetengine.v1.SpeedReadingInterval value) { + if (speedReadingIntervalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpeedReadingIntervalIsMutable(); + speedReadingInterval_.add(value); + onChanged(); + } else { + speedReadingIntervalBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Traffic speed along the path from the previous waypoint to the current
+     * waypoint.
+     * 
+ * + * repeated .maps.fleetengine.v1.SpeedReadingInterval speed_reading_interval = 1; + */ + public Builder addSpeedReadingInterval( + int index, com.google.maps.fleetengine.v1.SpeedReadingInterval value) { + if (speedReadingIntervalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpeedReadingIntervalIsMutable(); + speedReadingInterval_.add(index, value); + onChanged(); + } else { + speedReadingIntervalBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Traffic speed along the path from the previous waypoint to the current
+     * waypoint.
+     * 
+ * + * repeated .maps.fleetengine.v1.SpeedReadingInterval speed_reading_interval = 1; + */ + public Builder addSpeedReadingInterval( + com.google.maps.fleetengine.v1.SpeedReadingInterval.Builder builderForValue) { + if (speedReadingIntervalBuilder_ == null) { + ensureSpeedReadingIntervalIsMutable(); + speedReadingInterval_.add(builderForValue.build()); + onChanged(); + } else { + speedReadingIntervalBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Traffic speed along the path from the previous waypoint to the current
+     * waypoint.
+     * 
+ * + * repeated .maps.fleetengine.v1.SpeedReadingInterval speed_reading_interval = 1; + */ + public Builder addSpeedReadingInterval( + int index, com.google.maps.fleetengine.v1.SpeedReadingInterval.Builder builderForValue) { + if (speedReadingIntervalBuilder_ == null) { + ensureSpeedReadingIntervalIsMutable(); + speedReadingInterval_.add(index, builderForValue.build()); + onChanged(); + } else { + speedReadingIntervalBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Traffic speed along the path from the previous waypoint to the current
+     * waypoint.
+     * 
+ * + * repeated .maps.fleetengine.v1.SpeedReadingInterval speed_reading_interval = 1; + */ + public Builder addAllSpeedReadingInterval( + java.lang.Iterable values) { + if (speedReadingIntervalBuilder_ == null) { + ensureSpeedReadingIntervalIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, speedReadingInterval_); + onChanged(); + } else { + speedReadingIntervalBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Traffic speed along the path from the previous waypoint to the current
+     * waypoint.
+     * 
+ * + * repeated .maps.fleetengine.v1.SpeedReadingInterval speed_reading_interval = 1; + */ + public Builder clearSpeedReadingInterval() { + if (speedReadingIntervalBuilder_ == null) { + speedReadingInterval_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + speedReadingIntervalBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Traffic speed along the path from the previous waypoint to the current
+     * waypoint.
+     * 
+ * + * repeated .maps.fleetengine.v1.SpeedReadingInterval speed_reading_interval = 1; + */ + public Builder removeSpeedReadingInterval(int index) { + if (speedReadingIntervalBuilder_ == null) { + ensureSpeedReadingIntervalIsMutable(); + speedReadingInterval_.remove(index); + onChanged(); + } else { + speedReadingIntervalBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Traffic speed along the path from the previous waypoint to the current
+     * waypoint.
+     * 
+ * + * repeated .maps.fleetengine.v1.SpeedReadingInterval speed_reading_interval = 1; + */ + public com.google.maps.fleetengine.v1.SpeedReadingInterval.Builder + getSpeedReadingIntervalBuilder(int index) { + return getSpeedReadingIntervalFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Traffic speed along the path from the previous waypoint to the current
+     * waypoint.
+     * 
+ * + * repeated .maps.fleetengine.v1.SpeedReadingInterval speed_reading_interval = 1; + */ + public com.google.maps.fleetengine.v1.SpeedReadingIntervalOrBuilder + getSpeedReadingIntervalOrBuilder(int index) { + if (speedReadingIntervalBuilder_ == null) { + return speedReadingInterval_.get(index); + } else { + return speedReadingIntervalBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Traffic speed along the path from the previous waypoint to the current
+     * waypoint.
+     * 
+ * + * repeated .maps.fleetengine.v1.SpeedReadingInterval speed_reading_interval = 1; + */ + public java.util.List + getSpeedReadingIntervalOrBuilderList() { + if (speedReadingIntervalBuilder_ != null) { + return speedReadingIntervalBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(speedReadingInterval_); + } + } + /** + * + * + *
+     * Traffic speed along the path from the previous waypoint to the current
+     * waypoint.
+     * 
+ * + * repeated .maps.fleetengine.v1.SpeedReadingInterval speed_reading_interval = 1; + */ + public com.google.maps.fleetengine.v1.SpeedReadingInterval.Builder + addSpeedReadingIntervalBuilder() { + return getSpeedReadingIntervalFieldBuilder() + .addBuilder(com.google.maps.fleetengine.v1.SpeedReadingInterval.getDefaultInstance()); + } + /** + * + * + *
+     * Traffic speed along the path from the previous waypoint to the current
+     * waypoint.
+     * 
+ * + * repeated .maps.fleetengine.v1.SpeedReadingInterval speed_reading_interval = 1; + */ + public com.google.maps.fleetengine.v1.SpeedReadingInterval.Builder + addSpeedReadingIntervalBuilder(int index) { + return getSpeedReadingIntervalFieldBuilder() + .addBuilder( + index, com.google.maps.fleetengine.v1.SpeedReadingInterval.getDefaultInstance()); + } + /** + * + * + *
+     * Traffic speed along the path from the previous waypoint to the current
+     * waypoint.
+     * 
+ * + * repeated .maps.fleetengine.v1.SpeedReadingInterval speed_reading_interval = 1; + */ + public java.util.List + getSpeedReadingIntervalBuilderList() { + return getSpeedReadingIntervalFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.SpeedReadingInterval, + com.google.maps.fleetengine.v1.SpeedReadingInterval.Builder, + com.google.maps.fleetengine.v1.SpeedReadingIntervalOrBuilder> + getSpeedReadingIntervalFieldBuilder() { + if (speedReadingIntervalBuilder_ == null) { + speedReadingIntervalBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.SpeedReadingInterval, + com.google.maps.fleetengine.v1.SpeedReadingInterval.Builder, + com.google.maps.fleetengine.v1.SpeedReadingIntervalOrBuilder>( + speedReadingInterval_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + speedReadingInterval_ = null; + } + return speedReadingIntervalBuilder_; + } + + private java.lang.Object encodedPathToWaypoint_ = ""; + /** + * + * + *
+     * The path the driver is taking from the previous waypoint to the current
+     * waypoint. This path has landmarks in it so clients can show traffic markers
+     * along the path (see `speed_reading_interval`).  Decoding is not yet
+     * supported.
+     * 
+ * + * string encoded_path_to_waypoint = 2; + * + * @return The encodedPathToWaypoint. + */ + public java.lang.String getEncodedPathToWaypoint() { + java.lang.Object ref = encodedPathToWaypoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + encodedPathToWaypoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The path the driver is taking from the previous waypoint to the current
+     * waypoint. This path has landmarks in it so clients can show traffic markers
+     * along the path (see `speed_reading_interval`).  Decoding is not yet
+     * supported.
+     * 
+ * + * string encoded_path_to_waypoint = 2; + * + * @return The bytes for encodedPathToWaypoint. + */ + public com.google.protobuf.ByteString getEncodedPathToWaypointBytes() { + java.lang.Object ref = encodedPathToWaypoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + encodedPathToWaypoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The path the driver is taking from the previous waypoint to the current
+     * waypoint. This path has landmarks in it so clients can show traffic markers
+     * along the path (see `speed_reading_interval`).  Decoding is not yet
+     * supported.
+     * 
+ * + * string encoded_path_to_waypoint = 2; + * + * @param value The encodedPathToWaypoint to set. + * @return This builder for chaining. + */ + public Builder setEncodedPathToWaypoint(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + encodedPathToWaypoint_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The path the driver is taking from the previous waypoint to the current
+     * waypoint. This path has landmarks in it so clients can show traffic markers
+     * along the path (see `speed_reading_interval`).  Decoding is not yet
+     * supported.
+     * 
+ * + * string encoded_path_to_waypoint = 2; + * + * @return This builder for chaining. + */ + public Builder clearEncodedPathToWaypoint() { + encodedPathToWaypoint_ = getDefaultInstance().getEncodedPathToWaypoint(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The path the driver is taking from the previous waypoint to the current
+     * waypoint. This path has landmarks in it so clients can show traffic markers
+     * along the path (see `speed_reading_interval`).  Decoding is not yet
+     * supported.
+     * 
+ * + * string encoded_path_to_waypoint = 2; + * + * @param value The bytes for encodedPathToWaypoint to set. + * @return This builder for chaining. + */ + public Builder setEncodedPathToWaypointBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + encodedPathToWaypoint_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:maps.fleetengine.v1.ConsumableTrafficPolyline) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.v1.ConsumableTrafficPolyline) + private static final com.google.maps.fleetengine.v1.ConsumableTrafficPolyline DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.fleetengine.v1.ConsumableTrafficPolyline(); + } + + public static com.google.maps.fleetengine.v1.ConsumableTrafficPolyline getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConsumableTrafficPolyline 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.fleetengine.v1.ConsumableTrafficPolyline getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/ConsumableTrafficPolylineOrBuilder.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/ConsumableTrafficPolylineOrBuilder.java new file mode 100644 index 000000000000..1abf3425456a --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/ConsumableTrafficPolylineOrBuilder.java @@ -0,0 +1,115 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/traffic.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public interface ConsumableTrafficPolylineOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.v1.ConsumableTrafficPolyline) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Traffic speed along the path from the previous waypoint to the current
+   * waypoint.
+   * 
+ * + * repeated .maps.fleetengine.v1.SpeedReadingInterval speed_reading_interval = 1; + */ + java.util.List getSpeedReadingIntervalList(); + /** + * + * + *
+   * Traffic speed along the path from the previous waypoint to the current
+   * waypoint.
+   * 
+ * + * repeated .maps.fleetengine.v1.SpeedReadingInterval speed_reading_interval = 1; + */ + com.google.maps.fleetengine.v1.SpeedReadingInterval getSpeedReadingInterval(int index); + /** + * + * + *
+   * Traffic speed along the path from the previous waypoint to the current
+   * waypoint.
+   * 
+ * + * repeated .maps.fleetengine.v1.SpeedReadingInterval speed_reading_interval = 1; + */ + int getSpeedReadingIntervalCount(); + /** + * + * + *
+   * Traffic speed along the path from the previous waypoint to the current
+   * waypoint.
+   * 
+ * + * repeated .maps.fleetengine.v1.SpeedReadingInterval speed_reading_interval = 1; + */ + java.util.List + getSpeedReadingIntervalOrBuilderList(); + /** + * + * + *
+   * Traffic speed along the path from the previous waypoint to the current
+   * waypoint.
+   * 
+ * + * repeated .maps.fleetengine.v1.SpeedReadingInterval speed_reading_interval = 1; + */ + com.google.maps.fleetengine.v1.SpeedReadingIntervalOrBuilder getSpeedReadingIntervalOrBuilder( + int index); + + /** + * + * + *
+   * The path the driver is taking from the previous waypoint to the current
+   * waypoint. This path has landmarks in it so clients can show traffic markers
+   * along the path (see `speed_reading_interval`).  Decoding is not yet
+   * supported.
+   * 
+ * + * string encoded_path_to_waypoint = 2; + * + * @return The encodedPathToWaypoint. + */ + java.lang.String getEncodedPathToWaypoint(); + /** + * + * + *
+   * The path the driver is taking from the previous waypoint to the current
+   * waypoint. This path has landmarks in it so clients can show traffic markers
+   * along the path (see `speed_reading_interval`).  Decoding is not yet
+   * supported.
+   * 
+ * + * string encoded_path_to_waypoint = 2; + * + * @return The bytes for encodedPathToWaypoint. + */ + com.google.protobuf.ByteString getEncodedPathToWaypointBytes(); +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/CreateTripRequest.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/CreateTripRequest.java new file mode 100644 index 000000000000..9a3e39cdcdc1 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/CreateTripRequest.java @@ -0,0 +1,1845 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/trip_api.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * CreateTrip request message.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.v1.CreateTripRequest} + */ +public final class CreateTripRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.v1.CreateTripRequest) + CreateTripRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateTripRequest.newBuilder() to construct. + private CreateTripRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateTripRequest() { + parent_ = ""; + tripId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateTripRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.TripApi + .internal_static_maps_fleetengine_v1_CreateTripRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.TripApi + .internal_static_maps_fleetengine_v1_CreateTripRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.CreateTripRequest.class, + com.google.maps.fleetengine.v1.CreateTripRequest.Builder.class); + } + + private int bitField0_; + public static final int HEADER_FIELD_NUMBER = 1; + private com.google.maps.fleetengine.v1.RequestHeader header_; + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return Whether the header field is set. + */ + @java.lang.Override + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return The header. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.RequestHeader getHeader() { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.RequestHeaderOrBuilder getHeaderOrBuilder() { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } + + public static final int PARENT_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Must be in the format `providers/{provider}`.
+   * The provider must be the Project ID (for example, `sample-cloud-project`)
+   * of the Google Cloud Project of which the service account making
+   * this call is a member.
+   * 
+ * + * + * string parent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Must be in the format `providers/{provider}`.
+   * The provider must be the Project ID (for example, `sample-cloud-project`)
+   * of the Google Cloud Project of which the service account making
+   * this call is a member.
+   * 
+ * + * + * string parent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object tripId_ = ""; + /** + * + * + *
+   * Required. Unique Trip ID.
+   * Subject to the following restrictions:
+   *
+   * * Must be a valid Unicode string.
+   * * Limited to a maximum length of 64 characters.
+   * * Normalized according to [Unicode Normalization Form C]
+   * (http://www.unicode.org/reports/tr15/).
+   * * May not contain any of the following ASCII characters: '/', ':', '?',
+   * ',', or '#'.
+   * 
+ * + * string trip_id = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @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. Unique Trip ID.
+   * Subject to the following restrictions:
+   *
+   * * Must be a valid Unicode string.
+   * * Limited to a maximum length of 64 characters.
+   * * Normalized according to [Unicode Normalization Form C]
+   * (http://www.unicode.org/reports/tr15/).
+   * * May not contain any of the following ASCII characters: '/', ':', '?',
+   * ',', or '#'.
+   * 
+ * + * string trip_id = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 = 4; + private com.google.maps.fleetengine.v1.Trip trip_; + /** + * + * + *
+   * Required. Trip entity to create.
+   *
+   * When creating a Trip, the following fields are required:
+   *
+   * * `trip_type`
+   * * `pickup_point`
+   *
+   * The following fields are used if you provide them:
+   *
+   * * `number_of_passengers`
+   * * `vehicle_id`
+   * * `dropoff_point`
+   * * `intermediate_destinations`
+   * * `vehicle_waypoints`
+   *
+   * All other Trip fields are ignored. For example, all trips start with a
+   * `trip_status` of `NEW` even if you pass in a `trip_status` of `CANCELED` in
+   * the creation request.
+   *
+   * Only `EXCLUSIVE` trips support `intermediate_destinations`.
+   *
+   * When `vehicle_id` is set for a shared trip, you must supply
+   * the list of `Trip.vehicle_waypoints` to specify the order of the remaining
+   * waypoints for the vehicle, otherwise the waypoint order will be
+   * undetermined.
+   *
+   * When you specify `Trip.vehicle_waypoints`, the list must contain all
+   * the remaining waypoints of the vehicle's trips, with no extra waypoints.
+   * You must order these waypoints such that for a given trip, the pickup
+   * point is before intermediate destinations, and all intermediate
+   * destinations come before the drop-off point. An `EXCLUSIVE` trip's
+   * waypoints must not interleave with any other trips.
+   *
+   * The `trip_id`, `waypoint_type` and `location` fields are used, and all
+   * other TripWaypoint fields in `vehicle_waypoints` are ignored.
+   * 
+ * + * .maps.fleetengine.v1.Trip trip = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the trip field is set. + */ + @java.lang.Override + public boolean hasTrip() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Required. Trip entity to create.
+   *
+   * When creating a Trip, the following fields are required:
+   *
+   * * `trip_type`
+   * * `pickup_point`
+   *
+   * The following fields are used if you provide them:
+   *
+   * * `number_of_passengers`
+   * * `vehicle_id`
+   * * `dropoff_point`
+   * * `intermediate_destinations`
+   * * `vehicle_waypoints`
+   *
+   * All other Trip fields are ignored. For example, all trips start with a
+   * `trip_status` of `NEW` even if you pass in a `trip_status` of `CANCELED` in
+   * the creation request.
+   *
+   * Only `EXCLUSIVE` trips support `intermediate_destinations`.
+   *
+   * When `vehicle_id` is set for a shared trip, you must supply
+   * the list of `Trip.vehicle_waypoints` to specify the order of the remaining
+   * waypoints for the vehicle, otherwise the waypoint order will be
+   * undetermined.
+   *
+   * When you specify `Trip.vehicle_waypoints`, the list must contain all
+   * the remaining waypoints of the vehicle's trips, with no extra waypoints.
+   * You must order these waypoints such that for a given trip, the pickup
+   * point is before intermediate destinations, and all intermediate
+   * destinations come before the drop-off point. An `EXCLUSIVE` trip's
+   * waypoints must not interleave with any other trips.
+   *
+   * The `trip_id`, `waypoint_type` and `location` fields are used, and all
+   * other TripWaypoint fields in `vehicle_waypoints` are ignored.
+   * 
+ * + * .maps.fleetengine.v1.Trip trip = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The trip. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.Trip getTrip() { + return trip_ == null ? com.google.maps.fleetengine.v1.Trip.getDefaultInstance() : trip_; + } + /** + * + * + *
+   * Required. Trip entity to create.
+   *
+   * When creating a Trip, the following fields are required:
+   *
+   * * `trip_type`
+   * * `pickup_point`
+   *
+   * The following fields are used if you provide them:
+   *
+   * * `number_of_passengers`
+   * * `vehicle_id`
+   * * `dropoff_point`
+   * * `intermediate_destinations`
+   * * `vehicle_waypoints`
+   *
+   * All other Trip fields are ignored. For example, all trips start with a
+   * `trip_status` of `NEW` even if you pass in a `trip_status` of `CANCELED` in
+   * the creation request.
+   *
+   * Only `EXCLUSIVE` trips support `intermediate_destinations`.
+   *
+   * When `vehicle_id` is set for a shared trip, you must supply
+   * the list of `Trip.vehicle_waypoints` to specify the order of the remaining
+   * waypoints for the vehicle, otherwise the waypoint order will be
+   * undetermined.
+   *
+   * When you specify `Trip.vehicle_waypoints`, the list must contain all
+   * the remaining waypoints of the vehicle's trips, with no extra waypoints.
+   * You must order these waypoints such that for a given trip, the pickup
+   * point is before intermediate destinations, and all intermediate
+   * destinations come before the drop-off point. An `EXCLUSIVE` trip's
+   * waypoints must not interleave with any other trips.
+   *
+   * The `trip_id`, `waypoint_type` and `location` fields are used, and all
+   * other TripWaypoint fields in `vehicle_waypoints` are ignored.
+   * 
+ * + * .maps.fleetengine.v1.Trip trip = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TripOrBuilder getTripOrBuilder() { + return trip_ == null ? com.google.maps.fleetengine.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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getHeader()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, parent_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getTrip()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tripId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, tripId_); + } + 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, getHeader()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, parent_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getTrip()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tripId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, tripId_); + } + 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.fleetengine.v1.CreateTripRequest)) { + return super.equals(obj); + } + com.google.maps.fleetengine.v1.CreateTripRequest other = + (com.google.maps.fleetengine.v1.CreateTripRequest) obj; + + if (hasHeader() != other.hasHeader()) return false; + if (hasHeader()) { + if (!getHeader().equals(other.getHeader())) return false; + } + 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(); + if (hasHeader()) { + hash = (37 * hash) + HEADER_FIELD_NUMBER; + hash = (53 * hash) + getHeader().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.fleetengine.v1.CreateTripRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.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.fleetengine.v1.CreateTripRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.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.fleetengine.v1.CreateTripRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.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.fleetengine.v1.CreateTripRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.CreateTripRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.CreateTripRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.CreateTripRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.CreateTripRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.CreateTripRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.fleetengine.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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * CreateTrip request message.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.v1.CreateTripRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.v1.CreateTripRequest) + com.google.maps.fleetengine.v1.CreateTripRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.TripApi + .internal_static_maps_fleetengine_v1_CreateTripRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.TripApi + .internal_static_maps_fleetengine_v1_CreateTripRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.CreateTripRequest.class, + com.google.maps.fleetengine.v1.CreateTripRequest.Builder.class); + } + + // Construct using com.google.maps.fleetengine.v1.CreateTripRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getHeaderFieldBuilder(); + getTripFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + 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.fleetengine.v1.TripApi + .internal_static_maps_fleetengine_v1_CreateTripRequest_descriptor; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.CreateTripRequest getDefaultInstanceForType() { + return com.google.maps.fleetengine.v1.CreateTripRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.CreateTripRequest build() { + com.google.maps.fleetengine.v1.CreateTripRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.CreateTripRequest buildPartial() { + com.google.maps.fleetengine.v1.CreateTripRequest result = + new com.google.maps.fleetengine.v1.CreateTripRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.fleetengine.v1.CreateTripRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.header_ = headerBuilder_ == null ? header_ : headerBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.tripId_ = tripId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.trip_ = tripBuilder_ == null ? trip_ : tripBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.fleetengine.v1.CreateTripRequest) { + return mergeFrom((com.google.maps.fleetengine.v1.CreateTripRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.fleetengine.v1.CreateTripRequest other) { + if (other == com.google.maps.fleetengine.v1.CreateTripRequest.getDefaultInstance()) + return this; + if (other.hasHeader()) { + mergeHeader(other.getHeader()); + } + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getTripId().isEmpty()) { + tripId_ = other.tripId_; + bitField0_ |= 0x00000004; + 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: + { + input.readMessage(getHeaderFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 34: + { + input.readMessage(getTripFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + tripId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.maps.fleetengine.v1.RequestHeader header_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.RequestHeader, + com.google.maps.fleetengine.v1.RequestHeader.Builder, + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder> + headerBuilder_; + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return Whether the header field is set. + */ + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return The header. + */ + public com.google.maps.fleetengine.v1.RequestHeader getHeader() { + if (headerBuilder_ == null) { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } else { + return headerBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public Builder setHeader(com.google.maps.fleetengine.v1.RequestHeader value) { + if (headerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + header_ = value; + } else { + headerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public Builder setHeader(com.google.maps.fleetengine.v1.RequestHeader.Builder builderForValue) { + if (headerBuilder_ == null) { + header_ = builderForValue.build(); + } else { + headerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public Builder mergeHeader(com.google.maps.fleetengine.v1.RequestHeader value) { + if (headerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && header_ != null + && header_ != com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance()) { + getHeaderBuilder().mergeFrom(value); + } else { + header_ = value; + } + } else { + headerBuilder_.mergeFrom(value); + } + if (header_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public Builder clearHeader() { + bitField0_ = (bitField0_ & ~0x00000001); + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public com.google.maps.fleetengine.v1.RequestHeader.Builder getHeaderBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getHeaderFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public com.google.maps.fleetengine.v1.RequestHeaderOrBuilder getHeaderOrBuilder() { + if (headerBuilder_ != null) { + return headerBuilder_.getMessageOrBuilder(); + } else { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.RequestHeader, + com.google.maps.fleetengine.v1.RequestHeader.Builder, + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder> + getHeaderFieldBuilder() { + if (headerBuilder_ == null) { + headerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.RequestHeader, + com.google.maps.fleetengine.v1.RequestHeader.Builder, + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder>( + getHeader(), getParentForChildren(), isClean()); + header_ = null; + } + return headerBuilder_; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Must be in the format `providers/{provider}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * + * string parent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Must be in the format `providers/{provider}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * + * string parent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Must be in the format `providers/{provider}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * + * string parent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Must be in the format `providers/{provider}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * + * string parent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Must be in the format `providers/{provider}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * + * string parent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object tripId_ = ""; + /** + * + * + *
+     * Required. Unique Trip ID.
+     * Subject to the following restrictions:
+     *
+     * * Must be a valid Unicode string.
+     * * Limited to a maximum length of 64 characters.
+     * * Normalized according to [Unicode Normalization Form C]
+     * (http://www.unicode.org/reports/tr15/).
+     * * May not contain any of the following ASCII characters: '/', ':', '?',
+     * ',', or '#'.
+     * 
+ * + * string trip_id = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @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. Unique Trip ID.
+     * Subject to the following restrictions:
+     *
+     * * Must be a valid Unicode string.
+     * * Limited to a maximum length of 64 characters.
+     * * Normalized according to [Unicode Normalization Form C]
+     * (http://www.unicode.org/reports/tr15/).
+     * * May not contain any of the following ASCII characters: '/', ':', '?',
+     * ',', or '#'.
+     * 
+ * + * string trip_id = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @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. Unique Trip ID.
+     * Subject to the following restrictions:
+     *
+     * * Must be a valid Unicode string.
+     * * Limited to a maximum length of 64 characters.
+     * * Normalized according to [Unicode Normalization Form C]
+     * (http://www.unicode.org/reports/tr15/).
+     * * May not contain any of the following ASCII characters: '/', ':', '?',
+     * ',', or '#'.
+     * 
+ * + * string trip_id = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @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_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Unique Trip ID.
+     * Subject to the following restrictions:
+     *
+     * * Must be a valid Unicode string.
+     * * Limited to a maximum length of 64 characters.
+     * * Normalized according to [Unicode Normalization Form C]
+     * (http://www.unicode.org/reports/tr15/).
+     * * May not contain any of the following ASCII characters: '/', ':', '?',
+     * ',', or '#'.
+     * 
+ * + * string trip_id = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTripId() { + tripId_ = getDefaultInstance().getTripId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Unique Trip ID.
+     * Subject to the following restrictions:
+     *
+     * * Must be a valid Unicode string.
+     * * Limited to a maximum length of 64 characters.
+     * * Normalized according to [Unicode Normalization Form C]
+     * (http://www.unicode.org/reports/tr15/).
+     * * May not contain any of the following ASCII characters: '/', ':', '?',
+     * ',', or '#'.
+     * 
+ * + * string trip_id = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @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_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.maps.fleetengine.v1.Trip trip_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.Trip, + com.google.maps.fleetengine.v1.Trip.Builder, + com.google.maps.fleetengine.v1.TripOrBuilder> + tripBuilder_; + /** + * + * + *
+     * Required. Trip entity to create.
+     *
+     * When creating a Trip, the following fields are required:
+     *
+     * * `trip_type`
+     * * `pickup_point`
+     *
+     * The following fields are used if you provide them:
+     *
+     * * `number_of_passengers`
+     * * `vehicle_id`
+     * * `dropoff_point`
+     * * `intermediate_destinations`
+     * * `vehicle_waypoints`
+     *
+     * All other Trip fields are ignored. For example, all trips start with a
+     * `trip_status` of `NEW` even if you pass in a `trip_status` of `CANCELED` in
+     * the creation request.
+     *
+     * Only `EXCLUSIVE` trips support `intermediate_destinations`.
+     *
+     * When `vehicle_id` is set for a shared trip, you must supply
+     * the list of `Trip.vehicle_waypoints` to specify the order of the remaining
+     * waypoints for the vehicle, otherwise the waypoint order will be
+     * undetermined.
+     *
+     * When you specify `Trip.vehicle_waypoints`, the list must contain all
+     * the remaining waypoints of the vehicle's trips, with no extra waypoints.
+     * You must order these waypoints such that for a given trip, the pickup
+     * point is before intermediate destinations, and all intermediate
+     * destinations come before the drop-off point. An `EXCLUSIVE` trip's
+     * waypoints must not interleave with any other trips.
+     *
+     * The `trip_id`, `waypoint_type` and `location` fields are used, and all
+     * other TripWaypoint fields in `vehicle_waypoints` are ignored.
+     * 
+ * + * .maps.fleetengine.v1.Trip trip = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the trip field is set. + */ + public boolean hasTrip() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Required. Trip entity to create.
+     *
+     * When creating a Trip, the following fields are required:
+     *
+     * * `trip_type`
+     * * `pickup_point`
+     *
+     * The following fields are used if you provide them:
+     *
+     * * `number_of_passengers`
+     * * `vehicle_id`
+     * * `dropoff_point`
+     * * `intermediate_destinations`
+     * * `vehicle_waypoints`
+     *
+     * All other Trip fields are ignored. For example, all trips start with a
+     * `trip_status` of `NEW` even if you pass in a `trip_status` of `CANCELED` in
+     * the creation request.
+     *
+     * Only `EXCLUSIVE` trips support `intermediate_destinations`.
+     *
+     * When `vehicle_id` is set for a shared trip, you must supply
+     * the list of `Trip.vehicle_waypoints` to specify the order of the remaining
+     * waypoints for the vehicle, otherwise the waypoint order will be
+     * undetermined.
+     *
+     * When you specify `Trip.vehicle_waypoints`, the list must contain all
+     * the remaining waypoints of the vehicle's trips, with no extra waypoints.
+     * You must order these waypoints such that for a given trip, the pickup
+     * point is before intermediate destinations, and all intermediate
+     * destinations come before the drop-off point. An `EXCLUSIVE` trip's
+     * waypoints must not interleave with any other trips.
+     *
+     * The `trip_id`, `waypoint_type` and `location` fields are used, and all
+     * other TripWaypoint fields in `vehicle_waypoints` are ignored.
+     * 
+ * + * .maps.fleetengine.v1.Trip trip = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The trip. + */ + public com.google.maps.fleetengine.v1.Trip getTrip() { + if (tripBuilder_ == null) { + return trip_ == null ? com.google.maps.fleetengine.v1.Trip.getDefaultInstance() : trip_; + } else { + return tripBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Trip entity to create.
+     *
+     * When creating a Trip, the following fields are required:
+     *
+     * * `trip_type`
+     * * `pickup_point`
+     *
+     * The following fields are used if you provide them:
+     *
+     * * `number_of_passengers`
+     * * `vehicle_id`
+     * * `dropoff_point`
+     * * `intermediate_destinations`
+     * * `vehicle_waypoints`
+     *
+     * All other Trip fields are ignored. For example, all trips start with a
+     * `trip_status` of `NEW` even if you pass in a `trip_status` of `CANCELED` in
+     * the creation request.
+     *
+     * Only `EXCLUSIVE` trips support `intermediate_destinations`.
+     *
+     * When `vehicle_id` is set for a shared trip, you must supply
+     * the list of `Trip.vehicle_waypoints` to specify the order of the remaining
+     * waypoints for the vehicle, otherwise the waypoint order will be
+     * undetermined.
+     *
+     * When you specify `Trip.vehicle_waypoints`, the list must contain all
+     * the remaining waypoints of the vehicle's trips, with no extra waypoints.
+     * You must order these waypoints such that for a given trip, the pickup
+     * point is before intermediate destinations, and all intermediate
+     * destinations come before the drop-off point. An `EXCLUSIVE` trip's
+     * waypoints must not interleave with any other trips.
+     *
+     * The `trip_id`, `waypoint_type` and `location` fields are used, and all
+     * other TripWaypoint fields in `vehicle_waypoints` are ignored.
+     * 
+ * + * .maps.fleetengine.v1.Trip trip = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setTrip(com.google.maps.fleetengine.v1.Trip value) { + if (tripBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + trip_ = value; + } else { + tripBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Trip entity to create.
+     *
+     * When creating a Trip, the following fields are required:
+     *
+     * * `trip_type`
+     * * `pickup_point`
+     *
+     * The following fields are used if you provide them:
+     *
+     * * `number_of_passengers`
+     * * `vehicle_id`
+     * * `dropoff_point`
+     * * `intermediate_destinations`
+     * * `vehicle_waypoints`
+     *
+     * All other Trip fields are ignored. For example, all trips start with a
+     * `trip_status` of `NEW` even if you pass in a `trip_status` of `CANCELED` in
+     * the creation request.
+     *
+     * Only `EXCLUSIVE` trips support `intermediate_destinations`.
+     *
+     * When `vehicle_id` is set for a shared trip, you must supply
+     * the list of `Trip.vehicle_waypoints` to specify the order of the remaining
+     * waypoints for the vehicle, otherwise the waypoint order will be
+     * undetermined.
+     *
+     * When you specify `Trip.vehicle_waypoints`, the list must contain all
+     * the remaining waypoints of the vehicle's trips, with no extra waypoints.
+     * You must order these waypoints such that for a given trip, the pickup
+     * point is before intermediate destinations, and all intermediate
+     * destinations come before the drop-off point. An `EXCLUSIVE` trip's
+     * waypoints must not interleave with any other trips.
+     *
+     * The `trip_id`, `waypoint_type` and `location` fields are used, and all
+     * other TripWaypoint fields in `vehicle_waypoints` are ignored.
+     * 
+ * + * .maps.fleetengine.v1.Trip trip = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setTrip(com.google.maps.fleetengine.v1.Trip.Builder builderForValue) { + if (tripBuilder_ == null) { + trip_ = builderForValue.build(); + } else { + tripBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Trip entity to create.
+     *
+     * When creating a Trip, the following fields are required:
+     *
+     * * `trip_type`
+     * * `pickup_point`
+     *
+     * The following fields are used if you provide them:
+     *
+     * * `number_of_passengers`
+     * * `vehicle_id`
+     * * `dropoff_point`
+     * * `intermediate_destinations`
+     * * `vehicle_waypoints`
+     *
+     * All other Trip fields are ignored. For example, all trips start with a
+     * `trip_status` of `NEW` even if you pass in a `trip_status` of `CANCELED` in
+     * the creation request.
+     *
+     * Only `EXCLUSIVE` trips support `intermediate_destinations`.
+     *
+     * When `vehicle_id` is set for a shared trip, you must supply
+     * the list of `Trip.vehicle_waypoints` to specify the order of the remaining
+     * waypoints for the vehicle, otherwise the waypoint order will be
+     * undetermined.
+     *
+     * When you specify `Trip.vehicle_waypoints`, the list must contain all
+     * the remaining waypoints of the vehicle's trips, with no extra waypoints.
+     * You must order these waypoints such that for a given trip, the pickup
+     * point is before intermediate destinations, and all intermediate
+     * destinations come before the drop-off point. An `EXCLUSIVE` trip's
+     * waypoints must not interleave with any other trips.
+     *
+     * The `trip_id`, `waypoint_type` and `location` fields are used, and all
+     * other TripWaypoint fields in `vehicle_waypoints` are ignored.
+     * 
+ * + * .maps.fleetengine.v1.Trip trip = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeTrip(com.google.maps.fleetengine.v1.Trip value) { + if (tripBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && trip_ != null + && trip_ != com.google.maps.fleetengine.v1.Trip.getDefaultInstance()) { + getTripBuilder().mergeFrom(value); + } else { + trip_ = value; + } + } else { + tripBuilder_.mergeFrom(value); + } + if (trip_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. Trip entity to create.
+     *
+     * When creating a Trip, the following fields are required:
+     *
+     * * `trip_type`
+     * * `pickup_point`
+     *
+     * The following fields are used if you provide them:
+     *
+     * * `number_of_passengers`
+     * * `vehicle_id`
+     * * `dropoff_point`
+     * * `intermediate_destinations`
+     * * `vehicle_waypoints`
+     *
+     * All other Trip fields are ignored. For example, all trips start with a
+     * `trip_status` of `NEW` even if you pass in a `trip_status` of `CANCELED` in
+     * the creation request.
+     *
+     * Only `EXCLUSIVE` trips support `intermediate_destinations`.
+     *
+     * When `vehicle_id` is set for a shared trip, you must supply
+     * the list of `Trip.vehicle_waypoints` to specify the order of the remaining
+     * waypoints for the vehicle, otherwise the waypoint order will be
+     * undetermined.
+     *
+     * When you specify `Trip.vehicle_waypoints`, the list must contain all
+     * the remaining waypoints of the vehicle's trips, with no extra waypoints.
+     * You must order these waypoints such that for a given trip, the pickup
+     * point is before intermediate destinations, and all intermediate
+     * destinations come before the drop-off point. An `EXCLUSIVE` trip's
+     * waypoints must not interleave with any other trips.
+     *
+     * The `trip_id`, `waypoint_type` and `location` fields are used, and all
+     * other TripWaypoint fields in `vehicle_waypoints` are ignored.
+     * 
+ * + * .maps.fleetengine.v1.Trip trip = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearTrip() { + bitField0_ = (bitField0_ & ~0x00000008); + trip_ = null; + if (tripBuilder_ != null) { + tripBuilder_.dispose(); + tripBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Trip entity to create.
+     *
+     * When creating a Trip, the following fields are required:
+     *
+     * * `trip_type`
+     * * `pickup_point`
+     *
+     * The following fields are used if you provide them:
+     *
+     * * `number_of_passengers`
+     * * `vehicle_id`
+     * * `dropoff_point`
+     * * `intermediate_destinations`
+     * * `vehicle_waypoints`
+     *
+     * All other Trip fields are ignored. For example, all trips start with a
+     * `trip_status` of `NEW` even if you pass in a `trip_status` of `CANCELED` in
+     * the creation request.
+     *
+     * Only `EXCLUSIVE` trips support `intermediate_destinations`.
+     *
+     * When `vehicle_id` is set for a shared trip, you must supply
+     * the list of `Trip.vehicle_waypoints` to specify the order of the remaining
+     * waypoints for the vehicle, otherwise the waypoint order will be
+     * undetermined.
+     *
+     * When you specify `Trip.vehicle_waypoints`, the list must contain all
+     * the remaining waypoints of the vehicle's trips, with no extra waypoints.
+     * You must order these waypoints such that for a given trip, the pickup
+     * point is before intermediate destinations, and all intermediate
+     * destinations come before the drop-off point. An `EXCLUSIVE` trip's
+     * waypoints must not interleave with any other trips.
+     *
+     * The `trip_id`, `waypoint_type` and `location` fields are used, and all
+     * other TripWaypoint fields in `vehicle_waypoints` are ignored.
+     * 
+ * + * .maps.fleetengine.v1.Trip trip = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.maps.fleetengine.v1.Trip.Builder getTripBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getTripFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Trip entity to create.
+     *
+     * When creating a Trip, the following fields are required:
+     *
+     * * `trip_type`
+     * * `pickup_point`
+     *
+     * The following fields are used if you provide them:
+     *
+     * * `number_of_passengers`
+     * * `vehicle_id`
+     * * `dropoff_point`
+     * * `intermediate_destinations`
+     * * `vehicle_waypoints`
+     *
+     * All other Trip fields are ignored. For example, all trips start with a
+     * `trip_status` of `NEW` even if you pass in a `trip_status` of `CANCELED` in
+     * the creation request.
+     *
+     * Only `EXCLUSIVE` trips support `intermediate_destinations`.
+     *
+     * When `vehicle_id` is set for a shared trip, you must supply
+     * the list of `Trip.vehicle_waypoints` to specify the order of the remaining
+     * waypoints for the vehicle, otherwise the waypoint order will be
+     * undetermined.
+     *
+     * When you specify `Trip.vehicle_waypoints`, the list must contain all
+     * the remaining waypoints of the vehicle's trips, with no extra waypoints.
+     * You must order these waypoints such that for a given trip, the pickup
+     * point is before intermediate destinations, and all intermediate
+     * destinations come before the drop-off point. An `EXCLUSIVE` trip's
+     * waypoints must not interleave with any other trips.
+     *
+     * The `trip_id`, `waypoint_type` and `location` fields are used, and all
+     * other TripWaypoint fields in `vehicle_waypoints` are ignored.
+     * 
+ * + * .maps.fleetengine.v1.Trip trip = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.maps.fleetengine.v1.TripOrBuilder getTripOrBuilder() { + if (tripBuilder_ != null) { + return tripBuilder_.getMessageOrBuilder(); + } else { + return trip_ == null ? com.google.maps.fleetengine.v1.Trip.getDefaultInstance() : trip_; + } + } + /** + * + * + *
+     * Required. Trip entity to create.
+     *
+     * When creating a Trip, the following fields are required:
+     *
+     * * `trip_type`
+     * * `pickup_point`
+     *
+     * The following fields are used if you provide them:
+     *
+     * * `number_of_passengers`
+     * * `vehicle_id`
+     * * `dropoff_point`
+     * * `intermediate_destinations`
+     * * `vehicle_waypoints`
+     *
+     * All other Trip fields are ignored. For example, all trips start with a
+     * `trip_status` of `NEW` even if you pass in a `trip_status` of `CANCELED` in
+     * the creation request.
+     *
+     * Only `EXCLUSIVE` trips support `intermediate_destinations`.
+     *
+     * When `vehicle_id` is set for a shared trip, you must supply
+     * the list of `Trip.vehicle_waypoints` to specify the order of the remaining
+     * waypoints for the vehicle, otherwise the waypoint order will be
+     * undetermined.
+     *
+     * When you specify `Trip.vehicle_waypoints`, the list must contain all
+     * the remaining waypoints of the vehicle's trips, with no extra waypoints.
+     * You must order these waypoints such that for a given trip, the pickup
+     * point is before intermediate destinations, and all intermediate
+     * destinations come before the drop-off point. An `EXCLUSIVE` trip's
+     * waypoints must not interleave with any other trips.
+     *
+     * The `trip_id`, `waypoint_type` and `location` fields are used, and all
+     * other TripWaypoint fields in `vehicle_waypoints` are ignored.
+     * 
+ * + * .maps.fleetengine.v1.Trip trip = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.Trip, + com.google.maps.fleetengine.v1.Trip.Builder, + com.google.maps.fleetengine.v1.TripOrBuilder> + getTripFieldBuilder() { + if (tripBuilder_ == null) { + tripBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.Trip, + com.google.maps.fleetengine.v1.Trip.Builder, + com.google.maps.fleetengine.v1.TripOrBuilder>( + getTrip(), getParentForChildren(), isClean()); + trip_ = null; + } + return tripBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:maps.fleetengine.v1.CreateTripRequest) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.v1.CreateTripRequest) + private static final com.google.maps.fleetengine.v1.CreateTripRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.fleetengine.v1.CreateTripRequest(); + } + + public static com.google.maps.fleetengine.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.fleetengine.v1.CreateTripRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/CreateTripRequestOrBuilder.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/CreateTripRequestOrBuilder.java new file mode 100644 index 000000000000..4f6cb2d20331 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/CreateTripRequestOrBuilder.java @@ -0,0 +1,274 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/trip_api.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public interface CreateTripRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.v1.CreateTripRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return Whether the header field is set. + */ + boolean hasHeader(); + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return The header. + */ + com.google.maps.fleetengine.v1.RequestHeader getHeader(); + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder getHeaderOrBuilder(); + + /** + * + * + *
+   * Required. Must be in the format `providers/{provider}`.
+   * The provider must be the Project ID (for example, `sample-cloud-project`)
+   * of the Google Cloud Project of which the service account making
+   * this call is a member.
+   * 
+ * + * + * string parent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Must be in the format `providers/{provider}`.
+   * The provider must be the Project ID (for example, `sample-cloud-project`)
+   * of the Google Cloud Project of which the service account making
+   * this call is a member.
+   * 
+ * + * + * string parent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Unique Trip ID.
+   * Subject to the following restrictions:
+   *
+   * * Must be a valid Unicode string.
+   * * Limited to a maximum length of 64 characters.
+   * * Normalized according to [Unicode Normalization Form C]
+   * (http://www.unicode.org/reports/tr15/).
+   * * May not contain any of the following ASCII characters: '/', ':', '?',
+   * ',', or '#'.
+   * 
+ * + * string trip_id = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tripId. + */ + java.lang.String getTripId(); + /** + * + * + *
+   * Required. Unique Trip ID.
+   * Subject to the following restrictions:
+   *
+   * * Must be a valid Unicode string.
+   * * Limited to a maximum length of 64 characters.
+   * * Normalized according to [Unicode Normalization Form C]
+   * (http://www.unicode.org/reports/tr15/).
+   * * May not contain any of the following ASCII characters: '/', ':', '?',
+   * ',', or '#'.
+   * 
+ * + * string trip_id = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tripId. + */ + com.google.protobuf.ByteString getTripIdBytes(); + + /** + * + * + *
+   * Required. Trip entity to create.
+   *
+   * When creating a Trip, the following fields are required:
+   *
+   * * `trip_type`
+   * * `pickup_point`
+   *
+   * The following fields are used if you provide them:
+   *
+   * * `number_of_passengers`
+   * * `vehicle_id`
+   * * `dropoff_point`
+   * * `intermediate_destinations`
+   * * `vehicle_waypoints`
+   *
+   * All other Trip fields are ignored. For example, all trips start with a
+   * `trip_status` of `NEW` even if you pass in a `trip_status` of `CANCELED` in
+   * the creation request.
+   *
+   * Only `EXCLUSIVE` trips support `intermediate_destinations`.
+   *
+   * When `vehicle_id` is set for a shared trip, you must supply
+   * the list of `Trip.vehicle_waypoints` to specify the order of the remaining
+   * waypoints for the vehicle, otherwise the waypoint order will be
+   * undetermined.
+   *
+   * When you specify `Trip.vehicle_waypoints`, the list must contain all
+   * the remaining waypoints of the vehicle's trips, with no extra waypoints.
+   * You must order these waypoints such that for a given trip, the pickup
+   * point is before intermediate destinations, and all intermediate
+   * destinations come before the drop-off point. An `EXCLUSIVE` trip's
+   * waypoints must not interleave with any other trips.
+   *
+   * The `trip_id`, `waypoint_type` and `location` fields are used, and all
+   * other TripWaypoint fields in `vehicle_waypoints` are ignored.
+   * 
+ * + * .maps.fleetengine.v1.Trip trip = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the trip field is set. + */ + boolean hasTrip(); + /** + * + * + *
+   * Required. Trip entity to create.
+   *
+   * When creating a Trip, the following fields are required:
+   *
+   * * `trip_type`
+   * * `pickup_point`
+   *
+   * The following fields are used if you provide them:
+   *
+   * * `number_of_passengers`
+   * * `vehicle_id`
+   * * `dropoff_point`
+   * * `intermediate_destinations`
+   * * `vehicle_waypoints`
+   *
+   * All other Trip fields are ignored. For example, all trips start with a
+   * `trip_status` of `NEW` even if you pass in a `trip_status` of `CANCELED` in
+   * the creation request.
+   *
+   * Only `EXCLUSIVE` trips support `intermediate_destinations`.
+   *
+   * When `vehicle_id` is set for a shared trip, you must supply
+   * the list of `Trip.vehicle_waypoints` to specify the order of the remaining
+   * waypoints for the vehicle, otherwise the waypoint order will be
+   * undetermined.
+   *
+   * When you specify `Trip.vehicle_waypoints`, the list must contain all
+   * the remaining waypoints of the vehicle's trips, with no extra waypoints.
+   * You must order these waypoints such that for a given trip, the pickup
+   * point is before intermediate destinations, and all intermediate
+   * destinations come before the drop-off point. An `EXCLUSIVE` trip's
+   * waypoints must not interleave with any other trips.
+   *
+   * The `trip_id`, `waypoint_type` and `location` fields are used, and all
+   * other TripWaypoint fields in `vehicle_waypoints` are ignored.
+   * 
+ * + * .maps.fleetengine.v1.Trip trip = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The trip. + */ + com.google.maps.fleetengine.v1.Trip getTrip(); + /** + * + * + *
+   * Required. Trip entity to create.
+   *
+   * When creating a Trip, the following fields are required:
+   *
+   * * `trip_type`
+   * * `pickup_point`
+   *
+   * The following fields are used if you provide them:
+   *
+   * * `number_of_passengers`
+   * * `vehicle_id`
+   * * `dropoff_point`
+   * * `intermediate_destinations`
+   * * `vehicle_waypoints`
+   *
+   * All other Trip fields are ignored. For example, all trips start with a
+   * `trip_status` of `NEW` even if you pass in a `trip_status` of `CANCELED` in
+   * the creation request.
+   *
+   * Only `EXCLUSIVE` trips support `intermediate_destinations`.
+   *
+   * When `vehicle_id` is set for a shared trip, you must supply
+   * the list of `Trip.vehicle_waypoints` to specify the order of the remaining
+   * waypoints for the vehicle, otherwise the waypoint order will be
+   * undetermined.
+   *
+   * When you specify `Trip.vehicle_waypoints`, the list must contain all
+   * the remaining waypoints of the vehicle's trips, with no extra waypoints.
+   * You must order these waypoints such that for a given trip, the pickup
+   * point is before intermediate destinations, and all intermediate
+   * destinations come before the drop-off point. An `EXCLUSIVE` trip's
+   * waypoints must not interleave with any other trips.
+   *
+   * The `trip_id`, `waypoint_type` and `location` fields are used, and all
+   * other TripWaypoint fields in `vehicle_waypoints` are ignored.
+   * 
+ * + * .maps.fleetengine.v1.Trip trip = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.maps.fleetengine.v1.TripOrBuilder getTripOrBuilder(); +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/CreateVehicleRequest.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/CreateVehicleRequest.java new file mode 100644 index 000000000000..f3680cc7522f --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/CreateVehicleRequest.java @@ -0,0 +1,1743 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicle_api.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * `CreateVehicle` request message.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.v1.CreateVehicleRequest} + */ +public final class CreateVehicleRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.v1.CreateVehicleRequest) + CreateVehicleRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateVehicleRequest.newBuilder() to construct. + private CreateVehicleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateVehicleRequest() { + parent_ = ""; + vehicleId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateVehicleRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_CreateVehicleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_CreateVehicleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.CreateVehicleRequest.class, + com.google.maps.fleetengine.v1.CreateVehicleRequest.Builder.class); + } + + private int bitField0_; + public static final int HEADER_FIELD_NUMBER = 1; + private com.google.maps.fleetengine.v1.RequestHeader header_; + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return Whether the header field is set. + */ + @java.lang.Override + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return The header. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.RequestHeader getHeader() { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.RequestHeaderOrBuilder getHeaderOrBuilder() { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } + + public static final int PARENT_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Must be in the format `providers/{provider}`.
+   * The provider must be the Project ID (for example, `sample-cloud-project`)
+   * of the Google Cloud Project of which the service account making
+   * this call is a member.
+   * 
+ * + * string parent = 3 [(.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. Must be in the format `providers/{provider}`.
+   * The provider must be the Project ID (for example, `sample-cloud-project`)
+   * of the Google Cloud Project of which the service account making
+   * this call is a member.
+   * 
+ * + * string parent = 3 [(.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 VEHICLE_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object vehicleId_ = ""; + /** + * + * + *
+   * Required. Unique Vehicle ID.
+   * Subject to the following restrictions:
+   *
+   * * Must be a valid Unicode string.
+   * * Limited to a maximum length of 64 characters.
+   * * Normalized according to [Unicode Normalization Form C]
+   * (http://www.unicode.org/reports/tr15/).
+   * * May not contain any of the following ASCII characters: '/', ':', '?',
+   * ',', or '#'.
+   * 
+ * + * string vehicle_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vehicleId. + */ + @java.lang.Override + public java.lang.String getVehicleId() { + java.lang.Object ref = vehicleId_; + 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(); + vehicleId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Unique Vehicle ID.
+   * Subject to the following restrictions:
+   *
+   * * Must be a valid Unicode string.
+   * * Limited to a maximum length of 64 characters.
+   * * Normalized according to [Unicode Normalization Form C]
+   * (http://www.unicode.org/reports/tr15/).
+   * * May not contain any of the following ASCII characters: '/', ':', '?',
+   * ',', or '#'.
+   * 
+ * + * string vehicle_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for vehicleId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVehicleIdBytes() { + java.lang.Object ref = vehicleId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vehicleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VEHICLE_FIELD_NUMBER = 5; + private com.google.maps.fleetengine.v1.Vehicle vehicle_; + /** + * + * + *
+   * Required. The Vehicle entity to create. When creating a Vehicle, the
+   * following fields are required:
+   *
+   * * `vehicleState`
+   * * `supportedTripTypes`
+   * * `maximumCapacity`
+   * * `vehicleType`
+   *
+   * When creating a Vehicle, the following fields are ignored:
+   *
+   * * `name`
+   * * `currentTrips`
+   * * `availableCapacity`
+   * * `current_route_segment`
+   * * `current_route_segment_end_point`
+   * * `current_route_segment_version`
+   * * `current_route_segment_traffic`
+   * * `route`
+   * * `waypoints`
+   * * `waypoints_version`
+   * * `remaining_distance_meters`
+   * * `remaining_time_seconds`
+   * * `eta_to_next_waypoint`
+   * * `navigation_status`
+   *
+   * All other fields are optional and used if provided.
+   * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the vehicle field is set. + */ + @java.lang.Override + public boolean hasVehicle() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Required. The Vehicle entity to create. When creating a Vehicle, the
+   * following fields are required:
+   *
+   * * `vehicleState`
+   * * `supportedTripTypes`
+   * * `maximumCapacity`
+   * * `vehicleType`
+   *
+   * When creating a Vehicle, the following fields are ignored:
+   *
+   * * `name`
+   * * `currentTrips`
+   * * `availableCapacity`
+   * * `current_route_segment`
+   * * `current_route_segment_end_point`
+   * * `current_route_segment_version`
+   * * `current_route_segment_traffic`
+   * * `route`
+   * * `waypoints`
+   * * `waypoints_version`
+   * * `remaining_distance_meters`
+   * * `remaining_time_seconds`
+   * * `eta_to_next_waypoint`
+   * * `navigation_status`
+   *
+   * All other fields are optional and used if provided.
+   * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The vehicle. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.Vehicle getVehicle() { + return vehicle_ == null + ? com.google.maps.fleetengine.v1.Vehicle.getDefaultInstance() + : vehicle_; + } + /** + * + * + *
+   * Required. The Vehicle entity to create. When creating a Vehicle, the
+   * following fields are required:
+   *
+   * * `vehicleState`
+   * * `supportedTripTypes`
+   * * `maximumCapacity`
+   * * `vehicleType`
+   *
+   * When creating a Vehicle, the following fields are ignored:
+   *
+   * * `name`
+   * * `currentTrips`
+   * * `availableCapacity`
+   * * `current_route_segment`
+   * * `current_route_segment_end_point`
+   * * `current_route_segment_version`
+   * * `current_route_segment_traffic`
+   * * `route`
+   * * `waypoints`
+   * * `waypoints_version`
+   * * `remaining_distance_meters`
+   * * `remaining_time_seconds`
+   * * `eta_to_next_waypoint`
+   * * `navigation_status`
+   *
+   * All other fields are optional and used if provided.
+   * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleOrBuilder getVehicleOrBuilder() { + return vehicle_ == null + ? com.google.maps.fleetengine.v1.Vehicle.getDefaultInstance() + : vehicle_; + } + + 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, getHeader()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vehicleId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, vehicleId_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getVehicle()); + } + 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, getHeader()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vehicleId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, vehicleId_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getVehicle()); + } + 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.fleetengine.v1.CreateVehicleRequest)) { + return super.equals(obj); + } + com.google.maps.fleetengine.v1.CreateVehicleRequest other = + (com.google.maps.fleetengine.v1.CreateVehicleRequest) obj; + + if (hasHeader() != other.hasHeader()) return false; + if (hasHeader()) { + if (!getHeader().equals(other.getHeader())) return false; + } + if (!getParent().equals(other.getParent())) return false; + if (!getVehicleId().equals(other.getVehicleId())) return false; + if (hasVehicle() != other.hasVehicle()) return false; + if (hasVehicle()) { + if (!getVehicle().equals(other.getVehicle())) 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 (hasHeader()) { + hash = (37 * hash) + HEADER_FIELD_NUMBER; + hash = (53 * hash) + getHeader().hashCode(); + } + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + VEHICLE_ID_FIELD_NUMBER; + hash = (53 * hash) + getVehicleId().hashCode(); + if (hasVehicle()) { + hash = (37 * hash) + VEHICLE_FIELD_NUMBER; + hash = (53 * hash) + getVehicle().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.fleetengine.v1.CreateVehicleRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.CreateVehicleRequest 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.fleetengine.v1.CreateVehicleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.CreateVehicleRequest 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.fleetengine.v1.CreateVehicleRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.CreateVehicleRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.CreateVehicleRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.CreateVehicleRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.CreateVehicleRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.CreateVehicleRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.CreateVehicleRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.CreateVehicleRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.fleetengine.v1.CreateVehicleRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * `CreateVehicle` request message.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.v1.CreateVehicleRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.v1.CreateVehicleRequest) + com.google.maps.fleetengine.v1.CreateVehicleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_CreateVehicleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_CreateVehicleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.CreateVehicleRequest.class, + com.google.maps.fleetengine.v1.CreateVehicleRequest.Builder.class); + } + + // Construct using com.google.maps.fleetengine.v1.CreateVehicleRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getHeaderFieldBuilder(); + getVehicleFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + parent_ = ""; + vehicleId_ = ""; + vehicle_ = null; + if (vehicleBuilder_ != null) { + vehicleBuilder_.dispose(); + vehicleBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_CreateVehicleRequest_descriptor; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.CreateVehicleRequest getDefaultInstanceForType() { + return com.google.maps.fleetengine.v1.CreateVehicleRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.CreateVehicleRequest build() { + com.google.maps.fleetengine.v1.CreateVehicleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.CreateVehicleRequest buildPartial() { + com.google.maps.fleetengine.v1.CreateVehicleRequest result = + new com.google.maps.fleetengine.v1.CreateVehicleRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.fleetengine.v1.CreateVehicleRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.header_ = headerBuilder_ == null ? header_ : headerBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.vehicleId_ = vehicleId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.vehicle_ = vehicleBuilder_ == null ? vehicle_ : vehicleBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.fleetengine.v1.CreateVehicleRequest) { + return mergeFrom((com.google.maps.fleetengine.v1.CreateVehicleRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.fleetengine.v1.CreateVehicleRequest other) { + if (other == com.google.maps.fleetengine.v1.CreateVehicleRequest.getDefaultInstance()) + return this; + if (other.hasHeader()) { + mergeHeader(other.getHeader()); + } + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getVehicleId().isEmpty()) { + vehicleId_ = other.vehicleId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasVehicle()) { + mergeVehicle(other.getVehicle()); + } + 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(getHeaderFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 34: + { + vehicleId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 34 + case 42: + { + input.readMessage(getVehicleFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.maps.fleetengine.v1.RequestHeader header_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.RequestHeader, + com.google.maps.fleetengine.v1.RequestHeader.Builder, + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder> + headerBuilder_; + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return Whether the header field is set. + */ + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return The header. + */ + public com.google.maps.fleetengine.v1.RequestHeader getHeader() { + if (headerBuilder_ == null) { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } else { + return headerBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public Builder setHeader(com.google.maps.fleetengine.v1.RequestHeader value) { + if (headerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + header_ = value; + } else { + headerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public Builder setHeader(com.google.maps.fleetengine.v1.RequestHeader.Builder builderForValue) { + if (headerBuilder_ == null) { + header_ = builderForValue.build(); + } else { + headerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public Builder mergeHeader(com.google.maps.fleetengine.v1.RequestHeader value) { + if (headerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && header_ != null + && header_ != com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance()) { + getHeaderBuilder().mergeFrom(value); + } else { + header_ = value; + } + } else { + headerBuilder_.mergeFrom(value); + } + if (header_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public Builder clearHeader() { + bitField0_ = (bitField0_ & ~0x00000001); + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public com.google.maps.fleetengine.v1.RequestHeader.Builder getHeaderBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getHeaderFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public com.google.maps.fleetengine.v1.RequestHeaderOrBuilder getHeaderOrBuilder() { + if (headerBuilder_ != null) { + return headerBuilder_.getMessageOrBuilder(); + } else { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.RequestHeader, + com.google.maps.fleetengine.v1.RequestHeader.Builder, + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder> + getHeaderFieldBuilder() { + if (headerBuilder_ == null) { + headerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.RequestHeader, + com.google.maps.fleetengine.v1.RequestHeader.Builder, + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder>( + getHeader(), getParentForChildren(), isClean()); + header_ = null; + } + return headerBuilder_; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Must be in the format `providers/{provider}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * string parent = 3 [(.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. Must be in the format `providers/{provider}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * string parent = 3 [(.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. Must be in the format `providers/{provider}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * string parent = 3 [(.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_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Must be in the format `providers/{provider}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * string parent = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Must be in the format `providers/{provider}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * string parent = 3 [(.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_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object vehicleId_ = ""; + /** + * + * + *
+     * Required. Unique Vehicle ID.
+     * Subject to the following restrictions:
+     *
+     * * Must be a valid Unicode string.
+     * * Limited to a maximum length of 64 characters.
+     * * Normalized according to [Unicode Normalization Form C]
+     * (http://www.unicode.org/reports/tr15/).
+     * * May not contain any of the following ASCII characters: '/', ':', '?',
+     * ',', or '#'.
+     * 
+ * + * string vehicle_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vehicleId. + */ + public java.lang.String getVehicleId() { + java.lang.Object ref = vehicleId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vehicleId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Unique Vehicle ID.
+     * Subject to the following restrictions:
+     *
+     * * Must be a valid Unicode string.
+     * * Limited to a maximum length of 64 characters.
+     * * Normalized according to [Unicode Normalization Form C]
+     * (http://www.unicode.org/reports/tr15/).
+     * * May not contain any of the following ASCII characters: '/', ':', '?',
+     * ',', or '#'.
+     * 
+ * + * string vehicle_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for vehicleId. + */ + public com.google.protobuf.ByteString getVehicleIdBytes() { + java.lang.Object ref = vehicleId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vehicleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Unique Vehicle ID.
+     * Subject to the following restrictions:
+     *
+     * * Must be a valid Unicode string.
+     * * Limited to a maximum length of 64 characters.
+     * * Normalized according to [Unicode Normalization Form C]
+     * (http://www.unicode.org/reports/tr15/).
+     * * May not contain any of the following ASCII characters: '/', ':', '?',
+     * ',', or '#'.
+     * 
+ * + * string vehicle_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The vehicleId to set. + * @return This builder for chaining. + */ + public Builder setVehicleId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + vehicleId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Unique Vehicle ID.
+     * Subject to the following restrictions:
+     *
+     * * Must be a valid Unicode string.
+     * * Limited to a maximum length of 64 characters.
+     * * Normalized according to [Unicode Normalization Form C]
+     * (http://www.unicode.org/reports/tr15/).
+     * * May not contain any of the following ASCII characters: '/', ':', '?',
+     * ',', or '#'.
+     * 
+ * + * string vehicle_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearVehicleId() { + vehicleId_ = getDefaultInstance().getVehicleId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Unique Vehicle ID.
+     * Subject to the following restrictions:
+     *
+     * * Must be a valid Unicode string.
+     * * Limited to a maximum length of 64 characters.
+     * * Normalized according to [Unicode Normalization Form C]
+     * (http://www.unicode.org/reports/tr15/).
+     * * May not contain any of the following ASCII characters: '/', ':', '?',
+     * ',', or '#'.
+     * 
+ * + * string vehicle_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for vehicleId to set. + * @return This builder for chaining. + */ + public Builder setVehicleIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + vehicleId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.maps.fleetengine.v1.Vehicle vehicle_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.Vehicle, + com.google.maps.fleetengine.v1.Vehicle.Builder, + com.google.maps.fleetengine.v1.VehicleOrBuilder> + vehicleBuilder_; + /** + * + * + *
+     * Required. The Vehicle entity to create. When creating a Vehicle, the
+     * following fields are required:
+     *
+     * * `vehicleState`
+     * * `supportedTripTypes`
+     * * `maximumCapacity`
+     * * `vehicleType`
+     *
+     * When creating a Vehicle, the following fields are ignored:
+     *
+     * * `name`
+     * * `currentTrips`
+     * * `availableCapacity`
+     * * `current_route_segment`
+     * * `current_route_segment_end_point`
+     * * `current_route_segment_version`
+     * * `current_route_segment_traffic`
+     * * `route`
+     * * `waypoints`
+     * * `waypoints_version`
+     * * `remaining_distance_meters`
+     * * `remaining_time_seconds`
+     * * `eta_to_next_waypoint`
+     * * `navigation_status`
+     *
+     * All other fields are optional and used if provided.
+     * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the vehicle field is set. + */ + public boolean hasVehicle() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Required. The Vehicle entity to create. When creating a Vehicle, the
+     * following fields are required:
+     *
+     * * `vehicleState`
+     * * `supportedTripTypes`
+     * * `maximumCapacity`
+     * * `vehicleType`
+     *
+     * When creating a Vehicle, the following fields are ignored:
+     *
+     * * `name`
+     * * `currentTrips`
+     * * `availableCapacity`
+     * * `current_route_segment`
+     * * `current_route_segment_end_point`
+     * * `current_route_segment_version`
+     * * `current_route_segment_traffic`
+     * * `route`
+     * * `waypoints`
+     * * `waypoints_version`
+     * * `remaining_distance_meters`
+     * * `remaining_time_seconds`
+     * * `eta_to_next_waypoint`
+     * * `navigation_status`
+     *
+     * All other fields are optional and used if provided.
+     * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The vehicle. + */ + public com.google.maps.fleetengine.v1.Vehicle getVehicle() { + if (vehicleBuilder_ == null) { + return vehicle_ == null + ? com.google.maps.fleetengine.v1.Vehicle.getDefaultInstance() + : vehicle_; + } else { + return vehicleBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The Vehicle entity to create. When creating a Vehicle, the
+     * following fields are required:
+     *
+     * * `vehicleState`
+     * * `supportedTripTypes`
+     * * `maximumCapacity`
+     * * `vehicleType`
+     *
+     * When creating a Vehicle, the following fields are ignored:
+     *
+     * * `name`
+     * * `currentTrips`
+     * * `availableCapacity`
+     * * `current_route_segment`
+     * * `current_route_segment_end_point`
+     * * `current_route_segment_version`
+     * * `current_route_segment_traffic`
+     * * `route`
+     * * `waypoints`
+     * * `waypoints_version`
+     * * `remaining_distance_meters`
+     * * `remaining_time_seconds`
+     * * `eta_to_next_waypoint`
+     * * `navigation_status`
+     *
+     * All other fields are optional and used if provided.
+     * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setVehicle(com.google.maps.fleetengine.v1.Vehicle value) { + if (vehicleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + vehicle_ = value; + } else { + vehicleBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Vehicle entity to create. When creating a Vehicle, the
+     * following fields are required:
+     *
+     * * `vehicleState`
+     * * `supportedTripTypes`
+     * * `maximumCapacity`
+     * * `vehicleType`
+     *
+     * When creating a Vehicle, the following fields are ignored:
+     *
+     * * `name`
+     * * `currentTrips`
+     * * `availableCapacity`
+     * * `current_route_segment`
+     * * `current_route_segment_end_point`
+     * * `current_route_segment_version`
+     * * `current_route_segment_traffic`
+     * * `route`
+     * * `waypoints`
+     * * `waypoints_version`
+     * * `remaining_distance_meters`
+     * * `remaining_time_seconds`
+     * * `eta_to_next_waypoint`
+     * * `navigation_status`
+     *
+     * All other fields are optional and used if provided.
+     * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setVehicle(com.google.maps.fleetengine.v1.Vehicle.Builder builderForValue) { + if (vehicleBuilder_ == null) { + vehicle_ = builderForValue.build(); + } else { + vehicleBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Vehicle entity to create. When creating a Vehicle, the
+     * following fields are required:
+     *
+     * * `vehicleState`
+     * * `supportedTripTypes`
+     * * `maximumCapacity`
+     * * `vehicleType`
+     *
+     * When creating a Vehicle, the following fields are ignored:
+     *
+     * * `name`
+     * * `currentTrips`
+     * * `availableCapacity`
+     * * `current_route_segment`
+     * * `current_route_segment_end_point`
+     * * `current_route_segment_version`
+     * * `current_route_segment_traffic`
+     * * `route`
+     * * `waypoints`
+     * * `waypoints_version`
+     * * `remaining_distance_meters`
+     * * `remaining_time_seconds`
+     * * `eta_to_next_waypoint`
+     * * `navigation_status`
+     *
+     * All other fields are optional and used if provided.
+     * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeVehicle(com.google.maps.fleetengine.v1.Vehicle value) { + if (vehicleBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && vehicle_ != null + && vehicle_ != com.google.maps.fleetengine.v1.Vehicle.getDefaultInstance()) { + getVehicleBuilder().mergeFrom(value); + } else { + vehicle_ = value; + } + } else { + vehicleBuilder_.mergeFrom(value); + } + if (vehicle_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The Vehicle entity to create. When creating a Vehicle, the
+     * following fields are required:
+     *
+     * * `vehicleState`
+     * * `supportedTripTypes`
+     * * `maximumCapacity`
+     * * `vehicleType`
+     *
+     * When creating a Vehicle, the following fields are ignored:
+     *
+     * * `name`
+     * * `currentTrips`
+     * * `availableCapacity`
+     * * `current_route_segment`
+     * * `current_route_segment_end_point`
+     * * `current_route_segment_version`
+     * * `current_route_segment_traffic`
+     * * `route`
+     * * `waypoints`
+     * * `waypoints_version`
+     * * `remaining_distance_meters`
+     * * `remaining_time_seconds`
+     * * `eta_to_next_waypoint`
+     * * `navigation_status`
+     *
+     * All other fields are optional and used if provided.
+     * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearVehicle() { + bitField0_ = (bitField0_ & ~0x00000008); + vehicle_ = null; + if (vehicleBuilder_ != null) { + vehicleBuilder_.dispose(); + vehicleBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Vehicle entity to create. When creating a Vehicle, the
+     * following fields are required:
+     *
+     * * `vehicleState`
+     * * `supportedTripTypes`
+     * * `maximumCapacity`
+     * * `vehicleType`
+     *
+     * When creating a Vehicle, the following fields are ignored:
+     *
+     * * `name`
+     * * `currentTrips`
+     * * `availableCapacity`
+     * * `current_route_segment`
+     * * `current_route_segment_end_point`
+     * * `current_route_segment_version`
+     * * `current_route_segment_traffic`
+     * * `route`
+     * * `waypoints`
+     * * `waypoints_version`
+     * * `remaining_distance_meters`
+     * * `remaining_time_seconds`
+     * * `eta_to_next_waypoint`
+     * * `navigation_status`
+     *
+     * All other fields are optional and used if provided.
+     * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.maps.fleetengine.v1.Vehicle.Builder getVehicleBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getVehicleFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The Vehicle entity to create. When creating a Vehicle, the
+     * following fields are required:
+     *
+     * * `vehicleState`
+     * * `supportedTripTypes`
+     * * `maximumCapacity`
+     * * `vehicleType`
+     *
+     * When creating a Vehicle, the following fields are ignored:
+     *
+     * * `name`
+     * * `currentTrips`
+     * * `availableCapacity`
+     * * `current_route_segment`
+     * * `current_route_segment_end_point`
+     * * `current_route_segment_version`
+     * * `current_route_segment_traffic`
+     * * `route`
+     * * `waypoints`
+     * * `waypoints_version`
+     * * `remaining_distance_meters`
+     * * `remaining_time_seconds`
+     * * `eta_to_next_waypoint`
+     * * `navigation_status`
+     *
+     * All other fields are optional and used if provided.
+     * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.maps.fleetengine.v1.VehicleOrBuilder getVehicleOrBuilder() { + if (vehicleBuilder_ != null) { + return vehicleBuilder_.getMessageOrBuilder(); + } else { + return vehicle_ == null + ? com.google.maps.fleetengine.v1.Vehicle.getDefaultInstance() + : vehicle_; + } + } + /** + * + * + *
+     * Required. The Vehicle entity to create. When creating a Vehicle, the
+     * following fields are required:
+     *
+     * * `vehicleState`
+     * * `supportedTripTypes`
+     * * `maximumCapacity`
+     * * `vehicleType`
+     *
+     * When creating a Vehicle, the following fields are ignored:
+     *
+     * * `name`
+     * * `currentTrips`
+     * * `availableCapacity`
+     * * `current_route_segment`
+     * * `current_route_segment_end_point`
+     * * `current_route_segment_version`
+     * * `current_route_segment_traffic`
+     * * `route`
+     * * `waypoints`
+     * * `waypoints_version`
+     * * `remaining_distance_meters`
+     * * `remaining_time_seconds`
+     * * `eta_to_next_waypoint`
+     * * `navigation_status`
+     *
+     * All other fields are optional and used if provided.
+     * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.Vehicle, + com.google.maps.fleetengine.v1.Vehicle.Builder, + com.google.maps.fleetengine.v1.VehicleOrBuilder> + getVehicleFieldBuilder() { + if (vehicleBuilder_ == null) { + vehicleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.Vehicle, + com.google.maps.fleetengine.v1.Vehicle.Builder, + com.google.maps.fleetengine.v1.VehicleOrBuilder>( + getVehicle(), getParentForChildren(), isClean()); + vehicle_ = null; + } + return vehicleBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:maps.fleetengine.v1.CreateVehicleRequest) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.v1.CreateVehicleRequest) + private static final com.google.maps.fleetengine.v1.CreateVehicleRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.fleetengine.v1.CreateVehicleRequest(); + } + + public static com.google.maps.fleetengine.v1.CreateVehicleRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateVehicleRequest 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.fleetengine.v1.CreateVehicleRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/CreateVehicleRequestOrBuilder.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/CreateVehicleRequestOrBuilder.java new file mode 100644 index 000000000000..0da13c2b033c --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/CreateVehicleRequestOrBuilder.java @@ -0,0 +1,246 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicle_api.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public interface CreateVehicleRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.v1.CreateVehicleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return Whether the header field is set. + */ + boolean hasHeader(); + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return The header. + */ + com.google.maps.fleetengine.v1.RequestHeader getHeader(); + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder getHeaderOrBuilder(); + + /** + * + * + *
+   * Required. Must be in the format `providers/{provider}`.
+   * The provider must be the Project ID (for example, `sample-cloud-project`)
+   * of the Google Cloud Project of which the service account making
+   * this call is a member.
+   * 
+ * + * string parent = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Must be in the format `providers/{provider}`.
+   * The provider must be the Project ID (for example, `sample-cloud-project`)
+   * of the Google Cloud Project of which the service account making
+   * this call is a member.
+   * 
+ * + * string parent = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Unique Vehicle ID.
+   * Subject to the following restrictions:
+   *
+   * * Must be a valid Unicode string.
+   * * Limited to a maximum length of 64 characters.
+   * * Normalized according to [Unicode Normalization Form C]
+   * (http://www.unicode.org/reports/tr15/).
+   * * May not contain any of the following ASCII characters: '/', ':', '?',
+   * ',', or '#'.
+   * 
+ * + * string vehicle_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vehicleId. + */ + java.lang.String getVehicleId(); + /** + * + * + *
+   * Required. Unique Vehicle ID.
+   * Subject to the following restrictions:
+   *
+   * * Must be a valid Unicode string.
+   * * Limited to a maximum length of 64 characters.
+   * * Normalized according to [Unicode Normalization Form C]
+   * (http://www.unicode.org/reports/tr15/).
+   * * May not contain any of the following ASCII characters: '/', ':', '?',
+   * ',', or '#'.
+   * 
+ * + * string vehicle_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for vehicleId. + */ + com.google.protobuf.ByteString getVehicleIdBytes(); + + /** + * + * + *
+   * Required. The Vehicle entity to create. When creating a Vehicle, the
+   * following fields are required:
+   *
+   * * `vehicleState`
+   * * `supportedTripTypes`
+   * * `maximumCapacity`
+   * * `vehicleType`
+   *
+   * When creating a Vehicle, the following fields are ignored:
+   *
+   * * `name`
+   * * `currentTrips`
+   * * `availableCapacity`
+   * * `current_route_segment`
+   * * `current_route_segment_end_point`
+   * * `current_route_segment_version`
+   * * `current_route_segment_traffic`
+   * * `route`
+   * * `waypoints`
+   * * `waypoints_version`
+   * * `remaining_distance_meters`
+   * * `remaining_time_seconds`
+   * * `eta_to_next_waypoint`
+   * * `navigation_status`
+   *
+   * All other fields are optional and used if provided.
+   * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the vehicle field is set. + */ + boolean hasVehicle(); + /** + * + * + *
+   * Required. The Vehicle entity to create. When creating a Vehicle, the
+   * following fields are required:
+   *
+   * * `vehicleState`
+   * * `supportedTripTypes`
+   * * `maximumCapacity`
+   * * `vehicleType`
+   *
+   * When creating a Vehicle, the following fields are ignored:
+   *
+   * * `name`
+   * * `currentTrips`
+   * * `availableCapacity`
+   * * `current_route_segment`
+   * * `current_route_segment_end_point`
+   * * `current_route_segment_version`
+   * * `current_route_segment_traffic`
+   * * `route`
+   * * `waypoints`
+   * * `waypoints_version`
+   * * `remaining_distance_meters`
+   * * `remaining_time_seconds`
+   * * `eta_to_next_waypoint`
+   * * `navigation_status`
+   *
+   * All other fields are optional and used if provided.
+   * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The vehicle. + */ + com.google.maps.fleetengine.v1.Vehicle getVehicle(); + /** + * + * + *
+   * Required. The Vehicle entity to create. When creating a Vehicle, the
+   * following fields are required:
+   *
+   * * `vehicleState`
+   * * `supportedTripTypes`
+   * * `maximumCapacity`
+   * * `vehicleType`
+   *
+   * When creating a Vehicle, the following fields are ignored:
+   *
+   * * `name`
+   * * `currentTrips`
+   * * `availableCapacity`
+   * * `current_route_segment`
+   * * `current_route_segment_end_point`
+   * * `current_route_segment_version`
+   * * `current_route_segment_traffic`
+   * * `route`
+   * * `waypoints`
+   * * `waypoints_version`
+   * * `remaining_distance_meters`
+   * * `remaining_time_seconds`
+   * * `eta_to_next_waypoint`
+   * * `navigation_status`
+   *
+   * All other fields are optional and used if provided.
+   * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.maps.fleetengine.v1.VehicleOrBuilder getVehicleOrBuilder(); +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/DeviceSettings.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/DeviceSettings.java new file mode 100644 index 000000000000..9daa659406ea --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/DeviceSettings.java @@ -0,0 +1,1073 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicles.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * Information about various settings on the mobile device.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.v1.DeviceSettings} + */ +public final class DeviceSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.v1.DeviceSettings) + DeviceSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeviceSettings.newBuilder() to construct. + private DeviceSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeviceSettings() { + locationPowerSaveMode_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeviceSettings(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.Vehicles + .internal_static_maps_fleetengine_v1_DeviceSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.Vehicles + .internal_static_maps_fleetengine_v1_DeviceSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.DeviceSettings.class, + com.google.maps.fleetengine.v1.DeviceSettings.Builder.class); + } + + private int bitField0_; + public static final int LOCATION_POWER_SAVE_MODE_FIELD_NUMBER = 1; + private int locationPowerSaveMode_ = 0; + /** + * + * + *
+   * How location features are set to behave on the device when battery saver is
+   * on.
+   * 
+ * + * .maps.fleetengine.v1.LocationPowerSaveMode location_power_save_mode = 1; + * + * @return The enum numeric value on the wire for locationPowerSaveMode. + */ + @java.lang.Override + public int getLocationPowerSaveModeValue() { + return locationPowerSaveMode_; + } + /** + * + * + *
+   * How location features are set to behave on the device when battery saver is
+   * on.
+   * 
+ * + * .maps.fleetengine.v1.LocationPowerSaveMode location_power_save_mode = 1; + * + * @return The locationPowerSaveMode. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.LocationPowerSaveMode getLocationPowerSaveMode() { + com.google.maps.fleetengine.v1.LocationPowerSaveMode result = + com.google.maps.fleetengine.v1.LocationPowerSaveMode.forNumber(locationPowerSaveMode_); + return result == null + ? com.google.maps.fleetengine.v1.LocationPowerSaveMode.UNRECOGNIZED + : result; + } + + public static final int IS_POWER_SAVE_MODE_FIELD_NUMBER = 2; + private boolean isPowerSaveMode_ = false; + /** + * + * + *
+   * Whether the device is currently in power save mode.
+   * 
+ * + * bool is_power_save_mode = 2; + * + * @return The isPowerSaveMode. + */ + @java.lang.Override + public boolean getIsPowerSaveMode() { + return isPowerSaveMode_; + } + + public static final int IS_INTERACTIVE_FIELD_NUMBER = 3; + private boolean isInteractive_ = false; + /** + * + * + *
+   * Whether the device is in an interactive state.
+   * 
+ * + * bool is_interactive = 3; + * + * @return The isInteractive. + */ + @java.lang.Override + public boolean getIsInteractive() { + return isInteractive_; + } + + public static final int BATTERY_INFO_FIELD_NUMBER = 4; + private com.google.maps.fleetengine.v1.BatteryInfo batteryInfo_; + /** + * + * + *
+   * Information about the battery state.
+   * 
+ * + * .maps.fleetengine.v1.BatteryInfo battery_info = 4; + * + * @return Whether the batteryInfo field is set. + */ + @java.lang.Override + public boolean hasBatteryInfo() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Information about the battery state.
+   * 
+ * + * .maps.fleetengine.v1.BatteryInfo battery_info = 4; + * + * @return The batteryInfo. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.BatteryInfo getBatteryInfo() { + return batteryInfo_ == null + ? com.google.maps.fleetengine.v1.BatteryInfo.getDefaultInstance() + : batteryInfo_; + } + /** + * + * + *
+   * Information about the battery state.
+   * 
+ * + * .maps.fleetengine.v1.BatteryInfo battery_info = 4; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.BatteryInfoOrBuilder getBatteryInfoOrBuilder() { + return batteryInfo_ == null + ? com.google.maps.fleetengine.v1.BatteryInfo.getDefaultInstance() + : batteryInfo_; + } + + 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 (locationPowerSaveMode_ + != com.google.maps.fleetengine.v1.LocationPowerSaveMode.UNKNOWN_LOCATION_POWER_SAVE_MODE + .getNumber()) { + output.writeEnum(1, locationPowerSaveMode_); + } + if (isPowerSaveMode_ != false) { + output.writeBool(2, isPowerSaveMode_); + } + if (isInteractive_ != false) { + output.writeBool(3, isInteractive_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getBatteryInfo()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (locationPowerSaveMode_ + != com.google.maps.fleetengine.v1.LocationPowerSaveMode.UNKNOWN_LOCATION_POWER_SAVE_MODE + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, locationPowerSaveMode_); + } + if (isPowerSaveMode_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, isPowerSaveMode_); + } + if (isInteractive_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, isInteractive_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getBatteryInfo()); + } + 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.fleetengine.v1.DeviceSettings)) { + return super.equals(obj); + } + com.google.maps.fleetengine.v1.DeviceSettings other = + (com.google.maps.fleetengine.v1.DeviceSettings) obj; + + if (locationPowerSaveMode_ != other.locationPowerSaveMode_) return false; + if (getIsPowerSaveMode() != other.getIsPowerSaveMode()) return false; + if (getIsInteractive() != other.getIsInteractive()) return false; + if (hasBatteryInfo() != other.hasBatteryInfo()) return false; + if (hasBatteryInfo()) { + if (!getBatteryInfo().equals(other.getBatteryInfo())) 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) + LOCATION_POWER_SAVE_MODE_FIELD_NUMBER; + hash = (53 * hash) + locationPowerSaveMode_; + hash = (37 * hash) + IS_POWER_SAVE_MODE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsPowerSaveMode()); + hash = (37 * hash) + IS_INTERACTIVE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsInteractive()); + if (hasBatteryInfo()) { + hash = (37 * hash) + BATTERY_INFO_FIELD_NUMBER; + hash = (53 * hash) + getBatteryInfo().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.fleetengine.v1.DeviceSettings parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.DeviceSettings 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.fleetengine.v1.DeviceSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.DeviceSettings 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.fleetengine.v1.DeviceSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.DeviceSettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.DeviceSettings parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.DeviceSettings parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.DeviceSettings parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.DeviceSettings parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.DeviceSettings parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.DeviceSettings parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.fleetengine.v1.DeviceSettings prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Information about various settings on the mobile device.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.v1.DeviceSettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.v1.DeviceSettings) + com.google.maps.fleetengine.v1.DeviceSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.Vehicles + .internal_static_maps_fleetengine_v1_DeviceSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.Vehicles + .internal_static_maps_fleetengine_v1_DeviceSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.DeviceSettings.class, + com.google.maps.fleetengine.v1.DeviceSettings.Builder.class); + } + + // Construct using com.google.maps.fleetengine.v1.DeviceSettings.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getBatteryInfoFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + locationPowerSaveMode_ = 0; + isPowerSaveMode_ = false; + isInteractive_ = false; + batteryInfo_ = null; + if (batteryInfoBuilder_ != null) { + batteryInfoBuilder_.dispose(); + batteryInfoBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.fleetengine.v1.Vehicles + .internal_static_maps_fleetengine_v1_DeviceSettings_descriptor; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.DeviceSettings getDefaultInstanceForType() { + return com.google.maps.fleetengine.v1.DeviceSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.DeviceSettings build() { + com.google.maps.fleetengine.v1.DeviceSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.DeviceSettings buildPartial() { + com.google.maps.fleetengine.v1.DeviceSettings result = + new com.google.maps.fleetengine.v1.DeviceSettings(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.fleetengine.v1.DeviceSettings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.locationPowerSaveMode_ = locationPowerSaveMode_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.isPowerSaveMode_ = isPowerSaveMode_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.isInteractive_ = isInteractive_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.batteryInfo_ = + batteryInfoBuilder_ == null ? batteryInfo_ : batteryInfoBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.fleetengine.v1.DeviceSettings) { + return mergeFrom((com.google.maps.fleetengine.v1.DeviceSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.fleetengine.v1.DeviceSettings other) { + if (other == com.google.maps.fleetengine.v1.DeviceSettings.getDefaultInstance()) return this; + if (other.locationPowerSaveMode_ != 0) { + setLocationPowerSaveModeValue(other.getLocationPowerSaveModeValue()); + } + if (other.getIsPowerSaveMode() != false) { + setIsPowerSaveMode(other.getIsPowerSaveMode()); + } + if (other.getIsInteractive() != false) { + setIsInteractive(other.getIsInteractive()); + } + if (other.hasBatteryInfo()) { + mergeBatteryInfo(other.getBatteryInfo()); + } + 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: + { + locationPowerSaveMode_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + isPowerSaveMode_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + isInteractive_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + input.readMessage(getBatteryInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int locationPowerSaveMode_ = 0; + /** + * + * + *
+     * How location features are set to behave on the device when battery saver is
+     * on.
+     * 
+ * + * .maps.fleetengine.v1.LocationPowerSaveMode location_power_save_mode = 1; + * + * @return The enum numeric value on the wire for locationPowerSaveMode. + */ + @java.lang.Override + public int getLocationPowerSaveModeValue() { + return locationPowerSaveMode_; + } + /** + * + * + *
+     * How location features are set to behave on the device when battery saver is
+     * on.
+     * 
+ * + * .maps.fleetengine.v1.LocationPowerSaveMode location_power_save_mode = 1; + * + * @param value The enum numeric value on the wire for locationPowerSaveMode to set. + * @return This builder for chaining. + */ + public Builder setLocationPowerSaveModeValue(int value) { + locationPowerSaveMode_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * How location features are set to behave on the device when battery saver is
+     * on.
+     * 
+ * + * .maps.fleetengine.v1.LocationPowerSaveMode location_power_save_mode = 1; + * + * @return The locationPowerSaveMode. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.LocationPowerSaveMode getLocationPowerSaveMode() { + com.google.maps.fleetengine.v1.LocationPowerSaveMode result = + com.google.maps.fleetengine.v1.LocationPowerSaveMode.forNumber(locationPowerSaveMode_); + return result == null + ? com.google.maps.fleetengine.v1.LocationPowerSaveMode.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * How location features are set to behave on the device when battery saver is
+     * on.
+     * 
+ * + * .maps.fleetengine.v1.LocationPowerSaveMode location_power_save_mode = 1; + * + * @param value The locationPowerSaveMode to set. + * @return This builder for chaining. + */ + public Builder setLocationPowerSaveMode( + com.google.maps.fleetengine.v1.LocationPowerSaveMode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + locationPowerSaveMode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * How location features are set to behave on the device when battery saver is
+     * on.
+     * 
+ * + * .maps.fleetengine.v1.LocationPowerSaveMode location_power_save_mode = 1; + * + * @return This builder for chaining. + */ + public Builder clearLocationPowerSaveMode() { + bitField0_ = (bitField0_ & ~0x00000001); + locationPowerSaveMode_ = 0; + onChanged(); + return this; + } + + private boolean isPowerSaveMode_; + /** + * + * + *
+     * Whether the device is currently in power save mode.
+     * 
+ * + * bool is_power_save_mode = 2; + * + * @return The isPowerSaveMode. + */ + @java.lang.Override + public boolean getIsPowerSaveMode() { + return isPowerSaveMode_; + } + /** + * + * + *
+     * Whether the device is currently in power save mode.
+     * 
+ * + * bool is_power_save_mode = 2; + * + * @param value The isPowerSaveMode to set. + * @return This builder for chaining. + */ + public Builder setIsPowerSaveMode(boolean value) { + + isPowerSaveMode_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether the device is currently in power save mode.
+     * 
+ * + * bool is_power_save_mode = 2; + * + * @return This builder for chaining. + */ + public Builder clearIsPowerSaveMode() { + bitField0_ = (bitField0_ & ~0x00000002); + isPowerSaveMode_ = false; + onChanged(); + return this; + } + + private boolean isInteractive_; + /** + * + * + *
+     * Whether the device is in an interactive state.
+     * 
+ * + * bool is_interactive = 3; + * + * @return The isInteractive. + */ + @java.lang.Override + public boolean getIsInteractive() { + return isInteractive_; + } + /** + * + * + *
+     * Whether the device is in an interactive state.
+     * 
+ * + * bool is_interactive = 3; + * + * @param value The isInteractive to set. + * @return This builder for chaining. + */ + public Builder setIsInteractive(boolean value) { + + isInteractive_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether the device is in an interactive state.
+     * 
+ * + * bool is_interactive = 3; + * + * @return This builder for chaining. + */ + public Builder clearIsInteractive() { + bitField0_ = (bitField0_ & ~0x00000004); + isInteractive_ = false; + onChanged(); + return this; + } + + private com.google.maps.fleetengine.v1.BatteryInfo batteryInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.BatteryInfo, + com.google.maps.fleetengine.v1.BatteryInfo.Builder, + com.google.maps.fleetengine.v1.BatteryInfoOrBuilder> + batteryInfoBuilder_; + /** + * + * + *
+     * Information about the battery state.
+     * 
+ * + * .maps.fleetengine.v1.BatteryInfo battery_info = 4; + * + * @return Whether the batteryInfo field is set. + */ + public boolean hasBatteryInfo() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Information about the battery state.
+     * 
+ * + * .maps.fleetengine.v1.BatteryInfo battery_info = 4; + * + * @return The batteryInfo. + */ + public com.google.maps.fleetengine.v1.BatteryInfo getBatteryInfo() { + if (batteryInfoBuilder_ == null) { + return batteryInfo_ == null + ? com.google.maps.fleetengine.v1.BatteryInfo.getDefaultInstance() + : batteryInfo_; + } else { + return batteryInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Information about the battery state.
+     * 
+ * + * .maps.fleetengine.v1.BatteryInfo battery_info = 4; + */ + public Builder setBatteryInfo(com.google.maps.fleetengine.v1.BatteryInfo value) { + if (batteryInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + batteryInfo_ = value; + } else { + batteryInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Information about the battery state.
+     * 
+ * + * .maps.fleetengine.v1.BatteryInfo battery_info = 4; + */ + public Builder setBatteryInfo( + com.google.maps.fleetengine.v1.BatteryInfo.Builder builderForValue) { + if (batteryInfoBuilder_ == null) { + batteryInfo_ = builderForValue.build(); + } else { + batteryInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Information about the battery state.
+     * 
+ * + * .maps.fleetengine.v1.BatteryInfo battery_info = 4; + */ + public Builder mergeBatteryInfo(com.google.maps.fleetengine.v1.BatteryInfo value) { + if (batteryInfoBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && batteryInfo_ != null + && batteryInfo_ != com.google.maps.fleetengine.v1.BatteryInfo.getDefaultInstance()) { + getBatteryInfoBuilder().mergeFrom(value); + } else { + batteryInfo_ = value; + } + } else { + batteryInfoBuilder_.mergeFrom(value); + } + if (batteryInfo_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Information about the battery state.
+     * 
+ * + * .maps.fleetengine.v1.BatteryInfo battery_info = 4; + */ + public Builder clearBatteryInfo() { + bitField0_ = (bitField0_ & ~0x00000008); + batteryInfo_ = null; + if (batteryInfoBuilder_ != null) { + batteryInfoBuilder_.dispose(); + batteryInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Information about the battery state.
+     * 
+ * + * .maps.fleetengine.v1.BatteryInfo battery_info = 4; + */ + public com.google.maps.fleetengine.v1.BatteryInfo.Builder getBatteryInfoBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getBatteryInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Information about the battery state.
+     * 
+ * + * .maps.fleetengine.v1.BatteryInfo battery_info = 4; + */ + public com.google.maps.fleetengine.v1.BatteryInfoOrBuilder getBatteryInfoOrBuilder() { + if (batteryInfoBuilder_ != null) { + return batteryInfoBuilder_.getMessageOrBuilder(); + } else { + return batteryInfo_ == null + ? com.google.maps.fleetengine.v1.BatteryInfo.getDefaultInstance() + : batteryInfo_; + } + } + /** + * + * + *
+     * Information about the battery state.
+     * 
+ * + * .maps.fleetengine.v1.BatteryInfo battery_info = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.BatteryInfo, + com.google.maps.fleetengine.v1.BatteryInfo.Builder, + com.google.maps.fleetengine.v1.BatteryInfoOrBuilder> + getBatteryInfoFieldBuilder() { + if (batteryInfoBuilder_ == null) { + batteryInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.BatteryInfo, + com.google.maps.fleetengine.v1.BatteryInfo.Builder, + com.google.maps.fleetengine.v1.BatteryInfoOrBuilder>( + getBatteryInfo(), getParentForChildren(), isClean()); + batteryInfo_ = null; + } + return batteryInfoBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:maps.fleetengine.v1.DeviceSettings) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.v1.DeviceSettings) + private static final com.google.maps.fleetengine.v1.DeviceSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.fleetengine.v1.DeviceSettings(); + } + + public static com.google.maps.fleetengine.v1.DeviceSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeviceSettings 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.fleetengine.v1.DeviceSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/DeviceSettingsOrBuilder.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/DeviceSettingsOrBuilder.java new file mode 100644 index 000000000000..ccd752a1b812 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/DeviceSettingsOrBuilder.java @@ -0,0 +1,114 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicles.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public interface DeviceSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.v1.DeviceSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * How location features are set to behave on the device when battery saver is
+   * on.
+   * 
+ * + * .maps.fleetengine.v1.LocationPowerSaveMode location_power_save_mode = 1; + * + * @return The enum numeric value on the wire for locationPowerSaveMode. + */ + int getLocationPowerSaveModeValue(); + /** + * + * + *
+   * How location features are set to behave on the device when battery saver is
+   * on.
+   * 
+ * + * .maps.fleetengine.v1.LocationPowerSaveMode location_power_save_mode = 1; + * + * @return The locationPowerSaveMode. + */ + com.google.maps.fleetengine.v1.LocationPowerSaveMode getLocationPowerSaveMode(); + + /** + * + * + *
+   * Whether the device is currently in power save mode.
+   * 
+ * + * bool is_power_save_mode = 2; + * + * @return The isPowerSaveMode. + */ + boolean getIsPowerSaveMode(); + + /** + * + * + *
+   * Whether the device is in an interactive state.
+   * 
+ * + * bool is_interactive = 3; + * + * @return The isInteractive. + */ + boolean getIsInteractive(); + + /** + * + * + *
+   * Information about the battery state.
+   * 
+ * + * .maps.fleetengine.v1.BatteryInfo battery_info = 4; + * + * @return Whether the batteryInfo field is set. + */ + boolean hasBatteryInfo(); + /** + * + * + *
+   * Information about the battery state.
+   * 
+ * + * .maps.fleetengine.v1.BatteryInfo battery_info = 4; + * + * @return The batteryInfo. + */ + com.google.maps.fleetengine.v1.BatteryInfo getBatteryInfo(); + /** + * + * + *
+   * Information about the battery state.
+   * 
+ * + * .maps.fleetengine.v1.BatteryInfo battery_info = 4; + */ + com.google.maps.fleetengine.v1.BatteryInfoOrBuilder getBatteryInfoOrBuilder(); +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/FleetEngine.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/FleetEngine.java new file mode 100644 index 000000000000..cb5ef9585259 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/FleetEngine.java @@ -0,0 +1,253 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/fleetengine.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public final class FleetEngine { + private FleetEngine() {} + + 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_maps_fleetengine_v1_TerminalPointId_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_v1_TerminalPointId_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_v1_TerminalLocation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_v1_TerminalLocation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_v1_TripWaypoint_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_v1_TripWaypoint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_v1_VehicleAttribute_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_v1_VehicleAttribute_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_v1_VehicleLocation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_v1_VehicleLocation_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n,google/maps/fleetengine/v1/fleetengine" + + ".proto\022\023maps.fleetengine.v1\032\037google/api/" + + "field_behavior.proto\032(google/maps/fleete" + + "ngine/v1/traffic.proto\032\036google/protobuf/" + + "duration.proto\032\037google/protobuf/timestam" + + "p.proto\032\036google/protobuf/wrappers.proto\032" + + "\030google/type/latlng.proto\"b\n\017TerminalPoi" + + "ntId\022\026\n\010place_id\030\002 \001(\tB\002\030\001H\000\022\032\n\014generate" + + "d_id\030\003 \001(\tB\002\030\001H\000\022\021\n\005value\030\004 \001(\tB\002\030\001:\002\030\001B" + + "\004\n\002Id\"\371\001\n\020TerminalLocation\022\'\n\005point\030\001 \001(" + + "\0132\023.google.type.LatLngB\003\340A\002\022C\n\021terminal_" + + "point_id\030\002 \001(\0132$.maps.fleetengine.v1.Ter" + + "minalPointIdB\002\030\001\022\033\n\017access_point_id\030\003 \001(" + + "\tB\002\030\001\022\023\n\007trip_id\030\004 \001(\tB\002\030\001\022E\n\026terminal_l" + + "ocation_type\030\005 \001(\0162!.maps.fleetengine.v1" + + ".WaypointTypeB\002\030\001\"\274\003\n\014TripWaypoint\0227\n\010lo" + + "cation\030\001 \001(\0132%.maps.fleetengine.v1.Termi" + + "nalLocation\022\017\n\007trip_id\030\002 \001(\t\0228\n\rwaypoint" + + "_type\030\003 \001(\0162!.maps.fleetengine.v1.Waypoi" + + "ntType\022-\n\020path_to_waypoint\030\004 \003(\0132\023.googl" + + "e.type.LatLng\022 \n\030encoded_path_to_waypoin" + + "t\030\005 \001(\t\022K\n\023traffic_to_waypoint\030\n \001(\0132..m" + + "aps.fleetengine.v1.ConsumableTrafficPoly" + + "line\0224\n\017distance_meters\030\006 \001(\0132\033.google.p" + + "rotobuf.Int32Value\022\'\n\003eta\030\007 \001(\0132\032.google" + + ".protobuf.Timestamp\022+\n\010duration\030\010 \001(\0132\031." + + "google.protobuf.Duration\"\217\001\n\020VehicleAttr" + + "ibute\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\022\026\n\014str" + + "ing_value\030\003 \001(\tH\000\022\024\n\nbool_value\030\004 \001(\010H\000\022" + + "\026\n\014number_value\030\005 \001(\001H\000B\031\n\027vehicle_attri" + + "bute_value\"\244\014\n\017VehicleLocation\022%\n\010locati" + + "on\030\001 \001(\0132\023.google.type.LatLng\022=\n\023horizon" + + "tal_accuracy\030\010 \001(\0132\034.google.protobuf.Dou" + + "bleValueB\002\030\001\0225\n\017latlng_accuracy\030\026 \001(\0132\034." + + "google.protobuf.DoubleValue\022,\n\007heading\030\002" + + " \001(\0132\033.google.protobuf.Int32Value\022:\n\020bea" + + "ring_accuracy\030\n \001(\0132\034.google.protobuf.Do" + + "ubleValueB\002\030\001\0226\n\020heading_accuracy\030\027 \001(\0132" + + "\034.google.protobuf.DoubleValue\022.\n\010altitud" + + "e\030\005 \001(\0132\034.google.protobuf.DoubleValue\022;\n" + + "\021vertical_accuracy\030\t \001(\0132\034.google.protob" + + "uf.DoubleValueB\002\030\001\0227\n\021altitude_accuracy\030" + + "\030 \001(\0132\034.google.protobuf.DoubleValue\0223\n\ns" + + "peed_kmph\030\003 \001(\0132\033.google.protobuf.Int32V" + + "alueB\002\030\001\022+\n\005speed\030\006 \001(\0132\034.google.protobu" + + "f.DoubleValue\0224\n\016speed_accuracy\030\007 \001(\0132\034." + + "google.protobuf.DoubleValue\022/\n\013update_ti" + + "me\030\004 \001(\0132\032.google.protobuf.Timestamp\0224\n\013" + + "server_time\030\r \001(\0132\032.google.protobuf.Time" + + "stampB\003\340A\003\022<\n\017location_sensor\030\013 \001(\0162#.ma" + + "ps.fleetengine.v1.LocationSensor\0223\n\017is_r" + + "oad_snapped\030\033 \001(\0132\032.google.protobuf.Bool" + + "Value\022>\n\025is_gps_sensor_enabled\030\014 \001(\0132\032.g" + + "oogle.protobuf.BoolValueB\003\340A\004\022;\n\021time_si" + + "nce_update\030\016 \001(\0132\033.google.protobuf.Int32" + + "ValueB\003\340A\004\022=\n\021num_stale_updates\030\017 \001(\0132\033." + + "google.protobuf.Int32ValueB\005\030\001\340A\004\022)\n\014raw" + + "_location\030\020 \001(\0132\023.google.type.LatLng\0225\n\021" + + "raw_location_time\030\021 \001(\0132\032.google.protobu" + + "f.Timestamp\022@\n\023raw_location_sensor\030\034 \001(\016" + + "2#.maps.fleetengine.v1.LocationSensor\022;\n" + + "\025raw_location_accuracy\030\031 \001(\0132\034.google.pr" + + "otobuf.DoubleValue\0222\n\025supplemental_locat" + + "ion\030\022 \001(\0132\023.google.type.LatLng\022>\n\032supple" + + "mental_location_time\030\023 \001(\0132\032.google.prot" + + "obuf.Timestamp\022I\n\034supplemental_location_" + + "sensor\030\024 \001(\0162#.maps.fleetengine.v1.Locat" + + "ionSensor\022D\n\036supplemental_location_accur" + + "acy\030\025 \001(\0132\034.google.protobuf.DoubleValue\022" + + "\030\n\014road_snapped\030\032 \001(\010B\002\030\001*<\n\010TripType\022\025\n" + + "\021UNKNOWN_TRIP_TYPE\020\000\022\n\n\006SHARED\020\001\022\r\n\tEXCL" + + "USIVE\020\002*\213\001\n\014WaypointType\022\031\n\025UNKNOWN_WAYP" + + "OINT_TYPE\020\000\022\030\n\024PICKUP_WAYPOINT_TYPE\020\001\022\032\n" + + "\026DROP_OFF_WAYPOINT_TYPE\020\002\022*\n&INTERMEDIAT" + + "E_DESTINATION_WAYPOINT_TYPE\020\003*_\n\022Polylin" + + "eFormatType\022\027\n\023UNKNOWN_FORMAT_TYPE\020\000\022\025\n\021" + + "LAT_LNG_LIST_TYPE\020\001\022\031\n\025ENCODED_POLYLINE_" + + "TYPE\020\002*\211\001\n\020NavigationStatus\022\035\n\031UNKNOWN_N" + + "AVIGATION_STATUS\020\000\022\017\n\013NO_GUIDANCE\020\001\022\032\n\026E" + + "NROUTE_TO_DESTINATION\020\002\022\r\n\tOFF_ROUTE\020\003\022\032" + + "\n\026ARRIVED_AT_DESTINATION\020\004*\327\001\n\016LocationS" + + "ensor\022\022\n\016UNKNOWN_SENSOR\020\000\022\007\n\003GPS\020\001\022\013\n\007NE" + + "TWORK\020\002\022\013\n\007PASSIVE\020\003\022\"\n\036ROAD_SNAPPED_LOC" + + "ATION_PROVIDER\020\004\022\036\n\032CUSTOMER_SUPPLIED_LO" + + "CATION\020\005\022\031\n\025FLEET_ENGINE_LOCATION\020\006\022\033\n\027F" + + "USED_LOCATION_PROVIDER\020d\022\022\n\rCORE_LOCATIO" + + "N\020\310\001B\327\001\n\036com.google.maps.fleetengine.v1B" + + "\013FleetEngineP\001ZFcloud.google.com/go/maps" + + "/fleetengine/apiv1/fleetenginepb;fleeten" + + "ginepb\242\002\003CFE\252\002\032Google.Maps.FleetEngine.V" + + "1\312\002\032Google\\Maps\\FleetEngine\\V1\352\002\035Google:" + + ":Maps::FleetEngine::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.maps.fleetengine.v1.TrafficProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.protobuf.WrappersProto.getDescriptor(), + com.google.type.LatLngProto.getDescriptor(), + }); + internal_static_maps_fleetengine_v1_TerminalPointId_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_maps_fleetengine_v1_TerminalPointId_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_v1_TerminalPointId_descriptor, + new java.lang.String[] { + "PlaceId", "GeneratedId", "Value", "Id", + }); + internal_static_maps_fleetengine_v1_TerminalLocation_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_maps_fleetengine_v1_TerminalLocation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_v1_TerminalLocation_descriptor, + new java.lang.String[] { + "Point", "TerminalPointId", "AccessPointId", "TripId", "TerminalLocationType", + }); + internal_static_maps_fleetengine_v1_TripWaypoint_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_maps_fleetengine_v1_TripWaypoint_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_v1_TripWaypoint_descriptor, + new java.lang.String[] { + "Location", + "TripId", + "WaypointType", + "PathToWaypoint", + "EncodedPathToWaypoint", + "TrafficToWaypoint", + "DistanceMeters", + "Eta", + "Duration", + }); + internal_static_maps_fleetengine_v1_VehicleAttribute_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_maps_fleetengine_v1_VehicleAttribute_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_v1_VehicleAttribute_descriptor, + new java.lang.String[] { + "Key", "Value", "StringValue", "BoolValue", "NumberValue", "VehicleAttributeValue", + }); + internal_static_maps_fleetengine_v1_VehicleLocation_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_maps_fleetengine_v1_VehicleLocation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_v1_VehicleLocation_descriptor, + new java.lang.String[] { + "Location", + "HorizontalAccuracy", + "LatlngAccuracy", + "Heading", + "BearingAccuracy", + "HeadingAccuracy", + "Altitude", + "VerticalAccuracy", + "AltitudeAccuracy", + "SpeedKmph", + "Speed", + "SpeedAccuracy", + "UpdateTime", + "ServerTime", + "LocationSensor", + "IsRoadSnapped", + "IsGpsSensorEnabled", + "TimeSinceUpdate", + "NumStaleUpdates", + "RawLocation", + "RawLocationTime", + "RawLocationSensor", + "RawLocationAccuracy", + "SupplementalLocation", + "SupplementalLocationTime", + "SupplementalLocationSensor", + "SupplementalLocationAccuracy", + "RoadSnapped", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.maps.fleetengine.v1.TrafficProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.WrappersProto.getDescriptor(); + com.google.type.LatLngProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/GetTripRequest.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/GetTripRequest.java new file mode 100644 index 000000000000..7f05d383d89a --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/GetTripRequest.java @@ -0,0 +1,2554 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/trip_api.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * GetTrip request message.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.v1.GetTripRequest} + */ +public final class GetTripRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.v1.GetTripRequest) + GetTripRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetTripRequest.newBuilder() to construct. + private GetTripRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetTripRequest() { + name_ = ""; + view_ = 0; + routeFormatType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetTripRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.TripApi + .internal_static_maps_fleetengine_v1_GetTripRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.TripApi + .internal_static_maps_fleetengine_v1_GetTripRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.GetTripRequest.class, + com.google.maps.fleetengine.v1.GetTripRequest.Builder.class); + } + + private int bitField0_; + public static final int HEADER_FIELD_NUMBER = 1; + private com.google.maps.fleetengine.v1.RequestHeader header_; + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return Whether the header field is set. + */ + @java.lang.Override + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return The header. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.RequestHeader getHeader() { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.RequestHeaderOrBuilder getHeaderOrBuilder() { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } + + public static final int NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Must be in the format `providers/{provider}/trips/{trip}`.
+   * The provider must be the Project ID (for example, `sample-cloud-project`)
+   * of the Google Cloud Project of which the service account making
+   * this call is a member.
+   * 
+ * + * + * string name = 3 [(.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. Must be in the format `providers/{provider}/trips/{trip}`.
+   * The provider must be the Project ID (for example, `sample-cloud-project`)
+   * of the Google Cloud Project of which the service account making
+   * this call is a member.
+   * 
+ * + * + * string name = 3 [(.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; + } + } + + public static final int VIEW_FIELD_NUMBER = 11; + private int view_ = 0; + /** + * + * + *
+   * The subset of Trip fields that should be returned and their interpretation.
+   * 
+ * + * .maps.fleetengine.v1.TripView view = 11; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+   * The subset of Trip fields that should be returned and their interpretation.
+   * 
+ * + * .maps.fleetengine.v1.TripView view = 11; + * + * @return The view. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TripView getView() { + com.google.maps.fleetengine.v1.TripView result = + com.google.maps.fleetengine.v1.TripView.forNumber(view_); + return result == null ? com.google.maps.fleetengine.v1.TripView.UNRECOGNIZED : result; + } + + public static final int CURRENT_ROUTE_SEGMENT_VERSION_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp currentRouteSegmentVersion_; + /** + * + * + *
+   * Indicates the minimum timestamp (exclusive) for which `Trip.route` or
+   * `Trip.current_route_segment` data are retrieved. If route data are
+   * unchanged since this timestamp, the route field is not set in the response.
+   * If a minimum is unspecified, the route data are always retrieved.
+   * 
+ * + * .google.protobuf.Timestamp current_route_segment_version = 6; + * + * @return Whether the currentRouteSegmentVersion field is set. + */ + @java.lang.Override + public boolean hasCurrentRouteSegmentVersion() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Indicates the minimum timestamp (exclusive) for which `Trip.route` or
+   * `Trip.current_route_segment` data are retrieved. If route data are
+   * unchanged since this timestamp, the route field is not set in the response.
+   * If a minimum is unspecified, the route data are always retrieved.
+   * 
+ * + * .google.protobuf.Timestamp current_route_segment_version = 6; + * + * @return The currentRouteSegmentVersion. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCurrentRouteSegmentVersion() { + return currentRouteSegmentVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : currentRouteSegmentVersion_; + } + /** + * + * + *
+   * Indicates the minimum timestamp (exclusive) for which `Trip.route` or
+   * `Trip.current_route_segment` data are retrieved. If route data are
+   * unchanged since this timestamp, the route field is not set in the response.
+   * If a minimum is unspecified, the route data are always retrieved.
+   * 
+ * + * .google.protobuf.Timestamp current_route_segment_version = 6; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCurrentRouteSegmentVersionOrBuilder() { + return currentRouteSegmentVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : currentRouteSegmentVersion_; + } + + public static final int REMAINING_WAYPOINTS_VERSION_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp remainingWaypointsVersion_; + /** + * + * + *
+   * Indicates the minimum timestamp (exclusive) for which
+   * `Trip.remaining_waypoints` are retrieved. If they are unchanged since this
+   * timestamp, the `remaining_waypoints` are not set in the response. If this
+   * field is unspecified, `remaining_waypoints` is always retrieved.
+   * 
+ * + * .google.protobuf.Timestamp remaining_waypoints_version = 7; + * + * @return Whether the remainingWaypointsVersion field is set. + */ + @java.lang.Override + public boolean hasRemainingWaypointsVersion() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Indicates the minimum timestamp (exclusive) for which
+   * `Trip.remaining_waypoints` are retrieved. If they are unchanged since this
+   * timestamp, the `remaining_waypoints` are not set in the response. If this
+   * field is unspecified, `remaining_waypoints` is always retrieved.
+   * 
+ * + * .google.protobuf.Timestamp remaining_waypoints_version = 7; + * + * @return The remainingWaypointsVersion. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getRemainingWaypointsVersion() { + return remainingWaypointsVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : remainingWaypointsVersion_; + } + /** + * + * + *
+   * Indicates the minimum timestamp (exclusive) for which
+   * `Trip.remaining_waypoints` are retrieved. If they are unchanged since this
+   * timestamp, the `remaining_waypoints` are not set in the response. If this
+   * field is unspecified, `remaining_waypoints` is always retrieved.
+   * 
+ * + * .google.protobuf.Timestamp remaining_waypoints_version = 7; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getRemainingWaypointsVersionOrBuilder() { + return remainingWaypointsVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : remainingWaypointsVersion_; + } + + public static final int ROUTE_FORMAT_TYPE_FIELD_NUMBER = 8; + private int routeFormatType_ = 0; + /** + * + * + *
+   * The returned current route format, `LAT_LNG_LIST_TYPE` (in `Trip.route`),
+   * or `ENCODED_POLYLINE_TYPE` (in `Trip.current_route_segment`). The default
+   * is `LAT_LNG_LIST_TYPE`.
+   * 
+ * + * .maps.fleetengine.v1.PolylineFormatType route_format_type = 8; + * + * @return The enum numeric value on the wire for routeFormatType. + */ + @java.lang.Override + public int getRouteFormatTypeValue() { + return routeFormatType_; + } + /** + * + * + *
+   * The returned current route format, `LAT_LNG_LIST_TYPE` (in `Trip.route`),
+   * or `ENCODED_POLYLINE_TYPE` (in `Trip.current_route_segment`). The default
+   * is `LAT_LNG_LIST_TYPE`.
+   * 
+ * + * .maps.fleetengine.v1.PolylineFormatType route_format_type = 8; + * + * @return The routeFormatType. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.PolylineFormatType getRouteFormatType() { + com.google.maps.fleetengine.v1.PolylineFormatType result = + com.google.maps.fleetengine.v1.PolylineFormatType.forNumber(routeFormatType_); + return result == null ? com.google.maps.fleetengine.v1.PolylineFormatType.UNRECOGNIZED : result; + } + + public static final int CURRENT_ROUTE_SEGMENT_TRAFFIC_VERSION_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp currentRouteSegmentTrafficVersion_; + /** + * + * + *
+   * Indicates the minimum timestamp (exclusive) for which
+   * `Trip.current_route_segment_traffic` is retrieved. If traffic data are
+   * unchanged since this timestamp, the `current_route_segment_traffic` field
+   * is not set in the response. If a minimum is unspecified, the traffic data
+   * are always retrieved. Note that traffic is only available for On-Demand
+   * Rides and Deliveries Solution customers.
+   * 
+ * + * .google.protobuf.Timestamp current_route_segment_traffic_version = 9; + * + * @return Whether the currentRouteSegmentTrafficVersion field is set. + */ + @java.lang.Override + public boolean hasCurrentRouteSegmentTrafficVersion() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * Indicates the minimum timestamp (exclusive) for which
+   * `Trip.current_route_segment_traffic` is retrieved. If traffic data are
+   * unchanged since this timestamp, the `current_route_segment_traffic` field
+   * is not set in the response. If a minimum is unspecified, the traffic data
+   * are always retrieved. Note that traffic is only available for On-Demand
+   * Rides and Deliveries Solution customers.
+   * 
+ * + * .google.protobuf.Timestamp current_route_segment_traffic_version = 9; + * + * @return The currentRouteSegmentTrafficVersion. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCurrentRouteSegmentTrafficVersion() { + return currentRouteSegmentTrafficVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : currentRouteSegmentTrafficVersion_; + } + /** + * + * + *
+   * Indicates the minimum timestamp (exclusive) for which
+   * `Trip.current_route_segment_traffic` is retrieved. If traffic data are
+   * unchanged since this timestamp, the `current_route_segment_traffic` field
+   * is not set in the response. If a minimum is unspecified, the traffic data
+   * are always retrieved. Note that traffic is only available for On-Demand
+   * Rides and Deliveries Solution customers.
+   * 
+ * + * .google.protobuf.Timestamp current_route_segment_traffic_version = 9; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCurrentRouteSegmentTrafficVersionOrBuilder() { + return currentRouteSegmentTrafficVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : currentRouteSegmentTrafficVersion_; + } + + public static final int REMAINING_WAYPOINTS_ROUTE_VERSION_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp remainingWaypointsRouteVersion_; + /** + * + * + *
+   * Indicates the minimum timestamp (exclusive) for which
+   * `Trip.remaining_waypoints.traffic_to_waypoint` and
+   * `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. If data are
+   * unchanged since this timestamp, the fields above are
+   * not set in the response. If `remaining_waypoints_route_version` is
+   * unspecified, traffic and path are always retrieved.
+   * 
+ * + * .google.protobuf.Timestamp remaining_waypoints_route_version = 10; + * + * @return Whether the remainingWaypointsRouteVersion field is set. + */ + @java.lang.Override + public boolean hasRemainingWaypointsRouteVersion() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+   * Indicates the minimum timestamp (exclusive) for which
+   * `Trip.remaining_waypoints.traffic_to_waypoint` and
+   * `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. If data are
+   * unchanged since this timestamp, the fields above are
+   * not set in the response. If `remaining_waypoints_route_version` is
+   * unspecified, traffic and path are always retrieved.
+   * 
+ * + * .google.protobuf.Timestamp remaining_waypoints_route_version = 10; + * + * @return The remainingWaypointsRouteVersion. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getRemainingWaypointsRouteVersion() { + return remainingWaypointsRouteVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : remainingWaypointsRouteVersion_; + } + /** + * + * + *
+   * Indicates the minimum timestamp (exclusive) for which
+   * `Trip.remaining_waypoints.traffic_to_waypoint` and
+   * `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. If data are
+   * unchanged since this timestamp, the fields above are
+   * not set in the response. If `remaining_waypoints_route_version` is
+   * unspecified, traffic and path are always retrieved.
+   * 
+ * + * .google.protobuf.Timestamp remaining_waypoints_route_version = 10; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getRemainingWaypointsRouteVersionOrBuilder() { + return remainingWaypointsRouteVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : remainingWaypointsRouteVersion_; + } + + 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, getHeader()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getCurrentRouteSegmentVersion()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(7, getRemainingWaypointsVersion()); + } + if (routeFormatType_ + != com.google.maps.fleetengine.v1.PolylineFormatType.UNKNOWN_FORMAT_TYPE.getNumber()) { + output.writeEnum(8, routeFormatType_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(9, getCurrentRouteSegmentTrafficVersion()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(10, getRemainingWaypointsRouteVersion()); + } + if (view_ != com.google.maps.fleetengine.v1.TripView.TRIP_VIEW_UNSPECIFIED.getNumber()) { + output.writeEnum(11, view_); + } + 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, getHeader()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, getCurrentRouteSegmentVersion()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, getRemainingWaypointsVersion()); + } + if (routeFormatType_ + != com.google.maps.fleetengine.v1.PolylineFormatType.UNKNOWN_FORMAT_TYPE.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, routeFormatType_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 9, getCurrentRouteSegmentTrafficVersion()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, getRemainingWaypointsRouteVersion()); + } + if (view_ != com.google.maps.fleetengine.v1.TripView.TRIP_VIEW_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, view_); + } + 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.fleetengine.v1.GetTripRequest)) { + return super.equals(obj); + } + com.google.maps.fleetengine.v1.GetTripRequest other = + (com.google.maps.fleetengine.v1.GetTripRequest) obj; + + if (hasHeader() != other.hasHeader()) return false; + if (hasHeader()) { + if (!getHeader().equals(other.getHeader())) return false; + } + if (!getName().equals(other.getName())) return false; + if (view_ != other.view_) return false; + if (hasCurrentRouteSegmentVersion() != other.hasCurrentRouteSegmentVersion()) return false; + if (hasCurrentRouteSegmentVersion()) { + if (!getCurrentRouteSegmentVersion().equals(other.getCurrentRouteSegmentVersion())) + return false; + } + if (hasRemainingWaypointsVersion() != other.hasRemainingWaypointsVersion()) return false; + if (hasRemainingWaypointsVersion()) { + if (!getRemainingWaypointsVersion().equals(other.getRemainingWaypointsVersion())) + return false; + } + if (routeFormatType_ != other.routeFormatType_) return false; + if (hasCurrentRouteSegmentTrafficVersion() != other.hasCurrentRouteSegmentTrafficVersion()) + return false; + if (hasCurrentRouteSegmentTrafficVersion()) { + if (!getCurrentRouteSegmentTrafficVersion() + .equals(other.getCurrentRouteSegmentTrafficVersion())) return false; + } + if (hasRemainingWaypointsRouteVersion() != other.hasRemainingWaypointsRouteVersion()) + return false; + if (hasRemainingWaypointsRouteVersion()) { + if (!getRemainingWaypointsRouteVersion().equals(other.getRemainingWaypointsRouteVersion())) + 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 (hasHeader()) { + hash = (37 * hash) + HEADER_FIELD_NUMBER; + hash = (53 * hash) + getHeader().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + if (hasCurrentRouteSegmentVersion()) { + hash = (37 * hash) + CURRENT_ROUTE_SEGMENT_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getCurrentRouteSegmentVersion().hashCode(); + } + if (hasRemainingWaypointsVersion()) { + hash = (37 * hash) + REMAINING_WAYPOINTS_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getRemainingWaypointsVersion().hashCode(); + } + hash = (37 * hash) + ROUTE_FORMAT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + routeFormatType_; + if (hasCurrentRouteSegmentTrafficVersion()) { + hash = (37 * hash) + CURRENT_ROUTE_SEGMENT_TRAFFIC_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getCurrentRouteSegmentTrafficVersion().hashCode(); + } + if (hasRemainingWaypointsRouteVersion()) { + hash = (37 * hash) + REMAINING_WAYPOINTS_ROUTE_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getRemainingWaypointsRouteVersion().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.fleetengine.v1.GetTripRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.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.fleetengine.v1.GetTripRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.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.fleetengine.v1.GetTripRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.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.fleetengine.v1.GetTripRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.GetTripRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.GetTripRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.GetTripRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.GetTripRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.GetTripRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.fleetengine.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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * GetTrip request message.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.v1.GetTripRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.v1.GetTripRequest) + com.google.maps.fleetengine.v1.GetTripRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.TripApi + .internal_static_maps_fleetengine_v1_GetTripRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.TripApi + .internal_static_maps_fleetengine_v1_GetTripRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.GetTripRequest.class, + com.google.maps.fleetengine.v1.GetTripRequest.Builder.class); + } + + // Construct using com.google.maps.fleetengine.v1.GetTripRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getHeaderFieldBuilder(); + getCurrentRouteSegmentVersionFieldBuilder(); + getRemainingWaypointsVersionFieldBuilder(); + getCurrentRouteSegmentTrafficVersionFieldBuilder(); + getRemainingWaypointsRouteVersionFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + name_ = ""; + view_ = 0; + currentRouteSegmentVersion_ = null; + if (currentRouteSegmentVersionBuilder_ != null) { + currentRouteSegmentVersionBuilder_.dispose(); + currentRouteSegmentVersionBuilder_ = null; + } + remainingWaypointsVersion_ = null; + if (remainingWaypointsVersionBuilder_ != null) { + remainingWaypointsVersionBuilder_.dispose(); + remainingWaypointsVersionBuilder_ = null; + } + routeFormatType_ = 0; + currentRouteSegmentTrafficVersion_ = null; + if (currentRouteSegmentTrafficVersionBuilder_ != null) { + currentRouteSegmentTrafficVersionBuilder_.dispose(); + currentRouteSegmentTrafficVersionBuilder_ = null; + } + remainingWaypointsRouteVersion_ = null; + if (remainingWaypointsRouteVersionBuilder_ != null) { + remainingWaypointsRouteVersionBuilder_.dispose(); + remainingWaypointsRouteVersionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.fleetengine.v1.TripApi + .internal_static_maps_fleetengine_v1_GetTripRequest_descriptor; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.GetTripRequest getDefaultInstanceForType() { + return com.google.maps.fleetengine.v1.GetTripRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.GetTripRequest build() { + com.google.maps.fleetengine.v1.GetTripRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.GetTripRequest buildPartial() { + com.google.maps.fleetengine.v1.GetTripRequest result = + new com.google.maps.fleetengine.v1.GetTripRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.fleetengine.v1.GetTripRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.header_ = headerBuilder_ == null ? header_ : headerBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.view_ = view_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.currentRouteSegmentVersion_ = + currentRouteSegmentVersionBuilder_ == null + ? currentRouteSegmentVersion_ + : currentRouteSegmentVersionBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.remainingWaypointsVersion_ = + remainingWaypointsVersionBuilder_ == null + ? remainingWaypointsVersion_ + : remainingWaypointsVersionBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.routeFormatType_ = routeFormatType_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.currentRouteSegmentTrafficVersion_ = + currentRouteSegmentTrafficVersionBuilder_ == null + ? currentRouteSegmentTrafficVersion_ + : currentRouteSegmentTrafficVersionBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.remainingWaypointsRouteVersion_ = + remainingWaypointsRouteVersionBuilder_ == null + ? remainingWaypointsRouteVersion_ + : remainingWaypointsRouteVersionBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.fleetengine.v1.GetTripRequest) { + return mergeFrom((com.google.maps.fleetengine.v1.GetTripRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.fleetengine.v1.GetTripRequest other) { + if (other == com.google.maps.fleetengine.v1.GetTripRequest.getDefaultInstance()) return this; + if (other.hasHeader()) { + mergeHeader(other.getHeader()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + if (other.hasCurrentRouteSegmentVersion()) { + mergeCurrentRouteSegmentVersion(other.getCurrentRouteSegmentVersion()); + } + if (other.hasRemainingWaypointsVersion()) { + mergeRemainingWaypointsVersion(other.getRemainingWaypointsVersion()); + } + if (other.routeFormatType_ != 0) { + setRouteFormatTypeValue(other.getRouteFormatTypeValue()); + } + if (other.hasCurrentRouteSegmentTrafficVersion()) { + mergeCurrentRouteSegmentTrafficVersion(other.getCurrentRouteSegmentTrafficVersion()); + } + if (other.hasRemainingWaypointsRouteVersion()) { + mergeRemainingWaypointsRouteVersion(other.getRemainingWaypointsRouteVersion()); + } + 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(getHeaderFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 50: + { + input.readMessage( + getCurrentRouteSegmentVersionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 50 + case 58: + { + input.readMessage( + getRemainingWaypointsVersionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 58 + case 64: + { + routeFormatType_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 64 + case 74: + { + input.readMessage( + getCurrentRouteSegmentTrafficVersionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 74 + case 82: + { + input.readMessage( + getRemainingWaypointsRouteVersionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 82 + case 88: + { + view_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 88 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.maps.fleetengine.v1.RequestHeader header_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.RequestHeader, + com.google.maps.fleetengine.v1.RequestHeader.Builder, + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder> + headerBuilder_; + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return Whether the header field is set. + */ + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return The header. + */ + public com.google.maps.fleetengine.v1.RequestHeader getHeader() { + if (headerBuilder_ == null) { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } else { + return headerBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public Builder setHeader(com.google.maps.fleetengine.v1.RequestHeader value) { + if (headerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + header_ = value; + } else { + headerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public Builder setHeader(com.google.maps.fleetengine.v1.RequestHeader.Builder builderForValue) { + if (headerBuilder_ == null) { + header_ = builderForValue.build(); + } else { + headerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public Builder mergeHeader(com.google.maps.fleetengine.v1.RequestHeader value) { + if (headerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && header_ != null + && header_ != com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance()) { + getHeaderBuilder().mergeFrom(value); + } else { + header_ = value; + } + } else { + headerBuilder_.mergeFrom(value); + } + if (header_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public Builder clearHeader() { + bitField0_ = (bitField0_ & ~0x00000001); + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public com.google.maps.fleetengine.v1.RequestHeader.Builder getHeaderBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getHeaderFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public com.google.maps.fleetengine.v1.RequestHeaderOrBuilder getHeaderOrBuilder() { + if (headerBuilder_ != null) { + return headerBuilder_.getMessageOrBuilder(); + } else { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.RequestHeader, + com.google.maps.fleetengine.v1.RequestHeader.Builder, + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder> + getHeaderFieldBuilder() { + if (headerBuilder_ == null) { + headerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.RequestHeader, + com.google.maps.fleetengine.v1.RequestHeader.Builder, + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder>( + getHeader(), getParentForChildren(), isClean()); + header_ = null; + } + return headerBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Must be in the format `providers/{provider}/trips/{trip}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * + * string name = 3 [(.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. Must be in the format `providers/{provider}/trips/{trip}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * + * string name = 3 [(.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. Must be in the format `providers/{provider}/trips/{trip}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * + * string name = 3 [(.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_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Must be in the format `providers/{provider}/trips/{trip}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * + * string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Must be in the format `providers/{provider}/trips/{trip}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * + * string name = 3 [(.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_ |= 0x00000002; + onChanged(); + return this; + } + + private int view_ = 0; + /** + * + * + *
+     * The subset of Trip fields that should be returned and their interpretation.
+     * 
+ * + * .maps.fleetengine.v1.TripView view = 11; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+     * The subset of Trip fields that should be returned and their interpretation.
+     * 
+ * + * .maps.fleetengine.v1.TripView view = 11; + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + view_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The subset of Trip fields that should be returned and their interpretation.
+     * 
+ * + * .maps.fleetengine.v1.TripView view = 11; + * + * @return The view. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TripView getView() { + com.google.maps.fleetengine.v1.TripView result = + com.google.maps.fleetengine.v1.TripView.forNumber(view_); + return result == null ? com.google.maps.fleetengine.v1.TripView.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The subset of Trip fields that should be returned and their interpretation.
+     * 
+ * + * .maps.fleetengine.v1.TripView view = 11; + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView(com.google.maps.fleetengine.v1.TripView value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + view_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The subset of Trip fields that should be returned and their interpretation.
+     * 
+ * + * .maps.fleetengine.v1.TripView view = 11; + * + * @return This builder for chaining. + */ + public Builder clearView() { + bitField0_ = (bitField0_ & ~0x00000004); + view_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp currentRouteSegmentVersion_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + currentRouteSegmentVersionBuilder_; + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which `Trip.route` or
+     * `Trip.current_route_segment` data are retrieved. If route data are
+     * unchanged since this timestamp, the route field is not set in the response.
+     * If a minimum is unspecified, the route data are always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp current_route_segment_version = 6; + * + * @return Whether the currentRouteSegmentVersion field is set. + */ + public boolean hasCurrentRouteSegmentVersion() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which `Trip.route` or
+     * `Trip.current_route_segment` data are retrieved. If route data are
+     * unchanged since this timestamp, the route field is not set in the response.
+     * If a minimum is unspecified, the route data are always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp current_route_segment_version = 6; + * + * @return The currentRouteSegmentVersion. + */ + public com.google.protobuf.Timestamp getCurrentRouteSegmentVersion() { + if (currentRouteSegmentVersionBuilder_ == null) { + return currentRouteSegmentVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : currentRouteSegmentVersion_; + } else { + return currentRouteSegmentVersionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which `Trip.route` or
+     * `Trip.current_route_segment` data are retrieved. If route data are
+     * unchanged since this timestamp, the route field is not set in the response.
+     * If a minimum is unspecified, the route data are always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp current_route_segment_version = 6; + */ + public Builder setCurrentRouteSegmentVersion(com.google.protobuf.Timestamp value) { + if (currentRouteSegmentVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + currentRouteSegmentVersion_ = value; + } else { + currentRouteSegmentVersionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which `Trip.route` or
+     * `Trip.current_route_segment` data are retrieved. If route data are
+     * unchanged since this timestamp, the route field is not set in the response.
+     * If a minimum is unspecified, the route data are always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp current_route_segment_version = 6; + */ + public Builder setCurrentRouteSegmentVersion( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (currentRouteSegmentVersionBuilder_ == null) { + currentRouteSegmentVersion_ = builderForValue.build(); + } else { + currentRouteSegmentVersionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which `Trip.route` or
+     * `Trip.current_route_segment` data are retrieved. If route data are
+     * unchanged since this timestamp, the route field is not set in the response.
+     * If a minimum is unspecified, the route data are always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp current_route_segment_version = 6; + */ + public Builder mergeCurrentRouteSegmentVersion(com.google.protobuf.Timestamp value) { + if (currentRouteSegmentVersionBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && currentRouteSegmentVersion_ != null + && currentRouteSegmentVersion_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCurrentRouteSegmentVersionBuilder().mergeFrom(value); + } else { + currentRouteSegmentVersion_ = value; + } + } else { + currentRouteSegmentVersionBuilder_.mergeFrom(value); + } + if (currentRouteSegmentVersion_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which `Trip.route` or
+     * `Trip.current_route_segment` data are retrieved. If route data are
+     * unchanged since this timestamp, the route field is not set in the response.
+     * If a minimum is unspecified, the route data are always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp current_route_segment_version = 6; + */ + public Builder clearCurrentRouteSegmentVersion() { + bitField0_ = (bitField0_ & ~0x00000008); + currentRouteSegmentVersion_ = null; + if (currentRouteSegmentVersionBuilder_ != null) { + currentRouteSegmentVersionBuilder_.dispose(); + currentRouteSegmentVersionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which `Trip.route` or
+     * `Trip.current_route_segment` data are retrieved. If route data are
+     * unchanged since this timestamp, the route field is not set in the response.
+     * If a minimum is unspecified, the route data are always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp current_route_segment_version = 6; + */ + public com.google.protobuf.Timestamp.Builder getCurrentRouteSegmentVersionBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getCurrentRouteSegmentVersionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which `Trip.route` or
+     * `Trip.current_route_segment` data are retrieved. If route data are
+     * unchanged since this timestamp, the route field is not set in the response.
+     * If a minimum is unspecified, the route data are always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp current_route_segment_version = 6; + */ + public com.google.protobuf.TimestampOrBuilder getCurrentRouteSegmentVersionOrBuilder() { + if (currentRouteSegmentVersionBuilder_ != null) { + return currentRouteSegmentVersionBuilder_.getMessageOrBuilder(); + } else { + return currentRouteSegmentVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : currentRouteSegmentVersion_; + } + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which `Trip.route` or
+     * `Trip.current_route_segment` data are retrieved. If route data are
+     * unchanged since this timestamp, the route field is not set in the response.
+     * If a minimum is unspecified, the route data are always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp current_route_segment_version = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCurrentRouteSegmentVersionFieldBuilder() { + if (currentRouteSegmentVersionBuilder_ == null) { + currentRouteSegmentVersionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCurrentRouteSegmentVersion(), getParentForChildren(), isClean()); + currentRouteSegmentVersion_ = null; + } + return currentRouteSegmentVersionBuilder_; + } + + private com.google.protobuf.Timestamp remainingWaypointsVersion_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + remainingWaypointsVersionBuilder_; + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which
+     * `Trip.remaining_waypoints` are retrieved. If they are unchanged since this
+     * timestamp, the `remaining_waypoints` are not set in the response. If this
+     * field is unspecified, `remaining_waypoints` is always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp remaining_waypoints_version = 7; + * + * @return Whether the remainingWaypointsVersion field is set. + */ + public boolean hasRemainingWaypointsVersion() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which
+     * `Trip.remaining_waypoints` are retrieved. If they are unchanged since this
+     * timestamp, the `remaining_waypoints` are not set in the response. If this
+     * field is unspecified, `remaining_waypoints` is always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp remaining_waypoints_version = 7; + * + * @return The remainingWaypointsVersion. + */ + public com.google.protobuf.Timestamp getRemainingWaypointsVersion() { + if (remainingWaypointsVersionBuilder_ == null) { + return remainingWaypointsVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : remainingWaypointsVersion_; + } else { + return remainingWaypointsVersionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which
+     * `Trip.remaining_waypoints` are retrieved. If they are unchanged since this
+     * timestamp, the `remaining_waypoints` are not set in the response. If this
+     * field is unspecified, `remaining_waypoints` is always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp remaining_waypoints_version = 7; + */ + public Builder setRemainingWaypointsVersion(com.google.protobuf.Timestamp value) { + if (remainingWaypointsVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + remainingWaypointsVersion_ = value; + } else { + remainingWaypointsVersionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which
+     * `Trip.remaining_waypoints` are retrieved. If they are unchanged since this
+     * timestamp, the `remaining_waypoints` are not set in the response. If this
+     * field is unspecified, `remaining_waypoints` is always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp remaining_waypoints_version = 7; + */ + public Builder setRemainingWaypointsVersion( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (remainingWaypointsVersionBuilder_ == null) { + remainingWaypointsVersion_ = builderForValue.build(); + } else { + remainingWaypointsVersionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which
+     * `Trip.remaining_waypoints` are retrieved. If they are unchanged since this
+     * timestamp, the `remaining_waypoints` are not set in the response. If this
+     * field is unspecified, `remaining_waypoints` is always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp remaining_waypoints_version = 7; + */ + public Builder mergeRemainingWaypointsVersion(com.google.protobuf.Timestamp value) { + if (remainingWaypointsVersionBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && remainingWaypointsVersion_ != null + && remainingWaypointsVersion_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getRemainingWaypointsVersionBuilder().mergeFrom(value); + } else { + remainingWaypointsVersion_ = value; + } + } else { + remainingWaypointsVersionBuilder_.mergeFrom(value); + } + if (remainingWaypointsVersion_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which
+     * `Trip.remaining_waypoints` are retrieved. If they are unchanged since this
+     * timestamp, the `remaining_waypoints` are not set in the response. If this
+     * field is unspecified, `remaining_waypoints` is always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp remaining_waypoints_version = 7; + */ + public Builder clearRemainingWaypointsVersion() { + bitField0_ = (bitField0_ & ~0x00000010); + remainingWaypointsVersion_ = null; + if (remainingWaypointsVersionBuilder_ != null) { + remainingWaypointsVersionBuilder_.dispose(); + remainingWaypointsVersionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which
+     * `Trip.remaining_waypoints` are retrieved. If they are unchanged since this
+     * timestamp, the `remaining_waypoints` are not set in the response. If this
+     * field is unspecified, `remaining_waypoints` is always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp remaining_waypoints_version = 7; + */ + public com.google.protobuf.Timestamp.Builder getRemainingWaypointsVersionBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getRemainingWaypointsVersionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which
+     * `Trip.remaining_waypoints` are retrieved. If they are unchanged since this
+     * timestamp, the `remaining_waypoints` are not set in the response. If this
+     * field is unspecified, `remaining_waypoints` is always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp remaining_waypoints_version = 7; + */ + public com.google.protobuf.TimestampOrBuilder getRemainingWaypointsVersionOrBuilder() { + if (remainingWaypointsVersionBuilder_ != null) { + return remainingWaypointsVersionBuilder_.getMessageOrBuilder(); + } else { + return remainingWaypointsVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : remainingWaypointsVersion_; + } + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which
+     * `Trip.remaining_waypoints` are retrieved. If they are unchanged since this
+     * timestamp, the `remaining_waypoints` are not set in the response. If this
+     * field is unspecified, `remaining_waypoints` is always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp remaining_waypoints_version = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getRemainingWaypointsVersionFieldBuilder() { + if (remainingWaypointsVersionBuilder_ == null) { + remainingWaypointsVersionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getRemainingWaypointsVersion(), getParentForChildren(), isClean()); + remainingWaypointsVersion_ = null; + } + return remainingWaypointsVersionBuilder_; + } + + private int routeFormatType_ = 0; + /** + * + * + *
+     * The returned current route format, `LAT_LNG_LIST_TYPE` (in `Trip.route`),
+     * or `ENCODED_POLYLINE_TYPE` (in `Trip.current_route_segment`). The default
+     * is `LAT_LNG_LIST_TYPE`.
+     * 
+ * + * .maps.fleetengine.v1.PolylineFormatType route_format_type = 8; + * + * @return The enum numeric value on the wire for routeFormatType. + */ + @java.lang.Override + public int getRouteFormatTypeValue() { + return routeFormatType_; + } + /** + * + * + *
+     * The returned current route format, `LAT_LNG_LIST_TYPE` (in `Trip.route`),
+     * or `ENCODED_POLYLINE_TYPE` (in `Trip.current_route_segment`). The default
+     * is `LAT_LNG_LIST_TYPE`.
+     * 
+ * + * .maps.fleetengine.v1.PolylineFormatType route_format_type = 8; + * + * @param value The enum numeric value on the wire for routeFormatType to set. + * @return This builder for chaining. + */ + public Builder setRouteFormatTypeValue(int value) { + routeFormatType_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The returned current route format, `LAT_LNG_LIST_TYPE` (in `Trip.route`),
+     * or `ENCODED_POLYLINE_TYPE` (in `Trip.current_route_segment`). The default
+     * is `LAT_LNG_LIST_TYPE`.
+     * 
+ * + * .maps.fleetengine.v1.PolylineFormatType route_format_type = 8; + * + * @return The routeFormatType. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.PolylineFormatType getRouteFormatType() { + com.google.maps.fleetengine.v1.PolylineFormatType result = + com.google.maps.fleetengine.v1.PolylineFormatType.forNumber(routeFormatType_); + return result == null + ? com.google.maps.fleetengine.v1.PolylineFormatType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The returned current route format, `LAT_LNG_LIST_TYPE` (in `Trip.route`),
+     * or `ENCODED_POLYLINE_TYPE` (in `Trip.current_route_segment`). The default
+     * is `LAT_LNG_LIST_TYPE`.
+     * 
+ * + * .maps.fleetengine.v1.PolylineFormatType route_format_type = 8; + * + * @param value The routeFormatType to set. + * @return This builder for chaining. + */ + public Builder setRouteFormatType(com.google.maps.fleetengine.v1.PolylineFormatType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + routeFormatType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The returned current route format, `LAT_LNG_LIST_TYPE` (in `Trip.route`),
+     * or `ENCODED_POLYLINE_TYPE` (in `Trip.current_route_segment`). The default
+     * is `LAT_LNG_LIST_TYPE`.
+     * 
+ * + * .maps.fleetengine.v1.PolylineFormatType route_format_type = 8; + * + * @return This builder for chaining. + */ + public Builder clearRouteFormatType() { + bitField0_ = (bitField0_ & ~0x00000020); + routeFormatType_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp currentRouteSegmentTrafficVersion_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + currentRouteSegmentTrafficVersionBuilder_; + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which
+     * `Trip.current_route_segment_traffic` is retrieved. If traffic data are
+     * unchanged since this timestamp, the `current_route_segment_traffic` field
+     * is not set in the response. If a minimum is unspecified, the traffic data
+     * are always retrieved. Note that traffic is only available for On-Demand
+     * Rides and Deliveries Solution customers.
+     * 
+ * + * .google.protobuf.Timestamp current_route_segment_traffic_version = 9; + * + * @return Whether the currentRouteSegmentTrafficVersion field is set. + */ + public boolean hasCurrentRouteSegmentTrafficVersion() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which
+     * `Trip.current_route_segment_traffic` is retrieved. If traffic data are
+     * unchanged since this timestamp, the `current_route_segment_traffic` field
+     * is not set in the response. If a minimum is unspecified, the traffic data
+     * are always retrieved. Note that traffic is only available for On-Demand
+     * Rides and Deliveries Solution customers.
+     * 
+ * + * .google.protobuf.Timestamp current_route_segment_traffic_version = 9; + * + * @return The currentRouteSegmentTrafficVersion. + */ + public com.google.protobuf.Timestamp getCurrentRouteSegmentTrafficVersion() { + if (currentRouteSegmentTrafficVersionBuilder_ == null) { + return currentRouteSegmentTrafficVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : currentRouteSegmentTrafficVersion_; + } else { + return currentRouteSegmentTrafficVersionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which
+     * `Trip.current_route_segment_traffic` is retrieved. If traffic data are
+     * unchanged since this timestamp, the `current_route_segment_traffic` field
+     * is not set in the response. If a minimum is unspecified, the traffic data
+     * are always retrieved. Note that traffic is only available for On-Demand
+     * Rides and Deliveries Solution customers.
+     * 
+ * + * .google.protobuf.Timestamp current_route_segment_traffic_version = 9; + */ + public Builder setCurrentRouteSegmentTrafficVersion(com.google.protobuf.Timestamp value) { + if (currentRouteSegmentTrafficVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + currentRouteSegmentTrafficVersion_ = value; + } else { + currentRouteSegmentTrafficVersionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which
+     * `Trip.current_route_segment_traffic` is retrieved. If traffic data are
+     * unchanged since this timestamp, the `current_route_segment_traffic` field
+     * is not set in the response. If a minimum is unspecified, the traffic data
+     * are always retrieved. Note that traffic is only available for On-Demand
+     * Rides and Deliveries Solution customers.
+     * 
+ * + * .google.protobuf.Timestamp current_route_segment_traffic_version = 9; + */ + public Builder setCurrentRouteSegmentTrafficVersion( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (currentRouteSegmentTrafficVersionBuilder_ == null) { + currentRouteSegmentTrafficVersion_ = builderForValue.build(); + } else { + currentRouteSegmentTrafficVersionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which
+     * `Trip.current_route_segment_traffic` is retrieved. If traffic data are
+     * unchanged since this timestamp, the `current_route_segment_traffic` field
+     * is not set in the response. If a minimum is unspecified, the traffic data
+     * are always retrieved. Note that traffic is only available for On-Demand
+     * Rides and Deliveries Solution customers.
+     * 
+ * + * .google.protobuf.Timestamp current_route_segment_traffic_version = 9; + */ + public Builder mergeCurrentRouteSegmentTrafficVersion(com.google.protobuf.Timestamp value) { + if (currentRouteSegmentTrafficVersionBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && currentRouteSegmentTrafficVersion_ != null + && currentRouteSegmentTrafficVersion_ + != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCurrentRouteSegmentTrafficVersionBuilder().mergeFrom(value); + } else { + currentRouteSegmentTrafficVersion_ = value; + } + } else { + currentRouteSegmentTrafficVersionBuilder_.mergeFrom(value); + } + if (currentRouteSegmentTrafficVersion_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which
+     * `Trip.current_route_segment_traffic` is retrieved. If traffic data are
+     * unchanged since this timestamp, the `current_route_segment_traffic` field
+     * is not set in the response. If a minimum is unspecified, the traffic data
+     * are always retrieved. Note that traffic is only available for On-Demand
+     * Rides and Deliveries Solution customers.
+     * 
+ * + * .google.protobuf.Timestamp current_route_segment_traffic_version = 9; + */ + public Builder clearCurrentRouteSegmentTrafficVersion() { + bitField0_ = (bitField0_ & ~0x00000040); + currentRouteSegmentTrafficVersion_ = null; + if (currentRouteSegmentTrafficVersionBuilder_ != null) { + currentRouteSegmentTrafficVersionBuilder_.dispose(); + currentRouteSegmentTrafficVersionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which
+     * `Trip.current_route_segment_traffic` is retrieved. If traffic data are
+     * unchanged since this timestamp, the `current_route_segment_traffic` field
+     * is not set in the response. If a minimum is unspecified, the traffic data
+     * are always retrieved. Note that traffic is only available for On-Demand
+     * Rides and Deliveries Solution customers.
+     * 
+ * + * .google.protobuf.Timestamp current_route_segment_traffic_version = 9; + */ + public com.google.protobuf.Timestamp.Builder getCurrentRouteSegmentTrafficVersionBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getCurrentRouteSegmentTrafficVersionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which
+     * `Trip.current_route_segment_traffic` is retrieved. If traffic data are
+     * unchanged since this timestamp, the `current_route_segment_traffic` field
+     * is not set in the response. If a minimum is unspecified, the traffic data
+     * are always retrieved. Note that traffic is only available for On-Demand
+     * Rides and Deliveries Solution customers.
+     * 
+ * + * .google.protobuf.Timestamp current_route_segment_traffic_version = 9; + */ + public com.google.protobuf.TimestampOrBuilder getCurrentRouteSegmentTrafficVersionOrBuilder() { + if (currentRouteSegmentTrafficVersionBuilder_ != null) { + return currentRouteSegmentTrafficVersionBuilder_.getMessageOrBuilder(); + } else { + return currentRouteSegmentTrafficVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : currentRouteSegmentTrafficVersion_; + } + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which
+     * `Trip.current_route_segment_traffic` is retrieved. If traffic data are
+     * unchanged since this timestamp, the `current_route_segment_traffic` field
+     * is not set in the response. If a minimum is unspecified, the traffic data
+     * are always retrieved. Note that traffic is only available for On-Demand
+     * Rides and Deliveries Solution customers.
+     * 
+ * + * .google.protobuf.Timestamp current_route_segment_traffic_version = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCurrentRouteSegmentTrafficVersionFieldBuilder() { + if (currentRouteSegmentTrafficVersionBuilder_ == null) { + currentRouteSegmentTrafficVersionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCurrentRouteSegmentTrafficVersion(), getParentForChildren(), isClean()); + currentRouteSegmentTrafficVersion_ = null; + } + return currentRouteSegmentTrafficVersionBuilder_; + } + + private com.google.protobuf.Timestamp remainingWaypointsRouteVersion_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + remainingWaypointsRouteVersionBuilder_; + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which
+     * `Trip.remaining_waypoints.traffic_to_waypoint` and
+     * `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. If data are
+     * unchanged since this timestamp, the fields above are
+     * not set in the response. If `remaining_waypoints_route_version` is
+     * unspecified, traffic and path are always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp remaining_waypoints_route_version = 10; + * + * @return Whether the remainingWaypointsRouteVersion field is set. + */ + public boolean hasRemainingWaypointsRouteVersion() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which
+     * `Trip.remaining_waypoints.traffic_to_waypoint` and
+     * `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. If data are
+     * unchanged since this timestamp, the fields above are
+     * not set in the response. If `remaining_waypoints_route_version` is
+     * unspecified, traffic and path are always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp remaining_waypoints_route_version = 10; + * + * @return The remainingWaypointsRouteVersion. + */ + public com.google.protobuf.Timestamp getRemainingWaypointsRouteVersion() { + if (remainingWaypointsRouteVersionBuilder_ == null) { + return remainingWaypointsRouteVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : remainingWaypointsRouteVersion_; + } else { + return remainingWaypointsRouteVersionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which
+     * `Trip.remaining_waypoints.traffic_to_waypoint` and
+     * `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. If data are
+     * unchanged since this timestamp, the fields above are
+     * not set in the response. If `remaining_waypoints_route_version` is
+     * unspecified, traffic and path are always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp remaining_waypoints_route_version = 10; + */ + public Builder setRemainingWaypointsRouteVersion(com.google.protobuf.Timestamp value) { + if (remainingWaypointsRouteVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + remainingWaypointsRouteVersion_ = value; + } else { + remainingWaypointsRouteVersionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which
+     * `Trip.remaining_waypoints.traffic_to_waypoint` and
+     * `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. If data are
+     * unchanged since this timestamp, the fields above are
+     * not set in the response. If `remaining_waypoints_route_version` is
+     * unspecified, traffic and path are always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp remaining_waypoints_route_version = 10; + */ + public Builder setRemainingWaypointsRouteVersion( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (remainingWaypointsRouteVersionBuilder_ == null) { + remainingWaypointsRouteVersion_ = builderForValue.build(); + } else { + remainingWaypointsRouteVersionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which
+     * `Trip.remaining_waypoints.traffic_to_waypoint` and
+     * `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. If data are
+     * unchanged since this timestamp, the fields above are
+     * not set in the response. If `remaining_waypoints_route_version` is
+     * unspecified, traffic and path are always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp remaining_waypoints_route_version = 10; + */ + public Builder mergeRemainingWaypointsRouteVersion(com.google.protobuf.Timestamp value) { + if (remainingWaypointsRouteVersionBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && remainingWaypointsRouteVersion_ != null + && remainingWaypointsRouteVersion_ + != com.google.protobuf.Timestamp.getDefaultInstance()) { + getRemainingWaypointsRouteVersionBuilder().mergeFrom(value); + } else { + remainingWaypointsRouteVersion_ = value; + } + } else { + remainingWaypointsRouteVersionBuilder_.mergeFrom(value); + } + if (remainingWaypointsRouteVersion_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which
+     * `Trip.remaining_waypoints.traffic_to_waypoint` and
+     * `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. If data are
+     * unchanged since this timestamp, the fields above are
+     * not set in the response. If `remaining_waypoints_route_version` is
+     * unspecified, traffic and path are always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp remaining_waypoints_route_version = 10; + */ + public Builder clearRemainingWaypointsRouteVersion() { + bitField0_ = (bitField0_ & ~0x00000080); + remainingWaypointsRouteVersion_ = null; + if (remainingWaypointsRouteVersionBuilder_ != null) { + remainingWaypointsRouteVersionBuilder_.dispose(); + remainingWaypointsRouteVersionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which
+     * `Trip.remaining_waypoints.traffic_to_waypoint` and
+     * `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. If data are
+     * unchanged since this timestamp, the fields above are
+     * not set in the response. If `remaining_waypoints_route_version` is
+     * unspecified, traffic and path are always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp remaining_waypoints_route_version = 10; + */ + public com.google.protobuf.Timestamp.Builder getRemainingWaypointsRouteVersionBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getRemainingWaypointsRouteVersionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which
+     * `Trip.remaining_waypoints.traffic_to_waypoint` and
+     * `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. If data are
+     * unchanged since this timestamp, the fields above are
+     * not set in the response. If `remaining_waypoints_route_version` is
+     * unspecified, traffic and path are always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp remaining_waypoints_route_version = 10; + */ + public com.google.protobuf.TimestampOrBuilder getRemainingWaypointsRouteVersionOrBuilder() { + if (remainingWaypointsRouteVersionBuilder_ != null) { + return remainingWaypointsRouteVersionBuilder_.getMessageOrBuilder(); + } else { + return remainingWaypointsRouteVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : remainingWaypointsRouteVersion_; + } + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which
+     * `Trip.remaining_waypoints.traffic_to_waypoint` and
+     * `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. If data are
+     * unchanged since this timestamp, the fields above are
+     * not set in the response. If `remaining_waypoints_route_version` is
+     * unspecified, traffic and path are always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp remaining_waypoints_route_version = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getRemainingWaypointsRouteVersionFieldBuilder() { + if (remainingWaypointsRouteVersionBuilder_ == null) { + remainingWaypointsRouteVersionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getRemainingWaypointsRouteVersion(), getParentForChildren(), isClean()); + remainingWaypointsRouteVersion_ = null; + } + return remainingWaypointsRouteVersionBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:maps.fleetengine.v1.GetTripRequest) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.v1.GetTripRequest) + private static final com.google.maps.fleetengine.v1.GetTripRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.fleetengine.v1.GetTripRequest(); + } + + public static com.google.maps.fleetengine.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.fleetengine.v1.GetTripRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/GetTripRequestOrBuilder.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/GetTripRequestOrBuilder.java new file mode 100644 index 000000000000..daa7cbccc027 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/GetTripRequestOrBuilder.java @@ -0,0 +1,338 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/trip_api.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public interface GetTripRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.v1.GetTripRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return Whether the header field is set. + */ + boolean hasHeader(); + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return The header. + */ + com.google.maps.fleetengine.v1.RequestHeader getHeader(); + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder getHeaderOrBuilder(); + + /** + * + * + *
+   * Required. Must be in the format `providers/{provider}/trips/{trip}`.
+   * The provider must be the Project ID (for example, `sample-cloud-project`)
+   * of the Google Cloud Project of which the service account making
+   * this call is a member.
+   * 
+ * + * + * string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Must be in the format `providers/{provider}/trips/{trip}`.
+   * The provider must be the Project ID (for example, `sample-cloud-project`)
+   * of the Google Cloud Project of which the service account making
+   * this call is a member.
+   * 
+ * + * + * string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The subset of Trip fields that should be returned and their interpretation.
+   * 
+ * + * .maps.fleetengine.v1.TripView view = 11; + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + /** + * + * + *
+   * The subset of Trip fields that should be returned and their interpretation.
+   * 
+ * + * .maps.fleetengine.v1.TripView view = 11; + * + * @return The view. + */ + com.google.maps.fleetengine.v1.TripView getView(); + + /** + * + * + *
+   * Indicates the minimum timestamp (exclusive) for which `Trip.route` or
+   * `Trip.current_route_segment` data are retrieved. If route data are
+   * unchanged since this timestamp, the route field is not set in the response.
+   * If a minimum is unspecified, the route data are always retrieved.
+   * 
+ * + * .google.protobuf.Timestamp current_route_segment_version = 6; + * + * @return Whether the currentRouteSegmentVersion field is set. + */ + boolean hasCurrentRouteSegmentVersion(); + /** + * + * + *
+   * Indicates the minimum timestamp (exclusive) for which `Trip.route` or
+   * `Trip.current_route_segment` data are retrieved. If route data are
+   * unchanged since this timestamp, the route field is not set in the response.
+   * If a minimum is unspecified, the route data are always retrieved.
+   * 
+ * + * .google.protobuf.Timestamp current_route_segment_version = 6; + * + * @return The currentRouteSegmentVersion. + */ + com.google.protobuf.Timestamp getCurrentRouteSegmentVersion(); + /** + * + * + *
+   * Indicates the minimum timestamp (exclusive) for which `Trip.route` or
+   * `Trip.current_route_segment` data are retrieved. If route data are
+   * unchanged since this timestamp, the route field is not set in the response.
+   * If a minimum is unspecified, the route data are always retrieved.
+   * 
+ * + * .google.protobuf.Timestamp current_route_segment_version = 6; + */ + com.google.protobuf.TimestampOrBuilder getCurrentRouteSegmentVersionOrBuilder(); + + /** + * + * + *
+   * Indicates the minimum timestamp (exclusive) for which
+   * `Trip.remaining_waypoints` are retrieved. If they are unchanged since this
+   * timestamp, the `remaining_waypoints` are not set in the response. If this
+   * field is unspecified, `remaining_waypoints` is always retrieved.
+   * 
+ * + * .google.protobuf.Timestamp remaining_waypoints_version = 7; + * + * @return Whether the remainingWaypointsVersion field is set. + */ + boolean hasRemainingWaypointsVersion(); + /** + * + * + *
+   * Indicates the minimum timestamp (exclusive) for which
+   * `Trip.remaining_waypoints` are retrieved. If they are unchanged since this
+   * timestamp, the `remaining_waypoints` are not set in the response. If this
+   * field is unspecified, `remaining_waypoints` is always retrieved.
+   * 
+ * + * .google.protobuf.Timestamp remaining_waypoints_version = 7; + * + * @return The remainingWaypointsVersion. + */ + com.google.protobuf.Timestamp getRemainingWaypointsVersion(); + /** + * + * + *
+   * Indicates the minimum timestamp (exclusive) for which
+   * `Trip.remaining_waypoints` are retrieved. If they are unchanged since this
+   * timestamp, the `remaining_waypoints` are not set in the response. If this
+   * field is unspecified, `remaining_waypoints` is always retrieved.
+   * 
+ * + * .google.protobuf.Timestamp remaining_waypoints_version = 7; + */ + com.google.protobuf.TimestampOrBuilder getRemainingWaypointsVersionOrBuilder(); + + /** + * + * + *
+   * The returned current route format, `LAT_LNG_LIST_TYPE` (in `Trip.route`),
+   * or `ENCODED_POLYLINE_TYPE` (in `Trip.current_route_segment`). The default
+   * is `LAT_LNG_LIST_TYPE`.
+   * 
+ * + * .maps.fleetengine.v1.PolylineFormatType route_format_type = 8; + * + * @return The enum numeric value on the wire for routeFormatType. + */ + int getRouteFormatTypeValue(); + /** + * + * + *
+   * The returned current route format, `LAT_LNG_LIST_TYPE` (in `Trip.route`),
+   * or `ENCODED_POLYLINE_TYPE` (in `Trip.current_route_segment`). The default
+   * is `LAT_LNG_LIST_TYPE`.
+   * 
+ * + * .maps.fleetengine.v1.PolylineFormatType route_format_type = 8; + * + * @return The routeFormatType. + */ + com.google.maps.fleetengine.v1.PolylineFormatType getRouteFormatType(); + + /** + * + * + *
+   * Indicates the minimum timestamp (exclusive) for which
+   * `Trip.current_route_segment_traffic` is retrieved. If traffic data are
+   * unchanged since this timestamp, the `current_route_segment_traffic` field
+   * is not set in the response. If a minimum is unspecified, the traffic data
+   * are always retrieved. Note that traffic is only available for On-Demand
+   * Rides and Deliveries Solution customers.
+   * 
+ * + * .google.protobuf.Timestamp current_route_segment_traffic_version = 9; + * + * @return Whether the currentRouteSegmentTrafficVersion field is set. + */ + boolean hasCurrentRouteSegmentTrafficVersion(); + /** + * + * + *
+   * Indicates the minimum timestamp (exclusive) for which
+   * `Trip.current_route_segment_traffic` is retrieved. If traffic data are
+   * unchanged since this timestamp, the `current_route_segment_traffic` field
+   * is not set in the response. If a minimum is unspecified, the traffic data
+   * are always retrieved. Note that traffic is only available for On-Demand
+   * Rides and Deliveries Solution customers.
+   * 
+ * + * .google.protobuf.Timestamp current_route_segment_traffic_version = 9; + * + * @return The currentRouteSegmentTrafficVersion. + */ + com.google.protobuf.Timestamp getCurrentRouteSegmentTrafficVersion(); + /** + * + * + *
+   * Indicates the minimum timestamp (exclusive) for which
+   * `Trip.current_route_segment_traffic` is retrieved. If traffic data are
+   * unchanged since this timestamp, the `current_route_segment_traffic` field
+   * is not set in the response. If a minimum is unspecified, the traffic data
+   * are always retrieved. Note that traffic is only available for On-Demand
+   * Rides and Deliveries Solution customers.
+   * 
+ * + * .google.protobuf.Timestamp current_route_segment_traffic_version = 9; + */ + com.google.protobuf.TimestampOrBuilder getCurrentRouteSegmentTrafficVersionOrBuilder(); + + /** + * + * + *
+   * Indicates the minimum timestamp (exclusive) for which
+   * `Trip.remaining_waypoints.traffic_to_waypoint` and
+   * `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. If data are
+   * unchanged since this timestamp, the fields above are
+   * not set in the response. If `remaining_waypoints_route_version` is
+   * unspecified, traffic and path are always retrieved.
+   * 
+ * + * .google.protobuf.Timestamp remaining_waypoints_route_version = 10; + * + * @return Whether the remainingWaypointsRouteVersion field is set. + */ + boolean hasRemainingWaypointsRouteVersion(); + /** + * + * + *
+   * Indicates the minimum timestamp (exclusive) for which
+   * `Trip.remaining_waypoints.traffic_to_waypoint` and
+   * `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. If data are
+   * unchanged since this timestamp, the fields above are
+   * not set in the response. If `remaining_waypoints_route_version` is
+   * unspecified, traffic and path are always retrieved.
+   * 
+ * + * .google.protobuf.Timestamp remaining_waypoints_route_version = 10; + * + * @return The remainingWaypointsRouteVersion. + */ + com.google.protobuf.Timestamp getRemainingWaypointsRouteVersion(); + /** + * + * + *
+   * Indicates the minimum timestamp (exclusive) for which
+   * `Trip.remaining_waypoints.traffic_to_waypoint` and
+   * `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. If data are
+   * unchanged since this timestamp, the fields above are
+   * not set in the response. If `remaining_waypoints_route_version` is
+   * unspecified, traffic and path are always retrieved.
+   * 
+ * + * .google.protobuf.Timestamp remaining_waypoints_route_version = 10; + */ + com.google.protobuf.TimestampOrBuilder getRemainingWaypointsRouteVersionOrBuilder(); +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/GetVehicleRequest.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/GetVehicleRequest.java new file mode 100644 index 000000000000..f08f1e855a51 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/GetVehicleRequest.java @@ -0,0 +1,1576 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicle_api.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * `GetVehicle` request message.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.v1.GetVehicleRequest} + */ +public final class GetVehicleRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.v1.GetVehicleRequest) + GetVehicleRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetVehicleRequest.newBuilder() to construct. + private GetVehicleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetVehicleRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetVehicleRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_GetVehicleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_GetVehicleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.GetVehicleRequest.class, + com.google.maps.fleetengine.v1.GetVehicleRequest.Builder.class); + } + + private int bitField0_; + public static final int HEADER_FIELD_NUMBER = 1; + private com.google.maps.fleetengine.v1.RequestHeader header_; + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return Whether the header field is set. + */ + @java.lang.Override + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return The header. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.RequestHeader getHeader() { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.RequestHeaderOrBuilder getHeaderOrBuilder() { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } + + public static final int NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Must be in the format
+   * `providers/{provider}/vehicles/{vehicle}`.
+   * The provider must be the Project ID (for example, `sample-cloud-project`)
+   * of the Google Cloud Project of which the service account making
+   * this call is a member.
+   * 
+ * + * + * string name = 3 [(.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. Must be in the format
+   * `providers/{provider}/vehicles/{vehicle}`.
+   * The provider must be the Project ID (for example, `sample-cloud-project`)
+   * of the Google Cloud Project of which the service account making
+   * this call is a member.
+   * 
+ * + * + * string name = 3 [(.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; + } + } + + public static final int CURRENT_ROUTE_SEGMENT_VERSION_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp currentRouteSegmentVersion_; + /** + * + * + *
+   * Indicates the minimum timestamp (exclusive) for which
+   * `Vehicle.current_route_segment` is retrieved.
+   * If the route is unchanged since this timestamp, the `current_route_segment`
+   * field is not set in the response. If a minimum is unspecified, the
+   * `current_route_segment` is always retrieved.
+   * 
+ * + * .google.protobuf.Timestamp current_route_segment_version = 4; + * + * @return Whether the currentRouteSegmentVersion field is set. + */ + @java.lang.Override + public boolean hasCurrentRouteSegmentVersion() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Indicates the minimum timestamp (exclusive) for which
+   * `Vehicle.current_route_segment` is retrieved.
+   * If the route is unchanged since this timestamp, the `current_route_segment`
+   * field is not set in the response. If a minimum is unspecified, the
+   * `current_route_segment` is always retrieved.
+   * 
+ * + * .google.protobuf.Timestamp current_route_segment_version = 4; + * + * @return The currentRouteSegmentVersion. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCurrentRouteSegmentVersion() { + return currentRouteSegmentVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : currentRouteSegmentVersion_; + } + /** + * + * + *
+   * Indicates the minimum timestamp (exclusive) for which
+   * `Vehicle.current_route_segment` is retrieved.
+   * If the route is unchanged since this timestamp, the `current_route_segment`
+   * field is not set in the response. If a minimum is unspecified, the
+   * `current_route_segment` is always retrieved.
+   * 
+ * + * .google.protobuf.Timestamp current_route_segment_version = 4; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCurrentRouteSegmentVersionOrBuilder() { + return currentRouteSegmentVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : currentRouteSegmentVersion_; + } + + public static final int WAYPOINTS_VERSION_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp waypointsVersion_; + /** + * + * + *
+   * Indicates the minimum timestamp (exclusive) for which `Vehicle.waypoints`
+   * data is retrieved. If the waypoints are unchanged since this timestamp, the
+   * `vehicle.waypoints` data is not set in the response. If this field is
+   * unspecified, `vehicle.waypoints` is always retrieved.
+   * 
+ * + * .google.protobuf.Timestamp waypoints_version = 5; + * + * @return Whether the waypointsVersion field is set. + */ + @java.lang.Override + public boolean hasWaypointsVersion() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Indicates the minimum timestamp (exclusive) for which `Vehicle.waypoints`
+   * data is retrieved. If the waypoints are unchanged since this timestamp, the
+   * `vehicle.waypoints` data is not set in the response. If this field is
+   * unspecified, `vehicle.waypoints` is always retrieved.
+   * 
+ * + * .google.protobuf.Timestamp waypoints_version = 5; + * + * @return The waypointsVersion. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getWaypointsVersion() { + return waypointsVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : waypointsVersion_; + } + /** + * + * + *
+   * Indicates the minimum timestamp (exclusive) for which `Vehicle.waypoints`
+   * data is retrieved. If the waypoints are unchanged since this timestamp, the
+   * `vehicle.waypoints` data is not set in the response. If this field is
+   * unspecified, `vehicle.waypoints` is always retrieved.
+   * 
+ * + * .google.protobuf.Timestamp waypoints_version = 5; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getWaypointsVersionOrBuilder() { + return waypointsVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : waypointsVersion_; + } + + 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, getHeader()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getCurrentRouteSegmentVersion()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(5, getWaypointsVersion()); + } + 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, getHeader()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, getCurrentRouteSegmentVersion()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getWaypointsVersion()); + } + 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.fleetengine.v1.GetVehicleRequest)) { + return super.equals(obj); + } + com.google.maps.fleetengine.v1.GetVehicleRequest other = + (com.google.maps.fleetengine.v1.GetVehicleRequest) obj; + + if (hasHeader() != other.hasHeader()) return false; + if (hasHeader()) { + if (!getHeader().equals(other.getHeader())) return false; + } + if (!getName().equals(other.getName())) return false; + if (hasCurrentRouteSegmentVersion() != other.hasCurrentRouteSegmentVersion()) return false; + if (hasCurrentRouteSegmentVersion()) { + if (!getCurrentRouteSegmentVersion().equals(other.getCurrentRouteSegmentVersion())) + return false; + } + if (hasWaypointsVersion() != other.hasWaypointsVersion()) return false; + if (hasWaypointsVersion()) { + if (!getWaypointsVersion().equals(other.getWaypointsVersion())) 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 (hasHeader()) { + hash = (37 * hash) + HEADER_FIELD_NUMBER; + hash = (53 * hash) + getHeader().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCurrentRouteSegmentVersion()) { + hash = (37 * hash) + CURRENT_ROUTE_SEGMENT_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getCurrentRouteSegmentVersion().hashCode(); + } + if (hasWaypointsVersion()) { + hash = (37 * hash) + WAYPOINTS_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getWaypointsVersion().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.fleetengine.v1.GetVehicleRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.GetVehicleRequest 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.fleetengine.v1.GetVehicleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.GetVehicleRequest 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.fleetengine.v1.GetVehicleRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.GetVehicleRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.GetVehicleRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.GetVehicleRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.GetVehicleRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.GetVehicleRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.GetVehicleRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.GetVehicleRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.fleetengine.v1.GetVehicleRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * `GetVehicle` request message.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.v1.GetVehicleRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.v1.GetVehicleRequest) + com.google.maps.fleetengine.v1.GetVehicleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_GetVehicleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_GetVehicleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.GetVehicleRequest.class, + com.google.maps.fleetengine.v1.GetVehicleRequest.Builder.class); + } + + // Construct using com.google.maps.fleetengine.v1.GetVehicleRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getHeaderFieldBuilder(); + getCurrentRouteSegmentVersionFieldBuilder(); + getWaypointsVersionFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + name_ = ""; + currentRouteSegmentVersion_ = null; + if (currentRouteSegmentVersionBuilder_ != null) { + currentRouteSegmentVersionBuilder_.dispose(); + currentRouteSegmentVersionBuilder_ = null; + } + waypointsVersion_ = null; + if (waypointsVersionBuilder_ != null) { + waypointsVersionBuilder_.dispose(); + waypointsVersionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_GetVehicleRequest_descriptor; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.GetVehicleRequest getDefaultInstanceForType() { + return com.google.maps.fleetengine.v1.GetVehicleRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.GetVehicleRequest build() { + com.google.maps.fleetengine.v1.GetVehicleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.GetVehicleRequest buildPartial() { + com.google.maps.fleetengine.v1.GetVehicleRequest result = + new com.google.maps.fleetengine.v1.GetVehicleRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.fleetengine.v1.GetVehicleRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.header_ = headerBuilder_ == null ? header_ : headerBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.currentRouteSegmentVersion_ = + currentRouteSegmentVersionBuilder_ == null + ? currentRouteSegmentVersion_ + : currentRouteSegmentVersionBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.waypointsVersion_ = + waypointsVersionBuilder_ == null ? waypointsVersion_ : waypointsVersionBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.fleetengine.v1.GetVehicleRequest) { + return mergeFrom((com.google.maps.fleetengine.v1.GetVehicleRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.fleetengine.v1.GetVehicleRequest other) { + if (other == com.google.maps.fleetengine.v1.GetVehicleRequest.getDefaultInstance()) + return this; + if (other.hasHeader()) { + mergeHeader(other.getHeader()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasCurrentRouteSegmentVersion()) { + mergeCurrentRouteSegmentVersion(other.getCurrentRouteSegmentVersion()); + } + if (other.hasWaypointsVersion()) { + mergeWaypointsVersion(other.getWaypointsVersion()); + } + 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(getHeaderFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 34: + { + input.readMessage( + getCurrentRouteSegmentVersionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 34 + case 42: + { + input.readMessage( + getWaypointsVersionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.maps.fleetengine.v1.RequestHeader header_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.RequestHeader, + com.google.maps.fleetengine.v1.RequestHeader.Builder, + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder> + headerBuilder_; + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return Whether the header field is set. + */ + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return The header. + */ + public com.google.maps.fleetengine.v1.RequestHeader getHeader() { + if (headerBuilder_ == null) { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } else { + return headerBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public Builder setHeader(com.google.maps.fleetengine.v1.RequestHeader value) { + if (headerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + header_ = value; + } else { + headerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public Builder setHeader(com.google.maps.fleetengine.v1.RequestHeader.Builder builderForValue) { + if (headerBuilder_ == null) { + header_ = builderForValue.build(); + } else { + headerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public Builder mergeHeader(com.google.maps.fleetengine.v1.RequestHeader value) { + if (headerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && header_ != null + && header_ != com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance()) { + getHeaderBuilder().mergeFrom(value); + } else { + header_ = value; + } + } else { + headerBuilder_.mergeFrom(value); + } + if (header_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public Builder clearHeader() { + bitField0_ = (bitField0_ & ~0x00000001); + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public com.google.maps.fleetengine.v1.RequestHeader.Builder getHeaderBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getHeaderFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public com.google.maps.fleetengine.v1.RequestHeaderOrBuilder getHeaderOrBuilder() { + if (headerBuilder_ != null) { + return headerBuilder_.getMessageOrBuilder(); + } else { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.RequestHeader, + com.google.maps.fleetengine.v1.RequestHeader.Builder, + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder> + getHeaderFieldBuilder() { + if (headerBuilder_ == null) { + headerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.RequestHeader, + com.google.maps.fleetengine.v1.RequestHeader.Builder, + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder>( + getHeader(), getParentForChildren(), isClean()); + header_ = null; + } + return headerBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Must be in the format
+     * `providers/{provider}/vehicles/{vehicle}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * + * string name = 3 [(.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. Must be in the format
+     * `providers/{provider}/vehicles/{vehicle}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * + * string name = 3 [(.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. Must be in the format
+     * `providers/{provider}/vehicles/{vehicle}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * + * string name = 3 [(.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_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Must be in the format
+     * `providers/{provider}/vehicles/{vehicle}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * + * string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Must be in the format
+     * `providers/{provider}/vehicles/{vehicle}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * + * string name = 3 [(.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_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp currentRouteSegmentVersion_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + currentRouteSegmentVersionBuilder_; + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which
+     * `Vehicle.current_route_segment` is retrieved.
+     * If the route is unchanged since this timestamp, the `current_route_segment`
+     * field is not set in the response. If a minimum is unspecified, the
+     * `current_route_segment` is always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp current_route_segment_version = 4; + * + * @return Whether the currentRouteSegmentVersion field is set. + */ + public boolean hasCurrentRouteSegmentVersion() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which
+     * `Vehicle.current_route_segment` is retrieved.
+     * If the route is unchanged since this timestamp, the `current_route_segment`
+     * field is not set in the response. If a minimum is unspecified, the
+     * `current_route_segment` is always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp current_route_segment_version = 4; + * + * @return The currentRouteSegmentVersion. + */ + public com.google.protobuf.Timestamp getCurrentRouteSegmentVersion() { + if (currentRouteSegmentVersionBuilder_ == null) { + return currentRouteSegmentVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : currentRouteSegmentVersion_; + } else { + return currentRouteSegmentVersionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which
+     * `Vehicle.current_route_segment` is retrieved.
+     * If the route is unchanged since this timestamp, the `current_route_segment`
+     * field is not set in the response. If a minimum is unspecified, the
+     * `current_route_segment` is always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp current_route_segment_version = 4; + */ + public Builder setCurrentRouteSegmentVersion(com.google.protobuf.Timestamp value) { + if (currentRouteSegmentVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + currentRouteSegmentVersion_ = value; + } else { + currentRouteSegmentVersionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which
+     * `Vehicle.current_route_segment` is retrieved.
+     * If the route is unchanged since this timestamp, the `current_route_segment`
+     * field is not set in the response. If a minimum is unspecified, the
+     * `current_route_segment` is always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp current_route_segment_version = 4; + */ + public Builder setCurrentRouteSegmentVersion( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (currentRouteSegmentVersionBuilder_ == null) { + currentRouteSegmentVersion_ = builderForValue.build(); + } else { + currentRouteSegmentVersionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which
+     * `Vehicle.current_route_segment` is retrieved.
+     * If the route is unchanged since this timestamp, the `current_route_segment`
+     * field is not set in the response. If a minimum is unspecified, the
+     * `current_route_segment` is always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp current_route_segment_version = 4; + */ + public Builder mergeCurrentRouteSegmentVersion(com.google.protobuf.Timestamp value) { + if (currentRouteSegmentVersionBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && currentRouteSegmentVersion_ != null + && currentRouteSegmentVersion_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCurrentRouteSegmentVersionBuilder().mergeFrom(value); + } else { + currentRouteSegmentVersion_ = value; + } + } else { + currentRouteSegmentVersionBuilder_.mergeFrom(value); + } + if (currentRouteSegmentVersion_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which
+     * `Vehicle.current_route_segment` is retrieved.
+     * If the route is unchanged since this timestamp, the `current_route_segment`
+     * field is not set in the response. If a minimum is unspecified, the
+     * `current_route_segment` is always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp current_route_segment_version = 4; + */ + public Builder clearCurrentRouteSegmentVersion() { + bitField0_ = (bitField0_ & ~0x00000004); + currentRouteSegmentVersion_ = null; + if (currentRouteSegmentVersionBuilder_ != null) { + currentRouteSegmentVersionBuilder_.dispose(); + currentRouteSegmentVersionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which
+     * `Vehicle.current_route_segment` is retrieved.
+     * If the route is unchanged since this timestamp, the `current_route_segment`
+     * field is not set in the response. If a minimum is unspecified, the
+     * `current_route_segment` is always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp current_route_segment_version = 4; + */ + public com.google.protobuf.Timestamp.Builder getCurrentRouteSegmentVersionBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCurrentRouteSegmentVersionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which
+     * `Vehicle.current_route_segment` is retrieved.
+     * If the route is unchanged since this timestamp, the `current_route_segment`
+     * field is not set in the response. If a minimum is unspecified, the
+     * `current_route_segment` is always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp current_route_segment_version = 4; + */ + public com.google.protobuf.TimestampOrBuilder getCurrentRouteSegmentVersionOrBuilder() { + if (currentRouteSegmentVersionBuilder_ != null) { + return currentRouteSegmentVersionBuilder_.getMessageOrBuilder(); + } else { + return currentRouteSegmentVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : currentRouteSegmentVersion_; + } + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which
+     * `Vehicle.current_route_segment` is retrieved.
+     * If the route is unchanged since this timestamp, the `current_route_segment`
+     * field is not set in the response. If a minimum is unspecified, the
+     * `current_route_segment` is always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp current_route_segment_version = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCurrentRouteSegmentVersionFieldBuilder() { + if (currentRouteSegmentVersionBuilder_ == null) { + currentRouteSegmentVersionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCurrentRouteSegmentVersion(), getParentForChildren(), isClean()); + currentRouteSegmentVersion_ = null; + } + return currentRouteSegmentVersionBuilder_; + } + + private com.google.protobuf.Timestamp waypointsVersion_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + waypointsVersionBuilder_; + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which `Vehicle.waypoints`
+     * data is retrieved. If the waypoints are unchanged since this timestamp, the
+     * `vehicle.waypoints` data is not set in the response. If this field is
+     * unspecified, `vehicle.waypoints` is always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp waypoints_version = 5; + * + * @return Whether the waypointsVersion field is set. + */ + public boolean hasWaypointsVersion() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which `Vehicle.waypoints`
+     * data is retrieved. If the waypoints are unchanged since this timestamp, the
+     * `vehicle.waypoints` data is not set in the response. If this field is
+     * unspecified, `vehicle.waypoints` is always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp waypoints_version = 5; + * + * @return The waypointsVersion. + */ + public com.google.protobuf.Timestamp getWaypointsVersion() { + if (waypointsVersionBuilder_ == null) { + return waypointsVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : waypointsVersion_; + } else { + return waypointsVersionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which `Vehicle.waypoints`
+     * data is retrieved. If the waypoints are unchanged since this timestamp, the
+     * `vehicle.waypoints` data is not set in the response. If this field is
+     * unspecified, `vehicle.waypoints` is always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp waypoints_version = 5; + */ + public Builder setWaypointsVersion(com.google.protobuf.Timestamp value) { + if (waypointsVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + waypointsVersion_ = value; + } else { + waypointsVersionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which `Vehicle.waypoints`
+     * data is retrieved. If the waypoints are unchanged since this timestamp, the
+     * `vehicle.waypoints` data is not set in the response. If this field is
+     * unspecified, `vehicle.waypoints` is always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp waypoints_version = 5; + */ + public Builder setWaypointsVersion(com.google.protobuf.Timestamp.Builder builderForValue) { + if (waypointsVersionBuilder_ == null) { + waypointsVersion_ = builderForValue.build(); + } else { + waypointsVersionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which `Vehicle.waypoints`
+     * data is retrieved. If the waypoints are unchanged since this timestamp, the
+     * `vehicle.waypoints` data is not set in the response. If this field is
+     * unspecified, `vehicle.waypoints` is always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp waypoints_version = 5; + */ + public Builder mergeWaypointsVersion(com.google.protobuf.Timestamp value) { + if (waypointsVersionBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && waypointsVersion_ != null + && waypointsVersion_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getWaypointsVersionBuilder().mergeFrom(value); + } else { + waypointsVersion_ = value; + } + } else { + waypointsVersionBuilder_.mergeFrom(value); + } + if (waypointsVersion_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which `Vehicle.waypoints`
+     * data is retrieved. If the waypoints are unchanged since this timestamp, the
+     * `vehicle.waypoints` data is not set in the response. If this field is
+     * unspecified, `vehicle.waypoints` is always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp waypoints_version = 5; + */ + public Builder clearWaypointsVersion() { + bitField0_ = (bitField0_ & ~0x00000008); + waypointsVersion_ = null; + if (waypointsVersionBuilder_ != null) { + waypointsVersionBuilder_.dispose(); + waypointsVersionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which `Vehicle.waypoints`
+     * data is retrieved. If the waypoints are unchanged since this timestamp, the
+     * `vehicle.waypoints` data is not set in the response. If this field is
+     * unspecified, `vehicle.waypoints` is always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp waypoints_version = 5; + */ + public com.google.protobuf.Timestamp.Builder getWaypointsVersionBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getWaypointsVersionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which `Vehicle.waypoints`
+     * data is retrieved. If the waypoints are unchanged since this timestamp, the
+     * `vehicle.waypoints` data is not set in the response. If this field is
+     * unspecified, `vehicle.waypoints` is always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp waypoints_version = 5; + */ + public com.google.protobuf.TimestampOrBuilder getWaypointsVersionOrBuilder() { + if (waypointsVersionBuilder_ != null) { + return waypointsVersionBuilder_.getMessageOrBuilder(); + } else { + return waypointsVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : waypointsVersion_; + } + } + /** + * + * + *
+     * Indicates the minimum timestamp (exclusive) for which `Vehicle.waypoints`
+     * data is retrieved. If the waypoints are unchanged since this timestamp, the
+     * `vehicle.waypoints` data is not set in the response. If this field is
+     * unspecified, `vehicle.waypoints` is always retrieved.
+     * 
+ * + * .google.protobuf.Timestamp waypoints_version = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getWaypointsVersionFieldBuilder() { + if (waypointsVersionBuilder_ == null) { + waypointsVersionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getWaypointsVersion(), getParentForChildren(), isClean()); + waypointsVersion_ = null; + } + return waypointsVersionBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:maps.fleetengine.v1.GetVehicleRequest) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.v1.GetVehicleRequest) + private static final com.google.maps.fleetengine.v1.GetVehicleRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.fleetengine.v1.GetVehicleRequest(); + } + + public static com.google.maps.fleetengine.v1.GetVehicleRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetVehicleRequest 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.fleetengine.v1.GetVehicleRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/GetVehicleRequestOrBuilder.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/GetVehicleRequestOrBuilder.java new file mode 100644 index 000000000000..d74a8456acbd --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/GetVehicleRequestOrBuilder.java @@ -0,0 +1,189 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicle_api.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public interface GetVehicleRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.v1.GetVehicleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return Whether the header field is set. + */ + boolean hasHeader(); + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return The header. + */ + com.google.maps.fleetengine.v1.RequestHeader getHeader(); + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder getHeaderOrBuilder(); + + /** + * + * + *
+   * Required. Must be in the format
+   * `providers/{provider}/vehicles/{vehicle}`.
+   * The provider must be the Project ID (for example, `sample-cloud-project`)
+   * of the Google Cloud Project of which the service account making
+   * this call is a member.
+   * 
+ * + * + * string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Must be in the format
+   * `providers/{provider}/vehicles/{vehicle}`.
+   * The provider must be the Project ID (for example, `sample-cloud-project`)
+   * of the Google Cloud Project of which the service account making
+   * this call is a member.
+   * 
+ * + * + * string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Indicates the minimum timestamp (exclusive) for which
+   * `Vehicle.current_route_segment` is retrieved.
+   * If the route is unchanged since this timestamp, the `current_route_segment`
+   * field is not set in the response. If a minimum is unspecified, the
+   * `current_route_segment` is always retrieved.
+   * 
+ * + * .google.protobuf.Timestamp current_route_segment_version = 4; + * + * @return Whether the currentRouteSegmentVersion field is set. + */ + boolean hasCurrentRouteSegmentVersion(); + /** + * + * + *
+   * Indicates the minimum timestamp (exclusive) for which
+   * `Vehicle.current_route_segment` is retrieved.
+   * If the route is unchanged since this timestamp, the `current_route_segment`
+   * field is not set in the response. If a minimum is unspecified, the
+   * `current_route_segment` is always retrieved.
+   * 
+ * + * .google.protobuf.Timestamp current_route_segment_version = 4; + * + * @return The currentRouteSegmentVersion. + */ + com.google.protobuf.Timestamp getCurrentRouteSegmentVersion(); + /** + * + * + *
+   * Indicates the minimum timestamp (exclusive) for which
+   * `Vehicle.current_route_segment` is retrieved.
+   * If the route is unchanged since this timestamp, the `current_route_segment`
+   * field is not set in the response. If a minimum is unspecified, the
+   * `current_route_segment` is always retrieved.
+   * 
+ * + * .google.protobuf.Timestamp current_route_segment_version = 4; + */ + com.google.protobuf.TimestampOrBuilder getCurrentRouteSegmentVersionOrBuilder(); + + /** + * + * + *
+   * Indicates the minimum timestamp (exclusive) for which `Vehicle.waypoints`
+   * data is retrieved. If the waypoints are unchanged since this timestamp, the
+   * `vehicle.waypoints` data is not set in the response. If this field is
+   * unspecified, `vehicle.waypoints` is always retrieved.
+   * 
+ * + * .google.protobuf.Timestamp waypoints_version = 5; + * + * @return Whether the waypointsVersion field is set. + */ + boolean hasWaypointsVersion(); + /** + * + * + *
+   * Indicates the minimum timestamp (exclusive) for which `Vehicle.waypoints`
+   * data is retrieved. If the waypoints are unchanged since this timestamp, the
+   * `vehicle.waypoints` data is not set in the response. If this field is
+   * unspecified, `vehicle.waypoints` is always retrieved.
+   * 
+ * + * .google.protobuf.Timestamp waypoints_version = 5; + * + * @return The waypointsVersion. + */ + com.google.protobuf.Timestamp getWaypointsVersion(); + /** + * + * + *
+   * Indicates the minimum timestamp (exclusive) for which `Vehicle.waypoints`
+   * data is retrieved. If the waypoints are unchanged since this timestamp, the
+   * `vehicle.waypoints` data is not set in the response. If this field is
+   * unspecified, `vehicle.waypoints` is always retrieved.
+   * 
+ * + * .google.protobuf.Timestamp waypoints_version = 5; + */ + com.google.protobuf.TimestampOrBuilder getWaypointsVersionOrBuilder(); +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/Headers.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/Headers.java new file mode 100644 index 000000000000..16cb1e18648f --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/Headers.java @@ -0,0 +1,100 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/header.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public final class Headers { + private Headers() {} + + 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_maps_fleetengine_v1_RequestHeader_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_v1_RequestHeader_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n\'google/maps/fleetengine/v1/header.prot" + + "o\022\023maps.fleetengine.v1\032\037google/api/field" + + "_behavior.proto\"\206\004\n\rRequestHeader\022\025\n\rlan" + + "guage_code\030\001 \001(\t\022\030\n\013region_code\030\002 \001(\tB\003\340" + + "A\002\022\023\n\013sdk_version\030\003 \001(\t\022\022\n\nos_version\030\004 " + + "\001(\t\022\024\n\014device_model\030\005 \001(\t\022<\n\010sdk_type\030\006 " + + "\001(\0162*.maps.fleetengine.v1.RequestHeader." + + "SdkType\022\030\n\020maps_sdk_version\030\007 \001(\t\022\027\n\017nav" + + "_sdk_version\030\010 \001(\t\022=\n\010platform\030\t \001(\0162+.m" + + "aps.fleetengine.v1.RequestHeader.Platfor" + + "m\022\024\n\014manufacturer\030\n \001(\t\022\031\n\021android_api_l" + + "evel\030\013 \001(\005\022\020\n\010trace_id\030\014 \001(\t\"M\n\007SdkType\022" + + "\030\n\024SDK_TYPE_UNSPECIFIED\020\000\022\014\n\010CONSUMER\020\001\022" + + "\n\n\006DRIVER\020\002\022\016\n\nJAVASCRIPT\020\003\"C\n\010Platform\022" + + "\030\n\024PLATFORM_UNSPECIFIED\020\000\022\013\n\007ANDROID\020\001\022\007" + + "\n\003IOS\020\002\022\007\n\003WEB\020\003B\323\001\n\036com.google.maps.fle" + + "etengine.v1B\007HeadersP\001ZFcloud.google.com" + + "/go/maps/fleetengine/apiv1/fleetenginepb" + + ";fleetenginepb\242\002\003CFE\252\002\032Google.Maps.Fleet" + + "Engine.V1\312\002\032Google\\Maps\\FleetEngine\\V1\352\002" + + "\035Google::Maps::FleetEngine::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + }); + internal_static_maps_fleetengine_v1_RequestHeader_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_maps_fleetengine_v1_RequestHeader_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_v1_RequestHeader_descriptor, + new java.lang.String[] { + "LanguageCode", + "RegionCode", + "SdkVersion", + "OsVersion", + "DeviceModel", + "SdkType", + "MapsSdkVersion", + "NavSdkVersion", + "Platform", + "Manufacturer", + "AndroidApiLevel", + "TraceId", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/LicensePlate.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/LicensePlate.java new file mode 100644 index 000000000000..1531a47a84a3 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/LicensePlate.java @@ -0,0 +1,852 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicles.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * The license plate information of the Vehicle.  To avoid storing
+ * personally-identifiable information, only the minimum information
+ * about the license plate is stored as part of the entity.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.v1.LicensePlate} + */ +public final class LicensePlate extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.v1.LicensePlate) + LicensePlateOrBuilder { + private static final long serialVersionUID = 0L; + // Use LicensePlate.newBuilder() to construct. + private LicensePlate(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LicensePlate() { + countryCode_ = ""; + lastCharacter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LicensePlate(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.Vehicles + .internal_static_maps_fleetengine_v1_LicensePlate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.Vehicles + .internal_static_maps_fleetengine_v1_LicensePlate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.LicensePlate.class, + com.google.maps.fleetengine.v1.LicensePlate.Builder.class); + } + + public static final int COUNTRY_CODE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object countryCode_ = ""; + /** + * + * + *
+   * Required. CLDR Country/Region Code.  For example, `US` for United States,
+   * or `IN` for India.
+   * 
+ * + * string country_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The countryCode. + */ + @java.lang.Override + public java.lang.String getCountryCode() { + java.lang.Object ref = countryCode_; + 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(); + countryCode_ = s; + return s; + } + } + /** + * + * + *
+   * Required. CLDR Country/Region Code.  For example, `US` for United States,
+   * or `IN` for India.
+   * 
+ * + * string country_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for countryCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCountryCodeBytes() { + java.lang.Object ref = countryCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + countryCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LAST_CHARACTER_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object lastCharacter_ = ""; + /** + * + * + *
+   * The last digit of the license plate or "-1" to denote no numeric value
+   * is present in the license plate.
+   *
+   * * "ABC 1234" -> "4"
+   * * "AB 123 CD" -> "3"
+   * * "ABCDEF" -> "-1"
+   * 
+ * + * string last_character = 2; + * + * @return The lastCharacter. + */ + @java.lang.Override + public java.lang.String getLastCharacter() { + java.lang.Object ref = lastCharacter_; + 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(); + lastCharacter_ = s; + return s; + } + } + /** + * + * + *
+   * The last digit of the license plate or "-1" to denote no numeric value
+   * is present in the license plate.
+   *
+   * * "ABC 1234" -> "4"
+   * * "AB 123 CD" -> "3"
+   * * "ABCDEF" -> "-1"
+   * 
+ * + * string last_character = 2; + * + * @return The bytes for lastCharacter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLastCharacterBytes() { + java.lang.Object ref = lastCharacter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + lastCharacter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(countryCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, countryCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lastCharacter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, lastCharacter_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(countryCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, countryCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lastCharacter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, lastCharacter_); + } + 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.fleetengine.v1.LicensePlate)) { + return super.equals(obj); + } + com.google.maps.fleetengine.v1.LicensePlate other = + (com.google.maps.fleetengine.v1.LicensePlate) obj; + + if (!getCountryCode().equals(other.getCountryCode())) return false; + if (!getLastCharacter().equals(other.getLastCharacter())) 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) + COUNTRY_CODE_FIELD_NUMBER; + hash = (53 * hash) + getCountryCode().hashCode(); + hash = (37 * hash) + LAST_CHARACTER_FIELD_NUMBER; + hash = (53 * hash) + getLastCharacter().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.fleetengine.v1.LicensePlate parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.LicensePlate 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.fleetengine.v1.LicensePlate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.LicensePlate 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.fleetengine.v1.LicensePlate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.LicensePlate parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.LicensePlate parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.LicensePlate parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.LicensePlate parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.LicensePlate parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.LicensePlate parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.LicensePlate parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.fleetengine.v1.LicensePlate prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The license plate information of the Vehicle.  To avoid storing
+   * personally-identifiable information, only the minimum information
+   * about the license plate is stored as part of the entity.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.v1.LicensePlate} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.v1.LicensePlate) + com.google.maps.fleetengine.v1.LicensePlateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.Vehicles + .internal_static_maps_fleetengine_v1_LicensePlate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.Vehicles + .internal_static_maps_fleetengine_v1_LicensePlate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.LicensePlate.class, + com.google.maps.fleetengine.v1.LicensePlate.Builder.class); + } + + // Construct using com.google.maps.fleetengine.v1.LicensePlate.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + countryCode_ = ""; + lastCharacter_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.fleetengine.v1.Vehicles + .internal_static_maps_fleetengine_v1_LicensePlate_descriptor; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.LicensePlate getDefaultInstanceForType() { + return com.google.maps.fleetengine.v1.LicensePlate.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.LicensePlate build() { + com.google.maps.fleetengine.v1.LicensePlate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.LicensePlate buildPartial() { + com.google.maps.fleetengine.v1.LicensePlate result = + new com.google.maps.fleetengine.v1.LicensePlate(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.fleetengine.v1.LicensePlate result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.countryCode_ = countryCode_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.lastCharacter_ = lastCharacter_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.fleetengine.v1.LicensePlate) { + return mergeFrom((com.google.maps.fleetengine.v1.LicensePlate) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.fleetengine.v1.LicensePlate other) { + if (other == com.google.maps.fleetengine.v1.LicensePlate.getDefaultInstance()) return this; + if (!other.getCountryCode().isEmpty()) { + countryCode_ = other.countryCode_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getLastCharacter().isEmpty()) { + lastCharacter_ = other.lastCharacter_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + countryCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + lastCharacter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object countryCode_ = ""; + /** + * + * + *
+     * Required. CLDR Country/Region Code.  For example, `US` for United States,
+     * or `IN` for India.
+     * 
+ * + * string country_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The countryCode. + */ + public java.lang.String getCountryCode() { + java.lang.Object ref = countryCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + countryCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. CLDR Country/Region Code.  For example, `US` for United States,
+     * or `IN` for India.
+     * 
+ * + * string country_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for countryCode. + */ + public com.google.protobuf.ByteString getCountryCodeBytes() { + java.lang.Object ref = countryCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + countryCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. CLDR Country/Region Code.  For example, `US` for United States,
+     * or `IN` for India.
+     * 
+ * + * string country_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The countryCode to set. + * @return This builder for chaining. + */ + public Builder setCountryCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + countryCode_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. CLDR Country/Region Code.  For example, `US` for United States,
+     * or `IN` for India.
+     * 
+ * + * string country_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearCountryCode() { + countryCode_ = getDefaultInstance().getCountryCode(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. CLDR Country/Region Code.  For example, `US` for United States,
+     * or `IN` for India.
+     * 
+ * + * string country_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for countryCode to set. + * @return This builder for chaining. + */ + public Builder setCountryCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + countryCode_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object lastCharacter_ = ""; + /** + * + * + *
+     * The last digit of the license plate or "-1" to denote no numeric value
+     * is present in the license plate.
+     *
+     * * "ABC 1234" -> "4"
+     * * "AB 123 CD" -> "3"
+     * * "ABCDEF" -> "-1"
+     * 
+ * + * string last_character = 2; + * + * @return The lastCharacter. + */ + public java.lang.String getLastCharacter() { + java.lang.Object ref = lastCharacter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + lastCharacter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The last digit of the license plate or "-1" to denote no numeric value
+     * is present in the license plate.
+     *
+     * * "ABC 1234" -> "4"
+     * * "AB 123 CD" -> "3"
+     * * "ABCDEF" -> "-1"
+     * 
+ * + * string last_character = 2; + * + * @return The bytes for lastCharacter. + */ + public com.google.protobuf.ByteString getLastCharacterBytes() { + java.lang.Object ref = lastCharacter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + lastCharacter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The last digit of the license plate or "-1" to denote no numeric value
+     * is present in the license plate.
+     *
+     * * "ABC 1234" -> "4"
+     * * "AB 123 CD" -> "3"
+     * * "ABCDEF" -> "-1"
+     * 
+ * + * string last_character = 2; + * + * @param value The lastCharacter to set. + * @return This builder for chaining. + */ + public Builder setLastCharacter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + lastCharacter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The last digit of the license plate or "-1" to denote no numeric value
+     * is present in the license plate.
+     *
+     * * "ABC 1234" -> "4"
+     * * "AB 123 CD" -> "3"
+     * * "ABCDEF" -> "-1"
+     * 
+ * + * string last_character = 2; + * + * @return This builder for chaining. + */ + public Builder clearLastCharacter() { + lastCharacter_ = getDefaultInstance().getLastCharacter(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The last digit of the license plate or "-1" to denote no numeric value
+     * is present in the license plate.
+     *
+     * * "ABC 1234" -> "4"
+     * * "AB 123 CD" -> "3"
+     * * "ABCDEF" -> "-1"
+     * 
+ * + * string last_character = 2; + * + * @param value The bytes for lastCharacter to set. + * @return This builder for chaining. + */ + public Builder setLastCharacterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + lastCharacter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:maps.fleetengine.v1.LicensePlate) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.v1.LicensePlate) + private static final com.google.maps.fleetengine.v1.LicensePlate DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.fleetengine.v1.LicensePlate(); + } + + public static com.google.maps.fleetengine.v1.LicensePlate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LicensePlate 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.fleetengine.v1.LicensePlate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/LicensePlateOrBuilder.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/LicensePlateOrBuilder.java new file mode 100644 index 000000000000..a9975aa3e538 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/LicensePlateOrBuilder.java @@ -0,0 +1,88 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicles.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public interface LicensePlateOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.v1.LicensePlate) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. CLDR Country/Region Code.  For example, `US` for United States,
+   * or `IN` for India.
+   * 
+ * + * string country_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The countryCode. + */ + java.lang.String getCountryCode(); + /** + * + * + *
+   * Required. CLDR Country/Region Code.  For example, `US` for United States,
+   * or `IN` for India.
+   * 
+ * + * string country_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for countryCode. + */ + com.google.protobuf.ByteString getCountryCodeBytes(); + + /** + * + * + *
+   * The last digit of the license plate or "-1" to denote no numeric value
+   * is present in the license plate.
+   *
+   * * "ABC 1234" -> "4"
+   * * "AB 123 CD" -> "3"
+   * * "ABCDEF" -> "-1"
+   * 
+ * + * string last_character = 2; + * + * @return The lastCharacter. + */ + java.lang.String getLastCharacter(); + /** + * + * + *
+   * The last digit of the license plate or "-1" to denote no numeric value
+   * is present in the license plate.
+   *
+   * * "ABC 1234" -> "4"
+   * * "AB 123 CD" -> "3"
+   * * "ABCDEF" -> "-1"
+   * 
+ * + * string last_character = 2; + * + * @return The bytes for lastCharacter. + */ + com.google.protobuf.ByteString getLastCharacterBytes(); +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/ListVehiclesRequest.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/ListVehiclesRequest.java new file mode 100644 index 000000000000..44cc81f5b677 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/ListVehiclesRequest.java @@ -0,0 +1,5037 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicle_api.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * `ListVehicles` request message.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.v1.ListVehiclesRequest} + */ +public final class ListVehiclesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.v1.ListVehiclesRequest) + ListVehiclesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListVehiclesRequest.newBuilder() to construct. + private ListVehiclesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListVehiclesRequest() { + parent_ = ""; + pageToken_ = ""; + tripTypes_ = java.util.Collections.emptyList(); + vehicleTypeCategories_ = java.util.Collections.emptyList(); + requiredAttributes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + requiredOneOfAttributes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + requiredOneOfAttributeSets_ = com.google.protobuf.LazyStringArrayList.emptyList(); + vehicleState_ = 0; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListVehiclesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_ListVehiclesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_ListVehiclesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.ListVehiclesRequest.class, + com.google.maps.fleetengine.v1.ListVehiclesRequest.Builder.class); + } + + private int bitField0_; + public static final int HEADER_FIELD_NUMBER = 12; + private com.google.maps.fleetengine.v1.RequestHeader header_; + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 12; + * + * @return Whether the header field is set. + */ + @java.lang.Override + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 12; + * + * @return The header. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.RequestHeader getHeader() { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 12; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.RequestHeaderOrBuilder getHeaderOrBuilder() { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Must be in the format `providers/{provider}`.
+   * The provider must be the Project ID (for example, `sample-cloud-project`)
+   * of the Google Cloud Project of which the service account making
+   * this call is a member.
+   * 
+ * + * 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. Must be in the format `providers/{provider}`.
+   * The provider must be the Project ID (for example, `sample-cloud-project`)
+   * of the Google Cloud Project of which the service account making
+   * this call is a member.
+   * 
+ * + * 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 PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_ = 0; + /** + * + * + *
+   * The maximum number of vehicles to return.
+   * Default value: 100.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * The value of the `next_page_token` provided by a previous call to
+   * `ListVehicles` so that you can paginate through groups of vehicles. The
+   * value is undefined if the filter criteria of the request is not the same as
+   * the filter criteria for the previous call to `ListVehicles`.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The value of the `next_page_token` provided by a previous call to
+   * `ListVehicles` so that you can paginate through groups of vehicles. The
+   * value is undefined if the filter criteria of the request is not the same as
+   * the filter criteria for the previous call to `ListVehicles`.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MINIMUM_CAPACITY_FIELD_NUMBER = 6; + private com.google.protobuf.Int32Value minimumCapacity_; + /** + * + * + *
+   * Specifies the required minimum capacity of the vehicle. All vehicles
+   * returned will have a `maximum_capacity` greater than or equal to this
+   * value. If set, must be greater or equal to 0.
+   * 
+ * + * .google.protobuf.Int32Value minimum_capacity = 6; + * + * @return Whether the minimumCapacity field is set. + */ + @java.lang.Override + public boolean hasMinimumCapacity() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Specifies the required minimum capacity of the vehicle. All vehicles
+   * returned will have a `maximum_capacity` greater than or equal to this
+   * value. If set, must be greater or equal to 0.
+   * 
+ * + * .google.protobuf.Int32Value minimum_capacity = 6; + * + * @return The minimumCapacity. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getMinimumCapacity() { + return minimumCapacity_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : minimumCapacity_; + } + /** + * + * + *
+   * Specifies the required minimum capacity of the vehicle. All vehicles
+   * returned will have a `maximum_capacity` greater than or equal to this
+   * value. If set, must be greater or equal to 0.
+   * 
+ * + * .google.protobuf.Int32Value minimum_capacity = 6; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getMinimumCapacityOrBuilder() { + return minimumCapacity_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : minimumCapacity_; + } + + public static final int TRIP_TYPES_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private java.util.List tripTypes_; + + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.maps.fleetengine.v1.TripType> + tripTypes_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.maps.fleetengine.v1.TripType>() { + public com.google.maps.fleetengine.v1.TripType convert(java.lang.Integer from) { + com.google.maps.fleetengine.v1.TripType result = + com.google.maps.fleetengine.v1.TripType.forNumber(from); + return result == null ? com.google.maps.fleetengine.v1.TripType.UNRECOGNIZED : result; + } + }; + /** + * + * + *
+   * Restricts the response to vehicles that support at least one of the
+   * specified trip types.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripType trip_types = 7; + * + * @return A list containing the tripTypes. + */ + @java.lang.Override + public java.util.List getTripTypesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.maps.fleetengine.v1.TripType>( + tripTypes_, tripTypes_converter_); + } + /** + * + * + *
+   * Restricts the response to vehicles that support at least one of the
+   * specified trip types.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripType trip_types = 7; + * + * @return The count of tripTypes. + */ + @java.lang.Override + public int getTripTypesCount() { + return tripTypes_.size(); + } + /** + * + * + *
+   * Restricts the response to vehicles that support at least one of the
+   * specified trip types.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripType trip_types = 7; + * + * @param index The index of the element to return. + * @return The tripTypes at the given index. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TripType getTripTypes(int index) { + return tripTypes_converter_.convert(tripTypes_.get(index)); + } + /** + * + * + *
+   * Restricts the response to vehicles that support at least one of the
+   * specified trip types.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripType trip_types = 7; + * + * @return A list containing the enum numeric values on the wire for tripTypes. + */ + @java.lang.Override + public java.util.List getTripTypesValueList() { + return tripTypes_; + } + /** + * + * + *
+   * Restricts the response to vehicles that support at least one of the
+   * specified trip types.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripType trip_types = 7; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of tripTypes at the given index. + */ + @java.lang.Override + public int getTripTypesValue(int index) { + return tripTypes_.get(index); + } + + private int tripTypesMemoizedSerializedSize; + + public static final int MAXIMUM_STALENESS_FIELD_NUMBER = 8; + private com.google.protobuf.Duration maximumStaleness_; + /** + * + * + *
+   * Restricts the response to vehicles that have sent location updates to Fleet
+   * Engine within the specified duration. Stationary vehicles still
+   * transmitting their locations are not considered stale. If present, must be
+   * a valid positive duration.
+   * 
+ * + * .google.protobuf.Duration maximum_staleness = 8; + * + * @return Whether the maximumStaleness field is set. + */ + @java.lang.Override + public boolean hasMaximumStaleness() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Restricts the response to vehicles that have sent location updates to Fleet
+   * Engine within the specified duration. Stationary vehicles still
+   * transmitting their locations are not considered stale. If present, must be
+   * a valid positive duration.
+   * 
+ * + * .google.protobuf.Duration maximum_staleness = 8; + * + * @return The maximumStaleness. + */ + @java.lang.Override + public com.google.protobuf.Duration getMaximumStaleness() { + return maximumStaleness_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : maximumStaleness_; + } + /** + * + * + *
+   * Restricts the response to vehicles that have sent location updates to Fleet
+   * Engine within the specified duration. Stationary vehicles still
+   * transmitting their locations are not considered stale. If present, must be
+   * a valid positive duration.
+   * 
+ * + * .google.protobuf.Duration maximum_staleness = 8; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getMaximumStalenessOrBuilder() { + return maximumStaleness_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : maximumStaleness_; + } + + public static final int VEHICLE_TYPE_CATEGORIES_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private java.util.List vehicleTypeCategories_; + + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.maps.fleetengine.v1.Vehicle.VehicleType.Category> + vehicleTypeCategories_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.maps.fleetengine.v1.Vehicle.VehicleType.Category>() { + public com.google.maps.fleetengine.v1.Vehicle.VehicleType.Category convert( + java.lang.Integer from) { + com.google.maps.fleetengine.v1.Vehicle.VehicleType.Category result = + com.google.maps.fleetengine.v1.Vehicle.VehicleType.Category.forNumber(from); + return result == null + ? com.google.maps.fleetengine.v1.Vehicle.VehicleType.Category.UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+   * Required. Restricts the response to vehicles with one of the specified type
+   * categories. `UNKNOWN` is not allowed.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType.Category vehicle_type_categories = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the vehicleTypeCategories. + */ + @java.lang.Override + public java.util.List + getVehicleTypeCategoriesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.maps.fleetengine.v1.Vehicle.VehicleType.Category>( + vehicleTypeCategories_, vehicleTypeCategories_converter_); + } + /** + * + * + *
+   * Required. Restricts the response to vehicles with one of the specified type
+   * categories. `UNKNOWN` is not allowed.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType.Category vehicle_type_categories = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of vehicleTypeCategories. + */ + @java.lang.Override + public int getVehicleTypeCategoriesCount() { + return vehicleTypeCategories_.size(); + } + /** + * + * + *
+   * Required. Restricts the response to vehicles with one of the specified type
+   * categories. `UNKNOWN` is not allowed.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType.Category vehicle_type_categories = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The vehicleTypeCategories at the given index. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.Vehicle.VehicleType.Category getVehicleTypeCategories( + int index) { + return vehicleTypeCategories_converter_.convert(vehicleTypeCategories_.get(index)); + } + /** + * + * + *
+   * Required. Restricts the response to vehicles with one of the specified type
+   * categories. `UNKNOWN` is not allowed.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType.Category vehicle_type_categories = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the enum numeric values on the wire for vehicleTypeCategories. + */ + @java.lang.Override + public java.util.List getVehicleTypeCategoriesValueList() { + return vehicleTypeCategories_; + } + /** + * + * + *
+   * Required. Restricts the response to vehicles with one of the specified type
+   * categories. `UNKNOWN` is not allowed.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType.Category vehicle_type_categories = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of vehicleTypeCategories at the given index. + */ + @java.lang.Override + public int getVehicleTypeCategoriesValue(int index) { + return vehicleTypeCategories_.get(index); + } + + private int vehicleTypeCategoriesMemoizedSerializedSize; + + public static final int REQUIRED_ATTRIBUTES_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList requiredAttributes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Callers can form complex logical operations using any combination of the
+   * `required_attributes`, `required_one_of_attributes`, and
+   * `required_one_of_attribute_sets` fields.
+   *
+   * `required_attributes` is a list; `required_one_of_attributes` uses a
+   * message which allows a list of lists. In combination, the two fields allow
+   * the composition of this expression:
+   *
+   * ```
+   * (required_attributes[0] AND required_attributes[1] AND ...)
+   * AND
+   * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+   * ...)
+   * AND
+   * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+   * ...)
+   * ```
+   *
+   * Restricts the response to vehicles with the specified attributes. This
+   * field is a conjunction/AND operation. A max of 50 required_attributes is
+   * allowed. This matches the maximum number of attributes allowed on a
+   * vehicle. Each repeated string should be of the format "key:value".
+   * 
+ * + * repeated string required_attributes = 10; + * + * @return A list containing the requiredAttributes. + */ + public com.google.protobuf.ProtocolStringList getRequiredAttributesList() { + return requiredAttributes_; + } + /** + * + * + *
+   * Callers can form complex logical operations using any combination of the
+   * `required_attributes`, `required_one_of_attributes`, and
+   * `required_one_of_attribute_sets` fields.
+   *
+   * `required_attributes` is a list; `required_one_of_attributes` uses a
+   * message which allows a list of lists. In combination, the two fields allow
+   * the composition of this expression:
+   *
+   * ```
+   * (required_attributes[0] AND required_attributes[1] AND ...)
+   * AND
+   * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+   * ...)
+   * AND
+   * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+   * ...)
+   * ```
+   *
+   * Restricts the response to vehicles with the specified attributes. This
+   * field is a conjunction/AND operation. A max of 50 required_attributes is
+   * allowed. This matches the maximum number of attributes allowed on a
+   * vehicle. Each repeated string should be of the format "key:value".
+   * 
+ * + * repeated string required_attributes = 10; + * + * @return The count of requiredAttributes. + */ + public int getRequiredAttributesCount() { + return requiredAttributes_.size(); + } + /** + * + * + *
+   * Callers can form complex logical operations using any combination of the
+   * `required_attributes`, `required_one_of_attributes`, and
+   * `required_one_of_attribute_sets` fields.
+   *
+   * `required_attributes` is a list; `required_one_of_attributes` uses a
+   * message which allows a list of lists. In combination, the two fields allow
+   * the composition of this expression:
+   *
+   * ```
+   * (required_attributes[0] AND required_attributes[1] AND ...)
+   * AND
+   * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+   * ...)
+   * AND
+   * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+   * ...)
+   * ```
+   *
+   * Restricts the response to vehicles with the specified attributes. This
+   * field is a conjunction/AND operation. A max of 50 required_attributes is
+   * allowed. This matches the maximum number of attributes allowed on a
+   * vehicle. Each repeated string should be of the format "key:value".
+   * 
+ * + * repeated string required_attributes = 10; + * + * @param index The index of the element to return. + * @return The requiredAttributes at the given index. + */ + public java.lang.String getRequiredAttributes(int index) { + return requiredAttributes_.get(index); + } + /** + * + * + *
+   * Callers can form complex logical operations using any combination of the
+   * `required_attributes`, `required_one_of_attributes`, and
+   * `required_one_of_attribute_sets` fields.
+   *
+   * `required_attributes` is a list; `required_one_of_attributes` uses a
+   * message which allows a list of lists. In combination, the two fields allow
+   * the composition of this expression:
+   *
+   * ```
+   * (required_attributes[0] AND required_attributes[1] AND ...)
+   * AND
+   * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+   * ...)
+   * AND
+   * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+   * ...)
+   * ```
+   *
+   * Restricts the response to vehicles with the specified attributes. This
+   * field is a conjunction/AND operation. A max of 50 required_attributes is
+   * allowed. This matches the maximum number of attributes allowed on a
+   * vehicle. Each repeated string should be of the format "key:value".
+   * 
+ * + * repeated string required_attributes = 10; + * + * @param index The index of the value to return. + * @return The bytes of the requiredAttributes at the given index. + */ + public com.google.protobuf.ByteString getRequiredAttributesBytes(int index) { + return requiredAttributes_.getByteString(index); + } + + public static final int REQUIRED_ONE_OF_ATTRIBUTES_FIELD_NUMBER = 13; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList requiredOneOfAttributes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Restricts the response to vehicles with at least one of the specified
+   * attributes in each `VehicleAttributeList`. Within each list, a vehicle must
+   * match at least one of the attributes. This field is an inclusive
+   * disjunction/OR operation in each `VehicleAttributeList` and a
+   * conjunction/AND operation across the collection of `VehicleAttributeList`.
+   * Each repeated string should be of the format
+   * "key1:value1|key2:value2|key3:value3".
+   * 
+ * + * repeated string required_one_of_attributes = 13; + * + * @return A list containing the requiredOneOfAttributes. + */ + public com.google.protobuf.ProtocolStringList getRequiredOneOfAttributesList() { + return requiredOneOfAttributes_; + } + /** + * + * + *
+   * Restricts the response to vehicles with at least one of the specified
+   * attributes in each `VehicleAttributeList`. Within each list, a vehicle must
+   * match at least one of the attributes. This field is an inclusive
+   * disjunction/OR operation in each `VehicleAttributeList` and a
+   * conjunction/AND operation across the collection of `VehicleAttributeList`.
+   * Each repeated string should be of the format
+   * "key1:value1|key2:value2|key3:value3".
+   * 
+ * + * repeated string required_one_of_attributes = 13; + * + * @return The count of requiredOneOfAttributes. + */ + public int getRequiredOneOfAttributesCount() { + return requiredOneOfAttributes_.size(); + } + /** + * + * + *
+   * Restricts the response to vehicles with at least one of the specified
+   * attributes in each `VehicleAttributeList`. Within each list, a vehicle must
+   * match at least one of the attributes. This field is an inclusive
+   * disjunction/OR operation in each `VehicleAttributeList` and a
+   * conjunction/AND operation across the collection of `VehicleAttributeList`.
+   * Each repeated string should be of the format
+   * "key1:value1|key2:value2|key3:value3".
+   * 
+ * + * repeated string required_one_of_attributes = 13; + * + * @param index The index of the element to return. + * @return The requiredOneOfAttributes at the given index. + */ + public java.lang.String getRequiredOneOfAttributes(int index) { + return requiredOneOfAttributes_.get(index); + } + /** + * + * + *
+   * Restricts the response to vehicles with at least one of the specified
+   * attributes in each `VehicleAttributeList`. Within each list, a vehicle must
+   * match at least one of the attributes. This field is an inclusive
+   * disjunction/OR operation in each `VehicleAttributeList` and a
+   * conjunction/AND operation across the collection of `VehicleAttributeList`.
+   * Each repeated string should be of the format
+   * "key1:value1|key2:value2|key3:value3".
+   * 
+ * + * repeated string required_one_of_attributes = 13; + * + * @param index The index of the value to return. + * @return The bytes of the requiredOneOfAttributes at the given index. + */ + public com.google.protobuf.ByteString getRequiredOneOfAttributesBytes(int index) { + return requiredOneOfAttributes_.getByteString(index); + } + + public static final int REQUIRED_ONE_OF_ATTRIBUTE_SETS_FIELD_NUMBER = 15; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList requiredOneOfAttributeSets_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * `required_one_of_attribute_sets` provides additional functionality.
+   *
+   * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+   * uses a message which allows a list of lists, allowing expressions such as
+   * this one:
+   *
+   * ```
+   * (required_attributes[0] AND required_attributes[1] AND ...)
+   * AND
+   * (
+   *   (required_one_of_attribute_sets[0][0] AND
+   *   required_one_of_attribute_sets[0][1] AND
+   *   ...)
+   *   OR
+   *   (required_one_of_attribute_sets[1][0] AND
+   *   required_one_of_attribute_sets[1][1] AND
+   *   ...)
+   * )
+   * ```
+   *
+   * Restricts the response to vehicles that match all the attributes in a
+   * `VehicleAttributeList`. Within each list, a vehicle must match all of the
+   * attributes. This field is a conjunction/AND operation in each
+   * `VehicleAttributeList` and inclusive disjunction/OR operation across the
+   * collection of `VehicleAttributeList`. Each repeated string should be of the
+   * format "key1:value1|key2:value2|key3:value3".
+   * 
+ * + * repeated string required_one_of_attribute_sets = 15; + * + * @return A list containing the requiredOneOfAttributeSets. + */ + public com.google.protobuf.ProtocolStringList getRequiredOneOfAttributeSetsList() { + return requiredOneOfAttributeSets_; + } + /** + * + * + *
+   * `required_one_of_attribute_sets` provides additional functionality.
+   *
+   * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+   * uses a message which allows a list of lists, allowing expressions such as
+   * this one:
+   *
+   * ```
+   * (required_attributes[0] AND required_attributes[1] AND ...)
+   * AND
+   * (
+   *   (required_one_of_attribute_sets[0][0] AND
+   *   required_one_of_attribute_sets[0][1] AND
+   *   ...)
+   *   OR
+   *   (required_one_of_attribute_sets[1][0] AND
+   *   required_one_of_attribute_sets[1][1] AND
+   *   ...)
+   * )
+   * ```
+   *
+   * Restricts the response to vehicles that match all the attributes in a
+   * `VehicleAttributeList`. Within each list, a vehicle must match all of the
+   * attributes. This field is a conjunction/AND operation in each
+   * `VehicleAttributeList` and inclusive disjunction/OR operation across the
+   * collection of `VehicleAttributeList`. Each repeated string should be of the
+   * format "key1:value1|key2:value2|key3:value3".
+   * 
+ * + * repeated string required_one_of_attribute_sets = 15; + * + * @return The count of requiredOneOfAttributeSets. + */ + public int getRequiredOneOfAttributeSetsCount() { + return requiredOneOfAttributeSets_.size(); + } + /** + * + * + *
+   * `required_one_of_attribute_sets` provides additional functionality.
+   *
+   * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+   * uses a message which allows a list of lists, allowing expressions such as
+   * this one:
+   *
+   * ```
+   * (required_attributes[0] AND required_attributes[1] AND ...)
+   * AND
+   * (
+   *   (required_one_of_attribute_sets[0][0] AND
+   *   required_one_of_attribute_sets[0][1] AND
+   *   ...)
+   *   OR
+   *   (required_one_of_attribute_sets[1][0] AND
+   *   required_one_of_attribute_sets[1][1] AND
+   *   ...)
+   * )
+   * ```
+   *
+   * Restricts the response to vehicles that match all the attributes in a
+   * `VehicleAttributeList`. Within each list, a vehicle must match all of the
+   * attributes. This field is a conjunction/AND operation in each
+   * `VehicleAttributeList` and inclusive disjunction/OR operation across the
+   * collection of `VehicleAttributeList`. Each repeated string should be of the
+   * format "key1:value1|key2:value2|key3:value3".
+   * 
+ * + * repeated string required_one_of_attribute_sets = 15; + * + * @param index The index of the element to return. + * @return The requiredOneOfAttributeSets at the given index. + */ + public java.lang.String getRequiredOneOfAttributeSets(int index) { + return requiredOneOfAttributeSets_.get(index); + } + /** + * + * + *
+   * `required_one_of_attribute_sets` provides additional functionality.
+   *
+   * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+   * uses a message which allows a list of lists, allowing expressions such as
+   * this one:
+   *
+   * ```
+   * (required_attributes[0] AND required_attributes[1] AND ...)
+   * AND
+   * (
+   *   (required_one_of_attribute_sets[0][0] AND
+   *   required_one_of_attribute_sets[0][1] AND
+   *   ...)
+   *   OR
+   *   (required_one_of_attribute_sets[1][0] AND
+   *   required_one_of_attribute_sets[1][1] AND
+   *   ...)
+   * )
+   * ```
+   *
+   * Restricts the response to vehicles that match all the attributes in a
+   * `VehicleAttributeList`. Within each list, a vehicle must match all of the
+   * attributes. This field is a conjunction/AND operation in each
+   * `VehicleAttributeList` and inclusive disjunction/OR operation across the
+   * collection of `VehicleAttributeList`. Each repeated string should be of the
+   * format "key1:value1|key2:value2|key3:value3".
+   * 
+ * + * repeated string required_one_of_attribute_sets = 15; + * + * @param index The index of the value to return. + * @return The bytes of the requiredOneOfAttributeSets at the given index. + */ + public com.google.protobuf.ByteString getRequiredOneOfAttributeSetsBytes(int index) { + return requiredOneOfAttributeSets_.getByteString(index); + } + + public static final int VEHICLE_STATE_FIELD_NUMBER = 11; + private int vehicleState_ = 0; + /** + * + * + *
+   * Restricts the response to vehicles that have this vehicle state.
+   * 
+ * + * .maps.fleetengine.v1.VehicleState vehicle_state = 11; + * + * @return The enum numeric value on the wire for vehicleState. + */ + @java.lang.Override + public int getVehicleStateValue() { + return vehicleState_; + } + /** + * + * + *
+   * Restricts the response to vehicles that have this vehicle state.
+   * 
+ * + * .maps.fleetengine.v1.VehicleState vehicle_state = 11; + * + * @return The vehicleState. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleState getVehicleState() { + com.google.maps.fleetengine.v1.VehicleState result = + com.google.maps.fleetengine.v1.VehicleState.forNumber(vehicleState_); + return result == null ? com.google.maps.fleetengine.v1.VehicleState.UNRECOGNIZED : result; + } + + public static final int ON_TRIP_ONLY_FIELD_NUMBER = 14; + private boolean onTripOnly_ = false; + /** + * + * + *
+   * Only return the vehicles with current trip(s).
+   * 
+ * + * bool on_trip_only = 14; + * + * @return The onTripOnly. + */ + @java.lang.Override + public boolean getOnTripOnly() { + return onTripOnly_; + } + + public static final int FILTER_FIELD_NUMBER = 16; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Optional. A filter query to apply when listing vehicles. See
+   * http://aip.dev/160 for examples of the filter syntax.
+   *
+   * This field is designed to replace the `required_attributes`,
+   * `required_one_of_attributes`, and `required_one_of_attributes_sets` fields.
+   * If a non-empty value is specified here, the following fields must be empty:
+   * `required_attributes`, `required_one_of_attributes`, and
+   * `required_one_of_attributes_sets`.
+   *
+   * This filter functions as an AND clause with other constraints,
+   * such as `vehicle_state` or `on_trip_only`.
+   *
+   * Note that the only queries supported are on vehicle attributes (for
+   * example, `attributes.<key> = <value>` or `attributes.<key1> = <value1> AND
+   * attributes.<key2> = <value2>`). The maximum number of restrictions allowed
+   * in a filter query is 50.
+   *
+   * Also, all attributes are stored as strings, so the only supported
+   * comparisons against attributes are string comparisons. In order to compare
+   * against number or boolean values, the values must be explicitly quoted to
+   * be treated as strings (for example, `attributes.<key> = "10"` or
+   * `attributes.<key> = "true"`).
+   * 
+ * + * string filter = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A filter query to apply when listing vehicles. See
+   * http://aip.dev/160 for examples of the filter syntax.
+   *
+   * This field is designed to replace the `required_attributes`,
+   * `required_one_of_attributes`, and `required_one_of_attributes_sets` fields.
+   * If a non-empty value is specified here, the following fields must be empty:
+   * `required_attributes`, `required_one_of_attributes`, and
+   * `required_one_of_attributes_sets`.
+   *
+   * This filter functions as an AND clause with other constraints,
+   * such as `vehicle_state` or `on_trip_only`.
+   *
+   * Note that the only queries supported are on vehicle attributes (for
+   * example, `attributes.<key> = <value>` or `attributes.<key1> = <value1> AND
+   * attributes.<key2> = <value2>`). The maximum number of restrictions allowed
+   * in a filter query is 50.
+   *
+   * Also, all attributes are stored as strings, so the only supported
+   * comparisons against attributes are string comparisons. In order to compare
+   * against number or boolean values, the values must be explicitly quoted to
+   * be treated as strings (for example, `attributes.<key> = "10"` or
+   * `attributes.<key> = "true"`).
+   * 
+ * + * string filter = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIEWPORT_FIELD_NUMBER = 17; + private com.google.geo.type.Viewport viewport_; + /** + * + * + *
+   * Optional. A filter that limits the vehicles returned to those whose last
+   * known location was in the rectangular area defined by the viewport.
+   * 
+ * + * .google.geo.type.Viewport viewport = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the viewport field is set. + */ + @java.lang.Override + public boolean hasViewport() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * Optional. A filter that limits the vehicles returned to those whose last
+   * known location was in the rectangular area defined by the viewport.
+   * 
+ * + * .google.geo.type.Viewport viewport = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The viewport. + */ + @java.lang.Override + public com.google.geo.type.Viewport getViewport() { + return viewport_ == null ? com.google.geo.type.Viewport.getDefaultInstance() : viewport_; + } + /** + * + * + *
+   * Optional. A filter that limits the vehicles returned to those whose last
+   * known location was in the rectangular area defined by the viewport.
+   * 
+ * + * .google.geo.type.Viewport viewport = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.geo.type.ViewportOrBuilder getViewportOrBuilder() { + return viewport_ == null ? com.google.geo.type.Viewport.getDefaultInstance() : viewport_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getMinimumCapacity()); + } + if (getTripTypesList().size() > 0) { + output.writeUInt32NoTag(58); + output.writeUInt32NoTag(tripTypesMemoizedSerializedSize); + } + for (int i = 0; i < tripTypes_.size(); i++) { + output.writeEnumNoTag(tripTypes_.get(i)); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(8, getMaximumStaleness()); + } + if (getVehicleTypeCategoriesList().size() > 0) { + output.writeUInt32NoTag(74); + output.writeUInt32NoTag(vehicleTypeCategoriesMemoizedSerializedSize); + } + for (int i = 0; i < vehicleTypeCategories_.size(); i++) { + output.writeEnumNoTag(vehicleTypeCategories_.get(i)); + } + for (int i = 0; i < requiredAttributes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, requiredAttributes_.getRaw(i)); + } + if (vehicleState_ + != com.google.maps.fleetengine.v1.VehicleState.UNKNOWN_VEHICLE_STATE.getNumber()) { + output.writeEnum(11, vehicleState_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(12, getHeader()); + } + for (int i = 0; i < requiredOneOfAttributes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 13, requiredOneOfAttributes_.getRaw(i)); + } + if (onTripOnly_ != false) { + output.writeBool(14, onTripOnly_); + } + for (int i = 0; i < requiredOneOfAttributeSets_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 15, requiredOneOfAttributeSets_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 16, filter_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(17, getViewport()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getMinimumCapacity()); + } + { + int dataSize = 0; + for (int i = 0; i < tripTypes_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(tripTypes_.get(i)); + } + size += dataSize; + if (!getTripTypesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + tripTypesMemoizedSerializedSize = dataSize; + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getMaximumStaleness()); + } + { + int dataSize = 0; + for (int i = 0; i < vehicleTypeCategories_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag( + vehicleTypeCategories_.get(i)); + } + size += dataSize; + if (!getVehicleTypeCategoriesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + vehicleTypeCategoriesMemoizedSerializedSize = dataSize; + } + { + int dataSize = 0; + for (int i = 0; i < requiredAttributes_.size(); i++) { + dataSize += computeStringSizeNoTag(requiredAttributes_.getRaw(i)); + } + size += dataSize; + size += 1 * getRequiredAttributesList().size(); + } + if (vehicleState_ + != com.google.maps.fleetengine.v1.VehicleState.UNKNOWN_VEHICLE_STATE.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, vehicleState_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getHeader()); + } + { + int dataSize = 0; + for (int i = 0; i < requiredOneOfAttributes_.size(); i++) { + dataSize += computeStringSizeNoTag(requiredOneOfAttributes_.getRaw(i)); + } + size += dataSize; + size += 1 * getRequiredOneOfAttributesList().size(); + } + if (onTripOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(14, onTripOnly_); + } + { + int dataSize = 0; + for (int i = 0; i < requiredOneOfAttributeSets_.size(); i++) { + dataSize += computeStringSizeNoTag(requiredOneOfAttributeSets_.getRaw(i)); + } + size += dataSize; + size += 1 * getRequiredOneOfAttributeSetsList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, filter_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, getViewport()); + } + 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.fleetengine.v1.ListVehiclesRequest)) { + return super.equals(obj); + } + com.google.maps.fleetengine.v1.ListVehiclesRequest other = + (com.google.maps.fleetengine.v1.ListVehiclesRequest) obj; + + if (hasHeader() != other.hasHeader()) return false; + if (hasHeader()) { + if (!getHeader().equals(other.getHeader())) return false; + } + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (hasMinimumCapacity() != other.hasMinimumCapacity()) return false; + if (hasMinimumCapacity()) { + if (!getMinimumCapacity().equals(other.getMinimumCapacity())) return false; + } + if (!tripTypes_.equals(other.tripTypes_)) return false; + if (hasMaximumStaleness() != other.hasMaximumStaleness()) return false; + if (hasMaximumStaleness()) { + if (!getMaximumStaleness().equals(other.getMaximumStaleness())) return false; + } + if (!vehicleTypeCategories_.equals(other.vehicleTypeCategories_)) return false; + if (!getRequiredAttributesList().equals(other.getRequiredAttributesList())) return false; + if (!getRequiredOneOfAttributesList().equals(other.getRequiredOneOfAttributesList())) + return false; + if (!getRequiredOneOfAttributeSetsList().equals(other.getRequiredOneOfAttributeSetsList())) + return false; + if (vehicleState_ != other.vehicleState_) return false; + if (getOnTripOnly() != other.getOnTripOnly()) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (hasViewport() != other.hasViewport()) return false; + if (hasViewport()) { + if (!getViewport().equals(other.getViewport())) 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 (hasHeader()) { + hash = (37 * hash) + HEADER_FIELD_NUMBER; + hash = (53 * hash) + getHeader().hashCode(); + } + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + if (hasMinimumCapacity()) { + hash = (37 * hash) + MINIMUM_CAPACITY_FIELD_NUMBER; + hash = (53 * hash) + getMinimumCapacity().hashCode(); + } + if (getTripTypesCount() > 0) { + hash = (37 * hash) + TRIP_TYPES_FIELD_NUMBER; + hash = (53 * hash) + tripTypes_.hashCode(); + } + if (hasMaximumStaleness()) { + hash = (37 * hash) + MAXIMUM_STALENESS_FIELD_NUMBER; + hash = (53 * hash) + getMaximumStaleness().hashCode(); + } + if (getVehicleTypeCategoriesCount() > 0) { + hash = (37 * hash) + VEHICLE_TYPE_CATEGORIES_FIELD_NUMBER; + hash = (53 * hash) + vehicleTypeCategories_.hashCode(); + } + if (getRequiredAttributesCount() > 0) { + hash = (37 * hash) + REQUIRED_ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getRequiredAttributesList().hashCode(); + } + if (getRequiredOneOfAttributesCount() > 0) { + hash = (37 * hash) + REQUIRED_ONE_OF_ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getRequiredOneOfAttributesList().hashCode(); + } + if (getRequiredOneOfAttributeSetsCount() > 0) { + hash = (37 * hash) + REQUIRED_ONE_OF_ATTRIBUTE_SETS_FIELD_NUMBER; + hash = (53 * hash) + getRequiredOneOfAttributeSetsList().hashCode(); + } + hash = (37 * hash) + VEHICLE_STATE_FIELD_NUMBER; + hash = (53 * hash) + vehicleState_; + hash = (37 * hash) + ON_TRIP_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getOnTripOnly()); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + if (hasViewport()) { + hash = (37 * hash) + VIEWPORT_FIELD_NUMBER; + hash = (53 * hash) + getViewport().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.fleetengine.v1.ListVehiclesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.ListVehiclesRequest 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.fleetengine.v1.ListVehiclesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.ListVehiclesRequest 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.fleetengine.v1.ListVehiclesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.ListVehiclesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.ListVehiclesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.ListVehiclesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.ListVehiclesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.ListVehiclesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.ListVehiclesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.ListVehiclesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.fleetengine.v1.ListVehiclesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * `ListVehicles` request message.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.v1.ListVehiclesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.v1.ListVehiclesRequest) + com.google.maps.fleetengine.v1.ListVehiclesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_ListVehiclesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_ListVehiclesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.ListVehiclesRequest.class, + com.google.maps.fleetengine.v1.ListVehiclesRequest.Builder.class); + } + + // Construct using com.google.maps.fleetengine.v1.ListVehiclesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getHeaderFieldBuilder(); + getMinimumCapacityFieldBuilder(); + getMaximumStalenessFieldBuilder(); + getViewportFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + minimumCapacity_ = null; + if (minimumCapacityBuilder_ != null) { + minimumCapacityBuilder_.dispose(); + minimumCapacityBuilder_ = null; + } + tripTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + maximumStaleness_ = null; + if (maximumStalenessBuilder_ != null) { + maximumStalenessBuilder_.dispose(); + maximumStalenessBuilder_ = null; + } + vehicleTypeCategories_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + requiredAttributes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + requiredOneOfAttributes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + requiredOneOfAttributeSets_ = com.google.protobuf.LazyStringArrayList.emptyList(); + vehicleState_ = 0; + onTripOnly_ = false; + filter_ = ""; + viewport_ = null; + if (viewportBuilder_ != null) { + viewportBuilder_.dispose(); + viewportBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_ListVehiclesRequest_descriptor; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.ListVehiclesRequest getDefaultInstanceForType() { + return com.google.maps.fleetengine.v1.ListVehiclesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.ListVehiclesRequest build() { + com.google.maps.fleetengine.v1.ListVehiclesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.ListVehiclesRequest buildPartial() { + com.google.maps.fleetengine.v1.ListVehiclesRequest result = + new com.google.maps.fleetengine.v1.ListVehiclesRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.maps.fleetengine.v1.ListVehiclesRequest result) { + if (((bitField0_ & 0x00000020) != 0)) { + tripTypes_ = java.util.Collections.unmodifiableList(tripTypes_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.tripTypes_ = tripTypes_; + if (((bitField0_ & 0x00000080) != 0)) { + vehicleTypeCategories_ = java.util.Collections.unmodifiableList(vehicleTypeCategories_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.vehicleTypeCategories_ = vehicleTypeCategories_; + } + + private void buildPartial0(com.google.maps.fleetengine.v1.ListVehiclesRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.header_ = headerBuilder_ == null ? header_ : headerBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.minimumCapacity_ = + minimumCapacityBuilder_ == null ? minimumCapacity_ : minimumCapacityBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.maximumStaleness_ = + maximumStalenessBuilder_ == null ? maximumStaleness_ : maximumStalenessBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + requiredAttributes_.makeImmutable(); + result.requiredAttributes_ = requiredAttributes_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + requiredOneOfAttributes_.makeImmutable(); + result.requiredOneOfAttributes_ = requiredOneOfAttributes_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + requiredOneOfAttributeSets_.makeImmutable(); + result.requiredOneOfAttributeSets_ = requiredOneOfAttributeSets_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.vehicleState_ = vehicleState_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.onTripOnly_ = onTripOnly_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.viewport_ = viewportBuilder_ == null ? viewport_ : viewportBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.fleetengine.v1.ListVehiclesRequest) { + return mergeFrom((com.google.maps.fleetengine.v1.ListVehiclesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.fleetengine.v1.ListVehiclesRequest other) { + if (other == com.google.maps.fleetengine.v1.ListVehiclesRequest.getDefaultInstance()) + return this; + if (other.hasHeader()) { + mergeHeader(other.getHeader()); + } + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasMinimumCapacity()) { + mergeMinimumCapacity(other.getMinimumCapacity()); + } + if (!other.tripTypes_.isEmpty()) { + if (tripTypes_.isEmpty()) { + tripTypes_ = other.tripTypes_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureTripTypesIsMutable(); + tripTypes_.addAll(other.tripTypes_); + } + onChanged(); + } + if (other.hasMaximumStaleness()) { + mergeMaximumStaleness(other.getMaximumStaleness()); + } + if (!other.vehicleTypeCategories_.isEmpty()) { + if (vehicleTypeCategories_.isEmpty()) { + vehicleTypeCategories_ = other.vehicleTypeCategories_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureVehicleTypeCategoriesIsMutable(); + vehicleTypeCategories_.addAll(other.vehicleTypeCategories_); + } + onChanged(); + } + if (!other.requiredAttributes_.isEmpty()) { + if (requiredAttributes_.isEmpty()) { + requiredAttributes_ = other.requiredAttributes_; + bitField0_ |= 0x00000100; + } else { + ensureRequiredAttributesIsMutable(); + requiredAttributes_.addAll(other.requiredAttributes_); + } + onChanged(); + } + if (!other.requiredOneOfAttributes_.isEmpty()) { + if (requiredOneOfAttributes_.isEmpty()) { + requiredOneOfAttributes_ = other.requiredOneOfAttributes_; + bitField0_ |= 0x00000200; + } else { + ensureRequiredOneOfAttributesIsMutable(); + requiredOneOfAttributes_.addAll(other.requiredOneOfAttributes_); + } + onChanged(); + } + if (!other.requiredOneOfAttributeSets_.isEmpty()) { + if (requiredOneOfAttributeSets_.isEmpty()) { + requiredOneOfAttributeSets_ = other.requiredOneOfAttributeSets_; + bitField0_ |= 0x00000400; + } else { + ensureRequiredOneOfAttributeSetsIsMutable(); + requiredOneOfAttributeSets_.addAll(other.requiredOneOfAttributeSets_); + } + onChanged(); + } + if (other.vehicleState_ != 0) { + setVehicleStateValue(other.getVehicleStateValue()); + } + if (other.getOnTripOnly() != false) { + setOnTripOnly(other.getOnTripOnly()); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00002000; + onChanged(); + } + if (other.hasViewport()) { + mergeViewport(other.getViewport()); + } + 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_ |= 0x00000002; + break; + } // case 10 + case 24: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 50: + { + input.readMessage(getMinimumCapacityFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 50 + case 56: + { + int tmpRaw = input.readEnum(); + ensureTripTypesIsMutable(); + tripTypes_.add(tmpRaw); + break; + } // case 56 + case 58: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureTripTypesIsMutable(); + tripTypes_.add(tmpRaw); + } + input.popLimit(oldLimit); + break; + } // case 58 + case 66: + { + input.readMessage( + getMaximumStalenessFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 66 + case 72: + { + int tmpRaw = input.readEnum(); + ensureVehicleTypeCategoriesIsMutable(); + vehicleTypeCategories_.add(tmpRaw); + break; + } // case 72 + case 74: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureVehicleTypeCategoriesIsMutable(); + vehicleTypeCategories_.add(tmpRaw); + } + input.popLimit(oldLimit); + break; + } // case 74 + case 82: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRequiredAttributesIsMutable(); + requiredAttributes_.add(s); + break; + } // case 82 + case 88: + { + vehicleState_ = input.readEnum(); + bitField0_ |= 0x00000800; + break; + } // case 88 + case 98: + { + input.readMessage(getHeaderFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 98 + case 106: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRequiredOneOfAttributesIsMutable(); + requiredOneOfAttributes_.add(s); + break; + } // case 106 + case 112: + { + onTripOnly_ = input.readBool(); + bitField0_ |= 0x00001000; + break; + } // case 112 + case 122: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRequiredOneOfAttributeSetsIsMutable(); + requiredOneOfAttributeSets_.add(s); + break; + } // case 122 + case 130: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 130 + case 138: + { + input.readMessage(getViewportFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 138 + 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.fleetengine.v1.RequestHeader header_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.RequestHeader, + com.google.maps.fleetengine.v1.RequestHeader.Builder, + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder> + headerBuilder_; + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 12; + * + * @return Whether the header field is set. + */ + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 12; + * + * @return The header. + */ + public com.google.maps.fleetengine.v1.RequestHeader getHeader() { + if (headerBuilder_ == null) { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } else { + return headerBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 12; + */ + public Builder setHeader(com.google.maps.fleetengine.v1.RequestHeader value) { + if (headerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + header_ = value; + } else { + headerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 12; + */ + public Builder setHeader(com.google.maps.fleetengine.v1.RequestHeader.Builder builderForValue) { + if (headerBuilder_ == null) { + header_ = builderForValue.build(); + } else { + headerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 12; + */ + public Builder mergeHeader(com.google.maps.fleetengine.v1.RequestHeader value) { + if (headerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && header_ != null + && header_ != com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance()) { + getHeaderBuilder().mergeFrom(value); + } else { + header_ = value; + } + } else { + headerBuilder_.mergeFrom(value); + } + if (header_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 12; + */ + public Builder clearHeader() { + bitField0_ = (bitField0_ & ~0x00000001); + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 12; + */ + public com.google.maps.fleetengine.v1.RequestHeader.Builder getHeaderBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getHeaderFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 12; + */ + public com.google.maps.fleetengine.v1.RequestHeaderOrBuilder getHeaderOrBuilder() { + if (headerBuilder_ != null) { + return headerBuilder_.getMessageOrBuilder(); + } else { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.RequestHeader, + com.google.maps.fleetengine.v1.RequestHeader.Builder, + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder> + getHeaderFieldBuilder() { + if (headerBuilder_ == null) { + headerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.RequestHeader, + com.google.maps.fleetengine.v1.RequestHeader.Builder, + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder>( + getHeader(), getParentForChildren(), isClean()); + header_ = null; + } + return headerBuilder_; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Must be in the format `providers/{provider}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * 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. Must be in the format `providers/{provider}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * 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. Must be in the format `providers/{provider}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * 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_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Must be in the format `providers/{provider}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Must be in the format `providers/{provider}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * 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_ |= 0x00000002; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of vehicles to return.
+     * Default value: 100.
+     * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of vehicles to return.
+     * Default value: 100.
+     * 
+ * + * int32 page_size = 3; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of vehicles to return.
+     * Default value: 100.
+     * 
+ * + * int32 page_size = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000004); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The value of the `next_page_token` provided by a previous call to
+     * `ListVehicles` so that you can paginate through groups of vehicles. The
+     * value is undefined if the filter criteria of the request is not the same as
+     * the filter criteria for the previous call to `ListVehicles`.
+     * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The value of the `next_page_token` provided by a previous call to
+     * `ListVehicles` so that you can paginate through groups of vehicles. The
+     * value is undefined if the filter criteria of the request is not the same as
+     * the filter criteria for the previous call to `ListVehicles`.
+     * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The value of the `next_page_token` provided by a previous call to
+     * `ListVehicles` so that you can paginate through groups of vehicles. The
+     * value is undefined if the filter criteria of the request is not the same as
+     * the filter criteria for the previous call to `ListVehicles`.
+     * 
+ * + * string page_token = 4; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The value of the `next_page_token` provided by a previous call to
+     * `ListVehicles` so that you can paginate through groups of vehicles. The
+     * value is undefined if the filter criteria of the request is not the same as
+     * the filter criteria for the previous call to `ListVehicles`.
+     * 
+ * + * string page_token = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The value of the `next_page_token` provided by a previous call to
+     * `ListVehicles` so that you can paginate through groups of vehicles. The
+     * value is undefined if the filter criteria of the request is not the same as
+     * the filter criteria for the previous call to `ListVehicles`.
+     * 
+ * + * string page_token = 4; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.Int32Value minimumCapacity_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + minimumCapacityBuilder_; + /** + * + * + *
+     * Specifies the required minimum capacity of the vehicle. All vehicles
+     * returned will have a `maximum_capacity` greater than or equal to this
+     * value. If set, must be greater or equal to 0.
+     * 
+ * + * .google.protobuf.Int32Value minimum_capacity = 6; + * + * @return Whether the minimumCapacity field is set. + */ + public boolean hasMinimumCapacity() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Specifies the required minimum capacity of the vehicle. All vehicles
+     * returned will have a `maximum_capacity` greater than or equal to this
+     * value. If set, must be greater or equal to 0.
+     * 
+ * + * .google.protobuf.Int32Value minimum_capacity = 6; + * + * @return The minimumCapacity. + */ + public com.google.protobuf.Int32Value getMinimumCapacity() { + if (minimumCapacityBuilder_ == null) { + return minimumCapacity_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : minimumCapacity_; + } else { + return minimumCapacityBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Specifies the required minimum capacity of the vehicle. All vehicles
+     * returned will have a `maximum_capacity` greater than or equal to this
+     * value. If set, must be greater or equal to 0.
+     * 
+ * + * .google.protobuf.Int32Value minimum_capacity = 6; + */ + public Builder setMinimumCapacity(com.google.protobuf.Int32Value value) { + if (minimumCapacityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + minimumCapacity_ = value; + } else { + minimumCapacityBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the required minimum capacity of the vehicle. All vehicles
+     * returned will have a `maximum_capacity` greater than or equal to this
+     * value. If set, must be greater or equal to 0.
+     * 
+ * + * .google.protobuf.Int32Value minimum_capacity = 6; + */ + public Builder setMinimumCapacity(com.google.protobuf.Int32Value.Builder builderForValue) { + if (minimumCapacityBuilder_ == null) { + minimumCapacity_ = builderForValue.build(); + } else { + minimumCapacityBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the required minimum capacity of the vehicle. All vehicles
+     * returned will have a `maximum_capacity` greater than or equal to this
+     * value. If set, must be greater or equal to 0.
+     * 
+ * + * .google.protobuf.Int32Value minimum_capacity = 6; + */ + public Builder mergeMinimumCapacity(com.google.protobuf.Int32Value value) { + if (minimumCapacityBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && minimumCapacity_ != null + && minimumCapacity_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getMinimumCapacityBuilder().mergeFrom(value); + } else { + minimumCapacity_ = value; + } + } else { + minimumCapacityBuilder_.mergeFrom(value); + } + if (minimumCapacity_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Specifies the required minimum capacity of the vehicle. All vehicles
+     * returned will have a `maximum_capacity` greater than or equal to this
+     * value. If set, must be greater or equal to 0.
+     * 
+ * + * .google.protobuf.Int32Value minimum_capacity = 6; + */ + public Builder clearMinimumCapacity() { + bitField0_ = (bitField0_ & ~0x00000010); + minimumCapacity_ = null; + if (minimumCapacityBuilder_ != null) { + minimumCapacityBuilder_.dispose(); + minimumCapacityBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the required minimum capacity of the vehicle. All vehicles
+     * returned will have a `maximum_capacity` greater than or equal to this
+     * value. If set, must be greater or equal to 0.
+     * 
+ * + * .google.protobuf.Int32Value minimum_capacity = 6; + */ + public com.google.protobuf.Int32Value.Builder getMinimumCapacityBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getMinimumCapacityFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Specifies the required minimum capacity of the vehicle. All vehicles
+     * returned will have a `maximum_capacity` greater than or equal to this
+     * value. If set, must be greater or equal to 0.
+     * 
+ * + * .google.protobuf.Int32Value minimum_capacity = 6; + */ + public com.google.protobuf.Int32ValueOrBuilder getMinimumCapacityOrBuilder() { + if (minimumCapacityBuilder_ != null) { + return minimumCapacityBuilder_.getMessageOrBuilder(); + } else { + return minimumCapacity_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : minimumCapacity_; + } + } + /** + * + * + *
+     * Specifies the required minimum capacity of the vehicle. All vehicles
+     * returned will have a `maximum_capacity` greater than or equal to this
+     * value. If set, must be greater or equal to 0.
+     * 
+ * + * .google.protobuf.Int32Value minimum_capacity = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + getMinimumCapacityFieldBuilder() { + if (minimumCapacityBuilder_ == null) { + minimumCapacityBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder>( + getMinimumCapacity(), getParentForChildren(), isClean()); + minimumCapacity_ = null; + } + return minimumCapacityBuilder_; + } + + private java.util.List tripTypes_ = java.util.Collections.emptyList(); + + private void ensureTripTypesIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + tripTypes_ = new java.util.ArrayList(tripTypes_); + bitField0_ |= 0x00000020; + } + } + /** + * + * + *
+     * Restricts the response to vehicles that support at least one of the
+     * specified trip types.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripType trip_types = 7; + * + * @return A list containing the tripTypes. + */ + public java.util.List getTripTypesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.maps.fleetengine.v1.TripType>( + tripTypes_, tripTypes_converter_); + } + /** + * + * + *
+     * Restricts the response to vehicles that support at least one of the
+     * specified trip types.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripType trip_types = 7; + * + * @return The count of tripTypes. + */ + public int getTripTypesCount() { + return tripTypes_.size(); + } + /** + * + * + *
+     * Restricts the response to vehicles that support at least one of the
+     * specified trip types.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripType trip_types = 7; + * + * @param index The index of the element to return. + * @return The tripTypes at the given index. + */ + public com.google.maps.fleetengine.v1.TripType getTripTypes(int index) { + return tripTypes_converter_.convert(tripTypes_.get(index)); + } + /** + * + * + *
+     * Restricts the response to vehicles that support at least one of the
+     * specified trip types.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripType trip_types = 7; + * + * @param index The index to set the value at. + * @param value The tripTypes to set. + * @return This builder for chaining. + */ + public Builder setTripTypes(int index, com.google.maps.fleetengine.v1.TripType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTripTypesIsMutable(); + tripTypes_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Restricts the response to vehicles that support at least one of the
+     * specified trip types.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripType trip_types = 7; + * + * @param value The tripTypes to add. + * @return This builder for chaining. + */ + public Builder addTripTypes(com.google.maps.fleetengine.v1.TripType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTripTypesIsMutable(); + tripTypes_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Restricts the response to vehicles that support at least one of the
+     * specified trip types.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripType trip_types = 7; + * + * @param values The tripTypes to add. + * @return This builder for chaining. + */ + public Builder addAllTripTypes( + java.lang.Iterable values) { + ensureTripTypesIsMutable(); + for (com.google.maps.fleetengine.v1.TripType value : values) { + tripTypes_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * Restricts the response to vehicles that support at least one of the
+     * specified trip types.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripType trip_types = 7; + * + * @return This builder for chaining. + */ + public Builder clearTripTypes() { + tripTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Restricts the response to vehicles that support at least one of the
+     * specified trip types.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripType trip_types = 7; + * + * @return A list containing the enum numeric values on the wire for tripTypes. + */ + public java.util.List getTripTypesValueList() { + return java.util.Collections.unmodifiableList(tripTypes_); + } + /** + * + * + *
+     * Restricts the response to vehicles that support at least one of the
+     * specified trip types.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripType trip_types = 7; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of tripTypes at the given index. + */ + public int getTripTypesValue(int index) { + return tripTypes_.get(index); + } + /** + * + * + *
+     * Restricts the response to vehicles that support at least one of the
+     * specified trip types.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripType trip_types = 7; + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for tripTypes to set. + * @return This builder for chaining. + */ + public Builder setTripTypesValue(int index, int value) { + ensureTripTypesIsMutable(); + tripTypes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Restricts the response to vehicles that support at least one of the
+     * specified trip types.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripType trip_types = 7; + * + * @param value The enum numeric value on the wire for tripTypes to add. + * @return This builder for chaining. + */ + public Builder addTripTypesValue(int value) { + ensureTripTypesIsMutable(); + tripTypes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Restricts the response to vehicles that support at least one of the
+     * specified trip types.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripType trip_types = 7; + * + * @param values The enum numeric values on the wire for tripTypes to add. + * @return This builder for chaining. + */ + public Builder addAllTripTypesValue(java.lang.Iterable values) { + ensureTripTypesIsMutable(); + for (int value : values) { + tripTypes_.add(value); + } + onChanged(); + return this; + } + + private com.google.protobuf.Duration maximumStaleness_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + maximumStalenessBuilder_; + /** + * + * + *
+     * Restricts the response to vehicles that have sent location updates to Fleet
+     * Engine within the specified duration. Stationary vehicles still
+     * transmitting their locations are not considered stale. If present, must be
+     * a valid positive duration.
+     * 
+ * + * .google.protobuf.Duration maximum_staleness = 8; + * + * @return Whether the maximumStaleness field is set. + */ + public boolean hasMaximumStaleness() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Restricts the response to vehicles that have sent location updates to Fleet
+     * Engine within the specified duration. Stationary vehicles still
+     * transmitting their locations are not considered stale. If present, must be
+     * a valid positive duration.
+     * 
+ * + * .google.protobuf.Duration maximum_staleness = 8; + * + * @return The maximumStaleness. + */ + public com.google.protobuf.Duration getMaximumStaleness() { + if (maximumStalenessBuilder_ == null) { + return maximumStaleness_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : maximumStaleness_; + } else { + return maximumStalenessBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Restricts the response to vehicles that have sent location updates to Fleet
+     * Engine within the specified duration. Stationary vehicles still
+     * transmitting their locations are not considered stale. If present, must be
+     * a valid positive duration.
+     * 
+ * + * .google.protobuf.Duration maximum_staleness = 8; + */ + public Builder setMaximumStaleness(com.google.protobuf.Duration value) { + if (maximumStalenessBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maximumStaleness_ = value; + } else { + maximumStalenessBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Restricts the response to vehicles that have sent location updates to Fleet
+     * Engine within the specified duration. Stationary vehicles still
+     * transmitting their locations are not considered stale. If present, must be
+     * a valid positive duration.
+     * 
+ * + * .google.protobuf.Duration maximum_staleness = 8; + */ + public Builder setMaximumStaleness(com.google.protobuf.Duration.Builder builderForValue) { + if (maximumStalenessBuilder_ == null) { + maximumStaleness_ = builderForValue.build(); + } else { + maximumStalenessBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Restricts the response to vehicles that have sent location updates to Fleet
+     * Engine within the specified duration. Stationary vehicles still
+     * transmitting their locations are not considered stale. If present, must be
+     * a valid positive duration.
+     * 
+ * + * .google.protobuf.Duration maximum_staleness = 8; + */ + public Builder mergeMaximumStaleness(com.google.protobuf.Duration value) { + if (maximumStalenessBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && maximumStaleness_ != null + && maximumStaleness_ != com.google.protobuf.Duration.getDefaultInstance()) { + getMaximumStalenessBuilder().mergeFrom(value); + } else { + maximumStaleness_ = value; + } + } else { + maximumStalenessBuilder_.mergeFrom(value); + } + if (maximumStaleness_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Restricts the response to vehicles that have sent location updates to Fleet
+     * Engine within the specified duration. Stationary vehicles still
+     * transmitting their locations are not considered stale. If present, must be
+     * a valid positive duration.
+     * 
+ * + * .google.protobuf.Duration maximum_staleness = 8; + */ + public Builder clearMaximumStaleness() { + bitField0_ = (bitField0_ & ~0x00000040); + maximumStaleness_ = null; + if (maximumStalenessBuilder_ != null) { + maximumStalenessBuilder_.dispose(); + maximumStalenessBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Restricts the response to vehicles that have sent location updates to Fleet
+     * Engine within the specified duration. Stationary vehicles still
+     * transmitting their locations are not considered stale. If present, must be
+     * a valid positive duration.
+     * 
+ * + * .google.protobuf.Duration maximum_staleness = 8; + */ + public com.google.protobuf.Duration.Builder getMaximumStalenessBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getMaximumStalenessFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Restricts the response to vehicles that have sent location updates to Fleet
+     * Engine within the specified duration. Stationary vehicles still
+     * transmitting their locations are not considered stale. If present, must be
+     * a valid positive duration.
+     * 
+ * + * .google.protobuf.Duration maximum_staleness = 8; + */ + public com.google.protobuf.DurationOrBuilder getMaximumStalenessOrBuilder() { + if (maximumStalenessBuilder_ != null) { + return maximumStalenessBuilder_.getMessageOrBuilder(); + } else { + return maximumStaleness_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : maximumStaleness_; + } + } + /** + * + * + *
+     * Restricts the response to vehicles that have sent location updates to Fleet
+     * Engine within the specified duration. Stationary vehicles still
+     * transmitting their locations are not considered stale. If present, must be
+     * a valid positive duration.
+     * 
+ * + * .google.protobuf.Duration maximum_staleness = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getMaximumStalenessFieldBuilder() { + if (maximumStalenessBuilder_ == null) { + maximumStalenessBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getMaximumStaleness(), getParentForChildren(), isClean()); + maximumStaleness_ = null; + } + return maximumStalenessBuilder_; + } + + private java.util.List vehicleTypeCategories_ = + java.util.Collections.emptyList(); + + private void ensureVehicleTypeCategoriesIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + vehicleTypeCategories_ = new java.util.ArrayList(vehicleTypeCategories_); + bitField0_ |= 0x00000080; + } + } + /** + * + * + *
+     * Required. Restricts the response to vehicles with one of the specified type
+     * categories. `UNKNOWN` is not allowed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType.Category vehicle_type_categories = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the vehicleTypeCategories. + */ + public java.util.List + getVehicleTypeCategoriesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.maps.fleetengine.v1.Vehicle.VehicleType.Category>( + vehicleTypeCategories_, vehicleTypeCategories_converter_); + } + /** + * + * + *
+     * Required. Restricts the response to vehicles with one of the specified type
+     * categories. `UNKNOWN` is not allowed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType.Category vehicle_type_categories = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of vehicleTypeCategories. + */ + public int getVehicleTypeCategoriesCount() { + return vehicleTypeCategories_.size(); + } + /** + * + * + *
+     * Required. Restricts the response to vehicles with one of the specified type
+     * categories. `UNKNOWN` is not allowed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType.Category vehicle_type_categories = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The vehicleTypeCategories at the given index. + */ + public com.google.maps.fleetengine.v1.Vehicle.VehicleType.Category getVehicleTypeCategories( + int index) { + return vehicleTypeCategories_converter_.convert(vehicleTypeCategories_.get(index)); + } + /** + * + * + *
+     * Required. Restricts the response to vehicles with one of the specified type
+     * categories. `UNKNOWN` is not allowed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType.Category vehicle_type_categories = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index to set the value at. + * @param value The vehicleTypeCategories to set. + * @return This builder for chaining. + */ + public Builder setVehicleTypeCategories( + int index, com.google.maps.fleetengine.v1.Vehicle.VehicleType.Category value) { + if (value == null) { + throw new NullPointerException(); + } + ensureVehicleTypeCategoriesIsMutable(); + vehicleTypeCategories_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Restricts the response to vehicles with one of the specified type
+     * categories. `UNKNOWN` is not allowed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType.Category vehicle_type_categories = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The vehicleTypeCategories to add. + * @return This builder for chaining. + */ + public Builder addVehicleTypeCategories( + com.google.maps.fleetengine.v1.Vehicle.VehicleType.Category value) { + if (value == null) { + throw new NullPointerException(); + } + ensureVehicleTypeCategoriesIsMutable(); + vehicleTypeCategories_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Restricts the response to vehicles with one of the specified type
+     * categories. `UNKNOWN` is not allowed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType.Category vehicle_type_categories = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param values The vehicleTypeCategories to add. + * @return This builder for chaining. + */ + public Builder addAllVehicleTypeCategories( + java.lang.Iterable + values) { + ensureVehicleTypeCategoriesIsMutable(); + for (com.google.maps.fleetengine.v1.Vehicle.VehicleType.Category value : values) { + vehicleTypeCategories_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Restricts the response to vehicles with one of the specified type
+     * categories. `UNKNOWN` is not allowed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType.Category vehicle_type_categories = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearVehicleTypeCategories() { + vehicleTypeCategories_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Restricts the response to vehicles with one of the specified type
+     * categories. `UNKNOWN` is not allowed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType.Category vehicle_type_categories = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the enum numeric values on the wire for vehicleTypeCategories. + */ + public java.util.List getVehicleTypeCategoriesValueList() { + return java.util.Collections.unmodifiableList(vehicleTypeCategories_); + } + /** + * + * + *
+     * Required. Restricts the response to vehicles with one of the specified type
+     * categories. `UNKNOWN` is not allowed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType.Category vehicle_type_categories = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of vehicleTypeCategories at the given index. + */ + public int getVehicleTypeCategoriesValue(int index) { + return vehicleTypeCategories_.get(index); + } + /** + * + * + *
+     * Required. Restricts the response to vehicles with one of the specified type
+     * categories. `UNKNOWN` is not allowed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType.Category vehicle_type_categories = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for vehicleTypeCategories to set. + * @return This builder for chaining. + */ + public Builder setVehicleTypeCategoriesValue(int index, int value) { + ensureVehicleTypeCategoriesIsMutable(); + vehicleTypeCategories_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Restricts the response to vehicles with one of the specified type
+     * categories. `UNKNOWN` is not allowed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType.Category vehicle_type_categories = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for vehicleTypeCategories to add. + * @return This builder for chaining. + */ + public Builder addVehicleTypeCategoriesValue(int value) { + ensureVehicleTypeCategoriesIsMutable(); + vehicleTypeCategories_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Restricts the response to vehicles with one of the specified type
+     * categories. `UNKNOWN` is not allowed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType.Category vehicle_type_categories = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param values The enum numeric values on the wire for vehicleTypeCategories to add. + * @return This builder for chaining. + */ + public Builder addAllVehicleTypeCategoriesValue(java.lang.Iterable values) { + ensureVehicleTypeCategoriesIsMutable(); + for (int value : values) { + vehicleTypeCategories_.add(value); + } + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList requiredAttributes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureRequiredAttributesIsMutable() { + if (!requiredAttributes_.isModifiable()) { + requiredAttributes_ = new com.google.protobuf.LazyStringArrayList(requiredAttributes_); + } + bitField0_ |= 0x00000100; + } + /** + * + * + *
+     * Callers can form complex logical operations using any combination of the
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attribute_sets` fields.
+     *
+     * `required_attributes` is a list; `required_one_of_attributes` uses a
+     * message which allows a list of lists. In combination, the two fields allow
+     * the composition of this expression:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+     * ...)
+     * AND
+     * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+     * ...)
+     * ```
+     *
+     * Restricts the response to vehicles with the specified attributes. This
+     * field is a conjunction/AND operation. A max of 50 required_attributes is
+     * allowed. This matches the maximum number of attributes allowed on a
+     * vehicle. Each repeated string should be of the format "key:value".
+     * 
+ * + * repeated string required_attributes = 10; + * + * @return A list containing the requiredAttributes. + */ + public com.google.protobuf.ProtocolStringList getRequiredAttributesList() { + requiredAttributes_.makeImmutable(); + return requiredAttributes_; + } + /** + * + * + *
+     * Callers can form complex logical operations using any combination of the
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attribute_sets` fields.
+     *
+     * `required_attributes` is a list; `required_one_of_attributes` uses a
+     * message which allows a list of lists. In combination, the two fields allow
+     * the composition of this expression:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+     * ...)
+     * AND
+     * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+     * ...)
+     * ```
+     *
+     * Restricts the response to vehicles with the specified attributes. This
+     * field is a conjunction/AND operation. A max of 50 required_attributes is
+     * allowed. This matches the maximum number of attributes allowed on a
+     * vehicle. Each repeated string should be of the format "key:value".
+     * 
+ * + * repeated string required_attributes = 10; + * + * @return The count of requiredAttributes. + */ + public int getRequiredAttributesCount() { + return requiredAttributes_.size(); + } + /** + * + * + *
+     * Callers can form complex logical operations using any combination of the
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attribute_sets` fields.
+     *
+     * `required_attributes` is a list; `required_one_of_attributes` uses a
+     * message which allows a list of lists. In combination, the two fields allow
+     * the composition of this expression:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+     * ...)
+     * AND
+     * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+     * ...)
+     * ```
+     *
+     * Restricts the response to vehicles with the specified attributes. This
+     * field is a conjunction/AND operation. A max of 50 required_attributes is
+     * allowed. This matches the maximum number of attributes allowed on a
+     * vehicle. Each repeated string should be of the format "key:value".
+     * 
+ * + * repeated string required_attributes = 10; + * + * @param index The index of the element to return. + * @return The requiredAttributes at the given index. + */ + public java.lang.String getRequiredAttributes(int index) { + return requiredAttributes_.get(index); + } + /** + * + * + *
+     * Callers can form complex logical operations using any combination of the
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attribute_sets` fields.
+     *
+     * `required_attributes` is a list; `required_one_of_attributes` uses a
+     * message which allows a list of lists. In combination, the two fields allow
+     * the composition of this expression:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+     * ...)
+     * AND
+     * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+     * ...)
+     * ```
+     *
+     * Restricts the response to vehicles with the specified attributes. This
+     * field is a conjunction/AND operation. A max of 50 required_attributes is
+     * allowed. This matches the maximum number of attributes allowed on a
+     * vehicle. Each repeated string should be of the format "key:value".
+     * 
+ * + * repeated string required_attributes = 10; + * + * @param index The index of the value to return. + * @return The bytes of the requiredAttributes at the given index. + */ + public com.google.protobuf.ByteString getRequiredAttributesBytes(int index) { + return requiredAttributes_.getByteString(index); + } + /** + * + * + *
+     * Callers can form complex logical operations using any combination of the
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attribute_sets` fields.
+     *
+     * `required_attributes` is a list; `required_one_of_attributes` uses a
+     * message which allows a list of lists. In combination, the two fields allow
+     * the composition of this expression:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+     * ...)
+     * AND
+     * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+     * ...)
+     * ```
+     *
+     * Restricts the response to vehicles with the specified attributes. This
+     * field is a conjunction/AND operation. A max of 50 required_attributes is
+     * allowed. This matches the maximum number of attributes allowed on a
+     * vehicle. Each repeated string should be of the format "key:value".
+     * 
+ * + * repeated string required_attributes = 10; + * + * @param index The index to set the value at. + * @param value The requiredAttributes to set. + * @return This builder for chaining. + */ + public Builder setRequiredAttributes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequiredAttributesIsMutable(); + requiredAttributes_.set(index, value); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Callers can form complex logical operations using any combination of the
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attribute_sets` fields.
+     *
+     * `required_attributes` is a list; `required_one_of_attributes` uses a
+     * message which allows a list of lists. In combination, the two fields allow
+     * the composition of this expression:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+     * ...)
+     * AND
+     * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+     * ...)
+     * ```
+     *
+     * Restricts the response to vehicles with the specified attributes. This
+     * field is a conjunction/AND operation. A max of 50 required_attributes is
+     * allowed. This matches the maximum number of attributes allowed on a
+     * vehicle. Each repeated string should be of the format "key:value".
+     * 
+ * + * repeated string required_attributes = 10; + * + * @param value The requiredAttributes to add. + * @return This builder for chaining. + */ + public Builder addRequiredAttributes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequiredAttributesIsMutable(); + requiredAttributes_.add(value); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Callers can form complex logical operations using any combination of the
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attribute_sets` fields.
+     *
+     * `required_attributes` is a list; `required_one_of_attributes` uses a
+     * message which allows a list of lists. In combination, the two fields allow
+     * the composition of this expression:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+     * ...)
+     * AND
+     * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+     * ...)
+     * ```
+     *
+     * Restricts the response to vehicles with the specified attributes. This
+     * field is a conjunction/AND operation. A max of 50 required_attributes is
+     * allowed. This matches the maximum number of attributes allowed on a
+     * vehicle. Each repeated string should be of the format "key:value".
+     * 
+ * + * repeated string required_attributes = 10; + * + * @param values The requiredAttributes to add. + * @return This builder for chaining. + */ + public Builder addAllRequiredAttributes(java.lang.Iterable values) { + ensureRequiredAttributesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, requiredAttributes_); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Callers can form complex logical operations using any combination of the
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attribute_sets` fields.
+     *
+     * `required_attributes` is a list; `required_one_of_attributes` uses a
+     * message which allows a list of lists. In combination, the two fields allow
+     * the composition of this expression:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+     * ...)
+     * AND
+     * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+     * ...)
+     * ```
+     *
+     * Restricts the response to vehicles with the specified attributes. This
+     * field is a conjunction/AND operation. A max of 50 required_attributes is
+     * allowed. This matches the maximum number of attributes allowed on a
+     * vehicle. Each repeated string should be of the format "key:value".
+     * 
+ * + * repeated string required_attributes = 10; + * + * @return This builder for chaining. + */ + public Builder clearRequiredAttributes() { + requiredAttributes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Callers can form complex logical operations using any combination of the
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attribute_sets` fields.
+     *
+     * `required_attributes` is a list; `required_one_of_attributes` uses a
+     * message which allows a list of lists. In combination, the two fields allow
+     * the composition of this expression:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+     * ...)
+     * AND
+     * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+     * ...)
+     * ```
+     *
+     * Restricts the response to vehicles with the specified attributes. This
+     * field is a conjunction/AND operation. A max of 50 required_attributes is
+     * allowed. This matches the maximum number of attributes allowed on a
+     * vehicle. Each repeated string should be of the format "key:value".
+     * 
+ * + * repeated string required_attributes = 10; + * + * @param value The bytes of the requiredAttributes to add. + * @return This builder for chaining. + */ + public Builder addRequiredAttributesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRequiredAttributesIsMutable(); + requiredAttributes_.add(value); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList requiredOneOfAttributes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureRequiredOneOfAttributesIsMutable() { + if (!requiredOneOfAttributes_.isModifiable()) { + requiredOneOfAttributes_ = + new com.google.protobuf.LazyStringArrayList(requiredOneOfAttributes_); + } + bitField0_ |= 0x00000200; + } + /** + * + * + *
+     * Restricts the response to vehicles with at least one of the specified
+     * attributes in each `VehicleAttributeList`. Within each list, a vehicle must
+     * match at least one of the attributes. This field is an inclusive
+     * disjunction/OR operation in each `VehicleAttributeList` and a
+     * conjunction/AND operation across the collection of `VehicleAttributeList`.
+     * Each repeated string should be of the format
+     * "key1:value1|key2:value2|key3:value3".
+     * 
+ * + * repeated string required_one_of_attributes = 13; + * + * @return A list containing the requiredOneOfAttributes. + */ + public com.google.protobuf.ProtocolStringList getRequiredOneOfAttributesList() { + requiredOneOfAttributes_.makeImmutable(); + return requiredOneOfAttributes_; + } + /** + * + * + *
+     * Restricts the response to vehicles with at least one of the specified
+     * attributes in each `VehicleAttributeList`. Within each list, a vehicle must
+     * match at least one of the attributes. This field is an inclusive
+     * disjunction/OR operation in each `VehicleAttributeList` and a
+     * conjunction/AND operation across the collection of `VehicleAttributeList`.
+     * Each repeated string should be of the format
+     * "key1:value1|key2:value2|key3:value3".
+     * 
+ * + * repeated string required_one_of_attributes = 13; + * + * @return The count of requiredOneOfAttributes. + */ + public int getRequiredOneOfAttributesCount() { + return requiredOneOfAttributes_.size(); + } + /** + * + * + *
+     * Restricts the response to vehicles with at least one of the specified
+     * attributes in each `VehicleAttributeList`. Within each list, a vehicle must
+     * match at least one of the attributes. This field is an inclusive
+     * disjunction/OR operation in each `VehicleAttributeList` and a
+     * conjunction/AND operation across the collection of `VehicleAttributeList`.
+     * Each repeated string should be of the format
+     * "key1:value1|key2:value2|key3:value3".
+     * 
+ * + * repeated string required_one_of_attributes = 13; + * + * @param index The index of the element to return. + * @return The requiredOneOfAttributes at the given index. + */ + public java.lang.String getRequiredOneOfAttributes(int index) { + return requiredOneOfAttributes_.get(index); + } + /** + * + * + *
+     * Restricts the response to vehicles with at least one of the specified
+     * attributes in each `VehicleAttributeList`. Within each list, a vehicle must
+     * match at least one of the attributes. This field is an inclusive
+     * disjunction/OR operation in each `VehicleAttributeList` and a
+     * conjunction/AND operation across the collection of `VehicleAttributeList`.
+     * Each repeated string should be of the format
+     * "key1:value1|key2:value2|key3:value3".
+     * 
+ * + * repeated string required_one_of_attributes = 13; + * + * @param index The index of the value to return. + * @return The bytes of the requiredOneOfAttributes at the given index. + */ + public com.google.protobuf.ByteString getRequiredOneOfAttributesBytes(int index) { + return requiredOneOfAttributes_.getByteString(index); + } + /** + * + * + *
+     * Restricts the response to vehicles with at least one of the specified
+     * attributes in each `VehicleAttributeList`. Within each list, a vehicle must
+     * match at least one of the attributes. This field is an inclusive
+     * disjunction/OR operation in each `VehicleAttributeList` and a
+     * conjunction/AND operation across the collection of `VehicleAttributeList`.
+     * Each repeated string should be of the format
+     * "key1:value1|key2:value2|key3:value3".
+     * 
+ * + * repeated string required_one_of_attributes = 13; + * + * @param index The index to set the value at. + * @param value The requiredOneOfAttributes to set. + * @return This builder for chaining. + */ + public Builder setRequiredOneOfAttributes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequiredOneOfAttributesIsMutable(); + requiredOneOfAttributes_.set(index, value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Restricts the response to vehicles with at least one of the specified
+     * attributes in each `VehicleAttributeList`. Within each list, a vehicle must
+     * match at least one of the attributes. This field is an inclusive
+     * disjunction/OR operation in each `VehicleAttributeList` and a
+     * conjunction/AND operation across the collection of `VehicleAttributeList`.
+     * Each repeated string should be of the format
+     * "key1:value1|key2:value2|key3:value3".
+     * 
+ * + * repeated string required_one_of_attributes = 13; + * + * @param value The requiredOneOfAttributes to add. + * @return This builder for chaining. + */ + public Builder addRequiredOneOfAttributes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequiredOneOfAttributesIsMutable(); + requiredOneOfAttributes_.add(value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Restricts the response to vehicles with at least one of the specified
+     * attributes in each `VehicleAttributeList`. Within each list, a vehicle must
+     * match at least one of the attributes. This field is an inclusive
+     * disjunction/OR operation in each `VehicleAttributeList` and a
+     * conjunction/AND operation across the collection of `VehicleAttributeList`.
+     * Each repeated string should be of the format
+     * "key1:value1|key2:value2|key3:value3".
+     * 
+ * + * repeated string required_one_of_attributes = 13; + * + * @param values The requiredOneOfAttributes to add. + * @return This builder for chaining. + */ + public Builder addAllRequiredOneOfAttributes(java.lang.Iterable values) { + ensureRequiredOneOfAttributesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, requiredOneOfAttributes_); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Restricts the response to vehicles with at least one of the specified
+     * attributes in each `VehicleAttributeList`. Within each list, a vehicle must
+     * match at least one of the attributes. This field is an inclusive
+     * disjunction/OR operation in each `VehicleAttributeList` and a
+     * conjunction/AND operation across the collection of `VehicleAttributeList`.
+     * Each repeated string should be of the format
+     * "key1:value1|key2:value2|key3:value3".
+     * 
+ * + * repeated string required_one_of_attributes = 13; + * + * @return This builder for chaining. + */ + public Builder clearRequiredOneOfAttributes() { + requiredOneOfAttributes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Restricts the response to vehicles with at least one of the specified
+     * attributes in each `VehicleAttributeList`. Within each list, a vehicle must
+     * match at least one of the attributes. This field is an inclusive
+     * disjunction/OR operation in each `VehicleAttributeList` and a
+     * conjunction/AND operation across the collection of `VehicleAttributeList`.
+     * Each repeated string should be of the format
+     * "key1:value1|key2:value2|key3:value3".
+     * 
+ * + * repeated string required_one_of_attributes = 13; + * + * @param value The bytes of the requiredOneOfAttributes to add. + * @return This builder for chaining. + */ + public Builder addRequiredOneOfAttributesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRequiredOneOfAttributesIsMutable(); + requiredOneOfAttributes_.add(value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList requiredOneOfAttributeSets_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureRequiredOneOfAttributeSetsIsMutable() { + if (!requiredOneOfAttributeSets_.isModifiable()) { + requiredOneOfAttributeSets_ = + new com.google.protobuf.LazyStringArrayList(requiredOneOfAttributeSets_); + } + bitField0_ |= 0x00000400; + } + /** + * + * + *
+     * `required_one_of_attribute_sets` provides additional functionality.
+     *
+     * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+     * uses a message which allows a list of lists, allowing expressions such as
+     * this one:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (
+     *   (required_one_of_attribute_sets[0][0] AND
+     *   required_one_of_attribute_sets[0][1] AND
+     *   ...)
+     *   OR
+     *   (required_one_of_attribute_sets[1][0] AND
+     *   required_one_of_attribute_sets[1][1] AND
+     *   ...)
+     * )
+     * ```
+     *
+     * Restricts the response to vehicles that match all the attributes in a
+     * `VehicleAttributeList`. Within each list, a vehicle must match all of the
+     * attributes. This field is a conjunction/AND operation in each
+     * `VehicleAttributeList` and inclusive disjunction/OR operation across the
+     * collection of `VehicleAttributeList`. Each repeated string should be of the
+     * format "key1:value1|key2:value2|key3:value3".
+     * 
+ * + * repeated string required_one_of_attribute_sets = 15; + * + * @return A list containing the requiredOneOfAttributeSets. + */ + public com.google.protobuf.ProtocolStringList getRequiredOneOfAttributeSetsList() { + requiredOneOfAttributeSets_.makeImmutable(); + return requiredOneOfAttributeSets_; + } + /** + * + * + *
+     * `required_one_of_attribute_sets` provides additional functionality.
+     *
+     * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+     * uses a message which allows a list of lists, allowing expressions such as
+     * this one:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (
+     *   (required_one_of_attribute_sets[0][0] AND
+     *   required_one_of_attribute_sets[0][1] AND
+     *   ...)
+     *   OR
+     *   (required_one_of_attribute_sets[1][0] AND
+     *   required_one_of_attribute_sets[1][1] AND
+     *   ...)
+     * )
+     * ```
+     *
+     * Restricts the response to vehicles that match all the attributes in a
+     * `VehicleAttributeList`. Within each list, a vehicle must match all of the
+     * attributes. This field is a conjunction/AND operation in each
+     * `VehicleAttributeList` and inclusive disjunction/OR operation across the
+     * collection of `VehicleAttributeList`. Each repeated string should be of the
+     * format "key1:value1|key2:value2|key3:value3".
+     * 
+ * + * repeated string required_one_of_attribute_sets = 15; + * + * @return The count of requiredOneOfAttributeSets. + */ + public int getRequiredOneOfAttributeSetsCount() { + return requiredOneOfAttributeSets_.size(); + } + /** + * + * + *
+     * `required_one_of_attribute_sets` provides additional functionality.
+     *
+     * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+     * uses a message which allows a list of lists, allowing expressions such as
+     * this one:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (
+     *   (required_one_of_attribute_sets[0][0] AND
+     *   required_one_of_attribute_sets[0][1] AND
+     *   ...)
+     *   OR
+     *   (required_one_of_attribute_sets[1][0] AND
+     *   required_one_of_attribute_sets[1][1] AND
+     *   ...)
+     * )
+     * ```
+     *
+     * Restricts the response to vehicles that match all the attributes in a
+     * `VehicleAttributeList`. Within each list, a vehicle must match all of the
+     * attributes. This field is a conjunction/AND operation in each
+     * `VehicleAttributeList` and inclusive disjunction/OR operation across the
+     * collection of `VehicleAttributeList`. Each repeated string should be of the
+     * format "key1:value1|key2:value2|key3:value3".
+     * 
+ * + * repeated string required_one_of_attribute_sets = 15; + * + * @param index The index of the element to return. + * @return The requiredOneOfAttributeSets at the given index. + */ + public java.lang.String getRequiredOneOfAttributeSets(int index) { + return requiredOneOfAttributeSets_.get(index); + } + /** + * + * + *
+     * `required_one_of_attribute_sets` provides additional functionality.
+     *
+     * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+     * uses a message which allows a list of lists, allowing expressions such as
+     * this one:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (
+     *   (required_one_of_attribute_sets[0][0] AND
+     *   required_one_of_attribute_sets[0][1] AND
+     *   ...)
+     *   OR
+     *   (required_one_of_attribute_sets[1][0] AND
+     *   required_one_of_attribute_sets[1][1] AND
+     *   ...)
+     * )
+     * ```
+     *
+     * Restricts the response to vehicles that match all the attributes in a
+     * `VehicleAttributeList`. Within each list, a vehicle must match all of the
+     * attributes. This field is a conjunction/AND operation in each
+     * `VehicleAttributeList` and inclusive disjunction/OR operation across the
+     * collection of `VehicleAttributeList`. Each repeated string should be of the
+     * format "key1:value1|key2:value2|key3:value3".
+     * 
+ * + * repeated string required_one_of_attribute_sets = 15; + * + * @param index The index of the value to return. + * @return The bytes of the requiredOneOfAttributeSets at the given index. + */ + public com.google.protobuf.ByteString getRequiredOneOfAttributeSetsBytes(int index) { + return requiredOneOfAttributeSets_.getByteString(index); + } + /** + * + * + *
+     * `required_one_of_attribute_sets` provides additional functionality.
+     *
+     * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+     * uses a message which allows a list of lists, allowing expressions such as
+     * this one:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (
+     *   (required_one_of_attribute_sets[0][0] AND
+     *   required_one_of_attribute_sets[0][1] AND
+     *   ...)
+     *   OR
+     *   (required_one_of_attribute_sets[1][0] AND
+     *   required_one_of_attribute_sets[1][1] AND
+     *   ...)
+     * )
+     * ```
+     *
+     * Restricts the response to vehicles that match all the attributes in a
+     * `VehicleAttributeList`. Within each list, a vehicle must match all of the
+     * attributes. This field is a conjunction/AND operation in each
+     * `VehicleAttributeList` and inclusive disjunction/OR operation across the
+     * collection of `VehicleAttributeList`. Each repeated string should be of the
+     * format "key1:value1|key2:value2|key3:value3".
+     * 
+ * + * repeated string required_one_of_attribute_sets = 15; + * + * @param index The index to set the value at. + * @param value The requiredOneOfAttributeSets to set. + * @return This builder for chaining. + */ + public Builder setRequiredOneOfAttributeSets(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequiredOneOfAttributeSetsIsMutable(); + requiredOneOfAttributeSets_.set(index, value); + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * `required_one_of_attribute_sets` provides additional functionality.
+     *
+     * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+     * uses a message which allows a list of lists, allowing expressions such as
+     * this one:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (
+     *   (required_one_of_attribute_sets[0][0] AND
+     *   required_one_of_attribute_sets[0][1] AND
+     *   ...)
+     *   OR
+     *   (required_one_of_attribute_sets[1][0] AND
+     *   required_one_of_attribute_sets[1][1] AND
+     *   ...)
+     * )
+     * ```
+     *
+     * Restricts the response to vehicles that match all the attributes in a
+     * `VehicleAttributeList`. Within each list, a vehicle must match all of the
+     * attributes. This field is a conjunction/AND operation in each
+     * `VehicleAttributeList` and inclusive disjunction/OR operation across the
+     * collection of `VehicleAttributeList`. Each repeated string should be of the
+     * format "key1:value1|key2:value2|key3:value3".
+     * 
+ * + * repeated string required_one_of_attribute_sets = 15; + * + * @param value The requiredOneOfAttributeSets to add. + * @return This builder for chaining. + */ + public Builder addRequiredOneOfAttributeSets(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequiredOneOfAttributeSetsIsMutable(); + requiredOneOfAttributeSets_.add(value); + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * `required_one_of_attribute_sets` provides additional functionality.
+     *
+     * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+     * uses a message which allows a list of lists, allowing expressions such as
+     * this one:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (
+     *   (required_one_of_attribute_sets[0][0] AND
+     *   required_one_of_attribute_sets[0][1] AND
+     *   ...)
+     *   OR
+     *   (required_one_of_attribute_sets[1][0] AND
+     *   required_one_of_attribute_sets[1][1] AND
+     *   ...)
+     * )
+     * ```
+     *
+     * Restricts the response to vehicles that match all the attributes in a
+     * `VehicleAttributeList`. Within each list, a vehicle must match all of the
+     * attributes. This field is a conjunction/AND operation in each
+     * `VehicleAttributeList` and inclusive disjunction/OR operation across the
+     * collection of `VehicleAttributeList`. Each repeated string should be of the
+     * format "key1:value1|key2:value2|key3:value3".
+     * 
+ * + * repeated string required_one_of_attribute_sets = 15; + * + * @param values The requiredOneOfAttributeSets to add. + * @return This builder for chaining. + */ + public Builder addAllRequiredOneOfAttributeSets(java.lang.Iterable values) { + ensureRequiredOneOfAttributeSetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, requiredOneOfAttributeSets_); + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * `required_one_of_attribute_sets` provides additional functionality.
+     *
+     * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+     * uses a message which allows a list of lists, allowing expressions such as
+     * this one:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (
+     *   (required_one_of_attribute_sets[0][0] AND
+     *   required_one_of_attribute_sets[0][1] AND
+     *   ...)
+     *   OR
+     *   (required_one_of_attribute_sets[1][0] AND
+     *   required_one_of_attribute_sets[1][1] AND
+     *   ...)
+     * )
+     * ```
+     *
+     * Restricts the response to vehicles that match all the attributes in a
+     * `VehicleAttributeList`. Within each list, a vehicle must match all of the
+     * attributes. This field is a conjunction/AND operation in each
+     * `VehicleAttributeList` and inclusive disjunction/OR operation across the
+     * collection of `VehicleAttributeList`. Each repeated string should be of the
+     * format "key1:value1|key2:value2|key3:value3".
+     * 
+ * + * repeated string required_one_of_attribute_sets = 15; + * + * @return This builder for chaining. + */ + public Builder clearRequiredOneOfAttributeSets() { + requiredOneOfAttributeSets_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * `required_one_of_attribute_sets` provides additional functionality.
+     *
+     * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+     * uses a message which allows a list of lists, allowing expressions such as
+     * this one:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (
+     *   (required_one_of_attribute_sets[0][0] AND
+     *   required_one_of_attribute_sets[0][1] AND
+     *   ...)
+     *   OR
+     *   (required_one_of_attribute_sets[1][0] AND
+     *   required_one_of_attribute_sets[1][1] AND
+     *   ...)
+     * )
+     * ```
+     *
+     * Restricts the response to vehicles that match all the attributes in a
+     * `VehicleAttributeList`. Within each list, a vehicle must match all of the
+     * attributes. This field is a conjunction/AND operation in each
+     * `VehicleAttributeList` and inclusive disjunction/OR operation across the
+     * collection of `VehicleAttributeList`. Each repeated string should be of the
+     * format "key1:value1|key2:value2|key3:value3".
+     * 
+ * + * repeated string required_one_of_attribute_sets = 15; + * + * @param value The bytes of the requiredOneOfAttributeSets to add. + * @return This builder for chaining. + */ + public Builder addRequiredOneOfAttributeSetsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRequiredOneOfAttributeSetsIsMutable(); + requiredOneOfAttributeSets_.add(value); + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + private int vehicleState_ = 0; + /** + * + * + *
+     * Restricts the response to vehicles that have this vehicle state.
+     * 
+ * + * .maps.fleetengine.v1.VehicleState vehicle_state = 11; + * + * @return The enum numeric value on the wire for vehicleState. + */ + @java.lang.Override + public int getVehicleStateValue() { + return vehicleState_; + } + /** + * + * + *
+     * Restricts the response to vehicles that have this vehicle state.
+     * 
+ * + * .maps.fleetengine.v1.VehicleState vehicle_state = 11; + * + * @param value The enum numeric value on the wire for vehicleState to set. + * @return This builder for chaining. + */ + public Builder setVehicleStateValue(int value) { + vehicleState_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Restricts the response to vehicles that have this vehicle state.
+     * 
+ * + * .maps.fleetengine.v1.VehicleState vehicle_state = 11; + * + * @return The vehicleState. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleState getVehicleState() { + com.google.maps.fleetengine.v1.VehicleState result = + com.google.maps.fleetengine.v1.VehicleState.forNumber(vehicleState_); + return result == null ? com.google.maps.fleetengine.v1.VehicleState.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Restricts the response to vehicles that have this vehicle state.
+     * 
+ * + * .maps.fleetengine.v1.VehicleState vehicle_state = 11; + * + * @param value The vehicleState to set. + * @return This builder for chaining. + */ + public Builder setVehicleState(com.google.maps.fleetengine.v1.VehicleState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000800; + vehicleState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Restricts the response to vehicles that have this vehicle state.
+     * 
+ * + * .maps.fleetengine.v1.VehicleState vehicle_state = 11; + * + * @return This builder for chaining. + */ + public Builder clearVehicleState() { + bitField0_ = (bitField0_ & ~0x00000800); + vehicleState_ = 0; + onChanged(); + return this; + } + + private boolean onTripOnly_; + /** + * + * + *
+     * Only return the vehicles with current trip(s).
+     * 
+ * + * bool on_trip_only = 14; + * + * @return The onTripOnly. + */ + @java.lang.Override + public boolean getOnTripOnly() { + return onTripOnly_; + } + /** + * + * + *
+     * Only return the vehicles with current trip(s).
+     * 
+ * + * bool on_trip_only = 14; + * + * @param value The onTripOnly to set. + * @return This builder for chaining. + */ + public Builder setOnTripOnly(boolean value) { + + onTripOnly_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Only return the vehicles with current trip(s).
+     * 
+ * + * bool on_trip_only = 14; + * + * @return This builder for chaining. + */ + public Builder clearOnTripOnly() { + bitField0_ = (bitField0_ & ~0x00001000); + onTripOnly_ = false; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. A filter query to apply when listing vehicles. See
+     * http://aip.dev/160 for examples of the filter syntax.
+     *
+     * This field is designed to replace the `required_attributes`,
+     * `required_one_of_attributes`, and `required_one_of_attributes_sets` fields.
+     * If a non-empty value is specified here, the following fields must be empty:
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attributes_sets`.
+     *
+     * This filter functions as an AND clause with other constraints,
+     * such as `vehicle_state` or `on_trip_only`.
+     *
+     * Note that the only queries supported are on vehicle attributes (for
+     * example, `attributes.<key> = <value>` or `attributes.<key1> = <value1> AND
+     * attributes.<key2> = <value2>`). The maximum number of restrictions allowed
+     * in a filter query is 50.
+     *
+     * Also, all attributes are stored as strings, so the only supported
+     * comparisons against attributes are string comparisons. In order to compare
+     * against number or boolean values, the values must be explicitly quoted to
+     * be treated as strings (for example, `attributes.<key> = "10"` or
+     * `attributes.<key> = "true"`).
+     * 
+ * + * string filter = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A filter query to apply when listing vehicles. See
+     * http://aip.dev/160 for examples of the filter syntax.
+     *
+     * This field is designed to replace the `required_attributes`,
+     * `required_one_of_attributes`, and `required_one_of_attributes_sets` fields.
+     * If a non-empty value is specified here, the following fields must be empty:
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attributes_sets`.
+     *
+     * This filter functions as an AND clause with other constraints,
+     * such as `vehicle_state` or `on_trip_only`.
+     *
+     * Note that the only queries supported are on vehicle attributes (for
+     * example, `attributes.<key> = <value>` or `attributes.<key1> = <value1> AND
+     * attributes.<key2> = <value2>`). The maximum number of restrictions allowed
+     * in a filter query is 50.
+     *
+     * Also, all attributes are stored as strings, so the only supported
+     * comparisons against attributes are string comparisons. In order to compare
+     * against number or boolean values, the values must be explicitly quoted to
+     * be treated as strings (for example, `attributes.<key> = "10"` or
+     * `attributes.<key> = "true"`).
+     * 
+ * + * string filter = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A filter query to apply when listing vehicles. See
+     * http://aip.dev/160 for examples of the filter syntax.
+     *
+     * This field is designed to replace the `required_attributes`,
+     * `required_one_of_attributes`, and `required_one_of_attributes_sets` fields.
+     * If a non-empty value is specified here, the following fields must be empty:
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attributes_sets`.
+     *
+     * This filter functions as an AND clause with other constraints,
+     * such as `vehicle_state` or `on_trip_only`.
+     *
+     * Note that the only queries supported are on vehicle attributes (for
+     * example, `attributes.<key> = <value>` or `attributes.<key1> = <value1> AND
+     * attributes.<key2> = <value2>`). The maximum number of restrictions allowed
+     * in a filter query is 50.
+     *
+     * Also, all attributes are stored as strings, so the only supported
+     * comparisons against attributes are string comparisons. In order to compare
+     * against number or boolean values, the values must be explicitly quoted to
+     * be treated as strings (for example, `attributes.<key> = "10"` or
+     * `attributes.<key> = "true"`).
+     * 
+ * + * string filter = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A filter query to apply when listing vehicles. See
+     * http://aip.dev/160 for examples of the filter syntax.
+     *
+     * This field is designed to replace the `required_attributes`,
+     * `required_one_of_attributes`, and `required_one_of_attributes_sets` fields.
+     * If a non-empty value is specified here, the following fields must be empty:
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attributes_sets`.
+     *
+     * This filter functions as an AND clause with other constraints,
+     * such as `vehicle_state` or `on_trip_only`.
+     *
+     * Note that the only queries supported are on vehicle attributes (for
+     * example, `attributes.<key> = <value>` or `attributes.<key1> = <value1> AND
+     * attributes.<key2> = <value2>`). The maximum number of restrictions allowed
+     * in a filter query is 50.
+     *
+     * Also, all attributes are stored as strings, so the only supported
+     * comparisons against attributes are string comparisons. In order to compare
+     * against number or boolean values, the values must be explicitly quoted to
+     * be treated as strings (for example, `attributes.<key> = "10"` or
+     * `attributes.<key> = "true"`).
+     * 
+ * + * string filter = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A filter query to apply when listing vehicles. See
+     * http://aip.dev/160 for examples of the filter syntax.
+     *
+     * This field is designed to replace the `required_attributes`,
+     * `required_one_of_attributes`, and `required_one_of_attributes_sets` fields.
+     * If a non-empty value is specified here, the following fields must be empty:
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attributes_sets`.
+     *
+     * This filter functions as an AND clause with other constraints,
+     * such as `vehicle_state` or `on_trip_only`.
+     *
+     * Note that the only queries supported are on vehicle attributes (for
+     * example, `attributes.<key> = <value>` or `attributes.<key1> = <value1> AND
+     * attributes.<key2> = <value2>`). The maximum number of restrictions allowed
+     * in a filter query is 50.
+     *
+     * Also, all attributes are stored as strings, so the only supported
+     * comparisons against attributes are string comparisons. In order to compare
+     * against number or boolean values, the values must be explicitly quoted to
+     * be treated as strings (for example, `attributes.<key> = "10"` or
+     * `attributes.<key> = "true"`).
+     * 
+ * + * string filter = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + private com.google.geo.type.Viewport viewport_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.geo.type.Viewport, + com.google.geo.type.Viewport.Builder, + com.google.geo.type.ViewportOrBuilder> + viewportBuilder_; + /** + * + * + *
+     * Optional. A filter that limits the vehicles returned to those whose last
+     * known location was in the rectangular area defined by the viewport.
+     * 
+ * + * .google.geo.type.Viewport viewport = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the viewport field is set. + */ + public boolean hasViewport() { + return ((bitField0_ & 0x00004000) != 0); + } + /** + * + * + *
+     * Optional. A filter that limits the vehicles returned to those whose last
+     * known location was in the rectangular area defined by the viewport.
+     * 
+ * + * .google.geo.type.Viewport viewport = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The viewport. + */ + public com.google.geo.type.Viewport getViewport() { + if (viewportBuilder_ == null) { + return viewport_ == null ? com.google.geo.type.Viewport.getDefaultInstance() : viewport_; + } else { + return viewportBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. A filter that limits the vehicles returned to those whose last
+     * known location was in the rectangular area defined by the viewport.
+     * 
+ * + * .google.geo.type.Viewport viewport = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setViewport(com.google.geo.type.Viewport value) { + if (viewportBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + viewport_ = value; + } else { + viewportBuilder_.setMessage(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A filter that limits the vehicles returned to those whose last
+     * known location was in the rectangular area defined by the viewport.
+     * 
+ * + * .google.geo.type.Viewport viewport = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setViewport(com.google.geo.type.Viewport.Builder builderForValue) { + if (viewportBuilder_ == null) { + viewport_ = builderForValue.build(); + } else { + viewportBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A filter that limits the vehicles returned to those whose last
+     * known location was in the rectangular area defined by the viewport.
+     * 
+ * + * .google.geo.type.Viewport viewport = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeViewport(com.google.geo.type.Viewport value) { + if (viewportBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0) + && viewport_ != null + && viewport_ != com.google.geo.type.Viewport.getDefaultInstance()) { + getViewportBuilder().mergeFrom(value); + } else { + viewport_ = value; + } + } else { + viewportBuilder_.mergeFrom(value); + } + if (viewport_ != null) { + bitField0_ |= 0x00004000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. A filter that limits the vehicles returned to those whose last
+     * known location was in the rectangular area defined by the viewport.
+     * 
+ * + * .google.geo.type.Viewport viewport = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearViewport() { + bitField0_ = (bitField0_ & ~0x00004000); + viewport_ = null; + if (viewportBuilder_ != null) { + viewportBuilder_.dispose(); + viewportBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A filter that limits the vehicles returned to those whose last
+     * known location was in the rectangular area defined by the viewport.
+     * 
+ * + * .google.geo.type.Viewport viewport = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.geo.type.Viewport.Builder getViewportBuilder() { + bitField0_ |= 0x00004000; + onChanged(); + return getViewportFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. A filter that limits the vehicles returned to those whose last
+     * known location was in the rectangular area defined by the viewport.
+     * 
+ * + * .google.geo.type.Viewport viewport = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.geo.type.ViewportOrBuilder getViewportOrBuilder() { + if (viewportBuilder_ != null) { + return viewportBuilder_.getMessageOrBuilder(); + } else { + return viewport_ == null ? com.google.geo.type.Viewport.getDefaultInstance() : viewport_; + } + } + /** + * + * + *
+     * Optional. A filter that limits the vehicles returned to those whose last
+     * known location was in the rectangular area defined by the viewport.
+     * 
+ * + * .google.geo.type.Viewport viewport = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.geo.type.Viewport, + com.google.geo.type.Viewport.Builder, + com.google.geo.type.ViewportOrBuilder> + getViewportFieldBuilder() { + if (viewportBuilder_ == null) { + viewportBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.geo.type.Viewport, + com.google.geo.type.Viewport.Builder, + com.google.geo.type.ViewportOrBuilder>( + getViewport(), getParentForChildren(), isClean()); + viewport_ = null; + } + return viewportBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:maps.fleetengine.v1.ListVehiclesRequest) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.v1.ListVehiclesRequest) + private static final com.google.maps.fleetengine.v1.ListVehiclesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.fleetengine.v1.ListVehiclesRequest(); + } + + public static com.google.maps.fleetengine.v1.ListVehiclesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListVehiclesRequest 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.fleetengine.v1.ListVehiclesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/ListVehiclesRequestOrBuilder.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/ListVehiclesRequestOrBuilder.java new file mode 100644 index 000000000000..1be9c891c8c3 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/ListVehiclesRequestOrBuilder.java @@ -0,0 +1,873 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicle_api.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public interface ListVehiclesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.v1.ListVehiclesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 12; + * + * @return Whether the header field is set. + */ + boolean hasHeader(); + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 12; + * + * @return The header. + */ + com.google.maps.fleetengine.v1.RequestHeader getHeader(); + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 12; + */ + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder getHeaderOrBuilder(); + + /** + * + * + *
+   * Required. Must be in the format `providers/{provider}`.
+   * The provider must be the Project ID (for example, `sample-cloud-project`)
+   * of the Google Cloud Project of which the service account making
+   * this call is a member.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Must be in the format `providers/{provider}`.
+   * The provider must be the Project ID (for example, `sample-cloud-project`)
+   * of the Google Cloud Project of which the service account making
+   * this call is a member.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of vehicles to return.
+   * Default value: 100.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The value of the `next_page_token` provided by a previous call to
+   * `ListVehicles` so that you can paginate through groups of vehicles. The
+   * value is undefined if the filter criteria of the request is not the same as
+   * the filter criteria for the previous call to `ListVehicles`.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The value of the `next_page_token` provided by a previous call to
+   * `ListVehicles` so that you can paginate through groups of vehicles. The
+   * value is undefined if the filter criteria of the request is not the same as
+   * the filter criteria for the previous call to `ListVehicles`.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Specifies the required minimum capacity of the vehicle. All vehicles
+   * returned will have a `maximum_capacity` greater than or equal to this
+   * value. If set, must be greater or equal to 0.
+   * 
+ * + * .google.protobuf.Int32Value minimum_capacity = 6; + * + * @return Whether the minimumCapacity field is set. + */ + boolean hasMinimumCapacity(); + /** + * + * + *
+   * Specifies the required minimum capacity of the vehicle. All vehicles
+   * returned will have a `maximum_capacity` greater than or equal to this
+   * value. If set, must be greater or equal to 0.
+   * 
+ * + * .google.protobuf.Int32Value minimum_capacity = 6; + * + * @return The minimumCapacity. + */ + com.google.protobuf.Int32Value getMinimumCapacity(); + /** + * + * + *
+   * Specifies the required minimum capacity of the vehicle. All vehicles
+   * returned will have a `maximum_capacity` greater than or equal to this
+   * value. If set, must be greater or equal to 0.
+   * 
+ * + * .google.protobuf.Int32Value minimum_capacity = 6; + */ + com.google.protobuf.Int32ValueOrBuilder getMinimumCapacityOrBuilder(); + + /** + * + * + *
+   * Restricts the response to vehicles that support at least one of the
+   * specified trip types.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripType trip_types = 7; + * + * @return A list containing the tripTypes. + */ + java.util.List getTripTypesList(); + /** + * + * + *
+   * Restricts the response to vehicles that support at least one of the
+   * specified trip types.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripType trip_types = 7; + * + * @return The count of tripTypes. + */ + int getTripTypesCount(); + /** + * + * + *
+   * Restricts the response to vehicles that support at least one of the
+   * specified trip types.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripType trip_types = 7; + * + * @param index The index of the element to return. + * @return The tripTypes at the given index. + */ + com.google.maps.fleetengine.v1.TripType getTripTypes(int index); + /** + * + * + *
+   * Restricts the response to vehicles that support at least one of the
+   * specified trip types.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripType trip_types = 7; + * + * @return A list containing the enum numeric values on the wire for tripTypes. + */ + java.util.List getTripTypesValueList(); + /** + * + * + *
+   * Restricts the response to vehicles that support at least one of the
+   * specified trip types.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripType trip_types = 7; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of tripTypes at the given index. + */ + int getTripTypesValue(int index); + + /** + * + * + *
+   * Restricts the response to vehicles that have sent location updates to Fleet
+   * Engine within the specified duration. Stationary vehicles still
+   * transmitting their locations are not considered stale. If present, must be
+   * a valid positive duration.
+   * 
+ * + * .google.protobuf.Duration maximum_staleness = 8; + * + * @return Whether the maximumStaleness field is set. + */ + boolean hasMaximumStaleness(); + /** + * + * + *
+   * Restricts the response to vehicles that have sent location updates to Fleet
+   * Engine within the specified duration. Stationary vehicles still
+   * transmitting their locations are not considered stale. If present, must be
+   * a valid positive duration.
+   * 
+ * + * .google.protobuf.Duration maximum_staleness = 8; + * + * @return The maximumStaleness. + */ + com.google.protobuf.Duration getMaximumStaleness(); + /** + * + * + *
+   * Restricts the response to vehicles that have sent location updates to Fleet
+   * Engine within the specified duration. Stationary vehicles still
+   * transmitting their locations are not considered stale. If present, must be
+   * a valid positive duration.
+   * 
+ * + * .google.protobuf.Duration maximum_staleness = 8; + */ + com.google.protobuf.DurationOrBuilder getMaximumStalenessOrBuilder(); + + /** + * + * + *
+   * Required. Restricts the response to vehicles with one of the specified type
+   * categories. `UNKNOWN` is not allowed.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType.Category vehicle_type_categories = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the vehicleTypeCategories. + */ + java.util.List + getVehicleTypeCategoriesList(); + /** + * + * + *
+   * Required. Restricts the response to vehicles with one of the specified type
+   * categories. `UNKNOWN` is not allowed.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType.Category vehicle_type_categories = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of vehicleTypeCategories. + */ + int getVehicleTypeCategoriesCount(); + /** + * + * + *
+   * Required. Restricts the response to vehicles with one of the specified type
+   * categories. `UNKNOWN` is not allowed.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType.Category vehicle_type_categories = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The vehicleTypeCategories at the given index. + */ + com.google.maps.fleetengine.v1.Vehicle.VehicleType.Category getVehicleTypeCategories(int index); + /** + * + * + *
+   * Required. Restricts the response to vehicles with one of the specified type
+   * categories. `UNKNOWN` is not allowed.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType.Category vehicle_type_categories = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the enum numeric values on the wire for vehicleTypeCategories. + */ + java.util.List getVehicleTypeCategoriesValueList(); + /** + * + * + *
+   * Required. Restricts the response to vehicles with one of the specified type
+   * categories. `UNKNOWN` is not allowed.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType.Category vehicle_type_categories = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of vehicleTypeCategories at the given index. + */ + int getVehicleTypeCategoriesValue(int index); + + /** + * + * + *
+   * Callers can form complex logical operations using any combination of the
+   * `required_attributes`, `required_one_of_attributes`, and
+   * `required_one_of_attribute_sets` fields.
+   *
+   * `required_attributes` is a list; `required_one_of_attributes` uses a
+   * message which allows a list of lists. In combination, the two fields allow
+   * the composition of this expression:
+   *
+   * ```
+   * (required_attributes[0] AND required_attributes[1] AND ...)
+   * AND
+   * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+   * ...)
+   * AND
+   * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+   * ...)
+   * ```
+   *
+   * Restricts the response to vehicles with the specified attributes. This
+   * field is a conjunction/AND operation. A max of 50 required_attributes is
+   * allowed. This matches the maximum number of attributes allowed on a
+   * vehicle. Each repeated string should be of the format "key:value".
+   * 
+ * + * repeated string required_attributes = 10; + * + * @return A list containing the requiredAttributes. + */ + java.util.List getRequiredAttributesList(); + /** + * + * + *
+   * Callers can form complex logical operations using any combination of the
+   * `required_attributes`, `required_one_of_attributes`, and
+   * `required_one_of_attribute_sets` fields.
+   *
+   * `required_attributes` is a list; `required_one_of_attributes` uses a
+   * message which allows a list of lists. In combination, the two fields allow
+   * the composition of this expression:
+   *
+   * ```
+   * (required_attributes[0] AND required_attributes[1] AND ...)
+   * AND
+   * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+   * ...)
+   * AND
+   * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+   * ...)
+   * ```
+   *
+   * Restricts the response to vehicles with the specified attributes. This
+   * field is a conjunction/AND operation. A max of 50 required_attributes is
+   * allowed. This matches the maximum number of attributes allowed on a
+   * vehicle. Each repeated string should be of the format "key:value".
+   * 
+ * + * repeated string required_attributes = 10; + * + * @return The count of requiredAttributes. + */ + int getRequiredAttributesCount(); + /** + * + * + *
+   * Callers can form complex logical operations using any combination of the
+   * `required_attributes`, `required_one_of_attributes`, and
+   * `required_one_of_attribute_sets` fields.
+   *
+   * `required_attributes` is a list; `required_one_of_attributes` uses a
+   * message which allows a list of lists. In combination, the two fields allow
+   * the composition of this expression:
+   *
+   * ```
+   * (required_attributes[0] AND required_attributes[1] AND ...)
+   * AND
+   * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+   * ...)
+   * AND
+   * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+   * ...)
+   * ```
+   *
+   * Restricts the response to vehicles with the specified attributes. This
+   * field is a conjunction/AND operation. A max of 50 required_attributes is
+   * allowed. This matches the maximum number of attributes allowed on a
+   * vehicle. Each repeated string should be of the format "key:value".
+   * 
+ * + * repeated string required_attributes = 10; + * + * @param index The index of the element to return. + * @return The requiredAttributes at the given index. + */ + java.lang.String getRequiredAttributes(int index); + /** + * + * + *
+   * Callers can form complex logical operations using any combination of the
+   * `required_attributes`, `required_one_of_attributes`, and
+   * `required_one_of_attribute_sets` fields.
+   *
+   * `required_attributes` is a list; `required_one_of_attributes` uses a
+   * message which allows a list of lists. In combination, the two fields allow
+   * the composition of this expression:
+   *
+   * ```
+   * (required_attributes[0] AND required_attributes[1] AND ...)
+   * AND
+   * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+   * ...)
+   * AND
+   * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+   * ...)
+   * ```
+   *
+   * Restricts the response to vehicles with the specified attributes. This
+   * field is a conjunction/AND operation. A max of 50 required_attributes is
+   * allowed. This matches the maximum number of attributes allowed on a
+   * vehicle. Each repeated string should be of the format "key:value".
+   * 
+ * + * repeated string required_attributes = 10; + * + * @param index The index of the value to return. + * @return The bytes of the requiredAttributes at the given index. + */ + com.google.protobuf.ByteString getRequiredAttributesBytes(int index); + + /** + * + * + *
+   * Restricts the response to vehicles with at least one of the specified
+   * attributes in each `VehicleAttributeList`. Within each list, a vehicle must
+   * match at least one of the attributes. This field is an inclusive
+   * disjunction/OR operation in each `VehicleAttributeList` and a
+   * conjunction/AND operation across the collection of `VehicleAttributeList`.
+   * Each repeated string should be of the format
+   * "key1:value1|key2:value2|key3:value3".
+   * 
+ * + * repeated string required_one_of_attributes = 13; + * + * @return A list containing the requiredOneOfAttributes. + */ + java.util.List getRequiredOneOfAttributesList(); + /** + * + * + *
+   * Restricts the response to vehicles with at least one of the specified
+   * attributes in each `VehicleAttributeList`. Within each list, a vehicle must
+   * match at least one of the attributes. This field is an inclusive
+   * disjunction/OR operation in each `VehicleAttributeList` and a
+   * conjunction/AND operation across the collection of `VehicleAttributeList`.
+   * Each repeated string should be of the format
+   * "key1:value1|key2:value2|key3:value3".
+   * 
+ * + * repeated string required_one_of_attributes = 13; + * + * @return The count of requiredOneOfAttributes. + */ + int getRequiredOneOfAttributesCount(); + /** + * + * + *
+   * Restricts the response to vehicles with at least one of the specified
+   * attributes in each `VehicleAttributeList`. Within each list, a vehicle must
+   * match at least one of the attributes. This field is an inclusive
+   * disjunction/OR operation in each `VehicleAttributeList` and a
+   * conjunction/AND operation across the collection of `VehicleAttributeList`.
+   * Each repeated string should be of the format
+   * "key1:value1|key2:value2|key3:value3".
+   * 
+ * + * repeated string required_one_of_attributes = 13; + * + * @param index The index of the element to return. + * @return The requiredOneOfAttributes at the given index. + */ + java.lang.String getRequiredOneOfAttributes(int index); + /** + * + * + *
+   * Restricts the response to vehicles with at least one of the specified
+   * attributes in each `VehicleAttributeList`. Within each list, a vehicle must
+   * match at least one of the attributes. This field is an inclusive
+   * disjunction/OR operation in each `VehicleAttributeList` and a
+   * conjunction/AND operation across the collection of `VehicleAttributeList`.
+   * Each repeated string should be of the format
+   * "key1:value1|key2:value2|key3:value3".
+   * 
+ * + * repeated string required_one_of_attributes = 13; + * + * @param index The index of the value to return. + * @return The bytes of the requiredOneOfAttributes at the given index. + */ + com.google.protobuf.ByteString getRequiredOneOfAttributesBytes(int index); + + /** + * + * + *
+   * `required_one_of_attribute_sets` provides additional functionality.
+   *
+   * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+   * uses a message which allows a list of lists, allowing expressions such as
+   * this one:
+   *
+   * ```
+   * (required_attributes[0] AND required_attributes[1] AND ...)
+   * AND
+   * (
+   *   (required_one_of_attribute_sets[0][0] AND
+   *   required_one_of_attribute_sets[0][1] AND
+   *   ...)
+   *   OR
+   *   (required_one_of_attribute_sets[1][0] AND
+   *   required_one_of_attribute_sets[1][1] AND
+   *   ...)
+   * )
+   * ```
+   *
+   * Restricts the response to vehicles that match all the attributes in a
+   * `VehicleAttributeList`. Within each list, a vehicle must match all of the
+   * attributes. This field is a conjunction/AND operation in each
+   * `VehicleAttributeList` and inclusive disjunction/OR operation across the
+   * collection of `VehicleAttributeList`. Each repeated string should be of the
+   * format "key1:value1|key2:value2|key3:value3".
+   * 
+ * + * repeated string required_one_of_attribute_sets = 15; + * + * @return A list containing the requiredOneOfAttributeSets. + */ + java.util.List getRequiredOneOfAttributeSetsList(); + /** + * + * + *
+   * `required_one_of_attribute_sets` provides additional functionality.
+   *
+   * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+   * uses a message which allows a list of lists, allowing expressions such as
+   * this one:
+   *
+   * ```
+   * (required_attributes[0] AND required_attributes[1] AND ...)
+   * AND
+   * (
+   *   (required_one_of_attribute_sets[0][0] AND
+   *   required_one_of_attribute_sets[0][1] AND
+   *   ...)
+   *   OR
+   *   (required_one_of_attribute_sets[1][0] AND
+   *   required_one_of_attribute_sets[1][1] AND
+   *   ...)
+   * )
+   * ```
+   *
+   * Restricts the response to vehicles that match all the attributes in a
+   * `VehicleAttributeList`. Within each list, a vehicle must match all of the
+   * attributes. This field is a conjunction/AND operation in each
+   * `VehicleAttributeList` and inclusive disjunction/OR operation across the
+   * collection of `VehicleAttributeList`. Each repeated string should be of the
+   * format "key1:value1|key2:value2|key3:value3".
+   * 
+ * + * repeated string required_one_of_attribute_sets = 15; + * + * @return The count of requiredOneOfAttributeSets. + */ + int getRequiredOneOfAttributeSetsCount(); + /** + * + * + *
+   * `required_one_of_attribute_sets` provides additional functionality.
+   *
+   * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+   * uses a message which allows a list of lists, allowing expressions such as
+   * this one:
+   *
+   * ```
+   * (required_attributes[0] AND required_attributes[1] AND ...)
+   * AND
+   * (
+   *   (required_one_of_attribute_sets[0][0] AND
+   *   required_one_of_attribute_sets[0][1] AND
+   *   ...)
+   *   OR
+   *   (required_one_of_attribute_sets[1][0] AND
+   *   required_one_of_attribute_sets[1][1] AND
+   *   ...)
+   * )
+   * ```
+   *
+   * Restricts the response to vehicles that match all the attributes in a
+   * `VehicleAttributeList`. Within each list, a vehicle must match all of the
+   * attributes. This field is a conjunction/AND operation in each
+   * `VehicleAttributeList` and inclusive disjunction/OR operation across the
+   * collection of `VehicleAttributeList`. Each repeated string should be of the
+   * format "key1:value1|key2:value2|key3:value3".
+   * 
+ * + * repeated string required_one_of_attribute_sets = 15; + * + * @param index The index of the element to return. + * @return The requiredOneOfAttributeSets at the given index. + */ + java.lang.String getRequiredOneOfAttributeSets(int index); + /** + * + * + *
+   * `required_one_of_attribute_sets` provides additional functionality.
+   *
+   * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+   * uses a message which allows a list of lists, allowing expressions such as
+   * this one:
+   *
+   * ```
+   * (required_attributes[0] AND required_attributes[1] AND ...)
+   * AND
+   * (
+   *   (required_one_of_attribute_sets[0][0] AND
+   *   required_one_of_attribute_sets[0][1] AND
+   *   ...)
+   *   OR
+   *   (required_one_of_attribute_sets[1][0] AND
+   *   required_one_of_attribute_sets[1][1] AND
+   *   ...)
+   * )
+   * ```
+   *
+   * Restricts the response to vehicles that match all the attributes in a
+   * `VehicleAttributeList`. Within each list, a vehicle must match all of the
+   * attributes. This field is a conjunction/AND operation in each
+   * `VehicleAttributeList` and inclusive disjunction/OR operation across the
+   * collection of `VehicleAttributeList`. Each repeated string should be of the
+   * format "key1:value1|key2:value2|key3:value3".
+   * 
+ * + * repeated string required_one_of_attribute_sets = 15; + * + * @param index The index of the value to return. + * @return The bytes of the requiredOneOfAttributeSets at the given index. + */ + com.google.protobuf.ByteString getRequiredOneOfAttributeSetsBytes(int index); + + /** + * + * + *
+   * Restricts the response to vehicles that have this vehicle state.
+   * 
+ * + * .maps.fleetengine.v1.VehicleState vehicle_state = 11; + * + * @return The enum numeric value on the wire for vehicleState. + */ + int getVehicleStateValue(); + /** + * + * + *
+   * Restricts the response to vehicles that have this vehicle state.
+   * 
+ * + * .maps.fleetengine.v1.VehicleState vehicle_state = 11; + * + * @return The vehicleState. + */ + com.google.maps.fleetengine.v1.VehicleState getVehicleState(); + + /** + * + * + *
+   * Only return the vehicles with current trip(s).
+   * 
+ * + * bool on_trip_only = 14; + * + * @return The onTripOnly. + */ + boolean getOnTripOnly(); + + /** + * + * + *
+   * Optional. A filter query to apply when listing vehicles. See
+   * http://aip.dev/160 for examples of the filter syntax.
+   *
+   * This field is designed to replace the `required_attributes`,
+   * `required_one_of_attributes`, and `required_one_of_attributes_sets` fields.
+   * If a non-empty value is specified here, the following fields must be empty:
+   * `required_attributes`, `required_one_of_attributes`, and
+   * `required_one_of_attributes_sets`.
+   *
+   * This filter functions as an AND clause with other constraints,
+   * such as `vehicle_state` or `on_trip_only`.
+   *
+   * Note that the only queries supported are on vehicle attributes (for
+   * example, `attributes.<key> = <value>` or `attributes.<key1> = <value1> AND
+   * attributes.<key2> = <value2>`). The maximum number of restrictions allowed
+   * in a filter query is 50.
+   *
+   * Also, all attributes are stored as strings, so the only supported
+   * comparisons against attributes are string comparisons. In order to compare
+   * against number or boolean values, the values must be explicitly quoted to
+   * be treated as strings (for example, `attributes.<key> = "10"` or
+   * `attributes.<key> = "true"`).
+   * 
+ * + * string filter = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. A filter query to apply when listing vehicles. See
+   * http://aip.dev/160 for examples of the filter syntax.
+   *
+   * This field is designed to replace the `required_attributes`,
+   * `required_one_of_attributes`, and `required_one_of_attributes_sets` fields.
+   * If a non-empty value is specified here, the following fields must be empty:
+   * `required_attributes`, `required_one_of_attributes`, and
+   * `required_one_of_attributes_sets`.
+   *
+   * This filter functions as an AND clause with other constraints,
+   * such as `vehicle_state` or `on_trip_only`.
+   *
+   * Note that the only queries supported are on vehicle attributes (for
+   * example, `attributes.<key> = <value>` or `attributes.<key1> = <value1> AND
+   * attributes.<key2> = <value2>`). The maximum number of restrictions allowed
+   * in a filter query is 50.
+   *
+   * Also, all attributes are stored as strings, so the only supported
+   * comparisons against attributes are string comparisons. In order to compare
+   * against number or boolean values, the values must be explicitly quoted to
+   * be treated as strings (for example, `attributes.<key> = "10"` or
+   * `attributes.<key> = "true"`).
+   * 
+ * + * string filter = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. A filter that limits the vehicles returned to those whose last
+   * known location was in the rectangular area defined by the viewport.
+   * 
+ * + * .google.geo.type.Viewport viewport = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the viewport field is set. + */ + boolean hasViewport(); + /** + * + * + *
+   * Optional. A filter that limits the vehicles returned to those whose last
+   * known location was in the rectangular area defined by the viewport.
+   * 
+ * + * .google.geo.type.Viewport viewport = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The viewport. + */ + com.google.geo.type.Viewport getViewport(); + /** + * + * + *
+   * Optional. A filter that limits the vehicles returned to those whose last
+   * known location was in the rectangular area defined by the viewport.
+   * 
+ * + * .google.geo.type.Viewport viewport = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.geo.type.ViewportOrBuilder getViewportOrBuilder(); +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/ListVehiclesResponse.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/ListVehiclesResponse.java new file mode 100644 index 000000000000..057acbc2b08e --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/ListVehiclesResponse.java @@ -0,0 +1,1267 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicle_api.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * `ListVehicles` response message.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.v1.ListVehiclesResponse} + */ +public final class ListVehiclesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.v1.ListVehiclesResponse) + ListVehiclesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListVehiclesResponse.newBuilder() to construct. + private ListVehiclesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListVehiclesResponse() { + vehicles_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListVehiclesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_ListVehiclesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_ListVehiclesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.ListVehiclesResponse.class, + com.google.maps.fleetengine.v1.ListVehiclesResponse.Builder.class); + } + + public static final int VEHICLES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List vehicles_; + /** + * + * + *
+   * Vehicles matching the criteria in the request.
+   * The maximum number of vehicles returned is determined by the `page_size`
+   * field in the request.
+   * 
+ * + * repeated .maps.fleetengine.v1.Vehicle vehicles = 1; + */ + @java.lang.Override + public java.util.List getVehiclesList() { + return vehicles_; + } + /** + * + * + *
+   * Vehicles matching the criteria in the request.
+   * The maximum number of vehicles returned is determined by the `page_size`
+   * field in the request.
+   * 
+ * + * repeated .maps.fleetengine.v1.Vehicle vehicles = 1; + */ + @java.lang.Override + public java.util.List + getVehiclesOrBuilderList() { + return vehicles_; + } + /** + * + * + *
+   * Vehicles matching the criteria in the request.
+   * The maximum number of vehicles returned is determined by the `page_size`
+   * field in the request.
+   * 
+ * + * repeated .maps.fleetengine.v1.Vehicle vehicles = 1; + */ + @java.lang.Override + public int getVehiclesCount() { + return vehicles_.size(); + } + /** + * + * + *
+   * Vehicles matching the criteria in the request.
+   * The maximum number of vehicles returned is determined by the `page_size`
+   * field in the request.
+   * 
+ * + * repeated .maps.fleetengine.v1.Vehicle vehicles = 1; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.Vehicle getVehicles(int index) { + return vehicles_.get(index); + } + /** + * + * + *
+   * Vehicles matching the criteria in the request.
+   * The maximum number of vehicles returned is determined by the `page_size`
+   * field in the request.
+   * 
+ * + * repeated .maps.fleetengine.v1.Vehicle vehicles = 1; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleOrBuilder getVehiclesOrBuilder(int index) { + return vehicles_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * Token to retrieve the next page of vehicles, or empty if there are no
+   * more vehicles that meet the request criteria.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Token to retrieve the next page of vehicles, or empty if there are no
+   * more vehicles that meet the request criteria.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOTAL_SIZE_FIELD_NUMBER = 3; + private long totalSize_ = 0L; + /** + * + * + *
+   * Required. Total number of vehicles matching the request criteria across all
+   * pages.
+   * 
+ * + * int64 total_size = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The totalSize. + */ + @java.lang.Override + public long getTotalSize() { + return totalSize_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < vehicles_.size(); i++) { + output.writeMessage(1, vehicles_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + if (totalSize_ != 0L) { + output.writeInt64(3, totalSize_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < vehicles_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, vehicles_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + if (totalSize_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, totalSize_); + } + 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.fleetengine.v1.ListVehiclesResponse)) { + return super.equals(obj); + } + com.google.maps.fleetengine.v1.ListVehiclesResponse other = + (com.google.maps.fleetengine.v1.ListVehiclesResponse) obj; + + if (!getVehiclesList().equals(other.getVehiclesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (getTotalSize() != other.getTotalSize()) 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 (getVehiclesCount() > 0) { + hash = (37 * hash) + VEHICLES_FIELD_NUMBER; + hash = (53 * hash) + getVehiclesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (37 * hash) + TOTAL_SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalSize()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.fleetengine.v1.ListVehiclesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.ListVehiclesResponse 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.fleetengine.v1.ListVehiclesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.ListVehiclesResponse 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.fleetengine.v1.ListVehiclesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.ListVehiclesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.ListVehiclesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.ListVehiclesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.ListVehiclesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.ListVehiclesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.ListVehiclesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.ListVehiclesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.fleetengine.v1.ListVehiclesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * `ListVehicles` response message.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.v1.ListVehiclesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.v1.ListVehiclesResponse) + com.google.maps.fleetengine.v1.ListVehiclesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_ListVehiclesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_ListVehiclesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.ListVehiclesResponse.class, + com.google.maps.fleetengine.v1.ListVehiclesResponse.Builder.class); + } + + // Construct using com.google.maps.fleetengine.v1.ListVehiclesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (vehiclesBuilder_ == null) { + vehicles_ = java.util.Collections.emptyList(); + } else { + vehicles_ = null; + vehiclesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + totalSize_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_ListVehiclesResponse_descriptor; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.ListVehiclesResponse getDefaultInstanceForType() { + return com.google.maps.fleetengine.v1.ListVehiclesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.ListVehiclesResponse build() { + com.google.maps.fleetengine.v1.ListVehiclesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.ListVehiclesResponse buildPartial() { + com.google.maps.fleetengine.v1.ListVehiclesResponse result = + new com.google.maps.fleetengine.v1.ListVehiclesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.maps.fleetengine.v1.ListVehiclesResponse result) { + if (vehiclesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + vehicles_ = java.util.Collections.unmodifiableList(vehicles_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.vehicles_ = vehicles_; + } else { + result.vehicles_ = vehiclesBuilder_.build(); + } + } + + private void buildPartial0(com.google.maps.fleetengine.v1.ListVehiclesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.totalSize_ = totalSize_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.fleetengine.v1.ListVehiclesResponse) { + return mergeFrom((com.google.maps.fleetengine.v1.ListVehiclesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.fleetengine.v1.ListVehiclesResponse other) { + if (other == com.google.maps.fleetengine.v1.ListVehiclesResponse.getDefaultInstance()) + return this; + if (vehiclesBuilder_ == null) { + if (!other.vehicles_.isEmpty()) { + if (vehicles_.isEmpty()) { + vehicles_ = other.vehicles_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureVehiclesIsMutable(); + vehicles_.addAll(other.vehicles_); + } + onChanged(); + } + } else { + if (!other.vehicles_.isEmpty()) { + if (vehiclesBuilder_.isEmpty()) { + vehiclesBuilder_.dispose(); + vehiclesBuilder_ = null; + vehicles_ = other.vehicles_; + bitField0_ = (bitField0_ & ~0x00000001); + vehiclesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getVehiclesFieldBuilder() + : null; + } else { + vehiclesBuilder_.addAllMessages(other.vehicles_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getTotalSize() != 0L) { + setTotalSize(other.getTotalSize()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.maps.fleetengine.v1.Vehicle m = + input.readMessage( + com.google.maps.fleetengine.v1.Vehicle.parser(), extensionRegistry); + if (vehiclesBuilder_ == null) { + ensureVehiclesIsMutable(); + vehicles_.add(m); + } else { + vehiclesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + totalSize_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List vehicles_ = + java.util.Collections.emptyList(); + + private void ensureVehiclesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + vehicles_ = new java.util.ArrayList(vehicles_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.Vehicle, + com.google.maps.fleetengine.v1.Vehicle.Builder, + com.google.maps.fleetengine.v1.VehicleOrBuilder> + vehiclesBuilder_; + + /** + * + * + *
+     * Vehicles matching the criteria in the request.
+     * The maximum number of vehicles returned is determined by the `page_size`
+     * field in the request.
+     * 
+ * + * repeated .maps.fleetengine.v1.Vehicle vehicles = 1; + */ + public java.util.List getVehiclesList() { + if (vehiclesBuilder_ == null) { + return java.util.Collections.unmodifiableList(vehicles_); + } else { + return vehiclesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Vehicles matching the criteria in the request.
+     * The maximum number of vehicles returned is determined by the `page_size`
+     * field in the request.
+     * 
+ * + * repeated .maps.fleetengine.v1.Vehicle vehicles = 1; + */ + public int getVehiclesCount() { + if (vehiclesBuilder_ == null) { + return vehicles_.size(); + } else { + return vehiclesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Vehicles matching the criteria in the request.
+     * The maximum number of vehicles returned is determined by the `page_size`
+     * field in the request.
+     * 
+ * + * repeated .maps.fleetengine.v1.Vehicle vehicles = 1; + */ + public com.google.maps.fleetengine.v1.Vehicle getVehicles(int index) { + if (vehiclesBuilder_ == null) { + return vehicles_.get(index); + } else { + return vehiclesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Vehicles matching the criteria in the request.
+     * The maximum number of vehicles returned is determined by the `page_size`
+     * field in the request.
+     * 
+ * + * repeated .maps.fleetengine.v1.Vehicle vehicles = 1; + */ + public Builder setVehicles(int index, com.google.maps.fleetengine.v1.Vehicle value) { + if (vehiclesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVehiclesIsMutable(); + vehicles_.set(index, value); + onChanged(); + } else { + vehiclesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Vehicles matching the criteria in the request.
+     * The maximum number of vehicles returned is determined by the `page_size`
+     * field in the request.
+     * 
+ * + * repeated .maps.fleetengine.v1.Vehicle vehicles = 1; + */ + public Builder setVehicles( + int index, com.google.maps.fleetengine.v1.Vehicle.Builder builderForValue) { + if (vehiclesBuilder_ == null) { + ensureVehiclesIsMutable(); + vehicles_.set(index, builderForValue.build()); + onChanged(); + } else { + vehiclesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Vehicles matching the criteria in the request.
+     * The maximum number of vehicles returned is determined by the `page_size`
+     * field in the request.
+     * 
+ * + * repeated .maps.fleetengine.v1.Vehicle vehicles = 1; + */ + public Builder addVehicles(com.google.maps.fleetengine.v1.Vehicle value) { + if (vehiclesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVehiclesIsMutable(); + vehicles_.add(value); + onChanged(); + } else { + vehiclesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Vehicles matching the criteria in the request.
+     * The maximum number of vehicles returned is determined by the `page_size`
+     * field in the request.
+     * 
+ * + * repeated .maps.fleetengine.v1.Vehicle vehicles = 1; + */ + public Builder addVehicles(int index, com.google.maps.fleetengine.v1.Vehicle value) { + if (vehiclesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVehiclesIsMutable(); + vehicles_.add(index, value); + onChanged(); + } else { + vehiclesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Vehicles matching the criteria in the request.
+     * The maximum number of vehicles returned is determined by the `page_size`
+     * field in the request.
+     * 
+ * + * repeated .maps.fleetengine.v1.Vehicle vehicles = 1; + */ + public Builder addVehicles(com.google.maps.fleetengine.v1.Vehicle.Builder builderForValue) { + if (vehiclesBuilder_ == null) { + ensureVehiclesIsMutable(); + vehicles_.add(builderForValue.build()); + onChanged(); + } else { + vehiclesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Vehicles matching the criteria in the request.
+     * The maximum number of vehicles returned is determined by the `page_size`
+     * field in the request.
+     * 
+ * + * repeated .maps.fleetengine.v1.Vehicle vehicles = 1; + */ + public Builder addVehicles( + int index, com.google.maps.fleetengine.v1.Vehicle.Builder builderForValue) { + if (vehiclesBuilder_ == null) { + ensureVehiclesIsMutable(); + vehicles_.add(index, builderForValue.build()); + onChanged(); + } else { + vehiclesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Vehicles matching the criteria in the request.
+     * The maximum number of vehicles returned is determined by the `page_size`
+     * field in the request.
+     * 
+ * + * repeated .maps.fleetengine.v1.Vehicle vehicles = 1; + */ + public Builder addAllVehicles( + java.lang.Iterable values) { + if (vehiclesBuilder_ == null) { + ensureVehiclesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, vehicles_); + onChanged(); + } else { + vehiclesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Vehicles matching the criteria in the request.
+     * The maximum number of vehicles returned is determined by the `page_size`
+     * field in the request.
+     * 
+ * + * repeated .maps.fleetengine.v1.Vehicle vehicles = 1; + */ + public Builder clearVehicles() { + if (vehiclesBuilder_ == null) { + vehicles_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + vehiclesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Vehicles matching the criteria in the request.
+     * The maximum number of vehicles returned is determined by the `page_size`
+     * field in the request.
+     * 
+ * + * repeated .maps.fleetengine.v1.Vehicle vehicles = 1; + */ + public Builder removeVehicles(int index) { + if (vehiclesBuilder_ == null) { + ensureVehiclesIsMutable(); + vehicles_.remove(index); + onChanged(); + } else { + vehiclesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Vehicles matching the criteria in the request.
+     * The maximum number of vehicles returned is determined by the `page_size`
+     * field in the request.
+     * 
+ * + * repeated .maps.fleetengine.v1.Vehicle vehicles = 1; + */ + public com.google.maps.fleetengine.v1.Vehicle.Builder getVehiclesBuilder(int index) { + return getVehiclesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Vehicles matching the criteria in the request.
+     * The maximum number of vehicles returned is determined by the `page_size`
+     * field in the request.
+     * 
+ * + * repeated .maps.fleetengine.v1.Vehicle vehicles = 1; + */ + public com.google.maps.fleetengine.v1.VehicleOrBuilder getVehiclesOrBuilder(int index) { + if (vehiclesBuilder_ == null) { + return vehicles_.get(index); + } else { + return vehiclesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Vehicles matching the criteria in the request.
+     * The maximum number of vehicles returned is determined by the `page_size`
+     * field in the request.
+     * 
+ * + * repeated .maps.fleetengine.v1.Vehicle vehicles = 1; + */ + public java.util.List + getVehiclesOrBuilderList() { + if (vehiclesBuilder_ != null) { + return vehiclesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(vehicles_); + } + } + /** + * + * + *
+     * Vehicles matching the criteria in the request.
+     * The maximum number of vehicles returned is determined by the `page_size`
+     * field in the request.
+     * 
+ * + * repeated .maps.fleetengine.v1.Vehicle vehicles = 1; + */ + public com.google.maps.fleetengine.v1.Vehicle.Builder addVehiclesBuilder() { + return getVehiclesFieldBuilder() + .addBuilder(com.google.maps.fleetengine.v1.Vehicle.getDefaultInstance()); + } + /** + * + * + *
+     * Vehicles matching the criteria in the request.
+     * The maximum number of vehicles returned is determined by the `page_size`
+     * field in the request.
+     * 
+ * + * repeated .maps.fleetengine.v1.Vehicle vehicles = 1; + */ + public com.google.maps.fleetengine.v1.Vehicle.Builder addVehiclesBuilder(int index) { + return getVehiclesFieldBuilder() + .addBuilder(index, com.google.maps.fleetengine.v1.Vehicle.getDefaultInstance()); + } + /** + * + * + *
+     * Vehicles matching the criteria in the request.
+     * The maximum number of vehicles returned is determined by the `page_size`
+     * field in the request.
+     * 
+ * + * repeated .maps.fleetengine.v1.Vehicle vehicles = 1; + */ + public java.util.List getVehiclesBuilderList() { + return getVehiclesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.Vehicle, + com.google.maps.fleetengine.v1.Vehicle.Builder, + com.google.maps.fleetengine.v1.VehicleOrBuilder> + getVehiclesFieldBuilder() { + if (vehiclesBuilder_ == null) { + vehiclesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.Vehicle, + com.google.maps.fleetengine.v1.Vehicle.Builder, + com.google.maps.fleetengine.v1.VehicleOrBuilder>( + vehicles_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + vehicles_ = null; + } + return vehiclesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Token to retrieve the next page of vehicles, or empty if there are no
+     * more vehicles that meet the request criteria.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of vehicles, or empty if there are no
+     * more vehicles that meet the request criteria.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of vehicles, or empty if there are no
+     * more vehicles that meet the request criteria.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of vehicles, or empty if there are no
+     * more vehicles that meet the request criteria.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of vehicles, or empty if there are no
+     * more vehicles that meet the request criteria.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private long totalSize_; + /** + * + * + *
+     * Required. Total number of vehicles matching the request criteria across all
+     * pages.
+     * 
+ * + * int64 total_size = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The totalSize. + */ + @java.lang.Override + public long getTotalSize() { + return totalSize_; + } + /** + * + * + *
+     * Required. Total number of vehicles matching the request criteria across all
+     * pages.
+     * 
+ * + * int64 total_size = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The totalSize to set. + * @return This builder for chaining. + */ + public Builder setTotalSize(long value) { + + totalSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Total number of vehicles matching the request criteria across all
+     * pages.
+     * 
+ * + * int64 total_size = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTotalSize() { + bitField0_ = (bitField0_ & ~0x00000004); + totalSize_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:maps.fleetengine.v1.ListVehiclesResponse) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.v1.ListVehiclesResponse) + private static final com.google.maps.fleetengine.v1.ListVehiclesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.fleetengine.v1.ListVehiclesResponse(); + } + + public static com.google.maps.fleetengine.v1.ListVehiclesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListVehiclesResponse 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.fleetengine.v1.ListVehiclesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/ListVehiclesResponseOrBuilder.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/ListVehiclesResponseOrBuilder.java new file mode 100644 index 000000000000..66abdaeb48b8 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/ListVehiclesResponseOrBuilder.java @@ -0,0 +1,129 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicle_api.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public interface ListVehiclesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.v1.ListVehiclesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Vehicles matching the criteria in the request.
+   * The maximum number of vehicles returned is determined by the `page_size`
+   * field in the request.
+   * 
+ * + * repeated .maps.fleetengine.v1.Vehicle vehicles = 1; + */ + java.util.List getVehiclesList(); + /** + * + * + *
+   * Vehicles matching the criteria in the request.
+   * The maximum number of vehicles returned is determined by the `page_size`
+   * field in the request.
+   * 
+ * + * repeated .maps.fleetengine.v1.Vehicle vehicles = 1; + */ + com.google.maps.fleetengine.v1.Vehicle getVehicles(int index); + /** + * + * + *
+   * Vehicles matching the criteria in the request.
+   * The maximum number of vehicles returned is determined by the `page_size`
+   * field in the request.
+   * 
+ * + * repeated .maps.fleetengine.v1.Vehicle vehicles = 1; + */ + int getVehiclesCount(); + /** + * + * + *
+   * Vehicles matching the criteria in the request.
+   * The maximum number of vehicles returned is determined by the `page_size`
+   * field in the request.
+   * 
+ * + * repeated .maps.fleetengine.v1.Vehicle vehicles = 1; + */ + java.util.List + getVehiclesOrBuilderList(); + /** + * + * + *
+   * Vehicles matching the criteria in the request.
+   * The maximum number of vehicles returned is determined by the `page_size`
+   * field in the request.
+   * 
+ * + * repeated .maps.fleetengine.v1.Vehicle vehicles = 1; + */ + com.google.maps.fleetengine.v1.VehicleOrBuilder getVehiclesOrBuilder(int index); + + /** + * + * + *
+   * Token to retrieve the next page of vehicles, or empty if there are no
+   * more vehicles that meet the request criteria.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Token to retrieve the next page of vehicles, or empty if there are no
+   * more vehicles that meet the request criteria.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Required. Total number of vehicles matching the request criteria across all
+   * pages.
+   * 
+ * + * int64 total_size = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The totalSize. + */ + long getTotalSize(); +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/LocationPowerSaveMode.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/LocationPowerSaveMode.java new file mode 100644 index 000000000000..1ba2332da60b --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/LocationPowerSaveMode.java @@ -0,0 +1,258 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicles.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * How location features are configured to behave on the mobile device when the
+ * devices "battery saver" feature is on.
+ * (https://developer.android.com/reference/android/os/PowerManager#getLocationPowerSaveMode())
+ * 
+ * + * Protobuf enum {@code maps.fleetengine.v1.LocationPowerSaveMode} + */ +public enum LocationPowerSaveMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Undefined LocationPowerSaveMode
+   * 
+ * + * UNKNOWN_LOCATION_POWER_SAVE_MODE = 0; + */ + UNKNOWN_LOCATION_POWER_SAVE_MODE(0), + /** + * + * + *
+   * Either the location providers shouldn't be affected by battery saver, or
+   * battery saver is off.
+   * 
+ * + * LOCATION_MODE_NO_CHANGE = 1; + */ + LOCATION_MODE_NO_CHANGE(1), + /** + * + * + *
+   * The GPS based location provider should be disabled when battery saver is on
+   * and the device is non-interactive.
+   * 
+ * + * LOCATION_MODE_GPS_DISABLED_WHEN_SCREEN_OFF = 2; + */ + LOCATION_MODE_GPS_DISABLED_WHEN_SCREEN_OFF(2), + /** + * + * + *
+   * All location providers should be disabled when battery saver is on and the
+   * device is non-interactive.
+   * 
+ * + * LOCATION_MODE_ALL_DISABLED_WHEN_SCREEN_OFF = 3; + */ + LOCATION_MODE_ALL_DISABLED_WHEN_SCREEN_OFF(3), + /** + * + * + *
+   * All the location providers will be kept available, but location fixes
+   * should only be provided to foreground apps.
+   * 
+ * + * LOCATION_MODE_FOREGROUND_ONLY = 4; + */ + LOCATION_MODE_FOREGROUND_ONLY(4), + /** + * + * + *
+   * Location will not be turned off, but LocationManager will throttle all
+   * requests to providers when the device is non-interactive.
+   * 
+ * + * LOCATION_MODE_THROTTLE_REQUESTS_WHEN_SCREEN_OFF = 5; + */ + LOCATION_MODE_THROTTLE_REQUESTS_WHEN_SCREEN_OFF(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Undefined LocationPowerSaveMode
+   * 
+ * + * UNKNOWN_LOCATION_POWER_SAVE_MODE = 0; + */ + public static final int UNKNOWN_LOCATION_POWER_SAVE_MODE_VALUE = 0; + /** + * + * + *
+   * Either the location providers shouldn't be affected by battery saver, or
+   * battery saver is off.
+   * 
+ * + * LOCATION_MODE_NO_CHANGE = 1; + */ + public static final int LOCATION_MODE_NO_CHANGE_VALUE = 1; + /** + * + * + *
+   * The GPS based location provider should be disabled when battery saver is on
+   * and the device is non-interactive.
+   * 
+ * + * LOCATION_MODE_GPS_DISABLED_WHEN_SCREEN_OFF = 2; + */ + public static final int LOCATION_MODE_GPS_DISABLED_WHEN_SCREEN_OFF_VALUE = 2; + /** + * + * + *
+   * All location providers should be disabled when battery saver is on and the
+   * device is non-interactive.
+   * 
+ * + * LOCATION_MODE_ALL_DISABLED_WHEN_SCREEN_OFF = 3; + */ + public static final int LOCATION_MODE_ALL_DISABLED_WHEN_SCREEN_OFF_VALUE = 3; + /** + * + * + *
+   * All the location providers will be kept available, but location fixes
+   * should only be provided to foreground apps.
+   * 
+ * + * LOCATION_MODE_FOREGROUND_ONLY = 4; + */ + public static final int LOCATION_MODE_FOREGROUND_ONLY_VALUE = 4; + /** + * + * + *
+   * Location will not be turned off, but LocationManager will throttle all
+   * requests to providers when the device is non-interactive.
+   * 
+ * + * LOCATION_MODE_THROTTLE_REQUESTS_WHEN_SCREEN_OFF = 5; + */ + public static final int LOCATION_MODE_THROTTLE_REQUESTS_WHEN_SCREEN_OFF_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static LocationPowerSaveMode 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 LocationPowerSaveMode forNumber(int value) { + switch (value) { + case 0: + return UNKNOWN_LOCATION_POWER_SAVE_MODE; + case 1: + return LOCATION_MODE_NO_CHANGE; + case 2: + return LOCATION_MODE_GPS_DISABLED_WHEN_SCREEN_OFF; + case 3: + return LOCATION_MODE_ALL_DISABLED_WHEN_SCREEN_OFF; + case 4: + return LOCATION_MODE_FOREGROUND_ONLY; + case 5: + return LOCATION_MODE_THROTTLE_REQUESTS_WHEN_SCREEN_OFF; + 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 LocationPowerSaveMode findValueByNumber(int number) { + return LocationPowerSaveMode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.maps.fleetengine.v1.Vehicles.getDescriptor().getEnumTypes().get(1); + } + + private static final LocationPowerSaveMode[] VALUES = values(); + + public static LocationPowerSaveMode 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 LocationPowerSaveMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:maps.fleetengine.v1.LocationPowerSaveMode) +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/LocationSensor.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/LocationSensor.java new file mode 100644 index 000000000000..9b34eda2399d --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/LocationSensor.java @@ -0,0 +1,323 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/fleetengine.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * The sensor or methodology used to determine the location.
+ * 
+ * + * Protobuf enum {@code maps.fleetengine.v1.LocationSensor} + */ +public enum LocationSensor implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * The sensor is unspecified or unknown.
+   * 
+ * + * UNKNOWN_SENSOR = 0; + */ + UNKNOWN_SENSOR(0), + /** + * + * + *
+   * GPS or Assisted GPS.
+   * 
+ * + * GPS = 1; + */ + GPS(1), + /** + * + * + *
+   * Assisted GPS, cell tower ID, or WiFi access point.
+   * 
+ * + * NETWORK = 2; + */ + NETWORK(2), + /** + * + * + *
+   * Cell tower ID or WiFi access point.
+   * 
+ * + * PASSIVE = 3; + */ + PASSIVE(3), + /** + * + * + *
+   * A location determined by the mobile device to be the most likely
+   * road position.
+   * 
+ * + * ROAD_SNAPPED_LOCATION_PROVIDER = 4; + */ + ROAD_SNAPPED_LOCATION_PROVIDER(4), + /** + * + * + *
+   * A customer-supplied location from an independent source.  Typically, this
+   * value is used for a location provided from sources other than the mobile
+   * device running Driver SDK.  If the original source is described by one of
+   * the other enum values, use that value. Locations marked
+   * CUSTOMER_SUPPLIED_LOCATION are typically provided via a Vehicle's
+   * `last_location.supplemental_location_sensor`.
+   * 
+ * + * CUSTOMER_SUPPLIED_LOCATION = 5; + */ + CUSTOMER_SUPPLIED_LOCATION(5), + /** + * + * + *
+   * A location calculated by Fleet Engine based on the signals available to it.
+   * Output only. This value will be rejected if it is received in a request.
+   * 
+ * + * FLEET_ENGINE_LOCATION = 6; + */ + FLEET_ENGINE_LOCATION(6), + /** + * + * + *
+   * Android's Fused Location Provider.
+   * 
+ * + * FUSED_LOCATION_PROVIDER = 100; + */ + FUSED_LOCATION_PROVIDER(100), + /** + * + * + *
+   * The location provider on Apple operating systems.
+   * 
+ * + * CORE_LOCATION = 200; + */ + CORE_LOCATION(200), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * The sensor is unspecified or unknown.
+   * 
+ * + * UNKNOWN_SENSOR = 0; + */ + public static final int UNKNOWN_SENSOR_VALUE = 0; + /** + * + * + *
+   * GPS or Assisted GPS.
+   * 
+ * + * GPS = 1; + */ + public static final int GPS_VALUE = 1; + /** + * + * + *
+   * Assisted GPS, cell tower ID, or WiFi access point.
+   * 
+ * + * NETWORK = 2; + */ + public static final int NETWORK_VALUE = 2; + /** + * + * + *
+   * Cell tower ID or WiFi access point.
+   * 
+ * + * PASSIVE = 3; + */ + public static final int PASSIVE_VALUE = 3; + /** + * + * + *
+   * A location determined by the mobile device to be the most likely
+   * road position.
+   * 
+ * + * ROAD_SNAPPED_LOCATION_PROVIDER = 4; + */ + public static final int ROAD_SNAPPED_LOCATION_PROVIDER_VALUE = 4; + /** + * + * + *
+   * A customer-supplied location from an independent source.  Typically, this
+   * value is used for a location provided from sources other than the mobile
+   * device running Driver SDK.  If the original source is described by one of
+   * the other enum values, use that value. Locations marked
+   * CUSTOMER_SUPPLIED_LOCATION are typically provided via a Vehicle's
+   * `last_location.supplemental_location_sensor`.
+   * 
+ * + * CUSTOMER_SUPPLIED_LOCATION = 5; + */ + public static final int CUSTOMER_SUPPLIED_LOCATION_VALUE = 5; + /** + * + * + *
+   * A location calculated by Fleet Engine based on the signals available to it.
+   * Output only. This value will be rejected if it is received in a request.
+   * 
+ * + * FLEET_ENGINE_LOCATION = 6; + */ + public static final int FLEET_ENGINE_LOCATION_VALUE = 6; + /** + * + * + *
+   * Android's Fused Location Provider.
+   * 
+ * + * FUSED_LOCATION_PROVIDER = 100; + */ + public static final int FUSED_LOCATION_PROVIDER_VALUE = 100; + /** + * + * + *
+   * The location provider on Apple operating systems.
+   * 
+ * + * CORE_LOCATION = 200; + */ + public static final int CORE_LOCATION_VALUE = 200; + + 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 LocationSensor 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 LocationSensor forNumber(int value) { + switch (value) { + case 0: + return UNKNOWN_SENSOR; + case 1: + return GPS; + case 2: + return NETWORK; + case 3: + return PASSIVE; + case 4: + return ROAD_SNAPPED_LOCATION_PROVIDER; + case 5: + return CUSTOMER_SUPPLIED_LOCATION; + case 6: + return FLEET_ENGINE_LOCATION; + case 100: + return FUSED_LOCATION_PROVIDER; + case 200: + return CORE_LOCATION; + 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 LocationSensor findValueByNumber(int number) { + return LocationSensor.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.maps.fleetengine.v1.FleetEngine.getDescriptor().getEnumTypes().get(4); + } + + private static final LocationSensor[] VALUES = values(); + + public static LocationSensor 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 LocationSensor(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:maps.fleetengine.v1.LocationSensor) +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/NavigationStatus.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/NavigationStatus.java new file mode 100644 index 000000000000..f301eadb14f6 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/NavigationStatus.java @@ -0,0 +1,223 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/fleetengine.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * The vehicle's navigation status.
+ * 
+ * + * Protobuf enum {@code maps.fleetengine.v1.NavigationStatus} + */ +public enum NavigationStatus implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified navigation status.
+   * 
+ * + * UNKNOWN_NAVIGATION_STATUS = 0; + */ + UNKNOWN_NAVIGATION_STATUS(0), + /** + * + * + *
+   * The Driver app's navigation is in `FREE_NAV` mode.
+   * 
+ * + * NO_GUIDANCE = 1; + */ + NO_GUIDANCE(1), + /** + * + * + *
+   * Turn-by-turn navigation is available and the Driver app navigation has
+   * entered `GUIDED_NAV` mode.
+   * 
+ * + * ENROUTE_TO_DESTINATION = 2; + */ + ENROUTE_TO_DESTINATION(2), + /** + * + * + *
+   * The vehicle has gone off the suggested route.
+   * 
+ * + * OFF_ROUTE = 3; + */ + OFF_ROUTE(3), + /** + * + * + *
+   * The vehicle is within approximately 50m of the destination.
+   * 
+ * + * ARRIVED_AT_DESTINATION = 4; + */ + ARRIVED_AT_DESTINATION(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Unspecified navigation status.
+   * 
+ * + * UNKNOWN_NAVIGATION_STATUS = 0; + */ + public static final int UNKNOWN_NAVIGATION_STATUS_VALUE = 0; + /** + * + * + *
+   * The Driver app's navigation is in `FREE_NAV` mode.
+   * 
+ * + * NO_GUIDANCE = 1; + */ + public static final int NO_GUIDANCE_VALUE = 1; + /** + * + * + *
+   * Turn-by-turn navigation is available and the Driver app navigation has
+   * entered `GUIDED_NAV` mode.
+   * 
+ * + * ENROUTE_TO_DESTINATION = 2; + */ + public static final int ENROUTE_TO_DESTINATION_VALUE = 2; + /** + * + * + *
+   * The vehicle has gone off the suggested route.
+   * 
+ * + * OFF_ROUTE = 3; + */ + public static final int OFF_ROUTE_VALUE = 3; + /** + * + * + *
+   * The vehicle is within approximately 50m of the destination.
+   * 
+ * + * ARRIVED_AT_DESTINATION = 4; + */ + public static final int ARRIVED_AT_DESTINATION_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static NavigationStatus 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 NavigationStatus forNumber(int value) { + switch (value) { + case 0: + return UNKNOWN_NAVIGATION_STATUS; + case 1: + return NO_GUIDANCE; + case 2: + return ENROUTE_TO_DESTINATION; + case 3: + return OFF_ROUTE; + case 4: + return ARRIVED_AT_DESTINATION; + 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 NavigationStatus findValueByNumber(int number) { + return NavigationStatus.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.maps.fleetengine.v1.FleetEngine.getDescriptor().getEnumTypes().get(3); + } + + private static final NavigationStatus[] VALUES = values(); + + public static NavigationStatus 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 NavigationStatus(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:maps.fleetengine.v1.NavigationStatus) +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/PolylineFormatType.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/PolylineFormatType.java new file mode 100644 index 000000000000..e9d7d5fe423a --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/PolylineFormatType.java @@ -0,0 +1,181 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/fleetengine.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * The type of polyline format.
+ * 
+ * + * Protobuf enum {@code maps.fleetengine.v1.PolylineFormatType} + */ +public enum PolylineFormatType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * The format is unspecified or unknown.
+   * 
+ * + * UNKNOWN_FORMAT_TYPE = 0; + */ + UNKNOWN_FORMAT_TYPE(0), + /** + * + * + *
+   * A list of `google.type.LatLng`.
+   * 
+ * + * LAT_LNG_LIST_TYPE = 1; + */ + LAT_LNG_LIST_TYPE(1), + /** + * + * + *
+   * A polyline encoded with a polyline compression algorithm. Decoding is not
+   * yet supported.
+   * 
+ * + * ENCODED_POLYLINE_TYPE = 2; + */ + ENCODED_POLYLINE_TYPE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * The format is unspecified or unknown.
+   * 
+ * + * UNKNOWN_FORMAT_TYPE = 0; + */ + public static final int UNKNOWN_FORMAT_TYPE_VALUE = 0; + /** + * + * + *
+   * A list of `google.type.LatLng`.
+   * 
+ * + * LAT_LNG_LIST_TYPE = 1; + */ + public static final int LAT_LNG_LIST_TYPE_VALUE = 1; + /** + * + * + *
+   * A polyline encoded with a polyline compression algorithm. Decoding is not
+   * yet supported.
+   * 
+ * + * ENCODED_POLYLINE_TYPE = 2; + */ + public static final int ENCODED_POLYLINE_TYPE_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PolylineFormatType 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 PolylineFormatType forNumber(int value) { + switch (value) { + case 0: + return UNKNOWN_FORMAT_TYPE; + case 1: + return LAT_LNG_LIST_TYPE; + case 2: + return ENCODED_POLYLINE_TYPE; + 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 PolylineFormatType findValueByNumber(int number) { + return PolylineFormatType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.maps.fleetengine.v1.FleetEngine.getDescriptor().getEnumTypes().get(2); + } + + private static final PolylineFormatType[] VALUES = values(); + + public static PolylineFormatType 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 PolylineFormatType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:maps.fleetengine.v1.PolylineFormatType) +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/PowerSource.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/PowerSource.java new file mode 100644 index 000000000000..a52cfdb76074 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/PowerSource.java @@ -0,0 +1,221 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicles.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * Type of the charger being used to charge the battery.
+ * 
+ * + * Protobuf enum {@code maps.fleetengine.v1.PowerSource} + */ +public enum PowerSource implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Power source unknown.
+   * 
+ * + * UNKNOWN_POWER_SOURCE = 0; + */ + UNKNOWN_POWER_SOURCE(0), + /** + * + * + *
+   * Power source is an AC charger.
+   * 
+ * + * POWER_SOURCE_AC = 1; + */ + POWER_SOURCE_AC(1), + /** + * + * + *
+   * Power source is a USB port.
+   * 
+ * + * POWER_SOURCE_USB = 2; + */ + POWER_SOURCE_USB(2), + /** + * + * + *
+   * Power source is wireless.
+   * 
+ * + * POWER_SOURCE_WIRELESS = 3; + */ + POWER_SOURCE_WIRELESS(3), + /** + * + * + *
+   * Battery is unplugged.
+   * 
+ * + * POWER_SOURCE_UNPLUGGED = 4; + */ + POWER_SOURCE_UNPLUGGED(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Power source unknown.
+   * 
+ * + * UNKNOWN_POWER_SOURCE = 0; + */ + public static final int UNKNOWN_POWER_SOURCE_VALUE = 0; + /** + * + * + *
+   * Power source is an AC charger.
+   * 
+ * + * POWER_SOURCE_AC = 1; + */ + public static final int POWER_SOURCE_AC_VALUE = 1; + /** + * + * + *
+   * Power source is a USB port.
+   * 
+ * + * POWER_SOURCE_USB = 2; + */ + public static final int POWER_SOURCE_USB_VALUE = 2; + /** + * + * + *
+   * Power source is wireless.
+   * 
+ * + * POWER_SOURCE_WIRELESS = 3; + */ + public static final int POWER_SOURCE_WIRELESS_VALUE = 3; + /** + * + * + *
+   * Battery is unplugged.
+   * 
+ * + * POWER_SOURCE_UNPLUGGED = 4; + */ + public static final int POWER_SOURCE_UNPLUGGED_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PowerSource 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 PowerSource forNumber(int value) { + switch (value) { + case 0: + return UNKNOWN_POWER_SOURCE; + case 1: + return POWER_SOURCE_AC; + case 2: + return POWER_SOURCE_USB; + case 3: + return POWER_SOURCE_WIRELESS; + case 4: + return POWER_SOURCE_UNPLUGGED; + 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 PowerSource findValueByNumber(int number) { + return PowerSource.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.maps.fleetengine.v1.Vehicles.getDescriptor().getEnumTypes().get(3); + } + + private static final PowerSource[] VALUES = values(); + + public static PowerSource 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 PowerSource(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:maps.fleetengine.v1.PowerSource) +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/ReportBillableTripRequest.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/ReportBillableTripRequest.java new file mode 100644 index 000000000000..a9d2a303aa95 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/ReportBillableTripRequest.java @@ -0,0 +1,1626 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/trip_api.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * ReportBillableTrip request message.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.v1.ReportBillableTripRequest} + */ +public final class ReportBillableTripRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.v1.ReportBillableTripRequest) + ReportBillableTripRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReportBillableTripRequest.newBuilder() to construct. + private ReportBillableTripRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReportBillableTripRequest() { + name_ = ""; + countryCode_ = ""; + platform_ = 0; + relatedIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + solutionType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReportBillableTripRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.TripApi + .internal_static_maps_fleetengine_v1_ReportBillableTripRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.TripApi + .internal_static_maps_fleetengine_v1_ReportBillableTripRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.ReportBillableTripRequest.class, + com.google.maps.fleetengine.v1.ReportBillableTripRequest.Builder.class); + } + + /** + * + * + *
+   * Selector for different solution types of a reported trip.
+   * 
+ * + * Protobuf enum {@code maps.fleetengine.v1.ReportBillableTripRequest.SolutionType} + */ + public enum SolutionType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The default value. For backwards-compatibility, the API will use
+     * `ON_DEMAND_RIDESHARING_AND_DELIVERIES` by default which is the first
+     * supported solution type.
+     * 
+ * + * SOLUTION_TYPE_UNSPECIFIED = 0; + */ + SOLUTION_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * The solution is an on-demand ridesharing and deliveries trip.
+     * 
+ * + * ON_DEMAND_RIDESHARING_AND_DELIVERIES = 1; + */ + ON_DEMAND_RIDESHARING_AND_DELIVERIES(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The default value. For backwards-compatibility, the API will use
+     * `ON_DEMAND_RIDESHARING_AND_DELIVERIES` by default which is the first
+     * supported solution type.
+     * 
+ * + * SOLUTION_TYPE_UNSPECIFIED = 0; + */ + public static final int SOLUTION_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The solution is an on-demand ridesharing and deliveries trip.
+     * 
+ * + * ON_DEMAND_RIDESHARING_AND_DELIVERIES = 1; + */ + public static final int ON_DEMAND_RIDESHARING_AND_DELIVERIES_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SolutionType 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 SolutionType forNumber(int value) { + switch (value) { + case 0: + return SOLUTION_TYPE_UNSPECIFIED; + case 1: + return ON_DEMAND_RIDESHARING_AND_DELIVERIES; + 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 SolutionType findValueByNumber(int number) { + return SolutionType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.maps.fleetengine.v1.ReportBillableTripRequest.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final SolutionType[] VALUES = values(); + + public static SolutionType 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 SolutionType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:maps.fleetengine.v1.ReportBillableTripRequest.SolutionType) + } + + public static final int NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Must be in the format
+   * `providers/{provider}/billableTrips/{billable_trip}`. The
+   * provider must be the Project ID (for example, `sample-cloud-project`) of
+   * the Google Cloud Project of which the service account making this call is a
+   * member.
+   * 
+ * + * string name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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. Must be in the format
+   * `providers/{provider}/billableTrips/{billable_trip}`. The
+   * provider must be the Project ID (for example, `sample-cloud-project`) of
+   * the Google Cloud Project of which the service account making this call is a
+   * member.
+   * 
+ * + * string name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 COUNTRY_CODE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object countryCode_ = ""; + /** + * + * + *
+   * Required. Two letter country code of the country where the trip takes
+   * place. Price is defined according to country code.
+   * 
+ * + * string country_code = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The countryCode. + */ + @java.lang.Override + public java.lang.String getCountryCode() { + java.lang.Object ref = countryCode_; + 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(); + countryCode_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Two letter country code of the country where the trip takes
+   * place. Price is defined according to country code.
+   * 
+ * + * string country_code = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for countryCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCountryCodeBytes() { + java.lang.Object ref = countryCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + countryCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PLATFORM_FIELD_NUMBER = 5; + private int platform_ = 0; + /** + * + * + *
+   * The platform upon which the request was issued.
+   * 
+ * + * .maps.fleetengine.v1.BillingPlatformIdentifier platform = 5; + * + * @return The enum numeric value on the wire for platform. + */ + @java.lang.Override + public int getPlatformValue() { + return platform_; + } + /** + * + * + *
+   * The platform upon which the request was issued.
+   * 
+ * + * .maps.fleetengine.v1.BillingPlatformIdentifier platform = 5; + * + * @return The platform. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.BillingPlatformIdentifier getPlatform() { + com.google.maps.fleetengine.v1.BillingPlatformIdentifier result = + com.google.maps.fleetengine.v1.BillingPlatformIdentifier.forNumber(platform_); + return result == null + ? com.google.maps.fleetengine.v1.BillingPlatformIdentifier.UNRECOGNIZED + : result; + } + + public static final int RELATED_IDS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList relatedIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * The identifiers that are directly related to the trip being reported. These
+   * are usually IDs (for example, session IDs) of pre-booking operations done
+   * before the trip ID is available. The number of `related_ids` is
+   * limited to 50.
+   * 
+ * + * repeated string related_ids = 6; + * + * @return A list containing the relatedIds. + */ + public com.google.protobuf.ProtocolStringList getRelatedIdsList() { + return relatedIds_; + } + /** + * + * + *
+   * The identifiers that are directly related to the trip being reported. These
+   * are usually IDs (for example, session IDs) of pre-booking operations done
+   * before the trip ID is available. The number of `related_ids` is
+   * limited to 50.
+   * 
+ * + * repeated string related_ids = 6; + * + * @return The count of relatedIds. + */ + public int getRelatedIdsCount() { + return relatedIds_.size(); + } + /** + * + * + *
+   * The identifiers that are directly related to the trip being reported. These
+   * are usually IDs (for example, session IDs) of pre-booking operations done
+   * before the trip ID is available. The number of `related_ids` is
+   * limited to 50.
+   * 
+ * + * repeated string related_ids = 6; + * + * @param index The index of the element to return. + * @return The relatedIds at the given index. + */ + public java.lang.String getRelatedIds(int index) { + return relatedIds_.get(index); + } + /** + * + * + *
+   * The identifiers that are directly related to the trip being reported. These
+   * are usually IDs (for example, session IDs) of pre-booking operations done
+   * before the trip ID is available. The number of `related_ids` is
+   * limited to 50.
+   * 
+ * + * repeated string related_ids = 6; + * + * @param index The index of the value to return. + * @return The bytes of the relatedIds at the given index. + */ + public com.google.protobuf.ByteString getRelatedIdsBytes(int index) { + return relatedIds_.getByteString(index); + } + + public static final int SOLUTION_TYPE_FIELD_NUMBER = 7; + private int solutionType_ = 0; + /** + * + * + *
+   * The type of GMP product solution (for example,
+   * `ON_DEMAND_RIDESHARING_AND_DELIVERIES`) used for the reported trip.
+   * 
+ * + * .maps.fleetengine.v1.ReportBillableTripRequest.SolutionType solution_type = 7; + * + * @return The enum numeric value on the wire for solutionType. + */ + @java.lang.Override + public int getSolutionTypeValue() { + return solutionType_; + } + /** + * + * + *
+   * The type of GMP product solution (for example,
+   * `ON_DEMAND_RIDESHARING_AND_DELIVERIES`) used for the reported trip.
+   * 
+ * + * .maps.fleetengine.v1.ReportBillableTripRequest.SolutionType solution_type = 7; + * + * @return The solutionType. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.ReportBillableTripRequest.SolutionType getSolutionType() { + com.google.maps.fleetengine.v1.ReportBillableTripRequest.SolutionType result = + com.google.maps.fleetengine.v1.ReportBillableTripRequest.SolutionType.forNumber( + solutionType_); + return result == null + ? com.google.maps.fleetengine.v1.ReportBillableTripRequest.SolutionType.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(countryCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, countryCode_); + } + if (platform_ + != com.google.maps.fleetengine.v1.BillingPlatformIdentifier + .BILLING_PLATFORM_IDENTIFIER_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, platform_); + } + for (int i = 0; i < relatedIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, relatedIds_.getRaw(i)); + } + if (solutionType_ + != com.google.maps.fleetengine.v1.ReportBillableTripRequest.SolutionType + .SOLUTION_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(7, solutionType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(countryCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, countryCode_); + } + if (platform_ + != com.google.maps.fleetengine.v1.BillingPlatformIdentifier + .BILLING_PLATFORM_IDENTIFIER_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, platform_); + } + { + int dataSize = 0; + for (int i = 0; i < relatedIds_.size(); i++) { + dataSize += computeStringSizeNoTag(relatedIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getRelatedIdsList().size(); + } + if (solutionType_ + != com.google.maps.fleetengine.v1.ReportBillableTripRequest.SolutionType + .SOLUTION_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, solutionType_); + } + 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.fleetengine.v1.ReportBillableTripRequest)) { + return super.equals(obj); + } + com.google.maps.fleetengine.v1.ReportBillableTripRequest other = + (com.google.maps.fleetengine.v1.ReportBillableTripRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getCountryCode().equals(other.getCountryCode())) return false; + if (platform_ != other.platform_) return false; + if (!getRelatedIdsList().equals(other.getRelatedIdsList())) return false; + if (solutionType_ != other.solutionType_) 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 = (37 * hash) + COUNTRY_CODE_FIELD_NUMBER; + hash = (53 * hash) + getCountryCode().hashCode(); + hash = (37 * hash) + PLATFORM_FIELD_NUMBER; + hash = (53 * hash) + platform_; + if (getRelatedIdsCount() > 0) { + hash = (37 * hash) + RELATED_IDS_FIELD_NUMBER; + hash = (53 * hash) + getRelatedIdsList().hashCode(); + } + hash = (37 * hash) + SOLUTION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + solutionType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.fleetengine.v1.ReportBillableTripRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.ReportBillableTripRequest 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.fleetengine.v1.ReportBillableTripRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.ReportBillableTripRequest 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.fleetengine.v1.ReportBillableTripRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.ReportBillableTripRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.ReportBillableTripRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.ReportBillableTripRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.ReportBillableTripRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.ReportBillableTripRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.ReportBillableTripRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.ReportBillableTripRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.maps.fleetengine.v1.ReportBillableTripRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * ReportBillableTrip request message.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.v1.ReportBillableTripRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.v1.ReportBillableTripRequest) + com.google.maps.fleetengine.v1.ReportBillableTripRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.TripApi + .internal_static_maps_fleetengine_v1_ReportBillableTripRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.TripApi + .internal_static_maps_fleetengine_v1_ReportBillableTripRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.ReportBillableTripRequest.class, + com.google.maps.fleetengine.v1.ReportBillableTripRequest.Builder.class); + } + + // Construct using com.google.maps.fleetengine.v1.ReportBillableTripRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + countryCode_ = ""; + platform_ = 0; + relatedIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + solutionType_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.fleetengine.v1.TripApi + .internal_static_maps_fleetengine_v1_ReportBillableTripRequest_descriptor; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.ReportBillableTripRequest getDefaultInstanceForType() { + return com.google.maps.fleetengine.v1.ReportBillableTripRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.ReportBillableTripRequest build() { + com.google.maps.fleetengine.v1.ReportBillableTripRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.ReportBillableTripRequest buildPartial() { + com.google.maps.fleetengine.v1.ReportBillableTripRequest result = + new com.google.maps.fleetengine.v1.ReportBillableTripRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.fleetengine.v1.ReportBillableTripRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.countryCode_ = countryCode_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.platform_ = platform_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + relatedIds_.makeImmutable(); + result.relatedIds_ = relatedIds_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.solutionType_ = solutionType_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.fleetengine.v1.ReportBillableTripRequest) { + return mergeFrom((com.google.maps.fleetengine.v1.ReportBillableTripRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.fleetengine.v1.ReportBillableTripRequest other) { + if (other == com.google.maps.fleetengine.v1.ReportBillableTripRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getCountryCode().isEmpty()) { + countryCode_ = other.countryCode_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.platform_ != 0) { + setPlatformValue(other.getPlatformValue()); + } + if (!other.relatedIds_.isEmpty()) { + if (relatedIds_.isEmpty()) { + relatedIds_ = other.relatedIds_; + bitField0_ |= 0x00000008; + } else { + ensureRelatedIdsIsMutable(); + relatedIds_.addAll(other.relatedIds_); + } + onChanged(); + } + if (other.solutionType_ != 0) { + setSolutionTypeValue(other.getSolutionTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 18 + case 26: + { + countryCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 40: + { + platform_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 40 + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRelatedIdsIsMutable(); + relatedIds_.add(s); + break; + } // case 50 + case 56: + { + solutionType_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 56 + 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. Must be in the format
+     * `providers/{provider}/billableTrips/{billable_trip}`. The
+     * provider must be the Project ID (for example, `sample-cloud-project`) of
+     * the Google Cloud Project of which the service account making this call is a
+     * member.
+     * 
+ * + * string name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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. Must be in the format
+     * `providers/{provider}/billableTrips/{billable_trip}`. The
+     * provider must be the Project ID (for example, `sample-cloud-project`) of
+     * the Google Cloud Project of which the service account making this call is a
+     * member.
+     * 
+ * + * string name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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. Must be in the format
+     * `providers/{provider}/billableTrips/{billable_trip}`. The
+     * provider must be the Project ID (for example, `sample-cloud-project`) of
+     * the Google Cloud Project of which the service account making this call is a
+     * member.
+     * 
+ * + * string name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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. Must be in the format
+     * `providers/{provider}/billableTrips/{billable_trip}`. The
+     * provider must be the Project ID (for example, `sample-cloud-project`) of
+     * the Google Cloud Project of which the service account making this call is a
+     * member.
+     * 
+ * + * string name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Must be in the format
+     * `providers/{provider}/billableTrips/{billable_trip}`. The
+     * provider must be the Project ID (for example, `sample-cloud-project`) of
+     * the Google Cloud Project of which the service account making this call is a
+     * member.
+     * 
+ * + * string name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 java.lang.Object countryCode_ = ""; + /** + * + * + *
+     * Required. Two letter country code of the country where the trip takes
+     * place. Price is defined according to country code.
+     * 
+ * + * string country_code = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The countryCode. + */ + public java.lang.String getCountryCode() { + java.lang.Object ref = countryCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + countryCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Two letter country code of the country where the trip takes
+     * place. Price is defined according to country code.
+     * 
+ * + * string country_code = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for countryCode. + */ + public com.google.protobuf.ByteString getCountryCodeBytes() { + java.lang.Object ref = countryCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + countryCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Two letter country code of the country where the trip takes
+     * place. Price is defined according to country code.
+     * 
+ * + * string country_code = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The countryCode to set. + * @return This builder for chaining. + */ + public Builder setCountryCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + countryCode_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Two letter country code of the country where the trip takes
+     * place. Price is defined according to country code.
+     * 
+ * + * string country_code = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearCountryCode() { + countryCode_ = getDefaultInstance().getCountryCode(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Two letter country code of the country where the trip takes
+     * place. Price is defined according to country code.
+     * 
+ * + * string country_code = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for countryCode to set. + * @return This builder for chaining. + */ + public Builder setCountryCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + countryCode_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int platform_ = 0; + /** + * + * + *
+     * The platform upon which the request was issued.
+     * 
+ * + * .maps.fleetengine.v1.BillingPlatformIdentifier platform = 5; + * + * @return The enum numeric value on the wire for platform. + */ + @java.lang.Override + public int getPlatformValue() { + return platform_; + } + /** + * + * + *
+     * The platform upon which the request was issued.
+     * 
+ * + * .maps.fleetengine.v1.BillingPlatformIdentifier platform = 5; + * + * @param value The enum numeric value on the wire for platform to set. + * @return This builder for chaining. + */ + public Builder setPlatformValue(int value) { + platform_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The platform upon which the request was issued.
+     * 
+ * + * .maps.fleetengine.v1.BillingPlatformIdentifier platform = 5; + * + * @return The platform. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.BillingPlatformIdentifier getPlatform() { + com.google.maps.fleetengine.v1.BillingPlatformIdentifier result = + com.google.maps.fleetengine.v1.BillingPlatformIdentifier.forNumber(platform_); + return result == null + ? com.google.maps.fleetengine.v1.BillingPlatformIdentifier.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The platform upon which the request was issued.
+     * 
+ * + * .maps.fleetengine.v1.BillingPlatformIdentifier platform = 5; + * + * @param value The platform to set. + * @return This builder for chaining. + */ + public Builder setPlatform(com.google.maps.fleetengine.v1.BillingPlatformIdentifier value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + platform_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The platform upon which the request was issued.
+     * 
+ * + * .maps.fleetengine.v1.BillingPlatformIdentifier platform = 5; + * + * @return This builder for chaining. + */ + public Builder clearPlatform() { + bitField0_ = (bitField0_ & ~0x00000004); + platform_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList relatedIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureRelatedIdsIsMutable() { + if (!relatedIds_.isModifiable()) { + relatedIds_ = new com.google.protobuf.LazyStringArrayList(relatedIds_); + } + bitField0_ |= 0x00000008; + } + /** + * + * + *
+     * The identifiers that are directly related to the trip being reported. These
+     * are usually IDs (for example, session IDs) of pre-booking operations done
+     * before the trip ID is available. The number of `related_ids` is
+     * limited to 50.
+     * 
+ * + * repeated string related_ids = 6; + * + * @return A list containing the relatedIds. + */ + public com.google.protobuf.ProtocolStringList getRelatedIdsList() { + relatedIds_.makeImmutable(); + return relatedIds_; + } + /** + * + * + *
+     * The identifiers that are directly related to the trip being reported. These
+     * are usually IDs (for example, session IDs) of pre-booking operations done
+     * before the trip ID is available. The number of `related_ids` is
+     * limited to 50.
+     * 
+ * + * repeated string related_ids = 6; + * + * @return The count of relatedIds. + */ + public int getRelatedIdsCount() { + return relatedIds_.size(); + } + /** + * + * + *
+     * The identifiers that are directly related to the trip being reported. These
+     * are usually IDs (for example, session IDs) of pre-booking operations done
+     * before the trip ID is available. The number of `related_ids` is
+     * limited to 50.
+     * 
+ * + * repeated string related_ids = 6; + * + * @param index The index of the element to return. + * @return The relatedIds at the given index. + */ + public java.lang.String getRelatedIds(int index) { + return relatedIds_.get(index); + } + /** + * + * + *
+     * The identifiers that are directly related to the trip being reported. These
+     * are usually IDs (for example, session IDs) of pre-booking operations done
+     * before the trip ID is available. The number of `related_ids` is
+     * limited to 50.
+     * 
+ * + * repeated string related_ids = 6; + * + * @param index The index of the value to return. + * @return The bytes of the relatedIds at the given index. + */ + public com.google.protobuf.ByteString getRelatedIdsBytes(int index) { + return relatedIds_.getByteString(index); + } + /** + * + * + *
+     * The identifiers that are directly related to the trip being reported. These
+     * are usually IDs (for example, session IDs) of pre-booking operations done
+     * before the trip ID is available. The number of `related_ids` is
+     * limited to 50.
+     * 
+ * + * repeated string related_ids = 6; + * + * @param index The index to set the value at. + * @param value The relatedIds to set. + * @return This builder for chaining. + */ + public Builder setRelatedIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedIdsIsMutable(); + relatedIds_.set(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The identifiers that are directly related to the trip being reported. These
+     * are usually IDs (for example, session IDs) of pre-booking operations done
+     * before the trip ID is available. The number of `related_ids` is
+     * limited to 50.
+     * 
+ * + * repeated string related_ids = 6; + * + * @param value The relatedIds to add. + * @return This builder for chaining. + */ + public Builder addRelatedIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedIdsIsMutable(); + relatedIds_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The identifiers that are directly related to the trip being reported. These
+     * are usually IDs (for example, session IDs) of pre-booking operations done
+     * before the trip ID is available. The number of `related_ids` is
+     * limited to 50.
+     * 
+ * + * repeated string related_ids = 6; + * + * @param values The relatedIds to add. + * @return This builder for chaining. + */ + public Builder addAllRelatedIds(java.lang.Iterable values) { + ensureRelatedIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, relatedIds_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The identifiers that are directly related to the trip being reported. These
+     * are usually IDs (for example, session IDs) of pre-booking operations done
+     * before the trip ID is available. The number of `related_ids` is
+     * limited to 50.
+     * 
+ * + * repeated string related_ids = 6; + * + * @return This builder for chaining. + */ + public Builder clearRelatedIds() { + relatedIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * The identifiers that are directly related to the trip being reported. These
+     * are usually IDs (for example, session IDs) of pre-booking operations done
+     * before the trip ID is available. The number of `related_ids` is
+     * limited to 50.
+     * 
+ * + * repeated string related_ids = 6; + * + * @param value The bytes of the relatedIds to add. + * @return This builder for chaining. + */ + public Builder addRelatedIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRelatedIdsIsMutable(); + relatedIds_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int solutionType_ = 0; + /** + * + * + *
+     * The type of GMP product solution (for example,
+     * `ON_DEMAND_RIDESHARING_AND_DELIVERIES`) used for the reported trip.
+     * 
+ * + * .maps.fleetengine.v1.ReportBillableTripRequest.SolutionType solution_type = 7; + * + * @return The enum numeric value on the wire for solutionType. + */ + @java.lang.Override + public int getSolutionTypeValue() { + return solutionType_; + } + /** + * + * + *
+     * The type of GMP product solution (for example,
+     * `ON_DEMAND_RIDESHARING_AND_DELIVERIES`) used for the reported trip.
+     * 
+ * + * .maps.fleetengine.v1.ReportBillableTripRequest.SolutionType solution_type = 7; + * + * @param value The enum numeric value on the wire for solutionType to set. + * @return This builder for chaining. + */ + public Builder setSolutionTypeValue(int value) { + solutionType_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of GMP product solution (for example,
+     * `ON_DEMAND_RIDESHARING_AND_DELIVERIES`) used for the reported trip.
+     * 
+ * + * .maps.fleetengine.v1.ReportBillableTripRequest.SolutionType solution_type = 7; + * + * @return The solutionType. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.ReportBillableTripRequest.SolutionType getSolutionType() { + com.google.maps.fleetengine.v1.ReportBillableTripRequest.SolutionType result = + com.google.maps.fleetengine.v1.ReportBillableTripRequest.SolutionType.forNumber( + solutionType_); + return result == null + ? com.google.maps.fleetengine.v1.ReportBillableTripRequest.SolutionType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The type of GMP product solution (for example,
+     * `ON_DEMAND_RIDESHARING_AND_DELIVERIES`) used for the reported trip.
+     * 
+ * + * .maps.fleetengine.v1.ReportBillableTripRequest.SolutionType solution_type = 7; + * + * @param value The solutionType to set. + * @return This builder for chaining. + */ + public Builder setSolutionType( + com.google.maps.fleetengine.v1.ReportBillableTripRequest.SolutionType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + solutionType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of GMP product solution (for example,
+     * `ON_DEMAND_RIDESHARING_AND_DELIVERIES`) used for the reported trip.
+     * 
+ * + * .maps.fleetengine.v1.ReportBillableTripRequest.SolutionType solution_type = 7; + * + * @return This builder for chaining. + */ + public Builder clearSolutionType() { + bitField0_ = (bitField0_ & ~0x00000010); + solutionType_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:maps.fleetengine.v1.ReportBillableTripRequest) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.v1.ReportBillableTripRequest) + private static final com.google.maps.fleetengine.v1.ReportBillableTripRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.fleetengine.v1.ReportBillableTripRequest(); + } + + public static com.google.maps.fleetengine.v1.ReportBillableTripRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReportBillableTripRequest 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.fleetengine.v1.ReportBillableTripRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/ReportBillableTripRequestOrBuilder.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/ReportBillableTripRequestOrBuilder.java new file mode 100644 index 000000000000..26666732de52 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/ReportBillableTripRequestOrBuilder.java @@ -0,0 +1,201 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/trip_api.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public interface ReportBillableTripRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.v1.ReportBillableTripRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Must be in the format
+   * `providers/{provider}/billableTrips/{billable_trip}`. The
+   * provider must be the Project ID (for example, `sample-cloud-project`) of
+   * the Google Cloud Project of which the service account making this call is a
+   * member.
+   * 
+ * + * string name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Must be in the format
+   * `providers/{provider}/billableTrips/{billable_trip}`. The
+   * provider must be the Project ID (for example, `sample-cloud-project`) of
+   * the Google Cloud Project of which the service account making this call is a
+   * member.
+   * 
+ * + * string name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Two letter country code of the country where the trip takes
+   * place. Price is defined according to country code.
+   * 
+ * + * string country_code = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The countryCode. + */ + java.lang.String getCountryCode(); + /** + * + * + *
+   * Required. Two letter country code of the country where the trip takes
+   * place. Price is defined according to country code.
+   * 
+ * + * string country_code = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for countryCode. + */ + com.google.protobuf.ByteString getCountryCodeBytes(); + + /** + * + * + *
+   * The platform upon which the request was issued.
+   * 
+ * + * .maps.fleetengine.v1.BillingPlatformIdentifier platform = 5; + * + * @return The enum numeric value on the wire for platform. + */ + int getPlatformValue(); + /** + * + * + *
+   * The platform upon which the request was issued.
+   * 
+ * + * .maps.fleetengine.v1.BillingPlatformIdentifier platform = 5; + * + * @return The platform. + */ + com.google.maps.fleetengine.v1.BillingPlatformIdentifier getPlatform(); + + /** + * + * + *
+   * The identifiers that are directly related to the trip being reported. These
+   * are usually IDs (for example, session IDs) of pre-booking operations done
+   * before the trip ID is available. The number of `related_ids` is
+   * limited to 50.
+   * 
+ * + * repeated string related_ids = 6; + * + * @return A list containing the relatedIds. + */ + java.util.List getRelatedIdsList(); + /** + * + * + *
+   * The identifiers that are directly related to the trip being reported. These
+   * are usually IDs (for example, session IDs) of pre-booking operations done
+   * before the trip ID is available. The number of `related_ids` is
+   * limited to 50.
+   * 
+ * + * repeated string related_ids = 6; + * + * @return The count of relatedIds. + */ + int getRelatedIdsCount(); + /** + * + * + *
+   * The identifiers that are directly related to the trip being reported. These
+   * are usually IDs (for example, session IDs) of pre-booking operations done
+   * before the trip ID is available. The number of `related_ids` is
+   * limited to 50.
+   * 
+ * + * repeated string related_ids = 6; + * + * @param index The index of the element to return. + * @return The relatedIds at the given index. + */ + java.lang.String getRelatedIds(int index); + /** + * + * + *
+   * The identifiers that are directly related to the trip being reported. These
+   * are usually IDs (for example, session IDs) of pre-booking operations done
+   * before the trip ID is available. The number of `related_ids` is
+   * limited to 50.
+   * 
+ * + * repeated string related_ids = 6; + * + * @param index The index of the value to return. + * @return The bytes of the relatedIds at the given index. + */ + com.google.protobuf.ByteString getRelatedIdsBytes(int index); + + /** + * + * + *
+   * The type of GMP product solution (for example,
+   * `ON_DEMAND_RIDESHARING_AND_DELIVERIES`) used for the reported trip.
+   * 
+ * + * .maps.fleetengine.v1.ReportBillableTripRequest.SolutionType solution_type = 7; + * + * @return The enum numeric value on the wire for solutionType. + */ + int getSolutionTypeValue(); + /** + * + * + *
+   * The type of GMP product solution (for example,
+   * `ON_DEMAND_RIDESHARING_AND_DELIVERIES`) used for the reported trip.
+   * 
+ * + * .maps.fleetengine.v1.ReportBillableTripRequest.SolutionType solution_type = 7; + * + * @return The solutionType. + */ + com.google.maps.fleetengine.v1.ReportBillableTripRequest.SolutionType getSolutionType(); +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/RequestHeader.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/RequestHeader.java new file mode 100644 index 000000000000..0415fa1920f8 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/RequestHeader.java @@ -0,0 +1,2927 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/header.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * A RequestHeader contains fields common to all Fleet Engine RPC requests.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.v1.RequestHeader} + */ +public final class RequestHeader extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.v1.RequestHeader) + RequestHeaderOrBuilder { + private static final long serialVersionUID = 0L; + // Use RequestHeader.newBuilder() to construct. + private RequestHeader(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RequestHeader() { + languageCode_ = ""; + regionCode_ = ""; + sdkVersion_ = ""; + osVersion_ = ""; + deviceModel_ = ""; + sdkType_ = 0; + mapsSdkVersion_ = ""; + navSdkVersion_ = ""; + platform_ = 0; + manufacturer_ = ""; + traceId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RequestHeader(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.Headers + .internal_static_maps_fleetengine_v1_RequestHeader_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.Headers + .internal_static_maps_fleetengine_v1_RequestHeader_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.RequestHeader.class, + com.google.maps.fleetengine.v1.RequestHeader.Builder.class); + } + + /** + * + * + *
+   * Possible types of SDK.
+   * 
+ * + * Protobuf enum {@code maps.fleetengine.v1.RequestHeader.SdkType} + */ + public enum SdkType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The default value. This value is used if the `sdk_type` is omitted.
+     * 
+ * + * SDK_TYPE_UNSPECIFIED = 0; + */ + SDK_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * The calling SDK is Consumer.
+     * 
+ * + * CONSUMER = 1; + */ + CONSUMER(1), + /** + * + * + *
+     * The calling SDK is Driver.
+     * 
+ * + * DRIVER = 2; + */ + DRIVER(2), + /** + * + * + *
+     * The calling SDK is JavaScript.
+     * 
+ * + * JAVASCRIPT = 3; + */ + JAVASCRIPT(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The default value. This value is used if the `sdk_type` is omitted.
+     * 
+ * + * SDK_TYPE_UNSPECIFIED = 0; + */ + public static final int SDK_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The calling SDK is Consumer.
+     * 
+ * + * CONSUMER = 1; + */ + public static final int CONSUMER_VALUE = 1; + /** + * + * + *
+     * The calling SDK is Driver.
+     * 
+ * + * DRIVER = 2; + */ + public static final int DRIVER_VALUE = 2; + /** + * + * + *
+     * The calling SDK is JavaScript.
+     * 
+ * + * JAVASCRIPT = 3; + */ + public static final int JAVASCRIPT_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SdkType 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 SdkType forNumber(int value) { + switch (value) { + case 0: + return SDK_TYPE_UNSPECIFIED; + case 1: + return CONSUMER; + case 2: + return DRIVER; + case 3: + return JAVASCRIPT; + 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 SdkType findValueByNumber(int number) { + return SdkType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.maps.fleetengine.v1.RequestHeader.getDescriptor().getEnumTypes().get(0); + } + + private static final SdkType[] VALUES = values(); + + public static SdkType 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 SdkType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:maps.fleetengine.v1.RequestHeader.SdkType) + } + + /** + * + * + *
+   * The platform of the calling SDK.
+   * 
+ * + * Protobuf enum {@code maps.fleetengine.v1.RequestHeader.Platform} + */ + public enum Platform implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The default value. This value is used if the platform is omitted.
+     * 
+ * + * PLATFORM_UNSPECIFIED = 0; + */ + PLATFORM_UNSPECIFIED(0), + /** + * + * + *
+     * The request is coming from Android.
+     * 
+ * + * ANDROID = 1; + */ + ANDROID(1), + /** + * + * + *
+     * The request is coming from iOS.
+     * 
+ * + * IOS = 2; + */ + IOS(2), + /** + * + * + *
+     * The request is coming from the web.
+     * 
+ * + * WEB = 3; + */ + WEB(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The default value. This value is used if the platform is omitted.
+     * 
+ * + * PLATFORM_UNSPECIFIED = 0; + */ + public static final int PLATFORM_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The request is coming from Android.
+     * 
+ * + * ANDROID = 1; + */ + public static final int ANDROID_VALUE = 1; + /** + * + * + *
+     * The request is coming from iOS.
+     * 
+ * + * IOS = 2; + */ + public static final int IOS_VALUE = 2; + /** + * + * + *
+     * The request is coming from the web.
+     * 
+ * + * WEB = 3; + */ + public static final int WEB_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Platform 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 Platform forNumber(int value) { + switch (value) { + case 0: + return PLATFORM_UNSPECIFIED; + case 1: + return ANDROID; + case 2: + return IOS; + case 3: + return WEB; + 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 Platform findValueByNumber(int number) { + return Platform.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.maps.fleetengine.v1.RequestHeader.getDescriptor().getEnumTypes().get(1); + } + + private static final Platform[] VALUES = values(); + + public static Platform 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 Platform(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:maps.fleetengine.v1.RequestHeader.Platform) + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object languageCode_ = ""; + /** + * + * + *
+   * The BCP-47 language code, such as en-US or sr-Latn. For more information,
+   * see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If none
+   * is specified, the response may be in any language, with a preference for
+   * English if such a name exists. Field value example: `en-US`.
+   * 
+ * + * string language_code = 1; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+   * The BCP-47 language code, such as en-US or sr-Latn. For more information,
+   * see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If none
+   * is specified, the response may be in any language, with a preference for
+   * English if such a name exists. Field value example: `en-US`.
+   * 
+ * + * string language_code = 1; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REGION_CODE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object regionCode_ = ""; + /** + * + * + *
+   * Required. CLDR region code of the region where the request originates.
+   * Field value example: `US`.
+   * 
+ * + * string region_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The regionCode. + */ + @java.lang.Override + public java.lang.String getRegionCode() { + java.lang.Object ref = regionCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + regionCode_ = s; + return s; + } + } + /** + * + * + *
+   * Required. CLDR region code of the region where the request originates.
+   * Field value example: `US`.
+   * 
+ * + * string region_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for regionCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRegionCodeBytes() { + java.lang.Object ref = regionCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + regionCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SDK_VERSION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object sdkVersion_ = ""; + /** + * + * + *
+   * Version of the calling SDK, if applicable.
+   * The version format is "major.minor.patch", example: `1.1.2`.
+   * 
+ * + * string sdk_version = 3; + * + * @return The sdkVersion. + */ + @java.lang.Override + public java.lang.String getSdkVersion() { + java.lang.Object ref = sdkVersion_; + 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(); + sdkVersion_ = s; + return s; + } + } + /** + * + * + *
+   * Version of the calling SDK, if applicable.
+   * The version format is "major.minor.patch", example: `1.1.2`.
+   * 
+ * + * string sdk_version = 3; + * + * @return The bytes for sdkVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSdkVersionBytes() { + java.lang.Object ref = sdkVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sdkVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OS_VERSION_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object osVersion_ = ""; + /** + * + * + *
+   * Version of the operating system on which the calling SDK is running.
+   * Field value examples: `4.4.1`, `12.1`.
+   * 
+ * + * string os_version = 4; + * + * @return The osVersion. + */ + @java.lang.Override + public java.lang.String getOsVersion() { + java.lang.Object ref = osVersion_; + 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(); + osVersion_ = s; + return s; + } + } + /** + * + * + *
+   * Version of the operating system on which the calling SDK is running.
+   * Field value examples: `4.4.1`, `12.1`.
+   * 
+ * + * string os_version = 4; + * + * @return The bytes for osVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOsVersionBytes() { + java.lang.Object ref = osVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEVICE_MODEL_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object deviceModel_ = ""; + /** + * + * + *
+   * Model of the device on which the calling SDK is running.
+   * Field value examples: `iPhone12,1`, `SM-G920F`.
+   * 
+ * + * string device_model = 5; + * + * @return The deviceModel. + */ + @java.lang.Override + public java.lang.String getDeviceModel() { + java.lang.Object ref = deviceModel_; + 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(); + deviceModel_ = s; + return s; + } + } + /** + * + * + *
+   * Model of the device on which the calling SDK is running.
+   * Field value examples: `iPhone12,1`, `SM-G920F`.
+   * 
+ * + * string device_model = 5; + * + * @return The bytes for deviceModel. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDeviceModelBytes() { + java.lang.Object ref = deviceModel_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deviceModel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SDK_TYPE_FIELD_NUMBER = 6; + private int sdkType_ = 0; + /** + * + * + *
+   * The type of SDK sending the request.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader.SdkType sdk_type = 6; + * + * @return The enum numeric value on the wire for sdkType. + */ + @java.lang.Override + public int getSdkTypeValue() { + return sdkType_; + } + /** + * + * + *
+   * The type of SDK sending the request.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader.SdkType sdk_type = 6; + * + * @return The sdkType. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.RequestHeader.SdkType getSdkType() { + com.google.maps.fleetengine.v1.RequestHeader.SdkType result = + com.google.maps.fleetengine.v1.RequestHeader.SdkType.forNumber(sdkType_); + return result == null + ? com.google.maps.fleetengine.v1.RequestHeader.SdkType.UNRECOGNIZED + : result; + } + + public static final int MAPS_SDK_VERSION_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object mapsSdkVersion_ = ""; + /** + * + * + *
+   * Version of the MapSDK which the calling SDK depends on, if applicable.
+   * The version format is "major.minor.patch", example: `5.2.1`.
+   * 
+ * + * string maps_sdk_version = 7; + * + * @return The mapsSdkVersion. + */ + @java.lang.Override + public java.lang.String getMapsSdkVersion() { + java.lang.Object ref = mapsSdkVersion_; + 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(); + mapsSdkVersion_ = s; + return s; + } + } + /** + * + * + *
+   * Version of the MapSDK which the calling SDK depends on, if applicable.
+   * The version format is "major.minor.patch", example: `5.2.1`.
+   * 
+ * + * string maps_sdk_version = 7; + * + * @return The bytes for mapsSdkVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMapsSdkVersionBytes() { + java.lang.Object ref = mapsSdkVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mapsSdkVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAV_SDK_VERSION_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object navSdkVersion_ = ""; + /** + * + * + *
+   * Version of the NavSDK which the calling SDK depends on, if applicable.
+   * The version format is "major.minor.patch", example: `2.1.0`.
+   * 
+ * + * string nav_sdk_version = 8; + * + * @return The navSdkVersion. + */ + @java.lang.Override + public java.lang.String getNavSdkVersion() { + java.lang.Object ref = navSdkVersion_; + 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(); + navSdkVersion_ = s; + return s; + } + } + /** + * + * + *
+   * Version of the NavSDK which the calling SDK depends on, if applicable.
+   * The version format is "major.minor.patch", example: `2.1.0`.
+   * 
+ * + * string nav_sdk_version = 8; + * + * @return The bytes for navSdkVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNavSdkVersionBytes() { + java.lang.Object ref = navSdkVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + navSdkVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PLATFORM_FIELD_NUMBER = 9; + private int platform_ = 0; + /** + * + * + *
+   * Platform of the calling SDK.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader.Platform platform = 9; + * + * @return The enum numeric value on the wire for platform. + */ + @java.lang.Override + public int getPlatformValue() { + return platform_; + } + /** + * + * + *
+   * Platform of the calling SDK.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader.Platform platform = 9; + * + * @return The platform. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.RequestHeader.Platform getPlatform() { + com.google.maps.fleetengine.v1.RequestHeader.Platform result = + com.google.maps.fleetengine.v1.RequestHeader.Platform.forNumber(platform_); + return result == null + ? com.google.maps.fleetengine.v1.RequestHeader.Platform.UNRECOGNIZED + : result; + } + + public static final int MANUFACTURER_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private volatile java.lang.Object manufacturer_ = ""; + /** + * + * + *
+   * Manufacturer of the Android device from the calling SDK, only applicable
+   * for the Android SDKs.
+   * Field value example: `Samsung`.
+   * 
+ * + * string manufacturer = 10; + * + * @return The manufacturer. + */ + @java.lang.Override + public java.lang.String getManufacturer() { + java.lang.Object ref = manufacturer_; + 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(); + manufacturer_ = s; + return s; + } + } + /** + * + * + *
+   * Manufacturer of the Android device from the calling SDK, only applicable
+   * for the Android SDKs.
+   * Field value example: `Samsung`.
+   * 
+ * + * string manufacturer = 10; + * + * @return The bytes for manufacturer. + */ + @java.lang.Override + public com.google.protobuf.ByteString getManufacturerBytes() { + java.lang.Object ref = manufacturer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + manufacturer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANDROID_API_LEVEL_FIELD_NUMBER = 11; + private int androidApiLevel_ = 0; + /** + * + * + *
+   * Android API level of the calling SDK, only applicable for the Android SDKs.
+   * Field value example: `23`.
+   * 
+ * + * int32 android_api_level = 11; + * + * @return The androidApiLevel. + */ + @java.lang.Override + public int getAndroidApiLevel() { + return androidApiLevel_; + } + + public static final int TRACE_ID_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private volatile java.lang.Object traceId_ = ""; + /** + * + * + *
+   * Optional ID that can be provided for logging purposes in order to identify
+   * the request.
+   * 
+ * + * string trace_id = 12; + * + * @return The traceId. + */ + @java.lang.Override + public java.lang.String getTraceId() { + java.lang.Object ref = traceId_; + 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(); + traceId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional ID that can be provided for logging purposes in order to identify
+   * the request.
+   * 
+ * + * string trace_id = 12; + * + * @return The bytes for traceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTraceIdBytes() { + java.lang.Object ref = traceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + traceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, languageCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(regionCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, regionCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sdkVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sdkVersion_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(osVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, osVersion_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceModel_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, deviceModel_); + } + if (sdkType_ + != com.google.maps.fleetengine.v1.RequestHeader.SdkType.SDK_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(6, sdkType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mapsSdkVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, mapsSdkVersion_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(navSdkVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, navSdkVersion_); + } + if (platform_ + != com.google.maps.fleetengine.v1.RequestHeader.Platform.PLATFORM_UNSPECIFIED.getNumber()) { + output.writeEnum(9, platform_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(manufacturer_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, manufacturer_); + } + if (androidApiLevel_ != 0) { + output.writeInt32(11, androidApiLevel_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(traceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, traceId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, languageCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(regionCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, regionCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sdkVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sdkVersion_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(osVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, osVersion_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceModel_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, deviceModel_); + } + if (sdkType_ + != com.google.maps.fleetengine.v1.RequestHeader.SdkType.SDK_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, sdkType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mapsSdkVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, mapsSdkVersion_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(navSdkVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, navSdkVersion_); + } + if (platform_ + != com.google.maps.fleetengine.v1.RequestHeader.Platform.PLATFORM_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, platform_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(manufacturer_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, manufacturer_); + } + if (androidApiLevel_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(11, androidApiLevel_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(traceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, traceId_); + } + 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.fleetengine.v1.RequestHeader)) { + return super.equals(obj); + } + com.google.maps.fleetengine.v1.RequestHeader other = + (com.google.maps.fleetengine.v1.RequestHeader) obj; + + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (!getRegionCode().equals(other.getRegionCode())) return false; + if (!getSdkVersion().equals(other.getSdkVersion())) return false; + if (!getOsVersion().equals(other.getOsVersion())) return false; + if (!getDeviceModel().equals(other.getDeviceModel())) return false; + if (sdkType_ != other.sdkType_) return false; + if (!getMapsSdkVersion().equals(other.getMapsSdkVersion())) return false; + if (!getNavSdkVersion().equals(other.getNavSdkVersion())) return false; + if (platform_ != other.platform_) return false; + if (!getManufacturer().equals(other.getManufacturer())) return false; + if (getAndroidApiLevel() != other.getAndroidApiLevel()) return false; + if (!getTraceId().equals(other.getTraceId())) 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) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (37 * hash) + REGION_CODE_FIELD_NUMBER; + hash = (53 * hash) + getRegionCode().hashCode(); + hash = (37 * hash) + SDK_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getSdkVersion().hashCode(); + hash = (37 * hash) + OS_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getOsVersion().hashCode(); + hash = (37 * hash) + DEVICE_MODEL_FIELD_NUMBER; + hash = (53 * hash) + getDeviceModel().hashCode(); + hash = (37 * hash) + SDK_TYPE_FIELD_NUMBER; + hash = (53 * hash) + sdkType_; + hash = (37 * hash) + MAPS_SDK_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getMapsSdkVersion().hashCode(); + hash = (37 * hash) + NAV_SDK_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getNavSdkVersion().hashCode(); + hash = (37 * hash) + PLATFORM_FIELD_NUMBER; + hash = (53 * hash) + platform_; + hash = (37 * hash) + MANUFACTURER_FIELD_NUMBER; + hash = (53 * hash) + getManufacturer().hashCode(); + hash = (37 * hash) + ANDROID_API_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + getAndroidApiLevel(); + hash = (37 * hash) + TRACE_ID_FIELD_NUMBER; + hash = (53 * hash) + getTraceId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.fleetengine.v1.RequestHeader parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.RequestHeader 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.fleetengine.v1.RequestHeader parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.RequestHeader 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.fleetengine.v1.RequestHeader parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.RequestHeader parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.RequestHeader parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.RequestHeader parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.RequestHeader parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.RequestHeader parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.RequestHeader parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.RequestHeader parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.fleetengine.v1.RequestHeader prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A RequestHeader contains fields common to all Fleet Engine RPC requests.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.v1.RequestHeader} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.v1.RequestHeader) + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.Headers + .internal_static_maps_fleetengine_v1_RequestHeader_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.Headers + .internal_static_maps_fleetengine_v1_RequestHeader_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.RequestHeader.class, + com.google.maps.fleetengine.v1.RequestHeader.Builder.class); + } + + // Construct using com.google.maps.fleetengine.v1.RequestHeader.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + languageCode_ = ""; + regionCode_ = ""; + sdkVersion_ = ""; + osVersion_ = ""; + deviceModel_ = ""; + sdkType_ = 0; + mapsSdkVersion_ = ""; + navSdkVersion_ = ""; + platform_ = 0; + manufacturer_ = ""; + androidApiLevel_ = 0; + traceId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.fleetengine.v1.Headers + .internal_static_maps_fleetengine_v1_RequestHeader_descriptor; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.RequestHeader getDefaultInstanceForType() { + return com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.RequestHeader build() { + com.google.maps.fleetengine.v1.RequestHeader result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.RequestHeader buildPartial() { + com.google.maps.fleetengine.v1.RequestHeader result = + new com.google.maps.fleetengine.v1.RequestHeader(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.fleetengine.v1.RequestHeader result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.languageCode_ = languageCode_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.regionCode_ = regionCode_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.sdkVersion_ = sdkVersion_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.osVersion_ = osVersion_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.deviceModel_ = deviceModel_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.sdkType_ = sdkType_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.mapsSdkVersion_ = mapsSdkVersion_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.navSdkVersion_ = navSdkVersion_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.platform_ = platform_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.manufacturer_ = manufacturer_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.androidApiLevel_ = androidApiLevel_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.traceId_ = traceId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.fleetengine.v1.RequestHeader) { + return mergeFrom((com.google.maps.fleetengine.v1.RequestHeader) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.fleetengine.v1.RequestHeader other) { + if (other == com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance()) return this; + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRegionCode().isEmpty()) { + regionCode_ = other.regionCode_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getSdkVersion().isEmpty()) { + sdkVersion_ = other.sdkVersion_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getOsVersion().isEmpty()) { + osVersion_ = other.osVersion_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getDeviceModel().isEmpty()) { + deviceModel_ = other.deviceModel_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.sdkType_ != 0) { + setSdkTypeValue(other.getSdkTypeValue()); + } + if (!other.getMapsSdkVersion().isEmpty()) { + mapsSdkVersion_ = other.mapsSdkVersion_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (!other.getNavSdkVersion().isEmpty()) { + navSdkVersion_ = other.navSdkVersion_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (other.platform_ != 0) { + setPlatformValue(other.getPlatformValue()); + } + if (!other.getManufacturer().isEmpty()) { + manufacturer_ = other.manufacturer_; + bitField0_ |= 0x00000200; + onChanged(); + } + if (other.getAndroidApiLevel() != 0) { + setAndroidApiLevel(other.getAndroidApiLevel()); + } + if (!other.getTraceId().isEmpty()) { + traceId_ = other.traceId_; + bitField0_ |= 0x00000800; + 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: + { + languageCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + regionCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + sdkVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + osVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + deviceModel_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + sdkType_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + mapsSdkVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + navSdkVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 72: + { + platform_ = input.readEnum(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 82: + { + manufacturer_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 88: + { + androidApiLevel_ = input.readInt32(); + bitField0_ |= 0x00000400; + break; + } // case 88 + case 98: + { + traceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 98 + 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 languageCode_ = ""; + /** + * + * + *
+     * The BCP-47 language code, such as en-US or sr-Latn. For more information,
+     * see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If none
+     * is specified, the response may be in any language, with a preference for
+     * English if such a name exists. Field value example: `en-US`.
+     * 
+ * + * string language_code = 1; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The BCP-47 language code, such as en-US or sr-Latn. For more information,
+     * see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If none
+     * is specified, the response may be in any language, with a preference for
+     * English if such a name exists. Field value example: `en-US`.
+     * 
+ * + * string language_code = 1; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The BCP-47 language code, such as en-US or sr-Latn. For more information,
+     * see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If none
+     * is specified, the response may be in any language, with a preference for
+     * English if such a name exists. Field value example: `en-US`.
+     * 
+ * + * string language_code = 1; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + languageCode_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The BCP-47 language code, such as en-US or sr-Latn. For more information,
+     * see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If none
+     * is specified, the response may be in any language, with a preference for
+     * English if such a name exists. Field value example: `en-US`.
+     * 
+ * + * string language_code = 1; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + languageCode_ = getDefaultInstance().getLanguageCode(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The BCP-47 language code, such as en-US or sr-Latn. For more information,
+     * see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If none
+     * is specified, the response may be in any language, with a preference for
+     * English if such a name exists. Field value example: `en-US`.
+     * 
+ * + * string language_code = 1; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + languageCode_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object regionCode_ = ""; + /** + * + * + *
+     * Required. CLDR region code of the region where the request originates.
+     * Field value example: `US`.
+     * 
+ * + * string region_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The regionCode. + */ + public java.lang.String getRegionCode() { + java.lang.Object ref = regionCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + regionCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. CLDR region code of the region where the request originates.
+     * Field value example: `US`.
+     * 
+ * + * string region_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for regionCode. + */ + public com.google.protobuf.ByteString getRegionCodeBytes() { + java.lang.Object ref = regionCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + regionCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. CLDR region code of the region where the request originates.
+     * Field value example: `US`.
+     * 
+ * + * string region_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The regionCode to set. + * @return This builder for chaining. + */ + public Builder setRegionCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + regionCode_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. CLDR region code of the region where the request originates.
+     * Field value example: `US`.
+     * 
+ * + * string region_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearRegionCode() { + regionCode_ = getDefaultInstance().getRegionCode(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. CLDR region code of the region where the request originates.
+     * Field value example: `US`.
+     * 
+ * + * string region_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for regionCode to set. + * @return This builder for chaining. + */ + public Builder setRegionCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + regionCode_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object sdkVersion_ = ""; + /** + * + * + *
+     * Version of the calling SDK, if applicable.
+     * The version format is "major.minor.patch", example: `1.1.2`.
+     * 
+ * + * string sdk_version = 3; + * + * @return The sdkVersion. + */ + public java.lang.String getSdkVersion() { + java.lang.Object ref = sdkVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sdkVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Version of the calling SDK, if applicable.
+     * The version format is "major.minor.patch", example: `1.1.2`.
+     * 
+ * + * string sdk_version = 3; + * + * @return The bytes for sdkVersion. + */ + public com.google.protobuf.ByteString getSdkVersionBytes() { + java.lang.Object ref = sdkVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sdkVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Version of the calling SDK, if applicable.
+     * The version format is "major.minor.patch", example: `1.1.2`.
+     * 
+ * + * string sdk_version = 3; + * + * @param value The sdkVersion to set. + * @return This builder for chaining. + */ + public Builder setSdkVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sdkVersion_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Version of the calling SDK, if applicable.
+     * The version format is "major.minor.patch", example: `1.1.2`.
+     * 
+ * + * string sdk_version = 3; + * + * @return This builder for chaining. + */ + public Builder clearSdkVersion() { + sdkVersion_ = getDefaultInstance().getSdkVersion(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Version of the calling SDK, if applicable.
+     * The version format is "major.minor.patch", example: `1.1.2`.
+     * 
+ * + * string sdk_version = 3; + * + * @param value The bytes for sdkVersion to set. + * @return This builder for chaining. + */ + public Builder setSdkVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sdkVersion_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object osVersion_ = ""; + /** + * + * + *
+     * Version of the operating system on which the calling SDK is running.
+     * Field value examples: `4.4.1`, `12.1`.
+     * 
+ * + * string os_version = 4; + * + * @return The osVersion. + */ + public java.lang.String getOsVersion() { + java.lang.Object ref = osVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Version of the operating system on which the calling SDK is running.
+     * Field value examples: `4.4.1`, `12.1`.
+     * 
+ * + * string os_version = 4; + * + * @return The bytes for osVersion. + */ + public com.google.protobuf.ByteString getOsVersionBytes() { + java.lang.Object ref = osVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Version of the operating system on which the calling SDK is running.
+     * Field value examples: `4.4.1`, `12.1`.
+     * 
+ * + * string os_version = 4; + * + * @param value The osVersion to set. + * @return This builder for chaining. + */ + public Builder setOsVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + osVersion_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Version of the operating system on which the calling SDK is running.
+     * Field value examples: `4.4.1`, `12.1`.
+     * 
+ * + * string os_version = 4; + * + * @return This builder for chaining. + */ + public Builder clearOsVersion() { + osVersion_ = getDefaultInstance().getOsVersion(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Version of the operating system on which the calling SDK is running.
+     * Field value examples: `4.4.1`, `12.1`.
+     * 
+ * + * string os_version = 4; + * + * @param value The bytes for osVersion to set. + * @return This builder for chaining. + */ + public Builder setOsVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + osVersion_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object deviceModel_ = ""; + /** + * + * + *
+     * Model of the device on which the calling SDK is running.
+     * Field value examples: `iPhone12,1`, `SM-G920F`.
+     * 
+ * + * string device_model = 5; + * + * @return The deviceModel. + */ + public java.lang.String getDeviceModel() { + java.lang.Object ref = deviceModel_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceModel_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Model of the device on which the calling SDK is running.
+     * Field value examples: `iPhone12,1`, `SM-G920F`.
+     * 
+ * + * string device_model = 5; + * + * @return The bytes for deviceModel. + */ + public com.google.protobuf.ByteString getDeviceModelBytes() { + java.lang.Object ref = deviceModel_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deviceModel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Model of the device on which the calling SDK is running.
+     * Field value examples: `iPhone12,1`, `SM-G920F`.
+     * 
+ * + * string device_model = 5; + * + * @param value The deviceModel to set. + * @return This builder for chaining. + */ + public Builder setDeviceModel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + deviceModel_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Model of the device on which the calling SDK is running.
+     * Field value examples: `iPhone12,1`, `SM-G920F`.
+     * 
+ * + * string device_model = 5; + * + * @return This builder for chaining. + */ + public Builder clearDeviceModel() { + deviceModel_ = getDefaultInstance().getDeviceModel(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Model of the device on which the calling SDK is running.
+     * Field value examples: `iPhone12,1`, `SM-G920F`.
+     * 
+ * + * string device_model = 5; + * + * @param value The bytes for deviceModel to set. + * @return This builder for chaining. + */ + public Builder setDeviceModelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + deviceModel_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private int sdkType_ = 0; + /** + * + * + *
+     * The type of SDK sending the request.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader.SdkType sdk_type = 6; + * + * @return The enum numeric value on the wire for sdkType. + */ + @java.lang.Override + public int getSdkTypeValue() { + return sdkType_; + } + /** + * + * + *
+     * The type of SDK sending the request.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader.SdkType sdk_type = 6; + * + * @param value The enum numeric value on the wire for sdkType to set. + * @return This builder for chaining. + */ + public Builder setSdkTypeValue(int value) { + sdkType_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of SDK sending the request.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader.SdkType sdk_type = 6; + * + * @return The sdkType. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.RequestHeader.SdkType getSdkType() { + com.google.maps.fleetengine.v1.RequestHeader.SdkType result = + com.google.maps.fleetengine.v1.RequestHeader.SdkType.forNumber(sdkType_); + return result == null + ? com.google.maps.fleetengine.v1.RequestHeader.SdkType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The type of SDK sending the request.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader.SdkType sdk_type = 6; + * + * @param value The sdkType to set. + * @return This builder for chaining. + */ + public Builder setSdkType(com.google.maps.fleetengine.v1.RequestHeader.SdkType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + sdkType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of SDK sending the request.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader.SdkType sdk_type = 6; + * + * @return This builder for chaining. + */ + public Builder clearSdkType() { + bitField0_ = (bitField0_ & ~0x00000020); + sdkType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object mapsSdkVersion_ = ""; + /** + * + * + *
+     * Version of the MapSDK which the calling SDK depends on, if applicable.
+     * The version format is "major.minor.patch", example: `5.2.1`.
+     * 
+ * + * string maps_sdk_version = 7; + * + * @return The mapsSdkVersion. + */ + public java.lang.String getMapsSdkVersion() { + java.lang.Object ref = mapsSdkVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mapsSdkVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Version of the MapSDK which the calling SDK depends on, if applicable.
+     * The version format is "major.minor.patch", example: `5.2.1`.
+     * 
+ * + * string maps_sdk_version = 7; + * + * @return The bytes for mapsSdkVersion. + */ + public com.google.protobuf.ByteString getMapsSdkVersionBytes() { + java.lang.Object ref = mapsSdkVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mapsSdkVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Version of the MapSDK which the calling SDK depends on, if applicable.
+     * The version format is "major.minor.patch", example: `5.2.1`.
+     * 
+ * + * string maps_sdk_version = 7; + * + * @param value The mapsSdkVersion to set. + * @return This builder for chaining. + */ + public Builder setMapsSdkVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + mapsSdkVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Version of the MapSDK which the calling SDK depends on, if applicable.
+     * The version format is "major.minor.patch", example: `5.2.1`.
+     * 
+ * + * string maps_sdk_version = 7; + * + * @return This builder for chaining. + */ + public Builder clearMapsSdkVersion() { + mapsSdkVersion_ = getDefaultInstance().getMapsSdkVersion(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * Version of the MapSDK which the calling SDK depends on, if applicable.
+     * The version format is "major.minor.patch", example: `5.2.1`.
+     * 
+ * + * string maps_sdk_version = 7; + * + * @param value The bytes for mapsSdkVersion to set. + * @return This builder for chaining. + */ + public Builder setMapsSdkVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + mapsSdkVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private java.lang.Object navSdkVersion_ = ""; + /** + * + * + *
+     * Version of the NavSDK which the calling SDK depends on, if applicable.
+     * The version format is "major.minor.patch", example: `2.1.0`.
+     * 
+ * + * string nav_sdk_version = 8; + * + * @return The navSdkVersion. + */ + public java.lang.String getNavSdkVersion() { + java.lang.Object ref = navSdkVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + navSdkVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Version of the NavSDK which the calling SDK depends on, if applicable.
+     * The version format is "major.minor.patch", example: `2.1.0`.
+     * 
+ * + * string nav_sdk_version = 8; + * + * @return The bytes for navSdkVersion. + */ + public com.google.protobuf.ByteString getNavSdkVersionBytes() { + java.lang.Object ref = navSdkVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + navSdkVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Version of the NavSDK which the calling SDK depends on, if applicable.
+     * The version format is "major.minor.patch", example: `2.1.0`.
+     * 
+ * + * string nav_sdk_version = 8; + * + * @param value The navSdkVersion to set. + * @return This builder for chaining. + */ + public Builder setNavSdkVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + navSdkVersion_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Version of the NavSDK which the calling SDK depends on, if applicable.
+     * The version format is "major.minor.patch", example: `2.1.0`.
+     * 
+ * + * string nav_sdk_version = 8; + * + * @return This builder for chaining. + */ + public Builder clearNavSdkVersion() { + navSdkVersion_ = getDefaultInstance().getNavSdkVersion(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * Version of the NavSDK which the calling SDK depends on, if applicable.
+     * The version format is "major.minor.patch", example: `2.1.0`.
+     * 
+ * + * string nav_sdk_version = 8; + * + * @param value The bytes for navSdkVersion to set. + * @return This builder for chaining. + */ + public Builder setNavSdkVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + navSdkVersion_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private int platform_ = 0; + /** + * + * + *
+     * Platform of the calling SDK.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader.Platform platform = 9; + * + * @return The enum numeric value on the wire for platform. + */ + @java.lang.Override + public int getPlatformValue() { + return platform_; + } + /** + * + * + *
+     * Platform of the calling SDK.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader.Platform platform = 9; + * + * @param value The enum numeric value on the wire for platform to set. + * @return This builder for chaining. + */ + public Builder setPlatformValue(int value) { + platform_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Platform of the calling SDK.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader.Platform platform = 9; + * + * @return The platform. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.RequestHeader.Platform getPlatform() { + com.google.maps.fleetengine.v1.RequestHeader.Platform result = + com.google.maps.fleetengine.v1.RequestHeader.Platform.forNumber(platform_); + return result == null + ? com.google.maps.fleetengine.v1.RequestHeader.Platform.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Platform of the calling SDK.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader.Platform platform = 9; + * + * @param value The platform to set. + * @return This builder for chaining. + */ + public Builder setPlatform(com.google.maps.fleetengine.v1.RequestHeader.Platform value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + platform_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Platform of the calling SDK.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader.Platform platform = 9; + * + * @return This builder for chaining. + */ + public Builder clearPlatform() { + bitField0_ = (bitField0_ & ~0x00000100); + platform_ = 0; + onChanged(); + return this; + } + + private java.lang.Object manufacturer_ = ""; + /** + * + * + *
+     * Manufacturer of the Android device from the calling SDK, only applicable
+     * for the Android SDKs.
+     * Field value example: `Samsung`.
+     * 
+ * + * string manufacturer = 10; + * + * @return The manufacturer. + */ + public java.lang.String getManufacturer() { + java.lang.Object ref = manufacturer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + manufacturer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Manufacturer of the Android device from the calling SDK, only applicable
+     * for the Android SDKs.
+     * Field value example: `Samsung`.
+     * 
+ * + * string manufacturer = 10; + * + * @return The bytes for manufacturer. + */ + public com.google.protobuf.ByteString getManufacturerBytes() { + java.lang.Object ref = manufacturer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + manufacturer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Manufacturer of the Android device from the calling SDK, only applicable
+     * for the Android SDKs.
+     * Field value example: `Samsung`.
+     * 
+ * + * string manufacturer = 10; + * + * @param value The manufacturer to set. + * @return This builder for chaining. + */ + public Builder setManufacturer(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + manufacturer_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Manufacturer of the Android device from the calling SDK, only applicable
+     * for the Android SDKs.
+     * Field value example: `Samsung`.
+     * 
+ * + * string manufacturer = 10; + * + * @return This builder for chaining. + */ + public Builder clearManufacturer() { + manufacturer_ = getDefaultInstance().getManufacturer(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + /** + * + * + *
+     * Manufacturer of the Android device from the calling SDK, only applicable
+     * for the Android SDKs.
+     * Field value example: `Samsung`.
+     * 
+ * + * string manufacturer = 10; + * + * @param value The bytes for manufacturer to set. + * @return This builder for chaining. + */ + public Builder setManufacturerBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + manufacturer_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private int androidApiLevel_; + /** + * + * + *
+     * Android API level of the calling SDK, only applicable for the Android SDKs.
+     * Field value example: `23`.
+     * 
+ * + * int32 android_api_level = 11; + * + * @return The androidApiLevel. + */ + @java.lang.Override + public int getAndroidApiLevel() { + return androidApiLevel_; + } + /** + * + * + *
+     * Android API level of the calling SDK, only applicable for the Android SDKs.
+     * Field value example: `23`.
+     * 
+ * + * int32 android_api_level = 11; + * + * @param value The androidApiLevel to set. + * @return This builder for chaining. + */ + public Builder setAndroidApiLevel(int value) { + + androidApiLevel_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Android API level of the calling SDK, only applicable for the Android SDKs.
+     * Field value example: `23`.
+     * 
+ * + * int32 android_api_level = 11; + * + * @return This builder for chaining. + */ + public Builder clearAndroidApiLevel() { + bitField0_ = (bitField0_ & ~0x00000400); + androidApiLevel_ = 0; + onChanged(); + return this; + } + + private java.lang.Object traceId_ = ""; + /** + * + * + *
+     * Optional ID that can be provided for logging purposes in order to identify
+     * the request.
+     * 
+ * + * string trace_id = 12; + * + * @return The traceId. + */ + public java.lang.String getTraceId() { + java.lang.Object ref = traceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + traceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional ID that can be provided for logging purposes in order to identify
+     * the request.
+     * 
+ * + * string trace_id = 12; + * + * @return The bytes for traceId. + */ + public com.google.protobuf.ByteString getTraceIdBytes() { + java.lang.Object ref = traceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + traceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional ID that can be provided for logging purposes in order to identify
+     * the request.
+     * 
+ * + * string trace_id = 12; + * + * @param value The traceId to set. + * @return This builder for chaining. + */ + public Builder setTraceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + traceId_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional ID that can be provided for logging purposes in order to identify
+     * the request.
+     * 
+ * + * string trace_id = 12; + * + * @return This builder for chaining. + */ + public Builder clearTraceId() { + traceId_ = getDefaultInstance().getTraceId(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional ID that can be provided for logging purposes in order to identify
+     * the request.
+     * 
+ * + * string trace_id = 12; + * + * @param value The bytes for traceId to set. + * @return This builder for chaining. + */ + public Builder setTraceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + traceId_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:maps.fleetengine.v1.RequestHeader) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.v1.RequestHeader) + private static final com.google.maps.fleetengine.v1.RequestHeader DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.fleetengine.v1.RequestHeader(); + } + + public static com.google.maps.fleetengine.v1.RequestHeader getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RequestHeader 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.fleetengine.v1.RequestHeader getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/RequestHeaderOrBuilder.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/RequestHeaderOrBuilder.java new file mode 100644 index 000000000000..8bce923710d1 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/RequestHeaderOrBuilder.java @@ -0,0 +1,339 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/header.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public interface RequestHeaderOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.v1.RequestHeader) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The BCP-47 language code, such as en-US or sr-Latn. For more information,
+   * see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If none
+   * is specified, the response may be in any language, with a preference for
+   * English if such a name exists. Field value example: `en-US`.
+   * 
+ * + * string language_code = 1; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+   * The BCP-47 language code, such as en-US or sr-Latn. For more information,
+   * see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If none
+   * is specified, the response may be in any language, with a preference for
+   * English if such a name exists. Field value example: `en-US`.
+   * 
+ * + * string language_code = 1; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); + + /** + * + * + *
+   * Required. CLDR region code of the region where the request originates.
+   * Field value example: `US`.
+   * 
+ * + * string region_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The regionCode. + */ + java.lang.String getRegionCode(); + /** + * + * + *
+   * Required. CLDR region code of the region where the request originates.
+   * Field value example: `US`.
+   * 
+ * + * string region_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for regionCode. + */ + com.google.protobuf.ByteString getRegionCodeBytes(); + + /** + * + * + *
+   * Version of the calling SDK, if applicable.
+   * The version format is "major.minor.patch", example: `1.1.2`.
+   * 
+ * + * string sdk_version = 3; + * + * @return The sdkVersion. + */ + java.lang.String getSdkVersion(); + /** + * + * + *
+   * Version of the calling SDK, if applicable.
+   * The version format is "major.minor.patch", example: `1.1.2`.
+   * 
+ * + * string sdk_version = 3; + * + * @return The bytes for sdkVersion. + */ + com.google.protobuf.ByteString getSdkVersionBytes(); + + /** + * + * + *
+   * Version of the operating system on which the calling SDK is running.
+   * Field value examples: `4.4.1`, `12.1`.
+   * 
+ * + * string os_version = 4; + * + * @return The osVersion. + */ + java.lang.String getOsVersion(); + /** + * + * + *
+   * Version of the operating system on which the calling SDK is running.
+   * Field value examples: `4.4.1`, `12.1`.
+   * 
+ * + * string os_version = 4; + * + * @return The bytes for osVersion. + */ + com.google.protobuf.ByteString getOsVersionBytes(); + + /** + * + * + *
+   * Model of the device on which the calling SDK is running.
+   * Field value examples: `iPhone12,1`, `SM-G920F`.
+   * 
+ * + * string device_model = 5; + * + * @return The deviceModel. + */ + java.lang.String getDeviceModel(); + /** + * + * + *
+   * Model of the device on which the calling SDK is running.
+   * Field value examples: `iPhone12,1`, `SM-G920F`.
+   * 
+ * + * string device_model = 5; + * + * @return The bytes for deviceModel. + */ + com.google.protobuf.ByteString getDeviceModelBytes(); + + /** + * + * + *
+   * The type of SDK sending the request.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader.SdkType sdk_type = 6; + * + * @return The enum numeric value on the wire for sdkType. + */ + int getSdkTypeValue(); + /** + * + * + *
+   * The type of SDK sending the request.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader.SdkType sdk_type = 6; + * + * @return The sdkType. + */ + com.google.maps.fleetengine.v1.RequestHeader.SdkType getSdkType(); + + /** + * + * + *
+   * Version of the MapSDK which the calling SDK depends on, if applicable.
+   * The version format is "major.minor.patch", example: `5.2.1`.
+   * 
+ * + * string maps_sdk_version = 7; + * + * @return The mapsSdkVersion. + */ + java.lang.String getMapsSdkVersion(); + /** + * + * + *
+   * Version of the MapSDK which the calling SDK depends on, if applicable.
+   * The version format is "major.minor.patch", example: `5.2.1`.
+   * 
+ * + * string maps_sdk_version = 7; + * + * @return The bytes for mapsSdkVersion. + */ + com.google.protobuf.ByteString getMapsSdkVersionBytes(); + + /** + * + * + *
+   * Version of the NavSDK which the calling SDK depends on, if applicable.
+   * The version format is "major.minor.patch", example: `2.1.0`.
+   * 
+ * + * string nav_sdk_version = 8; + * + * @return The navSdkVersion. + */ + java.lang.String getNavSdkVersion(); + /** + * + * + *
+   * Version of the NavSDK which the calling SDK depends on, if applicable.
+   * The version format is "major.minor.patch", example: `2.1.0`.
+   * 
+ * + * string nav_sdk_version = 8; + * + * @return The bytes for navSdkVersion. + */ + com.google.protobuf.ByteString getNavSdkVersionBytes(); + + /** + * + * + *
+   * Platform of the calling SDK.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader.Platform platform = 9; + * + * @return The enum numeric value on the wire for platform. + */ + int getPlatformValue(); + /** + * + * + *
+   * Platform of the calling SDK.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader.Platform platform = 9; + * + * @return The platform. + */ + com.google.maps.fleetengine.v1.RequestHeader.Platform getPlatform(); + + /** + * + * + *
+   * Manufacturer of the Android device from the calling SDK, only applicable
+   * for the Android SDKs.
+   * Field value example: `Samsung`.
+   * 
+ * + * string manufacturer = 10; + * + * @return The manufacturer. + */ + java.lang.String getManufacturer(); + /** + * + * + *
+   * Manufacturer of the Android device from the calling SDK, only applicable
+   * for the Android SDKs.
+   * Field value example: `Samsung`.
+   * 
+ * + * string manufacturer = 10; + * + * @return The bytes for manufacturer. + */ + com.google.protobuf.ByteString getManufacturerBytes(); + + /** + * + * + *
+   * Android API level of the calling SDK, only applicable for the Android SDKs.
+   * Field value example: `23`.
+   * 
+ * + * int32 android_api_level = 11; + * + * @return The androidApiLevel. + */ + int getAndroidApiLevel(); + + /** + * + * + *
+   * Optional ID that can be provided for logging purposes in order to identify
+   * the request.
+   * 
+ * + * string trace_id = 12; + * + * @return The traceId. + */ + java.lang.String getTraceId(); + /** + * + * + *
+   * Optional ID that can be provided for logging purposes in order to identify
+   * the request.
+   * 
+ * + * string trace_id = 12; + * + * @return The bytes for traceId. + */ + com.google.protobuf.ByteString getTraceIdBytes(); +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/SearchTripsRequest.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/SearchTripsRequest.java new file mode 100644 index 000000000000..a42326ad0842 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/SearchTripsRequest.java @@ -0,0 +1,1810 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/trip_api.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * SearchTrips request message.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.v1.SearchTripsRequest} + */ +public final class SearchTripsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.v1.SearchTripsRequest) + SearchTripsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchTripsRequest.newBuilder() to construct. + private SearchTripsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchTripsRequest() { + parent_ = ""; + vehicleId_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchTripsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.TripApi + .internal_static_maps_fleetengine_v1_SearchTripsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.TripApi + .internal_static_maps_fleetengine_v1_SearchTripsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.SearchTripsRequest.class, + com.google.maps.fleetengine.v1.SearchTripsRequest.Builder.class); + } + + private int bitField0_; + public static final int HEADER_FIELD_NUMBER = 1; + private com.google.maps.fleetengine.v1.RequestHeader header_; + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return Whether the header field is set. + */ + @java.lang.Override + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return The header. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.RequestHeader getHeader() { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.RequestHeaderOrBuilder getHeaderOrBuilder() { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } + + public static final int PARENT_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Must be in the format `providers/{provider}`.
+   * The provider must be the Project ID (for example, `sample-cloud-project`)
+   * of the Google Cloud Project of which the service account making
+   * this call is a member.
+   * 
+ * + * string parent = 3 [(.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. Must be in the format `providers/{provider}`.
+   * The provider must be the Project ID (for example, `sample-cloud-project`)
+   * of the Google Cloud Project of which the service account making
+   * this call is a member.
+   * 
+ * + * string parent = 3 [(.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 VEHICLE_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object vehicleId_ = ""; + /** + * + * + *
+   * The vehicle associated with the trips in the request. If unspecified, the
+   * returned trips do not contain:
+   *
+   * * `current_route_segment`
+   * * `remaining_waypoints`
+   * * `remaining_distance_meters`
+   * * `eta_to_first_waypoint`
+   * 
+ * + * string vehicle_id = 4; + * + * @return The vehicleId. + */ + @java.lang.Override + public java.lang.String getVehicleId() { + java.lang.Object ref = vehicleId_; + 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(); + vehicleId_ = s; + return s; + } + } + /** + * + * + *
+   * The vehicle associated with the trips in the request. If unspecified, the
+   * returned trips do not contain:
+   *
+   * * `current_route_segment`
+   * * `remaining_waypoints`
+   * * `remaining_distance_meters`
+   * * `eta_to_first_waypoint`
+   * 
+ * + * string vehicle_id = 4; + * + * @return The bytes for vehicleId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVehicleIdBytes() { + java.lang.Object ref = vehicleId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vehicleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTIVE_TRIPS_ONLY_FIELD_NUMBER = 5; + private boolean activeTripsOnly_ = false; + /** + * + * + *
+   * If set to true, the response includes Trips that influence a driver's
+   * route.
+   * 
+ * + * bool active_trips_only = 5; + * + * @return The activeTripsOnly. + */ + @java.lang.Override + public boolean getActiveTripsOnly() { + return activeTripsOnly_; + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 6; + private int pageSize_ = 0; + /** + * + * + *
+   * If not set, the server decides the number of results to return.
+   * 
+ * + * int32 page_size = 6; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * Set this to a value previously returned in the `SearchTripsResponse` to
+   * continue from previous results.
+   * 
+ * + * string page_token = 7; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Set this to a value previously returned in the `SearchTripsResponse` to
+   * continue from previous results.
+   * 
+ * + * string page_token = 7; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MINIMUM_STALENESS_FIELD_NUMBER = 8; + private com.google.protobuf.Duration minimumStaleness_; + /** + * + * + *
+   * If specified, returns the trips that have not been updated after the time
+   * `(current - minimum_staleness)`.
+   * 
+ * + * .google.protobuf.Duration minimum_staleness = 8; + * + * @return Whether the minimumStaleness field is set. + */ + @java.lang.Override + public boolean hasMinimumStaleness() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * If specified, returns the trips that have not been updated after the time
+   * `(current - minimum_staleness)`.
+   * 
+ * + * .google.protobuf.Duration minimum_staleness = 8; + * + * @return The minimumStaleness. + */ + @java.lang.Override + public com.google.protobuf.Duration getMinimumStaleness() { + return minimumStaleness_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : minimumStaleness_; + } + /** + * + * + *
+   * If specified, returns the trips that have not been updated after the time
+   * `(current - minimum_staleness)`.
+   * 
+ * + * .google.protobuf.Duration minimum_staleness = 8; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getMinimumStalenessOrBuilder() { + return minimumStaleness_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : minimumStaleness_; + } + + 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, getHeader()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vehicleId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, vehicleId_); + } + if (activeTripsOnly_ != false) { + output.writeBool(5, activeTripsOnly_); + } + if (pageSize_ != 0) { + output.writeInt32(6, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, pageToken_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(8, getMinimumStaleness()); + } + 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, getHeader()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vehicleId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, vehicleId_); + } + if (activeTripsOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, activeTripsOnly_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, pageToken_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getMinimumStaleness()); + } + 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.fleetengine.v1.SearchTripsRequest)) { + return super.equals(obj); + } + com.google.maps.fleetengine.v1.SearchTripsRequest other = + (com.google.maps.fleetengine.v1.SearchTripsRequest) obj; + + if (hasHeader() != other.hasHeader()) return false; + if (hasHeader()) { + if (!getHeader().equals(other.getHeader())) return false; + } + if (!getParent().equals(other.getParent())) return false; + if (!getVehicleId().equals(other.getVehicleId())) return false; + if (getActiveTripsOnly() != other.getActiveTripsOnly()) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (hasMinimumStaleness() != other.hasMinimumStaleness()) return false; + if (hasMinimumStaleness()) { + if (!getMinimumStaleness().equals(other.getMinimumStaleness())) 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 (hasHeader()) { + hash = (37 * hash) + HEADER_FIELD_NUMBER; + hash = (53 * hash) + getHeader().hashCode(); + } + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + VEHICLE_ID_FIELD_NUMBER; + hash = (53 * hash) + getVehicleId().hashCode(); + hash = (37 * hash) + ACTIVE_TRIPS_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getActiveTripsOnly()); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + if (hasMinimumStaleness()) { + hash = (37 * hash) + MINIMUM_STALENESS_FIELD_NUMBER; + hash = (53 * hash) + getMinimumStaleness().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.fleetengine.v1.SearchTripsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.SearchTripsRequest 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.fleetengine.v1.SearchTripsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.SearchTripsRequest 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.fleetengine.v1.SearchTripsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.SearchTripsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.SearchTripsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.SearchTripsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.SearchTripsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.SearchTripsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.SearchTripsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.SearchTripsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.fleetengine.v1.SearchTripsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * SearchTrips request message.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.v1.SearchTripsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.v1.SearchTripsRequest) + com.google.maps.fleetengine.v1.SearchTripsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.TripApi + .internal_static_maps_fleetengine_v1_SearchTripsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.TripApi + .internal_static_maps_fleetengine_v1_SearchTripsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.SearchTripsRequest.class, + com.google.maps.fleetengine.v1.SearchTripsRequest.Builder.class); + } + + // Construct using com.google.maps.fleetengine.v1.SearchTripsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getHeaderFieldBuilder(); + getMinimumStalenessFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + parent_ = ""; + vehicleId_ = ""; + activeTripsOnly_ = false; + pageSize_ = 0; + pageToken_ = ""; + minimumStaleness_ = null; + if (minimumStalenessBuilder_ != null) { + minimumStalenessBuilder_.dispose(); + minimumStalenessBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.fleetengine.v1.TripApi + .internal_static_maps_fleetengine_v1_SearchTripsRequest_descriptor; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.SearchTripsRequest getDefaultInstanceForType() { + return com.google.maps.fleetengine.v1.SearchTripsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.SearchTripsRequest build() { + com.google.maps.fleetengine.v1.SearchTripsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.SearchTripsRequest buildPartial() { + com.google.maps.fleetengine.v1.SearchTripsRequest result = + new com.google.maps.fleetengine.v1.SearchTripsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.fleetengine.v1.SearchTripsRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.header_ = headerBuilder_ == null ? header_ : headerBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.vehicleId_ = vehicleId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.activeTripsOnly_ = activeTripsOnly_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.minimumStaleness_ = + minimumStalenessBuilder_ == null ? minimumStaleness_ : minimumStalenessBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.fleetengine.v1.SearchTripsRequest) { + return mergeFrom((com.google.maps.fleetengine.v1.SearchTripsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.fleetengine.v1.SearchTripsRequest other) { + if (other == com.google.maps.fleetengine.v1.SearchTripsRequest.getDefaultInstance()) + return this; + if (other.hasHeader()) { + mergeHeader(other.getHeader()); + } + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getVehicleId().isEmpty()) { + vehicleId_ = other.vehicleId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getActiveTripsOnly() != false) { + setActiveTripsOnly(other.getActiveTripsOnly()); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.hasMinimumStaleness()) { + mergeMinimumStaleness(other.getMinimumStaleness()); + } + 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(getHeaderFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 34: + { + vehicleId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 34 + case 40: + { + activeTripsOnly_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 40 + case 48: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 48 + case 58: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 58 + case 66: + { + input.readMessage( + getMinimumStalenessFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 66 + 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.fleetengine.v1.RequestHeader header_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.RequestHeader, + com.google.maps.fleetengine.v1.RequestHeader.Builder, + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder> + headerBuilder_; + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return Whether the header field is set. + */ + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return The header. + */ + public com.google.maps.fleetengine.v1.RequestHeader getHeader() { + if (headerBuilder_ == null) { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } else { + return headerBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public Builder setHeader(com.google.maps.fleetengine.v1.RequestHeader value) { + if (headerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + header_ = value; + } else { + headerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public Builder setHeader(com.google.maps.fleetengine.v1.RequestHeader.Builder builderForValue) { + if (headerBuilder_ == null) { + header_ = builderForValue.build(); + } else { + headerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public Builder mergeHeader(com.google.maps.fleetengine.v1.RequestHeader value) { + if (headerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && header_ != null + && header_ != com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance()) { + getHeaderBuilder().mergeFrom(value); + } else { + header_ = value; + } + } else { + headerBuilder_.mergeFrom(value); + } + if (header_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public Builder clearHeader() { + bitField0_ = (bitField0_ & ~0x00000001); + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public com.google.maps.fleetengine.v1.RequestHeader.Builder getHeaderBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getHeaderFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public com.google.maps.fleetengine.v1.RequestHeaderOrBuilder getHeaderOrBuilder() { + if (headerBuilder_ != null) { + return headerBuilder_.getMessageOrBuilder(); + } else { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.RequestHeader, + com.google.maps.fleetengine.v1.RequestHeader.Builder, + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder> + getHeaderFieldBuilder() { + if (headerBuilder_ == null) { + headerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.RequestHeader, + com.google.maps.fleetengine.v1.RequestHeader.Builder, + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder>( + getHeader(), getParentForChildren(), isClean()); + header_ = null; + } + return headerBuilder_; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Must be in the format `providers/{provider}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * string parent = 3 [(.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. Must be in the format `providers/{provider}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * string parent = 3 [(.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. Must be in the format `providers/{provider}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * string parent = 3 [(.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_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Must be in the format `providers/{provider}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * string parent = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Must be in the format `providers/{provider}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * string parent = 3 [(.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_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object vehicleId_ = ""; + /** + * + * + *
+     * The vehicle associated with the trips in the request. If unspecified, the
+     * returned trips do not contain:
+     *
+     * * `current_route_segment`
+     * * `remaining_waypoints`
+     * * `remaining_distance_meters`
+     * * `eta_to_first_waypoint`
+     * 
+ * + * string vehicle_id = 4; + * + * @return The vehicleId. + */ + public java.lang.String getVehicleId() { + java.lang.Object ref = vehicleId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vehicleId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The vehicle associated with the trips in the request. If unspecified, the
+     * returned trips do not contain:
+     *
+     * * `current_route_segment`
+     * * `remaining_waypoints`
+     * * `remaining_distance_meters`
+     * * `eta_to_first_waypoint`
+     * 
+ * + * string vehicle_id = 4; + * + * @return The bytes for vehicleId. + */ + public com.google.protobuf.ByteString getVehicleIdBytes() { + java.lang.Object ref = vehicleId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vehicleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The vehicle associated with the trips in the request. If unspecified, the
+     * returned trips do not contain:
+     *
+     * * `current_route_segment`
+     * * `remaining_waypoints`
+     * * `remaining_distance_meters`
+     * * `eta_to_first_waypoint`
+     * 
+ * + * string vehicle_id = 4; + * + * @param value The vehicleId to set. + * @return This builder for chaining. + */ + public Builder setVehicleId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + vehicleId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The vehicle associated with the trips in the request. If unspecified, the
+     * returned trips do not contain:
+     *
+     * * `current_route_segment`
+     * * `remaining_waypoints`
+     * * `remaining_distance_meters`
+     * * `eta_to_first_waypoint`
+     * 
+ * + * string vehicle_id = 4; + * + * @return This builder for chaining. + */ + public Builder clearVehicleId() { + vehicleId_ = getDefaultInstance().getVehicleId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The vehicle associated with the trips in the request. If unspecified, the
+     * returned trips do not contain:
+     *
+     * * `current_route_segment`
+     * * `remaining_waypoints`
+     * * `remaining_distance_meters`
+     * * `eta_to_first_waypoint`
+     * 
+ * + * string vehicle_id = 4; + * + * @param value The bytes for vehicleId to set. + * @return This builder for chaining. + */ + public Builder setVehicleIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + vehicleId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean activeTripsOnly_; + /** + * + * + *
+     * If set to true, the response includes Trips that influence a driver's
+     * route.
+     * 
+ * + * bool active_trips_only = 5; + * + * @return The activeTripsOnly. + */ + @java.lang.Override + public boolean getActiveTripsOnly() { + return activeTripsOnly_; + } + /** + * + * + *
+     * If set to true, the response includes Trips that influence a driver's
+     * route.
+     * 
+ * + * bool active_trips_only = 5; + * + * @param value The activeTripsOnly to set. + * @return This builder for chaining. + */ + public Builder setActiveTripsOnly(boolean value) { + + activeTripsOnly_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * If set to true, the response includes Trips that influence a driver's
+     * route.
+     * 
+ * + * bool active_trips_only = 5; + * + * @return This builder for chaining. + */ + public Builder clearActiveTripsOnly() { + bitField0_ = (bitField0_ & ~0x00000008); + activeTripsOnly_ = false; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * If not set, the server decides the number of results to return.
+     * 
+ * + * int32 page_size = 6; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * If not set, the server decides the number of results to return.
+     * 
+ * + * int32 page_size = 6; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * If not set, the server decides the number of results to return.
+     * 
+ * + * int32 page_size = 6; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000010); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Set this to a value previously returned in the `SearchTripsResponse` to
+     * continue from previous results.
+     * 
+ * + * string page_token = 7; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Set this to a value previously returned in the `SearchTripsResponse` to
+     * continue from previous results.
+     * 
+ * + * string page_token = 7; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Set this to a value previously returned in the `SearchTripsResponse` to
+     * continue from previous results.
+     * 
+ * + * string page_token = 7; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Set this to a value previously returned in the `SearchTripsResponse` to
+     * continue from previous results.
+     * 
+ * + * string page_token = 7; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Set this to a value previously returned in the `SearchTripsResponse` to
+     * continue from previous results.
+     * 
+ * + * string page_token = 7; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.protobuf.Duration minimumStaleness_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + minimumStalenessBuilder_; + /** + * + * + *
+     * If specified, returns the trips that have not been updated after the time
+     * `(current - minimum_staleness)`.
+     * 
+ * + * .google.protobuf.Duration minimum_staleness = 8; + * + * @return Whether the minimumStaleness field is set. + */ + public boolean hasMinimumStaleness() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * If specified, returns the trips that have not been updated after the time
+     * `(current - minimum_staleness)`.
+     * 
+ * + * .google.protobuf.Duration minimum_staleness = 8; + * + * @return The minimumStaleness. + */ + public com.google.protobuf.Duration getMinimumStaleness() { + if (minimumStalenessBuilder_ == null) { + return minimumStaleness_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : minimumStaleness_; + } else { + return minimumStalenessBuilder_.getMessage(); + } + } + /** + * + * + *
+     * If specified, returns the trips that have not been updated after the time
+     * `(current - minimum_staleness)`.
+     * 
+ * + * .google.protobuf.Duration minimum_staleness = 8; + */ + public Builder setMinimumStaleness(com.google.protobuf.Duration value) { + if (minimumStalenessBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + minimumStaleness_ = value; + } else { + minimumStalenessBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * If specified, returns the trips that have not been updated after the time
+     * `(current - minimum_staleness)`.
+     * 
+ * + * .google.protobuf.Duration minimum_staleness = 8; + */ + public Builder setMinimumStaleness(com.google.protobuf.Duration.Builder builderForValue) { + if (minimumStalenessBuilder_ == null) { + minimumStaleness_ = builderForValue.build(); + } else { + minimumStalenessBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * If specified, returns the trips that have not been updated after the time
+     * `(current - minimum_staleness)`.
+     * 
+ * + * .google.protobuf.Duration minimum_staleness = 8; + */ + public Builder mergeMinimumStaleness(com.google.protobuf.Duration value) { + if (minimumStalenessBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && minimumStaleness_ != null + && minimumStaleness_ != com.google.protobuf.Duration.getDefaultInstance()) { + getMinimumStalenessBuilder().mergeFrom(value); + } else { + minimumStaleness_ = value; + } + } else { + minimumStalenessBuilder_.mergeFrom(value); + } + if (minimumStaleness_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + * + * + *
+     * If specified, returns the trips that have not been updated after the time
+     * `(current - minimum_staleness)`.
+     * 
+ * + * .google.protobuf.Duration minimum_staleness = 8; + */ + public Builder clearMinimumStaleness() { + bitField0_ = (bitField0_ & ~0x00000040); + minimumStaleness_ = null; + if (minimumStalenessBuilder_ != null) { + minimumStalenessBuilder_.dispose(); + minimumStalenessBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * If specified, returns the trips that have not been updated after the time
+     * `(current - minimum_staleness)`.
+     * 
+ * + * .google.protobuf.Duration minimum_staleness = 8; + */ + public com.google.protobuf.Duration.Builder getMinimumStalenessBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getMinimumStalenessFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * If specified, returns the trips that have not been updated after the time
+     * `(current - minimum_staleness)`.
+     * 
+ * + * .google.protobuf.Duration minimum_staleness = 8; + */ + public com.google.protobuf.DurationOrBuilder getMinimumStalenessOrBuilder() { + if (minimumStalenessBuilder_ != null) { + return minimumStalenessBuilder_.getMessageOrBuilder(); + } else { + return minimumStaleness_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : minimumStaleness_; + } + } + /** + * + * + *
+     * If specified, returns the trips that have not been updated after the time
+     * `(current - minimum_staleness)`.
+     * 
+ * + * .google.protobuf.Duration minimum_staleness = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getMinimumStalenessFieldBuilder() { + if (minimumStalenessBuilder_ == null) { + minimumStalenessBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getMinimumStaleness(), getParentForChildren(), isClean()); + minimumStaleness_ = null; + } + return minimumStalenessBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:maps.fleetengine.v1.SearchTripsRequest) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.v1.SearchTripsRequest) + private static final com.google.maps.fleetengine.v1.SearchTripsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.fleetengine.v1.SearchTripsRequest(); + } + + public static com.google.maps.fleetengine.v1.SearchTripsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchTripsRequest 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.fleetengine.v1.SearchTripsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/SearchTripsRequestOrBuilder.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/SearchTripsRequestOrBuilder.java new file mode 100644 index 000000000000..04b579b0ecf6 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/SearchTripsRequestOrBuilder.java @@ -0,0 +1,221 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/trip_api.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public interface SearchTripsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.v1.SearchTripsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return Whether the header field is set. + */ + boolean hasHeader(); + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return The header. + */ + com.google.maps.fleetengine.v1.RequestHeader getHeader(); + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder getHeaderOrBuilder(); + + /** + * + * + *
+   * Required. Must be in the format `providers/{provider}`.
+   * The provider must be the Project ID (for example, `sample-cloud-project`)
+   * of the Google Cloud Project of which the service account making
+   * this call is a member.
+   * 
+ * + * string parent = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Must be in the format `providers/{provider}`.
+   * The provider must be the Project ID (for example, `sample-cloud-project`)
+   * of the Google Cloud Project of which the service account making
+   * this call is a member.
+   * 
+ * + * string parent = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The vehicle associated with the trips in the request. If unspecified, the
+   * returned trips do not contain:
+   *
+   * * `current_route_segment`
+   * * `remaining_waypoints`
+   * * `remaining_distance_meters`
+   * * `eta_to_first_waypoint`
+   * 
+ * + * string vehicle_id = 4; + * + * @return The vehicleId. + */ + java.lang.String getVehicleId(); + /** + * + * + *
+   * The vehicle associated with the trips in the request. If unspecified, the
+   * returned trips do not contain:
+   *
+   * * `current_route_segment`
+   * * `remaining_waypoints`
+   * * `remaining_distance_meters`
+   * * `eta_to_first_waypoint`
+   * 
+ * + * string vehicle_id = 4; + * + * @return The bytes for vehicleId. + */ + com.google.protobuf.ByteString getVehicleIdBytes(); + + /** + * + * + *
+   * If set to true, the response includes Trips that influence a driver's
+   * route.
+   * 
+ * + * bool active_trips_only = 5; + * + * @return The activeTripsOnly. + */ + boolean getActiveTripsOnly(); + + /** + * + * + *
+   * If not set, the server decides the number of results to return.
+   * 
+ * + * int32 page_size = 6; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Set this to a value previously returned in the `SearchTripsResponse` to
+   * continue from previous results.
+   * 
+ * + * string page_token = 7; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Set this to a value previously returned in the `SearchTripsResponse` to
+   * continue from previous results.
+   * 
+ * + * string page_token = 7; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * If specified, returns the trips that have not been updated after the time
+   * `(current - minimum_staleness)`.
+   * 
+ * + * .google.protobuf.Duration minimum_staleness = 8; + * + * @return Whether the minimumStaleness field is set. + */ + boolean hasMinimumStaleness(); + /** + * + * + *
+   * If specified, returns the trips that have not been updated after the time
+   * `(current - minimum_staleness)`.
+   * 
+ * + * .google.protobuf.Duration minimum_staleness = 8; + * + * @return The minimumStaleness. + */ + com.google.protobuf.Duration getMinimumStaleness(); + /** + * + * + *
+   * If specified, returns the trips that have not been updated after the time
+   * `(current - minimum_staleness)`.
+   * 
+ * + * .google.protobuf.Duration minimum_staleness = 8; + */ + com.google.protobuf.DurationOrBuilder getMinimumStalenessOrBuilder(); +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/SearchTripsResponse.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/SearchTripsResponse.java new file mode 100644 index 000000000000..8c781a22850b --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/SearchTripsResponse.java @@ -0,0 +1,1131 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/trip_api.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * SearchTrips response message.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.v1.SearchTripsResponse} + */ +public final class SearchTripsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.v1.SearchTripsResponse) + SearchTripsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchTripsResponse.newBuilder() to construct. + private SearchTripsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchTripsResponse() { + trips_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchTripsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.TripApi + .internal_static_maps_fleetengine_v1_SearchTripsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.TripApi + .internal_static_maps_fleetengine_v1_SearchTripsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.SearchTripsResponse.class, + com.google.maps.fleetengine.v1.SearchTripsResponse.Builder.class); + } + + public static final int TRIPS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List trips_; + /** + * + * + *
+   * The list of trips for the requested vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.Trip trips = 1; + */ + @java.lang.Override + public java.util.List getTripsList() { + return trips_; + } + /** + * + * + *
+   * The list of trips for the requested vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.Trip trips = 1; + */ + @java.lang.Override + public java.util.List + getTripsOrBuilderList() { + return trips_; + } + /** + * + * + *
+   * The list of trips for the requested vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.Trip trips = 1; + */ + @java.lang.Override + public int getTripsCount() { + return trips_.size(); + } + /** + * + * + *
+   * The list of trips for the requested vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.Trip trips = 1; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.Trip getTrips(int index) { + return trips_.get(index); + } + /** + * + * + *
+   * The list of trips for the requested vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.Trip trips = 1; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TripOrBuilder getTripsOrBuilder(int index) { + return trips_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * Pass this token in the SearchTripsRequest to page through list results. The
+   * API returns a trip list on each call, and when no more results remain the
+   * trip list is empty.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Pass this token in the SearchTripsRequest to page through list results. The
+   * API returns a trip list on each call, and when no more results remain the
+   * trip list is empty.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = 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 { + for (int i = 0; i < trips_.size(); i++) { + output.writeMessage(1, trips_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < trips_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, trips_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + 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.fleetengine.v1.SearchTripsResponse)) { + return super.equals(obj); + } + com.google.maps.fleetengine.v1.SearchTripsResponse other = + (com.google.maps.fleetengine.v1.SearchTripsResponse) obj; + + if (!getTripsList().equals(other.getTripsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) 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 (getTripsCount() > 0) { + hash = (37 * hash) + TRIPS_FIELD_NUMBER; + hash = (53 * hash) + getTripsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.fleetengine.v1.SearchTripsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.SearchTripsResponse 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.fleetengine.v1.SearchTripsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.SearchTripsResponse 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.fleetengine.v1.SearchTripsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.SearchTripsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.SearchTripsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.SearchTripsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.SearchTripsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.SearchTripsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.SearchTripsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.SearchTripsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.fleetengine.v1.SearchTripsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * SearchTrips response message.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.v1.SearchTripsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.v1.SearchTripsResponse) + com.google.maps.fleetengine.v1.SearchTripsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.TripApi + .internal_static_maps_fleetengine_v1_SearchTripsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.TripApi + .internal_static_maps_fleetengine_v1_SearchTripsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.SearchTripsResponse.class, + com.google.maps.fleetengine.v1.SearchTripsResponse.Builder.class); + } + + // Construct using com.google.maps.fleetengine.v1.SearchTripsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (tripsBuilder_ == null) { + trips_ = java.util.Collections.emptyList(); + } else { + trips_ = null; + tripsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.fleetengine.v1.TripApi + .internal_static_maps_fleetengine_v1_SearchTripsResponse_descriptor; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.SearchTripsResponse getDefaultInstanceForType() { + return com.google.maps.fleetengine.v1.SearchTripsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.SearchTripsResponse build() { + com.google.maps.fleetengine.v1.SearchTripsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.SearchTripsResponse buildPartial() { + com.google.maps.fleetengine.v1.SearchTripsResponse result = + new com.google.maps.fleetengine.v1.SearchTripsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.maps.fleetengine.v1.SearchTripsResponse result) { + if (tripsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + trips_ = java.util.Collections.unmodifiableList(trips_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.trips_ = trips_; + } else { + result.trips_ = tripsBuilder_.build(); + } + } + + private void buildPartial0(com.google.maps.fleetengine.v1.SearchTripsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.fleetengine.v1.SearchTripsResponse) { + return mergeFrom((com.google.maps.fleetengine.v1.SearchTripsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.fleetengine.v1.SearchTripsResponse other) { + if (other == com.google.maps.fleetengine.v1.SearchTripsResponse.getDefaultInstance()) + return this; + if (tripsBuilder_ == null) { + if (!other.trips_.isEmpty()) { + if (trips_.isEmpty()) { + trips_ = other.trips_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTripsIsMutable(); + trips_.addAll(other.trips_); + } + onChanged(); + } + } else { + if (!other.trips_.isEmpty()) { + if (tripsBuilder_.isEmpty()) { + tripsBuilder_.dispose(); + tripsBuilder_ = null; + trips_ = other.trips_; + bitField0_ = (bitField0_ & ~0x00000001); + tripsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTripsFieldBuilder() + : null; + } else { + tripsBuilder_.addAllMessages(other.trips_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.maps.fleetengine.v1.Trip m = + input.readMessage( + com.google.maps.fleetengine.v1.Trip.parser(), extensionRegistry); + if (tripsBuilder_ == null) { + ensureTripsIsMutable(); + trips_.add(m); + } else { + tripsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List trips_ = + java.util.Collections.emptyList(); + + private void ensureTripsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + trips_ = new java.util.ArrayList(trips_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.Trip, + com.google.maps.fleetengine.v1.Trip.Builder, + com.google.maps.fleetengine.v1.TripOrBuilder> + tripsBuilder_; + + /** + * + * + *
+     * The list of trips for the requested vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.Trip trips = 1; + */ + public java.util.List getTripsList() { + if (tripsBuilder_ == null) { + return java.util.Collections.unmodifiableList(trips_); + } else { + return tripsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of trips for the requested vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.Trip trips = 1; + */ + public int getTripsCount() { + if (tripsBuilder_ == null) { + return trips_.size(); + } else { + return tripsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of trips for the requested vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.Trip trips = 1; + */ + public com.google.maps.fleetengine.v1.Trip getTrips(int index) { + if (tripsBuilder_ == null) { + return trips_.get(index); + } else { + return tripsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of trips for the requested vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.Trip trips = 1; + */ + public Builder setTrips(int index, com.google.maps.fleetengine.v1.Trip value) { + if (tripsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTripsIsMutable(); + trips_.set(index, value); + onChanged(); + } else { + tripsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of trips for the requested vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.Trip trips = 1; + */ + public Builder setTrips( + int index, com.google.maps.fleetengine.v1.Trip.Builder builderForValue) { + if (tripsBuilder_ == null) { + ensureTripsIsMutable(); + trips_.set(index, builderForValue.build()); + onChanged(); + } else { + tripsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of trips for the requested vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.Trip trips = 1; + */ + public Builder addTrips(com.google.maps.fleetengine.v1.Trip value) { + if (tripsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTripsIsMutable(); + trips_.add(value); + onChanged(); + } else { + tripsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of trips for the requested vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.Trip trips = 1; + */ + public Builder addTrips(int index, com.google.maps.fleetengine.v1.Trip value) { + if (tripsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTripsIsMutable(); + trips_.add(index, value); + onChanged(); + } else { + tripsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of trips for the requested vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.Trip trips = 1; + */ + public Builder addTrips(com.google.maps.fleetengine.v1.Trip.Builder builderForValue) { + if (tripsBuilder_ == null) { + ensureTripsIsMutable(); + trips_.add(builderForValue.build()); + onChanged(); + } else { + tripsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of trips for the requested vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.Trip trips = 1; + */ + public Builder addTrips( + int index, com.google.maps.fleetengine.v1.Trip.Builder builderForValue) { + if (tripsBuilder_ == null) { + ensureTripsIsMutable(); + trips_.add(index, builderForValue.build()); + onChanged(); + } else { + tripsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of trips for the requested vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.Trip trips = 1; + */ + public Builder addAllTrips( + java.lang.Iterable values) { + if (tripsBuilder_ == null) { + ensureTripsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, trips_); + onChanged(); + } else { + tripsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of trips for the requested vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.Trip trips = 1; + */ + public Builder clearTrips() { + if (tripsBuilder_ == null) { + trips_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + tripsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of trips for the requested vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.Trip trips = 1; + */ + public Builder removeTrips(int index) { + if (tripsBuilder_ == null) { + ensureTripsIsMutable(); + trips_.remove(index); + onChanged(); + } else { + tripsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of trips for the requested vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.Trip trips = 1; + */ + public com.google.maps.fleetengine.v1.Trip.Builder getTripsBuilder(int index) { + return getTripsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of trips for the requested vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.Trip trips = 1; + */ + public com.google.maps.fleetengine.v1.TripOrBuilder getTripsOrBuilder(int index) { + if (tripsBuilder_ == null) { + return trips_.get(index); + } else { + return tripsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of trips for the requested vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.Trip trips = 1; + */ + public java.util.List + getTripsOrBuilderList() { + if (tripsBuilder_ != null) { + return tripsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(trips_); + } + } + /** + * + * + *
+     * The list of trips for the requested vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.Trip trips = 1; + */ + public com.google.maps.fleetengine.v1.Trip.Builder addTripsBuilder() { + return getTripsFieldBuilder() + .addBuilder(com.google.maps.fleetengine.v1.Trip.getDefaultInstance()); + } + /** + * + * + *
+     * The list of trips for the requested vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.Trip trips = 1; + */ + public com.google.maps.fleetengine.v1.Trip.Builder addTripsBuilder(int index) { + return getTripsFieldBuilder() + .addBuilder(index, com.google.maps.fleetengine.v1.Trip.getDefaultInstance()); + } + /** + * + * + *
+     * The list of trips for the requested vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.Trip trips = 1; + */ + public java.util.List getTripsBuilderList() { + return getTripsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.Trip, + com.google.maps.fleetengine.v1.Trip.Builder, + com.google.maps.fleetengine.v1.TripOrBuilder> + getTripsFieldBuilder() { + if (tripsBuilder_ == null) { + tripsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.Trip, + com.google.maps.fleetengine.v1.Trip.Builder, + com.google.maps.fleetengine.v1.TripOrBuilder>( + trips_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + trips_ = null; + } + return tripsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Pass this token in the SearchTripsRequest to page through list results. The
+     * API returns a trip list on each call, and when no more results remain the
+     * trip list is empty.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Pass this token in the SearchTripsRequest to page through list results. The
+     * API returns a trip list on each call, and when no more results remain the
+     * trip list is empty.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Pass this token in the SearchTripsRequest to page through list results. The
+     * API returns a trip list on each call, and when no more results remain the
+     * trip list is empty.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Pass this token in the SearchTripsRequest to page through list results. The
+     * API returns a trip list on each call, and when no more results remain the
+     * trip list is empty.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Pass this token in the SearchTripsRequest to page through list results. The
+     * API returns a trip list on each call, and when no more results remain the
+     * trip list is empty.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:maps.fleetengine.v1.SearchTripsResponse) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.v1.SearchTripsResponse) + private static final com.google.maps.fleetengine.v1.SearchTripsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.fleetengine.v1.SearchTripsResponse(); + } + + public static com.google.maps.fleetengine.v1.SearchTripsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchTripsResponse 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.fleetengine.v1.SearchTripsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/SearchTripsResponseOrBuilder.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/SearchTripsResponseOrBuilder.java new file mode 100644 index 000000000000..be02e2b86723 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/SearchTripsResponseOrBuilder.java @@ -0,0 +1,106 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/trip_api.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public interface SearchTripsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.v1.SearchTripsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of trips for the requested vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.Trip trips = 1; + */ + java.util.List getTripsList(); + /** + * + * + *
+   * The list of trips for the requested vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.Trip trips = 1; + */ + com.google.maps.fleetengine.v1.Trip getTrips(int index); + /** + * + * + *
+   * The list of trips for the requested vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.Trip trips = 1; + */ + int getTripsCount(); + /** + * + * + *
+   * The list of trips for the requested vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.Trip trips = 1; + */ + java.util.List getTripsOrBuilderList(); + /** + * + * + *
+   * The list of trips for the requested vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.Trip trips = 1; + */ + com.google.maps.fleetengine.v1.TripOrBuilder getTripsOrBuilder(int index); + + /** + * + * + *
+   * Pass this token in the SearchTripsRequest to page through list results. The
+   * API returns a trip list on each call, and when no more results remain the
+   * trip list is empty.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Pass this token in the SearchTripsRequest to page through list results. The
+   * API returns a trip list on each call, and when no more results remain the
+   * trip list is empty.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/SearchVehiclesRequest.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/SearchVehiclesRequest.java new file mode 100644 index 000000000000..14dbbd640ea1 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/SearchVehiclesRequest.java @@ -0,0 +1,7273 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicle_api.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * `SearchVehicles` request message.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.v1.SearchVehiclesRequest} + */ +public final class SearchVehiclesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.v1.SearchVehiclesRequest) + SearchVehiclesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchVehiclesRequest.newBuilder() to construct. + private SearchVehiclesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchVehiclesRequest() { + parent_ = ""; + tripTypes_ = java.util.Collections.emptyList(); + vehicleTypes_ = java.util.Collections.emptyList(); + requiredAttributes_ = java.util.Collections.emptyList(); + requiredOneOfAttributes_ = java.util.Collections.emptyList(); + requiredOneOfAttributeSets_ = java.util.Collections.emptyList(); + orderBy_ = 0; + tripId_ = ""; + currentTripsPresent_ = 0; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchVehiclesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_SearchVehiclesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_SearchVehiclesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.SearchVehiclesRequest.class, + com.google.maps.fleetengine.v1.SearchVehiclesRequest.Builder.class); + } + + /** + * + * + *
+   * Specifies the order of the vehicle matches in the response.
+   * 
+ * + * Protobuf enum {@code maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder} + */ + public enum VehicleMatchOrder implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default, used for unspecified or unrecognized vehicle matches order.
+     * 
+ * + * UNKNOWN_VEHICLE_MATCH_ORDER = 0; + */ + UNKNOWN_VEHICLE_MATCH_ORDER(0), + /** + * + * + *
+     * Ascending order by vehicle driving time to the pickup point.
+     * 
+ * + * PICKUP_POINT_ETA = 1; + */ + PICKUP_POINT_ETA(1), + /** + * + * + *
+     * Ascending order by vehicle driving distance to the pickup point.
+     * 
+ * + * PICKUP_POINT_DISTANCE = 2; + */ + PICKUP_POINT_DISTANCE(2), + /** + * + * + *
+     * Ascending order by vehicle driving time to the dropoff point. This order
+     * can only be used if the dropoff point is specified in the request.
+     * 
+ * + * DROPOFF_POINT_ETA = 3; + */ + DROPOFF_POINT_ETA(3), + /** + * + * + *
+     * Ascending order by straight-line distance from the vehicle's last
+     * reported location to the pickup point.
+     * 
+ * + * PICKUP_POINT_STRAIGHT_DISTANCE = 4; + */ + PICKUP_POINT_STRAIGHT_DISTANCE(4), + /** + * + * + *
+     * Ascending order by the configured match cost. Match cost is defined as a
+     * weighted calculation between straight-line distance and ETA. Weights are
+     * set with default values and can be modified per customer. Please contact
+     * Google support if these weights need to be modified for your project.
+     * 
+ * + * COST = 5; + */ + COST(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default, used for unspecified or unrecognized vehicle matches order.
+     * 
+ * + * UNKNOWN_VEHICLE_MATCH_ORDER = 0; + */ + public static final int UNKNOWN_VEHICLE_MATCH_ORDER_VALUE = 0; + /** + * + * + *
+     * Ascending order by vehicle driving time to the pickup point.
+     * 
+ * + * PICKUP_POINT_ETA = 1; + */ + public static final int PICKUP_POINT_ETA_VALUE = 1; + /** + * + * + *
+     * Ascending order by vehicle driving distance to the pickup point.
+     * 
+ * + * PICKUP_POINT_DISTANCE = 2; + */ + public static final int PICKUP_POINT_DISTANCE_VALUE = 2; + /** + * + * + *
+     * Ascending order by vehicle driving time to the dropoff point. This order
+     * can only be used if the dropoff point is specified in the request.
+     * 
+ * + * DROPOFF_POINT_ETA = 3; + */ + public static final int DROPOFF_POINT_ETA_VALUE = 3; + /** + * + * + *
+     * Ascending order by straight-line distance from the vehicle's last
+     * reported location to the pickup point.
+     * 
+ * + * PICKUP_POINT_STRAIGHT_DISTANCE = 4; + */ + public static final int PICKUP_POINT_STRAIGHT_DISTANCE_VALUE = 4; + /** + * + * + *
+     * Ascending order by the configured match cost. Match cost is defined as a
+     * weighted calculation between straight-line distance and ETA. Weights are
+     * set with default values and can be modified per customer. Please contact
+     * Google support if these weights need to be modified for your project.
+     * 
+ * + * COST = 5; + */ + public static final int COST_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static VehicleMatchOrder 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 VehicleMatchOrder forNumber(int value) { + switch (value) { + case 0: + return UNKNOWN_VEHICLE_MATCH_ORDER; + case 1: + return PICKUP_POINT_ETA; + case 2: + return PICKUP_POINT_DISTANCE; + case 3: + return DROPOFF_POINT_ETA; + case 4: + return PICKUP_POINT_STRAIGHT_DISTANCE; + case 5: + return COST; + 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 VehicleMatchOrder findValueByNumber(int number) { + return VehicleMatchOrder.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.maps.fleetengine.v1.SearchVehiclesRequest.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final VehicleMatchOrder[] VALUES = values(); + + public static VehicleMatchOrder 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 VehicleMatchOrder(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder) + } + + /** + * + * + *
+   * Specifies the types of restrictions on a vehicle's current trips.
+   * 
+ * + * Protobuf enum {@code maps.fleetengine.v1.SearchVehiclesRequest.CurrentTripsPresent} + */ + public enum CurrentTripsPresent implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The availability of vehicles with trips present is governed by the
+     * `include_back_to_back` field.
+     * 
+ * + * CURRENT_TRIPS_PRESENT_UNSPECIFIED = 0; + */ + CURRENT_TRIPS_PRESENT_UNSPECIFIED(0), + /** + * + * + *
+     * Vehicles without trips can appear in search results. When this value is
+     * used, `include_back_to_back` cannot be `true`.
+     * 
+ * + * NONE = 1; + */ + NONE(1), + /** + * + * + *
+     * Vehicles with at most 5 current trips and 10 waypoints are included
+     * in the search results. When this value is used, `include_back_to_back`
+     * cannot be `true`.
+     * 
+ * + * ANY = 2; + */ + ANY(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The availability of vehicles with trips present is governed by the
+     * `include_back_to_back` field.
+     * 
+ * + * CURRENT_TRIPS_PRESENT_UNSPECIFIED = 0; + */ + public static final int CURRENT_TRIPS_PRESENT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Vehicles without trips can appear in search results. When this value is
+     * used, `include_back_to_back` cannot be `true`.
+     * 
+ * + * NONE = 1; + */ + public static final int NONE_VALUE = 1; + /** + * + * + *
+     * Vehicles with at most 5 current trips and 10 waypoints are included
+     * in the search results. When this value is used, `include_back_to_back`
+     * cannot be `true`.
+     * 
+ * + * ANY = 2; + */ + public static final int ANY_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CurrentTripsPresent 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 CurrentTripsPresent forNumber(int value) { + switch (value) { + case 0: + return CURRENT_TRIPS_PRESENT_UNSPECIFIED; + case 1: + return NONE; + case 2: + return ANY; + 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 CurrentTripsPresent findValueByNumber(int number) { + return CurrentTripsPresent.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.maps.fleetengine.v1.SearchVehiclesRequest.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final CurrentTripsPresent[] VALUES = values(); + + public static CurrentTripsPresent 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 CurrentTripsPresent(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:maps.fleetengine.v1.SearchVehiclesRequest.CurrentTripsPresent) + } + + private int bitField0_; + public static final int HEADER_FIELD_NUMBER = 1; + private com.google.maps.fleetengine.v1.RequestHeader header_; + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return Whether the header field is set. + */ + @java.lang.Override + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return The header. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.RequestHeader getHeader() { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.RequestHeaderOrBuilder getHeaderOrBuilder() { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } + + public static final int PARENT_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Must be in the format `providers/{provider}`.
+   * The provider must be the Project ID (for example, `sample-cloud-project`)
+   * of the Google Cloud Project of which the service account making
+   * this call is a member.
+   * 
+ * + * string parent = 3 [(.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. Must be in the format `providers/{provider}`.
+   * The provider must be the Project ID (for example, `sample-cloud-project`)
+   * of the Google Cloud Project of which the service account making
+   * this call is a member.
+   * 
+ * + * string parent = 3 [(.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 PICKUP_POINT_FIELD_NUMBER = 4; + private com.google.maps.fleetengine.v1.TerminalLocation pickupPoint_; + /** + * + * + *
+   * Required. The pickup point to search near.
+   * 
+ * + * + * .maps.fleetengine.v1.TerminalLocation pickup_point = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the pickupPoint field is set. + */ + @java.lang.Override + public boolean hasPickupPoint() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Required. The pickup point to search near.
+   * 
+ * + * + * .maps.fleetengine.v1.TerminalLocation pickup_point = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The pickupPoint. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TerminalLocation getPickupPoint() { + return pickupPoint_ == null + ? com.google.maps.fleetengine.v1.TerminalLocation.getDefaultInstance() + : pickupPoint_; + } + /** + * + * + *
+   * Required. The pickup point to search near.
+   * 
+ * + * + * .maps.fleetengine.v1.TerminalLocation pickup_point = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TerminalLocationOrBuilder getPickupPointOrBuilder() { + return pickupPoint_ == null + ? com.google.maps.fleetengine.v1.TerminalLocation.getDefaultInstance() + : pickupPoint_; + } + + public static final int DROPOFF_POINT_FIELD_NUMBER = 5; + private com.google.maps.fleetengine.v1.TerminalLocation dropoffPoint_; + /** + * + * + *
+   * The customer's intended dropoff location. The field is required if
+   * `trip_types` contains `TripType.SHARED`.
+   * 
+ * + * .maps.fleetengine.v1.TerminalLocation dropoff_point = 5; + * + * @return Whether the dropoffPoint field is set. + */ + @java.lang.Override + public boolean hasDropoffPoint() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * The customer's intended dropoff location. The field is required if
+   * `trip_types` contains `TripType.SHARED`.
+   * 
+ * + * .maps.fleetengine.v1.TerminalLocation dropoff_point = 5; + * + * @return The dropoffPoint. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TerminalLocation getDropoffPoint() { + return dropoffPoint_ == null + ? com.google.maps.fleetengine.v1.TerminalLocation.getDefaultInstance() + : dropoffPoint_; + } + /** + * + * + *
+   * The customer's intended dropoff location. The field is required if
+   * `trip_types` contains `TripType.SHARED`.
+   * 
+ * + * .maps.fleetengine.v1.TerminalLocation dropoff_point = 5; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TerminalLocationOrBuilder getDropoffPointOrBuilder() { + return dropoffPoint_ == null + ? com.google.maps.fleetengine.v1.TerminalLocation.getDefaultInstance() + : dropoffPoint_; + } + + public static final int PICKUP_RADIUS_METERS_FIELD_NUMBER = 6; + private int pickupRadiusMeters_ = 0; + /** + * + * + *
+   * Required. Defines the vehicle search radius around the pickup point. Only
+   * vehicles within the search radius will be returned. Value must be between
+   * 400 and 10000 meters (inclusive).
+   * 
+ * + * int32 pickup_radius_meters = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The pickupRadiusMeters. + */ + @java.lang.Override + public int getPickupRadiusMeters() { + return pickupRadiusMeters_; + } + + public static final int COUNT_FIELD_NUMBER = 7; + private int count_ = 0; + /** + * + * + *
+   * Required. Specifies the maximum number of vehicles to return. The value
+   * must be between 1 and 50 (inclusive).
+   * 
+ * + * int32 count = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count. + */ + @java.lang.Override + public int getCount() { + return count_; + } + + public static final int MINIMUM_CAPACITY_FIELD_NUMBER = 8; + private int minimumCapacity_ = 0; + /** + * + * + *
+   * Required. Specifies the number of passengers being considered for a trip.
+   * The value must be greater than or equal to one. The driver is not
+   * considered in the capacity value.
+   * 
+ * + * int32 minimum_capacity = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The minimumCapacity. + */ + @java.lang.Override + public int getMinimumCapacity() { + return minimumCapacity_; + } + + public static final int TRIP_TYPES_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private java.util.List tripTypes_; + + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.maps.fleetengine.v1.TripType> + tripTypes_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.maps.fleetengine.v1.TripType>() { + public com.google.maps.fleetengine.v1.TripType convert(java.lang.Integer from) { + com.google.maps.fleetengine.v1.TripType result = + com.google.maps.fleetengine.v1.TripType.forNumber(from); + return result == null ? com.google.maps.fleetengine.v1.TripType.UNRECOGNIZED : result; + } + }; + /** + * + * + *
+   * Required. Represents the type of proposed trip. Must include exactly one
+   * type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only
+   * those vehicles that can support that trip type.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.TripType trip_types = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the tripTypes. + */ + @java.lang.Override + public java.util.List getTripTypesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.maps.fleetengine.v1.TripType>( + tripTypes_, tripTypes_converter_); + } + /** + * + * + *
+   * Required. Represents the type of proposed trip. Must include exactly one
+   * type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only
+   * those vehicles that can support that trip type.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.TripType trip_types = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of tripTypes. + */ + @java.lang.Override + public int getTripTypesCount() { + return tripTypes_.size(); + } + /** + * + * + *
+   * Required. Represents the type of proposed trip. Must include exactly one
+   * type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only
+   * those vehicles that can support that trip type.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.TripType trip_types = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The tripTypes at the given index. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TripType getTripTypes(int index) { + return tripTypes_converter_.convert(tripTypes_.get(index)); + } + /** + * + * + *
+   * Required. Represents the type of proposed trip. Must include exactly one
+   * type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only
+   * those vehicles that can support that trip type.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.TripType trip_types = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the enum numeric values on the wire for tripTypes. + */ + @java.lang.Override + public java.util.List getTripTypesValueList() { + return tripTypes_; + } + /** + * + * + *
+   * Required. Represents the type of proposed trip. Must include exactly one
+   * type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only
+   * those vehicles that can support that trip type.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.TripType trip_types = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of tripTypes at the given index. + */ + @java.lang.Override + public int getTripTypesValue(int index) { + return tripTypes_.get(index); + } + + private int tripTypesMemoizedSerializedSize; + + public static final int MAXIMUM_STALENESS_FIELD_NUMBER = 10; + private com.google.protobuf.Duration maximumStaleness_; + /** + * + * + *
+   * Restricts the search to only those vehicles that have sent location updates
+   * to Fleet Engine within the specified duration. Stationary vehicles still
+   * transmitting their locations are not considered stale. If this field is not
+   * set, the server uses five minutes as the default value.
+   * 
+ * + * .google.protobuf.Duration maximum_staleness = 10; + * + * @return Whether the maximumStaleness field is set. + */ + @java.lang.Override + public boolean hasMaximumStaleness() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * Restricts the search to only those vehicles that have sent location updates
+   * to Fleet Engine within the specified duration. Stationary vehicles still
+   * transmitting their locations are not considered stale. If this field is not
+   * set, the server uses five minutes as the default value.
+   * 
+ * + * .google.protobuf.Duration maximum_staleness = 10; + * + * @return The maximumStaleness. + */ + @java.lang.Override + public com.google.protobuf.Duration getMaximumStaleness() { + return maximumStaleness_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : maximumStaleness_; + } + /** + * + * + *
+   * Restricts the search to only those vehicles that have sent location updates
+   * to Fleet Engine within the specified duration. Stationary vehicles still
+   * transmitting their locations are not considered stale. If this field is not
+   * set, the server uses five minutes as the default value.
+   * 
+ * + * .google.protobuf.Duration maximum_staleness = 10; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getMaximumStalenessOrBuilder() { + return maximumStaleness_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : maximumStaleness_; + } + + public static final int VEHICLE_TYPES_FIELD_NUMBER = 14; + + @SuppressWarnings("serial") + private java.util.List vehicleTypes_; + /** + * + * + *
+   * Required. Restricts the search to vehicles with one of the specified types.
+   * At least one vehicle type must be specified. VehicleTypes with a category
+   * of `UNKNOWN` are not allowed.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType vehicle_types = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getVehicleTypesList() { + return vehicleTypes_; + } + /** + * + * + *
+   * Required. Restricts the search to vehicles with one of the specified types.
+   * At least one vehicle type must be specified. VehicleTypes with a category
+   * of `UNKNOWN` are not allowed.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType vehicle_types = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getVehicleTypesOrBuilderList() { + return vehicleTypes_; + } + /** + * + * + *
+   * Required. Restricts the search to vehicles with one of the specified types.
+   * At least one vehicle type must be specified. VehicleTypes with a category
+   * of `UNKNOWN` are not allowed.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType vehicle_types = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getVehicleTypesCount() { + return vehicleTypes_.size(); + } + /** + * + * + *
+   * Required. Restricts the search to vehicles with one of the specified types.
+   * At least one vehicle type must be specified. VehicleTypes with a category
+   * of `UNKNOWN` are not allowed.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType vehicle_types = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.Vehicle.VehicleType getVehicleTypes(int index) { + return vehicleTypes_.get(index); + } + /** + * + * + *
+   * Required. Restricts the search to vehicles with one of the specified types.
+   * At least one vehicle type must be specified. VehicleTypes with a category
+   * of `UNKNOWN` are not allowed.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType vehicle_types = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.Vehicle.VehicleTypeOrBuilder getVehicleTypesOrBuilder( + int index) { + return vehicleTypes_.get(index); + } + + public static final int REQUIRED_ATTRIBUTES_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private java.util.List requiredAttributes_; + /** + * + * + *
+   * Callers can form complex logical operations using any combination of the
+   * `required_attributes`, `required_one_of_attributes`, and
+   * `required_one_of_attribute_sets` fields.
+   *
+   * `required_attributes` is a list; `required_one_of_attributes` uses a
+   * message which allows a list of lists. In combination, the two fields allow
+   * the composition of this expression:
+   *
+   * ```
+   * (required_attributes[0] AND required_attributes[1] AND ...)
+   * AND
+   * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+   * ...)
+   * AND
+   * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+   * ...)
+   * ```
+   *
+   * Restricts the search to only those vehicles with the specified attributes.
+   * This field is a conjunction/AND operation. A max of 50 required_attributes
+   * is allowed. This matches the maximum number of attributes allowed on a
+   * vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute required_attributes = 12; + */ + @java.lang.Override + public java.util.List + getRequiredAttributesList() { + return requiredAttributes_; + } + /** + * + * + *
+   * Callers can form complex logical operations using any combination of the
+   * `required_attributes`, `required_one_of_attributes`, and
+   * `required_one_of_attribute_sets` fields.
+   *
+   * `required_attributes` is a list; `required_one_of_attributes` uses a
+   * message which allows a list of lists. In combination, the two fields allow
+   * the composition of this expression:
+   *
+   * ```
+   * (required_attributes[0] AND required_attributes[1] AND ...)
+   * AND
+   * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+   * ...)
+   * AND
+   * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+   * ...)
+   * ```
+   *
+   * Restricts the search to only those vehicles with the specified attributes.
+   * This field is a conjunction/AND operation. A max of 50 required_attributes
+   * is allowed. This matches the maximum number of attributes allowed on a
+   * vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute required_attributes = 12; + */ + @java.lang.Override + public java.util.List + getRequiredAttributesOrBuilderList() { + return requiredAttributes_; + } + /** + * + * + *
+   * Callers can form complex logical operations using any combination of the
+   * `required_attributes`, `required_one_of_attributes`, and
+   * `required_one_of_attribute_sets` fields.
+   *
+   * `required_attributes` is a list; `required_one_of_attributes` uses a
+   * message which allows a list of lists. In combination, the two fields allow
+   * the composition of this expression:
+   *
+   * ```
+   * (required_attributes[0] AND required_attributes[1] AND ...)
+   * AND
+   * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+   * ...)
+   * AND
+   * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+   * ...)
+   * ```
+   *
+   * Restricts the search to only those vehicles with the specified attributes.
+   * This field is a conjunction/AND operation. A max of 50 required_attributes
+   * is allowed. This matches the maximum number of attributes allowed on a
+   * vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute required_attributes = 12; + */ + @java.lang.Override + public int getRequiredAttributesCount() { + return requiredAttributes_.size(); + } + /** + * + * + *
+   * Callers can form complex logical operations using any combination of the
+   * `required_attributes`, `required_one_of_attributes`, and
+   * `required_one_of_attribute_sets` fields.
+   *
+   * `required_attributes` is a list; `required_one_of_attributes` uses a
+   * message which allows a list of lists. In combination, the two fields allow
+   * the composition of this expression:
+   *
+   * ```
+   * (required_attributes[0] AND required_attributes[1] AND ...)
+   * AND
+   * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+   * ...)
+   * AND
+   * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+   * ...)
+   * ```
+   *
+   * Restricts the search to only those vehicles with the specified attributes.
+   * This field is a conjunction/AND operation. A max of 50 required_attributes
+   * is allowed. This matches the maximum number of attributes allowed on a
+   * vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute required_attributes = 12; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleAttribute getRequiredAttributes(int index) { + return requiredAttributes_.get(index); + } + /** + * + * + *
+   * Callers can form complex logical operations using any combination of the
+   * `required_attributes`, `required_one_of_attributes`, and
+   * `required_one_of_attribute_sets` fields.
+   *
+   * `required_attributes` is a list; `required_one_of_attributes` uses a
+   * message which allows a list of lists. In combination, the two fields allow
+   * the composition of this expression:
+   *
+   * ```
+   * (required_attributes[0] AND required_attributes[1] AND ...)
+   * AND
+   * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+   * ...)
+   * AND
+   * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+   * ...)
+   * ```
+   *
+   * Restricts the search to only those vehicles with the specified attributes.
+   * This field is a conjunction/AND operation. A max of 50 required_attributes
+   * is allowed. This matches the maximum number of attributes allowed on a
+   * vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute required_attributes = 12; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleAttributeOrBuilder getRequiredAttributesOrBuilder( + int index) { + return requiredAttributes_.get(index); + } + + public static final int REQUIRED_ONE_OF_ATTRIBUTES_FIELD_NUMBER = 15; + + @SuppressWarnings("serial") + private java.util.List + requiredOneOfAttributes_; + /** + * + * + *
+   * Restricts the search to only those vehicles with at least one of
+   * the specified attributes in each `VehicleAttributeList`. Within each
+   * list, a vehicle must match at least one of the attributes. This field is an
+   * inclusive disjunction/OR operation in each `VehicleAttributeList` and a
+   * conjunction/AND operation across the collection of `VehicleAttributeList`.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attributes = 15; + * + */ + @java.lang.Override + public java.util.List + getRequiredOneOfAttributesList() { + return requiredOneOfAttributes_; + } + /** + * + * + *
+   * Restricts the search to only those vehicles with at least one of
+   * the specified attributes in each `VehicleAttributeList`. Within each
+   * list, a vehicle must match at least one of the attributes. This field is an
+   * inclusive disjunction/OR operation in each `VehicleAttributeList` and a
+   * conjunction/AND operation across the collection of `VehicleAttributeList`.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attributes = 15; + * + */ + @java.lang.Override + public java.util.List + getRequiredOneOfAttributesOrBuilderList() { + return requiredOneOfAttributes_; + } + /** + * + * + *
+   * Restricts the search to only those vehicles with at least one of
+   * the specified attributes in each `VehicleAttributeList`. Within each
+   * list, a vehicle must match at least one of the attributes. This field is an
+   * inclusive disjunction/OR operation in each `VehicleAttributeList` and a
+   * conjunction/AND operation across the collection of `VehicleAttributeList`.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attributes = 15; + * + */ + @java.lang.Override + public int getRequiredOneOfAttributesCount() { + return requiredOneOfAttributes_.size(); + } + /** + * + * + *
+   * Restricts the search to only those vehicles with at least one of
+   * the specified attributes in each `VehicleAttributeList`. Within each
+   * list, a vehicle must match at least one of the attributes. This field is an
+   * inclusive disjunction/OR operation in each `VehicleAttributeList` and a
+   * conjunction/AND operation across the collection of `VehicleAttributeList`.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attributes = 15; + * + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleAttributeList getRequiredOneOfAttributes(int index) { + return requiredOneOfAttributes_.get(index); + } + /** + * + * + *
+   * Restricts the search to only those vehicles with at least one of
+   * the specified attributes in each `VehicleAttributeList`. Within each
+   * list, a vehicle must match at least one of the attributes. This field is an
+   * inclusive disjunction/OR operation in each `VehicleAttributeList` and a
+   * conjunction/AND operation across the collection of `VehicleAttributeList`.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attributes = 15; + * + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleAttributeListOrBuilder + getRequiredOneOfAttributesOrBuilder(int index) { + return requiredOneOfAttributes_.get(index); + } + + public static final int REQUIRED_ONE_OF_ATTRIBUTE_SETS_FIELD_NUMBER = 20; + + @SuppressWarnings("serial") + private java.util.List + requiredOneOfAttributeSets_; + /** + * + * + *
+   * `required_one_of_attribute_sets` provides additional functionality.
+   *
+   * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+   * uses a message which allows a list of lists, allowing expressions such as
+   * this one:
+   *
+   * ```
+   * (required_attributes[0] AND required_attributes[1] AND ...)
+   * AND
+   * (
+   *   (required_one_of_attribute_sets[0][0] AND
+   *   required_one_of_attribute_sets[0][1] AND
+   *   ...)
+   *   OR
+   *   (required_one_of_attribute_sets[1][0] AND
+   *   required_one_of_attribute_sets[1][1] AND
+   *   ...)
+   * )
+   * ```
+   *
+   * Restricts the search to only those vehicles with all the attributes in a
+   * `VehicleAttributeList`. Within each list, a
+   * vehicle must match all of the attributes. This field is a conjunction/AND
+   * operation in each `VehicleAttributeList` and inclusive disjunction/OR
+   * operation across the collection of `VehicleAttributeList`.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attribute_sets = 20; + * + */ + @java.lang.Override + public java.util.List + getRequiredOneOfAttributeSetsList() { + return requiredOneOfAttributeSets_; + } + /** + * + * + *
+   * `required_one_of_attribute_sets` provides additional functionality.
+   *
+   * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+   * uses a message which allows a list of lists, allowing expressions such as
+   * this one:
+   *
+   * ```
+   * (required_attributes[0] AND required_attributes[1] AND ...)
+   * AND
+   * (
+   *   (required_one_of_attribute_sets[0][0] AND
+   *   required_one_of_attribute_sets[0][1] AND
+   *   ...)
+   *   OR
+   *   (required_one_of_attribute_sets[1][0] AND
+   *   required_one_of_attribute_sets[1][1] AND
+   *   ...)
+   * )
+   * ```
+   *
+   * Restricts the search to only those vehicles with all the attributes in a
+   * `VehicleAttributeList`. Within each list, a
+   * vehicle must match all of the attributes. This field is a conjunction/AND
+   * operation in each `VehicleAttributeList` and inclusive disjunction/OR
+   * operation across the collection of `VehicleAttributeList`.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attribute_sets = 20; + * + */ + @java.lang.Override + public java.util.List + getRequiredOneOfAttributeSetsOrBuilderList() { + return requiredOneOfAttributeSets_; + } + /** + * + * + *
+   * `required_one_of_attribute_sets` provides additional functionality.
+   *
+   * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+   * uses a message which allows a list of lists, allowing expressions such as
+   * this one:
+   *
+   * ```
+   * (required_attributes[0] AND required_attributes[1] AND ...)
+   * AND
+   * (
+   *   (required_one_of_attribute_sets[0][0] AND
+   *   required_one_of_attribute_sets[0][1] AND
+   *   ...)
+   *   OR
+   *   (required_one_of_attribute_sets[1][0] AND
+   *   required_one_of_attribute_sets[1][1] AND
+   *   ...)
+   * )
+   * ```
+   *
+   * Restricts the search to only those vehicles with all the attributes in a
+   * `VehicleAttributeList`. Within each list, a
+   * vehicle must match all of the attributes. This field is a conjunction/AND
+   * operation in each `VehicleAttributeList` and inclusive disjunction/OR
+   * operation across the collection of `VehicleAttributeList`.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attribute_sets = 20; + * + */ + @java.lang.Override + public int getRequiredOneOfAttributeSetsCount() { + return requiredOneOfAttributeSets_.size(); + } + /** + * + * + *
+   * `required_one_of_attribute_sets` provides additional functionality.
+   *
+   * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+   * uses a message which allows a list of lists, allowing expressions such as
+   * this one:
+   *
+   * ```
+   * (required_attributes[0] AND required_attributes[1] AND ...)
+   * AND
+   * (
+   *   (required_one_of_attribute_sets[0][0] AND
+   *   required_one_of_attribute_sets[0][1] AND
+   *   ...)
+   *   OR
+   *   (required_one_of_attribute_sets[1][0] AND
+   *   required_one_of_attribute_sets[1][1] AND
+   *   ...)
+   * )
+   * ```
+   *
+   * Restricts the search to only those vehicles with all the attributes in a
+   * `VehicleAttributeList`. Within each list, a
+   * vehicle must match all of the attributes. This field is a conjunction/AND
+   * operation in each `VehicleAttributeList` and inclusive disjunction/OR
+   * operation across the collection of `VehicleAttributeList`.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attribute_sets = 20; + * + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleAttributeList getRequiredOneOfAttributeSets( + int index) { + return requiredOneOfAttributeSets_.get(index); + } + /** + * + * + *
+   * `required_one_of_attribute_sets` provides additional functionality.
+   *
+   * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+   * uses a message which allows a list of lists, allowing expressions such as
+   * this one:
+   *
+   * ```
+   * (required_attributes[0] AND required_attributes[1] AND ...)
+   * AND
+   * (
+   *   (required_one_of_attribute_sets[0][0] AND
+   *   required_one_of_attribute_sets[0][1] AND
+   *   ...)
+   *   OR
+   *   (required_one_of_attribute_sets[1][0] AND
+   *   required_one_of_attribute_sets[1][1] AND
+   *   ...)
+   * )
+   * ```
+   *
+   * Restricts the search to only those vehicles with all the attributes in a
+   * `VehicleAttributeList`. Within each list, a
+   * vehicle must match all of the attributes. This field is a conjunction/AND
+   * operation in each `VehicleAttributeList` and inclusive disjunction/OR
+   * operation across the collection of `VehicleAttributeList`.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attribute_sets = 20; + * + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleAttributeListOrBuilder + getRequiredOneOfAttributeSetsOrBuilder(int index) { + return requiredOneOfAttributeSets_.get(index); + } + + public static final int ORDER_BY_FIELD_NUMBER = 13; + private int orderBy_ = 0; + /** + * + * + *
+   * Required. Specifies the desired ordering criterion for results.
+   * 
+ * + * + * .maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder order_by = 13 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for orderBy. + */ + @java.lang.Override + public int getOrderByValue() { + return orderBy_; + } + /** + * + * + *
+   * Required. Specifies the desired ordering criterion for results.
+   * 
+ * + * + * .maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder order_by = 13 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The orderBy. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder getOrderBy() { + com.google.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder result = + com.google.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder.forNumber(orderBy_); + return result == null + ? com.google.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder.UNRECOGNIZED + : result; + } + + public static final int INCLUDE_BACK_TO_BACK_FIELD_NUMBER = 18; + private boolean includeBackToBack_ = false; + /** + * + * + *
+   * This indicates if vehicles with a single active trip are eligible for this
+   * search. This field is only used when `current_trips_present` is
+   * unspecified. When `current_trips_present` is unspecified  and  this field
+   * is `false`, vehicles with assigned trips are excluded from the search
+   * results. When `current_trips_present` is unspecified and this field is
+   * `true`, search results can include vehicles with one active trip that has a
+   * status of `ENROUTE_TO_DROPOFF`. When `current_trips_present` is specified,
+   * this field cannot be set to true.
+   *
+   * The default value is `false`.
+   * 
+ * + * bool include_back_to_back = 18; + * + * @return The includeBackToBack. + */ + @java.lang.Override + public boolean getIncludeBackToBack() { + return includeBackToBack_; + } + + public static final int TRIP_ID_FIELD_NUMBER = 19; + + @SuppressWarnings("serial") + private volatile java.lang.Object tripId_ = ""; + /** + * + * + *
+   * Indicates the trip associated with this `SearchVehicleRequest`.
+   * 
+ * + * string trip_id = 19; + * + * @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; + } + } + /** + * + * + *
+   * Indicates the trip associated with this `SearchVehicleRequest`.
+   * 
+ * + * string trip_id = 19; + * + * @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 CURRENT_TRIPS_PRESENT_FIELD_NUMBER = 21; + private int currentTripsPresent_ = 0; + /** + * + * + *
+   * This indicates if vehicles with active trips are eligible for this search.
+   * This must be set to something other than
+   * `CURRENT_TRIPS_PRESENT_UNSPECIFIED` if `trip_type` includes `SHARED`.
+   * 
+ * + * + * .maps.fleetengine.v1.SearchVehiclesRequest.CurrentTripsPresent current_trips_present = 21; + * + * + * @return The enum numeric value on the wire for currentTripsPresent. + */ + @java.lang.Override + public int getCurrentTripsPresentValue() { + return currentTripsPresent_; + } + /** + * + * + *
+   * This indicates if vehicles with active trips are eligible for this search.
+   * This must be set to something other than
+   * `CURRENT_TRIPS_PRESENT_UNSPECIFIED` if `trip_type` includes `SHARED`.
+   * 
+ * + * + * .maps.fleetengine.v1.SearchVehiclesRequest.CurrentTripsPresent current_trips_present = 21; + * + * + * @return The currentTripsPresent. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.SearchVehiclesRequest.CurrentTripsPresent + getCurrentTripsPresent() { + com.google.maps.fleetengine.v1.SearchVehiclesRequest.CurrentTripsPresent result = + com.google.maps.fleetengine.v1.SearchVehiclesRequest.CurrentTripsPresent.forNumber( + currentTripsPresent_); + return result == null + ? com.google.maps.fleetengine.v1.SearchVehiclesRequest.CurrentTripsPresent.UNRECOGNIZED + : result; + } + + public static final int FILTER_FIELD_NUMBER = 22; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Optional. A filter query to apply when searching vehicles. See
+   * http://aip.dev/160 for examples of the filter syntax.
+   *
+   * This field is designed to replace the `required_attributes`,
+   * `required_one_of_attributes`, and `required_one_of_attributes_sets` fields.
+   * If a non-empty value is specified here, the following fields must be empty:
+   * `required_attributes`, `required_one_of_attributes`, and
+   * `required_one_of_attributes_sets`.
+   *
+   * This filter functions as an AND clause with other constraints,
+   * such as `minimum_capacity` or `vehicle_types`.
+   *
+   * Note that the only queries supported are on vehicle attributes (for
+   * example, `attributes.<key> = <value>` or `attributes.<key1> = <value1> AND
+   * attributes.<key2> = <value2>`). The maximum number of restrictions allowed
+   * in a filter query is 50.
+   *
+   * Also, all attributes are stored as strings, so the only supported
+   * comparisons against attributes are string comparisons. In order to compare
+   * against number or boolean values, the values must be explicitly quoted to
+   * be treated as strings (for example, `attributes.<key> = "10"` or
+   * `attributes.<key> = "true"`).
+   * 
+ * + * string filter = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A filter query to apply when searching vehicles. See
+   * http://aip.dev/160 for examples of the filter syntax.
+   *
+   * This field is designed to replace the `required_attributes`,
+   * `required_one_of_attributes`, and `required_one_of_attributes_sets` fields.
+   * If a non-empty value is specified here, the following fields must be empty:
+   * `required_attributes`, `required_one_of_attributes`, and
+   * `required_one_of_attributes_sets`.
+   *
+   * This filter functions as an AND clause with other constraints,
+   * such as `minimum_capacity` or `vehicle_types`.
+   *
+   * Note that the only queries supported are on vehicle attributes (for
+   * example, `attributes.<key> = <value>` or `attributes.<key1> = <value1> AND
+   * attributes.<key2> = <value2>`). The maximum number of restrictions allowed
+   * in a filter query is 50.
+   *
+   * Also, all attributes are stored as strings, so the only supported
+   * comparisons against attributes are string comparisons. In order to compare
+   * against number or boolean values, the values must be explicitly quoted to
+   * be treated as strings (for example, `attributes.<key> = "10"` or
+   * `attributes.<key> = "true"`).
+   * 
+ * + * string filter = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getHeader()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, parent_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getPickupPoint()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(5, getDropoffPoint()); + } + if (pickupRadiusMeters_ != 0) { + output.writeInt32(6, pickupRadiusMeters_); + } + if (count_ != 0) { + output.writeInt32(7, count_); + } + if (minimumCapacity_ != 0) { + output.writeInt32(8, minimumCapacity_); + } + if (getTripTypesList().size() > 0) { + output.writeUInt32NoTag(74); + output.writeUInt32NoTag(tripTypesMemoizedSerializedSize); + } + for (int i = 0; i < tripTypes_.size(); i++) { + output.writeEnumNoTag(tripTypes_.get(i)); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(10, getMaximumStaleness()); + } + for (int i = 0; i < requiredAttributes_.size(); i++) { + output.writeMessage(12, requiredAttributes_.get(i)); + } + if (orderBy_ + != com.google.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder + .UNKNOWN_VEHICLE_MATCH_ORDER + .getNumber()) { + output.writeEnum(13, orderBy_); + } + for (int i = 0; i < vehicleTypes_.size(); i++) { + output.writeMessage(14, vehicleTypes_.get(i)); + } + for (int i = 0; i < requiredOneOfAttributes_.size(); i++) { + output.writeMessage(15, requiredOneOfAttributes_.get(i)); + } + if (includeBackToBack_ != false) { + output.writeBool(18, includeBackToBack_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tripId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 19, tripId_); + } + for (int i = 0; i < requiredOneOfAttributeSets_.size(); i++) { + output.writeMessage(20, requiredOneOfAttributeSets_.get(i)); + } + if (currentTripsPresent_ + != com.google.maps.fleetengine.v1.SearchVehiclesRequest.CurrentTripsPresent + .CURRENT_TRIPS_PRESENT_UNSPECIFIED + .getNumber()) { + output.writeEnum(21, currentTripsPresent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 22, filter_); + } + 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, getHeader()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, parent_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPickupPoint()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDropoffPoint()); + } + if (pickupRadiusMeters_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, pickupRadiusMeters_); + } + if (count_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(7, count_); + } + if (minimumCapacity_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(8, minimumCapacity_); + } + { + int dataSize = 0; + for (int i = 0; i < tripTypes_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(tripTypes_.get(i)); + } + size += dataSize; + if (!getTripTypesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + tripTypesMemoizedSerializedSize = dataSize; + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getMaximumStaleness()); + } + for (int i = 0; i < requiredAttributes_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(12, requiredAttributes_.get(i)); + } + if (orderBy_ + != com.google.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder + .UNKNOWN_VEHICLE_MATCH_ORDER + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(13, orderBy_); + } + for (int i = 0; i < vehicleTypes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, vehicleTypes_.get(i)); + } + for (int i = 0; i < requiredOneOfAttributes_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 15, requiredOneOfAttributes_.get(i)); + } + if (includeBackToBack_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(18, includeBackToBack_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tripId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, tripId_); + } + for (int i = 0; i < requiredOneOfAttributeSets_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 20, requiredOneOfAttributeSets_.get(i)); + } + if (currentTripsPresent_ + != com.google.maps.fleetengine.v1.SearchVehiclesRequest.CurrentTripsPresent + .CURRENT_TRIPS_PRESENT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(21, currentTripsPresent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(22, filter_); + } + 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.fleetengine.v1.SearchVehiclesRequest)) { + return super.equals(obj); + } + com.google.maps.fleetengine.v1.SearchVehiclesRequest other = + (com.google.maps.fleetengine.v1.SearchVehiclesRequest) obj; + + if (hasHeader() != other.hasHeader()) return false; + if (hasHeader()) { + if (!getHeader().equals(other.getHeader())) return false; + } + if (!getParent().equals(other.getParent())) return false; + if (hasPickupPoint() != other.hasPickupPoint()) return false; + if (hasPickupPoint()) { + if (!getPickupPoint().equals(other.getPickupPoint())) return false; + } + if (hasDropoffPoint() != other.hasDropoffPoint()) return false; + if (hasDropoffPoint()) { + if (!getDropoffPoint().equals(other.getDropoffPoint())) return false; + } + if (getPickupRadiusMeters() != other.getPickupRadiusMeters()) return false; + if (getCount() != other.getCount()) return false; + if (getMinimumCapacity() != other.getMinimumCapacity()) return false; + if (!tripTypes_.equals(other.tripTypes_)) return false; + if (hasMaximumStaleness() != other.hasMaximumStaleness()) return false; + if (hasMaximumStaleness()) { + if (!getMaximumStaleness().equals(other.getMaximumStaleness())) return false; + } + if (!getVehicleTypesList().equals(other.getVehicleTypesList())) return false; + if (!getRequiredAttributesList().equals(other.getRequiredAttributesList())) return false; + if (!getRequiredOneOfAttributesList().equals(other.getRequiredOneOfAttributesList())) + return false; + if (!getRequiredOneOfAttributeSetsList().equals(other.getRequiredOneOfAttributeSetsList())) + return false; + if (orderBy_ != other.orderBy_) return false; + if (getIncludeBackToBack() != other.getIncludeBackToBack()) return false; + if (!getTripId().equals(other.getTripId())) return false; + if (currentTripsPresent_ != other.currentTripsPresent_) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasHeader()) { + hash = (37 * hash) + HEADER_FIELD_NUMBER; + hash = (53 * hash) + getHeader().hashCode(); + } + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasPickupPoint()) { + hash = (37 * hash) + PICKUP_POINT_FIELD_NUMBER; + hash = (53 * hash) + getPickupPoint().hashCode(); + } + if (hasDropoffPoint()) { + hash = (37 * hash) + DROPOFF_POINT_FIELD_NUMBER; + hash = (53 * hash) + getDropoffPoint().hashCode(); + } + hash = (37 * hash) + PICKUP_RADIUS_METERS_FIELD_NUMBER; + hash = (53 * hash) + getPickupRadiusMeters(); + hash = (37 * hash) + COUNT_FIELD_NUMBER; + hash = (53 * hash) + getCount(); + hash = (37 * hash) + MINIMUM_CAPACITY_FIELD_NUMBER; + hash = (53 * hash) + getMinimumCapacity(); + if (getTripTypesCount() > 0) { + hash = (37 * hash) + TRIP_TYPES_FIELD_NUMBER; + hash = (53 * hash) + tripTypes_.hashCode(); + } + if (hasMaximumStaleness()) { + hash = (37 * hash) + MAXIMUM_STALENESS_FIELD_NUMBER; + hash = (53 * hash) + getMaximumStaleness().hashCode(); + } + if (getVehicleTypesCount() > 0) { + hash = (37 * hash) + VEHICLE_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getVehicleTypesList().hashCode(); + } + if (getRequiredAttributesCount() > 0) { + hash = (37 * hash) + REQUIRED_ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getRequiredAttributesList().hashCode(); + } + if (getRequiredOneOfAttributesCount() > 0) { + hash = (37 * hash) + REQUIRED_ONE_OF_ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getRequiredOneOfAttributesList().hashCode(); + } + if (getRequiredOneOfAttributeSetsCount() > 0) { + hash = (37 * hash) + REQUIRED_ONE_OF_ATTRIBUTE_SETS_FIELD_NUMBER; + hash = (53 * hash) + getRequiredOneOfAttributeSetsList().hashCode(); + } + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + orderBy_; + hash = (37 * hash) + INCLUDE_BACK_TO_BACK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeBackToBack()); + hash = (37 * hash) + TRIP_ID_FIELD_NUMBER; + hash = (53 * hash) + getTripId().hashCode(); + hash = (37 * hash) + CURRENT_TRIPS_PRESENT_FIELD_NUMBER; + hash = (53 * hash) + currentTripsPresent_; + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.fleetengine.v1.SearchVehiclesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.SearchVehiclesRequest 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.fleetengine.v1.SearchVehiclesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.SearchVehiclesRequest 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.fleetengine.v1.SearchVehiclesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.SearchVehiclesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.SearchVehiclesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.SearchVehiclesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.SearchVehiclesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.SearchVehiclesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.SearchVehiclesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.SearchVehiclesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.fleetengine.v1.SearchVehiclesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * `SearchVehicles` request message.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.v1.SearchVehiclesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.v1.SearchVehiclesRequest) + com.google.maps.fleetengine.v1.SearchVehiclesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_SearchVehiclesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_SearchVehiclesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.SearchVehiclesRequest.class, + com.google.maps.fleetengine.v1.SearchVehiclesRequest.Builder.class); + } + + // Construct using com.google.maps.fleetengine.v1.SearchVehiclesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getHeaderFieldBuilder(); + getPickupPointFieldBuilder(); + getDropoffPointFieldBuilder(); + getMaximumStalenessFieldBuilder(); + getVehicleTypesFieldBuilder(); + getRequiredAttributesFieldBuilder(); + getRequiredOneOfAttributesFieldBuilder(); + getRequiredOneOfAttributeSetsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + parent_ = ""; + pickupPoint_ = null; + if (pickupPointBuilder_ != null) { + pickupPointBuilder_.dispose(); + pickupPointBuilder_ = null; + } + dropoffPoint_ = null; + if (dropoffPointBuilder_ != null) { + dropoffPointBuilder_.dispose(); + dropoffPointBuilder_ = null; + } + pickupRadiusMeters_ = 0; + count_ = 0; + minimumCapacity_ = 0; + tripTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + maximumStaleness_ = null; + if (maximumStalenessBuilder_ != null) { + maximumStalenessBuilder_.dispose(); + maximumStalenessBuilder_ = null; + } + if (vehicleTypesBuilder_ == null) { + vehicleTypes_ = java.util.Collections.emptyList(); + } else { + vehicleTypes_ = null; + vehicleTypesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000200); + if (requiredAttributesBuilder_ == null) { + requiredAttributes_ = java.util.Collections.emptyList(); + } else { + requiredAttributes_ = null; + requiredAttributesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000400); + if (requiredOneOfAttributesBuilder_ == null) { + requiredOneOfAttributes_ = java.util.Collections.emptyList(); + } else { + requiredOneOfAttributes_ = null; + requiredOneOfAttributesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000800); + if (requiredOneOfAttributeSetsBuilder_ == null) { + requiredOneOfAttributeSets_ = java.util.Collections.emptyList(); + } else { + requiredOneOfAttributeSets_ = null; + requiredOneOfAttributeSetsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00001000); + orderBy_ = 0; + includeBackToBack_ = false; + tripId_ = ""; + currentTripsPresent_ = 0; + filter_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_SearchVehiclesRequest_descriptor; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.SearchVehiclesRequest getDefaultInstanceForType() { + return com.google.maps.fleetengine.v1.SearchVehiclesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.SearchVehiclesRequest build() { + com.google.maps.fleetengine.v1.SearchVehiclesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.SearchVehiclesRequest buildPartial() { + com.google.maps.fleetengine.v1.SearchVehiclesRequest result = + new com.google.maps.fleetengine.v1.SearchVehiclesRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.maps.fleetengine.v1.SearchVehiclesRequest result) { + if (((bitField0_ & 0x00000080) != 0)) { + tripTypes_ = java.util.Collections.unmodifiableList(tripTypes_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.tripTypes_ = tripTypes_; + if (vehicleTypesBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0)) { + vehicleTypes_ = java.util.Collections.unmodifiableList(vehicleTypes_); + bitField0_ = (bitField0_ & ~0x00000200); + } + result.vehicleTypes_ = vehicleTypes_; + } else { + result.vehicleTypes_ = vehicleTypesBuilder_.build(); + } + if (requiredAttributesBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0)) { + requiredAttributes_ = java.util.Collections.unmodifiableList(requiredAttributes_); + bitField0_ = (bitField0_ & ~0x00000400); + } + result.requiredAttributes_ = requiredAttributes_; + } else { + result.requiredAttributes_ = requiredAttributesBuilder_.build(); + } + if (requiredOneOfAttributesBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0)) { + requiredOneOfAttributes_ = + java.util.Collections.unmodifiableList(requiredOneOfAttributes_); + bitField0_ = (bitField0_ & ~0x00000800); + } + result.requiredOneOfAttributes_ = requiredOneOfAttributes_; + } else { + result.requiredOneOfAttributes_ = requiredOneOfAttributesBuilder_.build(); + } + if (requiredOneOfAttributeSetsBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0)) { + requiredOneOfAttributeSets_ = + java.util.Collections.unmodifiableList(requiredOneOfAttributeSets_); + bitField0_ = (bitField0_ & ~0x00001000); + } + result.requiredOneOfAttributeSets_ = requiredOneOfAttributeSets_; + } else { + result.requiredOneOfAttributeSets_ = requiredOneOfAttributeSetsBuilder_.build(); + } + } + + private void buildPartial0(com.google.maps.fleetengine.v1.SearchVehiclesRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.header_ = headerBuilder_ == null ? header_ : headerBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pickupPoint_ = + pickupPointBuilder_ == null ? pickupPoint_ : pickupPointBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.dropoffPoint_ = + dropoffPointBuilder_ == null ? dropoffPoint_ : dropoffPointBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.pickupRadiusMeters_ = pickupRadiusMeters_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.count_ = count_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.minimumCapacity_ = minimumCapacity_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.maximumStaleness_ = + maximumStalenessBuilder_ == null ? maximumStaleness_ : maximumStalenessBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.orderBy_ = orderBy_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.includeBackToBack_ = includeBackToBack_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.tripId_ = tripId_; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.currentTripsPresent_ = currentTripsPresent_; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.filter_ = filter_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.fleetengine.v1.SearchVehiclesRequest) { + return mergeFrom((com.google.maps.fleetengine.v1.SearchVehiclesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.fleetengine.v1.SearchVehiclesRequest other) { + if (other == com.google.maps.fleetengine.v1.SearchVehiclesRequest.getDefaultInstance()) + return this; + if (other.hasHeader()) { + mergeHeader(other.getHeader()); + } + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasPickupPoint()) { + mergePickupPoint(other.getPickupPoint()); + } + if (other.hasDropoffPoint()) { + mergeDropoffPoint(other.getDropoffPoint()); + } + if (other.getPickupRadiusMeters() != 0) { + setPickupRadiusMeters(other.getPickupRadiusMeters()); + } + if (other.getCount() != 0) { + setCount(other.getCount()); + } + if (other.getMinimumCapacity() != 0) { + setMinimumCapacity(other.getMinimumCapacity()); + } + if (!other.tripTypes_.isEmpty()) { + if (tripTypes_.isEmpty()) { + tripTypes_ = other.tripTypes_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureTripTypesIsMutable(); + tripTypes_.addAll(other.tripTypes_); + } + onChanged(); + } + if (other.hasMaximumStaleness()) { + mergeMaximumStaleness(other.getMaximumStaleness()); + } + if (vehicleTypesBuilder_ == null) { + if (!other.vehicleTypes_.isEmpty()) { + if (vehicleTypes_.isEmpty()) { + vehicleTypes_ = other.vehicleTypes_; + bitField0_ = (bitField0_ & ~0x00000200); + } else { + ensureVehicleTypesIsMutable(); + vehicleTypes_.addAll(other.vehicleTypes_); + } + onChanged(); + } + } else { + if (!other.vehicleTypes_.isEmpty()) { + if (vehicleTypesBuilder_.isEmpty()) { + vehicleTypesBuilder_.dispose(); + vehicleTypesBuilder_ = null; + vehicleTypes_ = other.vehicleTypes_; + bitField0_ = (bitField0_ & ~0x00000200); + vehicleTypesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getVehicleTypesFieldBuilder() + : null; + } else { + vehicleTypesBuilder_.addAllMessages(other.vehicleTypes_); + } + } + } + if (requiredAttributesBuilder_ == null) { + if (!other.requiredAttributes_.isEmpty()) { + if (requiredAttributes_.isEmpty()) { + requiredAttributes_ = other.requiredAttributes_; + bitField0_ = (bitField0_ & ~0x00000400); + } else { + ensureRequiredAttributesIsMutable(); + requiredAttributes_.addAll(other.requiredAttributes_); + } + onChanged(); + } + } else { + if (!other.requiredAttributes_.isEmpty()) { + if (requiredAttributesBuilder_.isEmpty()) { + requiredAttributesBuilder_.dispose(); + requiredAttributesBuilder_ = null; + requiredAttributes_ = other.requiredAttributes_; + bitField0_ = (bitField0_ & ~0x00000400); + requiredAttributesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRequiredAttributesFieldBuilder() + : null; + } else { + requiredAttributesBuilder_.addAllMessages(other.requiredAttributes_); + } + } + } + if (requiredOneOfAttributesBuilder_ == null) { + if (!other.requiredOneOfAttributes_.isEmpty()) { + if (requiredOneOfAttributes_.isEmpty()) { + requiredOneOfAttributes_ = other.requiredOneOfAttributes_; + bitField0_ = (bitField0_ & ~0x00000800); + } else { + ensureRequiredOneOfAttributesIsMutable(); + requiredOneOfAttributes_.addAll(other.requiredOneOfAttributes_); + } + onChanged(); + } + } else { + if (!other.requiredOneOfAttributes_.isEmpty()) { + if (requiredOneOfAttributesBuilder_.isEmpty()) { + requiredOneOfAttributesBuilder_.dispose(); + requiredOneOfAttributesBuilder_ = null; + requiredOneOfAttributes_ = other.requiredOneOfAttributes_; + bitField0_ = (bitField0_ & ~0x00000800); + requiredOneOfAttributesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRequiredOneOfAttributesFieldBuilder() + : null; + } else { + requiredOneOfAttributesBuilder_.addAllMessages(other.requiredOneOfAttributes_); + } + } + } + if (requiredOneOfAttributeSetsBuilder_ == null) { + if (!other.requiredOneOfAttributeSets_.isEmpty()) { + if (requiredOneOfAttributeSets_.isEmpty()) { + requiredOneOfAttributeSets_ = other.requiredOneOfAttributeSets_; + bitField0_ = (bitField0_ & ~0x00001000); + } else { + ensureRequiredOneOfAttributeSetsIsMutable(); + requiredOneOfAttributeSets_.addAll(other.requiredOneOfAttributeSets_); + } + onChanged(); + } + } else { + if (!other.requiredOneOfAttributeSets_.isEmpty()) { + if (requiredOneOfAttributeSetsBuilder_.isEmpty()) { + requiredOneOfAttributeSetsBuilder_.dispose(); + requiredOneOfAttributeSetsBuilder_ = null; + requiredOneOfAttributeSets_ = other.requiredOneOfAttributeSets_; + bitField0_ = (bitField0_ & ~0x00001000); + requiredOneOfAttributeSetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRequiredOneOfAttributeSetsFieldBuilder() + : null; + } else { + requiredOneOfAttributeSetsBuilder_.addAllMessages(other.requiredOneOfAttributeSets_); + } + } + } + if (other.orderBy_ != 0) { + setOrderByValue(other.getOrderByValue()); + } + if (other.getIncludeBackToBack() != false) { + setIncludeBackToBack(other.getIncludeBackToBack()); + } + if (!other.getTripId().isEmpty()) { + tripId_ = other.tripId_; + bitField0_ |= 0x00008000; + onChanged(); + } + if (other.currentTripsPresent_ != 0) { + setCurrentTripsPresentValue(other.getCurrentTripsPresentValue()); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00020000; + 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: + { + input.readMessage(getHeaderFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 34: + { + input.readMessage(getPickupPointFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 34 + case 42: + { + input.readMessage(getDropoffPointFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 42 + case 48: + { + pickupRadiusMeters_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 48 + case 56: + { + count_ = input.readInt32(); + bitField0_ |= 0x00000020; + break; + } // case 56 + case 64: + { + minimumCapacity_ = input.readInt32(); + bitField0_ |= 0x00000040; + break; + } // case 64 + case 72: + { + int tmpRaw = input.readEnum(); + ensureTripTypesIsMutable(); + tripTypes_.add(tmpRaw); + break; + } // case 72 + case 74: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureTripTypesIsMutable(); + tripTypes_.add(tmpRaw); + } + input.popLimit(oldLimit); + break; + } // case 74 + case 82: + { + input.readMessage( + getMaximumStalenessFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 82 + case 98: + { + com.google.maps.fleetengine.v1.VehicleAttribute m = + input.readMessage( + com.google.maps.fleetengine.v1.VehicleAttribute.parser(), + extensionRegistry); + if (requiredAttributesBuilder_ == null) { + ensureRequiredAttributesIsMutable(); + requiredAttributes_.add(m); + } else { + requiredAttributesBuilder_.addMessage(m); + } + break; + } // case 98 + case 104: + { + orderBy_ = input.readEnum(); + bitField0_ |= 0x00002000; + break; + } // case 104 + case 114: + { + com.google.maps.fleetengine.v1.Vehicle.VehicleType m = + input.readMessage( + com.google.maps.fleetengine.v1.Vehicle.VehicleType.parser(), + extensionRegistry); + if (vehicleTypesBuilder_ == null) { + ensureVehicleTypesIsMutable(); + vehicleTypes_.add(m); + } else { + vehicleTypesBuilder_.addMessage(m); + } + break; + } // case 114 + case 122: + { + com.google.maps.fleetengine.v1.VehicleAttributeList m = + input.readMessage( + com.google.maps.fleetengine.v1.VehicleAttributeList.parser(), + extensionRegistry); + if (requiredOneOfAttributesBuilder_ == null) { + ensureRequiredOneOfAttributesIsMutable(); + requiredOneOfAttributes_.add(m); + } else { + requiredOneOfAttributesBuilder_.addMessage(m); + } + break; + } // case 122 + case 144: + { + includeBackToBack_ = input.readBool(); + bitField0_ |= 0x00004000; + break; + } // case 144 + case 154: + { + tripId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case 154 + case 162: + { + com.google.maps.fleetengine.v1.VehicleAttributeList m = + input.readMessage( + com.google.maps.fleetengine.v1.VehicleAttributeList.parser(), + extensionRegistry); + if (requiredOneOfAttributeSetsBuilder_ == null) { + ensureRequiredOneOfAttributeSetsIsMutable(); + requiredOneOfAttributeSets_.add(m); + } else { + requiredOneOfAttributeSetsBuilder_.addMessage(m); + } + break; + } // case 162 + case 168: + { + currentTripsPresent_ = input.readEnum(); + bitField0_ |= 0x00010000; + break; + } // case 168 + case 178: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00020000; + break; + } // case 178 + 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.fleetengine.v1.RequestHeader header_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.RequestHeader, + com.google.maps.fleetengine.v1.RequestHeader.Builder, + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder> + headerBuilder_; + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return Whether the header field is set. + */ + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return The header. + */ + public com.google.maps.fleetengine.v1.RequestHeader getHeader() { + if (headerBuilder_ == null) { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } else { + return headerBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public Builder setHeader(com.google.maps.fleetengine.v1.RequestHeader value) { + if (headerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + header_ = value; + } else { + headerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public Builder setHeader(com.google.maps.fleetengine.v1.RequestHeader.Builder builderForValue) { + if (headerBuilder_ == null) { + header_ = builderForValue.build(); + } else { + headerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public Builder mergeHeader(com.google.maps.fleetengine.v1.RequestHeader value) { + if (headerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && header_ != null + && header_ != com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance()) { + getHeaderBuilder().mergeFrom(value); + } else { + header_ = value; + } + } else { + headerBuilder_.mergeFrom(value); + } + if (header_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public Builder clearHeader() { + bitField0_ = (bitField0_ & ~0x00000001); + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public com.google.maps.fleetengine.v1.RequestHeader.Builder getHeaderBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getHeaderFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public com.google.maps.fleetengine.v1.RequestHeaderOrBuilder getHeaderOrBuilder() { + if (headerBuilder_ != null) { + return headerBuilder_.getMessageOrBuilder(); + } else { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.RequestHeader, + com.google.maps.fleetengine.v1.RequestHeader.Builder, + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder> + getHeaderFieldBuilder() { + if (headerBuilder_ == null) { + headerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.RequestHeader, + com.google.maps.fleetengine.v1.RequestHeader.Builder, + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder>( + getHeader(), getParentForChildren(), isClean()); + header_ = null; + } + return headerBuilder_; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Must be in the format `providers/{provider}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * string parent = 3 [(.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. Must be in the format `providers/{provider}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * string parent = 3 [(.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. Must be in the format `providers/{provider}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * string parent = 3 [(.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_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Must be in the format `providers/{provider}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * string parent = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Must be in the format `providers/{provider}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * string parent = 3 [(.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_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.maps.fleetengine.v1.TerminalLocation pickupPoint_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.TerminalLocation, + com.google.maps.fleetengine.v1.TerminalLocation.Builder, + com.google.maps.fleetengine.v1.TerminalLocationOrBuilder> + pickupPointBuilder_; + /** + * + * + *
+     * Required. The pickup point to search near.
+     * 
+ * + * + * .maps.fleetengine.v1.TerminalLocation pickup_point = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the pickupPoint field is set. + */ + public boolean hasPickupPoint() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The pickup point to search near.
+     * 
+ * + * + * .maps.fleetengine.v1.TerminalLocation pickup_point = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The pickupPoint. + */ + public com.google.maps.fleetengine.v1.TerminalLocation getPickupPoint() { + if (pickupPointBuilder_ == null) { + return pickupPoint_ == null + ? com.google.maps.fleetengine.v1.TerminalLocation.getDefaultInstance() + : pickupPoint_; + } else { + return pickupPointBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The pickup point to search near.
+     * 
+ * + * + * .maps.fleetengine.v1.TerminalLocation pickup_point = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPickupPoint(com.google.maps.fleetengine.v1.TerminalLocation value) { + if (pickupPointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pickupPoint_ = value; + } else { + pickupPointBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The pickup point to search near.
+     * 
+ * + * + * .maps.fleetengine.v1.TerminalLocation pickup_point = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPickupPoint( + com.google.maps.fleetengine.v1.TerminalLocation.Builder builderForValue) { + if (pickupPointBuilder_ == null) { + pickupPoint_ = builderForValue.build(); + } else { + pickupPointBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The pickup point to search near.
+     * 
+ * + * + * .maps.fleetengine.v1.TerminalLocation pickup_point = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePickupPoint(com.google.maps.fleetengine.v1.TerminalLocation value) { + if (pickupPointBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && pickupPoint_ != null + && pickupPoint_ + != com.google.maps.fleetengine.v1.TerminalLocation.getDefaultInstance()) { + getPickupPointBuilder().mergeFrom(value); + } else { + pickupPoint_ = value; + } + } else { + pickupPointBuilder_.mergeFrom(value); + } + if (pickupPoint_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The pickup point to search near.
+     * 
+ * + * + * .maps.fleetengine.v1.TerminalLocation pickup_point = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPickupPoint() { + bitField0_ = (bitField0_ & ~0x00000004); + pickupPoint_ = null; + if (pickupPointBuilder_ != null) { + pickupPointBuilder_.dispose(); + pickupPointBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The pickup point to search near.
+     * 
+ * + * + * .maps.fleetengine.v1.TerminalLocation pickup_point = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.maps.fleetengine.v1.TerminalLocation.Builder getPickupPointBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getPickupPointFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The pickup point to search near.
+     * 
+ * + * + * .maps.fleetengine.v1.TerminalLocation pickup_point = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.maps.fleetengine.v1.TerminalLocationOrBuilder getPickupPointOrBuilder() { + if (pickupPointBuilder_ != null) { + return pickupPointBuilder_.getMessageOrBuilder(); + } else { + return pickupPoint_ == null + ? com.google.maps.fleetengine.v1.TerminalLocation.getDefaultInstance() + : pickupPoint_; + } + } + /** + * + * + *
+     * Required. The pickup point to search near.
+     * 
+ * + * + * .maps.fleetengine.v1.TerminalLocation pickup_point = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.TerminalLocation, + com.google.maps.fleetengine.v1.TerminalLocation.Builder, + com.google.maps.fleetengine.v1.TerminalLocationOrBuilder> + getPickupPointFieldBuilder() { + if (pickupPointBuilder_ == null) { + pickupPointBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.TerminalLocation, + com.google.maps.fleetengine.v1.TerminalLocation.Builder, + com.google.maps.fleetengine.v1.TerminalLocationOrBuilder>( + getPickupPoint(), getParentForChildren(), isClean()); + pickupPoint_ = null; + } + return pickupPointBuilder_; + } + + private com.google.maps.fleetengine.v1.TerminalLocation dropoffPoint_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.TerminalLocation, + com.google.maps.fleetengine.v1.TerminalLocation.Builder, + com.google.maps.fleetengine.v1.TerminalLocationOrBuilder> + dropoffPointBuilder_; + /** + * + * + *
+     * The customer's intended dropoff location. The field is required if
+     * `trip_types` contains `TripType.SHARED`.
+     * 
+ * + * .maps.fleetengine.v1.TerminalLocation dropoff_point = 5; + * + * @return Whether the dropoffPoint field is set. + */ + public boolean hasDropoffPoint() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * The customer's intended dropoff location. The field is required if
+     * `trip_types` contains `TripType.SHARED`.
+     * 
+ * + * .maps.fleetengine.v1.TerminalLocation dropoff_point = 5; + * + * @return The dropoffPoint. + */ + public com.google.maps.fleetengine.v1.TerminalLocation getDropoffPoint() { + if (dropoffPointBuilder_ == null) { + return dropoffPoint_ == null + ? com.google.maps.fleetengine.v1.TerminalLocation.getDefaultInstance() + : dropoffPoint_; + } else { + return dropoffPointBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The customer's intended dropoff location. The field is required if
+     * `trip_types` contains `TripType.SHARED`.
+     * 
+ * + * .maps.fleetengine.v1.TerminalLocation dropoff_point = 5; + */ + public Builder setDropoffPoint(com.google.maps.fleetengine.v1.TerminalLocation value) { + if (dropoffPointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dropoffPoint_ = value; + } else { + dropoffPointBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The customer's intended dropoff location. The field is required if
+     * `trip_types` contains `TripType.SHARED`.
+     * 
+ * + * .maps.fleetengine.v1.TerminalLocation dropoff_point = 5; + */ + public Builder setDropoffPoint( + com.google.maps.fleetengine.v1.TerminalLocation.Builder builderForValue) { + if (dropoffPointBuilder_ == null) { + dropoffPoint_ = builderForValue.build(); + } else { + dropoffPointBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The customer's intended dropoff location. The field is required if
+     * `trip_types` contains `TripType.SHARED`.
+     * 
+ * + * .maps.fleetengine.v1.TerminalLocation dropoff_point = 5; + */ + public Builder mergeDropoffPoint(com.google.maps.fleetengine.v1.TerminalLocation value) { + if (dropoffPointBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && dropoffPoint_ != null + && dropoffPoint_ + != com.google.maps.fleetengine.v1.TerminalLocation.getDefaultInstance()) { + getDropoffPointBuilder().mergeFrom(value); + } else { + dropoffPoint_ = value; + } + } else { + dropoffPointBuilder_.mergeFrom(value); + } + if (dropoffPoint_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The customer's intended dropoff location. The field is required if
+     * `trip_types` contains `TripType.SHARED`.
+     * 
+ * + * .maps.fleetengine.v1.TerminalLocation dropoff_point = 5; + */ + public Builder clearDropoffPoint() { + bitField0_ = (bitField0_ & ~0x00000008); + dropoffPoint_ = null; + if (dropoffPointBuilder_ != null) { + dropoffPointBuilder_.dispose(); + dropoffPointBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The customer's intended dropoff location. The field is required if
+     * `trip_types` contains `TripType.SHARED`.
+     * 
+ * + * .maps.fleetengine.v1.TerminalLocation dropoff_point = 5; + */ + public com.google.maps.fleetengine.v1.TerminalLocation.Builder getDropoffPointBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getDropoffPointFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The customer's intended dropoff location. The field is required if
+     * `trip_types` contains `TripType.SHARED`.
+     * 
+ * + * .maps.fleetengine.v1.TerminalLocation dropoff_point = 5; + */ + public com.google.maps.fleetengine.v1.TerminalLocationOrBuilder getDropoffPointOrBuilder() { + if (dropoffPointBuilder_ != null) { + return dropoffPointBuilder_.getMessageOrBuilder(); + } else { + return dropoffPoint_ == null + ? com.google.maps.fleetengine.v1.TerminalLocation.getDefaultInstance() + : dropoffPoint_; + } + } + /** + * + * + *
+     * The customer's intended dropoff location. The field is required if
+     * `trip_types` contains `TripType.SHARED`.
+     * 
+ * + * .maps.fleetengine.v1.TerminalLocation dropoff_point = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.TerminalLocation, + com.google.maps.fleetengine.v1.TerminalLocation.Builder, + com.google.maps.fleetengine.v1.TerminalLocationOrBuilder> + getDropoffPointFieldBuilder() { + if (dropoffPointBuilder_ == null) { + dropoffPointBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.TerminalLocation, + com.google.maps.fleetengine.v1.TerminalLocation.Builder, + com.google.maps.fleetengine.v1.TerminalLocationOrBuilder>( + getDropoffPoint(), getParentForChildren(), isClean()); + dropoffPoint_ = null; + } + return dropoffPointBuilder_; + } + + private int pickupRadiusMeters_; + /** + * + * + *
+     * Required. Defines the vehicle search radius around the pickup point. Only
+     * vehicles within the search radius will be returned. Value must be between
+     * 400 and 10000 meters (inclusive).
+     * 
+ * + * int32 pickup_radius_meters = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The pickupRadiusMeters. + */ + @java.lang.Override + public int getPickupRadiusMeters() { + return pickupRadiusMeters_; + } + /** + * + * + *
+     * Required. Defines the vehicle search radius around the pickup point. Only
+     * vehicles within the search radius will be returned. Value must be between
+     * 400 and 10000 meters (inclusive).
+     * 
+ * + * int32 pickup_radius_meters = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The pickupRadiusMeters to set. + * @return This builder for chaining. + */ + public Builder setPickupRadiusMeters(int value) { + + pickupRadiusMeters_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Defines the vehicle search radius around the pickup point. Only
+     * vehicles within the search radius will be returned. Value must be between
+     * 400 and 10000 meters (inclusive).
+     * 
+ * + * int32 pickup_radius_meters = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearPickupRadiusMeters() { + bitField0_ = (bitField0_ & ~0x00000010); + pickupRadiusMeters_ = 0; + onChanged(); + return this; + } + + private int count_; + /** + * + * + *
+     * Required. Specifies the maximum number of vehicles to return. The value
+     * must be between 1 and 50 (inclusive).
+     * 
+ * + * int32 count = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count. + */ + @java.lang.Override + public int getCount() { + return count_; + } + /** + * + * + *
+     * Required. Specifies the maximum number of vehicles to return. The value
+     * must be between 1 and 50 (inclusive).
+     * 
+ * + * int32 count = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The count to set. + * @return This builder for chaining. + */ + public Builder setCount(int value) { + + count_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Specifies the maximum number of vehicles to return. The value
+     * must be between 1 and 50 (inclusive).
+     * 
+ * + * int32 count = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearCount() { + bitField0_ = (bitField0_ & ~0x00000020); + count_ = 0; + onChanged(); + return this; + } + + private int minimumCapacity_; + /** + * + * + *
+     * Required. Specifies the number of passengers being considered for a trip.
+     * The value must be greater than or equal to one. The driver is not
+     * considered in the capacity value.
+     * 
+ * + * int32 minimum_capacity = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The minimumCapacity. + */ + @java.lang.Override + public int getMinimumCapacity() { + return minimumCapacity_; + } + /** + * + * + *
+     * Required. Specifies the number of passengers being considered for a trip.
+     * The value must be greater than or equal to one. The driver is not
+     * considered in the capacity value.
+     * 
+ * + * int32 minimum_capacity = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The minimumCapacity to set. + * @return This builder for chaining. + */ + public Builder setMinimumCapacity(int value) { + + minimumCapacity_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Specifies the number of passengers being considered for a trip.
+     * The value must be greater than or equal to one. The driver is not
+     * considered in the capacity value.
+     * 
+ * + * int32 minimum_capacity = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMinimumCapacity() { + bitField0_ = (bitField0_ & ~0x00000040); + minimumCapacity_ = 0; + onChanged(); + return this; + } + + private java.util.List tripTypes_ = java.util.Collections.emptyList(); + + private void ensureTripTypesIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + tripTypes_ = new java.util.ArrayList(tripTypes_); + bitField0_ |= 0x00000080; + } + } + /** + * + * + *
+     * Required. Represents the type of proposed trip. Must include exactly one
+     * type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only
+     * those vehicles that can support that trip type.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.TripType trip_types = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the tripTypes. + */ + public java.util.List getTripTypesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.maps.fleetengine.v1.TripType>( + tripTypes_, tripTypes_converter_); + } + /** + * + * + *
+     * Required. Represents the type of proposed trip. Must include exactly one
+     * type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only
+     * those vehicles that can support that trip type.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.TripType trip_types = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of tripTypes. + */ + public int getTripTypesCount() { + return tripTypes_.size(); + } + /** + * + * + *
+     * Required. Represents the type of proposed trip. Must include exactly one
+     * type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only
+     * those vehicles that can support that trip type.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.TripType trip_types = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The tripTypes at the given index. + */ + public com.google.maps.fleetengine.v1.TripType getTripTypes(int index) { + return tripTypes_converter_.convert(tripTypes_.get(index)); + } + /** + * + * + *
+     * Required. Represents the type of proposed trip. Must include exactly one
+     * type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only
+     * those vehicles that can support that trip type.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.TripType trip_types = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index to set the value at. + * @param value The tripTypes to set. + * @return This builder for chaining. + */ + public Builder setTripTypes(int index, com.google.maps.fleetengine.v1.TripType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTripTypesIsMutable(); + tripTypes_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Represents the type of proposed trip. Must include exactly one
+     * type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only
+     * those vehicles that can support that trip type.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.TripType trip_types = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The tripTypes to add. + * @return This builder for chaining. + */ + public Builder addTripTypes(com.google.maps.fleetengine.v1.TripType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTripTypesIsMutable(); + tripTypes_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Represents the type of proposed trip. Must include exactly one
+     * type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only
+     * those vehicles that can support that trip type.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.TripType trip_types = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param values The tripTypes to add. + * @return This builder for chaining. + */ + public Builder addAllTripTypes( + java.lang.Iterable values) { + ensureTripTypesIsMutable(); + for (com.google.maps.fleetengine.v1.TripType value : values) { + tripTypes_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Represents the type of proposed trip. Must include exactly one
+     * type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only
+     * those vehicles that can support that trip type.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.TripType trip_types = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearTripTypes() { + tripTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Represents the type of proposed trip. Must include exactly one
+     * type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only
+     * those vehicles that can support that trip type.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.TripType trip_types = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the enum numeric values on the wire for tripTypes. + */ + public java.util.List getTripTypesValueList() { + return java.util.Collections.unmodifiableList(tripTypes_); + } + /** + * + * + *
+     * Required. Represents the type of proposed trip. Must include exactly one
+     * type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only
+     * those vehicles that can support that trip type.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.TripType trip_types = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of tripTypes at the given index. + */ + public int getTripTypesValue(int index) { + return tripTypes_.get(index); + } + /** + * + * + *
+     * Required. Represents the type of proposed trip. Must include exactly one
+     * type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only
+     * those vehicles that can support that trip type.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.TripType trip_types = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for tripTypes to set. + * @return This builder for chaining. + */ + public Builder setTripTypesValue(int index, int value) { + ensureTripTypesIsMutable(); + tripTypes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Represents the type of proposed trip. Must include exactly one
+     * type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only
+     * those vehicles that can support that trip type.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.TripType trip_types = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for tripTypes to add. + * @return This builder for chaining. + */ + public Builder addTripTypesValue(int value) { + ensureTripTypesIsMutable(); + tripTypes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Represents the type of proposed trip. Must include exactly one
+     * type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only
+     * those vehicles that can support that trip type.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.TripType trip_types = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param values The enum numeric values on the wire for tripTypes to add. + * @return This builder for chaining. + */ + public Builder addAllTripTypesValue(java.lang.Iterable values) { + ensureTripTypesIsMutable(); + for (int value : values) { + tripTypes_.add(value); + } + onChanged(); + return this; + } + + private com.google.protobuf.Duration maximumStaleness_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + maximumStalenessBuilder_; + /** + * + * + *
+     * Restricts the search to only those vehicles that have sent location updates
+     * to Fleet Engine within the specified duration. Stationary vehicles still
+     * transmitting their locations are not considered stale. If this field is not
+     * set, the server uses five minutes as the default value.
+     * 
+ * + * .google.protobuf.Duration maximum_staleness = 10; + * + * @return Whether the maximumStaleness field is set. + */ + public boolean hasMaximumStaleness() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+     * Restricts the search to only those vehicles that have sent location updates
+     * to Fleet Engine within the specified duration. Stationary vehicles still
+     * transmitting their locations are not considered stale. If this field is not
+     * set, the server uses five minutes as the default value.
+     * 
+ * + * .google.protobuf.Duration maximum_staleness = 10; + * + * @return The maximumStaleness. + */ + public com.google.protobuf.Duration getMaximumStaleness() { + if (maximumStalenessBuilder_ == null) { + return maximumStaleness_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : maximumStaleness_; + } else { + return maximumStalenessBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Restricts the search to only those vehicles that have sent location updates
+     * to Fleet Engine within the specified duration. Stationary vehicles still
+     * transmitting their locations are not considered stale. If this field is not
+     * set, the server uses five minutes as the default value.
+     * 
+ * + * .google.protobuf.Duration maximum_staleness = 10; + */ + public Builder setMaximumStaleness(com.google.protobuf.Duration value) { + if (maximumStalenessBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maximumStaleness_ = value; + } else { + maximumStalenessBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Restricts the search to only those vehicles that have sent location updates
+     * to Fleet Engine within the specified duration. Stationary vehicles still
+     * transmitting their locations are not considered stale. If this field is not
+     * set, the server uses five minutes as the default value.
+     * 
+ * + * .google.protobuf.Duration maximum_staleness = 10; + */ + public Builder setMaximumStaleness(com.google.protobuf.Duration.Builder builderForValue) { + if (maximumStalenessBuilder_ == null) { + maximumStaleness_ = builderForValue.build(); + } else { + maximumStalenessBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Restricts the search to only those vehicles that have sent location updates
+     * to Fleet Engine within the specified duration. Stationary vehicles still
+     * transmitting their locations are not considered stale. If this field is not
+     * set, the server uses five minutes as the default value.
+     * 
+ * + * .google.protobuf.Duration maximum_staleness = 10; + */ + public Builder mergeMaximumStaleness(com.google.protobuf.Duration value) { + if (maximumStalenessBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && maximumStaleness_ != null + && maximumStaleness_ != com.google.protobuf.Duration.getDefaultInstance()) { + getMaximumStalenessBuilder().mergeFrom(value); + } else { + maximumStaleness_ = value; + } + } else { + maximumStalenessBuilder_.mergeFrom(value); + } + if (maximumStaleness_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Restricts the search to only those vehicles that have sent location updates
+     * to Fleet Engine within the specified duration. Stationary vehicles still
+     * transmitting their locations are not considered stale. If this field is not
+     * set, the server uses five minutes as the default value.
+     * 
+ * + * .google.protobuf.Duration maximum_staleness = 10; + */ + public Builder clearMaximumStaleness() { + bitField0_ = (bitField0_ & ~0x00000100); + maximumStaleness_ = null; + if (maximumStalenessBuilder_ != null) { + maximumStalenessBuilder_.dispose(); + maximumStalenessBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Restricts the search to only those vehicles that have sent location updates
+     * to Fleet Engine within the specified duration. Stationary vehicles still
+     * transmitting their locations are not considered stale. If this field is not
+     * set, the server uses five minutes as the default value.
+     * 
+ * + * .google.protobuf.Duration maximum_staleness = 10; + */ + public com.google.protobuf.Duration.Builder getMaximumStalenessBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getMaximumStalenessFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Restricts the search to only those vehicles that have sent location updates
+     * to Fleet Engine within the specified duration. Stationary vehicles still
+     * transmitting their locations are not considered stale. If this field is not
+     * set, the server uses five minutes as the default value.
+     * 
+ * + * .google.protobuf.Duration maximum_staleness = 10; + */ + public com.google.protobuf.DurationOrBuilder getMaximumStalenessOrBuilder() { + if (maximumStalenessBuilder_ != null) { + return maximumStalenessBuilder_.getMessageOrBuilder(); + } else { + return maximumStaleness_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : maximumStaleness_; + } + } + /** + * + * + *
+     * Restricts the search to only those vehicles that have sent location updates
+     * to Fleet Engine within the specified duration. Stationary vehicles still
+     * transmitting their locations are not considered stale. If this field is not
+     * set, the server uses five minutes as the default value.
+     * 
+ * + * .google.protobuf.Duration maximum_staleness = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getMaximumStalenessFieldBuilder() { + if (maximumStalenessBuilder_ == null) { + maximumStalenessBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getMaximumStaleness(), getParentForChildren(), isClean()); + maximumStaleness_ = null; + } + return maximumStalenessBuilder_; + } + + private java.util.List vehicleTypes_ = + java.util.Collections.emptyList(); + + private void ensureVehicleTypesIsMutable() { + if (!((bitField0_ & 0x00000200) != 0)) { + vehicleTypes_ = + new java.util.ArrayList( + vehicleTypes_); + bitField0_ |= 0x00000200; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.Vehicle.VehicleType, + com.google.maps.fleetengine.v1.Vehicle.VehicleType.Builder, + com.google.maps.fleetengine.v1.Vehicle.VehicleTypeOrBuilder> + vehicleTypesBuilder_; + + /** + * + * + *
+     * Required. Restricts the search to vehicles with one of the specified types.
+     * At least one vehicle type must be specified. VehicleTypes with a category
+     * of `UNKNOWN` are not allowed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType vehicle_types = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getVehicleTypesList() { + if (vehicleTypesBuilder_ == null) { + return java.util.Collections.unmodifiableList(vehicleTypes_); + } else { + return vehicleTypesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. Restricts the search to vehicles with one of the specified types.
+     * At least one vehicle type must be specified. VehicleTypes with a category
+     * of `UNKNOWN` are not allowed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType vehicle_types = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getVehicleTypesCount() { + if (vehicleTypesBuilder_ == null) { + return vehicleTypes_.size(); + } else { + return vehicleTypesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. Restricts the search to vehicles with one of the specified types.
+     * At least one vehicle type must be specified. VehicleTypes with a category
+     * of `UNKNOWN` are not allowed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType vehicle_types = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.maps.fleetengine.v1.Vehicle.VehicleType getVehicleTypes(int index) { + if (vehicleTypesBuilder_ == null) { + return vehicleTypes_.get(index); + } else { + return vehicleTypesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. Restricts the search to vehicles with one of the specified types.
+     * At least one vehicle type must be specified. VehicleTypes with a category
+     * of `UNKNOWN` are not allowed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType vehicle_types = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setVehicleTypes( + int index, com.google.maps.fleetengine.v1.Vehicle.VehicleType value) { + if (vehicleTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVehicleTypesIsMutable(); + vehicleTypes_.set(index, value); + onChanged(); + } else { + vehicleTypesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. Restricts the search to vehicles with one of the specified types.
+     * At least one vehicle type must be specified. VehicleTypes with a category
+     * of `UNKNOWN` are not allowed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType vehicle_types = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setVehicleTypes( + int index, com.google.maps.fleetengine.v1.Vehicle.VehicleType.Builder builderForValue) { + if (vehicleTypesBuilder_ == null) { + ensureVehicleTypesIsMutable(); + vehicleTypes_.set(index, builderForValue.build()); + onChanged(); + } else { + vehicleTypesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Restricts the search to vehicles with one of the specified types.
+     * At least one vehicle type must be specified. VehicleTypes with a category
+     * of `UNKNOWN` are not allowed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType vehicle_types = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addVehicleTypes(com.google.maps.fleetengine.v1.Vehicle.VehicleType value) { + if (vehicleTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVehicleTypesIsMutable(); + vehicleTypes_.add(value); + onChanged(); + } else { + vehicleTypesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. Restricts the search to vehicles with one of the specified types.
+     * At least one vehicle type must be specified. VehicleTypes with a category
+     * of `UNKNOWN` are not allowed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType vehicle_types = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addVehicleTypes( + int index, com.google.maps.fleetengine.v1.Vehicle.VehicleType value) { + if (vehicleTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVehicleTypesIsMutable(); + vehicleTypes_.add(index, value); + onChanged(); + } else { + vehicleTypesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. Restricts the search to vehicles with one of the specified types.
+     * At least one vehicle type must be specified. VehicleTypes with a category
+     * of `UNKNOWN` are not allowed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType vehicle_types = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addVehicleTypes( + com.google.maps.fleetengine.v1.Vehicle.VehicleType.Builder builderForValue) { + if (vehicleTypesBuilder_ == null) { + ensureVehicleTypesIsMutable(); + vehicleTypes_.add(builderForValue.build()); + onChanged(); + } else { + vehicleTypesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Restricts the search to vehicles with one of the specified types.
+     * At least one vehicle type must be specified. VehicleTypes with a category
+     * of `UNKNOWN` are not allowed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType vehicle_types = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addVehicleTypes( + int index, com.google.maps.fleetengine.v1.Vehicle.VehicleType.Builder builderForValue) { + if (vehicleTypesBuilder_ == null) { + ensureVehicleTypesIsMutable(); + vehicleTypes_.add(index, builderForValue.build()); + onChanged(); + } else { + vehicleTypesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Restricts the search to vehicles with one of the specified types.
+     * At least one vehicle type must be specified. VehicleTypes with a category
+     * of `UNKNOWN` are not allowed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType vehicle_types = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllVehicleTypes( + java.lang.Iterable values) { + if (vehicleTypesBuilder_ == null) { + ensureVehicleTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, vehicleTypes_); + onChanged(); + } else { + vehicleTypesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. Restricts the search to vehicles with one of the specified types.
+     * At least one vehicle type must be specified. VehicleTypes with a category
+     * of `UNKNOWN` are not allowed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType vehicle_types = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearVehicleTypes() { + if (vehicleTypesBuilder_ == null) { + vehicleTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + } else { + vehicleTypesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. Restricts the search to vehicles with one of the specified types.
+     * At least one vehicle type must be specified. VehicleTypes with a category
+     * of `UNKNOWN` are not allowed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType vehicle_types = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeVehicleTypes(int index) { + if (vehicleTypesBuilder_ == null) { + ensureVehicleTypesIsMutable(); + vehicleTypes_.remove(index); + onChanged(); + } else { + vehicleTypesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. Restricts the search to vehicles with one of the specified types.
+     * At least one vehicle type must be specified. VehicleTypes with a category
+     * of `UNKNOWN` are not allowed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType vehicle_types = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.maps.fleetengine.v1.Vehicle.VehicleType.Builder getVehicleTypesBuilder( + int index) { + return getVehicleTypesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. Restricts the search to vehicles with one of the specified types.
+     * At least one vehicle type must be specified. VehicleTypes with a category
+     * of `UNKNOWN` are not allowed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType vehicle_types = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.maps.fleetengine.v1.Vehicle.VehicleTypeOrBuilder getVehicleTypesOrBuilder( + int index) { + if (vehicleTypesBuilder_ == null) { + return vehicleTypes_.get(index); + } else { + return vehicleTypesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. Restricts the search to vehicles with one of the specified types.
+     * At least one vehicle type must be specified. VehicleTypes with a category
+     * of `UNKNOWN` are not allowed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType vehicle_types = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getVehicleTypesOrBuilderList() { + if (vehicleTypesBuilder_ != null) { + return vehicleTypesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(vehicleTypes_); + } + } + /** + * + * + *
+     * Required. Restricts the search to vehicles with one of the specified types.
+     * At least one vehicle type must be specified. VehicleTypes with a category
+     * of `UNKNOWN` are not allowed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType vehicle_types = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.maps.fleetengine.v1.Vehicle.VehicleType.Builder addVehicleTypesBuilder() { + return getVehicleTypesFieldBuilder() + .addBuilder(com.google.maps.fleetengine.v1.Vehicle.VehicleType.getDefaultInstance()); + } + /** + * + * + *
+     * Required. Restricts the search to vehicles with one of the specified types.
+     * At least one vehicle type must be specified. VehicleTypes with a category
+     * of `UNKNOWN` are not allowed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType vehicle_types = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.maps.fleetengine.v1.Vehicle.VehicleType.Builder addVehicleTypesBuilder( + int index) { + return getVehicleTypesFieldBuilder() + .addBuilder( + index, com.google.maps.fleetengine.v1.Vehicle.VehicleType.getDefaultInstance()); + } + /** + * + * + *
+     * Required. Restricts the search to vehicles with one of the specified types.
+     * At least one vehicle type must be specified. VehicleTypes with a category
+     * of `UNKNOWN` are not allowed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType vehicle_types = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getVehicleTypesBuilderList() { + return getVehicleTypesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.Vehicle.VehicleType, + com.google.maps.fleetengine.v1.Vehicle.VehicleType.Builder, + com.google.maps.fleetengine.v1.Vehicle.VehicleTypeOrBuilder> + getVehicleTypesFieldBuilder() { + if (vehicleTypesBuilder_ == null) { + vehicleTypesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.Vehicle.VehicleType, + com.google.maps.fleetengine.v1.Vehicle.VehicleType.Builder, + com.google.maps.fleetengine.v1.Vehicle.VehicleTypeOrBuilder>( + vehicleTypes_, ((bitField0_ & 0x00000200) != 0), getParentForChildren(), isClean()); + vehicleTypes_ = null; + } + return vehicleTypesBuilder_; + } + + private java.util.List requiredAttributes_ = + java.util.Collections.emptyList(); + + private void ensureRequiredAttributesIsMutable() { + if (!((bitField0_ & 0x00000400) != 0)) { + requiredAttributes_ = + new java.util.ArrayList( + requiredAttributes_); + bitField0_ |= 0x00000400; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.VehicleAttribute, + com.google.maps.fleetengine.v1.VehicleAttribute.Builder, + com.google.maps.fleetengine.v1.VehicleAttributeOrBuilder> + requiredAttributesBuilder_; + + /** + * + * + *
+     * Callers can form complex logical operations using any combination of the
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attribute_sets` fields.
+     *
+     * `required_attributes` is a list; `required_one_of_attributes` uses a
+     * message which allows a list of lists. In combination, the two fields allow
+     * the composition of this expression:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+     * ...)
+     * AND
+     * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+     * ...)
+     * ```
+     *
+     * Restricts the search to only those vehicles with the specified attributes.
+     * This field is a conjunction/AND operation. A max of 50 required_attributes
+     * is allowed. This matches the maximum number of attributes allowed on a
+     * vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute required_attributes = 12; + */ + public java.util.List + getRequiredAttributesList() { + if (requiredAttributesBuilder_ == null) { + return java.util.Collections.unmodifiableList(requiredAttributes_); + } else { + return requiredAttributesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Callers can form complex logical operations using any combination of the
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attribute_sets` fields.
+     *
+     * `required_attributes` is a list; `required_one_of_attributes` uses a
+     * message which allows a list of lists. In combination, the two fields allow
+     * the composition of this expression:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+     * ...)
+     * AND
+     * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+     * ...)
+     * ```
+     *
+     * Restricts the search to only those vehicles with the specified attributes.
+     * This field is a conjunction/AND operation. A max of 50 required_attributes
+     * is allowed. This matches the maximum number of attributes allowed on a
+     * vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute required_attributes = 12; + */ + public int getRequiredAttributesCount() { + if (requiredAttributesBuilder_ == null) { + return requiredAttributes_.size(); + } else { + return requiredAttributesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Callers can form complex logical operations using any combination of the
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attribute_sets` fields.
+     *
+     * `required_attributes` is a list; `required_one_of_attributes` uses a
+     * message which allows a list of lists. In combination, the two fields allow
+     * the composition of this expression:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+     * ...)
+     * AND
+     * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+     * ...)
+     * ```
+     *
+     * Restricts the search to only those vehicles with the specified attributes.
+     * This field is a conjunction/AND operation. A max of 50 required_attributes
+     * is allowed. This matches the maximum number of attributes allowed on a
+     * vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute required_attributes = 12; + */ + public com.google.maps.fleetengine.v1.VehicleAttribute getRequiredAttributes(int index) { + if (requiredAttributesBuilder_ == null) { + return requiredAttributes_.get(index); + } else { + return requiredAttributesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Callers can form complex logical operations using any combination of the
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attribute_sets` fields.
+     *
+     * `required_attributes` is a list; `required_one_of_attributes` uses a
+     * message which allows a list of lists. In combination, the two fields allow
+     * the composition of this expression:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+     * ...)
+     * AND
+     * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+     * ...)
+     * ```
+     *
+     * Restricts the search to only those vehicles with the specified attributes.
+     * This field is a conjunction/AND operation. A max of 50 required_attributes
+     * is allowed. This matches the maximum number of attributes allowed on a
+     * vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute required_attributes = 12; + */ + public Builder setRequiredAttributes( + int index, com.google.maps.fleetengine.v1.VehicleAttribute value) { + if (requiredAttributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequiredAttributesIsMutable(); + requiredAttributes_.set(index, value); + onChanged(); + } else { + requiredAttributesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Callers can form complex logical operations using any combination of the
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attribute_sets` fields.
+     *
+     * `required_attributes` is a list; `required_one_of_attributes` uses a
+     * message which allows a list of lists. In combination, the two fields allow
+     * the composition of this expression:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+     * ...)
+     * AND
+     * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+     * ...)
+     * ```
+     *
+     * Restricts the search to only those vehicles with the specified attributes.
+     * This field is a conjunction/AND operation. A max of 50 required_attributes
+     * is allowed. This matches the maximum number of attributes allowed on a
+     * vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute required_attributes = 12; + */ + public Builder setRequiredAttributes( + int index, com.google.maps.fleetengine.v1.VehicleAttribute.Builder builderForValue) { + if (requiredAttributesBuilder_ == null) { + ensureRequiredAttributesIsMutable(); + requiredAttributes_.set(index, builderForValue.build()); + onChanged(); + } else { + requiredAttributesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Callers can form complex logical operations using any combination of the
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attribute_sets` fields.
+     *
+     * `required_attributes` is a list; `required_one_of_attributes` uses a
+     * message which allows a list of lists. In combination, the two fields allow
+     * the composition of this expression:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+     * ...)
+     * AND
+     * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+     * ...)
+     * ```
+     *
+     * Restricts the search to only those vehicles with the specified attributes.
+     * This field is a conjunction/AND operation. A max of 50 required_attributes
+     * is allowed. This matches the maximum number of attributes allowed on a
+     * vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute required_attributes = 12; + */ + public Builder addRequiredAttributes(com.google.maps.fleetengine.v1.VehicleAttribute value) { + if (requiredAttributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequiredAttributesIsMutable(); + requiredAttributes_.add(value); + onChanged(); + } else { + requiredAttributesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Callers can form complex logical operations using any combination of the
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attribute_sets` fields.
+     *
+     * `required_attributes` is a list; `required_one_of_attributes` uses a
+     * message which allows a list of lists. In combination, the two fields allow
+     * the composition of this expression:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+     * ...)
+     * AND
+     * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+     * ...)
+     * ```
+     *
+     * Restricts the search to only those vehicles with the specified attributes.
+     * This field is a conjunction/AND operation. A max of 50 required_attributes
+     * is allowed. This matches the maximum number of attributes allowed on a
+     * vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute required_attributes = 12; + */ + public Builder addRequiredAttributes( + int index, com.google.maps.fleetengine.v1.VehicleAttribute value) { + if (requiredAttributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequiredAttributesIsMutable(); + requiredAttributes_.add(index, value); + onChanged(); + } else { + requiredAttributesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Callers can form complex logical operations using any combination of the
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attribute_sets` fields.
+     *
+     * `required_attributes` is a list; `required_one_of_attributes` uses a
+     * message which allows a list of lists. In combination, the two fields allow
+     * the composition of this expression:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+     * ...)
+     * AND
+     * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+     * ...)
+     * ```
+     *
+     * Restricts the search to only those vehicles with the specified attributes.
+     * This field is a conjunction/AND operation. A max of 50 required_attributes
+     * is allowed. This matches the maximum number of attributes allowed on a
+     * vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute required_attributes = 12; + */ + public Builder addRequiredAttributes( + com.google.maps.fleetengine.v1.VehicleAttribute.Builder builderForValue) { + if (requiredAttributesBuilder_ == null) { + ensureRequiredAttributesIsMutable(); + requiredAttributes_.add(builderForValue.build()); + onChanged(); + } else { + requiredAttributesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Callers can form complex logical operations using any combination of the
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attribute_sets` fields.
+     *
+     * `required_attributes` is a list; `required_one_of_attributes` uses a
+     * message which allows a list of lists. In combination, the two fields allow
+     * the composition of this expression:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+     * ...)
+     * AND
+     * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+     * ...)
+     * ```
+     *
+     * Restricts the search to only those vehicles with the specified attributes.
+     * This field is a conjunction/AND operation. A max of 50 required_attributes
+     * is allowed. This matches the maximum number of attributes allowed on a
+     * vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute required_attributes = 12; + */ + public Builder addRequiredAttributes( + int index, com.google.maps.fleetengine.v1.VehicleAttribute.Builder builderForValue) { + if (requiredAttributesBuilder_ == null) { + ensureRequiredAttributesIsMutable(); + requiredAttributes_.add(index, builderForValue.build()); + onChanged(); + } else { + requiredAttributesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Callers can form complex logical operations using any combination of the
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attribute_sets` fields.
+     *
+     * `required_attributes` is a list; `required_one_of_attributes` uses a
+     * message which allows a list of lists. In combination, the two fields allow
+     * the composition of this expression:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+     * ...)
+     * AND
+     * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+     * ...)
+     * ```
+     *
+     * Restricts the search to only those vehicles with the specified attributes.
+     * This field is a conjunction/AND operation. A max of 50 required_attributes
+     * is allowed. This matches the maximum number of attributes allowed on a
+     * vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute required_attributes = 12; + */ + public Builder addAllRequiredAttributes( + java.lang.Iterable values) { + if (requiredAttributesBuilder_ == null) { + ensureRequiredAttributesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, requiredAttributes_); + onChanged(); + } else { + requiredAttributesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Callers can form complex logical operations using any combination of the
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attribute_sets` fields.
+     *
+     * `required_attributes` is a list; `required_one_of_attributes` uses a
+     * message which allows a list of lists. In combination, the two fields allow
+     * the composition of this expression:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+     * ...)
+     * AND
+     * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+     * ...)
+     * ```
+     *
+     * Restricts the search to only those vehicles with the specified attributes.
+     * This field is a conjunction/AND operation. A max of 50 required_attributes
+     * is allowed. This matches the maximum number of attributes allowed on a
+     * vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute required_attributes = 12; + */ + public Builder clearRequiredAttributes() { + if (requiredAttributesBuilder_ == null) { + requiredAttributes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + } else { + requiredAttributesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Callers can form complex logical operations using any combination of the
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attribute_sets` fields.
+     *
+     * `required_attributes` is a list; `required_one_of_attributes` uses a
+     * message which allows a list of lists. In combination, the two fields allow
+     * the composition of this expression:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+     * ...)
+     * AND
+     * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+     * ...)
+     * ```
+     *
+     * Restricts the search to only those vehicles with the specified attributes.
+     * This field is a conjunction/AND operation. A max of 50 required_attributes
+     * is allowed. This matches the maximum number of attributes allowed on a
+     * vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute required_attributes = 12; + */ + public Builder removeRequiredAttributes(int index) { + if (requiredAttributesBuilder_ == null) { + ensureRequiredAttributesIsMutable(); + requiredAttributes_.remove(index); + onChanged(); + } else { + requiredAttributesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Callers can form complex logical operations using any combination of the
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attribute_sets` fields.
+     *
+     * `required_attributes` is a list; `required_one_of_attributes` uses a
+     * message which allows a list of lists. In combination, the two fields allow
+     * the composition of this expression:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+     * ...)
+     * AND
+     * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+     * ...)
+     * ```
+     *
+     * Restricts the search to only those vehicles with the specified attributes.
+     * This field is a conjunction/AND operation. A max of 50 required_attributes
+     * is allowed. This matches the maximum number of attributes allowed on a
+     * vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute required_attributes = 12; + */ + public com.google.maps.fleetengine.v1.VehicleAttribute.Builder getRequiredAttributesBuilder( + int index) { + return getRequiredAttributesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Callers can form complex logical operations using any combination of the
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attribute_sets` fields.
+     *
+     * `required_attributes` is a list; `required_one_of_attributes` uses a
+     * message which allows a list of lists. In combination, the two fields allow
+     * the composition of this expression:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+     * ...)
+     * AND
+     * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+     * ...)
+     * ```
+     *
+     * Restricts the search to only those vehicles with the specified attributes.
+     * This field is a conjunction/AND operation. A max of 50 required_attributes
+     * is allowed. This matches the maximum number of attributes allowed on a
+     * vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute required_attributes = 12; + */ + public com.google.maps.fleetengine.v1.VehicleAttributeOrBuilder getRequiredAttributesOrBuilder( + int index) { + if (requiredAttributesBuilder_ == null) { + return requiredAttributes_.get(index); + } else { + return requiredAttributesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Callers can form complex logical operations using any combination of the
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attribute_sets` fields.
+     *
+     * `required_attributes` is a list; `required_one_of_attributes` uses a
+     * message which allows a list of lists. In combination, the two fields allow
+     * the composition of this expression:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+     * ...)
+     * AND
+     * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+     * ...)
+     * ```
+     *
+     * Restricts the search to only those vehicles with the specified attributes.
+     * This field is a conjunction/AND operation. A max of 50 required_attributes
+     * is allowed. This matches the maximum number of attributes allowed on a
+     * vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute required_attributes = 12; + */ + public java.util.List + getRequiredAttributesOrBuilderList() { + if (requiredAttributesBuilder_ != null) { + return requiredAttributesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(requiredAttributes_); + } + } + /** + * + * + *
+     * Callers can form complex logical operations using any combination of the
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attribute_sets` fields.
+     *
+     * `required_attributes` is a list; `required_one_of_attributes` uses a
+     * message which allows a list of lists. In combination, the two fields allow
+     * the composition of this expression:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+     * ...)
+     * AND
+     * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+     * ...)
+     * ```
+     *
+     * Restricts the search to only those vehicles with the specified attributes.
+     * This field is a conjunction/AND operation. A max of 50 required_attributes
+     * is allowed. This matches the maximum number of attributes allowed on a
+     * vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute required_attributes = 12; + */ + public com.google.maps.fleetengine.v1.VehicleAttribute.Builder addRequiredAttributesBuilder() { + return getRequiredAttributesFieldBuilder() + .addBuilder(com.google.maps.fleetengine.v1.VehicleAttribute.getDefaultInstance()); + } + /** + * + * + *
+     * Callers can form complex logical operations using any combination of the
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attribute_sets` fields.
+     *
+     * `required_attributes` is a list; `required_one_of_attributes` uses a
+     * message which allows a list of lists. In combination, the two fields allow
+     * the composition of this expression:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+     * ...)
+     * AND
+     * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+     * ...)
+     * ```
+     *
+     * Restricts the search to only those vehicles with the specified attributes.
+     * This field is a conjunction/AND operation. A max of 50 required_attributes
+     * is allowed. This matches the maximum number of attributes allowed on a
+     * vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute required_attributes = 12; + */ + public com.google.maps.fleetengine.v1.VehicleAttribute.Builder addRequiredAttributesBuilder( + int index) { + return getRequiredAttributesFieldBuilder() + .addBuilder(index, com.google.maps.fleetengine.v1.VehicleAttribute.getDefaultInstance()); + } + /** + * + * + *
+     * Callers can form complex logical operations using any combination of the
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attribute_sets` fields.
+     *
+     * `required_attributes` is a list; `required_one_of_attributes` uses a
+     * message which allows a list of lists. In combination, the two fields allow
+     * the composition of this expression:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+     * ...)
+     * AND
+     * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+     * ...)
+     * ```
+     *
+     * Restricts the search to only those vehicles with the specified attributes.
+     * This field is a conjunction/AND operation. A max of 50 required_attributes
+     * is allowed. This matches the maximum number of attributes allowed on a
+     * vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute required_attributes = 12; + */ + public java.util.List + getRequiredAttributesBuilderList() { + return getRequiredAttributesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.VehicleAttribute, + com.google.maps.fleetengine.v1.VehicleAttribute.Builder, + com.google.maps.fleetengine.v1.VehicleAttributeOrBuilder> + getRequiredAttributesFieldBuilder() { + if (requiredAttributesBuilder_ == null) { + requiredAttributesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.VehicleAttribute, + com.google.maps.fleetengine.v1.VehicleAttribute.Builder, + com.google.maps.fleetengine.v1.VehicleAttributeOrBuilder>( + requiredAttributes_, + ((bitField0_ & 0x00000400) != 0), + getParentForChildren(), + isClean()); + requiredAttributes_ = null; + } + return requiredAttributesBuilder_; + } + + private java.util.List + requiredOneOfAttributes_ = java.util.Collections.emptyList(); + + private void ensureRequiredOneOfAttributesIsMutable() { + if (!((bitField0_ & 0x00000800) != 0)) { + requiredOneOfAttributes_ = + new java.util.ArrayList( + requiredOneOfAttributes_); + bitField0_ |= 0x00000800; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.VehicleAttributeList, + com.google.maps.fleetengine.v1.VehicleAttributeList.Builder, + com.google.maps.fleetengine.v1.VehicleAttributeListOrBuilder> + requiredOneOfAttributesBuilder_; + + /** + * + * + *
+     * Restricts the search to only those vehicles with at least one of
+     * the specified attributes in each `VehicleAttributeList`. Within each
+     * list, a vehicle must match at least one of the attributes. This field is an
+     * inclusive disjunction/OR operation in each `VehicleAttributeList` and a
+     * conjunction/AND operation across the collection of `VehicleAttributeList`.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attributes = 15; + * + */ + public java.util.List + getRequiredOneOfAttributesList() { + if (requiredOneOfAttributesBuilder_ == null) { + return java.util.Collections.unmodifiableList(requiredOneOfAttributes_); + } else { + return requiredOneOfAttributesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Restricts the search to only those vehicles with at least one of
+     * the specified attributes in each `VehicleAttributeList`. Within each
+     * list, a vehicle must match at least one of the attributes. This field is an
+     * inclusive disjunction/OR operation in each `VehicleAttributeList` and a
+     * conjunction/AND operation across the collection of `VehicleAttributeList`.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attributes = 15; + * + */ + public int getRequiredOneOfAttributesCount() { + if (requiredOneOfAttributesBuilder_ == null) { + return requiredOneOfAttributes_.size(); + } else { + return requiredOneOfAttributesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Restricts the search to only those vehicles with at least one of
+     * the specified attributes in each `VehicleAttributeList`. Within each
+     * list, a vehicle must match at least one of the attributes. This field is an
+     * inclusive disjunction/OR operation in each `VehicleAttributeList` and a
+     * conjunction/AND operation across the collection of `VehicleAttributeList`.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attributes = 15; + * + */ + public com.google.maps.fleetengine.v1.VehicleAttributeList getRequiredOneOfAttributes( + int index) { + if (requiredOneOfAttributesBuilder_ == null) { + return requiredOneOfAttributes_.get(index); + } else { + return requiredOneOfAttributesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Restricts the search to only those vehicles with at least one of
+     * the specified attributes in each `VehicleAttributeList`. Within each
+     * list, a vehicle must match at least one of the attributes. This field is an
+     * inclusive disjunction/OR operation in each `VehicleAttributeList` and a
+     * conjunction/AND operation across the collection of `VehicleAttributeList`.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attributes = 15; + * + */ + public Builder setRequiredOneOfAttributes( + int index, com.google.maps.fleetengine.v1.VehicleAttributeList value) { + if (requiredOneOfAttributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequiredOneOfAttributesIsMutable(); + requiredOneOfAttributes_.set(index, value); + onChanged(); + } else { + requiredOneOfAttributesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Restricts the search to only those vehicles with at least one of
+     * the specified attributes in each `VehicleAttributeList`. Within each
+     * list, a vehicle must match at least one of the attributes. This field is an
+     * inclusive disjunction/OR operation in each `VehicleAttributeList` and a
+     * conjunction/AND operation across the collection of `VehicleAttributeList`.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attributes = 15; + * + */ + public Builder setRequiredOneOfAttributes( + int index, com.google.maps.fleetengine.v1.VehicleAttributeList.Builder builderForValue) { + if (requiredOneOfAttributesBuilder_ == null) { + ensureRequiredOneOfAttributesIsMutable(); + requiredOneOfAttributes_.set(index, builderForValue.build()); + onChanged(); + } else { + requiredOneOfAttributesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Restricts the search to only those vehicles with at least one of
+     * the specified attributes in each `VehicleAttributeList`. Within each
+     * list, a vehicle must match at least one of the attributes. This field is an
+     * inclusive disjunction/OR operation in each `VehicleAttributeList` and a
+     * conjunction/AND operation across the collection of `VehicleAttributeList`.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attributes = 15; + * + */ + public Builder addRequiredOneOfAttributes( + com.google.maps.fleetengine.v1.VehicleAttributeList value) { + if (requiredOneOfAttributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequiredOneOfAttributesIsMutable(); + requiredOneOfAttributes_.add(value); + onChanged(); + } else { + requiredOneOfAttributesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Restricts the search to only those vehicles with at least one of
+     * the specified attributes in each `VehicleAttributeList`. Within each
+     * list, a vehicle must match at least one of the attributes. This field is an
+     * inclusive disjunction/OR operation in each `VehicleAttributeList` and a
+     * conjunction/AND operation across the collection of `VehicleAttributeList`.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attributes = 15; + * + */ + public Builder addRequiredOneOfAttributes( + int index, com.google.maps.fleetengine.v1.VehicleAttributeList value) { + if (requiredOneOfAttributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequiredOneOfAttributesIsMutable(); + requiredOneOfAttributes_.add(index, value); + onChanged(); + } else { + requiredOneOfAttributesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Restricts the search to only those vehicles with at least one of
+     * the specified attributes in each `VehicleAttributeList`. Within each
+     * list, a vehicle must match at least one of the attributes. This field is an
+     * inclusive disjunction/OR operation in each `VehicleAttributeList` and a
+     * conjunction/AND operation across the collection of `VehicleAttributeList`.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attributes = 15; + * + */ + public Builder addRequiredOneOfAttributes( + com.google.maps.fleetengine.v1.VehicleAttributeList.Builder builderForValue) { + if (requiredOneOfAttributesBuilder_ == null) { + ensureRequiredOneOfAttributesIsMutable(); + requiredOneOfAttributes_.add(builderForValue.build()); + onChanged(); + } else { + requiredOneOfAttributesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Restricts the search to only those vehicles with at least one of
+     * the specified attributes in each `VehicleAttributeList`. Within each
+     * list, a vehicle must match at least one of the attributes. This field is an
+     * inclusive disjunction/OR operation in each `VehicleAttributeList` and a
+     * conjunction/AND operation across the collection of `VehicleAttributeList`.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attributes = 15; + * + */ + public Builder addRequiredOneOfAttributes( + int index, com.google.maps.fleetengine.v1.VehicleAttributeList.Builder builderForValue) { + if (requiredOneOfAttributesBuilder_ == null) { + ensureRequiredOneOfAttributesIsMutable(); + requiredOneOfAttributes_.add(index, builderForValue.build()); + onChanged(); + } else { + requiredOneOfAttributesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Restricts the search to only those vehicles with at least one of
+     * the specified attributes in each `VehicleAttributeList`. Within each
+     * list, a vehicle must match at least one of the attributes. This field is an
+     * inclusive disjunction/OR operation in each `VehicleAttributeList` and a
+     * conjunction/AND operation across the collection of `VehicleAttributeList`.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attributes = 15; + * + */ + public Builder addAllRequiredOneOfAttributes( + java.lang.Iterable values) { + if (requiredOneOfAttributesBuilder_ == null) { + ensureRequiredOneOfAttributesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, requiredOneOfAttributes_); + onChanged(); + } else { + requiredOneOfAttributesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Restricts the search to only those vehicles with at least one of
+     * the specified attributes in each `VehicleAttributeList`. Within each
+     * list, a vehicle must match at least one of the attributes. This field is an
+     * inclusive disjunction/OR operation in each `VehicleAttributeList` and a
+     * conjunction/AND operation across the collection of `VehicleAttributeList`.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attributes = 15; + * + */ + public Builder clearRequiredOneOfAttributes() { + if (requiredOneOfAttributesBuilder_ == null) { + requiredOneOfAttributes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + } else { + requiredOneOfAttributesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Restricts the search to only those vehicles with at least one of
+     * the specified attributes in each `VehicleAttributeList`. Within each
+     * list, a vehicle must match at least one of the attributes. This field is an
+     * inclusive disjunction/OR operation in each `VehicleAttributeList` and a
+     * conjunction/AND operation across the collection of `VehicleAttributeList`.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attributes = 15; + * + */ + public Builder removeRequiredOneOfAttributes(int index) { + if (requiredOneOfAttributesBuilder_ == null) { + ensureRequiredOneOfAttributesIsMutable(); + requiredOneOfAttributes_.remove(index); + onChanged(); + } else { + requiredOneOfAttributesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Restricts the search to only those vehicles with at least one of
+     * the specified attributes in each `VehicleAttributeList`. Within each
+     * list, a vehicle must match at least one of the attributes. This field is an
+     * inclusive disjunction/OR operation in each `VehicleAttributeList` and a
+     * conjunction/AND operation across the collection of `VehicleAttributeList`.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attributes = 15; + * + */ + public com.google.maps.fleetengine.v1.VehicleAttributeList.Builder + getRequiredOneOfAttributesBuilder(int index) { + return getRequiredOneOfAttributesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Restricts the search to only those vehicles with at least one of
+     * the specified attributes in each `VehicleAttributeList`. Within each
+     * list, a vehicle must match at least one of the attributes. This field is an
+     * inclusive disjunction/OR operation in each `VehicleAttributeList` and a
+     * conjunction/AND operation across the collection of `VehicleAttributeList`.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attributes = 15; + * + */ + public com.google.maps.fleetengine.v1.VehicleAttributeListOrBuilder + getRequiredOneOfAttributesOrBuilder(int index) { + if (requiredOneOfAttributesBuilder_ == null) { + return requiredOneOfAttributes_.get(index); + } else { + return requiredOneOfAttributesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Restricts the search to only those vehicles with at least one of
+     * the specified attributes in each `VehicleAttributeList`. Within each
+     * list, a vehicle must match at least one of the attributes. This field is an
+     * inclusive disjunction/OR operation in each `VehicleAttributeList` and a
+     * conjunction/AND operation across the collection of `VehicleAttributeList`.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attributes = 15; + * + */ + public java.util.List + getRequiredOneOfAttributesOrBuilderList() { + if (requiredOneOfAttributesBuilder_ != null) { + return requiredOneOfAttributesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(requiredOneOfAttributes_); + } + } + /** + * + * + *
+     * Restricts the search to only those vehicles with at least one of
+     * the specified attributes in each `VehicleAttributeList`. Within each
+     * list, a vehicle must match at least one of the attributes. This field is an
+     * inclusive disjunction/OR operation in each `VehicleAttributeList` and a
+     * conjunction/AND operation across the collection of `VehicleAttributeList`.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attributes = 15; + * + */ + public com.google.maps.fleetengine.v1.VehicleAttributeList.Builder + addRequiredOneOfAttributesBuilder() { + return getRequiredOneOfAttributesFieldBuilder() + .addBuilder(com.google.maps.fleetengine.v1.VehicleAttributeList.getDefaultInstance()); + } + /** + * + * + *
+     * Restricts the search to only those vehicles with at least one of
+     * the specified attributes in each `VehicleAttributeList`. Within each
+     * list, a vehicle must match at least one of the attributes. This field is an
+     * inclusive disjunction/OR operation in each `VehicleAttributeList` and a
+     * conjunction/AND operation across the collection of `VehicleAttributeList`.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attributes = 15; + * + */ + public com.google.maps.fleetengine.v1.VehicleAttributeList.Builder + addRequiredOneOfAttributesBuilder(int index) { + return getRequiredOneOfAttributesFieldBuilder() + .addBuilder( + index, com.google.maps.fleetengine.v1.VehicleAttributeList.getDefaultInstance()); + } + /** + * + * + *
+     * Restricts the search to only those vehicles with at least one of
+     * the specified attributes in each `VehicleAttributeList`. Within each
+     * list, a vehicle must match at least one of the attributes. This field is an
+     * inclusive disjunction/OR operation in each `VehicleAttributeList` and a
+     * conjunction/AND operation across the collection of `VehicleAttributeList`.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attributes = 15; + * + */ + public java.util.List + getRequiredOneOfAttributesBuilderList() { + return getRequiredOneOfAttributesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.VehicleAttributeList, + com.google.maps.fleetengine.v1.VehicleAttributeList.Builder, + com.google.maps.fleetengine.v1.VehicleAttributeListOrBuilder> + getRequiredOneOfAttributesFieldBuilder() { + if (requiredOneOfAttributesBuilder_ == null) { + requiredOneOfAttributesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.VehicleAttributeList, + com.google.maps.fleetengine.v1.VehicleAttributeList.Builder, + com.google.maps.fleetengine.v1.VehicleAttributeListOrBuilder>( + requiredOneOfAttributes_, + ((bitField0_ & 0x00000800) != 0), + getParentForChildren(), + isClean()); + requiredOneOfAttributes_ = null; + } + return requiredOneOfAttributesBuilder_; + } + + private java.util.List + requiredOneOfAttributeSets_ = java.util.Collections.emptyList(); + + private void ensureRequiredOneOfAttributeSetsIsMutable() { + if (!((bitField0_ & 0x00001000) != 0)) { + requiredOneOfAttributeSets_ = + new java.util.ArrayList( + requiredOneOfAttributeSets_); + bitField0_ |= 0x00001000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.VehicleAttributeList, + com.google.maps.fleetengine.v1.VehicleAttributeList.Builder, + com.google.maps.fleetengine.v1.VehicleAttributeListOrBuilder> + requiredOneOfAttributeSetsBuilder_; + + /** + * + * + *
+     * `required_one_of_attribute_sets` provides additional functionality.
+     *
+     * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+     * uses a message which allows a list of lists, allowing expressions such as
+     * this one:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (
+     *   (required_one_of_attribute_sets[0][0] AND
+     *   required_one_of_attribute_sets[0][1] AND
+     *   ...)
+     *   OR
+     *   (required_one_of_attribute_sets[1][0] AND
+     *   required_one_of_attribute_sets[1][1] AND
+     *   ...)
+     * )
+     * ```
+     *
+     * Restricts the search to only those vehicles with all the attributes in a
+     * `VehicleAttributeList`. Within each list, a
+     * vehicle must match all of the attributes. This field is a conjunction/AND
+     * operation in each `VehicleAttributeList` and inclusive disjunction/OR
+     * operation across the collection of `VehicleAttributeList`.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attribute_sets = 20; + * + */ + public java.util.List + getRequiredOneOfAttributeSetsList() { + if (requiredOneOfAttributeSetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(requiredOneOfAttributeSets_); + } else { + return requiredOneOfAttributeSetsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * `required_one_of_attribute_sets` provides additional functionality.
+     *
+     * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+     * uses a message which allows a list of lists, allowing expressions such as
+     * this one:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (
+     *   (required_one_of_attribute_sets[0][0] AND
+     *   required_one_of_attribute_sets[0][1] AND
+     *   ...)
+     *   OR
+     *   (required_one_of_attribute_sets[1][0] AND
+     *   required_one_of_attribute_sets[1][1] AND
+     *   ...)
+     * )
+     * ```
+     *
+     * Restricts the search to only those vehicles with all the attributes in a
+     * `VehicleAttributeList`. Within each list, a
+     * vehicle must match all of the attributes. This field is a conjunction/AND
+     * operation in each `VehicleAttributeList` and inclusive disjunction/OR
+     * operation across the collection of `VehicleAttributeList`.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attribute_sets = 20; + * + */ + public int getRequiredOneOfAttributeSetsCount() { + if (requiredOneOfAttributeSetsBuilder_ == null) { + return requiredOneOfAttributeSets_.size(); + } else { + return requiredOneOfAttributeSetsBuilder_.getCount(); + } + } + /** + * + * + *
+     * `required_one_of_attribute_sets` provides additional functionality.
+     *
+     * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+     * uses a message which allows a list of lists, allowing expressions such as
+     * this one:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (
+     *   (required_one_of_attribute_sets[0][0] AND
+     *   required_one_of_attribute_sets[0][1] AND
+     *   ...)
+     *   OR
+     *   (required_one_of_attribute_sets[1][0] AND
+     *   required_one_of_attribute_sets[1][1] AND
+     *   ...)
+     * )
+     * ```
+     *
+     * Restricts the search to only those vehicles with all the attributes in a
+     * `VehicleAttributeList`. Within each list, a
+     * vehicle must match all of the attributes. This field is a conjunction/AND
+     * operation in each `VehicleAttributeList` and inclusive disjunction/OR
+     * operation across the collection of `VehicleAttributeList`.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attribute_sets = 20; + * + */ + public com.google.maps.fleetengine.v1.VehicleAttributeList getRequiredOneOfAttributeSets( + int index) { + if (requiredOneOfAttributeSetsBuilder_ == null) { + return requiredOneOfAttributeSets_.get(index); + } else { + return requiredOneOfAttributeSetsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * `required_one_of_attribute_sets` provides additional functionality.
+     *
+     * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+     * uses a message which allows a list of lists, allowing expressions such as
+     * this one:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (
+     *   (required_one_of_attribute_sets[0][0] AND
+     *   required_one_of_attribute_sets[0][1] AND
+     *   ...)
+     *   OR
+     *   (required_one_of_attribute_sets[1][0] AND
+     *   required_one_of_attribute_sets[1][1] AND
+     *   ...)
+     * )
+     * ```
+     *
+     * Restricts the search to only those vehicles with all the attributes in a
+     * `VehicleAttributeList`. Within each list, a
+     * vehicle must match all of the attributes. This field is a conjunction/AND
+     * operation in each `VehicleAttributeList` and inclusive disjunction/OR
+     * operation across the collection of `VehicleAttributeList`.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attribute_sets = 20; + * + */ + public Builder setRequiredOneOfAttributeSets( + int index, com.google.maps.fleetengine.v1.VehicleAttributeList value) { + if (requiredOneOfAttributeSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequiredOneOfAttributeSetsIsMutable(); + requiredOneOfAttributeSets_.set(index, value); + onChanged(); + } else { + requiredOneOfAttributeSetsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * `required_one_of_attribute_sets` provides additional functionality.
+     *
+     * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+     * uses a message which allows a list of lists, allowing expressions such as
+     * this one:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (
+     *   (required_one_of_attribute_sets[0][0] AND
+     *   required_one_of_attribute_sets[0][1] AND
+     *   ...)
+     *   OR
+     *   (required_one_of_attribute_sets[1][0] AND
+     *   required_one_of_attribute_sets[1][1] AND
+     *   ...)
+     * )
+     * ```
+     *
+     * Restricts the search to only those vehicles with all the attributes in a
+     * `VehicleAttributeList`. Within each list, a
+     * vehicle must match all of the attributes. This field is a conjunction/AND
+     * operation in each `VehicleAttributeList` and inclusive disjunction/OR
+     * operation across the collection of `VehicleAttributeList`.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attribute_sets = 20; + * + */ + public Builder setRequiredOneOfAttributeSets( + int index, com.google.maps.fleetengine.v1.VehicleAttributeList.Builder builderForValue) { + if (requiredOneOfAttributeSetsBuilder_ == null) { + ensureRequiredOneOfAttributeSetsIsMutable(); + requiredOneOfAttributeSets_.set(index, builderForValue.build()); + onChanged(); + } else { + requiredOneOfAttributeSetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * `required_one_of_attribute_sets` provides additional functionality.
+     *
+     * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+     * uses a message which allows a list of lists, allowing expressions such as
+     * this one:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (
+     *   (required_one_of_attribute_sets[0][0] AND
+     *   required_one_of_attribute_sets[0][1] AND
+     *   ...)
+     *   OR
+     *   (required_one_of_attribute_sets[1][0] AND
+     *   required_one_of_attribute_sets[1][1] AND
+     *   ...)
+     * )
+     * ```
+     *
+     * Restricts the search to only those vehicles with all the attributes in a
+     * `VehicleAttributeList`. Within each list, a
+     * vehicle must match all of the attributes. This field is a conjunction/AND
+     * operation in each `VehicleAttributeList` and inclusive disjunction/OR
+     * operation across the collection of `VehicleAttributeList`.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attribute_sets = 20; + * + */ + public Builder addRequiredOneOfAttributeSets( + com.google.maps.fleetengine.v1.VehicleAttributeList value) { + if (requiredOneOfAttributeSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequiredOneOfAttributeSetsIsMutable(); + requiredOneOfAttributeSets_.add(value); + onChanged(); + } else { + requiredOneOfAttributeSetsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * `required_one_of_attribute_sets` provides additional functionality.
+     *
+     * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+     * uses a message which allows a list of lists, allowing expressions such as
+     * this one:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (
+     *   (required_one_of_attribute_sets[0][0] AND
+     *   required_one_of_attribute_sets[0][1] AND
+     *   ...)
+     *   OR
+     *   (required_one_of_attribute_sets[1][0] AND
+     *   required_one_of_attribute_sets[1][1] AND
+     *   ...)
+     * )
+     * ```
+     *
+     * Restricts the search to only those vehicles with all the attributes in a
+     * `VehicleAttributeList`. Within each list, a
+     * vehicle must match all of the attributes. This field is a conjunction/AND
+     * operation in each `VehicleAttributeList` and inclusive disjunction/OR
+     * operation across the collection of `VehicleAttributeList`.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attribute_sets = 20; + * + */ + public Builder addRequiredOneOfAttributeSets( + int index, com.google.maps.fleetengine.v1.VehicleAttributeList value) { + if (requiredOneOfAttributeSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequiredOneOfAttributeSetsIsMutable(); + requiredOneOfAttributeSets_.add(index, value); + onChanged(); + } else { + requiredOneOfAttributeSetsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * `required_one_of_attribute_sets` provides additional functionality.
+     *
+     * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+     * uses a message which allows a list of lists, allowing expressions such as
+     * this one:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (
+     *   (required_one_of_attribute_sets[0][0] AND
+     *   required_one_of_attribute_sets[0][1] AND
+     *   ...)
+     *   OR
+     *   (required_one_of_attribute_sets[1][0] AND
+     *   required_one_of_attribute_sets[1][1] AND
+     *   ...)
+     * )
+     * ```
+     *
+     * Restricts the search to only those vehicles with all the attributes in a
+     * `VehicleAttributeList`. Within each list, a
+     * vehicle must match all of the attributes. This field is a conjunction/AND
+     * operation in each `VehicleAttributeList` and inclusive disjunction/OR
+     * operation across the collection of `VehicleAttributeList`.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attribute_sets = 20; + * + */ + public Builder addRequiredOneOfAttributeSets( + com.google.maps.fleetengine.v1.VehicleAttributeList.Builder builderForValue) { + if (requiredOneOfAttributeSetsBuilder_ == null) { + ensureRequiredOneOfAttributeSetsIsMutable(); + requiredOneOfAttributeSets_.add(builderForValue.build()); + onChanged(); + } else { + requiredOneOfAttributeSetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * `required_one_of_attribute_sets` provides additional functionality.
+     *
+     * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+     * uses a message which allows a list of lists, allowing expressions such as
+     * this one:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (
+     *   (required_one_of_attribute_sets[0][0] AND
+     *   required_one_of_attribute_sets[0][1] AND
+     *   ...)
+     *   OR
+     *   (required_one_of_attribute_sets[1][0] AND
+     *   required_one_of_attribute_sets[1][1] AND
+     *   ...)
+     * )
+     * ```
+     *
+     * Restricts the search to only those vehicles with all the attributes in a
+     * `VehicleAttributeList`. Within each list, a
+     * vehicle must match all of the attributes. This field is a conjunction/AND
+     * operation in each `VehicleAttributeList` and inclusive disjunction/OR
+     * operation across the collection of `VehicleAttributeList`.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attribute_sets = 20; + * + */ + public Builder addRequiredOneOfAttributeSets( + int index, com.google.maps.fleetengine.v1.VehicleAttributeList.Builder builderForValue) { + if (requiredOneOfAttributeSetsBuilder_ == null) { + ensureRequiredOneOfAttributeSetsIsMutable(); + requiredOneOfAttributeSets_.add(index, builderForValue.build()); + onChanged(); + } else { + requiredOneOfAttributeSetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * `required_one_of_attribute_sets` provides additional functionality.
+     *
+     * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+     * uses a message which allows a list of lists, allowing expressions such as
+     * this one:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (
+     *   (required_one_of_attribute_sets[0][0] AND
+     *   required_one_of_attribute_sets[0][1] AND
+     *   ...)
+     *   OR
+     *   (required_one_of_attribute_sets[1][0] AND
+     *   required_one_of_attribute_sets[1][1] AND
+     *   ...)
+     * )
+     * ```
+     *
+     * Restricts the search to only those vehicles with all the attributes in a
+     * `VehicleAttributeList`. Within each list, a
+     * vehicle must match all of the attributes. This field is a conjunction/AND
+     * operation in each `VehicleAttributeList` and inclusive disjunction/OR
+     * operation across the collection of `VehicleAttributeList`.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attribute_sets = 20; + * + */ + public Builder addAllRequiredOneOfAttributeSets( + java.lang.Iterable values) { + if (requiredOneOfAttributeSetsBuilder_ == null) { + ensureRequiredOneOfAttributeSetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, requiredOneOfAttributeSets_); + onChanged(); + } else { + requiredOneOfAttributeSetsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * `required_one_of_attribute_sets` provides additional functionality.
+     *
+     * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+     * uses a message which allows a list of lists, allowing expressions such as
+     * this one:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (
+     *   (required_one_of_attribute_sets[0][0] AND
+     *   required_one_of_attribute_sets[0][1] AND
+     *   ...)
+     *   OR
+     *   (required_one_of_attribute_sets[1][0] AND
+     *   required_one_of_attribute_sets[1][1] AND
+     *   ...)
+     * )
+     * ```
+     *
+     * Restricts the search to only those vehicles with all the attributes in a
+     * `VehicleAttributeList`. Within each list, a
+     * vehicle must match all of the attributes. This field is a conjunction/AND
+     * operation in each `VehicleAttributeList` and inclusive disjunction/OR
+     * operation across the collection of `VehicleAttributeList`.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attribute_sets = 20; + * + */ + public Builder clearRequiredOneOfAttributeSets() { + if (requiredOneOfAttributeSetsBuilder_ == null) { + requiredOneOfAttributeSets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + } else { + requiredOneOfAttributeSetsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * `required_one_of_attribute_sets` provides additional functionality.
+     *
+     * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+     * uses a message which allows a list of lists, allowing expressions such as
+     * this one:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (
+     *   (required_one_of_attribute_sets[0][0] AND
+     *   required_one_of_attribute_sets[0][1] AND
+     *   ...)
+     *   OR
+     *   (required_one_of_attribute_sets[1][0] AND
+     *   required_one_of_attribute_sets[1][1] AND
+     *   ...)
+     * )
+     * ```
+     *
+     * Restricts the search to only those vehicles with all the attributes in a
+     * `VehicleAttributeList`. Within each list, a
+     * vehicle must match all of the attributes. This field is a conjunction/AND
+     * operation in each `VehicleAttributeList` and inclusive disjunction/OR
+     * operation across the collection of `VehicleAttributeList`.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attribute_sets = 20; + * + */ + public Builder removeRequiredOneOfAttributeSets(int index) { + if (requiredOneOfAttributeSetsBuilder_ == null) { + ensureRequiredOneOfAttributeSetsIsMutable(); + requiredOneOfAttributeSets_.remove(index); + onChanged(); + } else { + requiredOneOfAttributeSetsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * `required_one_of_attribute_sets` provides additional functionality.
+     *
+     * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+     * uses a message which allows a list of lists, allowing expressions such as
+     * this one:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (
+     *   (required_one_of_attribute_sets[0][0] AND
+     *   required_one_of_attribute_sets[0][1] AND
+     *   ...)
+     *   OR
+     *   (required_one_of_attribute_sets[1][0] AND
+     *   required_one_of_attribute_sets[1][1] AND
+     *   ...)
+     * )
+     * ```
+     *
+     * Restricts the search to only those vehicles with all the attributes in a
+     * `VehicleAttributeList`. Within each list, a
+     * vehicle must match all of the attributes. This field is a conjunction/AND
+     * operation in each `VehicleAttributeList` and inclusive disjunction/OR
+     * operation across the collection of `VehicleAttributeList`.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attribute_sets = 20; + * + */ + public com.google.maps.fleetengine.v1.VehicleAttributeList.Builder + getRequiredOneOfAttributeSetsBuilder(int index) { + return getRequiredOneOfAttributeSetsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * `required_one_of_attribute_sets` provides additional functionality.
+     *
+     * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+     * uses a message which allows a list of lists, allowing expressions such as
+     * this one:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (
+     *   (required_one_of_attribute_sets[0][0] AND
+     *   required_one_of_attribute_sets[0][1] AND
+     *   ...)
+     *   OR
+     *   (required_one_of_attribute_sets[1][0] AND
+     *   required_one_of_attribute_sets[1][1] AND
+     *   ...)
+     * )
+     * ```
+     *
+     * Restricts the search to only those vehicles with all the attributes in a
+     * `VehicleAttributeList`. Within each list, a
+     * vehicle must match all of the attributes. This field is a conjunction/AND
+     * operation in each `VehicleAttributeList` and inclusive disjunction/OR
+     * operation across the collection of `VehicleAttributeList`.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attribute_sets = 20; + * + */ + public com.google.maps.fleetengine.v1.VehicleAttributeListOrBuilder + getRequiredOneOfAttributeSetsOrBuilder(int index) { + if (requiredOneOfAttributeSetsBuilder_ == null) { + return requiredOneOfAttributeSets_.get(index); + } else { + return requiredOneOfAttributeSetsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * `required_one_of_attribute_sets` provides additional functionality.
+     *
+     * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+     * uses a message which allows a list of lists, allowing expressions such as
+     * this one:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (
+     *   (required_one_of_attribute_sets[0][0] AND
+     *   required_one_of_attribute_sets[0][1] AND
+     *   ...)
+     *   OR
+     *   (required_one_of_attribute_sets[1][0] AND
+     *   required_one_of_attribute_sets[1][1] AND
+     *   ...)
+     * )
+     * ```
+     *
+     * Restricts the search to only those vehicles with all the attributes in a
+     * `VehicleAttributeList`. Within each list, a
+     * vehicle must match all of the attributes. This field is a conjunction/AND
+     * operation in each `VehicleAttributeList` and inclusive disjunction/OR
+     * operation across the collection of `VehicleAttributeList`.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attribute_sets = 20; + * + */ + public java.util.List + getRequiredOneOfAttributeSetsOrBuilderList() { + if (requiredOneOfAttributeSetsBuilder_ != null) { + return requiredOneOfAttributeSetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(requiredOneOfAttributeSets_); + } + } + /** + * + * + *
+     * `required_one_of_attribute_sets` provides additional functionality.
+     *
+     * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+     * uses a message which allows a list of lists, allowing expressions such as
+     * this one:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (
+     *   (required_one_of_attribute_sets[0][0] AND
+     *   required_one_of_attribute_sets[0][1] AND
+     *   ...)
+     *   OR
+     *   (required_one_of_attribute_sets[1][0] AND
+     *   required_one_of_attribute_sets[1][1] AND
+     *   ...)
+     * )
+     * ```
+     *
+     * Restricts the search to only those vehicles with all the attributes in a
+     * `VehicleAttributeList`. Within each list, a
+     * vehicle must match all of the attributes. This field is a conjunction/AND
+     * operation in each `VehicleAttributeList` and inclusive disjunction/OR
+     * operation across the collection of `VehicleAttributeList`.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attribute_sets = 20; + * + */ + public com.google.maps.fleetengine.v1.VehicleAttributeList.Builder + addRequiredOneOfAttributeSetsBuilder() { + return getRequiredOneOfAttributeSetsFieldBuilder() + .addBuilder(com.google.maps.fleetengine.v1.VehicleAttributeList.getDefaultInstance()); + } + /** + * + * + *
+     * `required_one_of_attribute_sets` provides additional functionality.
+     *
+     * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+     * uses a message which allows a list of lists, allowing expressions such as
+     * this one:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (
+     *   (required_one_of_attribute_sets[0][0] AND
+     *   required_one_of_attribute_sets[0][1] AND
+     *   ...)
+     *   OR
+     *   (required_one_of_attribute_sets[1][0] AND
+     *   required_one_of_attribute_sets[1][1] AND
+     *   ...)
+     * )
+     * ```
+     *
+     * Restricts the search to only those vehicles with all the attributes in a
+     * `VehicleAttributeList`. Within each list, a
+     * vehicle must match all of the attributes. This field is a conjunction/AND
+     * operation in each `VehicleAttributeList` and inclusive disjunction/OR
+     * operation across the collection of `VehicleAttributeList`.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attribute_sets = 20; + * + */ + public com.google.maps.fleetengine.v1.VehicleAttributeList.Builder + addRequiredOneOfAttributeSetsBuilder(int index) { + return getRequiredOneOfAttributeSetsFieldBuilder() + .addBuilder( + index, com.google.maps.fleetengine.v1.VehicleAttributeList.getDefaultInstance()); + } + /** + * + * + *
+     * `required_one_of_attribute_sets` provides additional functionality.
+     *
+     * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+     * uses a message which allows a list of lists, allowing expressions such as
+     * this one:
+     *
+     * ```
+     * (required_attributes[0] AND required_attributes[1] AND ...)
+     * AND
+     * (
+     *   (required_one_of_attribute_sets[0][0] AND
+     *   required_one_of_attribute_sets[0][1] AND
+     *   ...)
+     *   OR
+     *   (required_one_of_attribute_sets[1][0] AND
+     *   required_one_of_attribute_sets[1][1] AND
+     *   ...)
+     * )
+     * ```
+     *
+     * Restricts the search to only those vehicles with all the attributes in a
+     * `VehicleAttributeList`. Within each list, a
+     * vehicle must match all of the attributes. This field is a conjunction/AND
+     * operation in each `VehicleAttributeList` and inclusive disjunction/OR
+     * operation across the collection of `VehicleAttributeList`.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attribute_sets = 20; + * + */ + public java.util.List + getRequiredOneOfAttributeSetsBuilderList() { + return getRequiredOneOfAttributeSetsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.VehicleAttributeList, + com.google.maps.fleetengine.v1.VehicleAttributeList.Builder, + com.google.maps.fleetengine.v1.VehicleAttributeListOrBuilder> + getRequiredOneOfAttributeSetsFieldBuilder() { + if (requiredOneOfAttributeSetsBuilder_ == null) { + requiredOneOfAttributeSetsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.VehicleAttributeList, + com.google.maps.fleetengine.v1.VehicleAttributeList.Builder, + com.google.maps.fleetengine.v1.VehicleAttributeListOrBuilder>( + requiredOneOfAttributeSets_, + ((bitField0_ & 0x00001000) != 0), + getParentForChildren(), + isClean()); + requiredOneOfAttributeSets_ = null; + } + return requiredOneOfAttributeSetsBuilder_; + } + + private int orderBy_ = 0; + /** + * + * + *
+     * Required. Specifies the desired ordering criterion for results.
+     * 
+ * + * + * .maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder order_by = 13 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for orderBy. + */ + @java.lang.Override + public int getOrderByValue() { + return orderBy_; + } + /** + * + * + *
+     * Required. Specifies the desired ordering criterion for results.
+     * 
+ * + * + * .maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder order_by = 13 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByValue(int value) { + orderBy_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Specifies the desired ordering criterion for results.
+     * 
+ * + * + * .maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder order_by = 13 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The orderBy. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder getOrderBy() { + com.google.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder result = + com.google.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder.forNumber( + orderBy_); + return result == null + ? com.google.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. Specifies the desired ordering criterion for results.
+     * 
+ * + * + * .maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder order_by = 13 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy( + com.google.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00002000; + orderBy_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Specifies the desired ordering criterion for results.
+     * 
+ * + * + * .maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder order_by = 13 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + bitField0_ = (bitField0_ & ~0x00002000); + orderBy_ = 0; + onChanged(); + return this; + } + + private boolean includeBackToBack_; + /** + * + * + *
+     * This indicates if vehicles with a single active trip are eligible for this
+     * search. This field is only used when `current_trips_present` is
+     * unspecified. When `current_trips_present` is unspecified  and  this field
+     * is `false`, vehicles with assigned trips are excluded from the search
+     * results. When `current_trips_present` is unspecified and this field is
+     * `true`, search results can include vehicles with one active trip that has a
+     * status of `ENROUTE_TO_DROPOFF`. When `current_trips_present` is specified,
+     * this field cannot be set to true.
+     *
+     * The default value is `false`.
+     * 
+ * + * bool include_back_to_back = 18; + * + * @return The includeBackToBack. + */ + @java.lang.Override + public boolean getIncludeBackToBack() { + return includeBackToBack_; + } + /** + * + * + *
+     * This indicates if vehicles with a single active trip are eligible for this
+     * search. This field is only used when `current_trips_present` is
+     * unspecified. When `current_trips_present` is unspecified  and  this field
+     * is `false`, vehicles with assigned trips are excluded from the search
+     * results. When `current_trips_present` is unspecified and this field is
+     * `true`, search results can include vehicles with one active trip that has a
+     * status of `ENROUTE_TO_DROPOFF`. When `current_trips_present` is specified,
+     * this field cannot be set to true.
+     *
+     * The default value is `false`.
+     * 
+ * + * bool include_back_to_back = 18; + * + * @param value The includeBackToBack to set. + * @return This builder for chaining. + */ + public Builder setIncludeBackToBack(boolean value) { + + includeBackToBack_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * This indicates if vehicles with a single active trip are eligible for this
+     * search. This field is only used when `current_trips_present` is
+     * unspecified. When `current_trips_present` is unspecified  and  this field
+     * is `false`, vehicles with assigned trips are excluded from the search
+     * results. When `current_trips_present` is unspecified and this field is
+     * `true`, search results can include vehicles with one active trip that has a
+     * status of `ENROUTE_TO_DROPOFF`. When `current_trips_present` is specified,
+     * this field cannot be set to true.
+     *
+     * The default value is `false`.
+     * 
+ * + * bool include_back_to_back = 18; + * + * @return This builder for chaining. + */ + public Builder clearIncludeBackToBack() { + bitField0_ = (bitField0_ & ~0x00004000); + includeBackToBack_ = false; + onChanged(); + return this; + } + + private java.lang.Object tripId_ = ""; + /** + * + * + *
+     * Indicates the trip associated with this `SearchVehicleRequest`.
+     * 
+ * + * string trip_id = 19; + * + * @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; + } + } + /** + * + * + *
+     * Indicates the trip associated with this `SearchVehicleRequest`.
+     * 
+ * + * string trip_id = 19; + * + * @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; + } + } + /** + * + * + *
+     * Indicates the trip associated with this `SearchVehicleRequest`.
+     * 
+ * + * string trip_id = 19; + * + * @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_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates the trip associated with this `SearchVehicleRequest`.
+     * 
+ * + * string trip_id = 19; + * + * @return This builder for chaining. + */ + public Builder clearTripId() { + tripId_ = getDefaultInstance().getTripId(); + bitField0_ = (bitField0_ & ~0x00008000); + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates the trip associated with this `SearchVehicleRequest`.
+     * 
+ * + * string trip_id = 19; + * + * @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_ |= 0x00008000; + onChanged(); + return this; + } + + private int currentTripsPresent_ = 0; + /** + * + * + *
+     * This indicates if vehicles with active trips are eligible for this search.
+     * This must be set to something other than
+     * `CURRENT_TRIPS_PRESENT_UNSPECIFIED` if `trip_type` includes `SHARED`.
+     * 
+ * + * + * .maps.fleetengine.v1.SearchVehiclesRequest.CurrentTripsPresent current_trips_present = 21; + * + * + * @return The enum numeric value on the wire for currentTripsPresent. + */ + @java.lang.Override + public int getCurrentTripsPresentValue() { + return currentTripsPresent_; + } + /** + * + * + *
+     * This indicates if vehicles with active trips are eligible for this search.
+     * This must be set to something other than
+     * `CURRENT_TRIPS_PRESENT_UNSPECIFIED` if `trip_type` includes `SHARED`.
+     * 
+ * + * + * .maps.fleetengine.v1.SearchVehiclesRequest.CurrentTripsPresent current_trips_present = 21; + * + * + * @param value The enum numeric value on the wire for currentTripsPresent to set. + * @return This builder for chaining. + */ + public Builder setCurrentTripsPresentValue(int value) { + currentTripsPresent_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * This indicates if vehicles with active trips are eligible for this search.
+     * This must be set to something other than
+     * `CURRENT_TRIPS_PRESENT_UNSPECIFIED` if `trip_type` includes `SHARED`.
+     * 
+ * + * + * .maps.fleetengine.v1.SearchVehiclesRequest.CurrentTripsPresent current_trips_present = 21; + * + * + * @return The currentTripsPresent. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.SearchVehiclesRequest.CurrentTripsPresent + getCurrentTripsPresent() { + com.google.maps.fleetengine.v1.SearchVehiclesRequest.CurrentTripsPresent result = + com.google.maps.fleetengine.v1.SearchVehiclesRequest.CurrentTripsPresent.forNumber( + currentTripsPresent_); + return result == null + ? com.google.maps.fleetengine.v1.SearchVehiclesRequest.CurrentTripsPresent.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * This indicates if vehicles with active trips are eligible for this search.
+     * This must be set to something other than
+     * `CURRENT_TRIPS_PRESENT_UNSPECIFIED` if `trip_type` includes `SHARED`.
+     * 
+ * + * + * .maps.fleetengine.v1.SearchVehiclesRequest.CurrentTripsPresent current_trips_present = 21; + * + * + * @param value The currentTripsPresent to set. + * @return This builder for chaining. + */ + public Builder setCurrentTripsPresent( + com.google.maps.fleetengine.v1.SearchVehiclesRequest.CurrentTripsPresent value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00010000; + currentTripsPresent_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * This indicates if vehicles with active trips are eligible for this search.
+     * This must be set to something other than
+     * `CURRENT_TRIPS_PRESENT_UNSPECIFIED` if `trip_type` includes `SHARED`.
+     * 
+ * + * + * .maps.fleetengine.v1.SearchVehiclesRequest.CurrentTripsPresent current_trips_present = 21; + * + * + * @return This builder for chaining. + */ + public Builder clearCurrentTripsPresent() { + bitField0_ = (bitField0_ & ~0x00010000); + currentTripsPresent_ = 0; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. A filter query to apply when searching vehicles. See
+     * http://aip.dev/160 for examples of the filter syntax.
+     *
+     * This field is designed to replace the `required_attributes`,
+     * `required_one_of_attributes`, and `required_one_of_attributes_sets` fields.
+     * If a non-empty value is specified here, the following fields must be empty:
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attributes_sets`.
+     *
+     * This filter functions as an AND clause with other constraints,
+     * such as `minimum_capacity` or `vehicle_types`.
+     *
+     * Note that the only queries supported are on vehicle attributes (for
+     * example, `attributes.<key> = <value>` or `attributes.<key1> = <value1> AND
+     * attributes.<key2> = <value2>`). The maximum number of restrictions allowed
+     * in a filter query is 50.
+     *
+     * Also, all attributes are stored as strings, so the only supported
+     * comparisons against attributes are string comparisons. In order to compare
+     * against number or boolean values, the values must be explicitly quoted to
+     * be treated as strings (for example, `attributes.<key> = "10"` or
+     * `attributes.<key> = "true"`).
+     * 
+ * + * string filter = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A filter query to apply when searching vehicles. See
+     * http://aip.dev/160 for examples of the filter syntax.
+     *
+     * This field is designed to replace the `required_attributes`,
+     * `required_one_of_attributes`, and `required_one_of_attributes_sets` fields.
+     * If a non-empty value is specified here, the following fields must be empty:
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attributes_sets`.
+     *
+     * This filter functions as an AND clause with other constraints,
+     * such as `minimum_capacity` or `vehicle_types`.
+     *
+     * Note that the only queries supported are on vehicle attributes (for
+     * example, `attributes.<key> = <value>` or `attributes.<key1> = <value1> AND
+     * attributes.<key2> = <value2>`). The maximum number of restrictions allowed
+     * in a filter query is 50.
+     *
+     * Also, all attributes are stored as strings, so the only supported
+     * comparisons against attributes are string comparisons. In order to compare
+     * against number or boolean values, the values must be explicitly quoted to
+     * be treated as strings (for example, `attributes.<key> = "10"` or
+     * `attributes.<key> = "true"`).
+     * 
+ * + * string filter = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A filter query to apply when searching vehicles. See
+     * http://aip.dev/160 for examples of the filter syntax.
+     *
+     * This field is designed to replace the `required_attributes`,
+     * `required_one_of_attributes`, and `required_one_of_attributes_sets` fields.
+     * If a non-empty value is specified here, the following fields must be empty:
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attributes_sets`.
+     *
+     * This filter functions as an AND clause with other constraints,
+     * such as `minimum_capacity` or `vehicle_types`.
+     *
+     * Note that the only queries supported are on vehicle attributes (for
+     * example, `attributes.<key> = <value>` or `attributes.<key1> = <value1> AND
+     * attributes.<key2> = <value2>`). The maximum number of restrictions allowed
+     * in a filter query is 50.
+     *
+     * Also, all attributes are stored as strings, so the only supported
+     * comparisons against attributes are string comparisons. In order to compare
+     * against number or boolean values, the values must be explicitly quoted to
+     * be treated as strings (for example, `attributes.<key> = "10"` or
+     * `attributes.<key> = "true"`).
+     * 
+ * + * string filter = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A filter query to apply when searching vehicles. See
+     * http://aip.dev/160 for examples of the filter syntax.
+     *
+     * This field is designed to replace the `required_attributes`,
+     * `required_one_of_attributes`, and `required_one_of_attributes_sets` fields.
+     * If a non-empty value is specified here, the following fields must be empty:
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attributes_sets`.
+     *
+     * This filter functions as an AND clause with other constraints,
+     * such as `minimum_capacity` or `vehicle_types`.
+     *
+     * Note that the only queries supported are on vehicle attributes (for
+     * example, `attributes.<key> = <value>` or `attributes.<key1> = <value1> AND
+     * attributes.<key2> = <value2>`). The maximum number of restrictions allowed
+     * in a filter query is 50.
+     *
+     * Also, all attributes are stored as strings, so the only supported
+     * comparisons against attributes are string comparisons. In order to compare
+     * against number or boolean values, the values must be explicitly quoted to
+     * be treated as strings (for example, `attributes.<key> = "10"` or
+     * `attributes.<key> = "true"`).
+     * 
+ * + * string filter = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00020000); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A filter query to apply when searching vehicles. See
+     * http://aip.dev/160 for examples of the filter syntax.
+     *
+     * This field is designed to replace the `required_attributes`,
+     * `required_one_of_attributes`, and `required_one_of_attributes_sets` fields.
+     * If a non-empty value is specified here, the following fields must be empty:
+     * `required_attributes`, `required_one_of_attributes`, and
+     * `required_one_of_attributes_sets`.
+     *
+     * This filter functions as an AND clause with other constraints,
+     * such as `minimum_capacity` or `vehicle_types`.
+     *
+     * Note that the only queries supported are on vehicle attributes (for
+     * example, `attributes.<key> = <value>` or `attributes.<key1> = <value1> AND
+     * attributes.<key2> = <value2>`). The maximum number of restrictions allowed
+     * in a filter query is 50.
+     *
+     * Also, all attributes are stored as strings, so the only supported
+     * comparisons against attributes are string comparisons. In order to compare
+     * against number or boolean values, the values must be explicitly quoted to
+     * be treated as strings (for example, `attributes.<key> = "10"` or
+     * `attributes.<key> = "true"`).
+     * 
+ * + * string filter = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:maps.fleetengine.v1.SearchVehiclesRequest) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.v1.SearchVehiclesRequest) + private static final com.google.maps.fleetengine.v1.SearchVehiclesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.fleetengine.v1.SearchVehiclesRequest(); + } + + public static com.google.maps.fleetengine.v1.SearchVehiclesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchVehiclesRequest 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.fleetengine.v1.SearchVehiclesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/SearchVehiclesRequestOrBuilder.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/SearchVehiclesRequestOrBuilder.java new file mode 100644 index 000000000000..9fcaf70eec5b --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/SearchVehiclesRequestOrBuilder.java @@ -0,0 +1,1006 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicle_api.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public interface SearchVehiclesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.v1.SearchVehiclesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return Whether the header field is set. + */ + boolean hasHeader(); + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return The header. + */ + com.google.maps.fleetengine.v1.RequestHeader getHeader(); + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder getHeaderOrBuilder(); + + /** + * + * + *
+   * Required. Must be in the format `providers/{provider}`.
+   * The provider must be the Project ID (for example, `sample-cloud-project`)
+   * of the Google Cloud Project of which the service account making
+   * this call is a member.
+   * 
+ * + * string parent = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Must be in the format `providers/{provider}`.
+   * The provider must be the Project ID (for example, `sample-cloud-project`)
+   * of the Google Cloud Project of which the service account making
+   * this call is a member.
+   * 
+ * + * string parent = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The pickup point to search near.
+   * 
+ * + * + * .maps.fleetengine.v1.TerminalLocation pickup_point = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the pickupPoint field is set. + */ + boolean hasPickupPoint(); + /** + * + * + *
+   * Required. The pickup point to search near.
+   * 
+ * + * + * .maps.fleetengine.v1.TerminalLocation pickup_point = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The pickupPoint. + */ + com.google.maps.fleetengine.v1.TerminalLocation getPickupPoint(); + /** + * + * + *
+   * Required. The pickup point to search near.
+   * 
+ * + * + * .maps.fleetengine.v1.TerminalLocation pickup_point = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.maps.fleetengine.v1.TerminalLocationOrBuilder getPickupPointOrBuilder(); + + /** + * + * + *
+   * The customer's intended dropoff location. The field is required if
+   * `trip_types` contains `TripType.SHARED`.
+   * 
+ * + * .maps.fleetengine.v1.TerminalLocation dropoff_point = 5; + * + * @return Whether the dropoffPoint field is set. + */ + boolean hasDropoffPoint(); + /** + * + * + *
+   * The customer's intended dropoff location. The field is required if
+   * `trip_types` contains `TripType.SHARED`.
+   * 
+ * + * .maps.fleetengine.v1.TerminalLocation dropoff_point = 5; + * + * @return The dropoffPoint. + */ + com.google.maps.fleetengine.v1.TerminalLocation getDropoffPoint(); + /** + * + * + *
+   * The customer's intended dropoff location. The field is required if
+   * `trip_types` contains `TripType.SHARED`.
+   * 
+ * + * .maps.fleetengine.v1.TerminalLocation dropoff_point = 5; + */ + com.google.maps.fleetengine.v1.TerminalLocationOrBuilder getDropoffPointOrBuilder(); + + /** + * + * + *
+   * Required. Defines the vehicle search radius around the pickup point. Only
+   * vehicles within the search radius will be returned. Value must be between
+   * 400 and 10000 meters (inclusive).
+   * 
+ * + * int32 pickup_radius_meters = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The pickupRadiusMeters. + */ + int getPickupRadiusMeters(); + + /** + * + * + *
+   * Required. Specifies the maximum number of vehicles to return. The value
+   * must be between 1 and 50 (inclusive).
+   * 
+ * + * int32 count = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count. + */ + int getCount(); + + /** + * + * + *
+   * Required. Specifies the number of passengers being considered for a trip.
+   * The value must be greater than or equal to one. The driver is not
+   * considered in the capacity value.
+   * 
+ * + * int32 minimum_capacity = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The minimumCapacity. + */ + int getMinimumCapacity(); + + /** + * + * + *
+   * Required. Represents the type of proposed trip. Must include exactly one
+   * type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only
+   * those vehicles that can support that trip type.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.TripType trip_types = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the tripTypes. + */ + java.util.List getTripTypesList(); + /** + * + * + *
+   * Required. Represents the type of proposed trip. Must include exactly one
+   * type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only
+   * those vehicles that can support that trip type.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.TripType trip_types = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of tripTypes. + */ + int getTripTypesCount(); + /** + * + * + *
+   * Required. Represents the type of proposed trip. Must include exactly one
+   * type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only
+   * those vehicles that can support that trip type.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.TripType trip_types = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The tripTypes at the given index. + */ + com.google.maps.fleetengine.v1.TripType getTripTypes(int index); + /** + * + * + *
+   * Required. Represents the type of proposed trip. Must include exactly one
+   * type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only
+   * those vehicles that can support that trip type.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.TripType trip_types = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the enum numeric values on the wire for tripTypes. + */ + java.util.List getTripTypesValueList(); + /** + * + * + *
+   * Required. Represents the type of proposed trip. Must include exactly one
+   * type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only
+   * those vehicles that can support that trip type.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.TripType trip_types = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of tripTypes at the given index. + */ + int getTripTypesValue(int index); + + /** + * + * + *
+   * Restricts the search to only those vehicles that have sent location updates
+   * to Fleet Engine within the specified duration. Stationary vehicles still
+   * transmitting their locations are not considered stale. If this field is not
+   * set, the server uses five minutes as the default value.
+   * 
+ * + * .google.protobuf.Duration maximum_staleness = 10; + * + * @return Whether the maximumStaleness field is set. + */ + boolean hasMaximumStaleness(); + /** + * + * + *
+   * Restricts the search to only those vehicles that have sent location updates
+   * to Fleet Engine within the specified duration. Stationary vehicles still
+   * transmitting their locations are not considered stale. If this field is not
+   * set, the server uses five minutes as the default value.
+   * 
+ * + * .google.protobuf.Duration maximum_staleness = 10; + * + * @return The maximumStaleness. + */ + com.google.protobuf.Duration getMaximumStaleness(); + /** + * + * + *
+   * Restricts the search to only those vehicles that have sent location updates
+   * to Fleet Engine within the specified duration. Stationary vehicles still
+   * transmitting their locations are not considered stale. If this field is not
+   * set, the server uses five minutes as the default value.
+   * 
+ * + * .google.protobuf.Duration maximum_staleness = 10; + */ + com.google.protobuf.DurationOrBuilder getMaximumStalenessOrBuilder(); + + /** + * + * + *
+   * Required. Restricts the search to vehicles with one of the specified types.
+   * At least one vehicle type must be specified. VehicleTypes with a category
+   * of `UNKNOWN` are not allowed.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType vehicle_types = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getVehicleTypesList(); + /** + * + * + *
+   * Required. Restricts the search to vehicles with one of the specified types.
+   * At least one vehicle type must be specified. VehicleTypes with a category
+   * of `UNKNOWN` are not allowed.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType vehicle_types = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.maps.fleetengine.v1.Vehicle.VehicleType getVehicleTypes(int index); + /** + * + * + *
+   * Required. Restricts the search to vehicles with one of the specified types.
+   * At least one vehicle type must be specified. VehicleTypes with a category
+   * of `UNKNOWN` are not allowed.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType vehicle_types = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getVehicleTypesCount(); + /** + * + * + *
+   * Required. Restricts the search to vehicles with one of the specified types.
+   * At least one vehicle type must be specified. VehicleTypes with a category
+   * of `UNKNOWN` are not allowed.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType vehicle_types = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getVehicleTypesOrBuilderList(); + /** + * + * + *
+   * Required. Restricts the search to vehicles with one of the specified types.
+   * At least one vehicle type must be specified. VehicleTypes with a category
+   * of `UNKNOWN` are not allowed.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.Vehicle.VehicleType vehicle_types = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.maps.fleetengine.v1.Vehicle.VehicleTypeOrBuilder getVehicleTypesOrBuilder(int index); + + /** + * + * + *
+   * Callers can form complex logical operations using any combination of the
+   * `required_attributes`, `required_one_of_attributes`, and
+   * `required_one_of_attribute_sets` fields.
+   *
+   * `required_attributes` is a list; `required_one_of_attributes` uses a
+   * message which allows a list of lists. In combination, the two fields allow
+   * the composition of this expression:
+   *
+   * ```
+   * (required_attributes[0] AND required_attributes[1] AND ...)
+   * AND
+   * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+   * ...)
+   * AND
+   * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+   * ...)
+   * ```
+   *
+   * Restricts the search to only those vehicles with the specified attributes.
+   * This field is a conjunction/AND operation. A max of 50 required_attributes
+   * is allowed. This matches the maximum number of attributes allowed on a
+   * vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute required_attributes = 12; + */ + java.util.List getRequiredAttributesList(); + /** + * + * + *
+   * Callers can form complex logical operations using any combination of the
+   * `required_attributes`, `required_one_of_attributes`, and
+   * `required_one_of_attribute_sets` fields.
+   *
+   * `required_attributes` is a list; `required_one_of_attributes` uses a
+   * message which allows a list of lists. In combination, the two fields allow
+   * the composition of this expression:
+   *
+   * ```
+   * (required_attributes[0] AND required_attributes[1] AND ...)
+   * AND
+   * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+   * ...)
+   * AND
+   * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+   * ...)
+   * ```
+   *
+   * Restricts the search to only those vehicles with the specified attributes.
+   * This field is a conjunction/AND operation. A max of 50 required_attributes
+   * is allowed. This matches the maximum number of attributes allowed on a
+   * vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute required_attributes = 12; + */ + com.google.maps.fleetengine.v1.VehicleAttribute getRequiredAttributes(int index); + /** + * + * + *
+   * Callers can form complex logical operations using any combination of the
+   * `required_attributes`, `required_one_of_attributes`, and
+   * `required_one_of_attribute_sets` fields.
+   *
+   * `required_attributes` is a list; `required_one_of_attributes` uses a
+   * message which allows a list of lists. In combination, the two fields allow
+   * the composition of this expression:
+   *
+   * ```
+   * (required_attributes[0] AND required_attributes[1] AND ...)
+   * AND
+   * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+   * ...)
+   * AND
+   * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+   * ...)
+   * ```
+   *
+   * Restricts the search to only those vehicles with the specified attributes.
+   * This field is a conjunction/AND operation. A max of 50 required_attributes
+   * is allowed. This matches the maximum number of attributes allowed on a
+   * vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute required_attributes = 12; + */ + int getRequiredAttributesCount(); + /** + * + * + *
+   * Callers can form complex logical operations using any combination of the
+   * `required_attributes`, `required_one_of_attributes`, and
+   * `required_one_of_attribute_sets` fields.
+   *
+   * `required_attributes` is a list; `required_one_of_attributes` uses a
+   * message which allows a list of lists. In combination, the two fields allow
+   * the composition of this expression:
+   *
+   * ```
+   * (required_attributes[0] AND required_attributes[1] AND ...)
+   * AND
+   * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+   * ...)
+   * AND
+   * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+   * ...)
+   * ```
+   *
+   * Restricts the search to only those vehicles with the specified attributes.
+   * This field is a conjunction/AND operation. A max of 50 required_attributes
+   * is allowed. This matches the maximum number of attributes allowed on a
+   * vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute required_attributes = 12; + */ + java.util.List + getRequiredAttributesOrBuilderList(); + /** + * + * + *
+   * Callers can form complex logical operations using any combination of the
+   * `required_attributes`, `required_one_of_attributes`, and
+   * `required_one_of_attribute_sets` fields.
+   *
+   * `required_attributes` is a list; `required_one_of_attributes` uses a
+   * message which allows a list of lists. In combination, the two fields allow
+   * the composition of this expression:
+   *
+   * ```
+   * (required_attributes[0] AND required_attributes[1] AND ...)
+   * AND
+   * (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
+   * ...)
+   * AND
+   * (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
+   * ...)
+   * ```
+   *
+   * Restricts the search to only those vehicles with the specified attributes.
+   * This field is a conjunction/AND operation. A max of 50 required_attributes
+   * is allowed. This matches the maximum number of attributes allowed on a
+   * vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute required_attributes = 12; + */ + com.google.maps.fleetengine.v1.VehicleAttributeOrBuilder getRequiredAttributesOrBuilder( + int index); + + /** + * + * + *
+   * Restricts the search to only those vehicles with at least one of
+   * the specified attributes in each `VehicleAttributeList`. Within each
+   * list, a vehicle must match at least one of the attributes. This field is an
+   * inclusive disjunction/OR operation in each `VehicleAttributeList` and a
+   * conjunction/AND operation across the collection of `VehicleAttributeList`.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attributes = 15; + * + */ + java.util.List + getRequiredOneOfAttributesList(); + /** + * + * + *
+   * Restricts the search to only those vehicles with at least one of
+   * the specified attributes in each `VehicleAttributeList`. Within each
+   * list, a vehicle must match at least one of the attributes. This field is an
+   * inclusive disjunction/OR operation in each `VehicleAttributeList` and a
+   * conjunction/AND operation across the collection of `VehicleAttributeList`.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attributes = 15; + * + */ + com.google.maps.fleetengine.v1.VehicleAttributeList getRequiredOneOfAttributes(int index); + /** + * + * + *
+   * Restricts the search to only those vehicles with at least one of
+   * the specified attributes in each `VehicleAttributeList`. Within each
+   * list, a vehicle must match at least one of the attributes. This field is an
+   * inclusive disjunction/OR operation in each `VehicleAttributeList` and a
+   * conjunction/AND operation across the collection of `VehicleAttributeList`.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attributes = 15; + * + */ + int getRequiredOneOfAttributesCount(); + /** + * + * + *
+   * Restricts the search to only those vehicles with at least one of
+   * the specified attributes in each `VehicleAttributeList`. Within each
+   * list, a vehicle must match at least one of the attributes. This field is an
+   * inclusive disjunction/OR operation in each `VehicleAttributeList` and a
+   * conjunction/AND operation across the collection of `VehicleAttributeList`.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attributes = 15; + * + */ + java.util.List + getRequiredOneOfAttributesOrBuilderList(); + /** + * + * + *
+   * Restricts the search to only those vehicles with at least one of
+   * the specified attributes in each `VehicleAttributeList`. Within each
+   * list, a vehicle must match at least one of the attributes. This field is an
+   * inclusive disjunction/OR operation in each `VehicleAttributeList` and a
+   * conjunction/AND operation across the collection of `VehicleAttributeList`.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attributes = 15; + * + */ + com.google.maps.fleetengine.v1.VehicleAttributeListOrBuilder getRequiredOneOfAttributesOrBuilder( + int index); + + /** + * + * + *
+   * `required_one_of_attribute_sets` provides additional functionality.
+   *
+   * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+   * uses a message which allows a list of lists, allowing expressions such as
+   * this one:
+   *
+   * ```
+   * (required_attributes[0] AND required_attributes[1] AND ...)
+   * AND
+   * (
+   *   (required_one_of_attribute_sets[0][0] AND
+   *   required_one_of_attribute_sets[0][1] AND
+   *   ...)
+   *   OR
+   *   (required_one_of_attribute_sets[1][0] AND
+   *   required_one_of_attribute_sets[1][1] AND
+   *   ...)
+   * )
+   * ```
+   *
+   * Restricts the search to only those vehicles with all the attributes in a
+   * `VehicleAttributeList`. Within each list, a
+   * vehicle must match all of the attributes. This field is a conjunction/AND
+   * operation in each `VehicleAttributeList` and inclusive disjunction/OR
+   * operation across the collection of `VehicleAttributeList`.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attribute_sets = 20; + * + */ + java.util.List + getRequiredOneOfAttributeSetsList(); + /** + * + * + *
+   * `required_one_of_attribute_sets` provides additional functionality.
+   *
+   * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+   * uses a message which allows a list of lists, allowing expressions such as
+   * this one:
+   *
+   * ```
+   * (required_attributes[0] AND required_attributes[1] AND ...)
+   * AND
+   * (
+   *   (required_one_of_attribute_sets[0][0] AND
+   *   required_one_of_attribute_sets[0][1] AND
+   *   ...)
+   *   OR
+   *   (required_one_of_attribute_sets[1][0] AND
+   *   required_one_of_attribute_sets[1][1] AND
+   *   ...)
+   * )
+   * ```
+   *
+   * Restricts the search to only those vehicles with all the attributes in a
+   * `VehicleAttributeList`. Within each list, a
+   * vehicle must match all of the attributes. This field is a conjunction/AND
+   * operation in each `VehicleAttributeList` and inclusive disjunction/OR
+   * operation across the collection of `VehicleAttributeList`.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attribute_sets = 20; + * + */ + com.google.maps.fleetengine.v1.VehicleAttributeList getRequiredOneOfAttributeSets(int index); + /** + * + * + *
+   * `required_one_of_attribute_sets` provides additional functionality.
+   *
+   * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+   * uses a message which allows a list of lists, allowing expressions such as
+   * this one:
+   *
+   * ```
+   * (required_attributes[0] AND required_attributes[1] AND ...)
+   * AND
+   * (
+   *   (required_one_of_attribute_sets[0][0] AND
+   *   required_one_of_attribute_sets[0][1] AND
+   *   ...)
+   *   OR
+   *   (required_one_of_attribute_sets[1][0] AND
+   *   required_one_of_attribute_sets[1][1] AND
+   *   ...)
+   * )
+   * ```
+   *
+   * Restricts the search to only those vehicles with all the attributes in a
+   * `VehicleAttributeList`. Within each list, a
+   * vehicle must match all of the attributes. This field is a conjunction/AND
+   * operation in each `VehicleAttributeList` and inclusive disjunction/OR
+   * operation across the collection of `VehicleAttributeList`.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attribute_sets = 20; + * + */ + int getRequiredOneOfAttributeSetsCount(); + /** + * + * + *
+   * `required_one_of_attribute_sets` provides additional functionality.
+   *
+   * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+   * uses a message which allows a list of lists, allowing expressions such as
+   * this one:
+   *
+   * ```
+   * (required_attributes[0] AND required_attributes[1] AND ...)
+   * AND
+   * (
+   *   (required_one_of_attribute_sets[0][0] AND
+   *   required_one_of_attribute_sets[0][1] AND
+   *   ...)
+   *   OR
+   *   (required_one_of_attribute_sets[1][0] AND
+   *   required_one_of_attribute_sets[1][1] AND
+   *   ...)
+   * )
+   * ```
+   *
+   * Restricts the search to only those vehicles with all the attributes in a
+   * `VehicleAttributeList`. Within each list, a
+   * vehicle must match all of the attributes. This field is a conjunction/AND
+   * operation in each `VehicleAttributeList` and inclusive disjunction/OR
+   * operation across the collection of `VehicleAttributeList`.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attribute_sets = 20; + * + */ + java.util.List + getRequiredOneOfAttributeSetsOrBuilderList(); + /** + * + * + *
+   * `required_one_of_attribute_sets` provides additional functionality.
+   *
+   * Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
+   * uses a message which allows a list of lists, allowing expressions such as
+   * this one:
+   *
+   * ```
+   * (required_attributes[0] AND required_attributes[1] AND ...)
+   * AND
+   * (
+   *   (required_one_of_attribute_sets[0][0] AND
+   *   required_one_of_attribute_sets[0][1] AND
+   *   ...)
+   *   OR
+   *   (required_one_of_attribute_sets[1][0] AND
+   *   required_one_of_attribute_sets[1][1] AND
+   *   ...)
+   * )
+   * ```
+   *
+   * Restricts the search to only those vehicles with all the attributes in a
+   * `VehicleAttributeList`. Within each list, a
+   * vehicle must match all of the attributes. This field is a conjunction/AND
+   * operation in each `VehicleAttributeList` and inclusive disjunction/OR
+   * operation across the collection of `VehicleAttributeList`.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttributeList required_one_of_attribute_sets = 20; + * + */ + com.google.maps.fleetengine.v1.VehicleAttributeListOrBuilder + getRequiredOneOfAttributeSetsOrBuilder(int index); + + /** + * + * + *
+   * Required. Specifies the desired ordering criterion for results.
+   * 
+ * + * + * .maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder order_by = 13 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for orderBy. + */ + int getOrderByValue(); + /** + * + * + *
+   * Required. Specifies the desired ordering criterion for results.
+   * 
+ * + * + * .maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder order_by = 13 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The orderBy. + */ + com.google.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder getOrderBy(); + + /** + * + * + *
+   * This indicates if vehicles with a single active trip are eligible for this
+   * search. This field is only used when `current_trips_present` is
+   * unspecified. When `current_trips_present` is unspecified  and  this field
+   * is `false`, vehicles with assigned trips are excluded from the search
+   * results. When `current_trips_present` is unspecified and this field is
+   * `true`, search results can include vehicles with one active trip that has a
+   * status of `ENROUTE_TO_DROPOFF`. When `current_trips_present` is specified,
+   * this field cannot be set to true.
+   *
+   * The default value is `false`.
+   * 
+ * + * bool include_back_to_back = 18; + * + * @return The includeBackToBack. + */ + boolean getIncludeBackToBack(); + + /** + * + * + *
+   * Indicates the trip associated with this `SearchVehicleRequest`.
+   * 
+ * + * string trip_id = 19; + * + * @return The tripId. + */ + java.lang.String getTripId(); + /** + * + * + *
+   * Indicates the trip associated with this `SearchVehicleRequest`.
+   * 
+ * + * string trip_id = 19; + * + * @return The bytes for tripId. + */ + com.google.protobuf.ByteString getTripIdBytes(); + + /** + * + * + *
+   * This indicates if vehicles with active trips are eligible for this search.
+   * This must be set to something other than
+   * `CURRENT_TRIPS_PRESENT_UNSPECIFIED` if `trip_type` includes `SHARED`.
+   * 
+ * + * + * .maps.fleetengine.v1.SearchVehiclesRequest.CurrentTripsPresent current_trips_present = 21; + * + * + * @return The enum numeric value on the wire for currentTripsPresent. + */ + int getCurrentTripsPresentValue(); + /** + * + * + *
+   * This indicates if vehicles with active trips are eligible for this search.
+   * This must be set to something other than
+   * `CURRENT_TRIPS_PRESENT_UNSPECIFIED` if `trip_type` includes `SHARED`.
+   * 
+ * + * + * .maps.fleetengine.v1.SearchVehiclesRequest.CurrentTripsPresent current_trips_present = 21; + * + * + * @return The currentTripsPresent. + */ + com.google.maps.fleetengine.v1.SearchVehiclesRequest.CurrentTripsPresent getCurrentTripsPresent(); + + /** + * + * + *
+   * Optional. A filter query to apply when searching vehicles. See
+   * http://aip.dev/160 for examples of the filter syntax.
+   *
+   * This field is designed to replace the `required_attributes`,
+   * `required_one_of_attributes`, and `required_one_of_attributes_sets` fields.
+   * If a non-empty value is specified here, the following fields must be empty:
+   * `required_attributes`, `required_one_of_attributes`, and
+   * `required_one_of_attributes_sets`.
+   *
+   * This filter functions as an AND clause with other constraints,
+   * such as `minimum_capacity` or `vehicle_types`.
+   *
+   * Note that the only queries supported are on vehicle attributes (for
+   * example, `attributes.<key> = <value>` or `attributes.<key1> = <value1> AND
+   * attributes.<key2> = <value2>`). The maximum number of restrictions allowed
+   * in a filter query is 50.
+   *
+   * Also, all attributes are stored as strings, so the only supported
+   * comparisons against attributes are string comparisons. In order to compare
+   * against number or boolean values, the values must be explicitly quoted to
+   * be treated as strings (for example, `attributes.<key> = "10"` or
+   * `attributes.<key> = "true"`).
+   * 
+ * + * string filter = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. A filter query to apply when searching vehicles. See
+   * http://aip.dev/160 for examples of the filter syntax.
+   *
+   * This field is designed to replace the `required_attributes`,
+   * `required_one_of_attributes`, and `required_one_of_attributes_sets` fields.
+   * If a non-empty value is specified here, the following fields must be empty:
+   * `required_attributes`, `required_one_of_attributes`, and
+   * `required_one_of_attributes_sets`.
+   *
+   * This filter functions as an AND clause with other constraints,
+   * such as `minimum_capacity` or `vehicle_types`.
+   *
+   * Note that the only queries supported are on vehicle attributes (for
+   * example, `attributes.<key> = <value>` or `attributes.<key1> = <value1> AND
+   * attributes.<key2> = <value2>`). The maximum number of restrictions allowed
+   * in a filter query is 50.
+   *
+   * Also, all attributes are stored as strings, so the only supported
+   * comparisons against attributes are string comparisons. In order to compare
+   * against number or boolean values, the values must be explicitly quoted to
+   * be treated as strings (for example, `attributes.<key> = "10"` or
+   * `attributes.<key> = "true"`).
+   * 
+ * + * string filter = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/SearchVehiclesResponse.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/SearchVehiclesResponse.java new file mode 100644 index 000000000000..c74196582467 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/SearchVehiclesResponse.java @@ -0,0 +1,960 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicle_api.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * `SearchVehicles` response message.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.v1.SearchVehiclesResponse} + */ +public final class SearchVehiclesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.v1.SearchVehiclesResponse) + SearchVehiclesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchVehiclesResponse.newBuilder() to construct. + private SearchVehiclesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchVehiclesResponse() { + matches_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchVehiclesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_SearchVehiclesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_SearchVehiclesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.SearchVehiclesResponse.class, + com.google.maps.fleetengine.v1.SearchVehiclesResponse.Builder.class); + } + + public static final int MATCHES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List matches_; + /** + * + * + *
+   * List of vehicles that match the `SearchVehiclesRequest` criteria, ordered
+   * according to `SearchVehiclesRequest.order_by` field.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleMatch matches = 1; + */ + @java.lang.Override + public java.util.List getMatchesList() { + return matches_; + } + /** + * + * + *
+   * List of vehicles that match the `SearchVehiclesRequest` criteria, ordered
+   * according to `SearchVehiclesRequest.order_by` field.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleMatch matches = 1; + */ + @java.lang.Override + public java.util.List + getMatchesOrBuilderList() { + return matches_; + } + /** + * + * + *
+   * List of vehicles that match the `SearchVehiclesRequest` criteria, ordered
+   * according to `SearchVehiclesRequest.order_by` field.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleMatch matches = 1; + */ + @java.lang.Override + public int getMatchesCount() { + return matches_.size(); + } + /** + * + * + *
+   * List of vehicles that match the `SearchVehiclesRequest` criteria, ordered
+   * according to `SearchVehiclesRequest.order_by` field.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleMatch matches = 1; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleMatch getMatches(int index) { + return matches_.get(index); + } + /** + * + * + *
+   * List of vehicles that match the `SearchVehiclesRequest` criteria, ordered
+   * according to `SearchVehiclesRequest.order_by` field.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleMatch matches = 1; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleMatchOrBuilder getMatchesOrBuilder(int index) { + return matches_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < matches_.size(); i++) { + output.writeMessage(1, matches_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < matches_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, matches_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.maps.fleetengine.v1.SearchVehiclesResponse)) { + return super.equals(obj); + } + com.google.maps.fleetengine.v1.SearchVehiclesResponse other = + (com.google.maps.fleetengine.v1.SearchVehiclesResponse) obj; + + if (!getMatchesList().equals(other.getMatchesList())) 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 (getMatchesCount() > 0) { + hash = (37 * hash) + MATCHES_FIELD_NUMBER; + hash = (53 * hash) + getMatchesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.fleetengine.v1.SearchVehiclesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.SearchVehiclesResponse 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.fleetengine.v1.SearchVehiclesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.SearchVehiclesResponse 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.fleetengine.v1.SearchVehiclesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.SearchVehiclesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.SearchVehiclesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.SearchVehiclesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.SearchVehiclesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.SearchVehiclesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.SearchVehiclesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.SearchVehiclesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.maps.fleetengine.v1.SearchVehiclesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * `SearchVehicles` response message.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.v1.SearchVehiclesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.v1.SearchVehiclesResponse) + com.google.maps.fleetengine.v1.SearchVehiclesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_SearchVehiclesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_SearchVehiclesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.SearchVehiclesResponse.class, + com.google.maps.fleetengine.v1.SearchVehiclesResponse.Builder.class); + } + + // Construct using com.google.maps.fleetengine.v1.SearchVehiclesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (matchesBuilder_ == null) { + matches_ = java.util.Collections.emptyList(); + } else { + matches_ = null; + matchesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_SearchVehiclesResponse_descriptor; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.SearchVehiclesResponse getDefaultInstanceForType() { + return com.google.maps.fleetengine.v1.SearchVehiclesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.SearchVehiclesResponse build() { + com.google.maps.fleetengine.v1.SearchVehiclesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.SearchVehiclesResponse buildPartial() { + com.google.maps.fleetengine.v1.SearchVehiclesResponse result = + new com.google.maps.fleetengine.v1.SearchVehiclesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.maps.fleetengine.v1.SearchVehiclesResponse result) { + if (matchesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + matches_ = java.util.Collections.unmodifiableList(matches_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.matches_ = matches_; + } else { + result.matches_ = matchesBuilder_.build(); + } + } + + private void buildPartial0(com.google.maps.fleetengine.v1.SearchVehiclesResponse result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.fleetengine.v1.SearchVehiclesResponse) { + return mergeFrom((com.google.maps.fleetengine.v1.SearchVehiclesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.fleetengine.v1.SearchVehiclesResponse other) { + if (other == com.google.maps.fleetengine.v1.SearchVehiclesResponse.getDefaultInstance()) + return this; + if (matchesBuilder_ == null) { + if (!other.matches_.isEmpty()) { + if (matches_.isEmpty()) { + matches_ = other.matches_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMatchesIsMutable(); + matches_.addAll(other.matches_); + } + onChanged(); + } + } else { + if (!other.matches_.isEmpty()) { + if (matchesBuilder_.isEmpty()) { + matchesBuilder_.dispose(); + matchesBuilder_ = null; + matches_ = other.matches_; + bitField0_ = (bitField0_ & ~0x00000001); + matchesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMatchesFieldBuilder() + : null; + } else { + matchesBuilder_.addAllMessages(other.matches_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.maps.fleetengine.v1.VehicleMatch m = + input.readMessage( + com.google.maps.fleetengine.v1.VehicleMatch.parser(), extensionRegistry); + if (matchesBuilder_ == null) { + ensureMatchesIsMutable(); + matches_.add(m); + } else { + matchesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List matches_ = + java.util.Collections.emptyList(); + + private void ensureMatchesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + matches_ = new java.util.ArrayList(matches_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.VehicleMatch, + com.google.maps.fleetengine.v1.VehicleMatch.Builder, + com.google.maps.fleetengine.v1.VehicleMatchOrBuilder> + matchesBuilder_; + + /** + * + * + *
+     * List of vehicles that match the `SearchVehiclesRequest` criteria, ordered
+     * according to `SearchVehiclesRequest.order_by` field.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleMatch matches = 1; + */ + public java.util.List getMatchesList() { + if (matchesBuilder_ == null) { + return java.util.Collections.unmodifiableList(matches_); + } else { + return matchesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of vehicles that match the `SearchVehiclesRequest` criteria, ordered
+     * according to `SearchVehiclesRequest.order_by` field.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleMatch matches = 1; + */ + public int getMatchesCount() { + if (matchesBuilder_ == null) { + return matches_.size(); + } else { + return matchesBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of vehicles that match the `SearchVehiclesRequest` criteria, ordered
+     * according to `SearchVehiclesRequest.order_by` field.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleMatch matches = 1; + */ + public com.google.maps.fleetengine.v1.VehicleMatch getMatches(int index) { + if (matchesBuilder_ == null) { + return matches_.get(index); + } else { + return matchesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of vehicles that match the `SearchVehiclesRequest` criteria, ordered
+     * according to `SearchVehiclesRequest.order_by` field.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleMatch matches = 1; + */ + public Builder setMatches(int index, com.google.maps.fleetengine.v1.VehicleMatch value) { + if (matchesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMatchesIsMutable(); + matches_.set(index, value); + onChanged(); + } else { + matchesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of vehicles that match the `SearchVehiclesRequest` criteria, ordered
+     * according to `SearchVehiclesRequest.order_by` field.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleMatch matches = 1; + */ + public Builder setMatches( + int index, com.google.maps.fleetengine.v1.VehicleMatch.Builder builderForValue) { + if (matchesBuilder_ == null) { + ensureMatchesIsMutable(); + matches_.set(index, builderForValue.build()); + onChanged(); + } else { + matchesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of vehicles that match the `SearchVehiclesRequest` criteria, ordered
+     * according to `SearchVehiclesRequest.order_by` field.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleMatch matches = 1; + */ + public Builder addMatches(com.google.maps.fleetengine.v1.VehicleMatch value) { + if (matchesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMatchesIsMutable(); + matches_.add(value); + onChanged(); + } else { + matchesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of vehicles that match the `SearchVehiclesRequest` criteria, ordered
+     * according to `SearchVehiclesRequest.order_by` field.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleMatch matches = 1; + */ + public Builder addMatches(int index, com.google.maps.fleetengine.v1.VehicleMatch value) { + if (matchesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMatchesIsMutable(); + matches_.add(index, value); + onChanged(); + } else { + matchesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of vehicles that match the `SearchVehiclesRequest` criteria, ordered
+     * according to `SearchVehiclesRequest.order_by` field.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleMatch matches = 1; + */ + public Builder addMatches(com.google.maps.fleetengine.v1.VehicleMatch.Builder builderForValue) { + if (matchesBuilder_ == null) { + ensureMatchesIsMutable(); + matches_.add(builderForValue.build()); + onChanged(); + } else { + matchesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of vehicles that match the `SearchVehiclesRequest` criteria, ordered
+     * according to `SearchVehiclesRequest.order_by` field.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleMatch matches = 1; + */ + public Builder addMatches( + int index, com.google.maps.fleetengine.v1.VehicleMatch.Builder builderForValue) { + if (matchesBuilder_ == null) { + ensureMatchesIsMutable(); + matches_.add(index, builderForValue.build()); + onChanged(); + } else { + matchesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of vehicles that match the `SearchVehiclesRequest` criteria, ordered
+     * according to `SearchVehiclesRequest.order_by` field.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleMatch matches = 1; + */ + public Builder addAllMatches( + java.lang.Iterable values) { + if (matchesBuilder_ == null) { + ensureMatchesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, matches_); + onChanged(); + } else { + matchesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of vehicles that match the `SearchVehiclesRequest` criteria, ordered
+     * according to `SearchVehiclesRequest.order_by` field.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleMatch matches = 1; + */ + public Builder clearMatches() { + if (matchesBuilder_ == null) { + matches_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + matchesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of vehicles that match the `SearchVehiclesRequest` criteria, ordered
+     * according to `SearchVehiclesRequest.order_by` field.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleMatch matches = 1; + */ + public Builder removeMatches(int index) { + if (matchesBuilder_ == null) { + ensureMatchesIsMutable(); + matches_.remove(index); + onChanged(); + } else { + matchesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of vehicles that match the `SearchVehiclesRequest` criteria, ordered
+     * according to `SearchVehiclesRequest.order_by` field.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleMatch matches = 1; + */ + public com.google.maps.fleetengine.v1.VehicleMatch.Builder getMatchesBuilder(int index) { + return getMatchesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of vehicles that match the `SearchVehiclesRequest` criteria, ordered
+     * according to `SearchVehiclesRequest.order_by` field.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleMatch matches = 1; + */ + public com.google.maps.fleetengine.v1.VehicleMatchOrBuilder getMatchesOrBuilder(int index) { + if (matchesBuilder_ == null) { + return matches_.get(index); + } else { + return matchesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of vehicles that match the `SearchVehiclesRequest` criteria, ordered
+     * according to `SearchVehiclesRequest.order_by` field.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleMatch matches = 1; + */ + public java.util.List + getMatchesOrBuilderList() { + if (matchesBuilder_ != null) { + return matchesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(matches_); + } + } + /** + * + * + *
+     * List of vehicles that match the `SearchVehiclesRequest` criteria, ordered
+     * according to `SearchVehiclesRequest.order_by` field.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleMatch matches = 1; + */ + public com.google.maps.fleetengine.v1.VehicleMatch.Builder addMatchesBuilder() { + return getMatchesFieldBuilder() + .addBuilder(com.google.maps.fleetengine.v1.VehicleMatch.getDefaultInstance()); + } + /** + * + * + *
+     * List of vehicles that match the `SearchVehiclesRequest` criteria, ordered
+     * according to `SearchVehiclesRequest.order_by` field.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleMatch matches = 1; + */ + public com.google.maps.fleetengine.v1.VehicleMatch.Builder addMatchesBuilder(int index) { + return getMatchesFieldBuilder() + .addBuilder(index, com.google.maps.fleetengine.v1.VehicleMatch.getDefaultInstance()); + } + /** + * + * + *
+     * List of vehicles that match the `SearchVehiclesRequest` criteria, ordered
+     * according to `SearchVehiclesRequest.order_by` field.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleMatch matches = 1; + */ + public java.util.List + getMatchesBuilderList() { + return getMatchesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.VehicleMatch, + com.google.maps.fleetengine.v1.VehicleMatch.Builder, + com.google.maps.fleetengine.v1.VehicleMatchOrBuilder> + getMatchesFieldBuilder() { + if (matchesBuilder_ == null) { + matchesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.VehicleMatch, + com.google.maps.fleetengine.v1.VehicleMatch.Builder, + com.google.maps.fleetengine.v1.VehicleMatchOrBuilder>( + matches_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + matches_ = null; + } + return matchesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:maps.fleetengine.v1.SearchVehiclesResponse) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.v1.SearchVehiclesResponse) + private static final com.google.maps.fleetengine.v1.SearchVehiclesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.fleetengine.v1.SearchVehiclesResponse(); + } + + public static com.google.maps.fleetengine.v1.SearchVehiclesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchVehiclesResponse 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.fleetengine.v1.SearchVehiclesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/SearchVehiclesResponseOrBuilder.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/SearchVehiclesResponseOrBuilder.java new file mode 100644 index 000000000000..b10439e0b965 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/SearchVehiclesResponseOrBuilder.java @@ -0,0 +1,83 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicle_api.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public interface SearchVehiclesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.v1.SearchVehiclesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of vehicles that match the `SearchVehiclesRequest` criteria, ordered
+   * according to `SearchVehiclesRequest.order_by` field.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleMatch matches = 1; + */ + java.util.List getMatchesList(); + /** + * + * + *
+   * List of vehicles that match the `SearchVehiclesRequest` criteria, ordered
+   * according to `SearchVehiclesRequest.order_by` field.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleMatch matches = 1; + */ + com.google.maps.fleetengine.v1.VehicleMatch getMatches(int index); + /** + * + * + *
+   * List of vehicles that match the `SearchVehiclesRequest` criteria, ordered
+   * according to `SearchVehiclesRequest.order_by` field.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleMatch matches = 1; + */ + int getMatchesCount(); + /** + * + * + *
+   * List of vehicles that match the `SearchVehiclesRequest` criteria, ordered
+   * according to `SearchVehiclesRequest.order_by` field.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleMatch matches = 1; + */ + java.util.List + getMatchesOrBuilderList(); + /** + * + * + *
+   * List of vehicles that match the `SearchVehiclesRequest` criteria, ordered
+   * according to `SearchVehiclesRequest.order_by` field.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleMatch matches = 1; + */ + com.google.maps.fleetengine.v1.VehicleMatchOrBuilder getMatchesOrBuilder(int index); +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/SpeedReadingInterval.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/SpeedReadingInterval.java new file mode 100644 index 000000000000..5ac410d9209b --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/SpeedReadingInterval.java @@ -0,0 +1,978 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/traffic.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * Traffic density indicator on a contiguous segment of a path. Given a path
+ * with points P_0, P_1, ... , P_N (zero-based index), the SpeedReadingInterval
+ * defines an interval and describes its traffic using the following categories.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.v1.SpeedReadingInterval} + */ +public final class SpeedReadingInterval extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.v1.SpeedReadingInterval) + SpeedReadingIntervalOrBuilder { + private static final long serialVersionUID = 0L; + // Use SpeedReadingInterval.newBuilder() to construct. + private SpeedReadingInterval(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SpeedReadingInterval() { + speed_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SpeedReadingInterval(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.TrafficProto + .internal_static_maps_fleetengine_v1_SpeedReadingInterval_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.TrafficProto + .internal_static_maps_fleetengine_v1_SpeedReadingInterval_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.SpeedReadingInterval.class, + com.google.maps.fleetengine.v1.SpeedReadingInterval.Builder.class); + } + + /** + * + * + *
+   * The classification of polyline speed based on traffic data.
+   * 
+ * + * Protobuf enum {@code maps.fleetengine.v1.SpeedReadingInterval.Speed} + */ + public enum Speed implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * SPEED_UNSPECIFIED = 0; + */ + SPEED_UNSPECIFIED(0), + /** + * + * + *
+     * Normal speed, no slowdown is detected.
+     * 
+ * + * NORMAL = 1; + */ + NORMAL(1), + /** + * + * + *
+     * Slowdown detected, but no traffic jam formed.
+     * 
+ * + * SLOW = 2; + */ + SLOW(2), + /** + * + * + *
+     * Traffic jam detected.
+     * 
+ * + * TRAFFIC_JAM = 3; + */ + TRAFFIC_JAM(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * SPEED_UNSPECIFIED = 0; + */ + public static final int SPEED_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Normal speed, no slowdown is detected.
+     * 
+ * + * NORMAL = 1; + */ + public static final int NORMAL_VALUE = 1; + /** + * + * + *
+     * Slowdown detected, but no traffic jam formed.
+     * 
+ * + * SLOW = 2; + */ + public static final int SLOW_VALUE = 2; + /** + * + * + *
+     * Traffic jam detected.
+     * 
+ * + * TRAFFIC_JAM = 3; + */ + public static final int TRAFFIC_JAM_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Speed 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 Speed forNumber(int value) { + switch (value) { + case 0: + return SPEED_UNSPECIFIED; + case 1: + return NORMAL; + case 2: + return SLOW; + case 3: + return TRAFFIC_JAM; + 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 Speed findValueByNumber(int number) { + return Speed.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.maps.fleetengine.v1.SpeedReadingInterval.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Speed[] VALUES = values(); + + public static Speed 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 Speed(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:maps.fleetengine.v1.SpeedReadingInterval.Speed) + } + + public static final int START_POLYLINE_POINT_INDEX_FIELD_NUMBER = 1; + private int startPolylinePointIndex_ = 0; + /** + * + * + *
+   * The starting index of this interval in the path.
+   * In JSON, when the index is 0, the field will appear to be unpopulated.
+   * 
+ * + * int32 start_polyline_point_index = 1; + * + * @return The startPolylinePointIndex. + */ + @java.lang.Override + public int getStartPolylinePointIndex() { + return startPolylinePointIndex_; + } + + public static final int END_POLYLINE_POINT_INDEX_FIELD_NUMBER = 2; + private int endPolylinePointIndex_ = 0; + /** + * + * + *
+   * The ending index of this interval in the path.
+   * In JSON, when the index is 0, the field will appear to be unpopulated.
+   * 
+ * + * int32 end_polyline_point_index = 2; + * + * @return The endPolylinePointIndex. + */ + @java.lang.Override + public int getEndPolylinePointIndex() { + return endPolylinePointIndex_; + } + + public static final int SPEED_FIELD_NUMBER = 3; + private int speed_ = 0; + /** + * + * + *
+   * Traffic speed in this interval.
+   * 
+ * + * .maps.fleetengine.v1.SpeedReadingInterval.Speed speed = 3; + * + * @return The enum numeric value on the wire for speed. + */ + @java.lang.Override + public int getSpeedValue() { + return speed_; + } + /** + * + * + *
+   * Traffic speed in this interval.
+   * 
+ * + * .maps.fleetengine.v1.SpeedReadingInterval.Speed speed = 3; + * + * @return The speed. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.SpeedReadingInterval.Speed getSpeed() { + com.google.maps.fleetengine.v1.SpeedReadingInterval.Speed result = + com.google.maps.fleetengine.v1.SpeedReadingInterval.Speed.forNumber(speed_); + return result == null + ? com.google.maps.fleetengine.v1.SpeedReadingInterval.Speed.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (startPolylinePointIndex_ != 0) { + output.writeInt32(1, startPolylinePointIndex_); + } + if (endPolylinePointIndex_ != 0) { + output.writeInt32(2, endPolylinePointIndex_); + } + if (speed_ + != com.google.maps.fleetengine.v1.SpeedReadingInterval.Speed.SPEED_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, speed_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (startPolylinePointIndex_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, startPolylinePointIndex_); + } + if (endPolylinePointIndex_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, endPolylinePointIndex_); + } + if (speed_ + != com.google.maps.fleetengine.v1.SpeedReadingInterval.Speed.SPEED_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, speed_); + } + 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.fleetengine.v1.SpeedReadingInterval)) { + return super.equals(obj); + } + com.google.maps.fleetengine.v1.SpeedReadingInterval other = + (com.google.maps.fleetengine.v1.SpeedReadingInterval) obj; + + if (getStartPolylinePointIndex() != other.getStartPolylinePointIndex()) return false; + if (getEndPolylinePointIndex() != other.getEndPolylinePointIndex()) return false; + if (speed_ != other.speed_) 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) + START_POLYLINE_POINT_INDEX_FIELD_NUMBER; + hash = (53 * hash) + getStartPolylinePointIndex(); + hash = (37 * hash) + END_POLYLINE_POINT_INDEX_FIELD_NUMBER; + hash = (53 * hash) + getEndPolylinePointIndex(); + hash = (37 * hash) + SPEED_FIELD_NUMBER; + hash = (53 * hash) + speed_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.fleetengine.v1.SpeedReadingInterval parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.SpeedReadingInterval 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.fleetengine.v1.SpeedReadingInterval parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.SpeedReadingInterval 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.fleetengine.v1.SpeedReadingInterval parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.SpeedReadingInterval parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.SpeedReadingInterval parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.SpeedReadingInterval parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.SpeedReadingInterval parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.SpeedReadingInterval parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.SpeedReadingInterval parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.SpeedReadingInterval parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.fleetengine.v1.SpeedReadingInterval prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Traffic density indicator on a contiguous segment of a path. Given a path
+   * with points P_0, P_1, ... , P_N (zero-based index), the SpeedReadingInterval
+   * defines an interval and describes its traffic using the following categories.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.v1.SpeedReadingInterval} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.v1.SpeedReadingInterval) + com.google.maps.fleetengine.v1.SpeedReadingIntervalOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.TrafficProto + .internal_static_maps_fleetengine_v1_SpeedReadingInterval_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.TrafficProto + .internal_static_maps_fleetengine_v1_SpeedReadingInterval_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.SpeedReadingInterval.class, + com.google.maps.fleetengine.v1.SpeedReadingInterval.Builder.class); + } + + // Construct using com.google.maps.fleetengine.v1.SpeedReadingInterval.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + startPolylinePointIndex_ = 0; + endPolylinePointIndex_ = 0; + speed_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.fleetengine.v1.TrafficProto + .internal_static_maps_fleetengine_v1_SpeedReadingInterval_descriptor; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.SpeedReadingInterval getDefaultInstanceForType() { + return com.google.maps.fleetengine.v1.SpeedReadingInterval.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.SpeedReadingInterval build() { + com.google.maps.fleetengine.v1.SpeedReadingInterval result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.SpeedReadingInterval buildPartial() { + com.google.maps.fleetengine.v1.SpeedReadingInterval result = + new com.google.maps.fleetengine.v1.SpeedReadingInterval(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.fleetengine.v1.SpeedReadingInterval result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.startPolylinePointIndex_ = startPolylinePointIndex_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endPolylinePointIndex_ = endPolylinePointIndex_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.speed_ = speed_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.fleetengine.v1.SpeedReadingInterval) { + return mergeFrom((com.google.maps.fleetengine.v1.SpeedReadingInterval) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.fleetengine.v1.SpeedReadingInterval other) { + if (other == com.google.maps.fleetengine.v1.SpeedReadingInterval.getDefaultInstance()) + return this; + if (other.getStartPolylinePointIndex() != 0) { + setStartPolylinePointIndex(other.getStartPolylinePointIndex()); + } + if (other.getEndPolylinePointIndex() != 0) { + setEndPolylinePointIndex(other.getEndPolylinePointIndex()); + } + if (other.speed_ != 0) { + setSpeedValue(other.getSpeedValue()); + } + 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: + { + startPolylinePointIndex_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + endPolylinePointIndex_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + speed_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int startPolylinePointIndex_; + /** + * + * + *
+     * The starting index of this interval in the path.
+     * In JSON, when the index is 0, the field will appear to be unpopulated.
+     * 
+ * + * int32 start_polyline_point_index = 1; + * + * @return The startPolylinePointIndex. + */ + @java.lang.Override + public int getStartPolylinePointIndex() { + return startPolylinePointIndex_; + } + /** + * + * + *
+     * The starting index of this interval in the path.
+     * In JSON, when the index is 0, the field will appear to be unpopulated.
+     * 
+ * + * int32 start_polyline_point_index = 1; + * + * @param value The startPolylinePointIndex to set. + * @return This builder for chaining. + */ + public Builder setStartPolylinePointIndex(int value) { + + startPolylinePointIndex_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The starting index of this interval in the path.
+     * In JSON, when the index is 0, the field will appear to be unpopulated.
+     * 
+ * + * int32 start_polyline_point_index = 1; + * + * @return This builder for chaining. + */ + public Builder clearStartPolylinePointIndex() { + bitField0_ = (bitField0_ & ~0x00000001); + startPolylinePointIndex_ = 0; + onChanged(); + return this; + } + + private int endPolylinePointIndex_; + /** + * + * + *
+     * The ending index of this interval in the path.
+     * In JSON, when the index is 0, the field will appear to be unpopulated.
+     * 
+ * + * int32 end_polyline_point_index = 2; + * + * @return The endPolylinePointIndex. + */ + @java.lang.Override + public int getEndPolylinePointIndex() { + return endPolylinePointIndex_; + } + /** + * + * + *
+     * The ending index of this interval in the path.
+     * In JSON, when the index is 0, the field will appear to be unpopulated.
+     * 
+ * + * int32 end_polyline_point_index = 2; + * + * @param value The endPolylinePointIndex to set. + * @return This builder for chaining. + */ + public Builder setEndPolylinePointIndex(int value) { + + endPolylinePointIndex_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The ending index of this interval in the path.
+     * In JSON, when the index is 0, the field will appear to be unpopulated.
+     * 
+ * + * int32 end_polyline_point_index = 2; + * + * @return This builder for chaining. + */ + public Builder clearEndPolylinePointIndex() { + bitField0_ = (bitField0_ & ~0x00000002); + endPolylinePointIndex_ = 0; + onChanged(); + return this; + } + + private int speed_ = 0; + /** + * + * + *
+     * Traffic speed in this interval.
+     * 
+ * + * .maps.fleetengine.v1.SpeedReadingInterval.Speed speed = 3; + * + * @return The enum numeric value on the wire for speed. + */ + @java.lang.Override + public int getSpeedValue() { + return speed_; + } + /** + * + * + *
+     * Traffic speed in this interval.
+     * 
+ * + * .maps.fleetengine.v1.SpeedReadingInterval.Speed speed = 3; + * + * @param value The enum numeric value on the wire for speed to set. + * @return This builder for chaining. + */ + public Builder setSpeedValue(int value) { + speed_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Traffic speed in this interval.
+     * 
+ * + * .maps.fleetengine.v1.SpeedReadingInterval.Speed speed = 3; + * + * @return The speed. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.SpeedReadingInterval.Speed getSpeed() { + com.google.maps.fleetengine.v1.SpeedReadingInterval.Speed result = + com.google.maps.fleetengine.v1.SpeedReadingInterval.Speed.forNumber(speed_); + return result == null + ? com.google.maps.fleetengine.v1.SpeedReadingInterval.Speed.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Traffic speed in this interval.
+     * 
+ * + * .maps.fleetengine.v1.SpeedReadingInterval.Speed speed = 3; + * + * @param value The speed to set. + * @return This builder for chaining. + */ + public Builder setSpeed(com.google.maps.fleetengine.v1.SpeedReadingInterval.Speed value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + speed_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Traffic speed in this interval.
+     * 
+ * + * .maps.fleetengine.v1.SpeedReadingInterval.Speed speed = 3; + * + * @return This builder for chaining. + */ + public Builder clearSpeed() { + bitField0_ = (bitField0_ & ~0x00000004); + speed_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:maps.fleetengine.v1.SpeedReadingInterval) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.v1.SpeedReadingInterval) + private static final com.google.maps.fleetengine.v1.SpeedReadingInterval DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.fleetengine.v1.SpeedReadingInterval(); + } + + public static com.google.maps.fleetengine.v1.SpeedReadingInterval getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SpeedReadingInterval 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.fleetengine.v1.SpeedReadingInterval getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/SpeedReadingIntervalOrBuilder.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/SpeedReadingIntervalOrBuilder.java new file mode 100644 index 000000000000..f4ad2c8c8e05 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/SpeedReadingIntervalOrBuilder.java @@ -0,0 +1,79 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/traffic.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public interface SpeedReadingIntervalOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.v1.SpeedReadingInterval) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The starting index of this interval in the path.
+   * In JSON, when the index is 0, the field will appear to be unpopulated.
+   * 
+ * + * int32 start_polyline_point_index = 1; + * + * @return The startPolylinePointIndex. + */ + int getStartPolylinePointIndex(); + + /** + * + * + *
+   * The ending index of this interval in the path.
+   * In JSON, when the index is 0, the field will appear to be unpopulated.
+   * 
+ * + * int32 end_polyline_point_index = 2; + * + * @return The endPolylinePointIndex. + */ + int getEndPolylinePointIndex(); + + /** + * + * + *
+   * Traffic speed in this interval.
+   * 
+ * + * .maps.fleetengine.v1.SpeedReadingInterval.Speed speed = 3; + * + * @return The enum numeric value on the wire for speed. + */ + int getSpeedValue(); + /** + * + * + *
+   * Traffic speed in this interval.
+   * 
+ * + * .maps.fleetengine.v1.SpeedReadingInterval.Speed speed = 3; + * + * @return The speed. + */ + com.google.maps.fleetengine.v1.SpeedReadingInterval.Speed getSpeed(); +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/StopLocation.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/StopLocation.java new file mode 100644 index 000000000000..b47b8fdb7850 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/StopLocation.java @@ -0,0 +1,1270 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/trips.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * The actual location where a stop (pickup/dropoff) happened.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.v1.StopLocation} + */ +public final class StopLocation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.v1.StopLocation) + StopLocationOrBuilder { + private static final long serialVersionUID = 0L; + // Use StopLocation.newBuilder() to construct. + private StopLocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StopLocation() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StopLocation(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.Trips + .internal_static_maps_fleetengine_v1_StopLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.Trips + .internal_static_maps_fleetengine_v1_StopLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.StopLocation.class, + com.google.maps.fleetengine.v1.StopLocation.Builder.class); + } + + private int bitField0_; + public static final int POINT_FIELD_NUMBER = 1; + private com.google.type.LatLng point_; + /** + * + * + *
+   * Required. Denotes the actual location.
+   * 
+ * + * .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. Denotes the actual location.
+   * 
+ * + * .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. Denotes the actual location.
+   * 
+ * + * .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_; + } + + public static final int TIMESTAMP_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp timestamp_; + /** + * + * + *
+   * Indicates when the stop happened.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 2; + * + * @return Whether the timestamp field is set. + */ + @java.lang.Override + public boolean hasTimestamp() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Indicates when the stop happened.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 2; + * + * @return The timestamp. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTimestamp() { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } + /** + * + * + *
+   * Indicates when the stop happened.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } + + public static final int STOP_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp stopTime_; + /** + * + * + *
+   * Input only. Deprecated.  Use the timestamp field.
+   * 
+ * + * + * .google.protobuf.Timestamp stop_time = 3 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @deprecated maps.fleetengine.v1.StopLocation.stop_time is deprecated. See + * google/maps/fleetengine/v1/trips.proto;l=237 + * @return Whether the stopTime field is set. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean hasStopTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Input only. Deprecated.  Use the timestamp field.
+   * 
+ * + * + * .google.protobuf.Timestamp stop_time = 3 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @deprecated maps.fleetengine.v1.StopLocation.stop_time is deprecated. See + * google/maps/fleetengine/v1/trips.proto;l=237 + * @return The stopTime. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.Timestamp getStopTime() { + return stopTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : stopTime_; + } + /** + * + * + *
+   * Input only. Deprecated.  Use the timestamp field.
+   * 
+ * + * + * .google.protobuf.Timestamp stop_time = 3 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.TimestampOrBuilder getStopTimeOrBuilder() { + return stopTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : stopTime_; + } + + 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, getTimestamp()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getStopTime()); + } + 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, getTimestamp()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getStopTime()); + } + 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.fleetengine.v1.StopLocation)) { + return super.equals(obj); + } + com.google.maps.fleetengine.v1.StopLocation other = + (com.google.maps.fleetengine.v1.StopLocation) obj; + + if (hasPoint() != other.hasPoint()) return false; + if (hasPoint()) { + if (!getPoint().equals(other.getPoint())) return false; + } + if (hasTimestamp() != other.hasTimestamp()) return false; + if (hasTimestamp()) { + if (!getTimestamp().equals(other.getTimestamp())) return false; + } + if (hasStopTime() != other.hasStopTime()) return false; + if (hasStopTime()) { + if (!getStopTime().equals(other.getStopTime())) 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 (hasTimestamp()) { + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getTimestamp().hashCode(); + } + if (hasStopTime()) { + hash = (37 * hash) + STOP_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStopTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.fleetengine.v1.StopLocation parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.StopLocation 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.fleetengine.v1.StopLocation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.StopLocation 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.fleetengine.v1.StopLocation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.StopLocation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.StopLocation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.StopLocation parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.StopLocation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.StopLocation parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.StopLocation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.StopLocation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.fleetengine.v1.StopLocation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The actual location where a stop (pickup/dropoff) happened.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.v1.StopLocation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.v1.StopLocation) + com.google.maps.fleetengine.v1.StopLocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.Trips + .internal_static_maps_fleetengine_v1_StopLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.Trips + .internal_static_maps_fleetengine_v1_StopLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.StopLocation.class, + com.google.maps.fleetengine.v1.StopLocation.Builder.class); + } + + // Construct using com.google.maps.fleetengine.v1.StopLocation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPointFieldBuilder(); + getTimestampFieldBuilder(); + getStopTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + point_ = null; + if (pointBuilder_ != null) { + pointBuilder_.dispose(); + pointBuilder_ = null; + } + timestamp_ = null; + if (timestampBuilder_ != null) { + timestampBuilder_.dispose(); + timestampBuilder_ = null; + } + stopTime_ = null; + if (stopTimeBuilder_ != null) { + stopTimeBuilder_.dispose(); + stopTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.fleetengine.v1.Trips + .internal_static_maps_fleetengine_v1_StopLocation_descriptor; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.StopLocation getDefaultInstanceForType() { + return com.google.maps.fleetengine.v1.StopLocation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.StopLocation build() { + com.google.maps.fleetengine.v1.StopLocation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.StopLocation buildPartial() { + com.google.maps.fleetengine.v1.StopLocation result = + new com.google.maps.fleetengine.v1.StopLocation(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.fleetengine.v1.StopLocation 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.timestamp_ = timestampBuilder_ == null ? timestamp_ : timestampBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.stopTime_ = stopTimeBuilder_ == null ? stopTime_ : stopTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.fleetengine.v1.StopLocation) { + return mergeFrom((com.google.maps.fleetengine.v1.StopLocation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.fleetengine.v1.StopLocation other) { + if (other == com.google.maps.fleetengine.v1.StopLocation.getDefaultInstance()) return this; + if (other.hasPoint()) { + mergePoint(other.getPoint()); + } + if (other.hasTimestamp()) { + mergeTimestamp(other.getTimestamp()); + } + if (other.hasStopTime()) { + mergeStopTime(other.getStopTime()); + } + 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(getPointFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getTimestampFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getStopTimeFieldBuilder().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.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + pointBuilder_; + /** + * + * + *
+     * Required. Denotes the actual location.
+     * 
+ * + * .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. Denotes the actual location.
+     * 
+ * + * .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. Denotes the actual location.
+     * 
+ * + * .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. Denotes the actual location.
+     * 
+ * + * .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. Denotes the actual location.
+     * 
+ * + * .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. Denotes the actual location.
+     * 
+ * + * .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. Denotes the actual location.
+     * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.type.LatLng.Builder getPointBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getPointFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Denotes the actual location.
+     * 
+ * + * .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. Denotes the actual location.
+     * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + getPointFieldBuilder() { + if (pointBuilder_ == null) { + pointBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + 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 timestamp_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + timestampBuilder_; + /** + * + * + *
+     * Indicates when the stop happened.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 2; + * + * @return Whether the timestamp field is set. + */ + public boolean hasTimestamp() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Indicates when the stop happened.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 2; + * + * @return The timestamp. + */ + public com.google.protobuf.Timestamp getTimestamp() { + if (timestampBuilder_ == null) { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } else { + return timestampBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Indicates when the stop happened.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 2; + */ + public Builder setTimestamp(com.google.protobuf.Timestamp value) { + if (timestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timestamp_ = value; + } else { + timestampBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates when the stop happened.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 2; + */ + public Builder setTimestamp(com.google.protobuf.Timestamp.Builder builderForValue) { + if (timestampBuilder_ == null) { + timestamp_ = builderForValue.build(); + } else { + timestampBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates when the stop happened.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 2; + */ + public Builder mergeTimestamp(com.google.protobuf.Timestamp value) { + if (timestampBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && timestamp_ != null + && timestamp_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getTimestampBuilder().mergeFrom(value); + } else { + timestamp_ = value; + } + } else { + timestampBuilder_.mergeFrom(value); + } + if (timestamp_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Indicates when the stop happened.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 2; + */ + public Builder clearTimestamp() { + bitField0_ = (bitField0_ & ~0x00000002); + timestamp_ = null; + if (timestampBuilder_ != null) { + timestampBuilder_.dispose(); + timestampBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates when the stop happened.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 2; + */ + public com.google.protobuf.Timestamp.Builder getTimestampBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getTimestampFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Indicates when the stop happened.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 2; + */ + public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { + if (timestampBuilder_ != null) { + return timestampBuilder_.getMessageOrBuilder(); + } else { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } + } + /** + * + * + *
+     * Indicates when the stop happened.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getTimestampFieldBuilder() { + if (timestampBuilder_ == null) { + timestampBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getTimestamp(), getParentForChildren(), isClean()); + timestamp_ = null; + } + return timestampBuilder_; + } + + private com.google.protobuf.Timestamp stopTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + stopTimeBuilder_; + /** + * + * + *
+     * Input only. Deprecated.  Use the timestamp field.
+     * 
+ * + * + * .google.protobuf.Timestamp stop_time = 3 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @deprecated maps.fleetengine.v1.StopLocation.stop_time is deprecated. See + * google/maps/fleetengine/v1/trips.proto;l=237 + * @return Whether the stopTime field is set. + */ + @java.lang.Deprecated + public boolean hasStopTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Input only. Deprecated.  Use the timestamp field.
+     * 
+ * + * + * .google.protobuf.Timestamp stop_time = 3 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @deprecated maps.fleetengine.v1.StopLocation.stop_time is deprecated. See + * google/maps/fleetengine/v1/trips.proto;l=237 + * @return The stopTime. + */ + @java.lang.Deprecated + public com.google.protobuf.Timestamp getStopTime() { + if (stopTimeBuilder_ == null) { + return stopTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : stopTime_; + } else { + return stopTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Input only. Deprecated.  Use the timestamp field.
+     * 
+ * + * + * .google.protobuf.Timestamp stop_time = 3 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Deprecated + public Builder setStopTime(com.google.protobuf.Timestamp value) { + if (stopTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stopTime_ = value; + } else { + stopTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. Deprecated.  Use the timestamp field.
+     * 
+ * + * + * .google.protobuf.Timestamp stop_time = 3 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Deprecated + public Builder setStopTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (stopTimeBuilder_ == null) { + stopTime_ = builderForValue.build(); + } else { + stopTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. Deprecated.  Use the timestamp field.
+     * 
+ * + * + * .google.protobuf.Timestamp stop_time = 3 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Deprecated + public Builder mergeStopTime(com.google.protobuf.Timestamp value) { + if (stopTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && stopTime_ != null + && stopTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStopTimeBuilder().mergeFrom(value); + } else { + stopTime_ = value; + } + } else { + stopTimeBuilder_.mergeFrom(value); + } + if (stopTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Input only. Deprecated.  Use the timestamp field.
+     * 
+ * + * + * .google.protobuf.Timestamp stop_time = 3 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Deprecated + public Builder clearStopTime() { + bitField0_ = (bitField0_ & ~0x00000004); + stopTime_ = null; + if (stopTimeBuilder_ != null) { + stopTimeBuilder_.dispose(); + stopTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. Deprecated.  Use the timestamp field.
+     * 
+ * + * + * .google.protobuf.Timestamp stop_time = 3 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Deprecated + public com.google.protobuf.Timestamp.Builder getStopTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getStopTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Input only. Deprecated.  Use the timestamp field.
+     * 
+ * + * + * .google.protobuf.Timestamp stop_time = 3 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Deprecated + public com.google.protobuf.TimestampOrBuilder getStopTimeOrBuilder() { + if (stopTimeBuilder_ != null) { + return stopTimeBuilder_.getMessageOrBuilder(); + } else { + return stopTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : stopTime_; + } + } + /** + * + * + *
+     * Input only. Deprecated.  Use the timestamp field.
+     * 
+ * + * + * .google.protobuf.Timestamp stop_time = 3 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStopTimeFieldBuilder() { + if (stopTimeBuilder_ == null) { + stopTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStopTime(), getParentForChildren(), isClean()); + stopTime_ = null; + } + return stopTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:maps.fleetengine.v1.StopLocation) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.v1.StopLocation) + private static final com.google.maps.fleetengine.v1.StopLocation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.fleetengine.v1.StopLocation(); + } + + public static com.google.maps.fleetengine.v1.StopLocation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StopLocation 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.fleetengine.v1.StopLocation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/StopLocationOrBuilder.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/StopLocationOrBuilder.java new file mode 100644 index 000000000000..c63521ae8fe9 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/StopLocationOrBuilder.java @@ -0,0 +1,144 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/trips.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public interface StopLocationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.v1.StopLocation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Denotes the actual location.
+   * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the point field is set. + */ + boolean hasPoint(); + /** + * + * + *
+   * Required. Denotes the actual location.
+   * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The point. + */ + com.google.type.LatLng getPoint(); + /** + * + * + *
+   * Required. Denotes the actual location.
+   * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.type.LatLngOrBuilder getPointOrBuilder(); + + /** + * + * + *
+   * Indicates when the stop happened.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 2; + * + * @return Whether the timestamp field is set. + */ + boolean hasTimestamp(); + /** + * + * + *
+   * Indicates when the stop happened.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 2; + * + * @return The timestamp. + */ + com.google.protobuf.Timestamp getTimestamp(); + /** + * + * + *
+   * Indicates when the stop happened.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 2; + */ + com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder(); + + /** + * + * + *
+   * Input only. Deprecated.  Use the timestamp field.
+   * 
+ * + * + * .google.protobuf.Timestamp stop_time = 3 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @deprecated maps.fleetengine.v1.StopLocation.stop_time is deprecated. See + * google/maps/fleetengine/v1/trips.proto;l=237 + * @return Whether the stopTime field is set. + */ + @java.lang.Deprecated + boolean hasStopTime(); + /** + * + * + *
+   * Input only. Deprecated.  Use the timestamp field.
+   * 
+ * + * + * .google.protobuf.Timestamp stop_time = 3 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @deprecated maps.fleetengine.v1.StopLocation.stop_time is deprecated. See + * google/maps/fleetengine/v1/trips.proto;l=237 + * @return The stopTime. + */ + @java.lang.Deprecated + com.google.protobuf.Timestamp getStopTime(); + /** + * + * + *
+   * Input only. Deprecated.  Use the timestamp field.
+   * 
+ * + * + * .google.protobuf.Timestamp stop_time = 3 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Deprecated + com.google.protobuf.TimestampOrBuilder getStopTimeOrBuilder(); +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TerminalLocation.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TerminalLocation.java new file mode 100644 index 000000000000..5649cb33d4fa --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TerminalLocation.java @@ -0,0 +1,1581 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/fleetengine.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * Describes the location of a waypoint.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.v1.TerminalLocation} + */ +public final class TerminalLocation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.v1.TerminalLocation) + TerminalLocationOrBuilder { + private static final long serialVersionUID = 0L; + // Use TerminalLocation.newBuilder() to construct. + private TerminalLocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TerminalLocation() { + accessPointId_ = ""; + tripId_ = ""; + terminalLocationType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TerminalLocation(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.FleetEngine + .internal_static_maps_fleetengine_v1_TerminalLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.FleetEngine + .internal_static_maps_fleetengine_v1_TerminalLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.TerminalLocation.class, + com.google.maps.fleetengine.v1.TerminalLocation.Builder.class); + } + + private int bitField0_; + public static final int POINT_FIELD_NUMBER = 1; + private com.google.type.LatLng point_; + /** + * + * + *
+   * Required. Denotes the location of a trip waypoint.
+   * 
+ * + * .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. Denotes the location of a trip waypoint.
+   * 
+ * + * .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. Denotes the location of a trip waypoint.
+   * 
+ * + * .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_; + } + + public static final int TERMINAL_POINT_ID_FIELD_NUMBER = 2; + private com.google.maps.fleetengine.v1.TerminalPointId terminalPointId_; + /** + * + * + *
+   * Deprecated: Specify the `point` field instead.
+   * 
+ * + * .maps.fleetengine.v1.TerminalPointId terminal_point_id = 2 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalLocation.terminal_point_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=58 + * @return Whether the terminalPointId field is set. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean hasTerminalPointId() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Deprecated: Specify the `point` field instead.
+   * 
+ * + * .maps.fleetengine.v1.TerminalPointId terminal_point_id = 2 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalLocation.terminal_point_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=58 + * @return The terminalPointId. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.maps.fleetengine.v1.TerminalPointId getTerminalPointId() { + return terminalPointId_ == null + ? com.google.maps.fleetengine.v1.TerminalPointId.getDefaultInstance() + : terminalPointId_; + } + /** + * + * + *
+   * Deprecated: Specify the `point` field instead.
+   * 
+ * + * .maps.fleetengine.v1.TerminalPointId terminal_point_id = 2 [deprecated = true]; + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.maps.fleetengine.v1.TerminalPointIdOrBuilder getTerminalPointIdOrBuilder() { + return terminalPointId_ == null + ? com.google.maps.fleetengine.v1.TerminalPointId.getDefaultInstance() + : terminalPointId_; + } + + public static final int ACCESS_POINT_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object accessPointId_ = ""; + /** + * + * + *
+   * Deprecated: Specify the `point` field instead.
+   * 
+ * + * string access_point_id = 3 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalLocation.access_point_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=61 + * @return The accessPointId. + */ + @java.lang.Override + @java.lang.Deprecated + public java.lang.String getAccessPointId() { + java.lang.Object ref = accessPointId_; + 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(); + accessPointId_ = s; + return s; + } + } + /** + * + * + *
+   * Deprecated: Specify the `point` field instead.
+   * 
+ * + * string access_point_id = 3 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalLocation.access_point_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=61 + * @return The bytes for accessPointId. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.ByteString getAccessPointIdBytes() { + java.lang.Object ref = accessPointId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + accessPointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRIP_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object tripId_ = ""; + /** + * + * + *
+   * Deprecated.
+   * 
+ * + * string trip_id = 4 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalLocation.trip_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=64 + * @return The tripId. + */ + @java.lang.Override + @java.lang.Deprecated + 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; + } + } + /** + * + * + *
+   * Deprecated.
+   * 
+ * + * string trip_id = 4 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalLocation.trip_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=64 + * @return The bytes for tripId. + */ + @java.lang.Override + @java.lang.Deprecated + 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 TERMINAL_LOCATION_TYPE_FIELD_NUMBER = 5; + private int terminalLocationType_ = 0; + /** + * + * + *
+   * Deprecated: `Vehicle.waypoint` will have this data.
+   * 
+ * + * .maps.fleetengine.v1.WaypointType terminal_location_type = 5 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalLocation.terminal_location_type is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=67 + * @return The enum numeric value on the wire for terminalLocationType. + */ + @java.lang.Override + @java.lang.Deprecated + public int getTerminalLocationTypeValue() { + return terminalLocationType_; + } + /** + * + * + *
+   * Deprecated: `Vehicle.waypoint` will have this data.
+   * 
+ * + * .maps.fleetengine.v1.WaypointType terminal_location_type = 5 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalLocation.terminal_location_type is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=67 + * @return The terminalLocationType. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.maps.fleetengine.v1.WaypointType getTerminalLocationType() { + com.google.maps.fleetengine.v1.WaypointType result = + com.google.maps.fleetengine.v1.WaypointType.forNumber(terminalLocationType_); + return result == null ? com.google.maps.fleetengine.v1.WaypointType.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getPoint()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getTerminalPointId()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accessPointId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, accessPointId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tripId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, tripId_); + } + if (terminalLocationType_ + != com.google.maps.fleetengine.v1.WaypointType.UNKNOWN_WAYPOINT_TYPE.getNumber()) { + output.writeEnum(5, terminalLocationType_); + } + 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, getTerminalPointId()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accessPointId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, accessPointId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tripId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, tripId_); + } + if (terminalLocationType_ + != com.google.maps.fleetengine.v1.WaypointType.UNKNOWN_WAYPOINT_TYPE.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, terminalLocationType_); + } + 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.fleetengine.v1.TerminalLocation)) { + return super.equals(obj); + } + com.google.maps.fleetengine.v1.TerminalLocation other = + (com.google.maps.fleetengine.v1.TerminalLocation) obj; + + if (hasPoint() != other.hasPoint()) return false; + if (hasPoint()) { + if (!getPoint().equals(other.getPoint())) return false; + } + if (hasTerminalPointId() != other.hasTerminalPointId()) return false; + if (hasTerminalPointId()) { + if (!getTerminalPointId().equals(other.getTerminalPointId())) return false; + } + if (!getAccessPointId().equals(other.getAccessPointId())) return false; + if (!getTripId().equals(other.getTripId())) return false; + if (terminalLocationType_ != other.terminalLocationType_) 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 (hasTerminalPointId()) { + hash = (37 * hash) + TERMINAL_POINT_ID_FIELD_NUMBER; + hash = (53 * hash) + getTerminalPointId().hashCode(); + } + hash = (37 * hash) + ACCESS_POINT_ID_FIELD_NUMBER; + hash = (53 * hash) + getAccessPointId().hashCode(); + hash = (37 * hash) + TRIP_ID_FIELD_NUMBER; + hash = (53 * hash) + getTripId().hashCode(); + hash = (37 * hash) + TERMINAL_LOCATION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + terminalLocationType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.fleetengine.v1.TerminalLocation parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.TerminalLocation 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.fleetengine.v1.TerminalLocation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.TerminalLocation 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.fleetengine.v1.TerminalLocation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.TerminalLocation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.TerminalLocation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.TerminalLocation parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.TerminalLocation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.TerminalLocation parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.TerminalLocation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.TerminalLocation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.fleetengine.v1.TerminalLocation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Describes the location of a waypoint.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.v1.TerminalLocation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.v1.TerminalLocation) + com.google.maps.fleetengine.v1.TerminalLocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.FleetEngine + .internal_static_maps_fleetengine_v1_TerminalLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.FleetEngine + .internal_static_maps_fleetengine_v1_TerminalLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.TerminalLocation.class, + com.google.maps.fleetengine.v1.TerminalLocation.Builder.class); + } + + // Construct using com.google.maps.fleetengine.v1.TerminalLocation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPointFieldBuilder(); + getTerminalPointIdFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + point_ = null; + if (pointBuilder_ != null) { + pointBuilder_.dispose(); + pointBuilder_ = null; + } + terminalPointId_ = null; + if (terminalPointIdBuilder_ != null) { + terminalPointIdBuilder_.dispose(); + terminalPointIdBuilder_ = null; + } + accessPointId_ = ""; + tripId_ = ""; + terminalLocationType_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.fleetengine.v1.FleetEngine + .internal_static_maps_fleetengine_v1_TerminalLocation_descriptor; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.TerminalLocation getDefaultInstanceForType() { + return com.google.maps.fleetengine.v1.TerminalLocation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.TerminalLocation build() { + com.google.maps.fleetengine.v1.TerminalLocation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.TerminalLocation buildPartial() { + com.google.maps.fleetengine.v1.TerminalLocation result = + new com.google.maps.fleetengine.v1.TerminalLocation(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.fleetengine.v1.TerminalLocation 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.terminalPointId_ = + terminalPointIdBuilder_ == null ? terminalPointId_ : terminalPointIdBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.accessPointId_ = accessPointId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.tripId_ = tripId_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.terminalLocationType_ = terminalLocationType_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.fleetengine.v1.TerminalLocation) { + return mergeFrom((com.google.maps.fleetengine.v1.TerminalLocation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.fleetengine.v1.TerminalLocation other) { + if (other == com.google.maps.fleetengine.v1.TerminalLocation.getDefaultInstance()) + return this; + if (other.hasPoint()) { + mergePoint(other.getPoint()); + } + if (other.hasTerminalPointId()) { + mergeTerminalPointId(other.getTerminalPointId()); + } + if (!other.getAccessPointId().isEmpty()) { + accessPointId_ = other.accessPointId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getTripId().isEmpty()) { + tripId_ = other.tripId_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.terminalLocationType_ != 0) { + setTerminalLocationTypeValue(other.getTerminalLocationTypeValue()); + } + 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(getPointFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getTerminalPointIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + accessPointId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + tripId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + terminalLocationType_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + 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.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + pointBuilder_; + /** + * + * + *
+     * Required. Denotes the location of a trip waypoint.
+     * 
+ * + * .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. Denotes the location of a trip waypoint.
+     * 
+ * + * .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. Denotes the location of a trip waypoint.
+     * 
+ * + * .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. Denotes the location of a trip waypoint.
+     * 
+ * + * .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. Denotes the location of a trip waypoint.
+     * 
+ * + * .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. Denotes the location of a trip waypoint.
+     * 
+ * + * .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. Denotes the location of a trip waypoint.
+     * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.type.LatLng.Builder getPointBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getPointFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Denotes the location of a trip waypoint.
+     * 
+ * + * .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. Denotes the location of a trip waypoint.
+     * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + getPointFieldBuilder() { + if (pointBuilder_ == null) { + pointBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, + com.google.type.LatLng.Builder, + com.google.type.LatLngOrBuilder>(getPoint(), getParentForChildren(), isClean()); + point_ = null; + } + return pointBuilder_; + } + + private com.google.maps.fleetengine.v1.TerminalPointId terminalPointId_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.TerminalPointId, + com.google.maps.fleetengine.v1.TerminalPointId.Builder, + com.google.maps.fleetengine.v1.TerminalPointIdOrBuilder> + terminalPointIdBuilder_; + /** + * + * + *
+     * Deprecated: Specify the `point` field instead.
+     * 
+ * + * .maps.fleetengine.v1.TerminalPointId terminal_point_id = 2 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalLocation.terminal_point_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=58 + * @return Whether the terminalPointId field is set. + */ + @java.lang.Deprecated + public boolean hasTerminalPointId() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Deprecated: Specify the `point` field instead.
+     * 
+ * + * .maps.fleetengine.v1.TerminalPointId terminal_point_id = 2 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalLocation.terminal_point_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=58 + * @return The terminalPointId. + */ + @java.lang.Deprecated + public com.google.maps.fleetengine.v1.TerminalPointId getTerminalPointId() { + if (terminalPointIdBuilder_ == null) { + return terminalPointId_ == null + ? com.google.maps.fleetengine.v1.TerminalPointId.getDefaultInstance() + : terminalPointId_; + } else { + return terminalPointIdBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Deprecated: Specify the `point` field instead.
+     * 
+ * + * .maps.fleetengine.v1.TerminalPointId terminal_point_id = 2 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder setTerminalPointId(com.google.maps.fleetengine.v1.TerminalPointId value) { + if (terminalPointIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + terminalPointId_ = value; + } else { + terminalPointIdBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Deprecated: Specify the `point` field instead.
+     * 
+ * + * .maps.fleetengine.v1.TerminalPointId terminal_point_id = 2 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder setTerminalPointId( + com.google.maps.fleetengine.v1.TerminalPointId.Builder builderForValue) { + if (terminalPointIdBuilder_ == null) { + terminalPointId_ = builderForValue.build(); + } else { + terminalPointIdBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Deprecated: Specify the `point` field instead.
+     * 
+ * + * .maps.fleetengine.v1.TerminalPointId terminal_point_id = 2 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder mergeTerminalPointId(com.google.maps.fleetengine.v1.TerminalPointId value) { + if (terminalPointIdBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && terminalPointId_ != null + && terminalPointId_ + != com.google.maps.fleetengine.v1.TerminalPointId.getDefaultInstance()) { + getTerminalPointIdBuilder().mergeFrom(value); + } else { + terminalPointId_ = value; + } + } else { + terminalPointIdBuilder_.mergeFrom(value); + } + if (terminalPointId_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Deprecated: Specify the `point` field instead.
+     * 
+ * + * .maps.fleetengine.v1.TerminalPointId terminal_point_id = 2 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder clearTerminalPointId() { + bitField0_ = (bitField0_ & ~0x00000002); + terminalPointId_ = null; + if (terminalPointIdBuilder_ != null) { + terminalPointIdBuilder_.dispose(); + terminalPointIdBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Deprecated: Specify the `point` field instead.
+     * 
+ * + * .maps.fleetengine.v1.TerminalPointId terminal_point_id = 2 [deprecated = true]; + */ + @java.lang.Deprecated + public com.google.maps.fleetengine.v1.TerminalPointId.Builder getTerminalPointIdBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getTerminalPointIdFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Deprecated: Specify the `point` field instead.
+     * 
+ * + * .maps.fleetengine.v1.TerminalPointId terminal_point_id = 2 [deprecated = true]; + */ + @java.lang.Deprecated + public com.google.maps.fleetengine.v1.TerminalPointIdOrBuilder getTerminalPointIdOrBuilder() { + if (terminalPointIdBuilder_ != null) { + return terminalPointIdBuilder_.getMessageOrBuilder(); + } else { + return terminalPointId_ == null + ? com.google.maps.fleetengine.v1.TerminalPointId.getDefaultInstance() + : terminalPointId_; + } + } + /** + * + * + *
+     * Deprecated: Specify the `point` field instead.
+     * 
+ * + * .maps.fleetengine.v1.TerminalPointId terminal_point_id = 2 [deprecated = true]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.TerminalPointId, + com.google.maps.fleetengine.v1.TerminalPointId.Builder, + com.google.maps.fleetengine.v1.TerminalPointIdOrBuilder> + getTerminalPointIdFieldBuilder() { + if (terminalPointIdBuilder_ == null) { + terminalPointIdBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.TerminalPointId, + com.google.maps.fleetengine.v1.TerminalPointId.Builder, + com.google.maps.fleetengine.v1.TerminalPointIdOrBuilder>( + getTerminalPointId(), getParentForChildren(), isClean()); + terminalPointId_ = null; + } + return terminalPointIdBuilder_; + } + + private java.lang.Object accessPointId_ = ""; + /** + * + * + *
+     * Deprecated: Specify the `point` field instead.
+     * 
+ * + * string access_point_id = 3 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalLocation.access_point_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=61 + * @return The accessPointId. + */ + @java.lang.Deprecated + public java.lang.String getAccessPointId() { + java.lang.Object ref = accessPointId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + accessPointId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Deprecated: Specify the `point` field instead.
+     * 
+ * + * string access_point_id = 3 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalLocation.access_point_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=61 + * @return The bytes for accessPointId. + */ + @java.lang.Deprecated + public com.google.protobuf.ByteString getAccessPointIdBytes() { + java.lang.Object ref = accessPointId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + accessPointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Deprecated: Specify the `point` field instead.
+     * 
+ * + * string access_point_id = 3 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalLocation.access_point_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=61 + * @param value The accessPointId to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setAccessPointId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + accessPointId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Deprecated: Specify the `point` field instead.
+     * 
+ * + * string access_point_id = 3 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalLocation.access_point_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=61 + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearAccessPointId() { + accessPointId_ = getDefaultInstance().getAccessPointId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Deprecated: Specify the `point` field instead.
+     * 
+ * + * string access_point_id = 3 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalLocation.access_point_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=61 + * @param value The bytes for accessPointId to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setAccessPointIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + accessPointId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object tripId_ = ""; + /** + * + * + *
+     * Deprecated.
+     * 
+ * + * string trip_id = 4 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalLocation.trip_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=64 + * @return The tripId. + */ + @java.lang.Deprecated + 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; + } + } + /** + * + * + *
+     * Deprecated.
+     * 
+ * + * string trip_id = 4 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalLocation.trip_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=64 + * @return The bytes for tripId. + */ + @java.lang.Deprecated + 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; + } + } + /** + * + * + *
+     * Deprecated.
+     * 
+ * + * string trip_id = 4 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalLocation.trip_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=64 + * @param value The tripId to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setTripId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tripId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Deprecated.
+     * 
+ * + * string trip_id = 4 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalLocation.trip_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=64 + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearTripId() { + tripId_ = getDefaultInstance().getTripId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Deprecated.
+     * 
+ * + * string trip_id = 4 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalLocation.trip_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=64 + * @param value The bytes for tripId to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setTripIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tripId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int terminalLocationType_ = 0; + /** + * + * + *
+     * Deprecated: `Vehicle.waypoint` will have this data.
+     * 
+ * + * .maps.fleetengine.v1.WaypointType terminal_location_type = 5 [deprecated = true]; + * + * + * @deprecated maps.fleetengine.v1.TerminalLocation.terminal_location_type is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=67 + * @return The enum numeric value on the wire for terminalLocationType. + */ + @java.lang.Override + @java.lang.Deprecated + public int getTerminalLocationTypeValue() { + return terminalLocationType_; + } + /** + * + * + *
+     * Deprecated: `Vehicle.waypoint` will have this data.
+     * 
+ * + * .maps.fleetengine.v1.WaypointType terminal_location_type = 5 [deprecated = true]; + * + * + * @deprecated maps.fleetengine.v1.TerminalLocation.terminal_location_type is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=67 + * @param value The enum numeric value on the wire for terminalLocationType to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setTerminalLocationTypeValue(int value) { + terminalLocationType_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Deprecated: `Vehicle.waypoint` will have this data.
+     * 
+ * + * .maps.fleetengine.v1.WaypointType terminal_location_type = 5 [deprecated = true]; + * + * + * @deprecated maps.fleetengine.v1.TerminalLocation.terminal_location_type is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=67 + * @return The terminalLocationType. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.maps.fleetengine.v1.WaypointType getTerminalLocationType() { + com.google.maps.fleetengine.v1.WaypointType result = + com.google.maps.fleetengine.v1.WaypointType.forNumber(terminalLocationType_); + return result == null ? com.google.maps.fleetengine.v1.WaypointType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Deprecated: `Vehicle.waypoint` will have this data.
+     * 
+ * + * .maps.fleetengine.v1.WaypointType terminal_location_type = 5 [deprecated = true]; + * + * + * @deprecated maps.fleetengine.v1.TerminalLocation.terminal_location_type is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=67 + * @param value The terminalLocationType to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setTerminalLocationType(com.google.maps.fleetengine.v1.WaypointType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + terminalLocationType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Deprecated: `Vehicle.waypoint` will have this data.
+     * 
+ * + * .maps.fleetengine.v1.WaypointType terminal_location_type = 5 [deprecated = true]; + * + * + * @deprecated maps.fleetengine.v1.TerminalLocation.terminal_location_type is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=67 + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearTerminalLocationType() { + bitField0_ = (bitField0_ & ~0x00000010); + terminalLocationType_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:maps.fleetengine.v1.TerminalLocation) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.v1.TerminalLocation) + private static final com.google.maps.fleetengine.v1.TerminalLocation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.fleetengine.v1.TerminalLocation(); + } + + public static com.google.maps.fleetengine.v1.TerminalLocation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TerminalLocation 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.fleetengine.v1.TerminalLocation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TerminalLocationOrBuilder.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TerminalLocationOrBuilder.java new file mode 100644 index 000000000000..dc67262646a0 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TerminalLocationOrBuilder.java @@ -0,0 +1,196 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/fleetengine.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public interface TerminalLocationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.v1.TerminalLocation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Denotes the location of a trip waypoint.
+   * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the point field is set. + */ + boolean hasPoint(); + /** + * + * + *
+   * Required. Denotes the location of a trip waypoint.
+   * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The point. + */ + com.google.type.LatLng getPoint(); + /** + * + * + *
+   * Required. Denotes the location of a trip waypoint.
+   * 
+ * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.type.LatLngOrBuilder getPointOrBuilder(); + + /** + * + * + *
+   * Deprecated: Specify the `point` field instead.
+   * 
+ * + * .maps.fleetengine.v1.TerminalPointId terminal_point_id = 2 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalLocation.terminal_point_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=58 + * @return Whether the terminalPointId field is set. + */ + @java.lang.Deprecated + boolean hasTerminalPointId(); + /** + * + * + *
+   * Deprecated: Specify the `point` field instead.
+   * 
+ * + * .maps.fleetengine.v1.TerminalPointId terminal_point_id = 2 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalLocation.terminal_point_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=58 + * @return The terminalPointId. + */ + @java.lang.Deprecated + com.google.maps.fleetengine.v1.TerminalPointId getTerminalPointId(); + /** + * + * + *
+   * Deprecated: Specify the `point` field instead.
+   * 
+ * + * .maps.fleetengine.v1.TerminalPointId terminal_point_id = 2 [deprecated = true]; + */ + @java.lang.Deprecated + com.google.maps.fleetengine.v1.TerminalPointIdOrBuilder getTerminalPointIdOrBuilder(); + + /** + * + * + *
+   * Deprecated: Specify the `point` field instead.
+   * 
+ * + * string access_point_id = 3 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalLocation.access_point_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=61 + * @return The accessPointId. + */ + @java.lang.Deprecated + java.lang.String getAccessPointId(); + /** + * + * + *
+   * Deprecated: Specify the `point` field instead.
+   * 
+ * + * string access_point_id = 3 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalLocation.access_point_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=61 + * @return The bytes for accessPointId. + */ + @java.lang.Deprecated + com.google.protobuf.ByteString getAccessPointIdBytes(); + + /** + * + * + *
+   * Deprecated.
+   * 
+ * + * string trip_id = 4 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalLocation.trip_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=64 + * @return The tripId. + */ + @java.lang.Deprecated + java.lang.String getTripId(); + /** + * + * + *
+   * Deprecated.
+   * 
+ * + * string trip_id = 4 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalLocation.trip_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=64 + * @return The bytes for tripId. + */ + @java.lang.Deprecated + com.google.protobuf.ByteString getTripIdBytes(); + + /** + * + * + *
+   * Deprecated: `Vehicle.waypoint` will have this data.
+   * 
+ * + * .maps.fleetengine.v1.WaypointType terminal_location_type = 5 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalLocation.terminal_location_type is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=67 + * @return The enum numeric value on the wire for terminalLocationType. + */ + @java.lang.Deprecated + int getTerminalLocationTypeValue(); + /** + * + * + *
+   * Deprecated: `Vehicle.waypoint` will have this data.
+   * 
+ * + * .maps.fleetengine.v1.WaypointType terminal_location_type = 5 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalLocation.terminal_location_type is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=67 + * @return The terminalLocationType. + */ + @java.lang.Deprecated + com.google.maps.fleetengine.v1.WaypointType getTerminalLocationType(); +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TerminalPointId.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TerminalPointId.java new file mode 100644 index 000000000000..89d9ff49f7cc --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TerminalPointId.java @@ -0,0 +1,1252 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/fleetengine.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * Deprecated: TerminalPoints are no longer supported in Fleet Engine. Use
+ * `TerminalLocation.point` instead.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.v1.TerminalPointId} + */ +@java.lang.Deprecated +public final class TerminalPointId extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.v1.TerminalPointId) + TerminalPointIdOrBuilder { + private static final long serialVersionUID = 0L; + // Use TerminalPointId.newBuilder() to construct. + private TerminalPointId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TerminalPointId() { + value_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TerminalPointId(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.FleetEngine + .internal_static_maps_fleetengine_v1_TerminalPointId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.FleetEngine + .internal_static_maps_fleetengine_v1_TerminalPointId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.TerminalPointId.class, + com.google.maps.fleetengine.v1.TerminalPointId.Builder.class); + } + + private int idCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object id_; + + public enum IdCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + @java.lang.Deprecated + PLACE_ID(2), + @java.lang.Deprecated + GENERATED_ID(3), + ID_NOT_SET(0); + private final int value; + + private IdCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static IdCase valueOf(int value) { + return forNumber(value); + } + + public static IdCase forNumber(int value) { + switch (value) { + case 2: + return PLACE_ID; + case 3: + return GENERATED_ID; + case 0: + return ID_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public IdCase getIdCase() { + return IdCase.forNumber(idCase_); + } + + public static final int PLACE_ID_FIELD_NUMBER = 2; + /** + * + * + *
+   * Deprecated.
+   * 
+ * + * string place_id = 2 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalPointId.place_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=42 + * @return Whether the placeId field is set. + */ + @java.lang.Deprecated + public boolean hasPlaceId() { + return idCase_ == 2; + } + /** + * + * + *
+   * Deprecated.
+   * 
+ * + * string place_id = 2 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalPointId.place_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=42 + * @return The placeId. + */ + @java.lang.Deprecated + public java.lang.String getPlaceId() { + java.lang.Object ref = ""; + if (idCase_ == 2) { + ref = id_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (idCase_ == 2) { + id_ = s; + } + return s; + } + } + /** + * + * + *
+   * Deprecated.
+   * 
+ * + * string place_id = 2 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalPointId.place_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=42 + * @return The bytes for placeId. + */ + @java.lang.Deprecated + public com.google.protobuf.ByteString getPlaceIdBytes() { + java.lang.Object ref = ""; + if (idCase_ == 2) { + ref = id_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (idCase_ == 2) { + id_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GENERATED_ID_FIELD_NUMBER = 3; + /** + * + * + *
+   * Deprecated.
+   * 
+ * + * string generated_id = 3 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalPointId.generated_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=45 + * @return Whether the generatedId field is set. + */ + @java.lang.Deprecated + public boolean hasGeneratedId() { + return idCase_ == 3; + } + /** + * + * + *
+   * Deprecated.
+   * 
+ * + * string generated_id = 3 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalPointId.generated_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=45 + * @return The generatedId. + */ + @java.lang.Deprecated + public java.lang.String getGeneratedId() { + java.lang.Object ref = ""; + if (idCase_ == 3) { + ref = id_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (idCase_ == 3) { + id_ = s; + } + return s; + } + } + /** + * + * + *
+   * Deprecated.
+   * 
+ * + * string generated_id = 3 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalPointId.generated_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=45 + * @return The bytes for generatedId. + */ + @java.lang.Deprecated + public com.google.protobuf.ByteString getGeneratedIdBytes() { + java.lang.Object ref = ""; + if (idCase_ == 3) { + ref = id_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (idCase_ == 3) { + id_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object value_ = ""; + /** + * + * + *
+   * Deprecated.
+   * 
+ * + * string value = 4 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalPointId.value is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=49 + * @return The value. + */ + @java.lang.Override + @java.lang.Deprecated + public java.lang.String getValue() { + java.lang.Object ref = value_; + 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(); + value_ = s; + return s; + } + } + /** + * + * + *
+   * Deprecated.
+   * 
+ * + * string value = 4 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalPointId.value is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=49 + * @return The bytes for value. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = 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 (idCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_); + } + if (idCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, value_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (idCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_); + } + if (idCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, value_); + } + 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.fleetengine.v1.TerminalPointId)) { + return super.equals(obj); + } + com.google.maps.fleetengine.v1.TerminalPointId other = + (com.google.maps.fleetengine.v1.TerminalPointId) obj; + + if (!getValue().equals(other.getValue())) return false; + if (!getIdCase().equals(other.getIdCase())) return false; + switch (idCase_) { + case 2: + if (!getPlaceId().equals(other.getPlaceId())) return false; + break; + case 3: + if (!getGeneratedId().equals(other.getGeneratedId())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + switch (idCase_) { + case 2: + hash = (37 * hash) + PLACE_ID_FIELD_NUMBER; + hash = (53 * hash) + getPlaceId().hashCode(); + break; + case 3: + hash = (37 * hash) + GENERATED_ID_FIELD_NUMBER; + hash = (53 * hash) + getGeneratedId().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.fleetengine.v1.TerminalPointId parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.TerminalPointId 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.fleetengine.v1.TerminalPointId parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.TerminalPointId 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.fleetengine.v1.TerminalPointId parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.TerminalPointId parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.TerminalPointId parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.TerminalPointId parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.TerminalPointId parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.TerminalPointId parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.TerminalPointId parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.TerminalPointId parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.fleetengine.v1.TerminalPointId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Deprecated: TerminalPoints are no longer supported in Fleet Engine. Use
+   * `TerminalLocation.point` instead.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.v1.TerminalPointId} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.v1.TerminalPointId) + com.google.maps.fleetengine.v1.TerminalPointIdOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.FleetEngine + .internal_static_maps_fleetengine_v1_TerminalPointId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.FleetEngine + .internal_static_maps_fleetengine_v1_TerminalPointId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.TerminalPointId.class, + com.google.maps.fleetengine.v1.TerminalPointId.Builder.class); + } + + // Construct using com.google.maps.fleetengine.v1.TerminalPointId.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + value_ = ""; + idCase_ = 0; + id_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.fleetengine.v1.FleetEngine + .internal_static_maps_fleetengine_v1_TerminalPointId_descriptor; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.TerminalPointId getDefaultInstanceForType() { + return com.google.maps.fleetengine.v1.TerminalPointId.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.TerminalPointId build() { + com.google.maps.fleetengine.v1.TerminalPointId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.TerminalPointId buildPartial() { + com.google.maps.fleetengine.v1.TerminalPointId result = + new com.google.maps.fleetengine.v1.TerminalPointId(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.fleetengine.v1.TerminalPointId result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.value_ = value_; + } + } + + private void buildPartialOneofs(com.google.maps.fleetengine.v1.TerminalPointId result) { + result.idCase_ = idCase_; + result.id_ = this.id_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.fleetengine.v1.TerminalPointId) { + return mergeFrom((com.google.maps.fleetengine.v1.TerminalPointId) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.fleetengine.v1.TerminalPointId other) { + if (other == com.google.maps.fleetengine.v1.TerminalPointId.getDefaultInstance()) return this; + if (!other.getValue().isEmpty()) { + value_ = other.value_; + bitField0_ |= 0x00000004; + onChanged(); + } + switch (other.getIdCase()) { + case PLACE_ID: + { + idCase_ = 2; + id_ = other.id_; + onChanged(); + break; + } + case GENERATED_ID: + { + idCase_ = 3; + id_ = other.id_; + onChanged(); + break; + } + case ID_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + idCase_ = 2; + id_ = s; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + idCase_ = 3; + id_ = s; + break; + } // case 26 + case 34: + { + value_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int idCase_ = 0; + private java.lang.Object id_; + + public IdCase getIdCase() { + return IdCase.forNumber(idCase_); + } + + public Builder clearId() { + idCase_ = 0; + id_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * Deprecated.
+     * 
+ * + * string place_id = 2 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalPointId.place_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=42 + * @return Whether the placeId field is set. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean hasPlaceId() { + return idCase_ == 2; + } + /** + * + * + *
+     * Deprecated.
+     * 
+ * + * string place_id = 2 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalPointId.place_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=42 + * @return The placeId. + */ + @java.lang.Override + @java.lang.Deprecated + public java.lang.String getPlaceId() { + java.lang.Object ref = ""; + if (idCase_ == 2) { + ref = id_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (idCase_ == 2) { + id_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Deprecated.
+     * 
+ * + * string place_id = 2 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalPointId.place_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=42 + * @return The bytes for placeId. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.ByteString getPlaceIdBytes() { + java.lang.Object ref = ""; + if (idCase_ == 2) { + ref = id_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (idCase_ == 2) { + id_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Deprecated.
+     * 
+ * + * string place_id = 2 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalPointId.place_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=42 + * @param value The placeId to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setPlaceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + idCase_ = 2; + id_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Deprecated.
+     * 
+ * + * string place_id = 2 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalPointId.place_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=42 + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearPlaceId() { + if (idCase_ == 2) { + idCase_ = 0; + id_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Deprecated.
+     * 
+ * + * string place_id = 2 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalPointId.place_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=42 + * @param value The bytes for placeId to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setPlaceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + idCase_ = 2; + id_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Deprecated.
+     * 
+ * + * string generated_id = 3 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalPointId.generated_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=45 + * @return Whether the generatedId field is set. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean hasGeneratedId() { + return idCase_ == 3; + } + /** + * + * + *
+     * Deprecated.
+     * 
+ * + * string generated_id = 3 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalPointId.generated_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=45 + * @return The generatedId. + */ + @java.lang.Override + @java.lang.Deprecated + public java.lang.String getGeneratedId() { + java.lang.Object ref = ""; + if (idCase_ == 3) { + ref = id_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (idCase_ == 3) { + id_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Deprecated.
+     * 
+ * + * string generated_id = 3 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalPointId.generated_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=45 + * @return The bytes for generatedId. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.ByteString getGeneratedIdBytes() { + java.lang.Object ref = ""; + if (idCase_ == 3) { + ref = id_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (idCase_ == 3) { + id_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Deprecated.
+     * 
+ * + * string generated_id = 3 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalPointId.generated_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=45 + * @param value The generatedId to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setGeneratedId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + idCase_ = 3; + id_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Deprecated.
+     * 
+ * + * string generated_id = 3 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalPointId.generated_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=45 + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearGeneratedId() { + if (idCase_ == 3) { + idCase_ = 0; + id_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Deprecated.
+     * 
+ * + * string generated_id = 3 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalPointId.generated_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=45 + * @param value The bytes for generatedId to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setGeneratedIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + idCase_ = 3; + id_ = value; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + /** + * + * + *
+     * Deprecated.
+     * 
+ * + * string value = 4 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalPointId.value is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=49 + * @return The value. + */ + @java.lang.Deprecated + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Deprecated.
+     * 
+ * + * string value = 4 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalPointId.value is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=49 + * @return The bytes for value. + */ + @java.lang.Deprecated + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Deprecated.
+     * 
+ * + * string value = 4 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalPointId.value is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=49 + * @param value The value to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Deprecated.
+     * 
+ * + * string value = 4 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalPointId.value is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=49 + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearValue() { + value_ = getDefaultInstance().getValue(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Deprecated.
+     * 
+ * + * string value = 4 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalPointId.value is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=49 + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + value_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:maps.fleetengine.v1.TerminalPointId) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.v1.TerminalPointId) + private static final com.google.maps.fleetengine.v1.TerminalPointId DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.fleetengine.v1.TerminalPointId(); + } + + public static com.google.maps.fleetengine.v1.TerminalPointId getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TerminalPointId 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.fleetengine.v1.TerminalPointId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TerminalPointIdOrBuilder.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TerminalPointIdOrBuilder.java new file mode 100644 index 000000000000..d1b287cc0d5c --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TerminalPointIdOrBuilder.java @@ -0,0 +1,152 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/fleetengine.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +@java.lang.Deprecated +public interface TerminalPointIdOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.v1.TerminalPointId) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Deprecated.
+   * 
+ * + * string place_id = 2 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalPointId.place_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=42 + * @return Whether the placeId field is set. + */ + @java.lang.Deprecated + boolean hasPlaceId(); + /** + * + * + *
+   * Deprecated.
+   * 
+ * + * string place_id = 2 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalPointId.place_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=42 + * @return The placeId. + */ + @java.lang.Deprecated + java.lang.String getPlaceId(); + /** + * + * + *
+   * Deprecated.
+   * 
+ * + * string place_id = 2 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalPointId.place_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=42 + * @return The bytes for placeId. + */ + @java.lang.Deprecated + com.google.protobuf.ByteString getPlaceIdBytes(); + + /** + * + * + *
+   * Deprecated.
+   * 
+ * + * string generated_id = 3 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalPointId.generated_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=45 + * @return Whether the generatedId field is set. + */ + @java.lang.Deprecated + boolean hasGeneratedId(); + /** + * + * + *
+   * Deprecated.
+   * 
+ * + * string generated_id = 3 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalPointId.generated_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=45 + * @return The generatedId. + */ + @java.lang.Deprecated + java.lang.String getGeneratedId(); + /** + * + * + *
+   * Deprecated.
+   * 
+ * + * string generated_id = 3 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalPointId.generated_id is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=45 + * @return The bytes for generatedId. + */ + @java.lang.Deprecated + com.google.protobuf.ByteString getGeneratedIdBytes(); + + /** + * + * + *
+   * Deprecated.
+   * 
+ * + * string value = 4 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalPointId.value is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=49 + * @return The value. + */ + @java.lang.Deprecated + java.lang.String getValue(); + /** + * + * + *
+   * Deprecated.
+   * 
+ * + * string value = 4 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.TerminalPointId.value is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=49 + * @return The bytes for value. + */ + @java.lang.Deprecated + com.google.protobuf.ByteString getValueBytes(); + + com.google.maps.fleetengine.v1.TerminalPointId.IdCase getIdCase(); +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TrafficPolylineData.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TrafficPolylineData.java new file mode 100644 index 000000000000..0e3df69ee609 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TrafficPolylineData.java @@ -0,0 +1,747 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicles.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * Traffic conditions along the expected vehicle route.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.v1.TrafficPolylineData} + */ +public final class TrafficPolylineData extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.v1.TrafficPolylineData) + TrafficPolylineDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use TrafficPolylineData.newBuilder() to construct. + private TrafficPolylineData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TrafficPolylineData() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TrafficPolylineData(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.Vehicles + .internal_static_maps_fleetengine_v1_TrafficPolylineData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.Vehicles + .internal_static_maps_fleetengine_v1_TrafficPolylineData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.TrafficPolylineData.class, + com.google.maps.fleetengine.v1.TrafficPolylineData.Builder.class); + } + + private int bitField0_; + public static final int TRAFFIC_RENDERING_FIELD_NUMBER = 1; + private com.google.maps.fleetengine.v1.VisualTrafficReportPolylineRendering trafficRendering_; + /** + * + * + *
+   * A polyline rendering of how fast traffic is for all regions along
+   * one stretch of a customer ride.
+   * 
+ * + * .maps.fleetengine.v1.VisualTrafficReportPolylineRendering traffic_rendering = 1; + * + * @return Whether the trafficRendering field is set. + */ + @java.lang.Override + public boolean hasTrafficRendering() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * A polyline rendering of how fast traffic is for all regions along
+   * one stretch of a customer ride.
+   * 
+ * + * .maps.fleetengine.v1.VisualTrafficReportPolylineRendering traffic_rendering = 1; + * + * @return The trafficRendering. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.VisualTrafficReportPolylineRendering getTrafficRendering() { + return trafficRendering_ == null + ? com.google.maps.fleetengine.v1.VisualTrafficReportPolylineRendering.getDefaultInstance() + : trafficRendering_; + } + /** + * + * + *
+   * A polyline rendering of how fast traffic is for all regions along
+   * one stretch of a customer ride.
+   * 
+ * + * .maps.fleetengine.v1.VisualTrafficReportPolylineRendering traffic_rendering = 1; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.VisualTrafficReportPolylineRenderingOrBuilder + getTrafficRenderingOrBuilder() { + return trafficRendering_ == null + ? com.google.maps.fleetengine.v1.VisualTrafficReportPolylineRendering.getDefaultInstance() + : trafficRendering_; + } + + 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, getTrafficRendering()); + } + 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, getTrafficRendering()); + } + 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.fleetengine.v1.TrafficPolylineData)) { + return super.equals(obj); + } + com.google.maps.fleetengine.v1.TrafficPolylineData other = + (com.google.maps.fleetengine.v1.TrafficPolylineData) obj; + + if (hasTrafficRendering() != other.hasTrafficRendering()) return false; + if (hasTrafficRendering()) { + if (!getTrafficRendering().equals(other.getTrafficRendering())) 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 (hasTrafficRendering()) { + hash = (37 * hash) + TRAFFIC_RENDERING_FIELD_NUMBER; + hash = (53 * hash) + getTrafficRendering().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.fleetengine.v1.TrafficPolylineData parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.TrafficPolylineData 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.fleetengine.v1.TrafficPolylineData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.TrafficPolylineData 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.fleetengine.v1.TrafficPolylineData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.TrafficPolylineData parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.TrafficPolylineData parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.TrafficPolylineData parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.TrafficPolylineData parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.TrafficPolylineData parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.TrafficPolylineData parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.TrafficPolylineData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.fleetengine.v1.TrafficPolylineData prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Traffic conditions along the expected vehicle route.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.v1.TrafficPolylineData} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.v1.TrafficPolylineData) + com.google.maps.fleetengine.v1.TrafficPolylineDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.Vehicles + .internal_static_maps_fleetengine_v1_TrafficPolylineData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.Vehicles + .internal_static_maps_fleetengine_v1_TrafficPolylineData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.TrafficPolylineData.class, + com.google.maps.fleetengine.v1.TrafficPolylineData.Builder.class); + } + + // Construct using com.google.maps.fleetengine.v1.TrafficPolylineData.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTrafficRenderingFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + trafficRendering_ = null; + if (trafficRenderingBuilder_ != null) { + trafficRenderingBuilder_.dispose(); + trafficRenderingBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.fleetengine.v1.Vehicles + .internal_static_maps_fleetengine_v1_TrafficPolylineData_descriptor; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.TrafficPolylineData getDefaultInstanceForType() { + return com.google.maps.fleetengine.v1.TrafficPolylineData.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.TrafficPolylineData build() { + com.google.maps.fleetengine.v1.TrafficPolylineData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.TrafficPolylineData buildPartial() { + com.google.maps.fleetengine.v1.TrafficPolylineData result = + new com.google.maps.fleetengine.v1.TrafficPolylineData(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.fleetengine.v1.TrafficPolylineData result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.trafficRendering_ = + trafficRenderingBuilder_ == null ? trafficRendering_ : trafficRenderingBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.fleetengine.v1.TrafficPolylineData) { + return mergeFrom((com.google.maps.fleetengine.v1.TrafficPolylineData) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.fleetengine.v1.TrafficPolylineData other) { + if (other == com.google.maps.fleetengine.v1.TrafficPolylineData.getDefaultInstance()) + return this; + if (other.hasTrafficRendering()) { + mergeTrafficRendering(other.getTrafficRendering()); + } + 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( + getTrafficRenderingFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.maps.fleetengine.v1.VisualTrafficReportPolylineRendering trafficRendering_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.VisualTrafficReportPolylineRendering, + com.google.maps.fleetengine.v1.VisualTrafficReportPolylineRendering.Builder, + com.google.maps.fleetengine.v1.VisualTrafficReportPolylineRenderingOrBuilder> + trafficRenderingBuilder_; + /** + * + * + *
+     * A polyline rendering of how fast traffic is for all regions along
+     * one stretch of a customer ride.
+     * 
+ * + * .maps.fleetengine.v1.VisualTrafficReportPolylineRendering traffic_rendering = 1; + * + * @return Whether the trafficRendering field is set. + */ + public boolean hasTrafficRendering() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * A polyline rendering of how fast traffic is for all regions along
+     * one stretch of a customer ride.
+     * 
+ * + * .maps.fleetengine.v1.VisualTrafficReportPolylineRendering traffic_rendering = 1; + * + * @return The trafficRendering. + */ + public com.google.maps.fleetengine.v1.VisualTrafficReportPolylineRendering + getTrafficRendering() { + if (trafficRenderingBuilder_ == null) { + return trafficRendering_ == null + ? com.google.maps.fleetengine.v1.VisualTrafficReportPolylineRendering + .getDefaultInstance() + : trafficRendering_; + } else { + return trafficRenderingBuilder_.getMessage(); + } + } + /** + * + * + *
+     * A polyline rendering of how fast traffic is for all regions along
+     * one stretch of a customer ride.
+     * 
+ * + * .maps.fleetengine.v1.VisualTrafficReportPolylineRendering traffic_rendering = 1; + */ + public Builder setTrafficRendering( + com.google.maps.fleetengine.v1.VisualTrafficReportPolylineRendering value) { + if (trafficRenderingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + trafficRendering_ = value; + } else { + trafficRenderingBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * A polyline rendering of how fast traffic is for all regions along
+     * one stretch of a customer ride.
+     * 
+ * + * .maps.fleetengine.v1.VisualTrafficReportPolylineRendering traffic_rendering = 1; + */ + public Builder setTrafficRendering( + com.google.maps.fleetengine.v1.VisualTrafficReportPolylineRendering.Builder + builderForValue) { + if (trafficRenderingBuilder_ == null) { + trafficRendering_ = builderForValue.build(); + } else { + trafficRenderingBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * A polyline rendering of how fast traffic is for all regions along
+     * one stretch of a customer ride.
+     * 
+ * + * .maps.fleetengine.v1.VisualTrafficReportPolylineRendering traffic_rendering = 1; + */ + public Builder mergeTrafficRendering( + com.google.maps.fleetengine.v1.VisualTrafficReportPolylineRendering value) { + if (trafficRenderingBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && trafficRendering_ != null + && trafficRendering_ + != com.google.maps.fleetengine.v1.VisualTrafficReportPolylineRendering + .getDefaultInstance()) { + getTrafficRenderingBuilder().mergeFrom(value); + } else { + trafficRendering_ = value; + } + } else { + trafficRenderingBuilder_.mergeFrom(value); + } + if (trafficRendering_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * A polyline rendering of how fast traffic is for all regions along
+     * one stretch of a customer ride.
+     * 
+ * + * .maps.fleetengine.v1.VisualTrafficReportPolylineRendering traffic_rendering = 1; + */ + public Builder clearTrafficRendering() { + bitField0_ = (bitField0_ & ~0x00000001); + trafficRendering_ = null; + if (trafficRenderingBuilder_ != null) { + trafficRenderingBuilder_.dispose(); + trafficRenderingBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * A polyline rendering of how fast traffic is for all regions along
+     * one stretch of a customer ride.
+     * 
+ * + * .maps.fleetengine.v1.VisualTrafficReportPolylineRendering traffic_rendering = 1; + */ + public com.google.maps.fleetengine.v1.VisualTrafficReportPolylineRendering.Builder + getTrafficRenderingBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getTrafficRenderingFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A polyline rendering of how fast traffic is for all regions along
+     * one stretch of a customer ride.
+     * 
+ * + * .maps.fleetengine.v1.VisualTrafficReportPolylineRendering traffic_rendering = 1; + */ + public com.google.maps.fleetengine.v1.VisualTrafficReportPolylineRenderingOrBuilder + getTrafficRenderingOrBuilder() { + if (trafficRenderingBuilder_ != null) { + return trafficRenderingBuilder_.getMessageOrBuilder(); + } else { + return trafficRendering_ == null + ? com.google.maps.fleetengine.v1.VisualTrafficReportPolylineRendering + .getDefaultInstance() + : trafficRendering_; + } + } + /** + * + * + *
+     * A polyline rendering of how fast traffic is for all regions along
+     * one stretch of a customer ride.
+     * 
+ * + * .maps.fleetengine.v1.VisualTrafficReportPolylineRendering traffic_rendering = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.VisualTrafficReportPolylineRendering, + com.google.maps.fleetengine.v1.VisualTrafficReportPolylineRendering.Builder, + com.google.maps.fleetengine.v1.VisualTrafficReportPolylineRenderingOrBuilder> + getTrafficRenderingFieldBuilder() { + if (trafficRenderingBuilder_ == null) { + trafficRenderingBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.VisualTrafficReportPolylineRendering, + com.google.maps.fleetengine.v1.VisualTrafficReportPolylineRendering.Builder, + com.google.maps.fleetengine.v1.VisualTrafficReportPolylineRenderingOrBuilder>( + getTrafficRendering(), getParentForChildren(), isClean()); + trafficRendering_ = null; + } + return trafficRenderingBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:maps.fleetengine.v1.TrafficPolylineData) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.v1.TrafficPolylineData) + private static final com.google.maps.fleetengine.v1.TrafficPolylineData DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.fleetengine.v1.TrafficPolylineData(); + } + + public static com.google.maps.fleetengine.v1.TrafficPolylineData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TrafficPolylineData 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.fleetengine.v1.TrafficPolylineData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TrafficPolylineDataOrBuilder.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TrafficPolylineDataOrBuilder.java new file mode 100644 index 000000000000..a8218807c90c --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TrafficPolylineDataOrBuilder.java @@ -0,0 +1,65 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicles.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public interface TrafficPolylineDataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.v1.TrafficPolylineData) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A polyline rendering of how fast traffic is for all regions along
+   * one stretch of a customer ride.
+   * 
+ * + * .maps.fleetengine.v1.VisualTrafficReportPolylineRendering traffic_rendering = 1; + * + * @return Whether the trafficRendering field is set. + */ + boolean hasTrafficRendering(); + /** + * + * + *
+   * A polyline rendering of how fast traffic is for all regions along
+   * one stretch of a customer ride.
+   * 
+ * + * .maps.fleetengine.v1.VisualTrafficReportPolylineRendering traffic_rendering = 1; + * + * @return The trafficRendering. + */ + com.google.maps.fleetengine.v1.VisualTrafficReportPolylineRendering getTrafficRendering(); + /** + * + * + *
+   * A polyline rendering of how fast traffic is for all regions along
+   * one stretch of a customer ride.
+   * 
+ * + * .maps.fleetengine.v1.VisualTrafficReportPolylineRendering traffic_rendering = 1; + */ + com.google.maps.fleetengine.v1.VisualTrafficReportPolylineRenderingOrBuilder + getTrafficRenderingOrBuilder(); +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TrafficProto.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TrafficProto.java new file mode 100644 index 000000000000..5c56c847292c --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TrafficProto.java @@ -0,0 +1,88 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/traffic.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public final class TrafficProto { + private TrafficProto() {} + + 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_maps_fleetengine_v1_SpeedReadingInterval_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_v1_SpeedReadingInterval_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_v1_ConsumableTrafficPolyline_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_v1_ConsumableTrafficPolyline_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n(google/maps/fleetengine/v1/traffic.pro" + + "to\022\023maps.fleetengine.v1\"\343\001\n\024SpeedReading" + + "Interval\022\"\n\032start_polyline_point_index\030\001" + + " \001(\005\022 \n\030end_polyline_point_index\030\002 \001(\005\022>" + + "\n\005speed\030\003 \001(\0162/.maps.fleetengine.v1.Spee" + + "dReadingInterval.Speed\"E\n\005Speed\022\025\n\021SPEED" + + "_UNSPECIFIED\020\000\022\n\n\006NORMAL\020\001\022\010\n\004SLOW\020\002\022\017\n\013" + + "TRAFFIC_JAM\020\003\"\210\001\n\031ConsumableTrafficPolyl" + + "ine\022I\n\026speed_reading_interval\030\001 \003(\0132).ma" + + "ps.fleetengine.v1.SpeedReadingInterval\022 " + + "\n\030encoded_path_to_waypoint\030\002 \001(\tB\330\001\n\036com" + + ".google.maps.fleetengine.v1B\014TrafficProt" + + "oP\001ZFcloud.google.com/go/maps/fleetengin" + + "e/apiv1/fleetenginepb;fleetenginepb\242\002\003CF" + + "E\252\002\032Google.Maps.FleetEngine.V1\312\002\032Google\\" + + "Maps\\FleetEngine\\V1\352\002\035Google::Maps::Flee" + + "tEngine::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_maps_fleetengine_v1_SpeedReadingInterval_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_maps_fleetengine_v1_SpeedReadingInterval_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_v1_SpeedReadingInterval_descriptor, + new java.lang.String[] { + "StartPolylinePointIndex", "EndPolylinePointIndex", "Speed", + }); + internal_static_maps_fleetengine_v1_ConsumableTrafficPolyline_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_maps_fleetengine_v1_ConsumableTrafficPolyline_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_v1_ConsumableTrafficPolyline_descriptor, + new java.lang.String[] { + "SpeedReadingInterval", "EncodedPathToWaypoint", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/Trip.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/Trip.java new file mode 100644 index 000000000000..4e590ca59b2d --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/Trip.java @@ -0,0 +1,11073 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/trips.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * Trip metadata.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.v1.Trip} + */ +public final class Trip extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.v1.Trip) + TripOrBuilder { + private static final long serialVersionUID = 0L; + // Use Trip.newBuilder() to construct. + private Trip(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Trip() { + name_ = ""; + vehicleId_ = ""; + tripStatus_ = 0; + tripType_ = 0; + intermediateDestinations_ = java.util.Collections.emptyList(); + actualIntermediateDestinationArrivalPoints_ = java.util.Collections.emptyList(); + actualIntermediateDestinations_ = java.util.Collections.emptyList(); + remainingWaypoints_ = java.util.Collections.emptyList(); + vehicleWaypoints_ = java.util.Collections.emptyList(); + route_ = java.util.Collections.emptyList(); + currentRouteSegment_ = ""; + view_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Trip(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.Trips.internal_static_maps_fleetengine_v1_Trip_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.Trips + .internal_static_maps_fleetengine_v1_Trip_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.Trip.class, + com.google.maps.fleetengine.v1.Trip.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. In the format "providers/{provider}/trips/{trip}"
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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. In the format "providers/{provider}/trips/{trip}"
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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 VEHICLE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object vehicleId_ = ""; + /** + * + * + *
+   * ID of the vehicle making this trip.
+   * 
+ * + * string vehicle_id = 2; + * + * @return The vehicleId. + */ + @java.lang.Override + public java.lang.String getVehicleId() { + java.lang.Object ref = vehicleId_; + 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(); + vehicleId_ = s; + return s; + } + } + /** + * + * + *
+   * ID of the vehicle making this trip.
+   * 
+ * + * string vehicle_id = 2; + * + * @return The bytes for vehicleId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVehicleIdBytes() { + java.lang.Object ref = vehicleId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vehicleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRIP_STATUS_FIELD_NUMBER = 3; + private int tripStatus_ = 0; + /** + * + * + *
+   * Current status of the trip.
+   * 
+ * + * .maps.fleetengine.v1.TripStatus trip_status = 3; + * + * @return The enum numeric value on the wire for tripStatus. + */ + @java.lang.Override + public int getTripStatusValue() { + return tripStatus_; + } + /** + * + * + *
+   * Current status of the trip.
+   * 
+ * + * .maps.fleetengine.v1.TripStatus trip_status = 3; + * + * @return The tripStatus. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TripStatus getTripStatus() { + com.google.maps.fleetengine.v1.TripStatus result = + com.google.maps.fleetengine.v1.TripStatus.forNumber(tripStatus_); + return result == null ? com.google.maps.fleetengine.v1.TripStatus.UNRECOGNIZED : result; + } + + public static final int TRIP_TYPE_FIELD_NUMBER = 4; + private int tripType_ = 0; + /** + * + * + *
+   * The type of the trip.
+   * 
+ * + * .maps.fleetengine.v1.TripType trip_type = 4; + * + * @return The enum numeric value on the wire for tripType. + */ + @java.lang.Override + public int getTripTypeValue() { + return tripType_; + } + /** + * + * + *
+   * The type of the trip.
+   * 
+ * + * .maps.fleetengine.v1.TripType trip_type = 4; + * + * @return The tripType. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TripType getTripType() { + com.google.maps.fleetengine.v1.TripType result = + com.google.maps.fleetengine.v1.TripType.forNumber(tripType_); + return result == null ? com.google.maps.fleetengine.v1.TripType.UNRECOGNIZED : result; + } + + public static final int PICKUP_POINT_FIELD_NUMBER = 5; + private com.google.maps.fleetengine.v1.TerminalLocation pickupPoint_; + /** + * + * + *
+   * Location where customer indicates they will be picked up.
+   * 
+ * + * .maps.fleetengine.v1.TerminalLocation pickup_point = 5; + * + * @return Whether the pickupPoint field is set. + */ + @java.lang.Override + public boolean hasPickupPoint() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Location where customer indicates they will be picked up.
+   * 
+ * + * .maps.fleetengine.v1.TerminalLocation pickup_point = 5; + * + * @return The pickupPoint. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TerminalLocation getPickupPoint() { + return pickupPoint_ == null + ? com.google.maps.fleetengine.v1.TerminalLocation.getDefaultInstance() + : pickupPoint_; + } + /** + * + * + *
+   * Location where customer indicates they will be picked up.
+   * 
+ * + * .maps.fleetengine.v1.TerminalLocation pickup_point = 5; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TerminalLocationOrBuilder getPickupPointOrBuilder() { + return pickupPoint_ == null + ? com.google.maps.fleetengine.v1.TerminalLocation.getDefaultInstance() + : pickupPoint_; + } + + public static final int ACTUAL_PICKUP_POINT_FIELD_NUMBER = 22; + private com.google.maps.fleetengine.v1.StopLocation actualPickupPoint_; + /** + * + * + *
+   * Input only. The actual location when and where customer was picked up.
+   * This field is for provider to provide feedback on actual pickup
+   * information.
+   * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_pickup_point = 22 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the actualPickupPoint field is set. + */ + @java.lang.Override + public boolean hasActualPickupPoint() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Input only. The actual location when and where customer was picked up.
+   * This field is for provider to provide feedback on actual pickup
+   * information.
+   * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_pickup_point = 22 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The actualPickupPoint. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.StopLocation getActualPickupPoint() { + return actualPickupPoint_ == null + ? com.google.maps.fleetengine.v1.StopLocation.getDefaultInstance() + : actualPickupPoint_; + } + /** + * + * + *
+   * Input only. The actual location when and where customer was picked up.
+   * This field is for provider to provide feedback on actual pickup
+   * information.
+   * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_pickup_point = 22 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.StopLocationOrBuilder getActualPickupPointOrBuilder() { + return actualPickupPoint_ == null + ? com.google.maps.fleetengine.v1.StopLocation.getDefaultInstance() + : actualPickupPoint_; + } + + public static final int ACTUAL_PICKUP_ARRIVAL_POINT_FIELD_NUMBER = 32; + private com.google.maps.fleetengine.v1.StopLocation actualPickupArrivalPoint_; + /** + * + * + *
+   * Input only. The actual time and location of the driver arrival at
+   * the pickup point.
+   * This field is for provider to provide feedback on actual arrival
+   * information at the pickup point.
+   * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_pickup_arrival_point = 32 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the actualPickupArrivalPoint field is set. + */ + @java.lang.Override + public boolean hasActualPickupArrivalPoint() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Input only. The actual time and location of the driver arrival at
+   * the pickup point.
+   * This field is for provider to provide feedback on actual arrival
+   * information at the pickup point.
+   * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_pickup_arrival_point = 32 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The actualPickupArrivalPoint. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.StopLocation getActualPickupArrivalPoint() { + return actualPickupArrivalPoint_ == null + ? com.google.maps.fleetengine.v1.StopLocation.getDefaultInstance() + : actualPickupArrivalPoint_; + } + /** + * + * + *
+   * Input only. The actual time and location of the driver arrival at
+   * the pickup point.
+   * This field is for provider to provide feedback on actual arrival
+   * information at the pickup point.
+   * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_pickup_arrival_point = 32 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.StopLocationOrBuilder + getActualPickupArrivalPointOrBuilder() { + return actualPickupArrivalPoint_ == null + ? com.google.maps.fleetengine.v1.StopLocation.getDefaultInstance() + : actualPickupArrivalPoint_; + } + + public static final int PICKUP_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp pickupTime_; + /** + * + * + *
+   * Output only. Either the estimated future time when the rider(s) will be
+   * picked up, or the actual time when they were picked up.
+   * 
+ * + * .google.protobuf.Timestamp pickup_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the pickupTime field is set. + */ + @java.lang.Override + public boolean hasPickupTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * Output only. Either the estimated future time when the rider(s) will be
+   * picked up, or the actual time when they were picked up.
+   * 
+ * + * .google.protobuf.Timestamp pickup_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The pickupTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getPickupTime() { + return pickupTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : pickupTime_; + } + /** + * + * + *
+   * Output only. Either the estimated future time when the rider(s) will be
+   * picked up, or the actual time when they were picked up.
+   * 
+ * + * .google.protobuf.Timestamp pickup_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getPickupTimeOrBuilder() { + return pickupTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : pickupTime_; + } + + public static final int INTERMEDIATE_DESTINATIONS_FIELD_NUMBER = 14; + + @SuppressWarnings("serial") + private java.util.List intermediateDestinations_; + /** + * + * + *
+   * Intermediate stops in order that the trip requests (in addition
+   * to pickup and dropoff). Initially this will not be supported for shared
+   * trips.
+   * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation intermediate_destinations = 14; + */ + @java.lang.Override + public java.util.List + getIntermediateDestinationsList() { + return intermediateDestinations_; + } + /** + * + * + *
+   * Intermediate stops in order that the trip requests (in addition
+   * to pickup and dropoff). Initially this will not be supported for shared
+   * trips.
+   * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation intermediate_destinations = 14; + */ + @java.lang.Override + public java.util.List + getIntermediateDestinationsOrBuilderList() { + return intermediateDestinations_; + } + /** + * + * + *
+   * Intermediate stops in order that the trip requests (in addition
+   * to pickup and dropoff). Initially this will not be supported for shared
+   * trips.
+   * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation intermediate_destinations = 14; + */ + @java.lang.Override + public int getIntermediateDestinationsCount() { + return intermediateDestinations_.size(); + } + /** + * + * + *
+   * Intermediate stops in order that the trip requests (in addition
+   * to pickup and dropoff). Initially this will not be supported for shared
+   * trips.
+   * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation intermediate_destinations = 14; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TerminalLocation getIntermediateDestinations(int index) { + return intermediateDestinations_.get(index); + } + /** + * + * + *
+   * Intermediate stops in order that the trip requests (in addition
+   * to pickup and dropoff). Initially this will not be supported for shared
+   * trips.
+   * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation intermediate_destinations = 14; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TerminalLocationOrBuilder + getIntermediateDestinationsOrBuilder(int index) { + return intermediateDestinations_.get(index); + } + + public static final int INTERMEDIATE_DESTINATIONS_VERSION_FIELD_NUMBER = 25; + private com.google.protobuf.Timestamp intermediateDestinationsVersion_; + /** + * + * + *
+   * Indicates the last time the `intermediate_destinations` was modified.
+   * Your server should cache this value and pass it in `UpdateTripRequest`
+   * when update `intermediate_destination_index` to ensure the
+   * `intermediate_destinations` is not changed.
+   * 
+ * + * .google.protobuf.Timestamp intermediate_destinations_version = 25; + * + * @return Whether the intermediateDestinationsVersion field is set. + */ + @java.lang.Override + public boolean hasIntermediateDestinationsVersion() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+   * Indicates the last time the `intermediate_destinations` was modified.
+   * Your server should cache this value and pass it in `UpdateTripRequest`
+   * when update `intermediate_destination_index` to ensure the
+   * `intermediate_destinations` is not changed.
+   * 
+ * + * .google.protobuf.Timestamp intermediate_destinations_version = 25; + * + * @return The intermediateDestinationsVersion. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getIntermediateDestinationsVersion() { + return intermediateDestinationsVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : intermediateDestinationsVersion_; + } + /** + * + * + *
+   * Indicates the last time the `intermediate_destinations` was modified.
+   * Your server should cache this value and pass it in `UpdateTripRequest`
+   * when update `intermediate_destination_index` to ensure the
+   * `intermediate_destinations` is not changed.
+   * 
+ * + * .google.protobuf.Timestamp intermediate_destinations_version = 25; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getIntermediateDestinationsVersionOrBuilder() { + return intermediateDestinationsVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : intermediateDestinationsVersion_; + } + + public static final int INTERMEDIATE_DESTINATION_INDEX_FIELD_NUMBER = 15; + private int intermediateDestinationIndex_ = 0; + /** + * + * + *
+   * When `TripStatus` is `ENROUTE_TO_INTERMEDIATE_DESTINATION`, a number
+   * between [0..N-1] indicating which intermediate destination the vehicle will
+   * cross next. When `TripStatus` is `ARRIVED_AT_INTERMEDIATE_DESTINATION`, a
+   * number between [0..N-1] indicating which intermediate destination the
+   * vehicle is at. The provider sets this value. If there are no
+   * `intermediate_destinations`, this field is ignored.
+   * 
+ * + * int32 intermediate_destination_index = 15; + * + * @return The intermediateDestinationIndex. + */ + @java.lang.Override + public int getIntermediateDestinationIndex() { + return intermediateDestinationIndex_; + } + + public static final int ACTUAL_INTERMEDIATE_DESTINATION_ARRIVAL_POINTS_FIELD_NUMBER = 33; + + @SuppressWarnings("serial") + private java.util.List + actualIntermediateDestinationArrivalPoints_; + /** + * + * + *
+   * Input only. The actual time and location of the driver's arrival at
+   * an intermediate destination.
+   * This field is for provider to provide feedback on actual arrival
+   * information at intermediate destinations.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destination_arrival_points = 33 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getActualIntermediateDestinationArrivalPointsList() { + return actualIntermediateDestinationArrivalPoints_; + } + /** + * + * + *
+   * Input only. The actual time and location of the driver's arrival at
+   * an intermediate destination.
+   * This field is for provider to provide feedback on actual arrival
+   * information at intermediate destinations.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destination_arrival_points = 33 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getActualIntermediateDestinationArrivalPointsOrBuilderList() { + return actualIntermediateDestinationArrivalPoints_; + } + /** + * + * + *
+   * Input only. The actual time and location of the driver's arrival at
+   * an intermediate destination.
+   * This field is for provider to provide feedback on actual arrival
+   * information at intermediate destinations.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destination_arrival_points = 33 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Override + public int getActualIntermediateDestinationArrivalPointsCount() { + return actualIntermediateDestinationArrivalPoints_.size(); + } + /** + * + * + *
+   * Input only. The actual time and location of the driver's arrival at
+   * an intermediate destination.
+   * This field is for provider to provide feedback on actual arrival
+   * information at intermediate destinations.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destination_arrival_points = 33 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.StopLocation getActualIntermediateDestinationArrivalPoints( + int index) { + return actualIntermediateDestinationArrivalPoints_.get(index); + } + /** + * + * + *
+   * Input only. The actual time and location of the driver's arrival at
+   * an intermediate destination.
+   * This field is for provider to provide feedback on actual arrival
+   * information at intermediate destinations.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destination_arrival_points = 33 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.StopLocationOrBuilder + getActualIntermediateDestinationArrivalPointsOrBuilder(int index) { + return actualIntermediateDestinationArrivalPoints_.get(index); + } + + public static final int ACTUAL_INTERMEDIATE_DESTINATIONS_FIELD_NUMBER = 34; + + @SuppressWarnings("serial") + private java.util.List + actualIntermediateDestinations_; + /** + * + * + *
+   * Input only. The actual time and location when and where the customer was
+   * picked up from an intermediate destination. This field is for provider to
+   * provide feedback on actual pickup information at intermediate destinations.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destinations = 34 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getActualIntermediateDestinationsList() { + return actualIntermediateDestinations_; + } + /** + * + * + *
+   * Input only. The actual time and location when and where the customer was
+   * picked up from an intermediate destination. This field is for provider to
+   * provide feedback on actual pickup information at intermediate destinations.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destinations = 34 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getActualIntermediateDestinationsOrBuilderList() { + return actualIntermediateDestinations_; + } + /** + * + * + *
+   * Input only. The actual time and location when and where the customer was
+   * picked up from an intermediate destination. This field is for provider to
+   * provide feedback on actual pickup information at intermediate destinations.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destinations = 34 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Override + public int getActualIntermediateDestinationsCount() { + return actualIntermediateDestinations_.size(); + } + /** + * + * + *
+   * Input only. The actual time and location when and where the customer was
+   * picked up from an intermediate destination. This field is for provider to
+   * provide feedback on actual pickup information at intermediate destinations.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destinations = 34 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.StopLocation getActualIntermediateDestinations(int index) { + return actualIntermediateDestinations_.get(index); + } + /** + * + * + *
+   * Input only. The actual time and location when and where the customer was
+   * picked up from an intermediate destination. This field is for provider to
+   * provide feedback on actual pickup information at intermediate destinations.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destinations = 34 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.StopLocationOrBuilder + getActualIntermediateDestinationsOrBuilder(int index) { + return actualIntermediateDestinations_.get(index); + } + + public static final int DROPOFF_POINT_FIELD_NUMBER = 7; + private com.google.maps.fleetengine.v1.TerminalLocation dropoffPoint_; + /** + * + * + *
+   * Location where customer indicates they will be dropped off.
+   * 
+ * + * .maps.fleetengine.v1.TerminalLocation dropoff_point = 7; + * + * @return Whether the dropoffPoint field is set. + */ + @java.lang.Override + public boolean hasDropoffPoint() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+   * Location where customer indicates they will be dropped off.
+   * 
+ * + * .maps.fleetengine.v1.TerminalLocation dropoff_point = 7; + * + * @return The dropoffPoint. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TerminalLocation getDropoffPoint() { + return dropoffPoint_ == null + ? com.google.maps.fleetengine.v1.TerminalLocation.getDefaultInstance() + : dropoffPoint_; + } + /** + * + * + *
+   * Location where customer indicates they will be dropped off.
+   * 
+ * + * .maps.fleetengine.v1.TerminalLocation dropoff_point = 7; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TerminalLocationOrBuilder getDropoffPointOrBuilder() { + return dropoffPoint_ == null + ? com.google.maps.fleetengine.v1.TerminalLocation.getDefaultInstance() + : dropoffPoint_; + } + + public static final int ACTUAL_DROPOFF_POINT_FIELD_NUMBER = 23; + private com.google.maps.fleetengine.v1.StopLocation actualDropoffPoint_; + /** + * + * + *
+   * Input only. The actual time and location when and where customer was
+   * dropped off. This field is for provider to provide feedback on actual
+   * dropoff information.
+   * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_dropoff_point = 23 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the actualDropoffPoint field is set. + */ + @java.lang.Override + public boolean hasActualDropoffPoint() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+   * Input only. The actual time and location when and where customer was
+   * dropped off. This field is for provider to provide feedback on actual
+   * dropoff information.
+   * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_dropoff_point = 23 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The actualDropoffPoint. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.StopLocation getActualDropoffPoint() { + return actualDropoffPoint_ == null + ? com.google.maps.fleetengine.v1.StopLocation.getDefaultInstance() + : actualDropoffPoint_; + } + /** + * + * + *
+   * Input only. The actual time and location when and where customer was
+   * dropped off. This field is for provider to provide feedback on actual
+   * dropoff information.
+   * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_dropoff_point = 23 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.StopLocationOrBuilder getActualDropoffPointOrBuilder() { + return actualDropoffPoint_ == null + ? com.google.maps.fleetengine.v1.StopLocation.getDefaultInstance() + : actualDropoffPoint_; + } + + public static final int DROPOFF_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp dropoffTime_; + /** + * + * + *
+   * Output only. Either the estimated future time when the rider(s) will be
+   * dropped off at the final destination, or the actual time when they were
+   * dropped off.
+   * 
+ * + * .google.protobuf.Timestamp dropoff_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the dropoffTime field is set. + */ + @java.lang.Override + public boolean hasDropoffTime() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+   * Output only. Either the estimated future time when the rider(s) will be
+   * dropped off at the final destination, or the actual time when they were
+   * dropped off.
+   * 
+ * + * .google.protobuf.Timestamp dropoff_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The dropoffTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getDropoffTime() { + return dropoffTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : dropoffTime_; + } + /** + * + * + *
+   * Output only. Either the estimated future time when the rider(s) will be
+   * dropped off at the final destination, or the actual time when they were
+   * dropped off.
+   * 
+ * + * .google.protobuf.Timestamp dropoff_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getDropoffTimeOrBuilder() { + return dropoffTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : dropoffTime_; + } + + public static final int REMAINING_WAYPOINTS_FIELD_NUMBER = 16; + + @SuppressWarnings("serial") + private java.util.List remainingWaypoints_; + /** + * + * + *
+   * Output only. The full path from the current location to the dropoff point,
+   * inclusive. This path could include waypoints from other trips.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.TripWaypoint remaining_waypoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getRemainingWaypointsList() { + return remainingWaypoints_; + } + /** + * + * + *
+   * Output only. The full path from the current location to the dropoff point,
+   * inclusive. This path could include waypoints from other trips.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.TripWaypoint remaining_waypoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getRemainingWaypointsOrBuilderList() { + return remainingWaypoints_; + } + /** + * + * + *
+   * Output only. The full path from the current location to the dropoff point,
+   * inclusive. This path could include waypoints from other trips.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.TripWaypoint remaining_waypoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getRemainingWaypointsCount() { + return remainingWaypoints_.size(); + } + /** + * + * + *
+   * Output only. The full path from the current location to the dropoff point,
+   * inclusive. This path could include waypoints from other trips.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.TripWaypoint remaining_waypoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TripWaypoint getRemainingWaypoints(int index) { + return remainingWaypoints_.get(index); + } + /** + * + * + *
+   * Output only. The full path from the current location to the dropoff point,
+   * inclusive. This path could include waypoints from other trips.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.TripWaypoint remaining_waypoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TripWaypointOrBuilder getRemainingWaypointsOrBuilder( + int index) { + return remainingWaypoints_.get(index); + } + + public static final int VEHICLE_WAYPOINTS_FIELD_NUMBER = 20; + + @SuppressWarnings("serial") + private java.util.List vehicleWaypoints_; + /** + * + * + *
+   * This field supports manual ordering of the waypoints for the trip. It
+   * contains all of the remaining waypoints for the assigned vehicle, as well
+   * as the pickup and drop-off waypoints for this trip. If the trip hasn't been
+   * assigned to a vehicle, then Fleet Engine ignores this field. For privacy
+   * reasons, this field is only populated by the server on `UpdateTrip` and
+   * `CreateTrip` calls, NOT on `GetTrip` calls.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint vehicle_waypoints = 20; + */ + @java.lang.Override + public java.util.List getVehicleWaypointsList() { + return vehicleWaypoints_; + } + /** + * + * + *
+   * This field supports manual ordering of the waypoints for the trip. It
+   * contains all of the remaining waypoints for the assigned vehicle, as well
+   * as the pickup and drop-off waypoints for this trip. If the trip hasn't been
+   * assigned to a vehicle, then Fleet Engine ignores this field. For privacy
+   * reasons, this field is only populated by the server on `UpdateTrip` and
+   * `CreateTrip` calls, NOT on `GetTrip` calls.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint vehicle_waypoints = 20; + */ + @java.lang.Override + public java.util.List + getVehicleWaypointsOrBuilderList() { + return vehicleWaypoints_; + } + /** + * + * + *
+   * This field supports manual ordering of the waypoints for the trip. It
+   * contains all of the remaining waypoints for the assigned vehicle, as well
+   * as the pickup and drop-off waypoints for this trip. If the trip hasn't been
+   * assigned to a vehicle, then Fleet Engine ignores this field. For privacy
+   * reasons, this field is only populated by the server on `UpdateTrip` and
+   * `CreateTrip` calls, NOT on `GetTrip` calls.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint vehicle_waypoints = 20; + */ + @java.lang.Override + public int getVehicleWaypointsCount() { + return vehicleWaypoints_.size(); + } + /** + * + * + *
+   * This field supports manual ordering of the waypoints for the trip. It
+   * contains all of the remaining waypoints for the assigned vehicle, as well
+   * as the pickup and drop-off waypoints for this trip. If the trip hasn't been
+   * assigned to a vehicle, then Fleet Engine ignores this field. For privacy
+   * reasons, this field is only populated by the server on `UpdateTrip` and
+   * `CreateTrip` calls, NOT on `GetTrip` calls.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint vehicle_waypoints = 20; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TripWaypoint getVehicleWaypoints(int index) { + return vehicleWaypoints_.get(index); + } + /** + * + * + *
+   * This field supports manual ordering of the waypoints for the trip. It
+   * contains all of the remaining waypoints for the assigned vehicle, as well
+   * as the pickup and drop-off waypoints for this trip. If the trip hasn't been
+   * assigned to a vehicle, then Fleet Engine ignores this field. For privacy
+   * reasons, this field is only populated by the server on `UpdateTrip` and
+   * `CreateTrip` calls, NOT on `GetTrip` calls.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint vehicle_waypoints = 20; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TripWaypointOrBuilder getVehicleWaypointsOrBuilder( + int index) { + return vehicleWaypoints_.get(index); + } + + public static final int ROUTE_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private java.util.List route_; + /** + * + * + *
+   * Output only. Anticipated route for this trip to the first entry in
+   * remaining_waypoints. Note that the first waypoint may belong to a different
+   * trip.
+   * 
+ * + * repeated .google.type.LatLng route = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getRouteList() { + return route_; + } + /** + * + * + *
+   * Output only. Anticipated route for this trip to the first entry in
+   * remaining_waypoints. Note that the first waypoint may belong to a different
+   * trip.
+   * 
+ * + * repeated .google.type.LatLng route = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getRouteOrBuilderList() { + return route_; + } + /** + * + * + *
+   * Output only. Anticipated route for this trip to the first entry in
+   * remaining_waypoints. Note that the first waypoint may belong to a different
+   * trip.
+   * 
+ * + * repeated .google.type.LatLng route = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getRouteCount() { + return route_.size(); + } + /** + * + * + *
+   * Output only. Anticipated route for this trip to the first entry in
+   * remaining_waypoints. Note that the first waypoint may belong to a different
+   * trip.
+   * 
+ * + * repeated .google.type.LatLng route = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.type.LatLng getRoute(int index) { + return route_.get(index); + } + /** + * + * + *
+   * Output only. Anticipated route for this trip to the first entry in
+   * remaining_waypoints. Note that the first waypoint may belong to a different
+   * trip.
+   * 
+ * + * repeated .google.type.LatLng route = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getRouteOrBuilder(int index) { + return route_.get(index); + } + + public static final int CURRENT_ROUTE_SEGMENT_FIELD_NUMBER = 21; + + @SuppressWarnings("serial") + private volatile java.lang.Object currentRouteSegment_ = ""; + /** + * + * + *
+   * Output only. An encoded path to the next waypoint.
+   *
+   * Note: This field is intended only for use by the Driver SDK and Consumer
+   * SDK. Decoding is not yet supported.
+   * 
+ * + * string current_route_segment = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The currentRouteSegment. + */ + @java.lang.Override + public java.lang.String getCurrentRouteSegment() { + java.lang.Object ref = currentRouteSegment_; + 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(); + currentRouteSegment_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. An encoded path to the next waypoint.
+   *
+   * Note: This field is intended only for use by the Driver SDK and Consumer
+   * SDK. Decoding is not yet supported.
+   * 
+ * + * string current_route_segment = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for currentRouteSegment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCurrentRouteSegmentBytes() { + java.lang.Object ref = currentRouteSegment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + currentRouteSegment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CURRENT_ROUTE_SEGMENT_VERSION_FIELD_NUMBER = 17; + private com.google.protobuf.Timestamp currentRouteSegmentVersion_; + /** + * + * + *
+   * Output only. Indicates the last time the route was modified.
+   *
+   * Note: This field is intended only for use by the Driver SDK and Consumer
+   * SDK.
+   * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_version = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the currentRouteSegmentVersion field is set. + */ + @java.lang.Override + public boolean hasCurrentRouteSegmentVersion() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+   * Output only. Indicates the last time the route was modified.
+   *
+   * Note: This field is intended only for use by the Driver SDK and Consumer
+   * SDK.
+   * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_version = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The currentRouteSegmentVersion. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCurrentRouteSegmentVersion() { + return currentRouteSegmentVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : currentRouteSegmentVersion_; + } + /** + * + * + *
+   * Output only. Indicates the last time the route was modified.
+   *
+   * Note: This field is intended only for use by the Driver SDK and Consumer
+   * SDK.
+   * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_version = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCurrentRouteSegmentVersionOrBuilder() { + return currentRouteSegmentVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : currentRouteSegmentVersion_; + } + + public static final int CURRENT_ROUTE_SEGMENT_TRAFFIC_FIELD_NUMBER = 28; + private com.google.maps.fleetengine.v1.ConsumableTrafficPolyline currentRouteSegmentTraffic_; + /** + * + * + *
+   * Output only. Indicates the traffic conditions along the
+   * `current_route_segment` when they're available.
+   *
+   * Note: This field is intended only for use by the Driver SDK and Consumer
+   * SDK.
+   * 
+ * + * + * .maps.fleetengine.v1.ConsumableTrafficPolyline current_route_segment_traffic = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the currentRouteSegmentTraffic field is set. + */ + @java.lang.Override + public boolean hasCurrentRouteSegmentTraffic() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * + * + *
+   * Output only. Indicates the traffic conditions along the
+   * `current_route_segment` when they're available.
+   *
+   * Note: This field is intended only for use by the Driver SDK and Consumer
+   * SDK.
+   * 
+ * + * + * .maps.fleetengine.v1.ConsumableTrafficPolyline current_route_segment_traffic = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The currentRouteSegmentTraffic. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.ConsumableTrafficPolyline getCurrentRouteSegmentTraffic() { + return currentRouteSegmentTraffic_ == null + ? com.google.maps.fleetengine.v1.ConsumableTrafficPolyline.getDefaultInstance() + : currentRouteSegmentTraffic_; + } + /** + * + * + *
+   * Output only. Indicates the traffic conditions along the
+   * `current_route_segment` when they're available.
+   *
+   * Note: This field is intended only for use by the Driver SDK and Consumer
+   * SDK.
+   * 
+ * + * + * .maps.fleetengine.v1.ConsumableTrafficPolyline current_route_segment_traffic = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.ConsumableTrafficPolylineOrBuilder + getCurrentRouteSegmentTrafficOrBuilder() { + return currentRouteSegmentTraffic_ == null + ? com.google.maps.fleetengine.v1.ConsumableTrafficPolyline.getDefaultInstance() + : currentRouteSegmentTraffic_; + } + + public static final int CURRENT_ROUTE_SEGMENT_TRAFFIC_VERSION_FIELD_NUMBER = 30; + private com.google.protobuf.Timestamp currentRouteSegmentTrafficVersion_; + /** + * + * + *
+   * Output only. Indicates the last time the `current_route_segment_traffic`
+   * was modified.
+   *
+   * Note: This field is intended only for use by the Driver SDK and Consumer
+   * SDK.
+   * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_traffic_version = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the currentRouteSegmentTrafficVersion field is set. + */ + @java.lang.Override + public boolean hasCurrentRouteSegmentTrafficVersion() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * + * + *
+   * Output only. Indicates the last time the `current_route_segment_traffic`
+   * was modified.
+   *
+   * Note: This field is intended only for use by the Driver SDK and Consumer
+   * SDK.
+   * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_traffic_version = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The currentRouteSegmentTrafficVersion. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCurrentRouteSegmentTrafficVersion() { + return currentRouteSegmentTrafficVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : currentRouteSegmentTrafficVersion_; + } + /** + * + * + *
+   * Output only. Indicates the last time the `current_route_segment_traffic`
+   * was modified.
+   *
+   * Note: This field is intended only for use by the Driver SDK and Consumer
+   * SDK.
+   * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_traffic_version = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCurrentRouteSegmentTrafficVersionOrBuilder() { + return currentRouteSegmentTrafficVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : currentRouteSegmentTrafficVersion_; + } + + public static final int CURRENT_ROUTE_SEGMENT_END_POINT_FIELD_NUMBER = 24; + private com.google.maps.fleetengine.v1.TripWaypoint currentRouteSegmentEndPoint_; + /** + * + * + *
+   * Output only. The waypoint where `current_route_segment` ends.
+   * 
+ * + * + * .maps.fleetengine.v1.TripWaypoint current_route_segment_end_point = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the currentRouteSegmentEndPoint field is set. + */ + @java.lang.Override + public boolean hasCurrentRouteSegmentEndPoint() { + return ((bitField0_ & 0x00000800) != 0); + } + /** + * + * + *
+   * Output only. The waypoint where `current_route_segment` ends.
+   * 
+ * + * + * .maps.fleetengine.v1.TripWaypoint current_route_segment_end_point = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The currentRouteSegmentEndPoint. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TripWaypoint getCurrentRouteSegmentEndPoint() { + return currentRouteSegmentEndPoint_ == null + ? com.google.maps.fleetengine.v1.TripWaypoint.getDefaultInstance() + : currentRouteSegmentEndPoint_; + } + /** + * + * + *
+   * Output only. The waypoint where `current_route_segment` ends.
+   * 
+ * + * + * .maps.fleetengine.v1.TripWaypoint current_route_segment_end_point = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TripWaypointOrBuilder + getCurrentRouteSegmentEndPointOrBuilder() { + return currentRouteSegmentEndPoint_ == null + ? com.google.maps.fleetengine.v1.TripWaypoint.getDefaultInstance() + : currentRouteSegmentEndPoint_; + } + + public static final int REMAINING_DISTANCE_METERS_FIELD_NUMBER = 12; + private com.google.protobuf.Int32Value remainingDistanceMeters_; + /** + * + * + *
+   * Output only. The remaining driving distance in the `current_route_segment`
+   * field. The value is unspecified if the trip is not assigned to a vehicle,
+   * or the trip is completed or cancelled.
+   * 
+ * + * + * .google.protobuf.Int32Value remaining_distance_meters = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the remainingDistanceMeters field is set. + */ + @java.lang.Override + public boolean hasRemainingDistanceMeters() { + return ((bitField0_ & 0x00001000) != 0); + } + /** + * + * + *
+   * Output only. The remaining driving distance in the `current_route_segment`
+   * field. The value is unspecified if the trip is not assigned to a vehicle,
+   * or the trip is completed or cancelled.
+   * 
+ * + * + * .google.protobuf.Int32Value remaining_distance_meters = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The remainingDistanceMeters. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getRemainingDistanceMeters() { + return remainingDistanceMeters_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : remainingDistanceMeters_; + } + /** + * + * + *
+   * Output only. The remaining driving distance in the `current_route_segment`
+   * field. The value is unspecified if the trip is not assigned to a vehicle,
+   * or the trip is completed or cancelled.
+   * 
+ * + * + * .google.protobuf.Int32Value remaining_distance_meters = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getRemainingDistanceMetersOrBuilder() { + return remainingDistanceMeters_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : remainingDistanceMeters_; + } + + public static final int ETA_TO_FIRST_WAYPOINT_FIELD_NUMBER = 13; + private com.google.protobuf.Timestamp etaToFirstWaypoint_; + /** + * + * + *
+   * Output only. The ETA to the next waypoint (the first entry in the
+   * `remaining_waypoints` field). The value is unspecified if the trip is not
+   * assigned to a vehicle, or the trip is inactive (completed or cancelled).
+   * 
+ * + * + * .google.protobuf.Timestamp eta_to_first_waypoint = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the etaToFirstWaypoint field is set. + */ + @java.lang.Override + public boolean hasEtaToFirstWaypoint() { + return ((bitField0_ & 0x00002000) != 0); + } + /** + * + * + *
+   * Output only. The ETA to the next waypoint (the first entry in the
+   * `remaining_waypoints` field). The value is unspecified if the trip is not
+   * assigned to a vehicle, or the trip is inactive (completed or cancelled).
+   * 
+ * + * + * .google.protobuf.Timestamp eta_to_first_waypoint = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The etaToFirstWaypoint. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEtaToFirstWaypoint() { + return etaToFirstWaypoint_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : etaToFirstWaypoint_; + } + /** + * + * + *
+   * Output only. The ETA to the next waypoint (the first entry in the
+   * `remaining_waypoints` field). The value is unspecified if the trip is not
+   * assigned to a vehicle, or the trip is inactive (completed or cancelled).
+   * 
+ * + * + * .google.protobuf.Timestamp eta_to_first_waypoint = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEtaToFirstWaypointOrBuilder() { + return etaToFirstWaypoint_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : etaToFirstWaypoint_; + } + + public static final int REMAINING_TIME_TO_FIRST_WAYPOINT_FIELD_NUMBER = 27; + private com.google.protobuf.Duration remainingTimeToFirstWaypoint_; + /** + * + * + *
+   * Output only. The duration from when the Trip data is returned to the time
+   * in `Trip.eta_to_first_waypoint`. The value is unspecified if the trip is
+   * not assigned to a vehicle, or the trip is inactive (completed or
+   * cancelled).
+   * 
+ * + * + * .google.protobuf.Duration remaining_time_to_first_waypoint = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the remainingTimeToFirstWaypoint field is set. + */ + @java.lang.Override + public boolean hasRemainingTimeToFirstWaypoint() { + return ((bitField0_ & 0x00004000) != 0); + } + /** + * + * + *
+   * Output only. The duration from when the Trip data is returned to the time
+   * in `Trip.eta_to_first_waypoint`. The value is unspecified if the trip is
+   * not assigned to a vehicle, or the trip is inactive (completed or
+   * cancelled).
+   * 
+ * + * + * .google.protobuf.Duration remaining_time_to_first_waypoint = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The remainingTimeToFirstWaypoint. + */ + @java.lang.Override + public com.google.protobuf.Duration getRemainingTimeToFirstWaypoint() { + return remainingTimeToFirstWaypoint_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : remainingTimeToFirstWaypoint_; + } + /** + * + * + *
+   * Output only. The duration from when the Trip data is returned to the time
+   * in `Trip.eta_to_first_waypoint`. The value is unspecified if the trip is
+   * not assigned to a vehicle, or the trip is inactive (completed or
+   * cancelled).
+   * 
+ * + * + * .google.protobuf.Duration remaining_time_to_first_waypoint = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getRemainingTimeToFirstWaypointOrBuilder() { + return remainingTimeToFirstWaypoint_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : remainingTimeToFirstWaypoint_; + } + + public static final int REMAINING_WAYPOINTS_VERSION_FIELD_NUMBER = 19; + private com.google.protobuf.Timestamp remainingWaypointsVersion_; + /** + * + * + *
+   * Output only. Indicates the last time that `remaining_waypoints` was changed
+   * (a waypoint was added, removed, or changed).
+   * 
+ * + * + * .google.protobuf.Timestamp remaining_waypoints_version = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the remainingWaypointsVersion field is set. + */ + @java.lang.Override + public boolean hasRemainingWaypointsVersion() { + return ((bitField0_ & 0x00008000) != 0); + } + /** + * + * + *
+   * Output only. Indicates the last time that `remaining_waypoints` was changed
+   * (a waypoint was added, removed, or changed).
+   * 
+ * + * + * .google.protobuf.Timestamp remaining_waypoints_version = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The remainingWaypointsVersion. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getRemainingWaypointsVersion() { + return remainingWaypointsVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : remainingWaypointsVersion_; + } + /** + * + * + *
+   * Output only. Indicates the last time that `remaining_waypoints` was changed
+   * (a waypoint was added, removed, or changed).
+   * 
+ * + * + * .google.protobuf.Timestamp remaining_waypoints_version = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getRemainingWaypointsVersionOrBuilder() { + return remainingWaypointsVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : remainingWaypointsVersion_; + } + + public static final int REMAINING_WAYPOINTS_ROUTE_VERSION_FIELD_NUMBER = 29; + private com.google.protobuf.Timestamp remainingWaypointsRouteVersion_; + /** + * + * + *
+   * Output only. Indicates the last time the
+   * `remaining_waypoints.path_to_waypoint` and
+   * `remaining_waypoints.traffic_to_waypoint` were modified. Your client app
+   * should cache this value and pass it in `GetTripRequest` to ensure the
+   * paths and traffic for `remaining_waypoints` are only returned if updated.
+   * 
+ * + * + * .google.protobuf.Timestamp remaining_waypoints_route_version = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the remainingWaypointsRouteVersion field is set. + */ + @java.lang.Override + public boolean hasRemainingWaypointsRouteVersion() { + return ((bitField0_ & 0x00010000) != 0); + } + /** + * + * + *
+   * Output only. Indicates the last time the
+   * `remaining_waypoints.path_to_waypoint` and
+   * `remaining_waypoints.traffic_to_waypoint` were modified. Your client app
+   * should cache this value and pass it in `GetTripRequest` to ensure the
+   * paths and traffic for `remaining_waypoints` are only returned if updated.
+   * 
+ * + * + * .google.protobuf.Timestamp remaining_waypoints_route_version = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The remainingWaypointsRouteVersion. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getRemainingWaypointsRouteVersion() { + return remainingWaypointsRouteVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : remainingWaypointsRouteVersion_; + } + /** + * + * + *
+   * Output only. Indicates the last time the
+   * `remaining_waypoints.path_to_waypoint` and
+   * `remaining_waypoints.traffic_to_waypoint` were modified. Your client app
+   * should cache this value and pass it in `GetTripRequest` to ensure the
+   * paths and traffic for `remaining_waypoints` are only returned if updated.
+   * 
+ * + * + * .google.protobuf.Timestamp remaining_waypoints_route_version = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getRemainingWaypointsRouteVersionOrBuilder() { + return remainingWaypointsRouteVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : remainingWaypointsRouteVersion_; + } + + public static final int NUMBER_OF_PASSENGERS_FIELD_NUMBER = 10; + private int numberOfPassengers_ = 0; + /** + * + * + *
+   * Immutable. Indicates the number of passengers on this trip and does not
+   * include the driver. A vehicle must have available capacity to be returned
+   * in a `SearchVehicles` response.
+   * 
+ * + * int32 number_of_passengers = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The numberOfPassengers. + */ + @java.lang.Override + public int getNumberOfPassengers() { + return numberOfPassengers_; + } + + public static final int LAST_LOCATION_FIELD_NUMBER = 11; + private com.google.maps.fleetengine.v1.VehicleLocation lastLocation_; + /** + * + * + *
+   * Output only. Indicates the last reported location of the vehicle along the
+   * route.
+   * 
+ * + * + * .maps.fleetengine.v1.VehicleLocation last_location = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastLocation field is set. + */ + @java.lang.Override + public boolean hasLastLocation() { + return ((bitField0_ & 0x00020000) != 0); + } + /** + * + * + *
+   * Output only. Indicates the last reported location of the vehicle along the
+   * route.
+   * 
+ * + * + * .maps.fleetengine.v1.VehicleLocation last_location = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastLocation. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleLocation getLastLocation() { + return lastLocation_ == null + ? com.google.maps.fleetengine.v1.VehicleLocation.getDefaultInstance() + : lastLocation_; + } + /** + * + * + *
+   * Output only. Indicates the last reported location of the vehicle along the
+   * route.
+   * 
+ * + * + * .maps.fleetengine.v1.VehicleLocation last_location = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleLocationOrBuilder getLastLocationOrBuilder() { + return lastLocation_ == null + ? com.google.maps.fleetengine.v1.VehicleLocation.getDefaultInstance() + : lastLocation_; + } + + public static final int LAST_LOCATION_SNAPPABLE_FIELD_NUMBER = 26; + private boolean lastLocationSnappable_ = false; + /** + * + * + *
+   * Output only. Indicates whether the vehicle's `last_location` can be snapped
+   * to the current_route_segment. False if `last_location` or
+   * `current_route_segment` doesn't exist.
+   * It is computed by Fleet Engine. Any update from clients will be ignored.
+   * 
+ * + * bool last_location_snappable = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The lastLocationSnappable. + */ + @java.lang.Override + public boolean getLastLocationSnappable() { + return lastLocationSnappable_; + } + + public static final int VIEW_FIELD_NUMBER = 31; + private int view_ = 0; + /** + * + * + *
+   * The subset of Trip fields that are populated and how they should be
+   * interpreted.
+   * 
+ * + * .maps.fleetengine.v1.TripView view = 31; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+   * The subset of Trip fields that are populated and how they should be
+   * interpreted.
+   * 
+ * + * .maps.fleetengine.v1.TripView view = 31; + * + * @return The view. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TripView getView() { + com.google.maps.fleetengine.v1.TripView result = + com.google.maps.fleetengine.v1.TripView.forNumber(view_); + return result == null ? com.google.maps.fleetengine.v1.TripView.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vehicleId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, vehicleId_); + } + if (tripStatus_ != com.google.maps.fleetengine.v1.TripStatus.UNKNOWN_TRIP_STATUS.getNumber()) { + output.writeEnum(3, tripStatus_); + } + if (tripType_ != com.google.maps.fleetengine.v1.TripType.UNKNOWN_TRIP_TYPE.getNumber()) { + output.writeEnum(4, tripType_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getPickupPoint()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(6, getPickupTime()); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(7, getDropoffPoint()); + } + if (((bitField0_ & 0x00000080) != 0)) { + output.writeMessage(8, getDropoffTime()); + } + for (int i = 0; i < route_.size(); i++) { + output.writeMessage(9, route_.get(i)); + } + if (numberOfPassengers_ != 0) { + output.writeInt32(10, numberOfPassengers_); + } + if (((bitField0_ & 0x00020000) != 0)) { + output.writeMessage(11, getLastLocation()); + } + if (((bitField0_ & 0x00001000) != 0)) { + output.writeMessage(12, getRemainingDistanceMeters()); + } + if (((bitField0_ & 0x00002000) != 0)) { + output.writeMessage(13, getEtaToFirstWaypoint()); + } + for (int i = 0; i < intermediateDestinations_.size(); i++) { + output.writeMessage(14, intermediateDestinations_.get(i)); + } + if (intermediateDestinationIndex_ != 0) { + output.writeInt32(15, intermediateDestinationIndex_); + } + for (int i = 0; i < remainingWaypoints_.size(); i++) { + output.writeMessage(16, remainingWaypoints_.get(i)); + } + if (((bitField0_ & 0x00000100) != 0)) { + output.writeMessage(17, getCurrentRouteSegmentVersion()); + } + if (((bitField0_ & 0x00008000) != 0)) { + output.writeMessage(19, getRemainingWaypointsVersion()); + } + for (int i = 0; i < vehicleWaypoints_.size(); i++) { + output.writeMessage(20, vehicleWaypoints_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(currentRouteSegment_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 21, currentRouteSegment_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(22, getActualPickupPoint()); + } + if (((bitField0_ & 0x00000040) != 0)) { + output.writeMessage(23, getActualDropoffPoint()); + } + if (((bitField0_ & 0x00000800) != 0)) { + output.writeMessage(24, getCurrentRouteSegmentEndPoint()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(25, getIntermediateDestinationsVersion()); + } + if (lastLocationSnappable_ != false) { + output.writeBool(26, lastLocationSnappable_); + } + if (((bitField0_ & 0x00004000) != 0)) { + output.writeMessage(27, getRemainingTimeToFirstWaypoint()); + } + if (((bitField0_ & 0x00000200) != 0)) { + output.writeMessage(28, getCurrentRouteSegmentTraffic()); + } + if (((bitField0_ & 0x00010000) != 0)) { + output.writeMessage(29, getRemainingWaypointsRouteVersion()); + } + if (((bitField0_ & 0x00000400) != 0)) { + output.writeMessage(30, getCurrentRouteSegmentTrafficVersion()); + } + if (view_ != com.google.maps.fleetengine.v1.TripView.TRIP_VIEW_UNSPECIFIED.getNumber()) { + output.writeEnum(31, view_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(32, getActualPickupArrivalPoint()); + } + for (int i = 0; i < actualIntermediateDestinationArrivalPoints_.size(); i++) { + output.writeMessage(33, actualIntermediateDestinationArrivalPoints_.get(i)); + } + for (int i = 0; i < actualIntermediateDestinations_.size(); i++) { + output.writeMessage(34, actualIntermediateDestinations_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vehicleId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, vehicleId_); + } + if (tripStatus_ != com.google.maps.fleetengine.v1.TripStatus.UNKNOWN_TRIP_STATUS.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, tripStatus_); + } + if (tripType_ != com.google.maps.fleetengine.v1.TripType.UNKNOWN_TRIP_TYPE.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, tripType_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getPickupPoint()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getPickupTime()); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getDropoffPoint()); + } + if (((bitField0_ & 0x00000080) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getDropoffTime()); + } + for (int i = 0; i < route_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, route_.get(i)); + } + if (numberOfPassengers_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(10, numberOfPassengers_); + } + if (((bitField0_ & 0x00020000) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getLastLocation()); + } + if (((bitField0_ & 0x00001000) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 12, getRemainingDistanceMeters()); + } + if (((bitField0_ & 0x00002000) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getEtaToFirstWaypoint()); + } + for (int i = 0; i < intermediateDestinations_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 14, intermediateDestinations_.get(i)); + } + if (intermediateDestinationIndex_ != 0) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size(15, intermediateDestinationIndex_); + } + for (int i = 0; i < remainingWaypoints_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(16, remainingWaypoints_.get(i)); + } + if (((bitField0_ & 0x00000100) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 17, getCurrentRouteSegmentVersion()); + } + if (((bitField0_ & 0x00008000) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 19, getRemainingWaypointsVersion()); + } + for (int i = 0; i < vehicleWaypoints_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(20, vehicleWaypoints_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(currentRouteSegment_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(21, currentRouteSegment_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(22, getActualPickupPoint()); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(23, getActualDropoffPoint()); + } + if (((bitField0_ & 0x00000800) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 24, getCurrentRouteSegmentEndPoint()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 25, getIntermediateDestinationsVersion()); + } + if (lastLocationSnappable_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(26, lastLocationSnappable_); + } + if (((bitField0_ & 0x00004000) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 27, getRemainingTimeToFirstWaypoint()); + } + if (((bitField0_ & 0x00000200) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 28, getCurrentRouteSegmentTraffic()); + } + if (((bitField0_ & 0x00010000) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 29, getRemainingWaypointsRouteVersion()); + } + if (((bitField0_ & 0x00000400) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 30, getCurrentRouteSegmentTrafficVersion()); + } + if (view_ != com.google.maps.fleetengine.v1.TripView.TRIP_VIEW_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(31, view_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 32, getActualPickupArrivalPoint()); + } + for (int i = 0; i < actualIntermediateDestinationArrivalPoints_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 33, actualIntermediateDestinationArrivalPoints_.get(i)); + } + for (int i = 0; i < actualIntermediateDestinations_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 34, actualIntermediateDestinations_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.maps.fleetengine.v1.Trip)) { + return super.equals(obj); + } + com.google.maps.fleetengine.v1.Trip other = (com.google.maps.fleetengine.v1.Trip) obj; + + if (!getName().equals(other.getName())) return false; + if (!getVehicleId().equals(other.getVehicleId())) return false; + if (tripStatus_ != other.tripStatus_) return false; + if (tripType_ != other.tripType_) return false; + if (hasPickupPoint() != other.hasPickupPoint()) return false; + if (hasPickupPoint()) { + if (!getPickupPoint().equals(other.getPickupPoint())) return false; + } + if (hasActualPickupPoint() != other.hasActualPickupPoint()) return false; + if (hasActualPickupPoint()) { + if (!getActualPickupPoint().equals(other.getActualPickupPoint())) return false; + } + if (hasActualPickupArrivalPoint() != other.hasActualPickupArrivalPoint()) return false; + if (hasActualPickupArrivalPoint()) { + if (!getActualPickupArrivalPoint().equals(other.getActualPickupArrivalPoint())) return false; + } + if (hasPickupTime() != other.hasPickupTime()) return false; + if (hasPickupTime()) { + if (!getPickupTime().equals(other.getPickupTime())) return false; + } + if (!getIntermediateDestinationsList().equals(other.getIntermediateDestinationsList())) + return false; + if (hasIntermediateDestinationsVersion() != other.hasIntermediateDestinationsVersion()) + return false; + if (hasIntermediateDestinationsVersion()) { + if (!getIntermediateDestinationsVersion().equals(other.getIntermediateDestinationsVersion())) + return false; + } + if (getIntermediateDestinationIndex() != other.getIntermediateDestinationIndex()) return false; + if (!getActualIntermediateDestinationArrivalPointsList() + .equals(other.getActualIntermediateDestinationArrivalPointsList())) return false; + if (!getActualIntermediateDestinationsList() + .equals(other.getActualIntermediateDestinationsList())) return false; + if (hasDropoffPoint() != other.hasDropoffPoint()) return false; + if (hasDropoffPoint()) { + if (!getDropoffPoint().equals(other.getDropoffPoint())) return false; + } + if (hasActualDropoffPoint() != other.hasActualDropoffPoint()) return false; + if (hasActualDropoffPoint()) { + if (!getActualDropoffPoint().equals(other.getActualDropoffPoint())) return false; + } + if (hasDropoffTime() != other.hasDropoffTime()) return false; + if (hasDropoffTime()) { + if (!getDropoffTime().equals(other.getDropoffTime())) return false; + } + if (!getRemainingWaypointsList().equals(other.getRemainingWaypointsList())) return false; + if (!getVehicleWaypointsList().equals(other.getVehicleWaypointsList())) return false; + if (!getRouteList().equals(other.getRouteList())) return false; + if (!getCurrentRouteSegment().equals(other.getCurrentRouteSegment())) return false; + if (hasCurrentRouteSegmentVersion() != other.hasCurrentRouteSegmentVersion()) return false; + if (hasCurrentRouteSegmentVersion()) { + if (!getCurrentRouteSegmentVersion().equals(other.getCurrentRouteSegmentVersion())) + return false; + } + if (hasCurrentRouteSegmentTraffic() != other.hasCurrentRouteSegmentTraffic()) return false; + if (hasCurrentRouteSegmentTraffic()) { + if (!getCurrentRouteSegmentTraffic().equals(other.getCurrentRouteSegmentTraffic())) + return false; + } + if (hasCurrentRouteSegmentTrafficVersion() != other.hasCurrentRouteSegmentTrafficVersion()) + return false; + if (hasCurrentRouteSegmentTrafficVersion()) { + if (!getCurrentRouteSegmentTrafficVersion() + .equals(other.getCurrentRouteSegmentTrafficVersion())) return false; + } + if (hasCurrentRouteSegmentEndPoint() != other.hasCurrentRouteSegmentEndPoint()) return false; + if (hasCurrentRouteSegmentEndPoint()) { + if (!getCurrentRouteSegmentEndPoint().equals(other.getCurrentRouteSegmentEndPoint())) + return false; + } + if (hasRemainingDistanceMeters() != other.hasRemainingDistanceMeters()) return false; + if (hasRemainingDistanceMeters()) { + if (!getRemainingDistanceMeters().equals(other.getRemainingDistanceMeters())) return false; + } + if (hasEtaToFirstWaypoint() != other.hasEtaToFirstWaypoint()) return false; + if (hasEtaToFirstWaypoint()) { + if (!getEtaToFirstWaypoint().equals(other.getEtaToFirstWaypoint())) return false; + } + if (hasRemainingTimeToFirstWaypoint() != other.hasRemainingTimeToFirstWaypoint()) return false; + if (hasRemainingTimeToFirstWaypoint()) { + if (!getRemainingTimeToFirstWaypoint().equals(other.getRemainingTimeToFirstWaypoint())) + return false; + } + if (hasRemainingWaypointsVersion() != other.hasRemainingWaypointsVersion()) return false; + if (hasRemainingWaypointsVersion()) { + if (!getRemainingWaypointsVersion().equals(other.getRemainingWaypointsVersion())) + return false; + } + if (hasRemainingWaypointsRouteVersion() != other.hasRemainingWaypointsRouteVersion()) + return false; + if (hasRemainingWaypointsRouteVersion()) { + if (!getRemainingWaypointsRouteVersion().equals(other.getRemainingWaypointsRouteVersion())) + return false; + } + if (getNumberOfPassengers() != other.getNumberOfPassengers()) return false; + if (hasLastLocation() != other.hasLastLocation()) return false; + if (hasLastLocation()) { + if (!getLastLocation().equals(other.getLastLocation())) return false; + } + if (getLastLocationSnappable() != other.getLastLocationSnappable()) return false; + if (view_ != other.view_) 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 = (37 * hash) + VEHICLE_ID_FIELD_NUMBER; + hash = (53 * hash) + getVehicleId().hashCode(); + hash = (37 * hash) + TRIP_STATUS_FIELD_NUMBER; + hash = (53 * hash) + tripStatus_; + hash = (37 * hash) + TRIP_TYPE_FIELD_NUMBER; + hash = (53 * hash) + tripType_; + if (hasPickupPoint()) { + hash = (37 * hash) + PICKUP_POINT_FIELD_NUMBER; + hash = (53 * hash) + getPickupPoint().hashCode(); + } + if (hasActualPickupPoint()) { + hash = (37 * hash) + ACTUAL_PICKUP_POINT_FIELD_NUMBER; + hash = (53 * hash) + getActualPickupPoint().hashCode(); + } + if (hasActualPickupArrivalPoint()) { + hash = (37 * hash) + ACTUAL_PICKUP_ARRIVAL_POINT_FIELD_NUMBER; + hash = (53 * hash) + getActualPickupArrivalPoint().hashCode(); + } + if (hasPickupTime()) { + hash = (37 * hash) + PICKUP_TIME_FIELD_NUMBER; + hash = (53 * hash) + getPickupTime().hashCode(); + } + if (getIntermediateDestinationsCount() > 0) { + hash = (37 * hash) + INTERMEDIATE_DESTINATIONS_FIELD_NUMBER; + hash = (53 * hash) + getIntermediateDestinationsList().hashCode(); + } + if (hasIntermediateDestinationsVersion()) { + hash = (37 * hash) + INTERMEDIATE_DESTINATIONS_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getIntermediateDestinationsVersion().hashCode(); + } + hash = (37 * hash) + INTERMEDIATE_DESTINATION_INDEX_FIELD_NUMBER; + hash = (53 * hash) + getIntermediateDestinationIndex(); + if (getActualIntermediateDestinationArrivalPointsCount() > 0) { + hash = (37 * hash) + ACTUAL_INTERMEDIATE_DESTINATION_ARRIVAL_POINTS_FIELD_NUMBER; + hash = (53 * hash) + getActualIntermediateDestinationArrivalPointsList().hashCode(); + } + if (getActualIntermediateDestinationsCount() > 0) { + hash = (37 * hash) + ACTUAL_INTERMEDIATE_DESTINATIONS_FIELD_NUMBER; + hash = (53 * hash) + getActualIntermediateDestinationsList().hashCode(); + } + if (hasDropoffPoint()) { + hash = (37 * hash) + DROPOFF_POINT_FIELD_NUMBER; + hash = (53 * hash) + getDropoffPoint().hashCode(); + } + if (hasActualDropoffPoint()) { + hash = (37 * hash) + ACTUAL_DROPOFF_POINT_FIELD_NUMBER; + hash = (53 * hash) + getActualDropoffPoint().hashCode(); + } + if (hasDropoffTime()) { + hash = (37 * hash) + DROPOFF_TIME_FIELD_NUMBER; + hash = (53 * hash) + getDropoffTime().hashCode(); + } + if (getRemainingWaypointsCount() > 0) { + hash = (37 * hash) + REMAINING_WAYPOINTS_FIELD_NUMBER; + hash = (53 * hash) + getRemainingWaypointsList().hashCode(); + } + if (getVehicleWaypointsCount() > 0) { + hash = (37 * hash) + VEHICLE_WAYPOINTS_FIELD_NUMBER; + hash = (53 * hash) + getVehicleWaypointsList().hashCode(); + } + if (getRouteCount() > 0) { + hash = (37 * hash) + ROUTE_FIELD_NUMBER; + hash = (53 * hash) + getRouteList().hashCode(); + } + hash = (37 * hash) + CURRENT_ROUTE_SEGMENT_FIELD_NUMBER; + hash = (53 * hash) + getCurrentRouteSegment().hashCode(); + if (hasCurrentRouteSegmentVersion()) { + hash = (37 * hash) + CURRENT_ROUTE_SEGMENT_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getCurrentRouteSegmentVersion().hashCode(); + } + if (hasCurrentRouteSegmentTraffic()) { + hash = (37 * hash) + CURRENT_ROUTE_SEGMENT_TRAFFIC_FIELD_NUMBER; + hash = (53 * hash) + getCurrentRouteSegmentTraffic().hashCode(); + } + if (hasCurrentRouteSegmentTrafficVersion()) { + hash = (37 * hash) + CURRENT_ROUTE_SEGMENT_TRAFFIC_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getCurrentRouteSegmentTrafficVersion().hashCode(); + } + if (hasCurrentRouteSegmentEndPoint()) { + hash = (37 * hash) + CURRENT_ROUTE_SEGMENT_END_POINT_FIELD_NUMBER; + hash = (53 * hash) + getCurrentRouteSegmentEndPoint().hashCode(); + } + if (hasRemainingDistanceMeters()) { + hash = (37 * hash) + REMAINING_DISTANCE_METERS_FIELD_NUMBER; + hash = (53 * hash) + getRemainingDistanceMeters().hashCode(); + } + if (hasEtaToFirstWaypoint()) { + hash = (37 * hash) + ETA_TO_FIRST_WAYPOINT_FIELD_NUMBER; + hash = (53 * hash) + getEtaToFirstWaypoint().hashCode(); + } + if (hasRemainingTimeToFirstWaypoint()) { + hash = (37 * hash) + REMAINING_TIME_TO_FIRST_WAYPOINT_FIELD_NUMBER; + hash = (53 * hash) + getRemainingTimeToFirstWaypoint().hashCode(); + } + if (hasRemainingWaypointsVersion()) { + hash = (37 * hash) + REMAINING_WAYPOINTS_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getRemainingWaypointsVersion().hashCode(); + } + if (hasRemainingWaypointsRouteVersion()) { + hash = (37 * hash) + REMAINING_WAYPOINTS_ROUTE_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getRemainingWaypointsRouteVersion().hashCode(); + } + hash = (37 * hash) + NUMBER_OF_PASSENGERS_FIELD_NUMBER; + hash = (53 * hash) + getNumberOfPassengers(); + if (hasLastLocation()) { + hash = (37 * hash) + LAST_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLastLocation().hashCode(); + } + hash = (37 * hash) + LAST_LOCATION_SNAPPABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getLastLocationSnappable()); + hash = (37 * hash) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.fleetengine.v1.Trip parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.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.fleetengine.v1.Trip parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.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.fleetengine.v1.Trip parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.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.fleetengine.v1.Trip parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.Trip parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.Trip parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.Trip parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.Trip parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.Trip parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.fleetengine.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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Trip metadata.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.v1.Trip} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.v1.Trip) + com.google.maps.fleetengine.v1.TripOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.Trips + .internal_static_maps_fleetengine_v1_Trip_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.Trips + .internal_static_maps_fleetengine_v1_Trip_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.Trip.class, + com.google.maps.fleetengine.v1.Trip.Builder.class); + } + + // Construct using com.google.maps.fleetengine.v1.Trip.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPickupPointFieldBuilder(); + getActualPickupPointFieldBuilder(); + getActualPickupArrivalPointFieldBuilder(); + getPickupTimeFieldBuilder(); + getIntermediateDestinationsFieldBuilder(); + getIntermediateDestinationsVersionFieldBuilder(); + getActualIntermediateDestinationArrivalPointsFieldBuilder(); + getActualIntermediateDestinationsFieldBuilder(); + getDropoffPointFieldBuilder(); + getActualDropoffPointFieldBuilder(); + getDropoffTimeFieldBuilder(); + getRemainingWaypointsFieldBuilder(); + getVehicleWaypointsFieldBuilder(); + getRouteFieldBuilder(); + getCurrentRouteSegmentVersionFieldBuilder(); + getCurrentRouteSegmentTrafficFieldBuilder(); + getCurrentRouteSegmentTrafficVersionFieldBuilder(); + getCurrentRouteSegmentEndPointFieldBuilder(); + getRemainingDistanceMetersFieldBuilder(); + getEtaToFirstWaypointFieldBuilder(); + getRemainingTimeToFirstWaypointFieldBuilder(); + getRemainingWaypointsVersionFieldBuilder(); + getRemainingWaypointsRouteVersionFieldBuilder(); + getLastLocationFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + bitField1_ = 0; + name_ = ""; + vehicleId_ = ""; + tripStatus_ = 0; + tripType_ = 0; + pickupPoint_ = null; + if (pickupPointBuilder_ != null) { + pickupPointBuilder_.dispose(); + pickupPointBuilder_ = null; + } + actualPickupPoint_ = null; + if (actualPickupPointBuilder_ != null) { + actualPickupPointBuilder_.dispose(); + actualPickupPointBuilder_ = null; + } + actualPickupArrivalPoint_ = null; + if (actualPickupArrivalPointBuilder_ != null) { + actualPickupArrivalPointBuilder_.dispose(); + actualPickupArrivalPointBuilder_ = null; + } + pickupTime_ = null; + if (pickupTimeBuilder_ != null) { + pickupTimeBuilder_.dispose(); + pickupTimeBuilder_ = null; + } + if (intermediateDestinationsBuilder_ == null) { + intermediateDestinations_ = java.util.Collections.emptyList(); + } else { + intermediateDestinations_ = null; + intermediateDestinationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000100); + intermediateDestinationsVersion_ = null; + if (intermediateDestinationsVersionBuilder_ != null) { + intermediateDestinationsVersionBuilder_.dispose(); + intermediateDestinationsVersionBuilder_ = null; + } + intermediateDestinationIndex_ = 0; + if (actualIntermediateDestinationArrivalPointsBuilder_ == null) { + actualIntermediateDestinationArrivalPoints_ = java.util.Collections.emptyList(); + } else { + actualIntermediateDestinationArrivalPoints_ = null; + actualIntermediateDestinationArrivalPointsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000800); + if (actualIntermediateDestinationsBuilder_ == null) { + actualIntermediateDestinations_ = java.util.Collections.emptyList(); + } else { + actualIntermediateDestinations_ = null; + actualIntermediateDestinationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00001000); + dropoffPoint_ = null; + if (dropoffPointBuilder_ != null) { + dropoffPointBuilder_.dispose(); + dropoffPointBuilder_ = null; + } + actualDropoffPoint_ = null; + if (actualDropoffPointBuilder_ != null) { + actualDropoffPointBuilder_.dispose(); + actualDropoffPointBuilder_ = null; + } + dropoffTime_ = null; + if (dropoffTimeBuilder_ != null) { + dropoffTimeBuilder_.dispose(); + dropoffTimeBuilder_ = null; + } + if (remainingWaypointsBuilder_ == null) { + remainingWaypoints_ = java.util.Collections.emptyList(); + } else { + remainingWaypoints_ = null; + remainingWaypointsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00010000); + if (vehicleWaypointsBuilder_ == null) { + vehicleWaypoints_ = java.util.Collections.emptyList(); + } else { + vehicleWaypoints_ = null; + vehicleWaypointsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00020000); + if (routeBuilder_ == null) { + route_ = java.util.Collections.emptyList(); + } else { + route_ = null; + routeBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00040000); + currentRouteSegment_ = ""; + currentRouteSegmentVersion_ = null; + if (currentRouteSegmentVersionBuilder_ != null) { + currentRouteSegmentVersionBuilder_.dispose(); + currentRouteSegmentVersionBuilder_ = null; + } + currentRouteSegmentTraffic_ = null; + if (currentRouteSegmentTrafficBuilder_ != null) { + currentRouteSegmentTrafficBuilder_.dispose(); + currentRouteSegmentTrafficBuilder_ = null; + } + currentRouteSegmentTrafficVersion_ = null; + if (currentRouteSegmentTrafficVersionBuilder_ != null) { + currentRouteSegmentTrafficVersionBuilder_.dispose(); + currentRouteSegmentTrafficVersionBuilder_ = null; + } + currentRouteSegmentEndPoint_ = null; + if (currentRouteSegmentEndPointBuilder_ != null) { + currentRouteSegmentEndPointBuilder_.dispose(); + currentRouteSegmentEndPointBuilder_ = null; + } + remainingDistanceMeters_ = null; + if (remainingDistanceMetersBuilder_ != null) { + remainingDistanceMetersBuilder_.dispose(); + remainingDistanceMetersBuilder_ = null; + } + etaToFirstWaypoint_ = null; + if (etaToFirstWaypointBuilder_ != null) { + etaToFirstWaypointBuilder_.dispose(); + etaToFirstWaypointBuilder_ = null; + } + remainingTimeToFirstWaypoint_ = null; + if (remainingTimeToFirstWaypointBuilder_ != null) { + remainingTimeToFirstWaypointBuilder_.dispose(); + remainingTimeToFirstWaypointBuilder_ = null; + } + remainingWaypointsVersion_ = null; + if (remainingWaypointsVersionBuilder_ != null) { + remainingWaypointsVersionBuilder_.dispose(); + remainingWaypointsVersionBuilder_ = null; + } + remainingWaypointsRouteVersion_ = null; + if (remainingWaypointsRouteVersionBuilder_ != null) { + remainingWaypointsRouteVersionBuilder_.dispose(); + remainingWaypointsRouteVersionBuilder_ = null; + } + numberOfPassengers_ = 0; + lastLocation_ = null; + if (lastLocationBuilder_ != null) { + lastLocationBuilder_.dispose(); + lastLocationBuilder_ = null; + } + lastLocationSnappable_ = false; + view_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.fleetengine.v1.Trips + .internal_static_maps_fleetengine_v1_Trip_descriptor; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.Trip getDefaultInstanceForType() { + return com.google.maps.fleetengine.v1.Trip.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.Trip build() { + com.google.maps.fleetengine.v1.Trip result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.Trip buildPartial() { + com.google.maps.fleetengine.v1.Trip result = new com.google.maps.fleetengine.v1.Trip(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + if (bitField1_ != 0) { + buildPartial1(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.maps.fleetengine.v1.Trip result) { + if (intermediateDestinationsBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0)) { + intermediateDestinations_ = + java.util.Collections.unmodifiableList(intermediateDestinations_); + bitField0_ = (bitField0_ & ~0x00000100); + } + result.intermediateDestinations_ = intermediateDestinations_; + } else { + result.intermediateDestinations_ = intermediateDestinationsBuilder_.build(); + } + if (actualIntermediateDestinationArrivalPointsBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0)) { + actualIntermediateDestinationArrivalPoints_ = + java.util.Collections.unmodifiableList(actualIntermediateDestinationArrivalPoints_); + bitField0_ = (bitField0_ & ~0x00000800); + } + result.actualIntermediateDestinationArrivalPoints_ = + actualIntermediateDestinationArrivalPoints_; + } else { + result.actualIntermediateDestinationArrivalPoints_ = + actualIntermediateDestinationArrivalPointsBuilder_.build(); + } + if (actualIntermediateDestinationsBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0)) { + actualIntermediateDestinations_ = + java.util.Collections.unmodifiableList(actualIntermediateDestinations_); + bitField0_ = (bitField0_ & ~0x00001000); + } + result.actualIntermediateDestinations_ = actualIntermediateDestinations_; + } else { + result.actualIntermediateDestinations_ = actualIntermediateDestinationsBuilder_.build(); + } + if (remainingWaypointsBuilder_ == null) { + if (((bitField0_ & 0x00010000) != 0)) { + remainingWaypoints_ = java.util.Collections.unmodifiableList(remainingWaypoints_); + bitField0_ = (bitField0_ & ~0x00010000); + } + result.remainingWaypoints_ = remainingWaypoints_; + } else { + result.remainingWaypoints_ = remainingWaypointsBuilder_.build(); + } + if (vehicleWaypointsBuilder_ == null) { + if (((bitField0_ & 0x00020000) != 0)) { + vehicleWaypoints_ = java.util.Collections.unmodifiableList(vehicleWaypoints_); + bitField0_ = (bitField0_ & ~0x00020000); + } + result.vehicleWaypoints_ = vehicleWaypoints_; + } else { + result.vehicleWaypoints_ = vehicleWaypointsBuilder_.build(); + } + if (routeBuilder_ == null) { + if (((bitField0_ & 0x00040000) != 0)) { + route_ = java.util.Collections.unmodifiableList(route_); + bitField0_ = (bitField0_ & ~0x00040000); + } + result.route_ = route_; + } else { + result.route_ = routeBuilder_.build(); + } + } + + private void buildPartial0(com.google.maps.fleetengine.v1.Trip result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.vehicleId_ = vehicleId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.tripStatus_ = tripStatus_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.tripType_ = tripType_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.pickupPoint_ = + pickupPointBuilder_ == null ? pickupPoint_ : pickupPointBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.actualPickupPoint_ = + actualPickupPointBuilder_ == null + ? actualPickupPoint_ + : actualPickupPointBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.actualPickupArrivalPoint_ = + actualPickupArrivalPointBuilder_ == null + ? actualPickupArrivalPoint_ + : actualPickupArrivalPointBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.pickupTime_ = pickupTimeBuilder_ == null ? pickupTime_ : pickupTimeBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.intermediateDestinationsVersion_ = + intermediateDestinationsVersionBuilder_ == null + ? intermediateDestinationsVersion_ + : intermediateDestinationsVersionBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.intermediateDestinationIndex_ = intermediateDestinationIndex_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.dropoffPoint_ = + dropoffPointBuilder_ == null ? dropoffPoint_ : dropoffPointBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.actualDropoffPoint_ = + actualDropoffPointBuilder_ == null + ? actualDropoffPoint_ + : actualDropoffPointBuilder_.build(); + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.dropoffTime_ = + dropoffTimeBuilder_ == null ? dropoffTime_ : dropoffTimeBuilder_.build(); + to_bitField0_ |= 0x00000080; + } + if (((from_bitField0_ & 0x00080000) != 0)) { + result.currentRouteSegment_ = currentRouteSegment_; + } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.currentRouteSegmentVersion_ = + currentRouteSegmentVersionBuilder_ == null + ? currentRouteSegmentVersion_ + : currentRouteSegmentVersionBuilder_.build(); + to_bitField0_ |= 0x00000100; + } + if (((from_bitField0_ & 0x00200000) != 0)) { + result.currentRouteSegmentTraffic_ = + currentRouteSegmentTrafficBuilder_ == null + ? currentRouteSegmentTraffic_ + : currentRouteSegmentTrafficBuilder_.build(); + to_bitField0_ |= 0x00000200; + } + if (((from_bitField0_ & 0x00400000) != 0)) { + result.currentRouteSegmentTrafficVersion_ = + currentRouteSegmentTrafficVersionBuilder_ == null + ? currentRouteSegmentTrafficVersion_ + : currentRouteSegmentTrafficVersionBuilder_.build(); + to_bitField0_ |= 0x00000400; + } + if (((from_bitField0_ & 0x00800000) != 0)) { + result.currentRouteSegmentEndPoint_ = + currentRouteSegmentEndPointBuilder_ == null + ? currentRouteSegmentEndPoint_ + : currentRouteSegmentEndPointBuilder_.build(); + to_bitField0_ |= 0x00000800; + } + if (((from_bitField0_ & 0x01000000) != 0)) { + result.remainingDistanceMeters_ = + remainingDistanceMetersBuilder_ == null + ? remainingDistanceMeters_ + : remainingDistanceMetersBuilder_.build(); + to_bitField0_ |= 0x00001000; + } + if (((from_bitField0_ & 0x02000000) != 0)) { + result.etaToFirstWaypoint_ = + etaToFirstWaypointBuilder_ == null + ? etaToFirstWaypoint_ + : etaToFirstWaypointBuilder_.build(); + to_bitField0_ |= 0x00002000; + } + if (((from_bitField0_ & 0x04000000) != 0)) { + result.remainingTimeToFirstWaypoint_ = + remainingTimeToFirstWaypointBuilder_ == null + ? remainingTimeToFirstWaypoint_ + : remainingTimeToFirstWaypointBuilder_.build(); + to_bitField0_ |= 0x00004000; + } + if (((from_bitField0_ & 0x08000000) != 0)) { + result.remainingWaypointsVersion_ = + remainingWaypointsVersionBuilder_ == null + ? remainingWaypointsVersion_ + : remainingWaypointsVersionBuilder_.build(); + to_bitField0_ |= 0x00008000; + } + if (((from_bitField0_ & 0x10000000) != 0)) { + result.remainingWaypointsRouteVersion_ = + remainingWaypointsRouteVersionBuilder_ == null + ? remainingWaypointsRouteVersion_ + : remainingWaypointsRouteVersionBuilder_.build(); + to_bitField0_ |= 0x00010000; + } + if (((from_bitField0_ & 0x20000000) != 0)) { + result.numberOfPassengers_ = numberOfPassengers_; + } + if (((from_bitField0_ & 0x40000000) != 0)) { + result.lastLocation_ = + lastLocationBuilder_ == null ? lastLocation_ : lastLocationBuilder_.build(); + to_bitField0_ |= 0x00020000; + } + if (((from_bitField0_ & 0x80000000) != 0)) { + result.lastLocationSnappable_ = lastLocationSnappable_; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartial1(com.google.maps.fleetengine.v1.Trip result) { + int from_bitField1_ = bitField1_; + if (((from_bitField1_ & 0x00000001) != 0)) { + result.view_ = view_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.fleetengine.v1.Trip) { + return mergeFrom((com.google.maps.fleetengine.v1.Trip) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.fleetengine.v1.Trip other) { + if (other == com.google.maps.fleetengine.v1.Trip.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getVehicleId().isEmpty()) { + vehicleId_ = other.vehicleId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.tripStatus_ != 0) { + setTripStatusValue(other.getTripStatusValue()); + } + if (other.tripType_ != 0) { + setTripTypeValue(other.getTripTypeValue()); + } + if (other.hasPickupPoint()) { + mergePickupPoint(other.getPickupPoint()); + } + if (other.hasActualPickupPoint()) { + mergeActualPickupPoint(other.getActualPickupPoint()); + } + if (other.hasActualPickupArrivalPoint()) { + mergeActualPickupArrivalPoint(other.getActualPickupArrivalPoint()); + } + if (other.hasPickupTime()) { + mergePickupTime(other.getPickupTime()); + } + if (intermediateDestinationsBuilder_ == null) { + if (!other.intermediateDestinations_.isEmpty()) { + if (intermediateDestinations_.isEmpty()) { + intermediateDestinations_ = other.intermediateDestinations_; + bitField0_ = (bitField0_ & ~0x00000100); + } else { + ensureIntermediateDestinationsIsMutable(); + intermediateDestinations_.addAll(other.intermediateDestinations_); + } + onChanged(); + } + } else { + if (!other.intermediateDestinations_.isEmpty()) { + if (intermediateDestinationsBuilder_.isEmpty()) { + intermediateDestinationsBuilder_.dispose(); + intermediateDestinationsBuilder_ = null; + intermediateDestinations_ = other.intermediateDestinations_; + bitField0_ = (bitField0_ & ~0x00000100); + intermediateDestinationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getIntermediateDestinationsFieldBuilder() + : null; + } else { + intermediateDestinationsBuilder_.addAllMessages(other.intermediateDestinations_); + } + } + } + if (other.hasIntermediateDestinationsVersion()) { + mergeIntermediateDestinationsVersion(other.getIntermediateDestinationsVersion()); + } + if (other.getIntermediateDestinationIndex() != 0) { + setIntermediateDestinationIndex(other.getIntermediateDestinationIndex()); + } + if (actualIntermediateDestinationArrivalPointsBuilder_ == null) { + if (!other.actualIntermediateDestinationArrivalPoints_.isEmpty()) { + if (actualIntermediateDestinationArrivalPoints_.isEmpty()) { + actualIntermediateDestinationArrivalPoints_ = + other.actualIntermediateDestinationArrivalPoints_; + bitField0_ = (bitField0_ & ~0x00000800); + } else { + ensureActualIntermediateDestinationArrivalPointsIsMutable(); + actualIntermediateDestinationArrivalPoints_.addAll( + other.actualIntermediateDestinationArrivalPoints_); + } + onChanged(); + } + } else { + if (!other.actualIntermediateDestinationArrivalPoints_.isEmpty()) { + if (actualIntermediateDestinationArrivalPointsBuilder_.isEmpty()) { + actualIntermediateDestinationArrivalPointsBuilder_.dispose(); + actualIntermediateDestinationArrivalPointsBuilder_ = null; + actualIntermediateDestinationArrivalPoints_ = + other.actualIntermediateDestinationArrivalPoints_; + bitField0_ = (bitField0_ & ~0x00000800); + actualIntermediateDestinationArrivalPointsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getActualIntermediateDestinationArrivalPointsFieldBuilder() + : null; + } else { + actualIntermediateDestinationArrivalPointsBuilder_.addAllMessages( + other.actualIntermediateDestinationArrivalPoints_); + } + } + } + if (actualIntermediateDestinationsBuilder_ == null) { + if (!other.actualIntermediateDestinations_.isEmpty()) { + if (actualIntermediateDestinations_.isEmpty()) { + actualIntermediateDestinations_ = other.actualIntermediateDestinations_; + bitField0_ = (bitField0_ & ~0x00001000); + } else { + ensureActualIntermediateDestinationsIsMutable(); + actualIntermediateDestinations_.addAll(other.actualIntermediateDestinations_); + } + onChanged(); + } + } else { + if (!other.actualIntermediateDestinations_.isEmpty()) { + if (actualIntermediateDestinationsBuilder_.isEmpty()) { + actualIntermediateDestinationsBuilder_.dispose(); + actualIntermediateDestinationsBuilder_ = null; + actualIntermediateDestinations_ = other.actualIntermediateDestinations_; + bitField0_ = (bitField0_ & ~0x00001000); + actualIntermediateDestinationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getActualIntermediateDestinationsFieldBuilder() + : null; + } else { + actualIntermediateDestinationsBuilder_.addAllMessages( + other.actualIntermediateDestinations_); + } + } + } + if (other.hasDropoffPoint()) { + mergeDropoffPoint(other.getDropoffPoint()); + } + if (other.hasActualDropoffPoint()) { + mergeActualDropoffPoint(other.getActualDropoffPoint()); + } + if (other.hasDropoffTime()) { + mergeDropoffTime(other.getDropoffTime()); + } + if (remainingWaypointsBuilder_ == null) { + if (!other.remainingWaypoints_.isEmpty()) { + if (remainingWaypoints_.isEmpty()) { + remainingWaypoints_ = other.remainingWaypoints_; + bitField0_ = (bitField0_ & ~0x00010000); + } else { + ensureRemainingWaypointsIsMutable(); + remainingWaypoints_.addAll(other.remainingWaypoints_); + } + onChanged(); + } + } else { + if (!other.remainingWaypoints_.isEmpty()) { + if (remainingWaypointsBuilder_.isEmpty()) { + remainingWaypointsBuilder_.dispose(); + remainingWaypointsBuilder_ = null; + remainingWaypoints_ = other.remainingWaypoints_; + bitField0_ = (bitField0_ & ~0x00010000); + remainingWaypointsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRemainingWaypointsFieldBuilder() + : null; + } else { + remainingWaypointsBuilder_.addAllMessages(other.remainingWaypoints_); + } + } + } + if (vehicleWaypointsBuilder_ == null) { + if (!other.vehicleWaypoints_.isEmpty()) { + if (vehicleWaypoints_.isEmpty()) { + vehicleWaypoints_ = other.vehicleWaypoints_; + bitField0_ = (bitField0_ & ~0x00020000); + } else { + ensureVehicleWaypointsIsMutable(); + vehicleWaypoints_.addAll(other.vehicleWaypoints_); + } + onChanged(); + } + } else { + if (!other.vehicleWaypoints_.isEmpty()) { + if (vehicleWaypointsBuilder_.isEmpty()) { + vehicleWaypointsBuilder_.dispose(); + vehicleWaypointsBuilder_ = null; + vehicleWaypoints_ = other.vehicleWaypoints_; + bitField0_ = (bitField0_ & ~0x00020000); + vehicleWaypointsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getVehicleWaypointsFieldBuilder() + : null; + } else { + vehicleWaypointsBuilder_.addAllMessages(other.vehicleWaypoints_); + } + } + } + if (routeBuilder_ == null) { + if (!other.route_.isEmpty()) { + if (route_.isEmpty()) { + route_ = other.route_; + bitField0_ = (bitField0_ & ~0x00040000); + } else { + ensureRouteIsMutable(); + route_.addAll(other.route_); + } + onChanged(); + } + } else { + if (!other.route_.isEmpty()) { + if (routeBuilder_.isEmpty()) { + routeBuilder_.dispose(); + routeBuilder_ = null; + route_ = other.route_; + bitField0_ = (bitField0_ & ~0x00040000); + routeBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRouteFieldBuilder() + : null; + } else { + routeBuilder_.addAllMessages(other.route_); + } + } + } + if (!other.getCurrentRouteSegment().isEmpty()) { + currentRouteSegment_ = other.currentRouteSegment_; + bitField0_ |= 0x00080000; + onChanged(); + } + if (other.hasCurrentRouteSegmentVersion()) { + mergeCurrentRouteSegmentVersion(other.getCurrentRouteSegmentVersion()); + } + if (other.hasCurrentRouteSegmentTraffic()) { + mergeCurrentRouteSegmentTraffic(other.getCurrentRouteSegmentTraffic()); + } + if (other.hasCurrentRouteSegmentTrafficVersion()) { + mergeCurrentRouteSegmentTrafficVersion(other.getCurrentRouteSegmentTrafficVersion()); + } + if (other.hasCurrentRouteSegmentEndPoint()) { + mergeCurrentRouteSegmentEndPoint(other.getCurrentRouteSegmentEndPoint()); + } + if (other.hasRemainingDistanceMeters()) { + mergeRemainingDistanceMeters(other.getRemainingDistanceMeters()); + } + if (other.hasEtaToFirstWaypoint()) { + mergeEtaToFirstWaypoint(other.getEtaToFirstWaypoint()); + } + if (other.hasRemainingTimeToFirstWaypoint()) { + mergeRemainingTimeToFirstWaypoint(other.getRemainingTimeToFirstWaypoint()); + } + if (other.hasRemainingWaypointsVersion()) { + mergeRemainingWaypointsVersion(other.getRemainingWaypointsVersion()); + } + if (other.hasRemainingWaypointsRouteVersion()) { + mergeRemainingWaypointsRouteVersion(other.getRemainingWaypointsRouteVersion()); + } + if (other.getNumberOfPassengers() != 0) { + setNumberOfPassengers(other.getNumberOfPassengers()); + } + if (other.hasLastLocation()) { + mergeLastLocation(other.getLastLocation()); + } + if (other.getLastLocationSnappable() != false) { + setLastLocationSnappable(other.getLastLocationSnappable()); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + 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: + { + vehicleId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + tripStatus_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + tripType_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + input.readMessage(getPickupPointFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage(getPickupTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 50 + case 58: + { + input.readMessage(getDropoffPointFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 58 + case 66: + { + input.readMessage(getDropoffTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00008000; + break; + } // case 66 + case 74: + { + com.google.type.LatLng m = + input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); + if (routeBuilder_ == null) { + ensureRouteIsMutable(); + route_.add(m); + } else { + routeBuilder_.addMessage(m); + } + break; + } // case 74 + case 80: + { + numberOfPassengers_ = input.readInt32(); + bitField0_ |= 0x20000000; + break; + } // case 80 + case 90: + { + input.readMessage(getLastLocationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x40000000; + break; + } // case 90 + case 98: + { + input.readMessage( + getRemainingDistanceMetersFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x01000000; + break; + } // case 98 + case 106: + { + input.readMessage( + getEtaToFirstWaypointFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x02000000; + break; + } // case 106 + case 114: + { + com.google.maps.fleetengine.v1.TerminalLocation m = + input.readMessage( + com.google.maps.fleetengine.v1.TerminalLocation.parser(), + extensionRegistry); + if (intermediateDestinationsBuilder_ == null) { + ensureIntermediateDestinationsIsMutable(); + intermediateDestinations_.add(m); + } else { + intermediateDestinationsBuilder_.addMessage(m); + } + break; + } // case 114 + case 120: + { + intermediateDestinationIndex_ = input.readInt32(); + bitField0_ |= 0x00000400; + break; + } // case 120 + case 130: + { + com.google.maps.fleetengine.v1.TripWaypoint m = + input.readMessage( + com.google.maps.fleetengine.v1.TripWaypoint.parser(), extensionRegistry); + if (remainingWaypointsBuilder_ == null) { + ensureRemainingWaypointsIsMutable(); + remainingWaypoints_.add(m); + } else { + remainingWaypointsBuilder_.addMessage(m); + } + break; + } // case 130 + case 138: + { + input.readMessage( + getCurrentRouteSegmentVersionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00100000; + break; + } // case 138 + case 154: + { + input.readMessage( + getRemainingWaypointsVersionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x08000000; + break; + } // case 154 + case 162: + { + com.google.maps.fleetengine.v1.TripWaypoint m = + input.readMessage( + com.google.maps.fleetengine.v1.TripWaypoint.parser(), extensionRegistry); + if (vehicleWaypointsBuilder_ == null) { + ensureVehicleWaypointsIsMutable(); + vehicleWaypoints_.add(m); + } else { + vehicleWaypointsBuilder_.addMessage(m); + } + break; + } // case 162 + case 170: + { + currentRouteSegment_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00080000; + break; + } // case 170 + case 178: + { + input.readMessage( + getActualPickupPointFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 178 + case 186: + { + input.readMessage( + getActualDropoffPointFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 186 + case 194: + { + input.readMessage( + getCurrentRouteSegmentEndPointFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00800000; + break; + } // case 194 + case 202: + { + input.readMessage( + getIntermediateDestinationsVersionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 202 + case 208: + { + lastLocationSnappable_ = input.readBool(); + bitField0_ |= 0x80000000; + break; + } // case 208 + case 218: + { + input.readMessage( + getRemainingTimeToFirstWaypointFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x04000000; + break; + } // case 218 + case 226: + { + input.readMessage( + getCurrentRouteSegmentTrafficFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00200000; + break; + } // case 226 + case 234: + { + input.readMessage( + getRemainingWaypointsRouteVersionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x10000000; + break; + } // case 234 + case 242: + { + input.readMessage( + getCurrentRouteSegmentTrafficVersionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00400000; + break; + } // case 242 + case 248: + { + view_ = input.readEnum(); + bitField1_ |= 0x00000001; + break; + } // case 248 + case 258: + { + input.readMessage( + getActualPickupArrivalPointFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 258 + case 266: + { + com.google.maps.fleetengine.v1.StopLocation m = + input.readMessage( + com.google.maps.fleetengine.v1.StopLocation.parser(), extensionRegistry); + if (actualIntermediateDestinationArrivalPointsBuilder_ == null) { + ensureActualIntermediateDestinationArrivalPointsIsMutable(); + actualIntermediateDestinationArrivalPoints_.add(m); + } else { + actualIntermediateDestinationArrivalPointsBuilder_.addMessage(m); + } + break; + } // case 266 + case 274: + { + com.google.maps.fleetengine.v1.StopLocation m = + input.readMessage( + com.google.maps.fleetengine.v1.StopLocation.parser(), extensionRegistry); + if (actualIntermediateDestinationsBuilder_ == null) { + ensureActualIntermediateDestinationsIsMutable(); + actualIntermediateDestinations_.add(m); + } else { + actualIntermediateDestinationsBuilder_.addMessage(m); + } + break; + } // case 274 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + private int bitField1_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. In the format "providers/{provider}/trips/{trip}"
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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. In the format "providers/{provider}/trips/{trip}"
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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. In the format "providers/{provider}/trips/{trip}"
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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. In the format "providers/{provider}/trips/{trip}"
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. In the format "providers/{provider}/trips/{trip}"
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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 java.lang.Object vehicleId_ = ""; + /** + * + * + *
+     * ID of the vehicle making this trip.
+     * 
+ * + * string vehicle_id = 2; + * + * @return The vehicleId. + */ + public java.lang.String getVehicleId() { + java.lang.Object ref = vehicleId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vehicleId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * ID of the vehicle making this trip.
+     * 
+ * + * string vehicle_id = 2; + * + * @return The bytes for vehicleId. + */ + public com.google.protobuf.ByteString getVehicleIdBytes() { + java.lang.Object ref = vehicleId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vehicleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * ID of the vehicle making this trip.
+     * 
+ * + * string vehicle_id = 2; + * + * @param value The vehicleId to set. + * @return This builder for chaining. + */ + public Builder setVehicleId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + vehicleId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * ID of the vehicle making this trip.
+     * 
+ * + * string vehicle_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearVehicleId() { + vehicleId_ = getDefaultInstance().getVehicleId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * ID of the vehicle making this trip.
+     * 
+ * + * string vehicle_id = 2; + * + * @param value The bytes for vehicleId to set. + * @return This builder for chaining. + */ + public Builder setVehicleIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + vehicleId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int tripStatus_ = 0; + /** + * + * + *
+     * Current status of the trip.
+     * 
+ * + * .maps.fleetengine.v1.TripStatus trip_status = 3; + * + * @return The enum numeric value on the wire for tripStatus. + */ + @java.lang.Override + public int getTripStatusValue() { + return tripStatus_; + } + /** + * + * + *
+     * Current status of the trip.
+     * 
+ * + * .maps.fleetengine.v1.TripStatus trip_status = 3; + * + * @param value The enum numeric value on the wire for tripStatus to set. + * @return This builder for chaining. + */ + public Builder setTripStatusValue(int value) { + tripStatus_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Current status of the trip.
+     * 
+ * + * .maps.fleetengine.v1.TripStatus trip_status = 3; + * + * @return The tripStatus. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TripStatus getTripStatus() { + com.google.maps.fleetengine.v1.TripStatus result = + com.google.maps.fleetengine.v1.TripStatus.forNumber(tripStatus_); + return result == null ? com.google.maps.fleetengine.v1.TripStatus.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Current status of the trip.
+     * 
+ * + * .maps.fleetengine.v1.TripStatus trip_status = 3; + * + * @param value The tripStatus to set. + * @return This builder for chaining. + */ + public Builder setTripStatus(com.google.maps.fleetengine.v1.TripStatus value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + tripStatus_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Current status of the trip.
+     * 
+ * + * .maps.fleetengine.v1.TripStatus trip_status = 3; + * + * @return This builder for chaining. + */ + public Builder clearTripStatus() { + bitField0_ = (bitField0_ & ~0x00000004); + tripStatus_ = 0; + onChanged(); + return this; + } + + private int tripType_ = 0; + /** + * + * + *
+     * The type of the trip.
+     * 
+ * + * .maps.fleetengine.v1.TripType trip_type = 4; + * + * @return The enum numeric value on the wire for tripType. + */ + @java.lang.Override + public int getTripTypeValue() { + return tripType_; + } + /** + * + * + *
+     * The type of the trip.
+     * 
+ * + * .maps.fleetengine.v1.TripType trip_type = 4; + * + * @param value The enum numeric value on the wire for tripType to set. + * @return This builder for chaining. + */ + public Builder setTripTypeValue(int value) { + tripType_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of the trip.
+     * 
+ * + * .maps.fleetengine.v1.TripType trip_type = 4; + * + * @return The tripType. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TripType getTripType() { + com.google.maps.fleetengine.v1.TripType result = + com.google.maps.fleetengine.v1.TripType.forNumber(tripType_); + return result == null ? com.google.maps.fleetengine.v1.TripType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The type of the trip.
+     * 
+ * + * .maps.fleetengine.v1.TripType trip_type = 4; + * + * @param value The tripType to set. + * @return This builder for chaining. + */ + public Builder setTripType(com.google.maps.fleetengine.v1.TripType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + tripType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of the trip.
+     * 
+ * + * .maps.fleetengine.v1.TripType trip_type = 4; + * + * @return This builder for chaining. + */ + public Builder clearTripType() { + bitField0_ = (bitField0_ & ~0x00000008); + tripType_ = 0; + onChanged(); + return this; + } + + private com.google.maps.fleetengine.v1.TerminalLocation pickupPoint_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.TerminalLocation, + com.google.maps.fleetengine.v1.TerminalLocation.Builder, + com.google.maps.fleetengine.v1.TerminalLocationOrBuilder> + pickupPointBuilder_; + /** + * + * + *
+     * Location where customer indicates they will be picked up.
+     * 
+ * + * .maps.fleetengine.v1.TerminalLocation pickup_point = 5; + * + * @return Whether the pickupPoint field is set. + */ + public boolean hasPickupPoint() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Location where customer indicates they will be picked up.
+     * 
+ * + * .maps.fleetengine.v1.TerminalLocation pickup_point = 5; + * + * @return The pickupPoint. + */ + public com.google.maps.fleetengine.v1.TerminalLocation getPickupPoint() { + if (pickupPointBuilder_ == null) { + return pickupPoint_ == null + ? com.google.maps.fleetengine.v1.TerminalLocation.getDefaultInstance() + : pickupPoint_; + } else { + return pickupPointBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Location where customer indicates they will be picked up.
+     * 
+ * + * .maps.fleetengine.v1.TerminalLocation pickup_point = 5; + */ + public Builder setPickupPoint(com.google.maps.fleetengine.v1.TerminalLocation value) { + if (pickupPointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pickupPoint_ = value; + } else { + pickupPointBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Location where customer indicates they will be picked up.
+     * 
+ * + * .maps.fleetengine.v1.TerminalLocation pickup_point = 5; + */ + public Builder setPickupPoint( + com.google.maps.fleetengine.v1.TerminalLocation.Builder builderForValue) { + if (pickupPointBuilder_ == null) { + pickupPoint_ = builderForValue.build(); + } else { + pickupPointBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Location where customer indicates they will be picked up.
+     * 
+ * + * .maps.fleetengine.v1.TerminalLocation pickup_point = 5; + */ + public Builder mergePickupPoint(com.google.maps.fleetengine.v1.TerminalLocation value) { + if (pickupPointBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && pickupPoint_ != null + && pickupPoint_ + != com.google.maps.fleetengine.v1.TerminalLocation.getDefaultInstance()) { + getPickupPointBuilder().mergeFrom(value); + } else { + pickupPoint_ = value; + } + } else { + pickupPointBuilder_.mergeFrom(value); + } + if (pickupPoint_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Location where customer indicates they will be picked up.
+     * 
+ * + * .maps.fleetengine.v1.TerminalLocation pickup_point = 5; + */ + public Builder clearPickupPoint() { + bitField0_ = (bitField0_ & ~0x00000010); + pickupPoint_ = null; + if (pickupPointBuilder_ != null) { + pickupPointBuilder_.dispose(); + pickupPointBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Location where customer indicates they will be picked up.
+     * 
+ * + * .maps.fleetengine.v1.TerminalLocation pickup_point = 5; + */ + public com.google.maps.fleetengine.v1.TerminalLocation.Builder getPickupPointBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getPickupPointFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Location where customer indicates they will be picked up.
+     * 
+ * + * .maps.fleetengine.v1.TerminalLocation pickup_point = 5; + */ + public com.google.maps.fleetengine.v1.TerminalLocationOrBuilder getPickupPointOrBuilder() { + if (pickupPointBuilder_ != null) { + return pickupPointBuilder_.getMessageOrBuilder(); + } else { + return pickupPoint_ == null + ? com.google.maps.fleetengine.v1.TerminalLocation.getDefaultInstance() + : pickupPoint_; + } + } + /** + * + * + *
+     * Location where customer indicates they will be picked up.
+     * 
+ * + * .maps.fleetengine.v1.TerminalLocation pickup_point = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.TerminalLocation, + com.google.maps.fleetengine.v1.TerminalLocation.Builder, + com.google.maps.fleetengine.v1.TerminalLocationOrBuilder> + getPickupPointFieldBuilder() { + if (pickupPointBuilder_ == null) { + pickupPointBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.TerminalLocation, + com.google.maps.fleetengine.v1.TerminalLocation.Builder, + com.google.maps.fleetengine.v1.TerminalLocationOrBuilder>( + getPickupPoint(), getParentForChildren(), isClean()); + pickupPoint_ = null; + } + return pickupPointBuilder_; + } + + private com.google.maps.fleetengine.v1.StopLocation actualPickupPoint_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.StopLocation, + com.google.maps.fleetengine.v1.StopLocation.Builder, + com.google.maps.fleetengine.v1.StopLocationOrBuilder> + actualPickupPointBuilder_; + /** + * + * + *
+     * Input only. The actual location when and where customer was picked up.
+     * This field is for provider to provide feedback on actual pickup
+     * information.
+     * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_pickup_point = 22 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the actualPickupPoint field is set. + */ + public boolean hasActualPickupPoint() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * Input only. The actual location when and where customer was picked up.
+     * This field is for provider to provide feedback on actual pickup
+     * information.
+     * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_pickup_point = 22 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The actualPickupPoint. + */ + public com.google.maps.fleetengine.v1.StopLocation getActualPickupPoint() { + if (actualPickupPointBuilder_ == null) { + return actualPickupPoint_ == null + ? com.google.maps.fleetengine.v1.StopLocation.getDefaultInstance() + : actualPickupPoint_; + } else { + return actualPickupPointBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Input only. The actual location when and where customer was picked up.
+     * This field is for provider to provide feedback on actual pickup
+     * information.
+     * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_pickup_point = 22 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setActualPickupPoint(com.google.maps.fleetengine.v1.StopLocation value) { + if (actualPickupPointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + actualPickupPoint_ = value; + } else { + actualPickupPointBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. The actual location when and where customer was picked up.
+     * This field is for provider to provide feedback on actual pickup
+     * information.
+     * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_pickup_point = 22 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setActualPickupPoint( + com.google.maps.fleetengine.v1.StopLocation.Builder builderForValue) { + if (actualPickupPointBuilder_ == null) { + actualPickupPoint_ = builderForValue.build(); + } else { + actualPickupPointBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. The actual location when and where customer was picked up.
+     * This field is for provider to provide feedback on actual pickup
+     * information.
+     * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_pickup_point = 22 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder mergeActualPickupPoint(com.google.maps.fleetengine.v1.StopLocation value) { + if (actualPickupPointBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && actualPickupPoint_ != null + && actualPickupPoint_ + != com.google.maps.fleetengine.v1.StopLocation.getDefaultInstance()) { + getActualPickupPointBuilder().mergeFrom(value); + } else { + actualPickupPoint_ = value; + } + } else { + actualPickupPointBuilder_.mergeFrom(value); + } + if (actualPickupPoint_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Input only. The actual location when and where customer was picked up.
+     * This field is for provider to provide feedback on actual pickup
+     * information.
+     * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_pickup_point = 22 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder clearActualPickupPoint() { + bitField0_ = (bitField0_ & ~0x00000020); + actualPickupPoint_ = null; + if (actualPickupPointBuilder_ != null) { + actualPickupPointBuilder_.dispose(); + actualPickupPointBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. The actual location when and where customer was picked up.
+     * This field is for provider to provide feedback on actual pickup
+     * information.
+     * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_pickup_point = 22 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.maps.fleetengine.v1.StopLocation.Builder getActualPickupPointBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getActualPickupPointFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Input only. The actual location when and where customer was picked up.
+     * This field is for provider to provide feedback on actual pickup
+     * information.
+     * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_pickup_point = 22 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.maps.fleetengine.v1.StopLocationOrBuilder getActualPickupPointOrBuilder() { + if (actualPickupPointBuilder_ != null) { + return actualPickupPointBuilder_.getMessageOrBuilder(); + } else { + return actualPickupPoint_ == null + ? com.google.maps.fleetengine.v1.StopLocation.getDefaultInstance() + : actualPickupPoint_; + } + } + /** + * + * + *
+     * Input only. The actual location when and where customer was picked up.
+     * This field is for provider to provide feedback on actual pickup
+     * information.
+     * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_pickup_point = 22 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.StopLocation, + com.google.maps.fleetengine.v1.StopLocation.Builder, + com.google.maps.fleetengine.v1.StopLocationOrBuilder> + getActualPickupPointFieldBuilder() { + if (actualPickupPointBuilder_ == null) { + actualPickupPointBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.StopLocation, + com.google.maps.fleetengine.v1.StopLocation.Builder, + com.google.maps.fleetengine.v1.StopLocationOrBuilder>( + getActualPickupPoint(), getParentForChildren(), isClean()); + actualPickupPoint_ = null; + } + return actualPickupPointBuilder_; + } + + private com.google.maps.fleetengine.v1.StopLocation actualPickupArrivalPoint_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.StopLocation, + com.google.maps.fleetengine.v1.StopLocation.Builder, + com.google.maps.fleetengine.v1.StopLocationOrBuilder> + actualPickupArrivalPointBuilder_; + /** + * + * + *
+     * Input only. The actual time and location of the driver arrival at
+     * the pickup point.
+     * This field is for provider to provide feedback on actual arrival
+     * information at the pickup point.
+     * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_pickup_arrival_point = 32 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the actualPickupArrivalPoint field is set. + */ + public boolean hasActualPickupArrivalPoint() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Input only. The actual time and location of the driver arrival at
+     * the pickup point.
+     * This field is for provider to provide feedback on actual arrival
+     * information at the pickup point.
+     * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_pickup_arrival_point = 32 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The actualPickupArrivalPoint. + */ + public com.google.maps.fleetengine.v1.StopLocation getActualPickupArrivalPoint() { + if (actualPickupArrivalPointBuilder_ == null) { + return actualPickupArrivalPoint_ == null + ? com.google.maps.fleetengine.v1.StopLocation.getDefaultInstance() + : actualPickupArrivalPoint_; + } else { + return actualPickupArrivalPointBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Input only. The actual time and location of the driver arrival at
+     * the pickup point.
+     * This field is for provider to provide feedback on actual arrival
+     * information at the pickup point.
+     * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_pickup_arrival_point = 32 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setActualPickupArrivalPoint(com.google.maps.fleetengine.v1.StopLocation value) { + if (actualPickupArrivalPointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + actualPickupArrivalPoint_ = value; + } else { + actualPickupArrivalPointBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. The actual time and location of the driver arrival at
+     * the pickup point.
+     * This field is for provider to provide feedback on actual arrival
+     * information at the pickup point.
+     * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_pickup_arrival_point = 32 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setActualPickupArrivalPoint( + com.google.maps.fleetengine.v1.StopLocation.Builder builderForValue) { + if (actualPickupArrivalPointBuilder_ == null) { + actualPickupArrivalPoint_ = builderForValue.build(); + } else { + actualPickupArrivalPointBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. The actual time and location of the driver arrival at
+     * the pickup point.
+     * This field is for provider to provide feedback on actual arrival
+     * information at the pickup point.
+     * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_pickup_arrival_point = 32 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder mergeActualPickupArrivalPoint( + com.google.maps.fleetengine.v1.StopLocation value) { + if (actualPickupArrivalPointBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && actualPickupArrivalPoint_ != null + && actualPickupArrivalPoint_ + != com.google.maps.fleetengine.v1.StopLocation.getDefaultInstance()) { + getActualPickupArrivalPointBuilder().mergeFrom(value); + } else { + actualPickupArrivalPoint_ = value; + } + } else { + actualPickupArrivalPointBuilder_.mergeFrom(value); + } + if (actualPickupArrivalPoint_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Input only. The actual time and location of the driver arrival at
+     * the pickup point.
+     * This field is for provider to provide feedback on actual arrival
+     * information at the pickup point.
+     * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_pickup_arrival_point = 32 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder clearActualPickupArrivalPoint() { + bitField0_ = (bitField0_ & ~0x00000040); + actualPickupArrivalPoint_ = null; + if (actualPickupArrivalPointBuilder_ != null) { + actualPickupArrivalPointBuilder_.dispose(); + actualPickupArrivalPointBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. The actual time and location of the driver arrival at
+     * the pickup point.
+     * This field is for provider to provide feedback on actual arrival
+     * information at the pickup point.
+     * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_pickup_arrival_point = 32 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.maps.fleetengine.v1.StopLocation.Builder + getActualPickupArrivalPointBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getActualPickupArrivalPointFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Input only. The actual time and location of the driver arrival at
+     * the pickup point.
+     * This field is for provider to provide feedback on actual arrival
+     * information at the pickup point.
+     * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_pickup_arrival_point = 32 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.maps.fleetengine.v1.StopLocationOrBuilder + getActualPickupArrivalPointOrBuilder() { + if (actualPickupArrivalPointBuilder_ != null) { + return actualPickupArrivalPointBuilder_.getMessageOrBuilder(); + } else { + return actualPickupArrivalPoint_ == null + ? com.google.maps.fleetengine.v1.StopLocation.getDefaultInstance() + : actualPickupArrivalPoint_; + } + } + /** + * + * + *
+     * Input only. The actual time and location of the driver arrival at
+     * the pickup point.
+     * This field is for provider to provide feedback on actual arrival
+     * information at the pickup point.
+     * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_pickup_arrival_point = 32 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.StopLocation, + com.google.maps.fleetengine.v1.StopLocation.Builder, + com.google.maps.fleetengine.v1.StopLocationOrBuilder> + getActualPickupArrivalPointFieldBuilder() { + if (actualPickupArrivalPointBuilder_ == null) { + actualPickupArrivalPointBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.StopLocation, + com.google.maps.fleetengine.v1.StopLocation.Builder, + com.google.maps.fleetengine.v1.StopLocationOrBuilder>( + getActualPickupArrivalPoint(), getParentForChildren(), isClean()); + actualPickupArrivalPoint_ = null; + } + return actualPickupArrivalPointBuilder_; + } + + private com.google.protobuf.Timestamp pickupTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + pickupTimeBuilder_; + /** + * + * + *
+     * Output only. Either the estimated future time when the rider(s) will be
+     * picked up, or the actual time when they were picked up.
+     * 
+ * + * + * .google.protobuf.Timestamp pickup_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the pickupTime field is set. + */ + public boolean hasPickupTime() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Output only. Either the estimated future time when the rider(s) will be
+     * picked up, or the actual time when they were picked up.
+     * 
+ * + * + * .google.protobuf.Timestamp pickup_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The pickupTime. + */ + public com.google.protobuf.Timestamp getPickupTime() { + if (pickupTimeBuilder_ == null) { + return pickupTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : pickupTime_; + } else { + return pickupTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Either the estimated future time when the rider(s) will be
+     * picked up, or the actual time when they were picked up.
+     * 
+ * + * + * .google.protobuf.Timestamp pickup_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPickupTime(com.google.protobuf.Timestamp value) { + if (pickupTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pickupTime_ = value; + } else { + pickupTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Either the estimated future time when the rider(s) will be
+     * picked up, or the actual time when they were picked up.
+     * 
+ * + * + * .google.protobuf.Timestamp pickup_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPickupTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (pickupTimeBuilder_ == null) { + pickupTime_ = builderForValue.build(); + } else { + pickupTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Either the estimated future time when the rider(s) will be
+     * picked up, or the actual time when they were picked up.
+     * 
+ * + * + * .google.protobuf.Timestamp pickup_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergePickupTime(com.google.protobuf.Timestamp value) { + if (pickupTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && pickupTime_ != null + && pickupTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getPickupTimeBuilder().mergeFrom(value); + } else { + pickupTime_ = value; + } + } else { + pickupTimeBuilder_.mergeFrom(value); + } + if (pickupTime_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Either the estimated future time when the rider(s) will be
+     * picked up, or the actual time when they were picked up.
+     * 
+ * + * + * .google.protobuf.Timestamp pickup_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearPickupTime() { + bitField0_ = (bitField0_ & ~0x00000080); + pickupTime_ = null; + if (pickupTimeBuilder_ != null) { + pickupTimeBuilder_.dispose(); + pickupTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Either the estimated future time when the rider(s) will be
+     * picked up, or the actual time when they were picked up.
+     * 
+ * + * + * .google.protobuf.Timestamp pickup_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getPickupTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getPickupTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Either the estimated future time when the rider(s) will be
+     * picked up, or the actual time when they were picked up.
+     * 
+ * + * + * .google.protobuf.Timestamp pickup_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getPickupTimeOrBuilder() { + if (pickupTimeBuilder_ != null) { + return pickupTimeBuilder_.getMessageOrBuilder(); + } else { + return pickupTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : pickupTime_; + } + } + /** + * + * + *
+     * Output only. Either the estimated future time when the rider(s) will be
+     * picked up, or the actual time when they were picked up.
+     * 
+ * + * + * .google.protobuf.Timestamp pickup_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getPickupTimeFieldBuilder() { + if (pickupTimeBuilder_ == null) { + pickupTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getPickupTime(), getParentForChildren(), isClean()); + pickupTime_ = null; + } + return pickupTimeBuilder_; + } + + private java.util.List + intermediateDestinations_ = java.util.Collections.emptyList(); + + private void ensureIntermediateDestinationsIsMutable() { + if (!((bitField0_ & 0x00000100) != 0)) { + intermediateDestinations_ = + new java.util.ArrayList( + intermediateDestinations_); + bitField0_ |= 0x00000100; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.TerminalLocation, + com.google.maps.fleetengine.v1.TerminalLocation.Builder, + com.google.maps.fleetengine.v1.TerminalLocationOrBuilder> + intermediateDestinationsBuilder_; + + /** + * + * + *
+     * Intermediate stops in order that the trip requests (in addition
+     * to pickup and dropoff). Initially this will not be supported for shared
+     * trips.
+     * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation intermediate_destinations = 14; + */ + public java.util.List + getIntermediateDestinationsList() { + if (intermediateDestinationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(intermediateDestinations_); + } else { + return intermediateDestinationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Intermediate stops in order that the trip requests (in addition
+     * to pickup and dropoff). Initially this will not be supported for shared
+     * trips.
+     * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation intermediate_destinations = 14; + */ + public int getIntermediateDestinationsCount() { + if (intermediateDestinationsBuilder_ == null) { + return intermediateDestinations_.size(); + } else { + return intermediateDestinationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Intermediate stops in order that the trip requests (in addition
+     * to pickup and dropoff). Initially this will not be supported for shared
+     * trips.
+     * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation intermediate_destinations = 14; + */ + public com.google.maps.fleetengine.v1.TerminalLocation getIntermediateDestinations(int index) { + if (intermediateDestinationsBuilder_ == null) { + return intermediateDestinations_.get(index); + } else { + return intermediateDestinationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Intermediate stops in order that the trip requests (in addition
+     * to pickup and dropoff). Initially this will not be supported for shared
+     * trips.
+     * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation intermediate_destinations = 14; + */ + public Builder setIntermediateDestinations( + int index, com.google.maps.fleetengine.v1.TerminalLocation value) { + if (intermediateDestinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIntermediateDestinationsIsMutable(); + intermediateDestinations_.set(index, value); + onChanged(); + } else { + intermediateDestinationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Intermediate stops in order that the trip requests (in addition
+     * to pickup and dropoff). Initially this will not be supported for shared
+     * trips.
+     * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation intermediate_destinations = 14; + */ + public Builder setIntermediateDestinations( + int index, com.google.maps.fleetengine.v1.TerminalLocation.Builder builderForValue) { + if (intermediateDestinationsBuilder_ == null) { + ensureIntermediateDestinationsIsMutable(); + intermediateDestinations_.set(index, builderForValue.build()); + onChanged(); + } else { + intermediateDestinationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Intermediate stops in order that the trip requests (in addition
+     * to pickup and dropoff). Initially this will not be supported for shared
+     * trips.
+     * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation intermediate_destinations = 14; + */ + public Builder addIntermediateDestinations( + com.google.maps.fleetengine.v1.TerminalLocation value) { + if (intermediateDestinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIntermediateDestinationsIsMutable(); + intermediateDestinations_.add(value); + onChanged(); + } else { + intermediateDestinationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Intermediate stops in order that the trip requests (in addition
+     * to pickup and dropoff). Initially this will not be supported for shared
+     * trips.
+     * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation intermediate_destinations = 14; + */ + public Builder addIntermediateDestinations( + int index, com.google.maps.fleetengine.v1.TerminalLocation value) { + if (intermediateDestinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIntermediateDestinationsIsMutable(); + intermediateDestinations_.add(index, value); + onChanged(); + } else { + intermediateDestinationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Intermediate stops in order that the trip requests (in addition
+     * to pickup and dropoff). Initially this will not be supported for shared
+     * trips.
+     * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation intermediate_destinations = 14; + */ + public Builder addIntermediateDestinations( + com.google.maps.fleetengine.v1.TerminalLocation.Builder builderForValue) { + if (intermediateDestinationsBuilder_ == null) { + ensureIntermediateDestinationsIsMutable(); + intermediateDestinations_.add(builderForValue.build()); + onChanged(); + } else { + intermediateDestinationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Intermediate stops in order that the trip requests (in addition
+     * to pickup and dropoff). Initially this will not be supported for shared
+     * trips.
+     * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation intermediate_destinations = 14; + */ + public Builder addIntermediateDestinations( + int index, com.google.maps.fleetengine.v1.TerminalLocation.Builder builderForValue) { + if (intermediateDestinationsBuilder_ == null) { + ensureIntermediateDestinationsIsMutable(); + intermediateDestinations_.add(index, builderForValue.build()); + onChanged(); + } else { + intermediateDestinationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Intermediate stops in order that the trip requests (in addition
+     * to pickup and dropoff). Initially this will not be supported for shared
+     * trips.
+     * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation intermediate_destinations = 14; + */ + public Builder addAllIntermediateDestinations( + java.lang.Iterable values) { + if (intermediateDestinationsBuilder_ == null) { + ensureIntermediateDestinationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, intermediateDestinations_); + onChanged(); + } else { + intermediateDestinationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Intermediate stops in order that the trip requests (in addition
+     * to pickup and dropoff). Initially this will not be supported for shared
+     * trips.
+     * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation intermediate_destinations = 14; + */ + public Builder clearIntermediateDestinations() { + if (intermediateDestinationsBuilder_ == null) { + intermediateDestinations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + } else { + intermediateDestinationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Intermediate stops in order that the trip requests (in addition
+     * to pickup and dropoff). Initially this will not be supported for shared
+     * trips.
+     * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation intermediate_destinations = 14; + */ + public Builder removeIntermediateDestinations(int index) { + if (intermediateDestinationsBuilder_ == null) { + ensureIntermediateDestinationsIsMutable(); + intermediateDestinations_.remove(index); + onChanged(); + } else { + intermediateDestinationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Intermediate stops in order that the trip requests (in addition
+     * to pickup and dropoff). Initially this will not be supported for shared
+     * trips.
+     * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation intermediate_destinations = 14; + */ + public com.google.maps.fleetengine.v1.TerminalLocation.Builder + getIntermediateDestinationsBuilder(int index) { + return getIntermediateDestinationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Intermediate stops in order that the trip requests (in addition
+     * to pickup and dropoff). Initially this will not be supported for shared
+     * trips.
+     * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation intermediate_destinations = 14; + */ + public com.google.maps.fleetengine.v1.TerminalLocationOrBuilder + getIntermediateDestinationsOrBuilder(int index) { + if (intermediateDestinationsBuilder_ == null) { + return intermediateDestinations_.get(index); + } else { + return intermediateDestinationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Intermediate stops in order that the trip requests (in addition
+     * to pickup and dropoff). Initially this will not be supported for shared
+     * trips.
+     * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation intermediate_destinations = 14; + */ + public java.util.List + getIntermediateDestinationsOrBuilderList() { + if (intermediateDestinationsBuilder_ != null) { + return intermediateDestinationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(intermediateDestinations_); + } + } + /** + * + * + *
+     * Intermediate stops in order that the trip requests (in addition
+     * to pickup and dropoff). Initially this will not be supported for shared
+     * trips.
+     * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation intermediate_destinations = 14; + */ + public com.google.maps.fleetengine.v1.TerminalLocation.Builder + addIntermediateDestinationsBuilder() { + return getIntermediateDestinationsFieldBuilder() + .addBuilder(com.google.maps.fleetengine.v1.TerminalLocation.getDefaultInstance()); + } + /** + * + * + *
+     * Intermediate stops in order that the trip requests (in addition
+     * to pickup and dropoff). Initially this will not be supported for shared
+     * trips.
+     * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation intermediate_destinations = 14; + */ + public com.google.maps.fleetengine.v1.TerminalLocation.Builder + addIntermediateDestinationsBuilder(int index) { + return getIntermediateDestinationsFieldBuilder() + .addBuilder(index, com.google.maps.fleetengine.v1.TerminalLocation.getDefaultInstance()); + } + /** + * + * + *
+     * Intermediate stops in order that the trip requests (in addition
+     * to pickup and dropoff). Initially this will not be supported for shared
+     * trips.
+     * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation intermediate_destinations = 14; + */ + public java.util.List + getIntermediateDestinationsBuilderList() { + return getIntermediateDestinationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.TerminalLocation, + com.google.maps.fleetengine.v1.TerminalLocation.Builder, + com.google.maps.fleetengine.v1.TerminalLocationOrBuilder> + getIntermediateDestinationsFieldBuilder() { + if (intermediateDestinationsBuilder_ == null) { + intermediateDestinationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.TerminalLocation, + com.google.maps.fleetengine.v1.TerminalLocation.Builder, + com.google.maps.fleetengine.v1.TerminalLocationOrBuilder>( + intermediateDestinations_, + ((bitField0_ & 0x00000100) != 0), + getParentForChildren(), + isClean()); + intermediateDestinations_ = null; + } + return intermediateDestinationsBuilder_; + } + + private com.google.protobuf.Timestamp intermediateDestinationsVersion_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + intermediateDestinationsVersionBuilder_; + /** + * + * + *
+     * Indicates the last time the `intermediate_destinations` was modified.
+     * Your server should cache this value and pass it in `UpdateTripRequest`
+     * when update `intermediate_destination_index` to ensure the
+     * `intermediate_destinations` is not changed.
+     * 
+ * + * .google.protobuf.Timestamp intermediate_destinations_version = 25; + * + * @return Whether the intermediateDestinationsVersion field is set. + */ + public boolean hasIntermediateDestinationsVersion() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * + * + *
+     * Indicates the last time the `intermediate_destinations` was modified.
+     * Your server should cache this value and pass it in `UpdateTripRequest`
+     * when update `intermediate_destination_index` to ensure the
+     * `intermediate_destinations` is not changed.
+     * 
+ * + * .google.protobuf.Timestamp intermediate_destinations_version = 25; + * + * @return The intermediateDestinationsVersion. + */ + public com.google.protobuf.Timestamp getIntermediateDestinationsVersion() { + if (intermediateDestinationsVersionBuilder_ == null) { + return intermediateDestinationsVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : intermediateDestinationsVersion_; + } else { + return intermediateDestinationsVersionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Indicates the last time the `intermediate_destinations` was modified.
+     * Your server should cache this value and pass it in `UpdateTripRequest`
+     * when update `intermediate_destination_index` to ensure the
+     * `intermediate_destinations` is not changed.
+     * 
+ * + * .google.protobuf.Timestamp intermediate_destinations_version = 25; + */ + public Builder setIntermediateDestinationsVersion(com.google.protobuf.Timestamp value) { + if (intermediateDestinationsVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + intermediateDestinationsVersion_ = value; + } else { + intermediateDestinationsVersionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates the last time the `intermediate_destinations` was modified.
+     * Your server should cache this value and pass it in `UpdateTripRequest`
+     * when update `intermediate_destination_index` to ensure the
+     * `intermediate_destinations` is not changed.
+     * 
+ * + * .google.protobuf.Timestamp intermediate_destinations_version = 25; + */ + public Builder setIntermediateDestinationsVersion( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (intermediateDestinationsVersionBuilder_ == null) { + intermediateDestinationsVersion_ = builderForValue.build(); + } else { + intermediateDestinationsVersionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates the last time the `intermediate_destinations` was modified.
+     * Your server should cache this value and pass it in `UpdateTripRequest`
+     * when update `intermediate_destination_index` to ensure the
+     * `intermediate_destinations` is not changed.
+     * 
+ * + * .google.protobuf.Timestamp intermediate_destinations_version = 25; + */ + public Builder mergeIntermediateDestinationsVersion(com.google.protobuf.Timestamp value) { + if (intermediateDestinationsVersionBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && intermediateDestinationsVersion_ != null + && intermediateDestinationsVersion_ + != com.google.protobuf.Timestamp.getDefaultInstance()) { + getIntermediateDestinationsVersionBuilder().mergeFrom(value); + } else { + intermediateDestinationsVersion_ = value; + } + } else { + intermediateDestinationsVersionBuilder_.mergeFrom(value); + } + if (intermediateDestinationsVersion_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Indicates the last time the `intermediate_destinations` was modified.
+     * Your server should cache this value and pass it in `UpdateTripRequest`
+     * when update `intermediate_destination_index` to ensure the
+     * `intermediate_destinations` is not changed.
+     * 
+ * + * .google.protobuf.Timestamp intermediate_destinations_version = 25; + */ + public Builder clearIntermediateDestinationsVersion() { + bitField0_ = (bitField0_ & ~0x00000200); + intermediateDestinationsVersion_ = null; + if (intermediateDestinationsVersionBuilder_ != null) { + intermediateDestinationsVersionBuilder_.dispose(); + intermediateDestinationsVersionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates the last time the `intermediate_destinations` was modified.
+     * Your server should cache this value and pass it in `UpdateTripRequest`
+     * when update `intermediate_destination_index` to ensure the
+     * `intermediate_destinations` is not changed.
+     * 
+ * + * .google.protobuf.Timestamp intermediate_destinations_version = 25; + */ + public com.google.protobuf.Timestamp.Builder getIntermediateDestinationsVersionBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getIntermediateDestinationsVersionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Indicates the last time the `intermediate_destinations` was modified.
+     * Your server should cache this value and pass it in `UpdateTripRequest`
+     * when update `intermediate_destination_index` to ensure the
+     * `intermediate_destinations` is not changed.
+     * 
+ * + * .google.protobuf.Timestamp intermediate_destinations_version = 25; + */ + public com.google.protobuf.TimestampOrBuilder getIntermediateDestinationsVersionOrBuilder() { + if (intermediateDestinationsVersionBuilder_ != null) { + return intermediateDestinationsVersionBuilder_.getMessageOrBuilder(); + } else { + return intermediateDestinationsVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : intermediateDestinationsVersion_; + } + } + /** + * + * + *
+     * Indicates the last time the `intermediate_destinations` was modified.
+     * Your server should cache this value and pass it in `UpdateTripRequest`
+     * when update `intermediate_destination_index` to ensure the
+     * `intermediate_destinations` is not changed.
+     * 
+ * + * .google.protobuf.Timestamp intermediate_destinations_version = 25; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getIntermediateDestinationsVersionFieldBuilder() { + if (intermediateDestinationsVersionBuilder_ == null) { + intermediateDestinationsVersionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getIntermediateDestinationsVersion(), getParentForChildren(), isClean()); + intermediateDestinationsVersion_ = null; + } + return intermediateDestinationsVersionBuilder_; + } + + private int intermediateDestinationIndex_; + /** + * + * + *
+     * When `TripStatus` is `ENROUTE_TO_INTERMEDIATE_DESTINATION`, a number
+     * between [0..N-1] indicating which intermediate destination the vehicle will
+     * cross next. When `TripStatus` is `ARRIVED_AT_INTERMEDIATE_DESTINATION`, a
+     * number between [0..N-1] indicating which intermediate destination the
+     * vehicle is at. The provider sets this value. If there are no
+     * `intermediate_destinations`, this field is ignored.
+     * 
+ * + * int32 intermediate_destination_index = 15; + * + * @return The intermediateDestinationIndex. + */ + @java.lang.Override + public int getIntermediateDestinationIndex() { + return intermediateDestinationIndex_; + } + /** + * + * + *
+     * When `TripStatus` is `ENROUTE_TO_INTERMEDIATE_DESTINATION`, a number
+     * between [0..N-1] indicating which intermediate destination the vehicle will
+     * cross next. When `TripStatus` is `ARRIVED_AT_INTERMEDIATE_DESTINATION`, a
+     * number between [0..N-1] indicating which intermediate destination the
+     * vehicle is at. The provider sets this value. If there are no
+     * `intermediate_destinations`, this field is ignored.
+     * 
+ * + * int32 intermediate_destination_index = 15; + * + * @param value The intermediateDestinationIndex to set. + * @return This builder for chaining. + */ + public Builder setIntermediateDestinationIndex(int value) { + + intermediateDestinationIndex_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * When `TripStatus` is `ENROUTE_TO_INTERMEDIATE_DESTINATION`, a number
+     * between [0..N-1] indicating which intermediate destination the vehicle will
+     * cross next. When `TripStatus` is `ARRIVED_AT_INTERMEDIATE_DESTINATION`, a
+     * number between [0..N-1] indicating which intermediate destination the
+     * vehicle is at. The provider sets this value. If there are no
+     * `intermediate_destinations`, this field is ignored.
+     * 
+ * + * int32 intermediate_destination_index = 15; + * + * @return This builder for chaining. + */ + public Builder clearIntermediateDestinationIndex() { + bitField0_ = (bitField0_ & ~0x00000400); + intermediateDestinationIndex_ = 0; + onChanged(); + return this; + } + + private java.util.List + actualIntermediateDestinationArrivalPoints_ = java.util.Collections.emptyList(); + + private void ensureActualIntermediateDestinationArrivalPointsIsMutable() { + if (!((bitField0_ & 0x00000800) != 0)) { + actualIntermediateDestinationArrivalPoints_ = + new java.util.ArrayList( + actualIntermediateDestinationArrivalPoints_); + bitField0_ |= 0x00000800; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.StopLocation, + com.google.maps.fleetengine.v1.StopLocation.Builder, + com.google.maps.fleetengine.v1.StopLocationOrBuilder> + actualIntermediateDestinationArrivalPointsBuilder_; + + /** + * + * + *
+     * Input only. The actual time and location of the driver's arrival at
+     * an intermediate destination.
+     * This field is for provider to provide feedback on actual arrival
+     * information at intermediate destinations.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destination_arrival_points = 33 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public java.util.List + getActualIntermediateDestinationArrivalPointsList() { + if (actualIntermediateDestinationArrivalPointsBuilder_ == null) { + return java.util.Collections.unmodifiableList(actualIntermediateDestinationArrivalPoints_); + } else { + return actualIntermediateDestinationArrivalPointsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Input only. The actual time and location of the driver's arrival at
+     * an intermediate destination.
+     * This field is for provider to provide feedback on actual arrival
+     * information at intermediate destinations.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destination_arrival_points = 33 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public int getActualIntermediateDestinationArrivalPointsCount() { + if (actualIntermediateDestinationArrivalPointsBuilder_ == null) { + return actualIntermediateDestinationArrivalPoints_.size(); + } else { + return actualIntermediateDestinationArrivalPointsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Input only. The actual time and location of the driver's arrival at
+     * an intermediate destination.
+     * This field is for provider to provide feedback on actual arrival
+     * information at intermediate destinations.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destination_arrival_points = 33 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.maps.fleetengine.v1.StopLocation + getActualIntermediateDestinationArrivalPoints(int index) { + if (actualIntermediateDestinationArrivalPointsBuilder_ == null) { + return actualIntermediateDestinationArrivalPoints_.get(index); + } else { + return actualIntermediateDestinationArrivalPointsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Input only. The actual time and location of the driver's arrival at
+     * an intermediate destination.
+     * This field is for provider to provide feedback on actual arrival
+     * information at intermediate destinations.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destination_arrival_points = 33 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setActualIntermediateDestinationArrivalPoints( + int index, com.google.maps.fleetengine.v1.StopLocation value) { + if (actualIntermediateDestinationArrivalPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActualIntermediateDestinationArrivalPointsIsMutable(); + actualIntermediateDestinationArrivalPoints_.set(index, value); + onChanged(); + } else { + actualIntermediateDestinationArrivalPointsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Input only. The actual time and location of the driver's arrival at
+     * an intermediate destination.
+     * This field is for provider to provide feedback on actual arrival
+     * information at intermediate destinations.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destination_arrival_points = 33 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setActualIntermediateDestinationArrivalPoints( + int index, com.google.maps.fleetengine.v1.StopLocation.Builder builderForValue) { + if (actualIntermediateDestinationArrivalPointsBuilder_ == null) { + ensureActualIntermediateDestinationArrivalPointsIsMutable(); + actualIntermediateDestinationArrivalPoints_.set(index, builderForValue.build()); + onChanged(); + } else { + actualIntermediateDestinationArrivalPointsBuilder_.setMessage( + index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Input only. The actual time and location of the driver's arrival at
+     * an intermediate destination.
+     * This field is for provider to provide feedback on actual arrival
+     * information at intermediate destinations.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destination_arrival_points = 33 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder addActualIntermediateDestinationArrivalPoints( + com.google.maps.fleetengine.v1.StopLocation value) { + if (actualIntermediateDestinationArrivalPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActualIntermediateDestinationArrivalPointsIsMutable(); + actualIntermediateDestinationArrivalPoints_.add(value); + onChanged(); + } else { + actualIntermediateDestinationArrivalPointsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Input only. The actual time and location of the driver's arrival at
+     * an intermediate destination.
+     * This field is for provider to provide feedback on actual arrival
+     * information at intermediate destinations.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destination_arrival_points = 33 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder addActualIntermediateDestinationArrivalPoints( + int index, com.google.maps.fleetengine.v1.StopLocation value) { + if (actualIntermediateDestinationArrivalPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActualIntermediateDestinationArrivalPointsIsMutable(); + actualIntermediateDestinationArrivalPoints_.add(index, value); + onChanged(); + } else { + actualIntermediateDestinationArrivalPointsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Input only. The actual time and location of the driver's arrival at
+     * an intermediate destination.
+     * This field is for provider to provide feedback on actual arrival
+     * information at intermediate destinations.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destination_arrival_points = 33 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder addActualIntermediateDestinationArrivalPoints( + com.google.maps.fleetengine.v1.StopLocation.Builder builderForValue) { + if (actualIntermediateDestinationArrivalPointsBuilder_ == null) { + ensureActualIntermediateDestinationArrivalPointsIsMutable(); + actualIntermediateDestinationArrivalPoints_.add(builderForValue.build()); + onChanged(); + } else { + actualIntermediateDestinationArrivalPointsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Input only. The actual time and location of the driver's arrival at
+     * an intermediate destination.
+     * This field is for provider to provide feedback on actual arrival
+     * information at intermediate destinations.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destination_arrival_points = 33 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder addActualIntermediateDestinationArrivalPoints( + int index, com.google.maps.fleetengine.v1.StopLocation.Builder builderForValue) { + if (actualIntermediateDestinationArrivalPointsBuilder_ == null) { + ensureActualIntermediateDestinationArrivalPointsIsMutable(); + actualIntermediateDestinationArrivalPoints_.add(index, builderForValue.build()); + onChanged(); + } else { + actualIntermediateDestinationArrivalPointsBuilder_.addMessage( + index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Input only. The actual time and location of the driver's arrival at
+     * an intermediate destination.
+     * This field is for provider to provide feedback on actual arrival
+     * information at intermediate destinations.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destination_arrival_points = 33 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder addAllActualIntermediateDestinationArrivalPoints( + java.lang.Iterable values) { + if (actualIntermediateDestinationArrivalPointsBuilder_ == null) { + ensureActualIntermediateDestinationArrivalPointsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, actualIntermediateDestinationArrivalPoints_); + onChanged(); + } else { + actualIntermediateDestinationArrivalPointsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Input only. The actual time and location of the driver's arrival at
+     * an intermediate destination.
+     * This field is for provider to provide feedback on actual arrival
+     * information at intermediate destinations.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destination_arrival_points = 33 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder clearActualIntermediateDestinationArrivalPoints() { + if (actualIntermediateDestinationArrivalPointsBuilder_ == null) { + actualIntermediateDestinationArrivalPoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + } else { + actualIntermediateDestinationArrivalPointsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Input only. The actual time and location of the driver's arrival at
+     * an intermediate destination.
+     * This field is for provider to provide feedback on actual arrival
+     * information at intermediate destinations.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destination_arrival_points = 33 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder removeActualIntermediateDestinationArrivalPoints(int index) { + if (actualIntermediateDestinationArrivalPointsBuilder_ == null) { + ensureActualIntermediateDestinationArrivalPointsIsMutable(); + actualIntermediateDestinationArrivalPoints_.remove(index); + onChanged(); + } else { + actualIntermediateDestinationArrivalPointsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Input only. The actual time and location of the driver's arrival at
+     * an intermediate destination.
+     * This field is for provider to provide feedback on actual arrival
+     * information at intermediate destinations.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destination_arrival_points = 33 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.maps.fleetengine.v1.StopLocation.Builder + getActualIntermediateDestinationArrivalPointsBuilder(int index) { + return getActualIntermediateDestinationArrivalPointsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Input only. The actual time and location of the driver's arrival at
+     * an intermediate destination.
+     * This field is for provider to provide feedback on actual arrival
+     * information at intermediate destinations.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destination_arrival_points = 33 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.maps.fleetengine.v1.StopLocationOrBuilder + getActualIntermediateDestinationArrivalPointsOrBuilder(int index) { + if (actualIntermediateDestinationArrivalPointsBuilder_ == null) { + return actualIntermediateDestinationArrivalPoints_.get(index); + } else { + return actualIntermediateDestinationArrivalPointsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Input only. The actual time and location of the driver's arrival at
+     * an intermediate destination.
+     * This field is for provider to provide feedback on actual arrival
+     * information at intermediate destinations.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destination_arrival_points = 33 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public java.util.List + getActualIntermediateDestinationArrivalPointsOrBuilderList() { + if (actualIntermediateDestinationArrivalPointsBuilder_ != null) { + return actualIntermediateDestinationArrivalPointsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(actualIntermediateDestinationArrivalPoints_); + } + } + /** + * + * + *
+     * Input only. The actual time and location of the driver's arrival at
+     * an intermediate destination.
+     * This field is for provider to provide feedback on actual arrival
+     * information at intermediate destinations.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destination_arrival_points = 33 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.maps.fleetengine.v1.StopLocation.Builder + addActualIntermediateDestinationArrivalPointsBuilder() { + return getActualIntermediateDestinationArrivalPointsFieldBuilder() + .addBuilder(com.google.maps.fleetengine.v1.StopLocation.getDefaultInstance()); + } + /** + * + * + *
+     * Input only. The actual time and location of the driver's arrival at
+     * an intermediate destination.
+     * This field is for provider to provide feedback on actual arrival
+     * information at intermediate destinations.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destination_arrival_points = 33 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.maps.fleetengine.v1.StopLocation.Builder + addActualIntermediateDestinationArrivalPointsBuilder(int index) { + return getActualIntermediateDestinationArrivalPointsFieldBuilder() + .addBuilder(index, com.google.maps.fleetengine.v1.StopLocation.getDefaultInstance()); + } + /** + * + * + *
+     * Input only. The actual time and location of the driver's arrival at
+     * an intermediate destination.
+     * This field is for provider to provide feedback on actual arrival
+     * information at intermediate destinations.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destination_arrival_points = 33 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public java.util.List + getActualIntermediateDestinationArrivalPointsBuilderList() { + return getActualIntermediateDestinationArrivalPointsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.StopLocation, + com.google.maps.fleetengine.v1.StopLocation.Builder, + com.google.maps.fleetengine.v1.StopLocationOrBuilder> + getActualIntermediateDestinationArrivalPointsFieldBuilder() { + if (actualIntermediateDestinationArrivalPointsBuilder_ == null) { + actualIntermediateDestinationArrivalPointsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.StopLocation, + com.google.maps.fleetengine.v1.StopLocation.Builder, + com.google.maps.fleetengine.v1.StopLocationOrBuilder>( + actualIntermediateDestinationArrivalPoints_, + ((bitField0_ & 0x00000800) != 0), + getParentForChildren(), + isClean()); + actualIntermediateDestinationArrivalPoints_ = null; + } + return actualIntermediateDestinationArrivalPointsBuilder_; + } + + private java.util.List + actualIntermediateDestinations_ = java.util.Collections.emptyList(); + + private void ensureActualIntermediateDestinationsIsMutable() { + if (!((bitField0_ & 0x00001000) != 0)) { + actualIntermediateDestinations_ = + new java.util.ArrayList( + actualIntermediateDestinations_); + bitField0_ |= 0x00001000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.StopLocation, + com.google.maps.fleetengine.v1.StopLocation.Builder, + com.google.maps.fleetengine.v1.StopLocationOrBuilder> + actualIntermediateDestinationsBuilder_; + + /** + * + * + *
+     * Input only. The actual time and location when and where the customer was
+     * picked up from an intermediate destination. This field is for provider to
+     * provide feedback on actual pickup information at intermediate destinations.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destinations = 34 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public java.util.List + getActualIntermediateDestinationsList() { + if (actualIntermediateDestinationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(actualIntermediateDestinations_); + } else { + return actualIntermediateDestinationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Input only. The actual time and location when and where the customer was
+     * picked up from an intermediate destination. This field is for provider to
+     * provide feedback on actual pickup information at intermediate destinations.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destinations = 34 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public int getActualIntermediateDestinationsCount() { + if (actualIntermediateDestinationsBuilder_ == null) { + return actualIntermediateDestinations_.size(); + } else { + return actualIntermediateDestinationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Input only. The actual time and location when and where the customer was
+     * picked up from an intermediate destination. This field is for provider to
+     * provide feedback on actual pickup information at intermediate destinations.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destinations = 34 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.maps.fleetengine.v1.StopLocation getActualIntermediateDestinations( + int index) { + if (actualIntermediateDestinationsBuilder_ == null) { + return actualIntermediateDestinations_.get(index); + } else { + return actualIntermediateDestinationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Input only. The actual time and location when and where the customer was
+     * picked up from an intermediate destination. This field is for provider to
+     * provide feedback on actual pickup information at intermediate destinations.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destinations = 34 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setActualIntermediateDestinations( + int index, com.google.maps.fleetengine.v1.StopLocation value) { + if (actualIntermediateDestinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActualIntermediateDestinationsIsMutable(); + actualIntermediateDestinations_.set(index, value); + onChanged(); + } else { + actualIntermediateDestinationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Input only. The actual time and location when and where the customer was
+     * picked up from an intermediate destination. This field is for provider to
+     * provide feedback on actual pickup information at intermediate destinations.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destinations = 34 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setActualIntermediateDestinations( + int index, com.google.maps.fleetengine.v1.StopLocation.Builder builderForValue) { + if (actualIntermediateDestinationsBuilder_ == null) { + ensureActualIntermediateDestinationsIsMutable(); + actualIntermediateDestinations_.set(index, builderForValue.build()); + onChanged(); + } else { + actualIntermediateDestinationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Input only. The actual time and location when and where the customer was
+     * picked up from an intermediate destination. This field is for provider to
+     * provide feedback on actual pickup information at intermediate destinations.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destinations = 34 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder addActualIntermediateDestinations( + com.google.maps.fleetengine.v1.StopLocation value) { + if (actualIntermediateDestinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActualIntermediateDestinationsIsMutable(); + actualIntermediateDestinations_.add(value); + onChanged(); + } else { + actualIntermediateDestinationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Input only. The actual time and location when and where the customer was
+     * picked up from an intermediate destination. This field is for provider to
+     * provide feedback on actual pickup information at intermediate destinations.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destinations = 34 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder addActualIntermediateDestinations( + int index, com.google.maps.fleetengine.v1.StopLocation value) { + if (actualIntermediateDestinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActualIntermediateDestinationsIsMutable(); + actualIntermediateDestinations_.add(index, value); + onChanged(); + } else { + actualIntermediateDestinationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Input only. The actual time and location when and where the customer was
+     * picked up from an intermediate destination. This field is for provider to
+     * provide feedback on actual pickup information at intermediate destinations.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destinations = 34 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder addActualIntermediateDestinations( + com.google.maps.fleetengine.v1.StopLocation.Builder builderForValue) { + if (actualIntermediateDestinationsBuilder_ == null) { + ensureActualIntermediateDestinationsIsMutable(); + actualIntermediateDestinations_.add(builderForValue.build()); + onChanged(); + } else { + actualIntermediateDestinationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Input only. The actual time and location when and where the customer was
+     * picked up from an intermediate destination. This field is for provider to
+     * provide feedback on actual pickup information at intermediate destinations.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destinations = 34 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder addActualIntermediateDestinations( + int index, com.google.maps.fleetengine.v1.StopLocation.Builder builderForValue) { + if (actualIntermediateDestinationsBuilder_ == null) { + ensureActualIntermediateDestinationsIsMutable(); + actualIntermediateDestinations_.add(index, builderForValue.build()); + onChanged(); + } else { + actualIntermediateDestinationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Input only. The actual time and location when and where the customer was
+     * picked up from an intermediate destination. This field is for provider to
+     * provide feedback on actual pickup information at intermediate destinations.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destinations = 34 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder addAllActualIntermediateDestinations( + java.lang.Iterable values) { + if (actualIntermediateDestinationsBuilder_ == null) { + ensureActualIntermediateDestinationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, actualIntermediateDestinations_); + onChanged(); + } else { + actualIntermediateDestinationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Input only. The actual time and location when and where the customer was
+     * picked up from an intermediate destination. This field is for provider to
+     * provide feedback on actual pickup information at intermediate destinations.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destinations = 34 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder clearActualIntermediateDestinations() { + if (actualIntermediateDestinationsBuilder_ == null) { + actualIntermediateDestinations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + } else { + actualIntermediateDestinationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Input only. The actual time and location when and where the customer was
+     * picked up from an intermediate destination. This field is for provider to
+     * provide feedback on actual pickup information at intermediate destinations.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destinations = 34 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder removeActualIntermediateDestinations(int index) { + if (actualIntermediateDestinationsBuilder_ == null) { + ensureActualIntermediateDestinationsIsMutable(); + actualIntermediateDestinations_.remove(index); + onChanged(); + } else { + actualIntermediateDestinationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Input only. The actual time and location when and where the customer was
+     * picked up from an intermediate destination. This field is for provider to
+     * provide feedback on actual pickup information at intermediate destinations.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destinations = 34 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.maps.fleetengine.v1.StopLocation.Builder + getActualIntermediateDestinationsBuilder(int index) { + return getActualIntermediateDestinationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Input only. The actual time and location when and where the customer was
+     * picked up from an intermediate destination. This field is for provider to
+     * provide feedback on actual pickup information at intermediate destinations.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destinations = 34 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.maps.fleetengine.v1.StopLocationOrBuilder + getActualIntermediateDestinationsOrBuilder(int index) { + if (actualIntermediateDestinationsBuilder_ == null) { + return actualIntermediateDestinations_.get(index); + } else { + return actualIntermediateDestinationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Input only. The actual time and location when and where the customer was
+     * picked up from an intermediate destination. This field is for provider to
+     * provide feedback on actual pickup information at intermediate destinations.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destinations = 34 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public java.util.List + getActualIntermediateDestinationsOrBuilderList() { + if (actualIntermediateDestinationsBuilder_ != null) { + return actualIntermediateDestinationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(actualIntermediateDestinations_); + } + } + /** + * + * + *
+     * Input only. The actual time and location when and where the customer was
+     * picked up from an intermediate destination. This field is for provider to
+     * provide feedback on actual pickup information at intermediate destinations.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destinations = 34 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.maps.fleetengine.v1.StopLocation.Builder + addActualIntermediateDestinationsBuilder() { + return getActualIntermediateDestinationsFieldBuilder() + .addBuilder(com.google.maps.fleetengine.v1.StopLocation.getDefaultInstance()); + } + /** + * + * + *
+     * Input only. The actual time and location when and where the customer was
+     * picked up from an intermediate destination. This field is for provider to
+     * provide feedback on actual pickup information at intermediate destinations.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destinations = 34 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.maps.fleetengine.v1.StopLocation.Builder + addActualIntermediateDestinationsBuilder(int index) { + return getActualIntermediateDestinationsFieldBuilder() + .addBuilder(index, com.google.maps.fleetengine.v1.StopLocation.getDefaultInstance()); + } + /** + * + * + *
+     * Input only. The actual time and location when and where the customer was
+     * picked up from an intermediate destination. This field is for provider to
+     * provide feedback on actual pickup information at intermediate destinations.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destinations = 34 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public java.util.List + getActualIntermediateDestinationsBuilderList() { + return getActualIntermediateDestinationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.StopLocation, + com.google.maps.fleetengine.v1.StopLocation.Builder, + com.google.maps.fleetengine.v1.StopLocationOrBuilder> + getActualIntermediateDestinationsFieldBuilder() { + if (actualIntermediateDestinationsBuilder_ == null) { + actualIntermediateDestinationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.StopLocation, + com.google.maps.fleetengine.v1.StopLocation.Builder, + com.google.maps.fleetengine.v1.StopLocationOrBuilder>( + actualIntermediateDestinations_, + ((bitField0_ & 0x00001000) != 0), + getParentForChildren(), + isClean()); + actualIntermediateDestinations_ = null; + } + return actualIntermediateDestinationsBuilder_; + } + + private com.google.maps.fleetengine.v1.TerminalLocation dropoffPoint_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.TerminalLocation, + com.google.maps.fleetengine.v1.TerminalLocation.Builder, + com.google.maps.fleetengine.v1.TerminalLocationOrBuilder> + dropoffPointBuilder_; + /** + * + * + *
+     * Location where customer indicates they will be dropped off.
+     * 
+ * + * .maps.fleetengine.v1.TerminalLocation dropoff_point = 7; + * + * @return Whether the dropoffPoint field is set. + */ + public boolean hasDropoffPoint() { + return ((bitField0_ & 0x00002000) != 0); + } + /** + * + * + *
+     * Location where customer indicates they will be dropped off.
+     * 
+ * + * .maps.fleetengine.v1.TerminalLocation dropoff_point = 7; + * + * @return The dropoffPoint. + */ + public com.google.maps.fleetengine.v1.TerminalLocation getDropoffPoint() { + if (dropoffPointBuilder_ == null) { + return dropoffPoint_ == null + ? com.google.maps.fleetengine.v1.TerminalLocation.getDefaultInstance() + : dropoffPoint_; + } else { + return dropoffPointBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Location where customer indicates they will be dropped off.
+     * 
+ * + * .maps.fleetengine.v1.TerminalLocation dropoff_point = 7; + */ + public Builder setDropoffPoint(com.google.maps.fleetengine.v1.TerminalLocation value) { + if (dropoffPointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dropoffPoint_ = value; + } else { + dropoffPointBuilder_.setMessage(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Location where customer indicates they will be dropped off.
+     * 
+ * + * .maps.fleetengine.v1.TerminalLocation dropoff_point = 7; + */ + public Builder setDropoffPoint( + com.google.maps.fleetengine.v1.TerminalLocation.Builder builderForValue) { + if (dropoffPointBuilder_ == null) { + dropoffPoint_ = builderForValue.build(); + } else { + dropoffPointBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Location where customer indicates they will be dropped off.
+     * 
+ * + * .maps.fleetengine.v1.TerminalLocation dropoff_point = 7; + */ + public Builder mergeDropoffPoint(com.google.maps.fleetengine.v1.TerminalLocation value) { + if (dropoffPointBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0) + && dropoffPoint_ != null + && dropoffPoint_ + != com.google.maps.fleetengine.v1.TerminalLocation.getDefaultInstance()) { + getDropoffPointBuilder().mergeFrom(value); + } else { + dropoffPoint_ = value; + } + } else { + dropoffPointBuilder_.mergeFrom(value); + } + if (dropoffPoint_ != null) { + bitField0_ |= 0x00002000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Location where customer indicates they will be dropped off.
+     * 
+ * + * .maps.fleetengine.v1.TerminalLocation dropoff_point = 7; + */ + public Builder clearDropoffPoint() { + bitField0_ = (bitField0_ & ~0x00002000); + dropoffPoint_ = null; + if (dropoffPointBuilder_ != null) { + dropoffPointBuilder_.dispose(); + dropoffPointBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Location where customer indicates they will be dropped off.
+     * 
+ * + * .maps.fleetengine.v1.TerminalLocation dropoff_point = 7; + */ + public com.google.maps.fleetengine.v1.TerminalLocation.Builder getDropoffPointBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return getDropoffPointFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Location where customer indicates they will be dropped off.
+     * 
+ * + * .maps.fleetengine.v1.TerminalLocation dropoff_point = 7; + */ + public com.google.maps.fleetengine.v1.TerminalLocationOrBuilder getDropoffPointOrBuilder() { + if (dropoffPointBuilder_ != null) { + return dropoffPointBuilder_.getMessageOrBuilder(); + } else { + return dropoffPoint_ == null + ? com.google.maps.fleetengine.v1.TerminalLocation.getDefaultInstance() + : dropoffPoint_; + } + } + /** + * + * + *
+     * Location where customer indicates they will be dropped off.
+     * 
+ * + * .maps.fleetengine.v1.TerminalLocation dropoff_point = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.TerminalLocation, + com.google.maps.fleetengine.v1.TerminalLocation.Builder, + com.google.maps.fleetengine.v1.TerminalLocationOrBuilder> + getDropoffPointFieldBuilder() { + if (dropoffPointBuilder_ == null) { + dropoffPointBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.TerminalLocation, + com.google.maps.fleetengine.v1.TerminalLocation.Builder, + com.google.maps.fleetengine.v1.TerminalLocationOrBuilder>( + getDropoffPoint(), getParentForChildren(), isClean()); + dropoffPoint_ = null; + } + return dropoffPointBuilder_; + } + + private com.google.maps.fleetengine.v1.StopLocation actualDropoffPoint_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.StopLocation, + com.google.maps.fleetengine.v1.StopLocation.Builder, + com.google.maps.fleetengine.v1.StopLocationOrBuilder> + actualDropoffPointBuilder_; + /** + * + * + *
+     * Input only. The actual time and location when and where customer was
+     * dropped off. This field is for provider to provide feedback on actual
+     * dropoff information.
+     * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_dropoff_point = 23 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the actualDropoffPoint field is set. + */ + public boolean hasActualDropoffPoint() { + return ((bitField0_ & 0x00004000) != 0); + } + /** + * + * + *
+     * Input only. The actual time and location when and where customer was
+     * dropped off. This field is for provider to provide feedback on actual
+     * dropoff information.
+     * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_dropoff_point = 23 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The actualDropoffPoint. + */ + public com.google.maps.fleetengine.v1.StopLocation getActualDropoffPoint() { + if (actualDropoffPointBuilder_ == null) { + return actualDropoffPoint_ == null + ? com.google.maps.fleetengine.v1.StopLocation.getDefaultInstance() + : actualDropoffPoint_; + } else { + return actualDropoffPointBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Input only. The actual time and location when and where customer was
+     * dropped off. This field is for provider to provide feedback on actual
+     * dropoff information.
+     * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_dropoff_point = 23 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setActualDropoffPoint(com.google.maps.fleetengine.v1.StopLocation value) { + if (actualDropoffPointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + actualDropoffPoint_ = value; + } else { + actualDropoffPointBuilder_.setMessage(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. The actual time and location when and where customer was
+     * dropped off. This field is for provider to provide feedback on actual
+     * dropoff information.
+     * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_dropoff_point = 23 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setActualDropoffPoint( + com.google.maps.fleetengine.v1.StopLocation.Builder builderForValue) { + if (actualDropoffPointBuilder_ == null) { + actualDropoffPoint_ = builderForValue.build(); + } else { + actualDropoffPointBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. The actual time and location when and where customer was
+     * dropped off. This field is for provider to provide feedback on actual
+     * dropoff information.
+     * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_dropoff_point = 23 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder mergeActualDropoffPoint(com.google.maps.fleetengine.v1.StopLocation value) { + if (actualDropoffPointBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0) + && actualDropoffPoint_ != null + && actualDropoffPoint_ + != com.google.maps.fleetengine.v1.StopLocation.getDefaultInstance()) { + getActualDropoffPointBuilder().mergeFrom(value); + } else { + actualDropoffPoint_ = value; + } + } else { + actualDropoffPointBuilder_.mergeFrom(value); + } + if (actualDropoffPoint_ != null) { + bitField0_ |= 0x00004000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Input only. The actual time and location when and where customer was
+     * dropped off. This field is for provider to provide feedback on actual
+     * dropoff information.
+     * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_dropoff_point = 23 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder clearActualDropoffPoint() { + bitField0_ = (bitField0_ & ~0x00004000); + actualDropoffPoint_ = null; + if (actualDropoffPointBuilder_ != null) { + actualDropoffPointBuilder_.dispose(); + actualDropoffPointBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. The actual time and location when and where customer was
+     * dropped off. This field is for provider to provide feedback on actual
+     * dropoff information.
+     * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_dropoff_point = 23 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.maps.fleetengine.v1.StopLocation.Builder getActualDropoffPointBuilder() { + bitField0_ |= 0x00004000; + onChanged(); + return getActualDropoffPointFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Input only. The actual time and location when and where customer was
+     * dropped off. This field is for provider to provide feedback on actual
+     * dropoff information.
+     * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_dropoff_point = 23 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.maps.fleetengine.v1.StopLocationOrBuilder getActualDropoffPointOrBuilder() { + if (actualDropoffPointBuilder_ != null) { + return actualDropoffPointBuilder_.getMessageOrBuilder(); + } else { + return actualDropoffPoint_ == null + ? com.google.maps.fleetengine.v1.StopLocation.getDefaultInstance() + : actualDropoffPoint_; + } + } + /** + * + * + *
+     * Input only. The actual time and location when and where customer was
+     * dropped off. This field is for provider to provide feedback on actual
+     * dropoff information.
+     * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_dropoff_point = 23 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.StopLocation, + com.google.maps.fleetengine.v1.StopLocation.Builder, + com.google.maps.fleetengine.v1.StopLocationOrBuilder> + getActualDropoffPointFieldBuilder() { + if (actualDropoffPointBuilder_ == null) { + actualDropoffPointBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.StopLocation, + com.google.maps.fleetengine.v1.StopLocation.Builder, + com.google.maps.fleetengine.v1.StopLocationOrBuilder>( + getActualDropoffPoint(), getParentForChildren(), isClean()); + actualDropoffPoint_ = null; + } + return actualDropoffPointBuilder_; + } + + private com.google.protobuf.Timestamp dropoffTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + dropoffTimeBuilder_; + /** + * + * + *
+     * Output only. Either the estimated future time when the rider(s) will be
+     * dropped off at the final destination, or the actual time when they were
+     * dropped off.
+     * 
+ * + * + * .google.protobuf.Timestamp dropoff_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the dropoffTime field is set. + */ + public boolean hasDropoffTime() { + return ((bitField0_ & 0x00008000) != 0); + } + /** + * + * + *
+     * Output only. Either the estimated future time when the rider(s) will be
+     * dropped off at the final destination, or the actual time when they were
+     * dropped off.
+     * 
+ * + * + * .google.protobuf.Timestamp dropoff_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The dropoffTime. + */ + public com.google.protobuf.Timestamp getDropoffTime() { + if (dropoffTimeBuilder_ == null) { + return dropoffTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : dropoffTime_; + } else { + return dropoffTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Either the estimated future time when the rider(s) will be
+     * dropped off at the final destination, or the actual time when they were
+     * dropped off.
+     * 
+ * + * + * .google.protobuf.Timestamp dropoff_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDropoffTime(com.google.protobuf.Timestamp value) { + if (dropoffTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dropoffTime_ = value; + } else { + dropoffTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Either the estimated future time when the rider(s) will be
+     * dropped off at the final destination, or the actual time when they were
+     * dropped off.
+     * 
+ * + * + * .google.protobuf.Timestamp dropoff_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDropoffTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (dropoffTimeBuilder_ == null) { + dropoffTime_ = builderForValue.build(); + } else { + dropoffTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Either the estimated future time when the rider(s) will be
+     * dropped off at the final destination, or the actual time when they were
+     * dropped off.
+     * 
+ * + * + * .google.protobuf.Timestamp dropoff_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDropoffTime(com.google.protobuf.Timestamp value) { + if (dropoffTimeBuilder_ == null) { + if (((bitField0_ & 0x00008000) != 0) + && dropoffTime_ != null + && dropoffTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getDropoffTimeBuilder().mergeFrom(value); + } else { + dropoffTime_ = value; + } + } else { + dropoffTimeBuilder_.mergeFrom(value); + } + if (dropoffTime_ != null) { + bitField0_ |= 0x00008000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Either the estimated future time when the rider(s) will be
+     * dropped off at the final destination, or the actual time when they were
+     * dropped off.
+     * 
+ * + * + * .google.protobuf.Timestamp dropoff_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDropoffTime() { + bitField0_ = (bitField0_ & ~0x00008000); + dropoffTime_ = null; + if (dropoffTimeBuilder_ != null) { + dropoffTimeBuilder_.dispose(); + dropoffTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Either the estimated future time when the rider(s) will be
+     * dropped off at the final destination, or the actual time when they were
+     * dropped off.
+     * 
+ * + * + * .google.protobuf.Timestamp dropoff_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getDropoffTimeBuilder() { + bitField0_ |= 0x00008000; + onChanged(); + return getDropoffTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Either the estimated future time when the rider(s) will be
+     * dropped off at the final destination, or the actual time when they were
+     * dropped off.
+     * 
+ * + * + * .google.protobuf.Timestamp dropoff_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getDropoffTimeOrBuilder() { + if (dropoffTimeBuilder_ != null) { + return dropoffTimeBuilder_.getMessageOrBuilder(); + } else { + return dropoffTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : dropoffTime_; + } + } + /** + * + * + *
+     * Output only. Either the estimated future time when the rider(s) will be
+     * dropped off at the final destination, or the actual time when they were
+     * dropped off.
+     * 
+ * + * + * .google.protobuf.Timestamp dropoff_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getDropoffTimeFieldBuilder() { + if (dropoffTimeBuilder_ == null) { + dropoffTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getDropoffTime(), getParentForChildren(), isClean()); + dropoffTime_ = null; + } + return dropoffTimeBuilder_; + } + + private java.util.List remainingWaypoints_ = + java.util.Collections.emptyList(); + + private void ensureRemainingWaypointsIsMutable() { + if (!((bitField0_ & 0x00010000) != 0)) { + remainingWaypoints_ = + new java.util.ArrayList( + remainingWaypoints_); + bitField0_ |= 0x00010000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.TripWaypoint, + com.google.maps.fleetengine.v1.TripWaypoint.Builder, + com.google.maps.fleetengine.v1.TripWaypointOrBuilder> + remainingWaypointsBuilder_; + + /** + * + * + *
+     * Output only. The full path from the current location to the dropoff point,
+     * inclusive. This path could include waypoints from other trips.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.TripWaypoint remaining_waypoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getRemainingWaypointsList() { + if (remainingWaypointsBuilder_ == null) { + return java.util.Collections.unmodifiableList(remainingWaypoints_); + } else { + return remainingWaypointsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. The full path from the current location to the dropoff point,
+     * inclusive. This path could include waypoints from other trips.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.TripWaypoint remaining_waypoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getRemainingWaypointsCount() { + if (remainingWaypointsBuilder_ == null) { + return remainingWaypoints_.size(); + } else { + return remainingWaypointsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. The full path from the current location to the dropoff point,
+     * inclusive. This path could include waypoints from other trips.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.TripWaypoint remaining_waypoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.maps.fleetengine.v1.TripWaypoint getRemainingWaypoints(int index) { + if (remainingWaypointsBuilder_ == null) { + return remainingWaypoints_.get(index); + } else { + return remainingWaypointsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. The full path from the current location to the dropoff point,
+     * inclusive. This path could include waypoints from other trips.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.TripWaypoint remaining_waypoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRemainingWaypoints( + int index, com.google.maps.fleetengine.v1.TripWaypoint value) { + if (remainingWaypointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRemainingWaypointsIsMutable(); + remainingWaypoints_.set(index, value); + onChanged(); + } else { + remainingWaypointsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. The full path from the current location to the dropoff point,
+     * inclusive. This path could include waypoints from other trips.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.TripWaypoint remaining_waypoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRemainingWaypoints( + int index, com.google.maps.fleetengine.v1.TripWaypoint.Builder builderForValue) { + if (remainingWaypointsBuilder_ == null) { + ensureRemainingWaypointsIsMutable(); + remainingWaypoints_.set(index, builderForValue.build()); + onChanged(); + } else { + remainingWaypointsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The full path from the current location to the dropoff point,
+     * inclusive. This path could include waypoints from other trips.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.TripWaypoint remaining_waypoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addRemainingWaypoints(com.google.maps.fleetengine.v1.TripWaypoint value) { + if (remainingWaypointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRemainingWaypointsIsMutable(); + remainingWaypoints_.add(value); + onChanged(); + } else { + remainingWaypointsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. The full path from the current location to the dropoff point,
+     * inclusive. This path could include waypoints from other trips.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.TripWaypoint remaining_waypoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addRemainingWaypoints( + int index, com.google.maps.fleetengine.v1.TripWaypoint value) { + if (remainingWaypointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRemainingWaypointsIsMutable(); + remainingWaypoints_.add(index, value); + onChanged(); + } else { + remainingWaypointsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. The full path from the current location to the dropoff point,
+     * inclusive. This path could include waypoints from other trips.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.TripWaypoint remaining_waypoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addRemainingWaypoints( + com.google.maps.fleetengine.v1.TripWaypoint.Builder builderForValue) { + if (remainingWaypointsBuilder_ == null) { + ensureRemainingWaypointsIsMutable(); + remainingWaypoints_.add(builderForValue.build()); + onChanged(); + } else { + remainingWaypointsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The full path from the current location to the dropoff point,
+     * inclusive. This path could include waypoints from other trips.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.TripWaypoint remaining_waypoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addRemainingWaypoints( + int index, com.google.maps.fleetengine.v1.TripWaypoint.Builder builderForValue) { + if (remainingWaypointsBuilder_ == null) { + ensureRemainingWaypointsIsMutable(); + remainingWaypoints_.add(index, builderForValue.build()); + onChanged(); + } else { + remainingWaypointsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The full path from the current location to the dropoff point,
+     * inclusive. This path could include waypoints from other trips.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.TripWaypoint remaining_waypoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllRemainingWaypoints( + java.lang.Iterable values) { + if (remainingWaypointsBuilder_ == null) { + ensureRemainingWaypointsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, remainingWaypoints_); + onChanged(); + } else { + remainingWaypointsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. The full path from the current location to the dropoff point,
+     * inclusive. This path could include waypoints from other trips.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.TripWaypoint remaining_waypoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearRemainingWaypoints() { + if (remainingWaypointsBuilder_ == null) { + remainingWaypoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00010000); + onChanged(); + } else { + remainingWaypointsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. The full path from the current location to the dropoff point,
+     * inclusive. This path could include waypoints from other trips.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.TripWaypoint remaining_waypoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeRemainingWaypoints(int index) { + if (remainingWaypointsBuilder_ == null) { + ensureRemainingWaypointsIsMutable(); + remainingWaypoints_.remove(index); + onChanged(); + } else { + remainingWaypointsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. The full path from the current location to the dropoff point,
+     * inclusive. This path could include waypoints from other trips.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.TripWaypoint remaining_waypoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.maps.fleetengine.v1.TripWaypoint.Builder getRemainingWaypointsBuilder( + int index) { + return getRemainingWaypointsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. The full path from the current location to the dropoff point,
+     * inclusive. This path could include waypoints from other trips.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.TripWaypoint remaining_waypoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.maps.fleetengine.v1.TripWaypointOrBuilder getRemainingWaypointsOrBuilder( + int index) { + if (remainingWaypointsBuilder_ == null) { + return remainingWaypoints_.get(index); + } else { + return remainingWaypointsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. The full path from the current location to the dropoff point,
+     * inclusive. This path could include waypoints from other trips.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.TripWaypoint remaining_waypoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getRemainingWaypointsOrBuilderList() { + if (remainingWaypointsBuilder_ != null) { + return remainingWaypointsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(remainingWaypoints_); + } + } + /** + * + * + *
+     * Output only. The full path from the current location to the dropoff point,
+     * inclusive. This path could include waypoints from other trips.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.TripWaypoint remaining_waypoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.maps.fleetengine.v1.TripWaypoint.Builder addRemainingWaypointsBuilder() { + return getRemainingWaypointsFieldBuilder() + .addBuilder(com.google.maps.fleetengine.v1.TripWaypoint.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. The full path from the current location to the dropoff point,
+     * inclusive. This path could include waypoints from other trips.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.TripWaypoint remaining_waypoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.maps.fleetengine.v1.TripWaypoint.Builder addRemainingWaypointsBuilder( + int index) { + return getRemainingWaypointsFieldBuilder() + .addBuilder(index, com.google.maps.fleetengine.v1.TripWaypoint.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. The full path from the current location to the dropoff point,
+     * inclusive. This path could include waypoints from other trips.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.TripWaypoint remaining_waypoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getRemainingWaypointsBuilderList() { + return getRemainingWaypointsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.TripWaypoint, + com.google.maps.fleetengine.v1.TripWaypoint.Builder, + com.google.maps.fleetengine.v1.TripWaypointOrBuilder> + getRemainingWaypointsFieldBuilder() { + if (remainingWaypointsBuilder_ == null) { + remainingWaypointsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.TripWaypoint, + com.google.maps.fleetengine.v1.TripWaypoint.Builder, + com.google.maps.fleetengine.v1.TripWaypointOrBuilder>( + remainingWaypoints_, + ((bitField0_ & 0x00010000) != 0), + getParentForChildren(), + isClean()); + remainingWaypoints_ = null; + } + return remainingWaypointsBuilder_; + } + + private java.util.List vehicleWaypoints_ = + java.util.Collections.emptyList(); + + private void ensureVehicleWaypointsIsMutable() { + if (!((bitField0_ & 0x00020000) != 0)) { + vehicleWaypoints_ = + new java.util.ArrayList(vehicleWaypoints_); + bitField0_ |= 0x00020000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.TripWaypoint, + com.google.maps.fleetengine.v1.TripWaypoint.Builder, + com.google.maps.fleetengine.v1.TripWaypointOrBuilder> + vehicleWaypointsBuilder_; + + /** + * + * + *
+     * This field supports manual ordering of the waypoints for the trip. It
+     * contains all of the remaining waypoints for the assigned vehicle, as well
+     * as the pickup and drop-off waypoints for this trip. If the trip hasn't been
+     * assigned to a vehicle, then Fleet Engine ignores this field. For privacy
+     * reasons, this field is only populated by the server on `UpdateTrip` and
+     * `CreateTrip` calls, NOT on `GetTrip` calls.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint vehicle_waypoints = 20; + */ + public java.util.List getVehicleWaypointsList() { + if (vehicleWaypointsBuilder_ == null) { + return java.util.Collections.unmodifiableList(vehicleWaypoints_); + } else { + return vehicleWaypointsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * This field supports manual ordering of the waypoints for the trip. It
+     * contains all of the remaining waypoints for the assigned vehicle, as well
+     * as the pickup and drop-off waypoints for this trip. If the trip hasn't been
+     * assigned to a vehicle, then Fleet Engine ignores this field. For privacy
+     * reasons, this field is only populated by the server on `UpdateTrip` and
+     * `CreateTrip` calls, NOT on `GetTrip` calls.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint vehicle_waypoints = 20; + */ + public int getVehicleWaypointsCount() { + if (vehicleWaypointsBuilder_ == null) { + return vehicleWaypoints_.size(); + } else { + return vehicleWaypointsBuilder_.getCount(); + } + } + /** + * + * + *
+     * This field supports manual ordering of the waypoints for the trip. It
+     * contains all of the remaining waypoints for the assigned vehicle, as well
+     * as the pickup and drop-off waypoints for this trip. If the trip hasn't been
+     * assigned to a vehicle, then Fleet Engine ignores this field. For privacy
+     * reasons, this field is only populated by the server on `UpdateTrip` and
+     * `CreateTrip` calls, NOT on `GetTrip` calls.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint vehicle_waypoints = 20; + */ + public com.google.maps.fleetengine.v1.TripWaypoint getVehicleWaypoints(int index) { + if (vehicleWaypointsBuilder_ == null) { + return vehicleWaypoints_.get(index); + } else { + return vehicleWaypointsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * This field supports manual ordering of the waypoints for the trip. It
+     * contains all of the remaining waypoints for the assigned vehicle, as well
+     * as the pickup and drop-off waypoints for this trip. If the trip hasn't been
+     * assigned to a vehicle, then Fleet Engine ignores this field. For privacy
+     * reasons, this field is only populated by the server on `UpdateTrip` and
+     * `CreateTrip` calls, NOT on `GetTrip` calls.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint vehicle_waypoints = 20; + */ + public Builder setVehicleWaypoints( + int index, com.google.maps.fleetengine.v1.TripWaypoint value) { + if (vehicleWaypointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVehicleWaypointsIsMutable(); + vehicleWaypoints_.set(index, value); + onChanged(); + } else { + vehicleWaypointsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * This field supports manual ordering of the waypoints for the trip. It
+     * contains all of the remaining waypoints for the assigned vehicle, as well
+     * as the pickup and drop-off waypoints for this trip. If the trip hasn't been
+     * assigned to a vehicle, then Fleet Engine ignores this field. For privacy
+     * reasons, this field is only populated by the server on `UpdateTrip` and
+     * `CreateTrip` calls, NOT on `GetTrip` calls.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint vehicle_waypoints = 20; + */ + public Builder setVehicleWaypoints( + int index, com.google.maps.fleetengine.v1.TripWaypoint.Builder builderForValue) { + if (vehicleWaypointsBuilder_ == null) { + ensureVehicleWaypointsIsMutable(); + vehicleWaypoints_.set(index, builderForValue.build()); + onChanged(); + } else { + vehicleWaypointsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * This field supports manual ordering of the waypoints for the trip. It
+     * contains all of the remaining waypoints for the assigned vehicle, as well
+     * as the pickup and drop-off waypoints for this trip. If the trip hasn't been
+     * assigned to a vehicle, then Fleet Engine ignores this field. For privacy
+     * reasons, this field is only populated by the server on `UpdateTrip` and
+     * `CreateTrip` calls, NOT on `GetTrip` calls.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint vehicle_waypoints = 20; + */ + public Builder addVehicleWaypoints(com.google.maps.fleetengine.v1.TripWaypoint value) { + if (vehicleWaypointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVehicleWaypointsIsMutable(); + vehicleWaypoints_.add(value); + onChanged(); + } else { + vehicleWaypointsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * This field supports manual ordering of the waypoints for the trip. It
+     * contains all of the remaining waypoints for the assigned vehicle, as well
+     * as the pickup and drop-off waypoints for this trip. If the trip hasn't been
+     * assigned to a vehicle, then Fleet Engine ignores this field. For privacy
+     * reasons, this field is only populated by the server on `UpdateTrip` and
+     * `CreateTrip` calls, NOT on `GetTrip` calls.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint vehicle_waypoints = 20; + */ + public Builder addVehicleWaypoints( + int index, com.google.maps.fleetengine.v1.TripWaypoint value) { + if (vehicleWaypointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVehicleWaypointsIsMutable(); + vehicleWaypoints_.add(index, value); + onChanged(); + } else { + vehicleWaypointsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * This field supports manual ordering of the waypoints for the trip. It
+     * contains all of the remaining waypoints for the assigned vehicle, as well
+     * as the pickup and drop-off waypoints for this trip. If the trip hasn't been
+     * assigned to a vehicle, then Fleet Engine ignores this field. For privacy
+     * reasons, this field is only populated by the server on `UpdateTrip` and
+     * `CreateTrip` calls, NOT on `GetTrip` calls.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint vehicle_waypoints = 20; + */ + public Builder addVehicleWaypoints( + com.google.maps.fleetengine.v1.TripWaypoint.Builder builderForValue) { + if (vehicleWaypointsBuilder_ == null) { + ensureVehicleWaypointsIsMutable(); + vehicleWaypoints_.add(builderForValue.build()); + onChanged(); + } else { + vehicleWaypointsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * This field supports manual ordering of the waypoints for the trip. It
+     * contains all of the remaining waypoints for the assigned vehicle, as well
+     * as the pickup and drop-off waypoints for this trip. If the trip hasn't been
+     * assigned to a vehicle, then Fleet Engine ignores this field. For privacy
+     * reasons, this field is only populated by the server on `UpdateTrip` and
+     * `CreateTrip` calls, NOT on `GetTrip` calls.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint vehicle_waypoints = 20; + */ + public Builder addVehicleWaypoints( + int index, com.google.maps.fleetengine.v1.TripWaypoint.Builder builderForValue) { + if (vehicleWaypointsBuilder_ == null) { + ensureVehicleWaypointsIsMutable(); + vehicleWaypoints_.add(index, builderForValue.build()); + onChanged(); + } else { + vehicleWaypointsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * This field supports manual ordering of the waypoints for the trip. It
+     * contains all of the remaining waypoints for the assigned vehicle, as well
+     * as the pickup and drop-off waypoints for this trip. If the trip hasn't been
+     * assigned to a vehicle, then Fleet Engine ignores this field. For privacy
+     * reasons, this field is only populated by the server on `UpdateTrip` and
+     * `CreateTrip` calls, NOT on `GetTrip` calls.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint vehicle_waypoints = 20; + */ + public Builder addAllVehicleWaypoints( + java.lang.Iterable values) { + if (vehicleWaypointsBuilder_ == null) { + ensureVehicleWaypointsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, vehicleWaypoints_); + onChanged(); + } else { + vehicleWaypointsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * This field supports manual ordering of the waypoints for the trip. It
+     * contains all of the remaining waypoints for the assigned vehicle, as well
+     * as the pickup and drop-off waypoints for this trip. If the trip hasn't been
+     * assigned to a vehicle, then Fleet Engine ignores this field. For privacy
+     * reasons, this field is only populated by the server on `UpdateTrip` and
+     * `CreateTrip` calls, NOT on `GetTrip` calls.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint vehicle_waypoints = 20; + */ + public Builder clearVehicleWaypoints() { + if (vehicleWaypointsBuilder_ == null) { + vehicleWaypoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00020000); + onChanged(); + } else { + vehicleWaypointsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * This field supports manual ordering of the waypoints for the trip. It
+     * contains all of the remaining waypoints for the assigned vehicle, as well
+     * as the pickup and drop-off waypoints for this trip. If the trip hasn't been
+     * assigned to a vehicle, then Fleet Engine ignores this field. For privacy
+     * reasons, this field is only populated by the server on `UpdateTrip` and
+     * `CreateTrip` calls, NOT on `GetTrip` calls.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint vehicle_waypoints = 20; + */ + public Builder removeVehicleWaypoints(int index) { + if (vehicleWaypointsBuilder_ == null) { + ensureVehicleWaypointsIsMutable(); + vehicleWaypoints_.remove(index); + onChanged(); + } else { + vehicleWaypointsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * This field supports manual ordering of the waypoints for the trip. It
+     * contains all of the remaining waypoints for the assigned vehicle, as well
+     * as the pickup and drop-off waypoints for this trip. If the trip hasn't been
+     * assigned to a vehicle, then Fleet Engine ignores this field. For privacy
+     * reasons, this field is only populated by the server on `UpdateTrip` and
+     * `CreateTrip` calls, NOT on `GetTrip` calls.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint vehicle_waypoints = 20; + */ + public com.google.maps.fleetengine.v1.TripWaypoint.Builder getVehicleWaypointsBuilder( + int index) { + return getVehicleWaypointsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * This field supports manual ordering of the waypoints for the trip. It
+     * contains all of the remaining waypoints for the assigned vehicle, as well
+     * as the pickup and drop-off waypoints for this trip. If the trip hasn't been
+     * assigned to a vehicle, then Fleet Engine ignores this field. For privacy
+     * reasons, this field is only populated by the server on `UpdateTrip` and
+     * `CreateTrip` calls, NOT on `GetTrip` calls.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint vehicle_waypoints = 20; + */ + public com.google.maps.fleetengine.v1.TripWaypointOrBuilder getVehicleWaypointsOrBuilder( + int index) { + if (vehicleWaypointsBuilder_ == null) { + return vehicleWaypoints_.get(index); + } else { + return vehicleWaypointsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * This field supports manual ordering of the waypoints for the trip. It
+     * contains all of the remaining waypoints for the assigned vehicle, as well
+     * as the pickup and drop-off waypoints for this trip. If the trip hasn't been
+     * assigned to a vehicle, then Fleet Engine ignores this field. For privacy
+     * reasons, this field is only populated by the server on `UpdateTrip` and
+     * `CreateTrip` calls, NOT on `GetTrip` calls.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint vehicle_waypoints = 20; + */ + public java.util.List + getVehicleWaypointsOrBuilderList() { + if (vehicleWaypointsBuilder_ != null) { + return vehicleWaypointsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(vehicleWaypoints_); + } + } + /** + * + * + *
+     * This field supports manual ordering of the waypoints for the trip. It
+     * contains all of the remaining waypoints for the assigned vehicle, as well
+     * as the pickup and drop-off waypoints for this trip. If the trip hasn't been
+     * assigned to a vehicle, then Fleet Engine ignores this field. For privacy
+     * reasons, this field is only populated by the server on `UpdateTrip` and
+     * `CreateTrip` calls, NOT on `GetTrip` calls.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint vehicle_waypoints = 20; + */ + public com.google.maps.fleetengine.v1.TripWaypoint.Builder addVehicleWaypointsBuilder() { + return getVehicleWaypointsFieldBuilder() + .addBuilder(com.google.maps.fleetengine.v1.TripWaypoint.getDefaultInstance()); + } + /** + * + * + *
+     * This field supports manual ordering of the waypoints for the trip. It
+     * contains all of the remaining waypoints for the assigned vehicle, as well
+     * as the pickup and drop-off waypoints for this trip. If the trip hasn't been
+     * assigned to a vehicle, then Fleet Engine ignores this field. For privacy
+     * reasons, this field is only populated by the server on `UpdateTrip` and
+     * `CreateTrip` calls, NOT on `GetTrip` calls.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint vehicle_waypoints = 20; + */ + public com.google.maps.fleetengine.v1.TripWaypoint.Builder addVehicleWaypointsBuilder( + int index) { + return getVehicleWaypointsFieldBuilder() + .addBuilder(index, com.google.maps.fleetengine.v1.TripWaypoint.getDefaultInstance()); + } + /** + * + * + *
+     * This field supports manual ordering of the waypoints for the trip. It
+     * contains all of the remaining waypoints for the assigned vehicle, as well
+     * as the pickup and drop-off waypoints for this trip. If the trip hasn't been
+     * assigned to a vehicle, then Fleet Engine ignores this field. For privacy
+     * reasons, this field is only populated by the server on `UpdateTrip` and
+     * `CreateTrip` calls, NOT on `GetTrip` calls.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint vehicle_waypoints = 20; + */ + public java.util.List + getVehicleWaypointsBuilderList() { + return getVehicleWaypointsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.TripWaypoint, + com.google.maps.fleetengine.v1.TripWaypoint.Builder, + com.google.maps.fleetengine.v1.TripWaypointOrBuilder> + getVehicleWaypointsFieldBuilder() { + if (vehicleWaypointsBuilder_ == null) { + vehicleWaypointsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.TripWaypoint, + com.google.maps.fleetengine.v1.TripWaypoint.Builder, + com.google.maps.fleetengine.v1.TripWaypointOrBuilder>( + vehicleWaypoints_, + ((bitField0_ & 0x00020000) != 0), + getParentForChildren(), + isClean()); + vehicleWaypoints_ = null; + } + return vehicleWaypointsBuilder_; + } + + private java.util.List route_ = java.util.Collections.emptyList(); + + private void ensureRouteIsMutable() { + if (!((bitField0_ & 0x00040000) != 0)) { + route_ = new java.util.ArrayList(route_); + bitField0_ |= 0x00040000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + routeBuilder_; + + /** + * + * + *
+     * Output only. Anticipated route for this trip to the first entry in
+     * remaining_waypoints. Note that the first waypoint may belong to a different
+     * trip.
+     * 
+ * + * repeated .google.type.LatLng route = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getRouteList() { + if (routeBuilder_ == null) { + return java.util.Collections.unmodifiableList(route_); + } else { + return routeBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. Anticipated route for this trip to the first entry in
+     * remaining_waypoints. Note that the first waypoint may belong to a different
+     * trip.
+     * 
+ * + * repeated .google.type.LatLng route = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getRouteCount() { + if (routeBuilder_ == null) { + return route_.size(); + } else { + return routeBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. Anticipated route for this trip to the first entry in
+     * remaining_waypoints. Note that the first waypoint may belong to a different
+     * trip.
+     * 
+ * + * repeated .google.type.LatLng route = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.type.LatLng getRoute(int index) { + if (routeBuilder_ == null) { + return route_.get(index); + } else { + return routeBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. Anticipated route for this trip to the first entry in
+     * remaining_waypoints. Note that the first waypoint may belong to a different
+     * trip.
+     * 
+ * + * repeated .google.type.LatLng route = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRoute(int index, com.google.type.LatLng value) { + if (routeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRouteIsMutable(); + route_.set(index, value); + onChanged(); + } else { + routeBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Anticipated route for this trip to the first entry in
+     * remaining_waypoints. Note that the first waypoint may belong to a different
+     * trip.
+     * 
+ * + * repeated .google.type.LatLng route = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRoute(int index, com.google.type.LatLng.Builder builderForValue) { + if (routeBuilder_ == null) { + ensureRouteIsMutable(); + route_.set(index, builderForValue.build()); + onChanged(); + } else { + routeBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Anticipated route for this trip to the first entry in
+     * remaining_waypoints. Note that the first waypoint may belong to a different
+     * trip.
+     * 
+ * + * repeated .google.type.LatLng route = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addRoute(com.google.type.LatLng value) { + if (routeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRouteIsMutable(); + route_.add(value); + onChanged(); + } else { + routeBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. Anticipated route for this trip to the first entry in
+     * remaining_waypoints. Note that the first waypoint may belong to a different
+     * trip.
+     * 
+ * + * repeated .google.type.LatLng route = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addRoute(int index, com.google.type.LatLng value) { + if (routeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRouteIsMutable(); + route_.add(index, value); + onChanged(); + } else { + routeBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Anticipated route for this trip to the first entry in
+     * remaining_waypoints. Note that the first waypoint may belong to a different
+     * trip.
+     * 
+ * + * repeated .google.type.LatLng route = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addRoute(com.google.type.LatLng.Builder builderForValue) { + if (routeBuilder_ == null) { + ensureRouteIsMutable(); + route_.add(builderForValue.build()); + onChanged(); + } else { + routeBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Anticipated route for this trip to the first entry in
+     * remaining_waypoints. Note that the first waypoint may belong to a different
+     * trip.
+     * 
+ * + * repeated .google.type.LatLng route = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addRoute(int index, com.google.type.LatLng.Builder builderForValue) { + if (routeBuilder_ == null) { + ensureRouteIsMutable(); + route_.add(index, builderForValue.build()); + onChanged(); + } else { + routeBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Anticipated route for this trip to the first entry in
+     * remaining_waypoints. Note that the first waypoint may belong to a different
+     * trip.
+     * 
+ * + * repeated .google.type.LatLng route = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllRoute(java.lang.Iterable values) { + if (routeBuilder_ == null) { + ensureRouteIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, route_); + onChanged(); + } else { + routeBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. Anticipated route for this trip to the first entry in
+     * remaining_waypoints. Note that the first waypoint may belong to a different
+     * trip.
+     * 
+ * + * repeated .google.type.LatLng route = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearRoute() { + if (routeBuilder_ == null) { + route_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00040000); + onChanged(); + } else { + routeBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Anticipated route for this trip to the first entry in
+     * remaining_waypoints. Note that the first waypoint may belong to a different
+     * trip.
+     * 
+ * + * repeated .google.type.LatLng route = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeRoute(int index) { + if (routeBuilder_ == null) { + ensureRouteIsMutable(); + route_.remove(index); + onChanged(); + } else { + routeBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. Anticipated route for this trip to the first entry in
+     * remaining_waypoints. Note that the first waypoint may belong to a different
+     * trip.
+     * 
+ * + * repeated .google.type.LatLng route = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.type.LatLng.Builder getRouteBuilder(int index) { + return getRouteFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. Anticipated route for this trip to the first entry in
+     * remaining_waypoints. Note that the first waypoint may belong to a different
+     * trip.
+     * 
+ * + * repeated .google.type.LatLng route = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.type.LatLngOrBuilder getRouteOrBuilder(int index) { + if (routeBuilder_ == null) { + return route_.get(index); + } else { + return routeBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. Anticipated route for this trip to the first entry in
+     * remaining_waypoints. Note that the first waypoint may belong to a different
+     * trip.
+     * 
+ * + * repeated .google.type.LatLng route = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getRouteOrBuilderList() { + if (routeBuilder_ != null) { + return routeBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(route_); + } + } + /** + * + * + *
+     * Output only. Anticipated route for this trip to the first entry in
+     * remaining_waypoints. Note that the first waypoint may belong to a different
+     * trip.
+     * 
+ * + * repeated .google.type.LatLng route = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.type.LatLng.Builder addRouteBuilder() { + return getRouteFieldBuilder().addBuilder(com.google.type.LatLng.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Anticipated route for this trip to the first entry in
+     * remaining_waypoints. Note that the first waypoint may belong to a different
+     * trip.
+     * 
+ * + * repeated .google.type.LatLng route = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.type.LatLng.Builder addRouteBuilder(int index) { + return getRouteFieldBuilder().addBuilder(index, com.google.type.LatLng.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Anticipated route for this trip to the first entry in
+     * remaining_waypoints. Note that the first waypoint may belong to a different
+     * trip.
+     * 
+ * + * repeated .google.type.LatLng route = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getRouteBuilderList() { + return getRouteFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + getRouteFieldBuilder() { + if (routeBuilder_ == null) { + routeBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.type.LatLng, + com.google.type.LatLng.Builder, + com.google.type.LatLngOrBuilder>( + route_, ((bitField0_ & 0x00040000) != 0), getParentForChildren(), isClean()); + route_ = null; + } + return routeBuilder_; + } + + private java.lang.Object currentRouteSegment_ = ""; + /** + * + * + *
+     * Output only. An encoded path to the next waypoint.
+     *
+     * Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK. Decoding is not yet supported.
+     * 
+ * + * string current_route_segment = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The currentRouteSegment. + */ + public java.lang.String getCurrentRouteSegment() { + java.lang.Object ref = currentRouteSegment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + currentRouteSegment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. An encoded path to the next waypoint.
+     *
+     * Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK. Decoding is not yet supported.
+     * 
+ * + * string current_route_segment = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for currentRouteSegment. + */ + public com.google.protobuf.ByteString getCurrentRouteSegmentBytes() { + java.lang.Object ref = currentRouteSegment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + currentRouteSegment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. An encoded path to the next waypoint.
+     *
+     * Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK. Decoding is not yet supported.
+     * 
+ * + * string current_route_segment = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The currentRouteSegment to set. + * @return This builder for chaining. + */ + public Builder setCurrentRouteSegment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + currentRouteSegment_ = value; + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. An encoded path to the next waypoint.
+     *
+     * Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK. Decoding is not yet supported.
+     * 
+ * + * string current_route_segment = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearCurrentRouteSegment() { + currentRouteSegment_ = getDefaultInstance().getCurrentRouteSegment(); + bitField0_ = (bitField0_ & ~0x00080000); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. An encoded path to the next waypoint.
+     *
+     * Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK. Decoding is not yet supported.
+     * 
+ * + * string current_route_segment = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for currentRouteSegment to set. + * @return This builder for chaining. + */ + public Builder setCurrentRouteSegmentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + currentRouteSegment_ = value; + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp currentRouteSegmentVersion_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + currentRouteSegmentVersionBuilder_; + /** + * + * + *
+     * Output only. Indicates the last time the route was modified.
+     *
+     * Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK.
+     * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_version = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the currentRouteSegmentVersion field is set. + */ + public boolean hasCurrentRouteSegmentVersion() { + return ((bitField0_ & 0x00100000) != 0); + } + /** + * + * + *
+     * Output only. Indicates the last time the route was modified.
+     *
+     * Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK.
+     * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_version = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The currentRouteSegmentVersion. + */ + public com.google.protobuf.Timestamp getCurrentRouteSegmentVersion() { + if (currentRouteSegmentVersionBuilder_ == null) { + return currentRouteSegmentVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : currentRouteSegmentVersion_; + } else { + return currentRouteSegmentVersionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Indicates the last time the route was modified.
+     *
+     * Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK.
+     * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_version = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCurrentRouteSegmentVersion(com.google.protobuf.Timestamp value) { + if (currentRouteSegmentVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + currentRouteSegmentVersion_ = value; + } else { + currentRouteSegmentVersionBuilder_.setMessage(value); + } + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Indicates the last time the route was modified.
+     *
+     * Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK.
+     * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_version = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCurrentRouteSegmentVersion( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (currentRouteSegmentVersionBuilder_ == null) { + currentRouteSegmentVersion_ = builderForValue.build(); + } else { + currentRouteSegmentVersionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Indicates the last time the route was modified.
+     *
+     * Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK.
+     * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_version = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCurrentRouteSegmentVersion(com.google.protobuf.Timestamp value) { + if (currentRouteSegmentVersionBuilder_ == null) { + if (((bitField0_ & 0x00100000) != 0) + && currentRouteSegmentVersion_ != null + && currentRouteSegmentVersion_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCurrentRouteSegmentVersionBuilder().mergeFrom(value); + } else { + currentRouteSegmentVersion_ = value; + } + } else { + currentRouteSegmentVersionBuilder_.mergeFrom(value); + } + if (currentRouteSegmentVersion_ != null) { + bitField0_ |= 0x00100000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Indicates the last time the route was modified.
+     *
+     * Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK.
+     * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_version = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCurrentRouteSegmentVersion() { + bitField0_ = (bitField0_ & ~0x00100000); + currentRouteSegmentVersion_ = null; + if (currentRouteSegmentVersionBuilder_ != null) { + currentRouteSegmentVersionBuilder_.dispose(); + currentRouteSegmentVersionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Indicates the last time the route was modified.
+     *
+     * Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK.
+     * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_version = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCurrentRouteSegmentVersionBuilder() { + bitField0_ |= 0x00100000; + onChanged(); + return getCurrentRouteSegmentVersionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Indicates the last time the route was modified.
+     *
+     * Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK.
+     * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_version = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCurrentRouteSegmentVersionOrBuilder() { + if (currentRouteSegmentVersionBuilder_ != null) { + return currentRouteSegmentVersionBuilder_.getMessageOrBuilder(); + } else { + return currentRouteSegmentVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : currentRouteSegmentVersion_; + } + } + /** + * + * + *
+     * Output only. Indicates the last time the route was modified.
+     *
+     * Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK.
+     * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_version = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCurrentRouteSegmentVersionFieldBuilder() { + if (currentRouteSegmentVersionBuilder_ == null) { + currentRouteSegmentVersionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCurrentRouteSegmentVersion(), getParentForChildren(), isClean()); + currentRouteSegmentVersion_ = null; + } + return currentRouteSegmentVersionBuilder_; + } + + private com.google.maps.fleetengine.v1.ConsumableTrafficPolyline currentRouteSegmentTraffic_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.ConsumableTrafficPolyline, + com.google.maps.fleetengine.v1.ConsumableTrafficPolyline.Builder, + com.google.maps.fleetengine.v1.ConsumableTrafficPolylineOrBuilder> + currentRouteSegmentTrafficBuilder_; + /** + * + * + *
+     * Output only. Indicates the traffic conditions along the
+     * `current_route_segment` when they're available.
+     *
+     * Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK.
+     * 
+ * + * + * .maps.fleetengine.v1.ConsumableTrafficPolyline current_route_segment_traffic = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the currentRouteSegmentTraffic field is set. + */ + public boolean hasCurrentRouteSegmentTraffic() { + return ((bitField0_ & 0x00200000) != 0); + } + /** + * + * + *
+     * Output only. Indicates the traffic conditions along the
+     * `current_route_segment` when they're available.
+     *
+     * Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK.
+     * 
+ * + * + * .maps.fleetengine.v1.ConsumableTrafficPolyline current_route_segment_traffic = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The currentRouteSegmentTraffic. + */ + public com.google.maps.fleetengine.v1.ConsumableTrafficPolyline + getCurrentRouteSegmentTraffic() { + if (currentRouteSegmentTrafficBuilder_ == null) { + return currentRouteSegmentTraffic_ == null + ? com.google.maps.fleetengine.v1.ConsumableTrafficPolyline.getDefaultInstance() + : currentRouteSegmentTraffic_; + } else { + return currentRouteSegmentTrafficBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Indicates the traffic conditions along the
+     * `current_route_segment` when they're available.
+     *
+     * Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK.
+     * 
+ * + * + * .maps.fleetengine.v1.ConsumableTrafficPolyline current_route_segment_traffic = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCurrentRouteSegmentTraffic( + com.google.maps.fleetengine.v1.ConsumableTrafficPolyline value) { + if (currentRouteSegmentTrafficBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + currentRouteSegmentTraffic_ = value; + } else { + currentRouteSegmentTrafficBuilder_.setMessage(value); + } + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Indicates the traffic conditions along the
+     * `current_route_segment` when they're available.
+     *
+     * Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK.
+     * 
+ * + * + * .maps.fleetengine.v1.ConsumableTrafficPolyline current_route_segment_traffic = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCurrentRouteSegmentTraffic( + com.google.maps.fleetengine.v1.ConsumableTrafficPolyline.Builder builderForValue) { + if (currentRouteSegmentTrafficBuilder_ == null) { + currentRouteSegmentTraffic_ = builderForValue.build(); + } else { + currentRouteSegmentTrafficBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Indicates the traffic conditions along the
+     * `current_route_segment` when they're available.
+     *
+     * Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK.
+     * 
+ * + * + * .maps.fleetengine.v1.ConsumableTrafficPolyline current_route_segment_traffic = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCurrentRouteSegmentTraffic( + com.google.maps.fleetengine.v1.ConsumableTrafficPolyline value) { + if (currentRouteSegmentTrafficBuilder_ == null) { + if (((bitField0_ & 0x00200000) != 0) + && currentRouteSegmentTraffic_ != null + && currentRouteSegmentTraffic_ + != com.google.maps.fleetengine.v1.ConsumableTrafficPolyline.getDefaultInstance()) { + getCurrentRouteSegmentTrafficBuilder().mergeFrom(value); + } else { + currentRouteSegmentTraffic_ = value; + } + } else { + currentRouteSegmentTrafficBuilder_.mergeFrom(value); + } + if (currentRouteSegmentTraffic_ != null) { + bitField0_ |= 0x00200000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Indicates the traffic conditions along the
+     * `current_route_segment` when they're available.
+     *
+     * Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK.
+     * 
+ * + * + * .maps.fleetengine.v1.ConsumableTrafficPolyline current_route_segment_traffic = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCurrentRouteSegmentTraffic() { + bitField0_ = (bitField0_ & ~0x00200000); + currentRouteSegmentTraffic_ = null; + if (currentRouteSegmentTrafficBuilder_ != null) { + currentRouteSegmentTrafficBuilder_.dispose(); + currentRouteSegmentTrafficBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Indicates the traffic conditions along the
+     * `current_route_segment` when they're available.
+     *
+     * Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK.
+     * 
+ * + * + * .maps.fleetengine.v1.ConsumableTrafficPolyline current_route_segment_traffic = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.maps.fleetengine.v1.ConsumableTrafficPolyline.Builder + getCurrentRouteSegmentTrafficBuilder() { + bitField0_ |= 0x00200000; + onChanged(); + return getCurrentRouteSegmentTrafficFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Indicates the traffic conditions along the
+     * `current_route_segment` when they're available.
+     *
+     * Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK.
+     * 
+ * + * + * .maps.fleetengine.v1.ConsumableTrafficPolyline current_route_segment_traffic = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.maps.fleetengine.v1.ConsumableTrafficPolylineOrBuilder + getCurrentRouteSegmentTrafficOrBuilder() { + if (currentRouteSegmentTrafficBuilder_ != null) { + return currentRouteSegmentTrafficBuilder_.getMessageOrBuilder(); + } else { + return currentRouteSegmentTraffic_ == null + ? com.google.maps.fleetengine.v1.ConsumableTrafficPolyline.getDefaultInstance() + : currentRouteSegmentTraffic_; + } + } + /** + * + * + *
+     * Output only. Indicates the traffic conditions along the
+     * `current_route_segment` when they're available.
+     *
+     * Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK.
+     * 
+ * + * + * .maps.fleetengine.v1.ConsumableTrafficPolyline current_route_segment_traffic = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.ConsumableTrafficPolyline, + com.google.maps.fleetengine.v1.ConsumableTrafficPolyline.Builder, + com.google.maps.fleetengine.v1.ConsumableTrafficPolylineOrBuilder> + getCurrentRouteSegmentTrafficFieldBuilder() { + if (currentRouteSegmentTrafficBuilder_ == null) { + currentRouteSegmentTrafficBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.ConsumableTrafficPolyline, + com.google.maps.fleetengine.v1.ConsumableTrafficPolyline.Builder, + com.google.maps.fleetengine.v1.ConsumableTrafficPolylineOrBuilder>( + getCurrentRouteSegmentTraffic(), getParentForChildren(), isClean()); + currentRouteSegmentTraffic_ = null; + } + return currentRouteSegmentTrafficBuilder_; + } + + private com.google.protobuf.Timestamp currentRouteSegmentTrafficVersion_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + currentRouteSegmentTrafficVersionBuilder_; + /** + * + * + *
+     * Output only. Indicates the last time the `current_route_segment_traffic`
+     * was modified.
+     *
+     * Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK.
+     * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_traffic_version = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the currentRouteSegmentTrafficVersion field is set. + */ + public boolean hasCurrentRouteSegmentTrafficVersion() { + return ((bitField0_ & 0x00400000) != 0); + } + /** + * + * + *
+     * Output only. Indicates the last time the `current_route_segment_traffic`
+     * was modified.
+     *
+     * Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK.
+     * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_traffic_version = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The currentRouteSegmentTrafficVersion. + */ + public com.google.protobuf.Timestamp getCurrentRouteSegmentTrafficVersion() { + if (currentRouteSegmentTrafficVersionBuilder_ == null) { + return currentRouteSegmentTrafficVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : currentRouteSegmentTrafficVersion_; + } else { + return currentRouteSegmentTrafficVersionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Indicates the last time the `current_route_segment_traffic`
+     * was modified.
+     *
+     * Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK.
+     * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_traffic_version = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCurrentRouteSegmentTrafficVersion(com.google.protobuf.Timestamp value) { + if (currentRouteSegmentTrafficVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + currentRouteSegmentTrafficVersion_ = value; + } else { + currentRouteSegmentTrafficVersionBuilder_.setMessage(value); + } + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Indicates the last time the `current_route_segment_traffic`
+     * was modified.
+     *
+     * Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK.
+     * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_traffic_version = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCurrentRouteSegmentTrafficVersion( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (currentRouteSegmentTrafficVersionBuilder_ == null) { + currentRouteSegmentTrafficVersion_ = builderForValue.build(); + } else { + currentRouteSegmentTrafficVersionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Indicates the last time the `current_route_segment_traffic`
+     * was modified.
+     *
+     * Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK.
+     * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_traffic_version = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCurrentRouteSegmentTrafficVersion(com.google.protobuf.Timestamp value) { + if (currentRouteSegmentTrafficVersionBuilder_ == null) { + if (((bitField0_ & 0x00400000) != 0) + && currentRouteSegmentTrafficVersion_ != null + && currentRouteSegmentTrafficVersion_ + != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCurrentRouteSegmentTrafficVersionBuilder().mergeFrom(value); + } else { + currentRouteSegmentTrafficVersion_ = value; + } + } else { + currentRouteSegmentTrafficVersionBuilder_.mergeFrom(value); + } + if (currentRouteSegmentTrafficVersion_ != null) { + bitField0_ |= 0x00400000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Indicates the last time the `current_route_segment_traffic`
+     * was modified.
+     *
+     * Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK.
+     * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_traffic_version = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCurrentRouteSegmentTrafficVersion() { + bitField0_ = (bitField0_ & ~0x00400000); + currentRouteSegmentTrafficVersion_ = null; + if (currentRouteSegmentTrafficVersionBuilder_ != null) { + currentRouteSegmentTrafficVersionBuilder_.dispose(); + currentRouteSegmentTrafficVersionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Indicates the last time the `current_route_segment_traffic`
+     * was modified.
+     *
+     * Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK.
+     * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_traffic_version = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCurrentRouteSegmentTrafficVersionBuilder() { + bitField0_ |= 0x00400000; + onChanged(); + return getCurrentRouteSegmentTrafficVersionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Indicates the last time the `current_route_segment_traffic`
+     * was modified.
+     *
+     * Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK.
+     * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_traffic_version = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCurrentRouteSegmentTrafficVersionOrBuilder() { + if (currentRouteSegmentTrafficVersionBuilder_ != null) { + return currentRouteSegmentTrafficVersionBuilder_.getMessageOrBuilder(); + } else { + return currentRouteSegmentTrafficVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : currentRouteSegmentTrafficVersion_; + } + } + /** + * + * + *
+     * Output only. Indicates the last time the `current_route_segment_traffic`
+     * was modified.
+     *
+     * Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK.
+     * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_traffic_version = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCurrentRouteSegmentTrafficVersionFieldBuilder() { + if (currentRouteSegmentTrafficVersionBuilder_ == null) { + currentRouteSegmentTrafficVersionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCurrentRouteSegmentTrafficVersion(), getParentForChildren(), isClean()); + currentRouteSegmentTrafficVersion_ = null; + } + return currentRouteSegmentTrafficVersionBuilder_; + } + + private com.google.maps.fleetengine.v1.TripWaypoint currentRouteSegmentEndPoint_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.TripWaypoint, + com.google.maps.fleetengine.v1.TripWaypoint.Builder, + com.google.maps.fleetengine.v1.TripWaypointOrBuilder> + currentRouteSegmentEndPointBuilder_; + /** + * + * + *
+     * Output only. The waypoint where `current_route_segment` ends.
+     * 
+ * + * + * .maps.fleetengine.v1.TripWaypoint current_route_segment_end_point = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the currentRouteSegmentEndPoint field is set. + */ + public boolean hasCurrentRouteSegmentEndPoint() { + return ((bitField0_ & 0x00800000) != 0); + } + /** + * + * + *
+     * Output only. The waypoint where `current_route_segment` ends.
+     * 
+ * + * + * .maps.fleetengine.v1.TripWaypoint current_route_segment_end_point = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The currentRouteSegmentEndPoint. + */ + public com.google.maps.fleetengine.v1.TripWaypoint getCurrentRouteSegmentEndPoint() { + if (currentRouteSegmentEndPointBuilder_ == null) { + return currentRouteSegmentEndPoint_ == null + ? com.google.maps.fleetengine.v1.TripWaypoint.getDefaultInstance() + : currentRouteSegmentEndPoint_; + } else { + return currentRouteSegmentEndPointBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The waypoint where `current_route_segment` ends.
+     * 
+ * + * + * .maps.fleetengine.v1.TripWaypoint current_route_segment_end_point = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCurrentRouteSegmentEndPoint( + com.google.maps.fleetengine.v1.TripWaypoint value) { + if (currentRouteSegmentEndPointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + currentRouteSegmentEndPoint_ = value; + } else { + currentRouteSegmentEndPointBuilder_.setMessage(value); + } + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The waypoint where `current_route_segment` ends.
+     * 
+ * + * + * .maps.fleetengine.v1.TripWaypoint current_route_segment_end_point = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCurrentRouteSegmentEndPoint( + com.google.maps.fleetengine.v1.TripWaypoint.Builder builderForValue) { + if (currentRouteSegmentEndPointBuilder_ == null) { + currentRouteSegmentEndPoint_ = builderForValue.build(); + } else { + currentRouteSegmentEndPointBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The waypoint where `current_route_segment` ends.
+     * 
+ * + * + * .maps.fleetengine.v1.TripWaypoint current_route_segment_end_point = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCurrentRouteSegmentEndPoint( + com.google.maps.fleetengine.v1.TripWaypoint value) { + if (currentRouteSegmentEndPointBuilder_ == null) { + if (((bitField0_ & 0x00800000) != 0) + && currentRouteSegmentEndPoint_ != null + && currentRouteSegmentEndPoint_ + != com.google.maps.fleetengine.v1.TripWaypoint.getDefaultInstance()) { + getCurrentRouteSegmentEndPointBuilder().mergeFrom(value); + } else { + currentRouteSegmentEndPoint_ = value; + } + } else { + currentRouteSegmentEndPointBuilder_.mergeFrom(value); + } + if (currentRouteSegmentEndPoint_ != null) { + bitField0_ |= 0x00800000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The waypoint where `current_route_segment` ends.
+     * 
+ * + * + * .maps.fleetengine.v1.TripWaypoint current_route_segment_end_point = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCurrentRouteSegmentEndPoint() { + bitField0_ = (bitField0_ & ~0x00800000); + currentRouteSegmentEndPoint_ = null; + if (currentRouteSegmentEndPointBuilder_ != null) { + currentRouteSegmentEndPointBuilder_.dispose(); + currentRouteSegmentEndPointBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The waypoint where `current_route_segment` ends.
+     * 
+ * + * + * .maps.fleetengine.v1.TripWaypoint current_route_segment_end_point = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.maps.fleetengine.v1.TripWaypoint.Builder + getCurrentRouteSegmentEndPointBuilder() { + bitField0_ |= 0x00800000; + onChanged(); + return getCurrentRouteSegmentEndPointFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The waypoint where `current_route_segment` ends.
+     * 
+ * + * + * .maps.fleetengine.v1.TripWaypoint current_route_segment_end_point = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.maps.fleetengine.v1.TripWaypointOrBuilder + getCurrentRouteSegmentEndPointOrBuilder() { + if (currentRouteSegmentEndPointBuilder_ != null) { + return currentRouteSegmentEndPointBuilder_.getMessageOrBuilder(); + } else { + return currentRouteSegmentEndPoint_ == null + ? com.google.maps.fleetengine.v1.TripWaypoint.getDefaultInstance() + : currentRouteSegmentEndPoint_; + } + } + /** + * + * + *
+     * Output only. The waypoint where `current_route_segment` ends.
+     * 
+ * + * + * .maps.fleetengine.v1.TripWaypoint current_route_segment_end_point = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.TripWaypoint, + com.google.maps.fleetengine.v1.TripWaypoint.Builder, + com.google.maps.fleetengine.v1.TripWaypointOrBuilder> + getCurrentRouteSegmentEndPointFieldBuilder() { + if (currentRouteSegmentEndPointBuilder_ == null) { + currentRouteSegmentEndPointBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.TripWaypoint, + com.google.maps.fleetengine.v1.TripWaypoint.Builder, + com.google.maps.fleetengine.v1.TripWaypointOrBuilder>( + getCurrentRouteSegmentEndPoint(), getParentForChildren(), isClean()); + currentRouteSegmentEndPoint_ = null; + } + return currentRouteSegmentEndPointBuilder_; + } + + private com.google.protobuf.Int32Value remainingDistanceMeters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + remainingDistanceMetersBuilder_; + /** + * + * + *
+     * Output only. The remaining driving distance in the `current_route_segment`
+     * field. The value is unspecified if the trip is not assigned to a vehicle,
+     * or the trip is completed or cancelled.
+     * 
+ * + * + * .google.protobuf.Int32Value remaining_distance_meters = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the remainingDistanceMeters field is set. + */ + public boolean hasRemainingDistanceMeters() { + return ((bitField0_ & 0x01000000) != 0); + } + /** + * + * + *
+     * Output only. The remaining driving distance in the `current_route_segment`
+     * field. The value is unspecified if the trip is not assigned to a vehicle,
+     * or the trip is completed or cancelled.
+     * 
+ * + * + * .google.protobuf.Int32Value remaining_distance_meters = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The remainingDistanceMeters. + */ + public com.google.protobuf.Int32Value getRemainingDistanceMeters() { + if (remainingDistanceMetersBuilder_ == null) { + return remainingDistanceMeters_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : remainingDistanceMeters_; + } else { + return remainingDistanceMetersBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The remaining driving distance in the `current_route_segment`
+     * field. The value is unspecified if the trip is not assigned to a vehicle,
+     * or the trip is completed or cancelled.
+     * 
+ * + * + * .google.protobuf.Int32Value remaining_distance_meters = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRemainingDistanceMeters(com.google.protobuf.Int32Value value) { + if (remainingDistanceMetersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + remainingDistanceMeters_ = value; + } else { + remainingDistanceMetersBuilder_.setMessage(value); + } + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The remaining driving distance in the `current_route_segment`
+     * field. The value is unspecified if the trip is not assigned to a vehicle,
+     * or the trip is completed or cancelled.
+     * 
+ * + * + * .google.protobuf.Int32Value remaining_distance_meters = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRemainingDistanceMeters( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (remainingDistanceMetersBuilder_ == null) { + remainingDistanceMeters_ = builderForValue.build(); + } else { + remainingDistanceMetersBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The remaining driving distance in the `current_route_segment`
+     * field. The value is unspecified if the trip is not assigned to a vehicle,
+     * or the trip is completed or cancelled.
+     * 
+ * + * + * .google.protobuf.Int32Value remaining_distance_meters = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeRemainingDistanceMeters(com.google.protobuf.Int32Value value) { + if (remainingDistanceMetersBuilder_ == null) { + if (((bitField0_ & 0x01000000) != 0) + && remainingDistanceMeters_ != null + && remainingDistanceMeters_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getRemainingDistanceMetersBuilder().mergeFrom(value); + } else { + remainingDistanceMeters_ = value; + } + } else { + remainingDistanceMetersBuilder_.mergeFrom(value); + } + if (remainingDistanceMeters_ != null) { + bitField0_ |= 0x01000000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The remaining driving distance in the `current_route_segment`
+     * field. The value is unspecified if the trip is not assigned to a vehicle,
+     * or the trip is completed or cancelled.
+     * 
+ * + * + * .google.protobuf.Int32Value remaining_distance_meters = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearRemainingDistanceMeters() { + bitField0_ = (bitField0_ & ~0x01000000); + remainingDistanceMeters_ = null; + if (remainingDistanceMetersBuilder_ != null) { + remainingDistanceMetersBuilder_.dispose(); + remainingDistanceMetersBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The remaining driving distance in the `current_route_segment`
+     * field. The value is unspecified if the trip is not assigned to a vehicle,
+     * or the trip is completed or cancelled.
+     * 
+ * + * + * .google.protobuf.Int32Value remaining_distance_meters = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Int32Value.Builder getRemainingDistanceMetersBuilder() { + bitField0_ |= 0x01000000; + onChanged(); + return getRemainingDistanceMetersFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The remaining driving distance in the `current_route_segment`
+     * field. The value is unspecified if the trip is not assigned to a vehicle,
+     * or the trip is completed or cancelled.
+     * 
+ * + * + * .google.protobuf.Int32Value remaining_distance_meters = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Int32ValueOrBuilder getRemainingDistanceMetersOrBuilder() { + if (remainingDistanceMetersBuilder_ != null) { + return remainingDistanceMetersBuilder_.getMessageOrBuilder(); + } else { + return remainingDistanceMeters_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : remainingDistanceMeters_; + } + } + /** + * + * + *
+     * Output only. The remaining driving distance in the `current_route_segment`
+     * field. The value is unspecified if the trip is not assigned to a vehicle,
+     * or the trip is completed or cancelled.
+     * 
+ * + * + * .google.protobuf.Int32Value remaining_distance_meters = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + getRemainingDistanceMetersFieldBuilder() { + if (remainingDistanceMetersBuilder_ == null) { + remainingDistanceMetersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder>( + getRemainingDistanceMeters(), getParentForChildren(), isClean()); + remainingDistanceMeters_ = null; + } + return remainingDistanceMetersBuilder_; + } + + private com.google.protobuf.Timestamp etaToFirstWaypoint_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + etaToFirstWaypointBuilder_; + /** + * + * + *
+     * Output only. The ETA to the next waypoint (the first entry in the
+     * `remaining_waypoints` field). The value is unspecified if the trip is not
+     * assigned to a vehicle, or the trip is inactive (completed or cancelled).
+     * 
+ * + * + * .google.protobuf.Timestamp eta_to_first_waypoint = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the etaToFirstWaypoint field is set. + */ + public boolean hasEtaToFirstWaypoint() { + return ((bitField0_ & 0x02000000) != 0); + } + /** + * + * + *
+     * Output only. The ETA to the next waypoint (the first entry in the
+     * `remaining_waypoints` field). The value is unspecified if the trip is not
+     * assigned to a vehicle, or the trip is inactive (completed or cancelled).
+     * 
+ * + * + * .google.protobuf.Timestamp eta_to_first_waypoint = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The etaToFirstWaypoint. + */ + public com.google.protobuf.Timestamp getEtaToFirstWaypoint() { + if (etaToFirstWaypointBuilder_ == null) { + return etaToFirstWaypoint_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : etaToFirstWaypoint_; + } else { + return etaToFirstWaypointBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The ETA to the next waypoint (the first entry in the
+     * `remaining_waypoints` field). The value is unspecified if the trip is not
+     * assigned to a vehicle, or the trip is inactive (completed or cancelled).
+     * 
+ * + * + * .google.protobuf.Timestamp eta_to_first_waypoint = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEtaToFirstWaypoint(com.google.protobuf.Timestamp value) { + if (etaToFirstWaypointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + etaToFirstWaypoint_ = value; + } else { + etaToFirstWaypointBuilder_.setMessage(value); + } + bitField0_ |= 0x02000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The ETA to the next waypoint (the first entry in the
+     * `remaining_waypoints` field). The value is unspecified if the trip is not
+     * assigned to a vehicle, or the trip is inactive (completed or cancelled).
+     * 
+ * + * + * .google.protobuf.Timestamp eta_to_first_waypoint = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEtaToFirstWaypoint(com.google.protobuf.Timestamp.Builder builderForValue) { + if (etaToFirstWaypointBuilder_ == null) { + etaToFirstWaypoint_ = builderForValue.build(); + } else { + etaToFirstWaypointBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x02000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The ETA to the next waypoint (the first entry in the
+     * `remaining_waypoints` field). The value is unspecified if the trip is not
+     * assigned to a vehicle, or the trip is inactive (completed or cancelled).
+     * 
+ * + * + * .google.protobuf.Timestamp eta_to_first_waypoint = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEtaToFirstWaypoint(com.google.protobuf.Timestamp value) { + if (etaToFirstWaypointBuilder_ == null) { + if (((bitField0_ & 0x02000000) != 0) + && etaToFirstWaypoint_ != null + && etaToFirstWaypoint_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEtaToFirstWaypointBuilder().mergeFrom(value); + } else { + etaToFirstWaypoint_ = value; + } + } else { + etaToFirstWaypointBuilder_.mergeFrom(value); + } + if (etaToFirstWaypoint_ != null) { + bitField0_ |= 0x02000000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The ETA to the next waypoint (the first entry in the
+     * `remaining_waypoints` field). The value is unspecified if the trip is not
+     * assigned to a vehicle, or the trip is inactive (completed or cancelled).
+     * 
+ * + * + * .google.protobuf.Timestamp eta_to_first_waypoint = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEtaToFirstWaypoint() { + bitField0_ = (bitField0_ & ~0x02000000); + etaToFirstWaypoint_ = null; + if (etaToFirstWaypointBuilder_ != null) { + etaToFirstWaypointBuilder_.dispose(); + etaToFirstWaypointBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The ETA to the next waypoint (the first entry in the
+     * `remaining_waypoints` field). The value is unspecified if the trip is not
+     * assigned to a vehicle, or the trip is inactive (completed or cancelled).
+     * 
+ * + * + * .google.protobuf.Timestamp eta_to_first_waypoint = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEtaToFirstWaypointBuilder() { + bitField0_ |= 0x02000000; + onChanged(); + return getEtaToFirstWaypointFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The ETA to the next waypoint (the first entry in the
+     * `remaining_waypoints` field). The value is unspecified if the trip is not
+     * assigned to a vehicle, or the trip is inactive (completed or cancelled).
+     * 
+ * + * + * .google.protobuf.Timestamp eta_to_first_waypoint = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEtaToFirstWaypointOrBuilder() { + if (etaToFirstWaypointBuilder_ != null) { + return etaToFirstWaypointBuilder_.getMessageOrBuilder(); + } else { + return etaToFirstWaypoint_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : etaToFirstWaypoint_; + } + } + /** + * + * + *
+     * Output only. The ETA to the next waypoint (the first entry in the
+     * `remaining_waypoints` field). The value is unspecified if the trip is not
+     * assigned to a vehicle, or the trip is inactive (completed or cancelled).
+     * 
+ * + * + * .google.protobuf.Timestamp eta_to_first_waypoint = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEtaToFirstWaypointFieldBuilder() { + if (etaToFirstWaypointBuilder_ == null) { + etaToFirstWaypointBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEtaToFirstWaypoint(), getParentForChildren(), isClean()); + etaToFirstWaypoint_ = null; + } + return etaToFirstWaypointBuilder_; + } + + private com.google.protobuf.Duration remainingTimeToFirstWaypoint_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + remainingTimeToFirstWaypointBuilder_; + /** + * + * + *
+     * Output only. The duration from when the Trip data is returned to the time
+     * in `Trip.eta_to_first_waypoint`. The value is unspecified if the trip is
+     * not assigned to a vehicle, or the trip is inactive (completed or
+     * cancelled).
+     * 
+ * + * + * .google.protobuf.Duration remaining_time_to_first_waypoint = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the remainingTimeToFirstWaypoint field is set. + */ + public boolean hasRemainingTimeToFirstWaypoint() { + return ((bitField0_ & 0x04000000) != 0); + } + /** + * + * + *
+     * Output only. The duration from when the Trip data is returned to the time
+     * in `Trip.eta_to_first_waypoint`. The value is unspecified if the trip is
+     * not assigned to a vehicle, or the trip is inactive (completed or
+     * cancelled).
+     * 
+ * + * + * .google.protobuf.Duration remaining_time_to_first_waypoint = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The remainingTimeToFirstWaypoint. + */ + public com.google.protobuf.Duration getRemainingTimeToFirstWaypoint() { + if (remainingTimeToFirstWaypointBuilder_ == null) { + return remainingTimeToFirstWaypoint_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : remainingTimeToFirstWaypoint_; + } else { + return remainingTimeToFirstWaypointBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The duration from when the Trip data is returned to the time
+     * in `Trip.eta_to_first_waypoint`. The value is unspecified if the trip is
+     * not assigned to a vehicle, or the trip is inactive (completed or
+     * cancelled).
+     * 
+ * + * + * .google.protobuf.Duration remaining_time_to_first_waypoint = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRemainingTimeToFirstWaypoint(com.google.protobuf.Duration value) { + if (remainingTimeToFirstWaypointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + remainingTimeToFirstWaypoint_ = value; + } else { + remainingTimeToFirstWaypointBuilder_.setMessage(value); + } + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The duration from when the Trip data is returned to the time
+     * in `Trip.eta_to_first_waypoint`. The value is unspecified if the trip is
+     * not assigned to a vehicle, or the trip is inactive (completed or
+     * cancelled).
+     * 
+ * + * + * .google.protobuf.Duration remaining_time_to_first_waypoint = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRemainingTimeToFirstWaypoint( + com.google.protobuf.Duration.Builder builderForValue) { + if (remainingTimeToFirstWaypointBuilder_ == null) { + remainingTimeToFirstWaypoint_ = builderForValue.build(); + } else { + remainingTimeToFirstWaypointBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The duration from when the Trip data is returned to the time
+     * in `Trip.eta_to_first_waypoint`. The value is unspecified if the trip is
+     * not assigned to a vehicle, or the trip is inactive (completed or
+     * cancelled).
+     * 
+ * + * + * .google.protobuf.Duration remaining_time_to_first_waypoint = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeRemainingTimeToFirstWaypoint(com.google.protobuf.Duration value) { + if (remainingTimeToFirstWaypointBuilder_ == null) { + if (((bitField0_ & 0x04000000) != 0) + && remainingTimeToFirstWaypoint_ != null + && remainingTimeToFirstWaypoint_ != com.google.protobuf.Duration.getDefaultInstance()) { + getRemainingTimeToFirstWaypointBuilder().mergeFrom(value); + } else { + remainingTimeToFirstWaypoint_ = value; + } + } else { + remainingTimeToFirstWaypointBuilder_.mergeFrom(value); + } + if (remainingTimeToFirstWaypoint_ != null) { + bitField0_ |= 0x04000000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The duration from when the Trip data is returned to the time
+     * in `Trip.eta_to_first_waypoint`. The value is unspecified if the trip is
+     * not assigned to a vehicle, or the trip is inactive (completed or
+     * cancelled).
+     * 
+ * + * + * .google.protobuf.Duration remaining_time_to_first_waypoint = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearRemainingTimeToFirstWaypoint() { + bitField0_ = (bitField0_ & ~0x04000000); + remainingTimeToFirstWaypoint_ = null; + if (remainingTimeToFirstWaypointBuilder_ != null) { + remainingTimeToFirstWaypointBuilder_.dispose(); + remainingTimeToFirstWaypointBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The duration from when the Trip data is returned to the time
+     * in `Trip.eta_to_first_waypoint`. The value is unspecified if the trip is
+     * not assigned to a vehicle, or the trip is inactive (completed or
+     * cancelled).
+     * 
+ * + * + * .google.protobuf.Duration remaining_time_to_first_waypoint = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Duration.Builder getRemainingTimeToFirstWaypointBuilder() { + bitField0_ |= 0x04000000; + onChanged(); + return getRemainingTimeToFirstWaypointFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The duration from when the Trip data is returned to the time
+     * in `Trip.eta_to_first_waypoint`. The value is unspecified if the trip is
+     * not assigned to a vehicle, or the trip is inactive (completed or
+     * cancelled).
+     * 
+ * + * + * .google.protobuf.Duration remaining_time_to_first_waypoint = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.DurationOrBuilder getRemainingTimeToFirstWaypointOrBuilder() { + if (remainingTimeToFirstWaypointBuilder_ != null) { + return remainingTimeToFirstWaypointBuilder_.getMessageOrBuilder(); + } else { + return remainingTimeToFirstWaypoint_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : remainingTimeToFirstWaypoint_; + } + } + /** + * + * + *
+     * Output only. The duration from when the Trip data is returned to the time
+     * in `Trip.eta_to_first_waypoint`. The value is unspecified if the trip is
+     * not assigned to a vehicle, or the trip is inactive (completed or
+     * cancelled).
+     * 
+ * + * + * .google.protobuf.Duration remaining_time_to_first_waypoint = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getRemainingTimeToFirstWaypointFieldBuilder() { + if (remainingTimeToFirstWaypointBuilder_ == null) { + remainingTimeToFirstWaypointBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getRemainingTimeToFirstWaypoint(), getParentForChildren(), isClean()); + remainingTimeToFirstWaypoint_ = null; + } + return remainingTimeToFirstWaypointBuilder_; + } + + private com.google.protobuf.Timestamp remainingWaypointsVersion_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + remainingWaypointsVersionBuilder_; + /** + * + * + *
+     * Output only. Indicates the last time that `remaining_waypoints` was changed
+     * (a waypoint was added, removed, or changed).
+     * 
+ * + * + * .google.protobuf.Timestamp remaining_waypoints_version = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the remainingWaypointsVersion field is set. + */ + public boolean hasRemainingWaypointsVersion() { + return ((bitField0_ & 0x08000000) != 0); + } + /** + * + * + *
+     * Output only. Indicates the last time that `remaining_waypoints` was changed
+     * (a waypoint was added, removed, or changed).
+     * 
+ * + * + * .google.protobuf.Timestamp remaining_waypoints_version = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The remainingWaypointsVersion. + */ + public com.google.protobuf.Timestamp getRemainingWaypointsVersion() { + if (remainingWaypointsVersionBuilder_ == null) { + return remainingWaypointsVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : remainingWaypointsVersion_; + } else { + return remainingWaypointsVersionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Indicates the last time that `remaining_waypoints` was changed
+     * (a waypoint was added, removed, or changed).
+     * 
+ * + * + * .google.protobuf.Timestamp remaining_waypoints_version = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRemainingWaypointsVersion(com.google.protobuf.Timestamp value) { + if (remainingWaypointsVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + remainingWaypointsVersion_ = value; + } else { + remainingWaypointsVersionBuilder_.setMessage(value); + } + bitField0_ |= 0x08000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Indicates the last time that `remaining_waypoints` was changed
+     * (a waypoint was added, removed, or changed).
+     * 
+ * + * + * .google.protobuf.Timestamp remaining_waypoints_version = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRemainingWaypointsVersion( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (remainingWaypointsVersionBuilder_ == null) { + remainingWaypointsVersion_ = builderForValue.build(); + } else { + remainingWaypointsVersionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x08000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Indicates the last time that `remaining_waypoints` was changed
+     * (a waypoint was added, removed, or changed).
+     * 
+ * + * + * .google.protobuf.Timestamp remaining_waypoints_version = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeRemainingWaypointsVersion(com.google.protobuf.Timestamp value) { + if (remainingWaypointsVersionBuilder_ == null) { + if (((bitField0_ & 0x08000000) != 0) + && remainingWaypointsVersion_ != null + && remainingWaypointsVersion_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getRemainingWaypointsVersionBuilder().mergeFrom(value); + } else { + remainingWaypointsVersion_ = value; + } + } else { + remainingWaypointsVersionBuilder_.mergeFrom(value); + } + if (remainingWaypointsVersion_ != null) { + bitField0_ |= 0x08000000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Indicates the last time that `remaining_waypoints` was changed
+     * (a waypoint was added, removed, or changed).
+     * 
+ * + * + * .google.protobuf.Timestamp remaining_waypoints_version = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearRemainingWaypointsVersion() { + bitField0_ = (bitField0_ & ~0x08000000); + remainingWaypointsVersion_ = null; + if (remainingWaypointsVersionBuilder_ != null) { + remainingWaypointsVersionBuilder_.dispose(); + remainingWaypointsVersionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Indicates the last time that `remaining_waypoints` was changed
+     * (a waypoint was added, removed, or changed).
+     * 
+ * + * + * .google.protobuf.Timestamp remaining_waypoints_version = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getRemainingWaypointsVersionBuilder() { + bitField0_ |= 0x08000000; + onChanged(); + return getRemainingWaypointsVersionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Indicates the last time that `remaining_waypoints` was changed
+     * (a waypoint was added, removed, or changed).
+     * 
+ * + * + * .google.protobuf.Timestamp remaining_waypoints_version = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getRemainingWaypointsVersionOrBuilder() { + if (remainingWaypointsVersionBuilder_ != null) { + return remainingWaypointsVersionBuilder_.getMessageOrBuilder(); + } else { + return remainingWaypointsVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : remainingWaypointsVersion_; + } + } + /** + * + * + *
+     * Output only. Indicates the last time that `remaining_waypoints` was changed
+     * (a waypoint was added, removed, or changed).
+     * 
+ * + * + * .google.protobuf.Timestamp remaining_waypoints_version = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getRemainingWaypointsVersionFieldBuilder() { + if (remainingWaypointsVersionBuilder_ == null) { + remainingWaypointsVersionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getRemainingWaypointsVersion(), getParentForChildren(), isClean()); + remainingWaypointsVersion_ = null; + } + return remainingWaypointsVersionBuilder_; + } + + private com.google.protobuf.Timestamp remainingWaypointsRouteVersion_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + remainingWaypointsRouteVersionBuilder_; + /** + * + * + *
+     * Output only. Indicates the last time the
+     * `remaining_waypoints.path_to_waypoint` and
+     * `remaining_waypoints.traffic_to_waypoint` were modified. Your client app
+     * should cache this value and pass it in `GetTripRequest` to ensure the
+     * paths and traffic for `remaining_waypoints` are only returned if updated.
+     * 
+ * + * + * .google.protobuf.Timestamp remaining_waypoints_route_version = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the remainingWaypointsRouteVersion field is set. + */ + public boolean hasRemainingWaypointsRouteVersion() { + return ((bitField0_ & 0x10000000) != 0); + } + /** + * + * + *
+     * Output only. Indicates the last time the
+     * `remaining_waypoints.path_to_waypoint` and
+     * `remaining_waypoints.traffic_to_waypoint` were modified. Your client app
+     * should cache this value and pass it in `GetTripRequest` to ensure the
+     * paths and traffic for `remaining_waypoints` are only returned if updated.
+     * 
+ * + * + * .google.protobuf.Timestamp remaining_waypoints_route_version = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The remainingWaypointsRouteVersion. + */ + public com.google.protobuf.Timestamp getRemainingWaypointsRouteVersion() { + if (remainingWaypointsRouteVersionBuilder_ == null) { + return remainingWaypointsRouteVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : remainingWaypointsRouteVersion_; + } else { + return remainingWaypointsRouteVersionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Indicates the last time the
+     * `remaining_waypoints.path_to_waypoint` and
+     * `remaining_waypoints.traffic_to_waypoint` were modified. Your client app
+     * should cache this value and pass it in `GetTripRequest` to ensure the
+     * paths and traffic for `remaining_waypoints` are only returned if updated.
+     * 
+ * + * + * .google.protobuf.Timestamp remaining_waypoints_route_version = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRemainingWaypointsRouteVersion(com.google.protobuf.Timestamp value) { + if (remainingWaypointsRouteVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + remainingWaypointsRouteVersion_ = value; + } else { + remainingWaypointsRouteVersionBuilder_.setMessage(value); + } + bitField0_ |= 0x10000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Indicates the last time the
+     * `remaining_waypoints.path_to_waypoint` and
+     * `remaining_waypoints.traffic_to_waypoint` were modified. Your client app
+     * should cache this value and pass it in `GetTripRequest` to ensure the
+     * paths and traffic for `remaining_waypoints` are only returned if updated.
+     * 
+ * + * + * .google.protobuf.Timestamp remaining_waypoints_route_version = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRemainingWaypointsRouteVersion( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (remainingWaypointsRouteVersionBuilder_ == null) { + remainingWaypointsRouteVersion_ = builderForValue.build(); + } else { + remainingWaypointsRouteVersionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x10000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Indicates the last time the
+     * `remaining_waypoints.path_to_waypoint` and
+     * `remaining_waypoints.traffic_to_waypoint` were modified. Your client app
+     * should cache this value and pass it in `GetTripRequest` to ensure the
+     * paths and traffic for `remaining_waypoints` are only returned if updated.
+     * 
+ * + * + * .google.protobuf.Timestamp remaining_waypoints_route_version = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeRemainingWaypointsRouteVersion(com.google.protobuf.Timestamp value) { + if (remainingWaypointsRouteVersionBuilder_ == null) { + if (((bitField0_ & 0x10000000) != 0) + && remainingWaypointsRouteVersion_ != null + && remainingWaypointsRouteVersion_ + != com.google.protobuf.Timestamp.getDefaultInstance()) { + getRemainingWaypointsRouteVersionBuilder().mergeFrom(value); + } else { + remainingWaypointsRouteVersion_ = value; + } + } else { + remainingWaypointsRouteVersionBuilder_.mergeFrom(value); + } + if (remainingWaypointsRouteVersion_ != null) { + bitField0_ |= 0x10000000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Indicates the last time the
+     * `remaining_waypoints.path_to_waypoint` and
+     * `remaining_waypoints.traffic_to_waypoint` were modified. Your client app
+     * should cache this value and pass it in `GetTripRequest` to ensure the
+     * paths and traffic for `remaining_waypoints` are only returned if updated.
+     * 
+ * + * + * .google.protobuf.Timestamp remaining_waypoints_route_version = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearRemainingWaypointsRouteVersion() { + bitField0_ = (bitField0_ & ~0x10000000); + remainingWaypointsRouteVersion_ = null; + if (remainingWaypointsRouteVersionBuilder_ != null) { + remainingWaypointsRouteVersionBuilder_.dispose(); + remainingWaypointsRouteVersionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Indicates the last time the
+     * `remaining_waypoints.path_to_waypoint` and
+     * `remaining_waypoints.traffic_to_waypoint` were modified. Your client app
+     * should cache this value and pass it in `GetTripRequest` to ensure the
+     * paths and traffic for `remaining_waypoints` are only returned if updated.
+     * 
+ * + * + * .google.protobuf.Timestamp remaining_waypoints_route_version = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getRemainingWaypointsRouteVersionBuilder() { + bitField0_ |= 0x10000000; + onChanged(); + return getRemainingWaypointsRouteVersionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Indicates the last time the
+     * `remaining_waypoints.path_to_waypoint` and
+     * `remaining_waypoints.traffic_to_waypoint` were modified. Your client app
+     * should cache this value and pass it in `GetTripRequest` to ensure the
+     * paths and traffic for `remaining_waypoints` are only returned if updated.
+     * 
+ * + * + * .google.protobuf.Timestamp remaining_waypoints_route_version = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getRemainingWaypointsRouteVersionOrBuilder() { + if (remainingWaypointsRouteVersionBuilder_ != null) { + return remainingWaypointsRouteVersionBuilder_.getMessageOrBuilder(); + } else { + return remainingWaypointsRouteVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : remainingWaypointsRouteVersion_; + } + } + /** + * + * + *
+     * Output only. Indicates the last time the
+     * `remaining_waypoints.path_to_waypoint` and
+     * `remaining_waypoints.traffic_to_waypoint` were modified. Your client app
+     * should cache this value and pass it in `GetTripRequest` to ensure the
+     * paths and traffic for `remaining_waypoints` are only returned if updated.
+     * 
+ * + * + * .google.protobuf.Timestamp remaining_waypoints_route_version = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getRemainingWaypointsRouteVersionFieldBuilder() { + if (remainingWaypointsRouteVersionBuilder_ == null) { + remainingWaypointsRouteVersionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getRemainingWaypointsRouteVersion(), getParentForChildren(), isClean()); + remainingWaypointsRouteVersion_ = null; + } + return remainingWaypointsRouteVersionBuilder_; + } + + private int numberOfPassengers_; + /** + * + * + *
+     * Immutable. Indicates the number of passengers on this trip and does not
+     * include the driver. A vehicle must have available capacity to be returned
+     * in a `SearchVehicles` response.
+     * 
+ * + * int32 number_of_passengers = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The numberOfPassengers. + */ + @java.lang.Override + public int getNumberOfPassengers() { + return numberOfPassengers_; + } + /** + * + * + *
+     * Immutable. Indicates the number of passengers on this trip and does not
+     * include the driver. A vehicle must have available capacity to be returned
+     * in a `SearchVehicles` response.
+     * 
+ * + * int32 number_of_passengers = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The numberOfPassengers to set. + * @return This builder for chaining. + */ + public Builder setNumberOfPassengers(int value) { + + numberOfPassengers_ = value; + bitField0_ |= 0x20000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Indicates the number of passengers on this trip and does not
+     * include the driver. A vehicle must have available capacity to be returned
+     * in a `SearchVehicles` response.
+     * 
+ * + * int32 number_of_passengers = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearNumberOfPassengers() { + bitField0_ = (bitField0_ & ~0x20000000); + numberOfPassengers_ = 0; + onChanged(); + return this; + } + + private com.google.maps.fleetengine.v1.VehicleLocation lastLocation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.VehicleLocation, + com.google.maps.fleetengine.v1.VehicleLocation.Builder, + com.google.maps.fleetengine.v1.VehicleLocationOrBuilder> + lastLocationBuilder_; + /** + * + * + *
+     * Output only. Indicates the last reported location of the vehicle along the
+     * route.
+     * 
+ * + * + * .maps.fleetengine.v1.VehicleLocation last_location = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastLocation field is set. + */ + public boolean hasLastLocation() { + return ((bitField0_ & 0x40000000) != 0); + } + /** + * + * + *
+     * Output only. Indicates the last reported location of the vehicle along the
+     * route.
+     * 
+ * + * + * .maps.fleetengine.v1.VehicleLocation last_location = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastLocation. + */ + public com.google.maps.fleetengine.v1.VehicleLocation getLastLocation() { + if (lastLocationBuilder_ == null) { + return lastLocation_ == null + ? com.google.maps.fleetengine.v1.VehicleLocation.getDefaultInstance() + : lastLocation_; + } else { + return lastLocationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Indicates the last reported location of the vehicle along the
+     * route.
+     * 
+ * + * + * .maps.fleetengine.v1.VehicleLocation last_location = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastLocation(com.google.maps.fleetengine.v1.VehicleLocation value) { + if (lastLocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastLocation_ = value; + } else { + lastLocationBuilder_.setMessage(value); + } + bitField0_ |= 0x40000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Indicates the last reported location of the vehicle along the
+     * route.
+     * 
+ * + * + * .maps.fleetengine.v1.VehicleLocation last_location = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastLocation( + com.google.maps.fleetengine.v1.VehicleLocation.Builder builderForValue) { + if (lastLocationBuilder_ == null) { + lastLocation_ = builderForValue.build(); + } else { + lastLocationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x40000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Indicates the last reported location of the vehicle along the
+     * route.
+     * 
+ * + * + * .maps.fleetengine.v1.VehicleLocation last_location = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeLastLocation(com.google.maps.fleetengine.v1.VehicleLocation value) { + if (lastLocationBuilder_ == null) { + if (((bitField0_ & 0x40000000) != 0) + && lastLocation_ != null + && lastLocation_ + != com.google.maps.fleetengine.v1.VehicleLocation.getDefaultInstance()) { + getLastLocationBuilder().mergeFrom(value); + } else { + lastLocation_ = value; + } + } else { + lastLocationBuilder_.mergeFrom(value); + } + if (lastLocation_ != null) { + bitField0_ |= 0x40000000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Indicates the last reported location of the vehicle along the
+     * route.
+     * 
+ * + * + * .maps.fleetengine.v1.VehicleLocation last_location = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearLastLocation() { + bitField0_ = (bitField0_ & ~0x40000000); + lastLocation_ = null; + if (lastLocationBuilder_ != null) { + lastLocationBuilder_.dispose(); + lastLocationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Indicates the last reported location of the vehicle along the
+     * route.
+     * 
+ * + * + * .maps.fleetengine.v1.VehicleLocation last_location = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.maps.fleetengine.v1.VehicleLocation.Builder getLastLocationBuilder() { + bitField0_ |= 0x40000000; + onChanged(); + return getLastLocationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Indicates the last reported location of the vehicle along the
+     * route.
+     * 
+ * + * + * .maps.fleetengine.v1.VehicleLocation last_location = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.maps.fleetengine.v1.VehicleLocationOrBuilder getLastLocationOrBuilder() { + if (lastLocationBuilder_ != null) { + return lastLocationBuilder_.getMessageOrBuilder(); + } else { + return lastLocation_ == null + ? com.google.maps.fleetengine.v1.VehicleLocation.getDefaultInstance() + : lastLocation_; + } + } + /** + * + * + *
+     * Output only. Indicates the last reported location of the vehicle along the
+     * route.
+     * 
+ * + * + * .maps.fleetengine.v1.VehicleLocation last_location = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.VehicleLocation, + com.google.maps.fleetengine.v1.VehicleLocation.Builder, + com.google.maps.fleetengine.v1.VehicleLocationOrBuilder> + getLastLocationFieldBuilder() { + if (lastLocationBuilder_ == null) { + lastLocationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.VehicleLocation, + com.google.maps.fleetengine.v1.VehicleLocation.Builder, + com.google.maps.fleetengine.v1.VehicleLocationOrBuilder>( + getLastLocation(), getParentForChildren(), isClean()); + lastLocation_ = null; + } + return lastLocationBuilder_; + } + + private boolean lastLocationSnappable_; + /** + * + * + *
+     * Output only. Indicates whether the vehicle's `last_location` can be snapped
+     * to the current_route_segment. False if `last_location` or
+     * `current_route_segment` doesn't exist.
+     * It is computed by Fleet Engine. Any update from clients will be ignored.
+     * 
+ * + * bool last_location_snappable = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The lastLocationSnappable. + */ + @java.lang.Override + public boolean getLastLocationSnappable() { + return lastLocationSnappable_; + } + /** + * + * + *
+     * Output only. Indicates whether the vehicle's `last_location` can be snapped
+     * to the current_route_segment. False if `last_location` or
+     * `current_route_segment` doesn't exist.
+     * It is computed by Fleet Engine. Any update from clients will be ignored.
+     * 
+ * + * bool last_location_snappable = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The lastLocationSnappable to set. + * @return This builder for chaining. + */ + public Builder setLastLocationSnappable(boolean value) { + + lastLocationSnappable_ = value; + bitField0_ |= 0x80000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Indicates whether the vehicle's `last_location` can be snapped
+     * to the current_route_segment. False if `last_location` or
+     * `current_route_segment` doesn't exist.
+     * It is computed by Fleet Engine. Any update from clients will be ignored.
+     * 
+ * + * bool last_location_snappable = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearLastLocationSnappable() { + bitField0_ = (bitField0_ & ~0x80000000); + lastLocationSnappable_ = false; + onChanged(); + return this; + } + + private int view_ = 0; + /** + * + * + *
+     * The subset of Trip fields that are populated and how they should be
+     * interpreted.
+     * 
+ * + * .maps.fleetengine.v1.TripView view = 31; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+     * The subset of Trip fields that are populated and how they should be
+     * interpreted.
+     * 
+ * + * .maps.fleetengine.v1.TripView view = 31; + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + view_ = value; + bitField1_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The subset of Trip fields that are populated and how they should be
+     * interpreted.
+     * 
+ * + * .maps.fleetengine.v1.TripView view = 31; + * + * @return The view. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TripView getView() { + com.google.maps.fleetengine.v1.TripView result = + com.google.maps.fleetengine.v1.TripView.forNumber(view_); + return result == null ? com.google.maps.fleetengine.v1.TripView.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The subset of Trip fields that are populated and how they should be
+     * interpreted.
+     * 
+ * + * .maps.fleetengine.v1.TripView view = 31; + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView(com.google.maps.fleetengine.v1.TripView value) { + if (value == null) { + throw new NullPointerException(); + } + bitField1_ |= 0x00000001; + view_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The subset of Trip fields that are populated and how they should be
+     * interpreted.
+     * 
+ * + * .maps.fleetengine.v1.TripView view = 31; + * + * @return This builder for chaining. + */ + public Builder clearView() { + bitField1_ = (bitField1_ & ~0x00000001); + view_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:maps.fleetengine.v1.Trip) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.v1.Trip) + private static final com.google.maps.fleetengine.v1.Trip DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.fleetengine.v1.Trip(); + } + + public static com.google.maps.fleetengine.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.fleetengine.v1.Trip getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TripApi.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TripApi.java new file mode 100644 index 000000000000..0f02fe2d6f66 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TripApi.java @@ -0,0 +1,249 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/trip_api.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public final class TripApi { + private TripApi() {} + + 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_maps_fleetengine_v1_CreateTripRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_v1_CreateTripRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_v1_GetTripRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_v1_GetTripRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_v1_ReportBillableTripRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_v1_ReportBillableTripRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_v1_UpdateTripRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_v1_UpdateTripRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_v1_SearchTripsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_v1_SearchTripsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_v1_SearchTripsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_v1_SearchTripsResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n)google/maps/fleetengine/v1/trip_api.pr" + + "oto\022\023maps.fleetengine.v1\032\034google/api/ann" + + "otations.proto\032\027google/api/client.proto\032" + + "\037google/api/field_behavior.proto\032\031google" + + "/api/resource.proto\032\030google/api/routing." + + "proto\032,google/maps/fleetengine/v1/fleete" + + "ngine.proto\032\'google/maps/fleetengine/v1/" + + "header.proto\032&google/maps/fleetengine/v1" + + "/trips.proto\032\036google/protobuf/duration.p" + + "roto\032\033google/protobuf/empty.proto\032 googl" + + "e/protobuf/field_mask.proto\032\037google/prot" + + "obuf/timestamp.proto\"\304\001\n\021CreateTripReque" + + "st\0222\n\006header\030\001 \001(\0132\".maps.fleetengine.v1" + + ".RequestHeader\0227\n\006parent\030\003 \001(\tB\'\340A\002\372A!\n\037" + + "fleetengine.googleapis.com/Trip\022\024\n\007trip_" + + "id\030\005 \001(\tB\003\340A\002\022,\n\004trip\030\004 \001(\0132\031.maps.fleet" + + "engine.v1.TripB\003\340A\002\"\202\004\n\016GetTripRequest\0222" + + "\n\006header\030\001 \001(\0132\".maps.fleetengine.v1.Req" + + "uestHeader\0225\n\004name\030\003 \001(\tB\'\340A\002\372A!\n\037fleete" + + "ngine.googleapis.com/Trip\022+\n\004view\030\013 \001(\0162" + + "\035.maps.fleetengine.v1.TripView\022A\n\035curren" + + "t_route_segment_version\030\006 \001(\0132\032.google.p" + + "rotobuf.Timestamp\022?\n\033remaining_waypoints" + + "_version\030\007 \001(\0132\032.google.protobuf.Timesta" + + "mp\022B\n\021route_format_type\030\010 \001(\0162\'.maps.fle" + + "etengine.v1.PolylineFormatType\022I\n%curren" + + "t_route_segment_traffic_version\030\t \001(\0132\032." + + "google.protobuf.Timestamp\022E\n!remaining_w" + + "aypoints_route_version\030\n \001(\0132\032.google.pr" + + "otobuf.Timestamp\"\315\002\n\031ReportBillableTripR" + + "equest\022\021\n\004name\030\002 \001(\tB\003\340A\002\022\031\n\014country_cod" + + "e\030\003 \001(\tB\003\340A\002\022@\n\010platform\030\005 \001(\0162..maps.fl" + + "eetengine.v1.BillingPlatformIdentifier\022\023" + + "\n\013related_ids\030\006 \003(\t\022R\n\rsolution_type\030\007 \001" + + "(\0162;.maps.fleetengine.v1.ReportBillableT" + + "ripRequest.SolutionType\"W\n\014SolutionType\022" + + "\035\n\031SOLUTION_TYPE_UNSPECIFIED\020\000\022(\n$ON_DEM" + + "AND_RIDESHARING_AND_DELIVERIES\020\001\"\276\001\n\021Upd" + + "ateTripRequest\0222\n\006header\030\001 \001(\0132\".maps.fl" + + "eetengine.v1.RequestHeader\022\021\n\004name\030\003 \001(\t" + + "B\003\340A\002\022,\n\004trip\030\004 \001(\0132\031.maps.fleetengine.v" + + "1.TripB\003\340A\002\0224\n\013update_mask\030\005 \001(\0132\032.googl" + + "e.protobuf.FieldMaskB\003\340A\002\"\351\001\n\022SearchTrip" + + "sRequest\0222\n\006header\030\001 \001(\0132\".maps.fleeteng" + + "ine.v1.RequestHeader\022\023\n\006parent\030\003 \001(\tB\003\340A" + + "\002\022\022\n\nvehicle_id\030\004 \001(\t\022\031\n\021active_trips_on" + + "ly\030\005 \001(\010\022\021\n\tpage_size\030\006 \001(\005\022\022\n\npage_toke" + + "n\030\007 \001(\t\0224\n\021minimum_staleness\030\010 \001(\0132\031.goo" + + "gle.protobuf.Duration\"X\n\023SearchTripsResp" + + "onse\022(\n\005trips\030\001 \003(\0132\031.maps.fleetengine.v" + + "1.Trip\022\027\n\017next_page_token\030\002 \001(\t2\320\007\n\013Trip" + + "Service\022\250\001\n\nCreateTrip\022&.maps.fleetengin" + + "e.v1.CreateTripRequest\032\031.maps.fleetengin" + + "e.v1.Trip\"W\202\323\344\223\002&\"\036/v1/{parent=providers" + + "/*}/trips:\004trip\212\323\344\223\002%\022#\n\006parent\022\031{provid" + + "er_id=providers/*}\022\232\001\n\007GetTrip\022#.maps.fl" + + "eetengine.v1.GetTripRequest\032\031.maps.fleet" + + "engine.v1.Trip\"O\202\323\344\223\002 \022\036/v1/{name=provid" + + "ers/*/trips/*}\212\323\344\223\002#\022!\n\004name\022\031{provider_" + + "id=providers/*}\022\277\001\n\022ReportBillableTrip\022." + + ".maps.fleetengine.v1.ReportBillableTripR" + + "equest\032\026.google.protobuf.Empty\"a\202\323\344\223\0022\"-" + + "/v1/{name=providers/*/billableTrips/*}:r" + + "eport:\001*\212\323\344\223\002#\022!\n\004name\022\031{provider_id=pro" + + "viders/*}\022\275\001\n\013SearchTrips\022\'.maps.fleeten" + + "gine.v1.SearchTripsRequest\032(.maps.fleete" + + "ngine.v1.SearchTripsResponse\"[\202\323\344\223\002*\"%/v" + + "1/{parent=providers/*}/trips:search:\001*\212\323" + + "\344\223\002%\022#\n\006parent\022\031{provider_id=providers/*" + + "}\022\246\001\n\nUpdateTrip\022&.maps.fleetengine.v1.U" + + "pdateTripRequest\032\031.maps.fleetengine.v1.T" + + "rip\"U\202\323\344\223\002&\032\036/v1/{name=providers/*/trips" + + "/*}:\004trip\212\323\344\223\002#\022!\n\004name\022\031{provider_id=pr" + + "oviders/*}\032N\312A\032fleetengine.googleapis.co" + + "m\322A.https://www.googleapis.com/auth/clou" + + "d-platformB\323\001\n\036com.google.maps.fleetengi" + + "ne.v1B\007TripApiP\001ZFcloud.google.com/go/ma" + + "ps/fleetengine/apiv1/fleetenginepb;fleet" + + "enginepb\242\002\003CFE\252\002\032Google.Maps.FleetEngine" + + ".V1\312\002\032Google\\Maps\\FleetEngine\\V1\352\002\035Googl" + + "e::Maps::FleetEngine::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.api.RoutingProto.getDescriptor(), + com.google.maps.fleetengine.v1.FleetEngine.getDescriptor(), + com.google.maps.fleetengine.v1.Headers.getDescriptor(), + com.google.maps.fleetengine.v1.Trips.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_maps_fleetengine_v1_CreateTripRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_maps_fleetengine_v1_CreateTripRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_v1_CreateTripRequest_descriptor, + new java.lang.String[] { + "Header", "Parent", "TripId", "Trip", + }); + internal_static_maps_fleetengine_v1_GetTripRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_maps_fleetengine_v1_GetTripRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_v1_GetTripRequest_descriptor, + new java.lang.String[] { + "Header", + "Name", + "View", + "CurrentRouteSegmentVersion", + "RemainingWaypointsVersion", + "RouteFormatType", + "CurrentRouteSegmentTrafficVersion", + "RemainingWaypointsRouteVersion", + }); + internal_static_maps_fleetengine_v1_ReportBillableTripRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_maps_fleetengine_v1_ReportBillableTripRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_v1_ReportBillableTripRequest_descriptor, + new java.lang.String[] { + "Name", "CountryCode", "Platform", "RelatedIds", "SolutionType", + }); + internal_static_maps_fleetengine_v1_UpdateTripRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_maps_fleetengine_v1_UpdateTripRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_v1_UpdateTripRequest_descriptor, + new java.lang.String[] { + "Header", "Name", "Trip", "UpdateMask", + }); + internal_static_maps_fleetengine_v1_SearchTripsRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_maps_fleetengine_v1_SearchTripsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_v1_SearchTripsRequest_descriptor, + new java.lang.String[] { + "Header", + "Parent", + "VehicleId", + "ActiveTripsOnly", + "PageSize", + "PageToken", + "MinimumStaleness", + }); + internal_static_maps_fleetengine_v1_SearchTripsResponse_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_maps_fleetengine_v1_SearchTripsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_v1_SearchTripsResponse_descriptor, + new java.lang.String[] { + "Trips", "NextPageToken", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.api.RoutingProto.routing); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.api.RoutingProto.getDescriptor(); + com.google.maps.fleetengine.v1.FleetEngine.getDescriptor(); + com.google.maps.fleetengine.v1.Headers.getDescriptor(); + com.google.maps.fleetengine.v1.Trips.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TripName.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TripName.java new file mode 100644 index 000000000000..ef7d3c2faa85 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TripName.java @@ -0,0 +1,191 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.fleetengine.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 PROVIDER_TRIP = + PathTemplate.createWithoutUrlEncoding("providers/{provider}/trips/{trip}"); + private volatile Map fieldValuesMap; + private final String provider; + private final String trip; + + @Deprecated + protected TripName() { + provider = null; + trip = null; + } + + private TripName(Builder builder) { + provider = Preconditions.checkNotNull(builder.getProvider()); + trip = Preconditions.checkNotNull(builder.getTrip()); + } + + public String getProvider() { + return provider; + } + + public String getTrip() { + return trip; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static TripName of(String provider, String trip) { + return newBuilder().setProvider(provider).setTrip(trip).build(); + } + + public static String format(String provider, String trip) { + return newBuilder().setProvider(provider).setTrip(trip).build().toString(); + } + + public static TripName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROVIDER_TRIP.validatedMatch( + formattedString, "TripName.parse: formattedString not in valid format"); + return of(matchMap.get("provider"), 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 PROVIDER_TRIP.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (provider != null) { + fieldMapBuilder.put("provider", provider); + } + 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 PROVIDER_TRIP.instantiate("provider", provider, "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.provider, that.provider) && Objects.equals(this.trip, that.trip); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(provider); + h *= 1000003; + h ^= Objects.hashCode(trip); + return h; + } + + /** Builder for providers/{provider}/trips/{trip}. */ + public static class Builder { + private String provider; + private String trip; + + protected Builder() {} + + public String getProvider() { + return provider; + } + + public String getTrip() { + return trip; + } + + public Builder setProvider(String provider) { + this.provider = provider; + return this; + } + + public Builder setTrip(String trip) { + this.trip = trip; + return this; + } + + private Builder(TripName tripName) { + this.provider = tripName.provider; + this.trip = tripName.trip; + } + + public TripName build() { + return new TripName(this); + } + } +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TripOrBuilder.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TripOrBuilder.java new file mode 100644 index 000000000000..059c95aaf3ca --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TripOrBuilder.java @@ -0,0 +1,1486 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/trips.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public interface TripOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.v1.Trip) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. In the format "providers/{provider}/trips/{trip}"
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. In the format "providers/{provider}/trips/{trip}"
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * ID of the vehicle making this trip.
+   * 
+ * + * string vehicle_id = 2; + * + * @return The vehicleId. + */ + java.lang.String getVehicleId(); + /** + * + * + *
+   * ID of the vehicle making this trip.
+   * 
+ * + * string vehicle_id = 2; + * + * @return The bytes for vehicleId. + */ + com.google.protobuf.ByteString getVehicleIdBytes(); + + /** + * + * + *
+   * Current status of the trip.
+   * 
+ * + * .maps.fleetengine.v1.TripStatus trip_status = 3; + * + * @return The enum numeric value on the wire for tripStatus. + */ + int getTripStatusValue(); + /** + * + * + *
+   * Current status of the trip.
+   * 
+ * + * .maps.fleetengine.v1.TripStatus trip_status = 3; + * + * @return The tripStatus. + */ + com.google.maps.fleetengine.v1.TripStatus getTripStatus(); + + /** + * + * + *
+   * The type of the trip.
+   * 
+ * + * .maps.fleetengine.v1.TripType trip_type = 4; + * + * @return The enum numeric value on the wire for tripType. + */ + int getTripTypeValue(); + /** + * + * + *
+   * The type of the trip.
+   * 
+ * + * .maps.fleetengine.v1.TripType trip_type = 4; + * + * @return The tripType. + */ + com.google.maps.fleetengine.v1.TripType getTripType(); + + /** + * + * + *
+   * Location where customer indicates they will be picked up.
+   * 
+ * + * .maps.fleetengine.v1.TerminalLocation pickup_point = 5; + * + * @return Whether the pickupPoint field is set. + */ + boolean hasPickupPoint(); + /** + * + * + *
+   * Location where customer indicates they will be picked up.
+   * 
+ * + * .maps.fleetengine.v1.TerminalLocation pickup_point = 5; + * + * @return The pickupPoint. + */ + com.google.maps.fleetengine.v1.TerminalLocation getPickupPoint(); + /** + * + * + *
+   * Location where customer indicates they will be picked up.
+   * 
+ * + * .maps.fleetengine.v1.TerminalLocation pickup_point = 5; + */ + com.google.maps.fleetengine.v1.TerminalLocationOrBuilder getPickupPointOrBuilder(); + + /** + * + * + *
+   * Input only. The actual location when and where customer was picked up.
+   * This field is for provider to provide feedback on actual pickup
+   * information.
+   * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_pickup_point = 22 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the actualPickupPoint field is set. + */ + boolean hasActualPickupPoint(); + /** + * + * + *
+   * Input only. The actual location when and where customer was picked up.
+   * This field is for provider to provide feedback on actual pickup
+   * information.
+   * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_pickup_point = 22 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The actualPickupPoint. + */ + com.google.maps.fleetengine.v1.StopLocation getActualPickupPoint(); + /** + * + * + *
+   * Input only. The actual location when and where customer was picked up.
+   * This field is for provider to provide feedback on actual pickup
+   * information.
+   * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_pickup_point = 22 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + com.google.maps.fleetengine.v1.StopLocationOrBuilder getActualPickupPointOrBuilder(); + + /** + * + * + *
+   * Input only. The actual time and location of the driver arrival at
+   * the pickup point.
+   * This field is for provider to provide feedback on actual arrival
+   * information at the pickup point.
+   * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_pickup_arrival_point = 32 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the actualPickupArrivalPoint field is set. + */ + boolean hasActualPickupArrivalPoint(); + /** + * + * + *
+   * Input only. The actual time and location of the driver arrival at
+   * the pickup point.
+   * This field is for provider to provide feedback on actual arrival
+   * information at the pickup point.
+   * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_pickup_arrival_point = 32 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The actualPickupArrivalPoint. + */ + com.google.maps.fleetengine.v1.StopLocation getActualPickupArrivalPoint(); + /** + * + * + *
+   * Input only. The actual time and location of the driver arrival at
+   * the pickup point.
+   * This field is for provider to provide feedback on actual arrival
+   * information at the pickup point.
+   * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_pickup_arrival_point = 32 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + com.google.maps.fleetengine.v1.StopLocationOrBuilder getActualPickupArrivalPointOrBuilder(); + + /** + * + * + *
+   * Output only. Either the estimated future time when the rider(s) will be
+   * picked up, or the actual time when they were picked up.
+   * 
+ * + * .google.protobuf.Timestamp pickup_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the pickupTime field is set. + */ + boolean hasPickupTime(); + /** + * + * + *
+   * Output only. Either the estimated future time when the rider(s) will be
+   * picked up, or the actual time when they were picked up.
+   * 
+ * + * .google.protobuf.Timestamp pickup_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The pickupTime. + */ + com.google.protobuf.Timestamp getPickupTime(); + /** + * + * + *
+   * Output only. Either the estimated future time when the rider(s) will be
+   * picked up, or the actual time when they were picked up.
+   * 
+ * + * .google.protobuf.Timestamp pickup_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getPickupTimeOrBuilder(); + + /** + * + * + *
+   * Intermediate stops in order that the trip requests (in addition
+   * to pickup and dropoff). Initially this will not be supported for shared
+   * trips.
+   * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation intermediate_destinations = 14; + */ + java.util.List getIntermediateDestinationsList(); + /** + * + * + *
+   * Intermediate stops in order that the trip requests (in addition
+   * to pickup and dropoff). Initially this will not be supported for shared
+   * trips.
+   * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation intermediate_destinations = 14; + */ + com.google.maps.fleetengine.v1.TerminalLocation getIntermediateDestinations(int index); + /** + * + * + *
+   * Intermediate stops in order that the trip requests (in addition
+   * to pickup and dropoff). Initially this will not be supported for shared
+   * trips.
+   * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation intermediate_destinations = 14; + */ + int getIntermediateDestinationsCount(); + /** + * + * + *
+   * Intermediate stops in order that the trip requests (in addition
+   * to pickup and dropoff). Initially this will not be supported for shared
+   * trips.
+   * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation intermediate_destinations = 14; + */ + java.util.List + getIntermediateDestinationsOrBuilderList(); + /** + * + * + *
+   * Intermediate stops in order that the trip requests (in addition
+   * to pickup and dropoff). Initially this will not be supported for shared
+   * trips.
+   * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation intermediate_destinations = 14; + */ + com.google.maps.fleetengine.v1.TerminalLocationOrBuilder getIntermediateDestinationsOrBuilder( + int index); + + /** + * + * + *
+   * Indicates the last time the `intermediate_destinations` was modified.
+   * Your server should cache this value and pass it in `UpdateTripRequest`
+   * when update `intermediate_destination_index` to ensure the
+   * `intermediate_destinations` is not changed.
+   * 
+ * + * .google.protobuf.Timestamp intermediate_destinations_version = 25; + * + * @return Whether the intermediateDestinationsVersion field is set. + */ + boolean hasIntermediateDestinationsVersion(); + /** + * + * + *
+   * Indicates the last time the `intermediate_destinations` was modified.
+   * Your server should cache this value and pass it in `UpdateTripRequest`
+   * when update `intermediate_destination_index` to ensure the
+   * `intermediate_destinations` is not changed.
+   * 
+ * + * .google.protobuf.Timestamp intermediate_destinations_version = 25; + * + * @return The intermediateDestinationsVersion. + */ + com.google.protobuf.Timestamp getIntermediateDestinationsVersion(); + /** + * + * + *
+   * Indicates the last time the `intermediate_destinations` was modified.
+   * Your server should cache this value and pass it in `UpdateTripRequest`
+   * when update `intermediate_destination_index` to ensure the
+   * `intermediate_destinations` is not changed.
+   * 
+ * + * .google.protobuf.Timestamp intermediate_destinations_version = 25; + */ + com.google.protobuf.TimestampOrBuilder getIntermediateDestinationsVersionOrBuilder(); + + /** + * + * + *
+   * When `TripStatus` is `ENROUTE_TO_INTERMEDIATE_DESTINATION`, a number
+   * between [0..N-1] indicating which intermediate destination the vehicle will
+   * cross next. When `TripStatus` is `ARRIVED_AT_INTERMEDIATE_DESTINATION`, a
+   * number between [0..N-1] indicating which intermediate destination the
+   * vehicle is at. The provider sets this value. If there are no
+   * `intermediate_destinations`, this field is ignored.
+   * 
+ * + * int32 intermediate_destination_index = 15; + * + * @return The intermediateDestinationIndex. + */ + int getIntermediateDestinationIndex(); + + /** + * + * + *
+   * Input only. The actual time and location of the driver's arrival at
+   * an intermediate destination.
+   * This field is for provider to provide feedback on actual arrival
+   * information at intermediate destinations.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destination_arrival_points = 33 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + java.util.List + getActualIntermediateDestinationArrivalPointsList(); + /** + * + * + *
+   * Input only. The actual time and location of the driver's arrival at
+   * an intermediate destination.
+   * This field is for provider to provide feedback on actual arrival
+   * information at intermediate destinations.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destination_arrival_points = 33 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + com.google.maps.fleetengine.v1.StopLocation getActualIntermediateDestinationArrivalPoints( + int index); + /** + * + * + *
+   * Input only. The actual time and location of the driver's arrival at
+   * an intermediate destination.
+   * This field is for provider to provide feedback on actual arrival
+   * information at intermediate destinations.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destination_arrival_points = 33 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + int getActualIntermediateDestinationArrivalPointsCount(); + /** + * + * + *
+   * Input only. The actual time and location of the driver's arrival at
+   * an intermediate destination.
+   * This field is for provider to provide feedback on actual arrival
+   * information at intermediate destinations.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destination_arrival_points = 33 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + java.util.List + getActualIntermediateDestinationArrivalPointsOrBuilderList(); + /** + * + * + *
+   * Input only. The actual time and location of the driver's arrival at
+   * an intermediate destination.
+   * This field is for provider to provide feedback on actual arrival
+   * information at intermediate destinations.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destination_arrival_points = 33 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + com.google.maps.fleetengine.v1.StopLocationOrBuilder + getActualIntermediateDestinationArrivalPointsOrBuilder(int index); + + /** + * + * + *
+   * Input only. The actual time and location when and where the customer was
+   * picked up from an intermediate destination. This field is for provider to
+   * provide feedback on actual pickup information at intermediate destinations.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destinations = 34 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + java.util.List + getActualIntermediateDestinationsList(); + /** + * + * + *
+   * Input only. The actual time and location when and where the customer was
+   * picked up from an intermediate destination. This field is for provider to
+   * provide feedback on actual pickup information at intermediate destinations.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destinations = 34 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + com.google.maps.fleetengine.v1.StopLocation getActualIntermediateDestinations(int index); + /** + * + * + *
+   * Input only. The actual time and location when and where the customer was
+   * picked up from an intermediate destination. This field is for provider to
+   * provide feedback on actual pickup information at intermediate destinations.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destinations = 34 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + int getActualIntermediateDestinationsCount(); + /** + * + * + *
+   * Input only. The actual time and location when and where the customer was
+   * picked up from an intermediate destination. This field is for provider to
+   * provide feedback on actual pickup information at intermediate destinations.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destinations = 34 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + java.util.List + getActualIntermediateDestinationsOrBuilderList(); + /** + * + * + *
+   * Input only. The actual time and location when and where the customer was
+   * picked up from an intermediate destination. This field is for provider to
+   * provide feedback on actual pickup information at intermediate destinations.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.StopLocation actual_intermediate_destinations = 34 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + com.google.maps.fleetengine.v1.StopLocationOrBuilder getActualIntermediateDestinationsOrBuilder( + int index); + + /** + * + * + *
+   * Location where customer indicates they will be dropped off.
+   * 
+ * + * .maps.fleetengine.v1.TerminalLocation dropoff_point = 7; + * + * @return Whether the dropoffPoint field is set. + */ + boolean hasDropoffPoint(); + /** + * + * + *
+   * Location where customer indicates they will be dropped off.
+   * 
+ * + * .maps.fleetengine.v1.TerminalLocation dropoff_point = 7; + * + * @return The dropoffPoint. + */ + com.google.maps.fleetengine.v1.TerminalLocation getDropoffPoint(); + /** + * + * + *
+   * Location where customer indicates they will be dropped off.
+   * 
+ * + * .maps.fleetengine.v1.TerminalLocation dropoff_point = 7; + */ + com.google.maps.fleetengine.v1.TerminalLocationOrBuilder getDropoffPointOrBuilder(); + + /** + * + * + *
+   * Input only. The actual time and location when and where customer was
+   * dropped off. This field is for provider to provide feedback on actual
+   * dropoff information.
+   * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_dropoff_point = 23 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the actualDropoffPoint field is set. + */ + boolean hasActualDropoffPoint(); + /** + * + * + *
+   * Input only. The actual time and location when and where customer was
+   * dropped off. This field is for provider to provide feedback on actual
+   * dropoff information.
+   * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_dropoff_point = 23 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The actualDropoffPoint. + */ + com.google.maps.fleetengine.v1.StopLocation getActualDropoffPoint(); + /** + * + * + *
+   * Input only. The actual time and location when and where customer was
+   * dropped off. This field is for provider to provide feedback on actual
+   * dropoff information.
+   * 
+ * + * + * .maps.fleetengine.v1.StopLocation actual_dropoff_point = 23 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + com.google.maps.fleetengine.v1.StopLocationOrBuilder getActualDropoffPointOrBuilder(); + + /** + * + * + *
+   * Output only. Either the estimated future time when the rider(s) will be
+   * dropped off at the final destination, or the actual time when they were
+   * dropped off.
+   * 
+ * + * .google.protobuf.Timestamp dropoff_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the dropoffTime field is set. + */ + boolean hasDropoffTime(); + /** + * + * + *
+   * Output only. Either the estimated future time when the rider(s) will be
+   * dropped off at the final destination, or the actual time when they were
+   * dropped off.
+   * 
+ * + * .google.protobuf.Timestamp dropoff_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The dropoffTime. + */ + com.google.protobuf.Timestamp getDropoffTime(); + /** + * + * + *
+   * Output only. Either the estimated future time when the rider(s) will be
+   * dropped off at the final destination, or the actual time when they were
+   * dropped off.
+   * 
+ * + * .google.protobuf.Timestamp dropoff_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getDropoffTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The full path from the current location to the dropoff point,
+   * inclusive. This path could include waypoints from other trips.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.TripWaypoint remaining_waypoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getRemainingWaypointsList(); + /** + * + * + *
+   * Output only. The full path from the current location to the dropoff point,
+   * inclusive. This path could include waypoints from other trips.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.TripWaypoint remaining_waypoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.maps.fleetengine.v1.TripWaypoint getRemainingWaypoints(int index); + /** + * + * + *
+   * Output only. The full path from the current location to the dropoff point,
+   * inclusive. This path could include waypoints from other trips.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.TripWaypoint remaining_waypoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getRemainingWaypointsCount(); + /** + * + * + *
+   * Output only. The full path from the current location to the dropoff point,
+   * inclusive. This path could include waypoints from other trips.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.TripWaypoint remaining_waypoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getRemainingWaypointsOrBuilderList(); + /** + * + * + *
+   * Output only. The full path from the current location to the dropoff point,
+   * inclusive. This path could include waypoints from other trips.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.TripWaypoint remaining_waypoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.maps.fleetengine.v1.TripWaypointOrBuilder getRemainingWaypointsOrBuilder(int index); + + /** + * + * + *
+   * This field supports manual ordering of the waypoints for the trip. It
+   * contains all of the remaining waypoints for the assigned vehicle, as well
+   * as the pickup and drop-off waypoints for this trip. If the trip hasn't been
+   * assigned to a vehicle, then Fleet Engine ignores this field. For privacy
+   * reasons, this field is only populated by the server on `UpdateTrip` and
+   * `CreateTrip` calls, NOT on `GetTrip` calls.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint vehicle_waypoints = 20; + */ + java.util.List getVehicleWaypointsList(); + /** + * + * + *
+   * This field supports manual ordering of the waypoints for the trip. It
+   * contains all of the remaining waypoints for the assigned vehicle, as well
+   * as the pickup and drop-off waypoints for this trip. If the trip hasn't been
+   * assigned to a vehicle, then Fleet Engine ignores this field. For privacy
+   * reasons, this field is only populated by the server on `UpdateTrip` and
+   * `CreateTrip` calls, NOT on `GetTrip` calls.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint vehicle_waypoints = 20; + */ + com.google.maps.fleetengine.v1.TripWaypoint getVehicleWaypoints(int index); + /** + * + * + *
+   * This field supports manual ordering of the waypoints for the trip. It
+   * contains all of the remaining waypoints for the assigned vehicle, as well
+   * as the pickup and drop-off waypoints for this trip. If the trip hasn't been
+   * assigned to a vehicle, then Fleet Engine ignores this field. For privacy
+   * reasons, this field is only populated by the server on `UpdateTrip` and
+   * `CreateTrip` calls, NOT on `GetTrip` calls.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint vehicle_waypoints = 20; + */ + int getVehicleWaypointsCount(); + /** + * + * + *
+   * This field supports manual ordering of the waypoints for the trip. It
+   * contains all of the remaining waypoints for the assigned vehicle, as well
+   * as the pickup and drop-off waypoints for this trip. If the trip hasn't been
+   * assigned to a vehicle, then Fleet Engine ignores this field. For privacy
+   * reasons, this field is only populated by the server on `UpdateTrip` and
+   * `CreateTrip` calls, NOT on `GetTrip` calls.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint vehicle_waypoints = 20; + */ + java.util.List + getVehicleWaypointsOrBuilderList(); + /** + * + * + *
+   * This field supports manual ordering of the waypoints for the trip. It
+   * contains all of the remaining waypoints for the assigned vehicle, as well
+   * as the pickup and drop-off waypoints for this trip. If the trip hasn't been
+   * assigned to a vehicle, then Fleet Engine ignores this field. For privacy
+   * reasons, this field is only populated by the server on `UpdateTrip` and
+   * `CreateTrip` calls, NOT on `GetTrip` calls.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint vehicle_waypoints = 20; + */ + com.google.maps.fleetengine.v1.TripWaypointOrBuilder getVehicleWaypointsOrBuilder(int index); + + /** + * + * + *
+   * Output only. Anticipated route for this trip to the first entry in
+   * remaining_waypoints. Note that the first waypoint may belong to a different
+   * trip.
+   * 
+ * + * repeated .google.type.LatLng route = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getRouteList(); + /** + * + * + *
+   * Output only. Anticipated route for this trip to the first entry in
+   * remaining_waypoints. Note that the first waypoint may belong to a different
+   * trip.
+   * 
+ * + * repeated .google.type.LatLng route = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.type.LatLng getRoute(int index); + /** + * + * + *
+   * Output only. Anticipated route for this trip to the first entry in
+   * remaining_waypoints. Note that the first waypoint may belong to a different
+   * trip.
+   * 
+ * + * repeated .google.type.LatLng route = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getRouteCount(); + /** + * + * + *
+   * Output only. Anticipated route for this trip to the first entry in
+   * remaining_waypoints. Note that the first waypoint may belong to a different
+   * trip.
+   * 
+ * + * repeated .google.type.LatLng route = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getRouteOrBuilderList(); + /** + * + * + *
+   * Output only. Anticipated route for this trip to the first entry in
+   * remaining_waypoints. Note that the first waypoint may belong to a different
+   * trip.
+   * 
+ * + * repeated .google.type.LatLng route = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.type.LatLngOrBuilder getRouteOrBuilder(int index); + + /** + * + * + *
+   * Output only. An encoded path to the next waypoint.
+   *
+   * Note: This field is intended only for use by the Driver SDK and Consumer
+   * SDK. Decoding is not yet supported.
+   * 
+ * + * string current_route_segment = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The currentRouteSegment. + */ + java.lang.String getCurrentRouteSegment(); + /** + * + * + *
+   * Output only. An encoded path to the next waypoint.
+   *
+   * Note: This field is intended only for use by the Driver SDK and Consumer
+   * SDK. Decoding is not yet supported.
+   * 
+ * + * string current_route_segment = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for currentRouteSegment. + */ + com.google.protobuf.ByteString getCurrentRouteSegmentBytes(); + + /** + * + * + *
+   * Output only. Indicates the last time the route was modified.
+   *
+   * Note: This field is intended only for use by the Driver SDK and Consumer
+   * SDK.
+   * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_version = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the currentRouteSegmentVersion field is set. + */ + boolean hasCurrentRouteSegmentVersion(); + /** + * + * + *
+   * Output only. Indicates the last time the route was modified.
+   *
+   * Note: This field is intended only for use by the Driver SDK and Consumer
+   * SDK.
+   * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_version = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The currentRouteSegmentVersion. + */ + com.google.protobuf.Timestamp getCurrentRouteSegmentVersion(); + /** + * + * + *
+   * Output only. Indicates the last time the route was modified.
+   *
+   * Note: This field is intended only for use by the Driver SDK and Consumer
+   * SDK.
+   * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_version = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCurrentRouteSegmentVersionOrBuilder(); + + /** + * + * + *
+   * Output only. Indicates the traffic conditions along the
+   * `current_route_segment` when they're available.
+   *
+   * Note: This field is intended only for use by the Driver SDK and Consumer
+   * SDK.
+   * 
+ * + * + * .maps.fleetengine.v1.ConsumableTrafficPolyline current_route_segment_traffic = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the currentRouteSegmentTraffic field is set. + */ + boolean hasCurrentRouteSegmentTraffic(); + /** + * + * + *
+   * Output only. Indicates the traffic conditions along the
+   * `current_route_segment` when they're available.
+   *
+   * Note: This field is intended only for use by the Driver SDK and Consumer
+   * SDK.
+   * 
+ * + * + * .maps.fleetengine.v1.ConsumableTrafficPolyline current_route_segment_traffic = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The currentRouteSegmentTraffic. + */ + com.google.maps.fleetengine.v1.ConsumableTrafficPolyline getCurrentRouteSegmentTraffic(); + /** + * + * + *
+   * Output only. Indicates the traffic conditions along the
+   * `current_route_segment` when they're available.
+   *
+   * Note: This field is intended only for use by the Driver SDK and Consumer
+   * SDK.
+   * 
+ * + * + * .maps.fleetengine.v1.ConsumableTrafficPolyline current_route_segment_traffic = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.maps.fleetengine.v1.ConsumableTrafficPolylineOrBuilder + getCurrentRouteSegmentTrafficOrBuilder(); + + /** + * + * + *
+   * Output only. Indicates the last time the `current_route_segment_traffic`
+   * was modified.
+   *
+   * Note: This field is intended only for use by the Driver SDK and Consumer
+   * SDK.
+   * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_traffic_version = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the currentRouteSegmentTrafficVersion field is set. + */ + boolean hasCurrentRouteSegmentTrafficVersion(); + /** + * + * + *
+   * Output only. Indicates the last time the `current_route_segment_traffic`
+   * was modified.
+   *
+   * Note: This field is intended only for use by the Driver SDK and Consumer
+   * SDK.
+   * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_traffic_version = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The currentRouteSegmentTrafficVersion. + */ + com.google.protobuf.Timestamp getCurrentRouteSegmentTrafficVersion(); + /** + * + * + *
+   * Output only. Indicates the last time the `current_route_segment_traffic`
+   * was modified.
+   *
+   * Note: This field is intended only for use by the Driver SDK and Consumer
+   * SDK.
+   * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_traffic_version = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCurrentRouteSegmentTrafficVersionOrBuilder(); + + /** + * + * + *
+   * Output only. The waypoint where `current_route_segment` ends.
+   * 
+ * + * + * .maps.fleetengine.v1.TripWaypoint current_route_segment_end_point = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the currentRouteSegmentEndPoint field is set. + */ + boolean hasCurrentRouteSegmentEndPoint(); + /** + * + * + *
+   * Output only. The waypoint where `current_route_segment` ends.
+   * 
+ * + * + * .maps.fleetengine.v1.TripWaypoint current_route_segment_end_point = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The currentRouteSegmentEndPoint. + */ + com.google.maps.fleetengine.v1.TripWaypoint getCurrentRouteSegmentEndPoint(); + /** + * + * + *
+   * Output only. The waypoint where `current_route_segment` ends.
+   * 
+ * + * + * .maps.fleetengine.v1.TripWaypoint current_route_segment_end_point = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.maps.fleetengine.v1.TripWaypointOrBuilder getCurrentRouteSegmentEndPointOrBuilder(); + + /** + * + * + *
+   * Output only. The remaining driving distance in the `current_route_segment`
+   * field. The value is unspecified if the trip is not assigned to a vehicle,
+   * or the trip is completed or cancelled.
+   * 
+ * + * + * .google.protobuf.Int32Value remaining_distance_meters = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the remainingDistanceMeters field is set. + */ + boolean hasRemainingDistanceMeters(); + /** + * + * + *
+   * Output only. The remaining driving distance in the `current_route_segment`
+   * field. The value is unspecified if the trip is not assigned to a vehicle,
+   * or the trip is completed or cancelled.
+   * 
+ * + * + * .google.protobuf.Int32Value remaining_distance_meters = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The remainingDistanceMeters. + */ + com.google.protobuf.Int32Value getRemainingDistanceMeters(); + /** + * + * + *
+   * Output only. The remaining driving distance in the `current_route_segment`
+   * field. The value is unspecified if the trip is not assigned to a vehicle,
+   * or the trip is completed or cancelled.
+   * 
+ * + * + * .google.protobuf.Int32Value remaining_distance_meters = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.Int32ValueOrBuilder getRemainingDistanceMetersOrBuilder(); + + /** + * + * + *
+   * Output only. The ETA to the next waypoint (the first entry in the
+   * `remaining_waypoints` field). The value is unspecified if the trip is not
+   * assigned to a vehicle, or the trip is inactive (completed or cancelled).
+   * 
+ * + * + * .google.protobuf.Timestamp eta_to_first_waypoint = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the etaToFirstWaypoint field is set. + */ + boolean hasEtaToFirstWaypoint(); + /** + * + * + *
+   * Output only. The ETA to the next waypoint (the first entry in the
+   * `remaining_waypoints` field). The value is unspecified if the trip is not
+   * assigned to a vehicle, or the trip is inactive (completed or cancelled).
+   * 
+ * + * + * .google.protobuf.Timestamp eta_to_first_waypoint = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The etaToFirstWaypoint. + */ + com.google.protobuf.Timestamp getEtaToFirstWaypoint(); + /** + * + * + *
+   * Output only. The ETA to the next waypoint (the first entry in the
+   * `remaining_waypoints` field). The value is unspecified if the trip is not
+   * assigned to a vehicle, or the trip is inactive (completed or cancelled).
+   * 
+ * + * + * .google.protobuf.Timestamp eta_to_first_waypoint = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEtaToFirstWaypointOrBuilder(); + + /** + * + * + *
+   * Output only. The duration from when the Trip data is returned to the time
+   * in `Trip.eta_to_first_waypoint`. The value is unspecified if the trip is
+   * not assigned to a vehicle, or the trip is inactive (completed or
+   * cancelled).
+   * 
+ * + * + * .google.protobuf.Duration remaining_time_to_first_waypoint = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the remainingTimeToFirstWaypoint field is set. + */ + boolean hasRemainingTimeToFirstWaypoint(); + /** + * + * + *
+   * Output only. The duration from when the Trip data is returned to the time
+   * in `Trip.eta_to_first_waypoint`. The value is unspecified if the trip is
+   * not assigned to a vehicle, or the trip is inactive (completed or
+   * cancelled).
+   * 
+ * + * + * .google.protobuf.Duration remaining_time_to_first_waypoint = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The remainingTimeToFirstWaypoint. + */ + com.google.protobuf.Duration getRemainingTimeToFirstWaypoint(); + /** + * + * + *
+   * Output only. The duration from when the Trip data is returned to the time
+   * in `Trip.eta_to_first_waypoint`. The value is unspecified if the trip is
+   * not assigned to a vehicle, or the trip is inactive (completed or
+   * cancelled).
+   * 
+ * + * + * .google.protobuf.Duration remaining_time_to_first_waypoint = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.DurationOrBuilder getRemainingTimeToFirstWaypointOrBuilder(); + + /** + * + * + *
+   * Output only. Indicates the last time that `remaining_waypoints` was changed
+   * (a waypoint was added, removed, or changed).
+   * 
+ * + * + * .google.protobuf.Timestamp remaining_waypoints_version = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the remainingWaypointsVersion field is set. + */ + boolean hasRemainingWaypointsVersion(); + /** + * + * + *
+   * Output only. Indicates the last time that `remaining_waypoints` was changed
+   * (a waypoint was added, removed, or changed).
+   * 
+ * + * + * .google.protobuf.Timestamp remaining_waypoints_version = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The remainingWaypointsVersion. + */ + com.google.protobuf.Timestamp getRemainingWaypointsVersion(); + /** + * + * + *
+   * Output only. Indicates the last time that `remaining_waypoints` was changed
+   * (a waypoint was added, removed, or changed).
+   * 
+ * + * + * .google.protobuf.Timestamp remaining_waypoints_version = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getRemainingWaypointsVersionOrBuilder(); + + /** + * + * + *
+   * Output only. Indicates the last time the
+   * `remaining_waypoints.path_to_waypoint` and
+   * `remaining_waypoints.traffic_to_waypoint` were modified. Your client app
+   * should cache this value and pass it in `GetTripRequest` to ensure the
+   * paths and traffic for `remaining_waypoints` are only returned if updated.
+   * 
+ * + * + * .google.protobuf.Timestamp remaining_waypoints_route_version = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the remainingWaypointsRouteVersion field is set. + */ + boolean hasRemainingWaypointsRouteVersion(); + /** + * + * + *
+   * Output only. Indicates the last time the
+   * `remaining_waypoints.path_to_waypoint` and
+   * `remaining_waypoints.traffic_to_waypoint` were modified. Your client app
+   * should cache this value and pass it in `GetTripRequest` to ensure the
+   * paths and traffic for `remaining_waypoints` are only returned if updated.
+   * 
+ * + * + * .google.protobuf.Timestamp remaining_waypoints_route_version = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The remainingWaypointsRouteVersion. + */ + com.google.protobuf.Timestamp getRemainingWaypointsRouteVersion(); + /** + * + * + *
+   * Output only. Indicates the last time the
+   * `remaining_waypoints.path_to_waypoint` and
+   * `remaining_waypoints.traffic_to_waypoint` were modified. Your client app
+   * should cache this value and pass it in `GetTripRequest` to ensure the
+   * paths and traffic for `remaining_waypoints` are only returned if updated.
+   * 
+ * + * + * .google.protobuf.Timestamp remaining_waypoints_route_version = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getRemainingWaypointsRouteVersionOrBuilder(); + + /** + * + * + *
+   * Immutable. Indicates the number of passengers on this trip and does not
+   * include the driver. A vehicle must have available capacity to be returned
+   * in a `SearchVehicles` response.
+   * 
+ * + * int32 number_of_passengers = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The numberOfPassengers. + */ + int getNumberOfPassengers(); + + /** + * + * + *
+   * Output only. Indicates the last reported location of the vehicle along the
+   * route.
+   * 
+ * + * + * .maps.fleetengine.v1.VehicleLocation last_location = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastLocation field is set. + */ + boolean hasLastLocation(); + /** + * + * + *
+   * Output only. Indicates the last reported location of the vehicle along the
+   * route.
+   * 
+ * + * + * .maps.fleetengine.v1.VehicleLocation last_location = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastLocation. + */ + com.google.maps.fleetengine.v1.VehicleLocation getLastLocation(); + /** + * + * + *
+   * Output only. Indicates the last reported location of the vehicle along the
+   * route.
+   * 
+ * + * + * .maps.fleetengine.v1.VehicleLocation last_location = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.maps.fleetengine.v1.VehicleLocationOrBuilder getLastLocationOrBuilder(); + + /** + * + * + *
+   * Output only. Indicates whether the vehicle's `last_location` can be snapped
+   * to the current_route_segment. False if `last_location` or
+   * `current_route_segment` doesn't exist.
+   * It is computed by Fleet Engine. Any update from clients will be ignored.
+   * 
+ * + * bool last_location_snappable = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The lastLocationSnappable. + */ + boolean getLastLocationSnappable(); + + /** + * + * + *
+   * The subset of Trip fields that are populated and how they should be
+   * interpreted.
+   * 
+ * + * .maps.fleetengine.v1.TripView view = 31; + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + /** + * + * + *
+   * The subset of Trip fields that are populated and how they should be
+   * interpreted.
+   * 
+ * + * .maps.fleetengine.v1.TripView view = 31; + * + * @return The view. + */ + com.google.maps.fleetengine.v1.TripView getView(); +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TripStatus.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TripStatus.java new file mode 100644 index 000000000000..8e6cca2f8820 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TripStatus.java @@ -0,0 +1,317 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/trips.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * The status of a trip indicating its progression.
+ * 
+ * + * Protobuf enum {@code maps.fleetengine.v1.TripStatus} + */ +public enum TripStatus implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Default, used for unspecified or unrecognized trip status.
+   * 
+ * + * UNKNOWN_TRIP_STATUS = 0; + */ + UNKNOWN_TRIP_STATUS(0), + /** + * + * + *
+   * Newly created trip.
+   * 
+ * + * NEW = 1; + */ + NEW(1), + /** + * + * + *
+   * The driver is on their way to the pickup point.
+   * 
+ * + * ENROUTE_TO_PICKUP = 2; + */ + ENROUTE_TO_PICKUP(2), + /** + * + * + *
+   * The driver has arrived at the pickup point.
+   * 
+ * + * ARRIVED_AT_PICKUP = 3; + */ + ARRIVED_AT_PICKUP(3), + /** + * + * + *
+   * The driver has arrived at an intermediate destination and is waiting for
+   * the rider.
+   * 
+ * + * ARRIVED_AT_INTERMEDIATE_DESTINATION = 7; + */ + ARRIVED_AT_INTERMEDIATE_DESTINATION(7), + /** + * + * + *
+   * The driver is on their way to an intermediate destination
+   * (not the dropoff point).
+   * 
+ * + * ENROUTE_TO_INTERMEDIATE_DESTINATION = 8; + */ + ENROUTE_TO_INTERMEDIATE_DESTINATION(8), + /** + * + * + *
+   * The driver has picked up the rider and is on their way to the
+   * next destination.
+   * 
+ * + * ENROUTE_TO_DROPOFF = 4; + */ + ENROUTE_TO_DROPOFF(4), + /** + * + * + *
+   * The rider has been dropped off and the trip is complete.
+   * 
+ * + * COMPLETE = 5; + */ + COMPLETE(5), + /** + * + * + *
+   * The trip was canceled prior to pickup by the driver, rider, or
+   * rideshare provider.
+   * 
+ * + * CANCELED = 6; + */ + CANCELED(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Default, used for unspecified or unrecognized trip status.
+   * 
+ * + * UNKNOWN_TRIP_STATUS = 0; + */ + public static final int UNKNOWN_TRIP_STATUS_VALUE = 0; + /** + * + * + *
+   * Newly created trip.
+   * 
+ * + * NEW = 1; + */ + public static final int NEW_VALUE = 1; + /** + * + * + *
+   * The driver is on their way to the pickup point.
+   * 
+ * + * ENROUTE_TO_PICKUP = 2; + */ + public static final int ENROUTE_TO_PICKUP_VALUE = 2; + /** + * + * + *
+   * The driver has arrived at the pickup point.
+   * 
+ * + * ARRIVED_AT_PICKUP = 3; + */ + public static final int ARRIVED_AT_PICKUP_VALUE = 3; + /** + * + * + *
+   * The driver has arrived at an intermediate destination and is waiting for
+   * the rider.
+   * 
+ * + * ARRIVED_AT_INTERMEDIATE_DESTINATION = 7; + */ + public static final int ARRIVED_AT_INTERMEDIATE_DESTINATION_VALUE = 7; + /** + * + * + *
+   * The driver is on their way to an intermediate destination
+   * (not the dropoff point).
+   * 
+ * + * ENROUTE_TO_INTERMEDIATE_DESTINATION = 8; + */ + public static final int ENROUTE_TO_INTERMEDIATE_DESTINATION_VALUE = 8; + /** + * + * + *
+   * The driver has picked up the rider and is on their way to the
+   * next destination.
+   * 
+ * + * ENROUTE_TO_DROPOFF = 4; + */ + public static final int ENROUTE_TO_DROPOFF_VALUE = 4; + /** + * + * + *
+   * The rider has been dropped off and the trip is complete.
+   * 
+ * + * COMPLETE = 5; + */ + public static final int COMPLETE_VALUE = 5; + /** + * + * + *
+   * The trip was canceled prior to pickup by the driver, rider, or
+   * rideshare provider.
+   * 
+ * + * CANCELED = 6; + */ + public static final int CANCELED_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 TripStatus 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 TripStatus forNumber(int value) { + switch (value) { + case 0: + return UNKNOWN_TRIP_STATUS; + case 1: + return NEW; + case 2: + return ENROUTE_TO_PICKUP; + case 3: + return ARRIVED_AT_PICKUP; + case 7: + return ARRIVED_AT_INTERMEDIATE_DESTINATION; + case 8: + return ENROUTE_TO_INTERMEDIATE_DESTINATION; + case 4: + return ENROUTE_TO_DROPOFF; + case 5: + return COMPLETE; + case 6: + return CANCELED; + 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 TripStatus findValueByNumber(int number) { + return TripStatus.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.maps.fleetengine.v1.Trips.getDescriptor().getEnumTypes().get(0); + } + + private static final TripStatus[] VALUES = values(); + + public static TripStatus 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 TripStatus(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:maps.fleetengine.v1.TripStatus) +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TripType.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TripType.java new file mode 100644 index 000000000000..86c79c46fdf2 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TripType.java @@ -0,0 +1,177 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/fleetengine.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * The type of a trip.
+ * 
+ * + * Protobuf enum {@code maps.fleetengine.v1.TripType} + */ +public enum TripType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Default, used for unspecified or unrecognized trip types.
+   * 
+ * + * UNKNOWN_TRIP_TYPE = 0; + */ + UNKNOWN_TRIP_TYPE(0), + /** + * + * + *
+   * The trip may share a vehicle with other trips.
+   * 
+ * + * SHARED = 1; + */ + SHARED(1), + /** + * + * + *
+   * The trip is exclusive to a vehicle.
+   * 
+ * + * EXCLUSIVE = 2; + */ + EXCLUSIVE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Default, used for unspecified or unrecognized trip types.
+   * 
+ * + * UNKNOWN_TRIP_TYPE = 0; + */ + public static final int UNKNOWN_TRIP_TYPE_VALUE = 0; + /** + * + * + *
+   * The trip may share a vehicle with other trips.
+   * 
+ * + * SHARED = 1; + */ + public static final int SHARED_VALUE = 1; + /** + * + * + *
+   * The trip is exclusive to a vehicle.
+   * 
+ * + * EXCLUSIVE = 2; + */ + public static final int EXCLUSIVE_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TripType 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 TripType forNumber(int value) { + switch (value) { + case 0: + return UNKNOWN_TRIP_TYPE; + case 1: + return SHARED; + case 2: + return EXCLUSIVE; + 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 TripType findValueByNumber(int number) { + return TripType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.maps.fleetengine.v1.FleetEngine.getDescriptor().getEnumTypes().get(0); + } + + private static final TripType[] VALUES = values(); + + public static TripType 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 TripType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:maps.fleetengine.v1.TripType) +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TripView.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TripView.java new file mode 100644 index 000000000000..a14441eae102 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TripView.java @@ -0,0 +1,187 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/trips.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * Selector for different sets of Trip fields in a `GetTrip` response.  See
+ * [AIP-157](https://google.aip.dev/157) for context. Additional views are
+ * likely to be added.
+ * 
+ * + * Protobuf enum {@code maps.fleetengine.v1.TripView} + */ +public enum TripView implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * The default value. For backwards-compatibility, the API will default to an
+   * SDK view. To ensure stability and support, customers are
+   * advised to select a `TripView` other than `SDK`.
+   * 
+ * + * TRIP_VIEW_UNSPECIFIED = 0; + */ + TRIP_VIEW_UNSPECIFIED(0), + /** + * + * + *
+   * Includes fields that may not be interpretable or supportable using
+   * publicly available libraries.
+   * 
+ * + * SDK = 1; + */ + SDK(1), + /** + * + * + *
+   * Trip fields are populated for the Journey Sharing use case. This view is
+   * intended for server-to-server communications.
+   * 
+ * + * JOURNEY_SHARING_V1S = 2; + */ + JOURNEY_SHARING_V1S(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * The default value. For backwards-compatibility, the API will default to an
+   * SDK view. To ensure stability and support, customers are
+   * advised to select a `TripView` other than `SDK`.
+   * 
+ * + * TRIP_VIEW_UNSPECIFIED = 0; + */ + public static final int TRIP_VIEW_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Includes fields that may not be interpretable or supportable using
+   * publicly available libraries.
+   * 
+ * + * SDK = 1; + */ + public static final int SDK_VALUE = 1; + /** + * + * + *
+   * Trip fields are populated for the Journey Sharing use case. This view is
+   * intended for server-to-server communications.
+   * 
+ * + * JOURNEY_SHARING_V1S = 2; + */ + public static final int JOURNEY_SHARING_V1S_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TripView 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 TripView forNumber(int value) { + switch (value) { + case 0: + return TRIP_VIEW_UNSPECIFIED; + case 1: + return SDK; + case 2: + return JOURNEY_SHARING_V1S; + 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 TripView findValueByNumber(int number) { + return TripView.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.maps.fleetengine.v1.Trips.getDescriptor().getEnumTypes().get(2); + } + + private static final TripView[] VALUES = values(); + + public static TripView 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 TripView(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:maps.fleetengine.v1.TripView) +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TripWaypoint.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TripWaypoint.java new file mode 100644 index 000000000000..0383fc64fbbd --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TripWaypoint.java @@ -0,0 +1,2898 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/fleetengine.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * Describes a stopping point on a vehicle's route or an ending point on a
+ * vehicle's trip.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.v1.TripWaypoint} + */ +public final class TripWaypoint extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.v1.TripWaypoint) + TripWaypointOrBuilder { + private static final long serialVersionUID = 0L; + // Use TripWaypoint.newBuilder() to construct. + private TripWaypoint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TripWaypoint() { + tripId_ = ""; + waypointType_ = 0; + pathToWaypoint_ = java.util.Collections.emptyList(); + encodedPathToWaypoint_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TripWaypoint(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.FleetEngine + .internal_static_maps_fleetengine_v1_TripWaypoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.FleetEngine + .internal_static_maps_fleetengine_v1_TripWaypoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.TripWaypoint.class, + com.google.maps.fleetengine.v1.TripWaypoint.Builder.class); + } + + private int bitField0_; + public static final int LOCATION_FIELD_NUMBER = 1; + private com.google.maps.fleetengine.v1.TerminalLocation location_; + /** + * + * + *
+   * The location of this waypoint.
+   * 
+ * + * .maps.fleetengine.v1.TerminalLocation location = 1; + * + * @return Whether the location field is set. + */ + @java.lang.Override + public boolean hasLocation() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The location of this waypoint.
+   * 
+ * + * .maps.fleetengine.v1.TerminalLocation location = 1; + * + * @return The location. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TerminalLocation getLocation() { + return location_ == null + ? com.google.maps.fleetengine.v1.TerminalLocation.getDefaultInstance() + : location_; + } + /** + * + * + *
+   * The location of this waypoint.
+   * 
+ * + * .maps.fleetengine.v1.TerminalLocation location = 1; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TerminalLocationOrBuilder getLocationOrBuilder() { + return location_ == null + ? com.google.maps.fleetengine.v1.TerminalLocation.getDefaultInstance() + : location_; + } + + public static final int TRIP_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object tripId_ = ""; + /** + * + * + *
+   * The trip associated with this waypoint.
+   * 
+ * + * string trip_id = 2; + * + * @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; + } + } + /** + * + * + *
+   * The trip associated with this waypoint.
+   * 
+ * + * string trip_id = 2; + * + * @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 WAYPOINT_TYPE_FIELD_NUMBER = 3; + private int waypointType_ = 0; + /** + * + * + *
+   * The role this waypoint plays in this trip, such as pickup or dropoff.
+   * 
+ * + * .maps.fleetengine.v1.WaypointType waypoint_type = 3; + * + * @return The enum numeric value on the wire for waypointType. + */ + @java.lang.Override + public int getWaypointTypeValue() { + return waypointType_; + } + /** + * + * + *
+   * The role this waypoint plays in this trip, such as pickup or dropoff.
+   * 
+ * + * .maps.fleetengine.v1.WaypointType waypoint_type = 3; + * + * @return The waypointType. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.WaypointType getWaypointType() { + com.google.maps.fleetengine.v1.WaypointType result = + com.google.maps.fleetengine.v1.WaypointType.forNumber(waypointType_); + return result == null ? com.google.maps.fleetengine.v1.WaypointType.UNRECOGNIZED : result; + } + + public static final int PATH_TO_WAYPOINT_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List pathToWaypoint_; + /** + * + * + *
+   * The path from the previous waypoint to the current waypoint.  Undefined for
+   * the first waypoint in a list. This field is only populated when requested.
+   * 
+ * + * repeated .google.type.LatLng path_to_waypoint = 4; + */ + @java.lang.Override + public java.util.List getPathToWaypointList() { + return pathToWaypoint_; + } + /** + * + * + *
+   * The path from the previous waypoint to the current waypoint.  Undefined for
+   * the first waypoint in a list. This field is only populated when requested.
+   * 
+ * + * repeated .google.type.LatLng path_to_waypoint = 4; + */ + @java.lang.Override + public java.util.List + getPathToWaypointOrBuilderList() { + return pathToWaypoint_; + } + /** + * + * + *
+   * The path from the previous waypoint to the current waypoint.  Undefined for
+   * the first waypoint in a list. This field is only populated when requested.
+   * 
+ * + * repeated .google.type.LatLng path_to_waypoint = 4; + */ + @java.lang.Override + public int getPathToWaypointCount() { + return pathToWaypoint_.size(); + } + /** + * + * + *
+   * The path from the previous waypoint to the current waypoint.  Undefined for
+   * the first waypoint in a list. This field is only populated when requested.
+   * 
+ * + * repeated .google.type.LatLng path_to_waypoint = 4; + */ + @java.lang.Override + public com.google.type.LatLng getPathToWaypoint(int index) { + return pathToWaypoint_.get(index); + } + /** + * + * + *
+   * The path from the previous waypoint to the current waypoint.  Undefined for
+   * the first waypoint in a list. This field is only populated when requested.
+   * 
+ * + * repeated .google.type.LatLng path_to_waypoint = 4; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getPathToWaypointOrBuilder(int index) { + return pathToWaypoint_.get(index); + } + + public static final int ENCODED_PATH_TO_WAYPOINT_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object encodedPathToWaypoint_ = ""; + /** + * + * + *
+   * The encoded path from the previous waypoint to the current waypoint.
+   *
+   * <p>Note: This field is intended only for use by the Driver SDK and Consumer
+   * SDK. Decoding is not yet supported.
+   * 
+ * + * string encoded_path_to_waypoint = 5; + * + * @return The encodedPathToWaypoint. + */ + @java.lang.Override + public java.lang.String getEncodedPathToWaypoint() { + java.lang.Object ref = encodedPathToWaypoint_; + 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(); + encodedPathToWaypoint_ = s; + return s; + } + } + /** + * + * + *
+   * The encoded path from the previous waypoint to the current waypoint.
+   *
+   * <p>Note: This field is intended only for use by the Driver SDK and Consumer
+   * SDK. Decoding is not yet supported.
+   * 
+ * + * string encoded_path_to_waypoint = 5; + * + * @return The bytes for encodedPathToWaypoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEncodedPathToWaypointBytes() { + java.lang.Object ref = encodedPathToWaypoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + encodedPathToWaypoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRAFFIC_TO_WAYPOINT_FIELD_NUMBER = 10; + private com.google.maps.fleetengine.v1.ConsumableTrafficPolyline trafficToWaypoint_; + /** + * + * + *
+   * The traffic conditions along the path to this waypoint.  Note that traffic
+   * is only available for Google Map Platform Rides and Deliveries Solution
+   * customers.
+   * 
+ * + * .maps.fleetengine.v1.ConsumableTrafficPolyline traffic_to_waypoint = 10; + * + * @return Whether the trafficToWaypoint field is set. + */ + @java.lang.Override + public boolean hasTrafficToWaypoint() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * The traffic conditions along the path to this waypoint.  Note that traffic
+   * is only available for Google Map Platform Rides and Deliveries Solution
+   * customers.
+   * 
+ * + * .maps.fleetengine.v1.ConsumableTrafficPolyline traffic_to_waypoint = 10; + * + * @return The trafficToWaypoint. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.ConsumableTrafficPolyline getTrafficToWaypoint() { + return trafficToWaypoint_ == null + ? com.google.maps.fleetengine.v1.ConsumableTrafficPolyline.getDefaultInstance() + : trafficToWaypoint_; + } + /** + * + * + *
+   * The traffic conditions along the path to this waypoint.  Note that traffic
+   * is only available for Google Map Platform Rides and Deliveries Solution
+   * customers.
+   * 
+ * + * .maps.fleetengine.v1.ConsumableTrafficPolyline traffic_to_waypoint = 10; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.ConsumableTrafficPolylineOrBuilder + getTrafficToWaypointOrBuilder() { + return trafficToWaypoint_ == null + ? com.google.maps.fleetengine.v1.ConsumableTrafficPolyline.getDefaultInstance() + : trafficToWaypoint_; + } + + public static final int DISTANCE_METERS_FIELD_NUMBER = 6; + private com.google.protobuf.Int32Value distanceMeters_; + /** + * + * + *
+   * The path distance from the previous waypoint to the current waypoint.
+   * Undefined for the first waypoint in a list.
+   * 
+ * + * .google.protobuf.Int32Value distance_meters = 6; + * + * @return Whether the distanceMeters field is set. + */ + @java.lang.Override + public boolean hasDistanceMeters() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * The path distance from the previous waypoint to the current waypoint.
+   * Undefined for the first waypoint in a list.
+   * 
+ * + * .google.protobuf.Int32Value distance_meters = 6; + * + * @return The distanceMeters. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getDistanceMeters() { + return distanceMeters_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : distanceMeters_; + } + /** + * + * + *
+   * The path distance from the previous waypoint to the current waypoint.
+   * Undefined for the first waypoint in a list.
+   * 
+ * + * .google.protobuf.Int32Value distance_meters = 6; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getDistanceMetersOrBuilder() { + return distanceMeters_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : distanceMeters_; + } + + public static final int ETA_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp eta_; + /** + * + * + *
+   * The estimated time of arrival at this waypoint. Undefined for the first
+   * waypoint in a list.
+   * 
+ * + * .google.protobuf.Timestamp eta = 7; + * + * @return Whether the eta field is set. + */ + @java.lang.Override + public boolean hasEta() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * The estimated time of arrival at this waypoint. Undefined for the first
+   * waypoint in a list.
+   * 
+ * + * .google.protobuf.Timestamp eta = 7; + * + * @return The eta. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEta() { + return eta_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : eta_; + } + /** + * + * + *
+   * The estimated time of arrival at this waypoint. Undefined for the first
+   * waypoint in a list.
+   * 
+ * + * .google.protobuf.Timestamp eta = 7; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEtaOrBuilder() { + return eta_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : eta_; + } + + public static final int DURATION_FIELD_NUMBER = 8; + private com.google.protobuf.Duration duration_; + /** + * + * + *
+   * The travel time from previous waypoint to this point. Undefined for the
+   * first waypoint in a list.
+   * 
+ * + * .google.protobuf.Duration duration = 8; + * + * @return Whether the duration field is set. + */ + @java.lang.Override + public boolean hasDuration() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+   * The travel time from previous waypoint to this point. Undefined for the
+   * first waypoint in a list.
+   * 
+ * + * .google.protobuf.Duration duration = 8; + * + * @return The duration. + */ + @java.lang.Override + public com.google.protobuf.Duration getDuration() { + return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_; + } + /** + * + * + *
+   * The travel time from previous waypoint to this point. Undefined for the
+   * first waypoint in a list.
+   * 
+ * + * .google.protobuf.Duration duration = 8; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getDurationOrBuilder() { + return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_; + } + + 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, getLocation()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tripId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tripId_); + } + if (waypointType_ + != com.google.maps.fleetengine.v1.WaypointType.UNKNOWN_WAYPOINT_TYPE.getNumber()) { + output.writeEnum(3, waypointType_); + } + for (int i = 0; i < pathToWaypoint_.size(); i++) { + output.writeMessage(4, pathToWaypoint_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(encodedPathToWaypoint_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, encodedPathToWaypoint_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(6, getDistanceMeters()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(7, getEta()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(8, getDuration()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(10, getTrafficToWaypoint()); + } + 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, getLocation()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tripId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tripId_); + } + if (waypointType_ + != com.google.maps.fleetengine.v1.WaypointType.UNKNOWN_WAYPOINT_TYPE.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, waypointType_); + } + for (int i = 0; i < pathToWaypoint_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, pathToWaypoint_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(encodedPathToWaypoint_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, encodedPathToWaypoint_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getDistanceMeters()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getEta()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getDuration()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getTrafficToWaypoint()); + } + 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.fleetengine.v1.TripWaypoint)) { + return super.equals(obj); + } + com.google.maps.fleetengine.v1.TripWaypoint other = + (com.google.maps.fleetengine.v1.TripWaypoint) obj; + + if (hasLocation() != other.hasLocation()) return false; + if (hasLocation()) { + if (!getLocation().equals(other.getLocation())) return false; + } + if (!getTripId().equals(other.getTripId())) return false; + if (waypointType_ != other.waypointType_) return false; + if (!getPathToWaypointList().equals(other.getPathToWaypointList())) return false; + if (!getEncodedPathToWaypoint().equals(other.getEncodedPathToWaypoint())) return false; + if (hasTrafficToWaypoint() != other.hasTrafficToWaypoint()) return false; + if (hasTrafficToWaypoint()) { + if (!getTrafficToWaypoint().equals(other.getTrafficToWaypoint())) return false; + } + if (hasDistanceMeters() != other.hasDistanceMeters()) return false; + if (hasDistanceMeters()) { + if (!getDistanceMeters().equals(other.getDistanceMeters())) return false; + } + if (hasEta() != other.hasEta()) return false; + if (hasEta()) { + if (!getEta().equals(other.getEta())) return false; + } + if (hasDuration() != other.hasDuration()) return false; + if (hasDuration()) { + if (!getDuration().equals(other.getDuration())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLocation()) { + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + } + hash = (37 * hash) + TRIP_ID_FIELD_NUMBER; + hash = (53 * hash) + getTripId().hashCode(); + hash = (37 * hash) + WAYPOINT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + waypointType_; + if (getPathToWaypointCount() > 0) { + hash = (37 * hash) + PATH_TO_WAYPOINT_FIELD_NUMBER; + hash = (53 * hash) + getPathToWaypointList().hashCode(); + } + hash = (37 * hash) + ENCODED_PATH_TO_WAYPOINT_FIELD_NUMBER; + hash = (53 * hash) + getEncodedPathToWaypoint().hashCode(); + if (hasTrafficToWaypoint()) { + hash = (37 * hash) + TRAFFIC_TO_WAYPOINT_FIELD_NUMBER; + hash = (53 * hash) + getTrafficToWaypoint().hashCode(); + } + if (hasDistanceMeters()) { + hash = (37 * hash) + DISTANCE_METERS_FIELD_NUMBER; + hash = (53 * hash) + getDistanceMeters().hashCode(); + } + if (hasEta()) { + hash = (37 * hash) + ETA_FIELD_NUMBER; + hash = (53 * hash) + getEta().hashCode(); + } + if (hasDuration()) { + hash = (37 * hash) + DURATION_FIELD_NUMBER; + hash = (53 * hash) + getDuration().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.fleetengine.v1.TripWaypoint parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.TripWaypoint 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.fleetengine.v1.TripWaypoint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.TripWaypoint 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.fleetengine.v1.TripWaypoint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.TripWaypoint parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.TripWaypoint parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.TripWaypoint parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.TripWaypoint parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.TripWaypoint parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.TripWaypoint parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.TripWaypoint parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.fleetengine.v1.TripWaypoint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Describes a stopping point on a vehicle's route or an ending point on a
+   * vehicle's trip.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.v1.TripWaypoint} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.v1.TripWaypoint) + com.google.maps.fleetengine.v1.TripWaypointOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.FleetEngine + .internal_static_maps_fleetengine_v1_TripWaypoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.FleetEngine + .internal_static_maps_fleetengine_v1_TripWaypoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.TripWaypoint.class, + com.google.maps.fleetengine.v1.TripWaypoint.Builder.class); + } + + // Construct using com.google.maps.fleetengine.v1.TripWaypoint.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getLocationFieldBuilder(); + getPathToWaypointFieldBuilder(); + getTrafficToWaypointFieldBuilder(); + getDistanceMetersFieldBuilder(); + getEtaFieldBuilder(); + getDurationFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + location_ = null; + if (locationBuilder_ != null) { + locationBuilder_.dispose(); + locationBuilder_ = null; + } + tripId_ = ""; + waypointType_ = 0; + if (pathToWaypointBuilder_ == null) { + pathToWaypoint_ = java.util.Collections.emptyList(); + } else { + pathToWaypoint_ = null; + pathToWaypointBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + encodedPathToWaypoint_ = ""; + trafficToWaypoint_ = null; + if (trafficToWaypointBuilder_ != null) { + trafficToWaypointBuilder_.dispose(); + trafficToWaypointBuilder_ = null; + } + distanceMeters_ = null; + if (distanceMetersBuilder_ != null) { + distanceMetersBuilder_.dispose(); + distanceMetersBuilder_ = null; + } + eta_ = null; + if (etaBuilder_ != null) { + etaBuilder_.dispose(); + etaBuilder_ = null; + } + duration_ = null; + if (durationBuilder_ != null) { + durationBuilder_.dispose(); + durationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.fleetengine.v1.FleetEngine + .internal_static_maps_fleetengine_v1_TripWaypoint_descriptor; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.TripWaypoint getDefaultInstanceForType() { + return com.google.maps.fleetengine.v1.TripWaypoint.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.TripWaypoint build() { + com.google.maps.fleetengine.v1.TripWaypoint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.TripWaypoint buildPartial() { + com.google.maps.fleetengine.v1.TripWaypoint result = + new com.google.maps.fleetengine.v1.TripWaypoint(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.maps.fleetengine.v1.TripWaypoint result) { + if (pathToWaypointBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + pathToWaypoint_ = java.util.Collections.unmodifiableList(pathToWaypoint_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.pathToWaypoint_ = pathToWaypoint_; + } else { + result.pathToWaypoint_ = pathToWaypointBuilder_.build(); + } + } + + private void buildPartial0(com.google.maps.fleetengine.v1.TripWaypoint result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.location_ = locationBuilder_ == null ? location_ : locationBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.tripId_ = tripId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.waypointType_ = waypointType_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.encodedPathToWaypoint_ = encodedPathToWaypoint_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.trafficToWaypoint_ = + trafficToWaypointBuilder_ == null + ? trafficToWaypoint_ + : trafficToWaypointBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.distanceMeters_ = + distanceMetersBuilder_ == null ? distanceMeters_ : distanceMetersBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.eta_ = etaBuilder_ == null ? eta_ : etaBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.duration_ = durationBuilder_ == null ? duration_ : durationBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.fleetengine.v1.TripWaypoint) { + return mergeFrom((com.google.maps.fleetengine.v1.TripWaypoint) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.fleetengine.v1.TripWaypoint other) { + if (other == com.google.maps.fleetengine.v1.TripWaypoint.getDefaultInstance()) return this; + if (other.hasLocation()) { + mergeLocation(other.getLocation()); + } + if (!other.getTripId().isEmpty()) { + tripId_ = other.tripId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.waypointType_ != 0) { + setWaypointTypeValue(other.getWaypointTypeValue()); + } + if (pathToWaypointBuilder_ == null) { + if (!other.pathToWaypoint_.isEmpty()) { + if (pathToWaypoint_.isEmpty()) { + pathToWaypoint_ = other.pathToWaypoint_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensurePathToWaypointIsMutable(); + pathToWaypoint_.addAll(other.pathToWaypoint_); + } + onChanged(); + } + } else { + if (!other.pathToWaypoint_.isEmpty()) { + if (pathToWaypointBuilder_.isEmpty()) { + pathToWaypointBuilder_.dispose(); + pathToWaypointBuilder_ = null; + pathToWaypoint_ = other.pathToWaypoint_; + bitField0_ = (bitField0_ & ~0x00000008); + pathToWaypointBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPathToWaypointFieldBuilder() + : null; + } else { + pathToWaypointBuilder_.addAllMessages(other.pathToWaypoint_); + } + } + } + if (!other.getEncodedPathToWaypoint().isEmpty()) { + encodedPathToWaypoint_ = other.encodedPathToWaypoint_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.hasTrafficToWaypoint()) { + mergeTrafficToWaypoint(other.getTrafficToWaypoint()); + } + if (other.hasDistanceMeters()) { + mergeDistanceMeters(other.getDistanceMeters()); + } + if (other.hasEta()) { + mergeEta(other.getEta()); + } + if (other.hasDuration()) { + mergeDuration(other.getDuration()); + } + 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(getLocationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + tripId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + waypointType_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + com.google.type.LatLng m = + input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); + if (pathToWaypointBuilder_ == null) { + ensurePathToWaypointIsMutable(); + pathToWaypoint_.add(m); + } else { + pathToWaypointBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + encodedPathToWaypoint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage(getDistanceMetersFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 50 + case 58: + { + input.readMessage(getEtaFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 58 + case 66: + { + input.readMessage(getDurationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 66 + case 82: + { + input.readMessage( + getTrafficToWaypointFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 82 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.maps.fleetengine.v1.TerminalLocation location_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.TerminalLocation, + com.google.maps.fleetengine.v1.TerminalLocation.Builder, + com.google.maps.fleetengine.v1.TerminalLocationOrBuilder> + locationBuilder_; + /** + * + * + *
+     * The location of this waypoint.
+     * 
+ * + * .maps.fleetengine.v1.TerminalLocation location = 1; + * + * @return Whether the location field is set. + */ + public boolean hasLocation() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The location of this waypoint.
+     * 
+ * + * .maps.fleetengine.v1.TerminalLocation location = 1; + * + * @return The location. + */ + public com.google.maps.fleetengine.v1.TerminalLocation getLocation() { + if (locationBuilder_ == null) { + return location_ == null + ? com.google.maps.fleetengine.v1.TerminalLocation.getDefaultInstance() + : location_; + } else { + return locationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The location of this waypoint.
+     * 
+ * + * .maps.fleetengine.v1.TerminalLocation location = 1; + */ + public Builder setLocation(com.google.maps.fleetengine.v1.TerminalLocation value) { + if (locationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + } else { + locationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The location of this waypoint.
+     * 
+ * + * .maps.fleetengine.v1.TerminalLocation location = 1; + */ + public Builder setLocation( + com.google.maps.fleetengine.v1.TerminalLocation.Builder builderForValue) { + if (locationBuilder_ == null) { + location_ = builderForValue.build(); + } else { + locationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The location of this waypoint.
+     * 
+ * + * .maps.fleetengine.v1.TerminalLocation location = 1; + */ + public Builder mergeLocation(com.google.maps.fleetengine.v1.TerminalLocation value) { + if (locationBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && location_ != null + && location_ != com.google.maps.fleetengine.v1.TerminalLocation.getDefaultInstance()) { + getLocationBuilder().mergeFrom(value); + } else { + location_ = value; + } + } else { + locationBuilder_.mergeFrom(value); + } + if (location_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The location of this waypoint.
+     * 
+ * + * .maps.fleetengine.v1.TerminalLocation location = 1; + */ + public Builder clearLocation() { + bitField0_ = (bitField0_ & ~0x00000001); + location_ = null; + if (locationBuilder_ != null) { + locationBuilder_.dispose(); + locationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The location of this waypoint.
+     * 
+ * + * .maps.fleetengine.v1.TerminalLocation location = 1; + */ + public com.google.maps.fleetengine.v1.TerminalLocation.Builder getLocationBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getLocationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The location of this waypoint.
+     * 
+ * + * .maps.fleetengine.v1.TerminalLocation location = 1; + */ + public com.google.maps.fleetengine.v1.TerminalLocationOrBuilder getLocationOrBuilder() { + if (locationBuilder_ != null) { + return locationBuilder_.getMessageOrBuilder(); + } else { + return location_ == null + ? com.google.maps.fleetengine.v1.TerminalLocation.getDefaultInstance() + : location_; + } + } + /** + * + * + *
+     * The location of this waypoint.
+     * 
+ * + * .maps.fleetengine.v1.TerminalLocation location = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.TerminalLocation, + com.google.maps.fleetengine.v1.TerminalLocation.Builder, + com.google.maps.fleetengine.v1.TerminalLocationOrBuilder> + getLocationFieldBuilder() { + if (locationBuilder_ == null) { + locationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.TerminalLocation, + com.google.maps.fleetengine.v1.TerminalLocation.Builder, + com.google.maps.fleetengine.v1.TerminalLocationOrBuilder>( + getLocation(), getParentForChildren(), isClean()); + location_ = null; + } + return locationBuilder_; + } + + private java.lang.Object tripId_ = ""; + /** + * + * + *
+     * The trip associated with this waypoint.
+     * 
+ * + * string trip_id = 2; + * + * @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; + } + } + /** + * + * + *
+     * The trip associated with this waypoint.
+     * 
+ * + * string trip_id = 2; + * + * @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; + } + } + /** + * + * + *
+     * The trip associated with this waypoint.
+     * 
+ * + * string trip_id = 2; + * + * @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; + } + /** + * + * + *
+     * The trip associated with this waypoint.
+     * 
+ * + * string trip_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearTripId() { + tripId_ = getDefaultInstance().getTripId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The trip associated with this waypoint.
+     * 
+ * + * string trip_id = 2; + * + * @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 int waypointType_ = 0; + /** + * + * + *
+     * The role this waypoint plays in this trip, such as pickup or dropoff.
+     * 
+ * + * .maps.fleetengine.v1.WaypointType waypoint_type = 3; + * + * @return The enum numeric value on the wire for waypointType. + */ + @java.lang.Override + public int getWaypointTypeValue() { + return waypointType_; + } + /** + * + * + *
+     * The role this waypoint plays in this trip, such as pickup or dropoff.
+     * 
+ * + * .maps.fleetengine.v1.WaypointType waypoint_type = 3; + * + * @param value The enum numeric value on the wire for waypointType to set. + * @return This builder for chaining. + */ + public Builder setWaypointTypeValue(int value) { + waypointType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The role this waypoint plays in this trip, such as pickup or dropoff.
+     * 
+ * + * .maps.fleetengine.v1.WaypointType waypoint_type = 3; + * + * @return The waypointType. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.WaypointType getWaypointType() { + com.google.maps.fleetengine.v1.WaypointType result = + com.google.maps.fleetengine.v1.WaypointType.forNumber(waypointType_); + return result == null ? com.google.maps.fleetengine.v1.WaypointType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The role this waypoint plays in this trip, such as pickup or dropoff.
+     * 
+ * + * .maps.fleetengine.v1.WaypointType waypoint_type = 3; + * + * @param value The waypointType to set. + * @return This builder for chaining. + */ + public Builder setWaypointType(com.google.maps.fleetengine.v1.WaypointType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + waypointType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The role this waypoint plays in this trip, such as pickup or dropoff.
+     * 
+ * + * .maps.fleetengine.v1.WaypointType waypoint_type = 3; + * + * @return This builder for chaining. + */ + public Builder clearWaypointType() { + bitField0_ = (bitField0_ & ~0x00000004); + waypointType_ = 0; + onChanged(); + return this; + } + + private java.util.List pathToWaypoint_ = + java.util.Collections.emptyList(); + + private void ensurePathToWaypointIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + pathToWaypoint_ = new java.util.ArrayList(pathToWaypoint_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + pathToWaypointBuilder_; + + /** + * + * + *
+     * The path from the previous waypoint to the current waypoint.  Undefined for
+     * the first waypoint in a list. This field is only populated when requested.
+     * 
+ * + * repeated .google.type.LatLng path_to_waypoint = 4; + */ + public java.util.List getPathToWaypointList() { + if (pathToWaypointBuilder_ == null) { + return java.util.Collections.unmodifiableList(pathToWaypoint_); + } else { + return pathToWaypointBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The path from the previous waypoint to the current waypoint.  Undefined for
+     * the first waypoint in a list. This field is only populated when requested.
+     * 
+ * + * repeated .google.type.LatLng path_to_waypoint = 4; + */ + public int getPathToWaypointCount() { + if (pathToWaypointBuilder_ == null) { + return pathToWaypoint_.size(); + } else { + return pathToWaypointBuilder_.getCount(); + } + } + /** + * + * + *
+     * The path from the previous waypoint to the current waypoint.  Undefined for
+     * the first waypoint in a list. This field is only populated when requested.
+     * 
+ * + * repeated .google.type.LatLng path_to_waypoint = 4; + */ + public com.google.type.LatLng getPathToWaypoint(int index) { + if (pathToWaypointBuilder_ == null) { + return pathToWaypoint_.get(index); + } else { + return pathToWaypointBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The path from the previous waypoint to the current waypoint.  Undefined for
+     * the first waypoint in a list. This field is only populated when requested.
+     * 
+ * + * repeated .google.type.LatLng path_to_waypoint = 4; + */ + public Builder setPathToWaypoint(int index, com.google.type.LatLng value) { + if (pathToWaypointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePathToWaypointIsMutable(); + pathToWaypoint_.set(index, value); + onChanged(); + } else { + pathToWaypointBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The path from the previous waypoint to the current waypoint.  Undefined for
+     * the first waypoint in a list. This field is only populated when requested.
+     * 
+ * + * repeated .google.type.LatLng path_to_waypoint = 4; + */ + public Builder setPathToWaypoint(int index, com.google.type.LatLng.Builder builderForValue) { + if (pathToWaypointBuilder_ == null) { + ensurePathToWaypointIsMutable(); + pathToWaypoint_.set(index, builderForValue.build()); + onChanged(); + } else { + pathToWaypointBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The path from the previous waypoint to the current waypoint.  Undefined for
+     * the first waypoint in a list. This field is only populated when requested.
+     * 
+ * + * repeated .google.type.LatLng path_to_waypoint = 4; + */ + public Builder addPathToWaypoint(com.google.type.LatLng value) { + if (pathToWaypointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePathToWaypointIsMutable(); + pathToWaypoint_.add(value); + onChanged(); + } else { + pathToWaypointBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The path from the previous waypoint to the current waypoint.  Undefined for
+     * the first waypoint in a list. This field is only populated when requested.
+     * 
+ * + * repeated .google.type.LatLng path_to_waypoint = 4; + */ + public Builder addPathToWaypoint(int index, com.google.type.LatLng value) { + if (pathToWaypointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePathToWaypointIsMutable(); + pathToWaypoint_.add(index, value); + onChanged(); + } else { + pathToWaypointBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The path from the previous waypoint to the current waypoint.  Undefined for
+     * the first waypoint in a list. This field is only populated when requested.
+     * 
+ * + * repeated .google.type.LatLng path_to_waypoint = 4; + */ + public Builder addPathToWaypoint(com.google.type.LatLng.Builder builderForValue) { + if (pathToWaypointBuilder_ == null) { + ensurePathToWaypointIsMutable(); + pathToWaypoint_.add(builderForValue.build()); + onChanged(); + } else { + pathToWaypointBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The path from the previous waypoint to the current waypoint.  Undefined for
+     * the first waypoint in a list. This field is only populated when requested.
+     * 
+ * + * repeated .google.type.LatLng path_to_waypoint = 4; + */ + public Builder addPathToWaypoint(int index, com.google.type.LatLng.Builder builderForValue) { + if (pathToWaypointBuilder_ == null) { + ensurePathToWaypointIsMutable(); + pathToWaypoint_.add(index, builderForValue.build()); + onChanged(); + } else { + pathToWaypointBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The path from the previous waypoint to the current waypoint.  Undefined for
+     * the first waypoint in a list. This field is only populated when requested.
+     * 
+ * + * repeated .google.type.LatLng path_to_waypoint = 4; + */ + public Builder addAllPathToWaypoint( + java.lang.Iterable values) { + if (pathToWaypointBuilder_ == null) { + ensurePathToWaypointIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pathToWaypoint_); + onChanged(); + } else { + pathToWaypointBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The path from the previous waypoint to the current waypoint.  Undefined for
+     * the first waypoint in a list. This field is only populated when requested.
+     * 
+ * + * repeated .google.type.LatLng path_to_waypoint = 4; + */ + public Builder clearPathToWaypoint() { + if (pathToWaypointBuilder_ == null) { + pathToWaypoint_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + pathToWaypointBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The path from the previous waypoint to the current waypoint.  Undefined for
+     * the first waypoint in a list. This field is only populated when requested.
+     * 
+ * + * repeated .google.type.LatLng path_to_waypoint = 4; + */ + public Builder removePathToWaypoint(int index) { + if (pathToWaypointBuilder_ == null) { + ensurePathToWaypointIsMutable(); + pathToWaypoint_.remove(index); + onChanged(); + } else { + pathToWaypointBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The path from the previous waypoint to the current waypoint.  Undefined for
+     * the first waypoint in a list. This field is only populated when requested.
+     * 
+ * + * repeated .google.type.LatLng path_to_waypoint = 4; + */ + public com.google.type.LatLng.Builder getPathToWaypointBuilder(int index) { + return getPathToWaypointFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The path from the previous waypoint to the current waypoint.  Undefined for
+     * the first waypoint in a list. This field is only populated when requested.
+     * 
+ * + * repeated .google.type.LatLng path_to_waypoint = 4; + */ + public com.google.type.LatLngOrBuilder getPathToWaypointOrBuilder(int index) { + if (pathToWaypointBuilder_ == null) { + return pathToWaypoint_.get(index); + } else { + return pathToWaypointBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The path from the previous waypoint to the current waypoint.  Undefined for
+     * the first waypoint in a list. This field is only populated when requested.
+     * 
+ * + * repeated .google.type.LatLng path_to_waypoint = 4; + */ + public java.util.List + getPathToWaypointOrBuilderList() { + if (pathToWaypointBuilder_ != null) { + return pathToWaypointBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pathToWaypoint_); + } + } + /** + * + * + *
+     * The path from the previous waypoint to the current waypoint.  Undefined for
+     * the first waypoint in a list. This field is only populated when requested.
+     * 
+ * + * repeated .google.type.LatLng path_to_waypoint = 4; + */ + public com.google.type.LatLng.Builder addPathToWaypointBuilder() { + return getPathToWaypointFieldBuilder() + .addBuilder(com.google.type.LatLng.getDefaultInstance()); + } + /** + * + * + *
+     * The path from the previous waypoint to the current waypoint.  Undefined for
+     * the first waypoint in a list. This field is only populated when requested.
+     * 
+ * + * repeated .google.type.LatLng path_to_waypoint = 4; + */ + public com.google.type.LatLng.Builder addPathToWaypointBuilder(int index) { + return getPathToWaypointFieldBuilder() + .addBuilder(index, com.google.type.LatLng.getDefaultInstance()); + } + /** + * + * + *
+     * The path from the previous waypoint to the current waypoint.  Undefined for
+     * the first waypoint in a list. This field is only populated when requested.
+     * 
+ * + * repeated .google.type.LatLng path_to_waypoint = 4; + */ + public java.util.List getPathToWaypointBuilderList() { + return getPathToWaypointFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + getPathToWaypointFieldBuilder() { + if (pathToWaypointBuilder_ == null) { + pathToWaypointBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.type.LatLng, + com.google.type.LatLng.Builder, + com.google.type.LatLngOrBuilder>( + pathToWaypoint_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + pathToWaypoint_ = null; + } + return pathToWaypointBuilder_; + } + + private java.lang.Object encodedPathToWaypoint_ = ""; + /** + * + * + *
+     * The encoded path from the previous waypoint to the current waypoint.
+     *
+     * <p>Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK. Decoding is not yet supported.
+     * 
+ * + * string encoded_path_to_waypoint = 5; + * + * @return The encodedPathToWaypoint. + */ + public java.lang.String getEncodedPathToWaypoint() { + java.lang.Object ref = encodedPathToWaypoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + encodedPathToWaypoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The encoded path from the previous waypoint to the current waypoint.
+     *
+     * <p>Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK. Decoding is not yet supported.
+     * 
+ * + * string encoded_path_to_waypoint = 5; + * + * @return The bytes for encodedPathToWaypoint. + */ + public com.google.protobuf.ByteString getEncodedPathToWaypointBytes() { + java.lang.Object ref = encodedPathToWaypoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + encodedPathToWaypoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The encoded path from the previous waypoint to the current waypoint.
+     *
+     * <p>Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK. Decoding is not yet supported.
+     * 
+ * + * string encoded_path_to_waypoint = 5; + * + * @param value The encodedPathToWaypoint to set. + * @return This builder for chaining. + */ + public Builder setEncodedPathToWaypoint(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + encodedPathToWaypoint_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The encoded path from the previous waypoint to the current waypoint.
+     *
+     * <p>Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK. Decoding is not yet supported.
+     * 
+ * + * string encoded_path_to_waypoint = 5; + * + * @return This builder for chaining. + */ + public Builder clearEncodedPathToWaypoint() { + encodedPathToWaypoint_ = getDefaultInstance().getEncodedPathToWaypoint(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * The encoded path from the previous waypoint to the current waypoint.
+     *
+     * <p>Note: This field is intended only for use by the Driver SDK and Consumer
+     * SDK. Decoding is not yet supported.
+     * 
+ * + * string encoded_path_to_waypoint = 5; + * + * @param value The bytes for encodedPathToWaypoint to set. + * @return This builder for chaining. + */ + public Builder setEncodedPathToWaypointBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + encodedPathToWaypoint_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.maps.fleetengine.v1.ConsumableTrafficPolyline trafficToWaypoint_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.ConsumableTrafficPolyline, + com.google.maps.fleetengine.v1.ConsumableTrafficPolyline.Builder, + com.google.maps.fleetengine.v1.ConsumableTrafficPolylineOrBuilder> + trafficToWaypointBuilder_; + /** + * + * + *
+     * The traffic conditions along the path to this waypoint.  Note that traffic
+     * is only available for Google Map Platform Rides and Deliveries Solution
+     * customers.
+     * 
+ * + * .maps.fleetengine.v1.ConsumableTrafficPolyline traffic_to_waypoint = 10; + * + * @return Whether the trafficToWaypoint field is set. + */ + public boolean hasTrafficToWaypoint() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * The traffic conditions along the path to this waypoint.  Note that traffic
+     * is only available for Google Map Platform Rides and Deliveries Solution
+     * customers.
+     * 
+ * + * .maps.fleetengine.v1.ConsumableTrafficPolyline traffic_to_waypoint = 10; + * + * @return The trafficToWaypoint. + */ + public com.google.maps.fleetengine.v1.ConsumableTrafficPolyline getTrafficToWaypoint() { + if (trafficToWaypointBuilder_ == null) { + return trafficToWaypoint_ == null + ? com.google.maps.fleetengine.v1.ConsumableTrafficPolyline.getDefaultInstance() + : trafficToWaypoint_; + } else { + return trafficToWaypointBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The traffic conditions along the path to this waypoint.  Note that traffic
+     * is only available for Google Map Platform Rides and Deliveries Solution
+     * customers.
+     * 
+ * + * .maps.fleetengine.v1.ConsumableTrafficPolyline traffic_to_waypoint = 10; + */ + public Builder setTrafficToWaypoint( + com.google.maps.fleetengine.v1.ConsumableTrafficPolyline value) { + if (trafficToWaypointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + trafficToWaypoint_ = value; + } else { + trafficToWaypointBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The traffic conditions along the path to this waypoint.  Note that traffic
+     * is only available for Google Map Platform Rides and Deliveries Solution
+     * customers.
+     * 
+ * + * .maps.fleetengine.v1.ConsumableTrafficPolyline traffic_to_waypoint = 10; + */ + public Builder setTrafficToWaypoint( + com.google.maps.fleetengine.v1.ConsumableTrafficPolyline.Builder builderForValue) { + if (trafficToWaypointBuilder_ == null) { + trafficToWaypoint_ = builderForValue.build(); + } else { + trafficToWaypointBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The traffic conditions along the path to this waypoint.  Note that traffic
+     * is only available for Google Map Platform Rides and Deliveries Solution
+     * customers.
+     * 
+ * + * .maps.fleetengine.v1.ConsumableTrafficPolyline traffic_to_waypoint = 10; + */ + public Builder mergeTrafficToWaypoint( + com.google.maps.fleetengine.v1.ConsumableTrafficPolyline value) { + if (trafficToWaypointBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && trafficToWaypoint_ != null + && trafficToWaypoint_ + != com.google.maps.fleetengine.v1.ConsumableTrafficPolyline.getDefaultInstance()) { + getTrafficToWaypointBuilder().mergeFrom(value); + } else { + trafficToWaypoint_ = value; + } + } else { + trafficToWaypointBuilder_.mergeFrom(value); + } + if (trafficToWaypoint_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The traffic conditions along the path to this waypoint.  Note that traffic
+     * is only available for Google Map Platform Rides and Deliveries Solution
+     * customers.
+     * 
+ * + * .maps.fleetengine.v1.ConsumableTrafficPolyline traffic_to_waypoint = 10; + */ + public Builder clearTrafficToWaypoint() { + bitField0_ = (bitField0_ & ~0x00000020); + trafficToWaypoint_ = null; + if (trafficToWaypointBuilder_ != null) { + trafficToWaypointBuilder_.dispose(); + trafficToWaypointBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The traffic conditions along the path to this waypoint.  Note that traffic
+     * is only available for Google Map Platform Rides and Deliveries Solution
+     * customers.
+     * 
+ * + * .maps.fleetengine.v1.ConsumableTrafficPolyline traffic_to_waypoint = 10; + */ + public com.google.maps.fleetengine.v1.ConsumableTrafficPolyline.Builder + getTrafficToWaypointBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getTrafficToWaypointFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The traffic conditions along the path to this waypoint.  Note that traffic
+     * is only available for Google Map Platform Rides and Deliveries Solution
+     * customers.
+     * 
+ * + * .maps.fleetengine.v1.ConsumableTrafficPolyline traffic_to_waypoint = 10; + */ + public com.google.maps.fleetengine.v1.ConsumableTrafficPolylineOrBuilder + getTrafficToWaypointOrBuilder() { + if (trafficToWaypointBuilder_ != null) { + return trafficToWaypointBuilder_.getMessageOrBuilder(); + } else { + return trafficToWaypoint_ == null + ? com.google.maps.fleetengine.v1.ConsumableTrafficPolyline.getDefaultInstance() + : trafficToWaypoint_; + } + } + /** + * + * + *
+     * The traffic conditions along the path to this waypoint.  Note that traffic
+     * is only available for Google Map Platform Rides and Deliveries Solution
+     * customers.
+     * 
+ * + * .maps.fleetengine.v1.ConsumableTrafficPolyline traffic_to_waypoint = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.ConsumableTrafficPolyline, + com.google.maps.fleetengine.v1.ConsumableTrafficPolyline.Builder, + com.google.maps.fleetengine.v1.ConsumableTrafficPolylineOrBuilder> + getTrafficToWaypointFieldBuilder() { + if (trafficToWaypointBuilder_ == null) { + trafficToWaypointBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.ConsumableTrafficPolyline, + com.google.maps.fleetengine.v1.ConsumableTrafficPolyline.Builder, + com.google.maps.fleetengine.v1.ConsumableTrafficPolylineOrBuilder>( + getTrafficToWaypoint(), getParentForChildren(), isClean()); + trafficToWaypoint_ = null; + } + return trafficToWaypointBuilder_; + } + + private com.google.protobuf.Int32Value distanceMeters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + distanceMetersBuilder_; + /** + * + * + *
+     * The path distance from the previous waypoint to the current waypoint.
+     * Undefined for the first waypoint in a list.
+     * 
+ * + * .google.protobuf.Int32Value distance_meters = 6; + * + * @return Whether the distanceMeters field is set. + */ + public boolean hasDistanceMeters() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * The path distance from the previous waypoint to the current waypoint.
+     * Undefined for the first waypoint in a list.
+     * 
+ * + * .google.protobuf.Int32Value distance_meters = 6; + * + * @return The distanceMeters. + */ + public com.google.protobuf.Int32Value getDistanceMeters() { + if (distanceMetersBuilder_ == null) { + return distanceMeters_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : distanceMeters_; + } else { + return distanceMetersBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The path distance from the previous waypoint to the current waypoint.
+     * Undefined for the first waypoint in a list.
+     * 
+ * + * .google.protobuf.Int32Value distance_meters = 6; + */ + public Builder setDistanceMeters(com.google.protobuf.Int32Value value) { + if (distanceMetersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + distanceMeters_ = value; + } else { + distanceMetersBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * The path distance from the previous waypoint to the current waypoint.
+     * Undefined for the first waypoint in a list.
+     * 
+ * + * .google.protobuf.Int32Value distance_meters = 6; + */ + public Builder setDistanceMeters(com.google.protobuf.Int32Value.Builder builderForValue) { + if (distanceMetersBuilder_ == null) { + distanceMeters_ = builderForValue.build(); + } else { + distanceMetersBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * The path distance from the previous waypoint to the current waypoint.
+     * Undefined for the first waypoint in a list.
+     * 
+ * + * .google.protobuf.Int32Value distance_meters = 6; + */ + public Builder mergeDistanceMeters(com.google.protobuf.Int32Value value) { + if (distanceMetersBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && distanceMeters_ != null + && distanceMeters_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getDistanceMetersBuilder().mergeFrom(value); + } else { + distanceMeters_ = value; + } + } else { + distanceMetersBuilder_.mergeFrom(value); + } + if (distanceMeters_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The path distance from the previous waypoint to the current waypoint.
+     * Undefined for the first waypoint in a list.
+     * 
+ * + * .google.protobuf.Int32Value distance_meters = 6; + */ + public Builder clearDistanceMeters() { + bitField0_ = (bitField0_ & ~0x00000040); + distanceMeters_ = null; + if (distanceMetersBuilder_ != null) { + distanceMetersBuilder_.dispose(); + distanceMetersBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The path distance from the previous waypoint to the current waypoint.
+     * Undefined for the first waypoint in a list.
+     * 
+ * + * .google.protobuf.Int32Value distance_meters = 6; + */ + public com.google.protobuf.Int32Value.Builder getDistanceMetersBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getDistanceMetersFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The path distance from the previous waypoint to the current waypoint.
+     * Undefined for the first waypoint in a list.
+     * 
+ * + * .google.protobuf.Int32Value distance_meters = 6; + */ + public com.google.protobuf.Int32ValueOrBuilder getDistanceMetersOrBuilder() { + if (distanceMetersBuilder_ != null) { + return distanceMetersBuilder_.getMessageOrBuilder(); + } else { + return distanceMeters_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : distanceMeters_; + } + } + /** + * + * + *
+     * The path distance from the previous waypoint to the current waypoint.
+     * Undefined for the first waypoint in a list.
+     * 
+ * + * .google.protobuf.Int32Value distance_meters = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + getDistanceMetersFieldBuilder() { + if (distanceMetersBuilder_ == null) { + distanceMetersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder>( + getDistanceMeters(), getParentForChildren(), isClean()); + distanceMeters_ = null; + } + return distanceMetersBuilder_; + } + + private com.google.protobuf.Timestamp eta_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + etaBuilder_; + /** + * + * + *
+     * The estimated time of arrival at this waypoint. Undefined for the first
+     * waypoint in a list.
+     * 
+ * + * .google.protobuf.Timestamp eta = 7; + * + * @return Whether the eta field is set. + */ + public boolean hasEta() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * The estimated time of arrival at this waypoint. Undefined for the first
+     * waypoint in a list.
+     * 
+ * + * .google.protobuf.Timestamp eta = 7; + * + * @return The eta. + */ + public com.google.protobuf.Timestamp getEta() { + if (etaBuilder_ == null) { + return eta_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : eta_; + } else { + return etaBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The estimated time of arrival at this waypoint. Undefined for the first
+     * waypoint in a list.
+     * 
+ * + * .google.protobuf.Timestamp eta = 7; + */ + public Builder setEta(com.google.protobuf.Timestamp value) { + if (etaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + eta_ = value; + } else { + etaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * The estimated time of arrival at this waypoint. Undefined for the first
+     * waypoint in a list.
+     * 
+ * + * .google.protobuf.Timestamp eta = 7; + */ + public Builder setEta(com.google.protobuf.Timestamp.Builder builderForValue) { + if (etaBuilder_ == null) { + eta_ = builderForValue.build(); + } else { + etaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * The estimated time of arrival at this waypoint. Undefined for the first
+     * waypoint in a list.
+     * 
+ * + * .google.protobuf.Timestamp eta = 7; + */ + public Builder mergeEta(com.google.protobuf.Timestamp value) { + if (etaBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && eta_ != null + && eta_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEtaBuilder().mergeFrom(value); + } else { + eta_ = value; + } + } else { + etaBuilder_.mergeFrom(value); + } + if (eta_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The estimated time of arrival at this waypoint. Undefined for the first
+     * waypoint in a list.
+     * 
+ * + * .google.protobuf.Timestamp eta = 7; + */ + public Builder clearEta() { + bitField0_ = (bitField0_ & ~0x00000080); + eta_ = null; + if (etaBuilder_ != null) { + etaBuilder_.dispose(); + etaBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The estimated time of arrival at this waypoint. Undefined for the first
+     * waypoint in a list.
+     * 
+ * + * .google.protobuf.Timestamp eta = 7; + */ + public com.google.protobuf.Timestamp.Builder getEtaBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getEtaFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The estimated time of arrival at this waypoint. Undefined for the first
+     * waypoint in a list.
+     * 
+ * + * .google.protobuf.Timestamp eta = 7; + */ + public com.google.protobuf.TimestampOrBuilder getEtaOrBuilder() { + if (etaBuilder_ != null) { + return etaBuilder_.getMessageOrBuilder(); + } else { + return eta_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : eta_; + } + } + /** + * + * + *
+     * The estimated time of arrival at this waypoint. Undefined for the first
+     * waypoint in a list.
+     * 
+ * + * .google.protobuf.Timestamp eta = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEtaFieldBuilder() { + if (etaBuilder_ == null) { + etaBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEta(), getParentForChildren(), isClean()); + eta_ = null; + } + return etaBuilder_; + } + + private com.google.protobuf.Duration duration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + durationBuilder_; + /** + * + * + *
+     * The travel time from previous waypoint to this point. Undefined for the
+     * first waypoint in a list.
+     * 
+ * + * .google.protobuf.Duration duration = 8; + * + * @return Whether the duration field is set. + */ + public boolean hasDuration() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+     * The travel time from previous waypoint to this point. Undefined for the
+     * first waypoint in a list.
+     * 
+ * + * .google.protobuf.Duration duration = 8; + * + * @return The duration. + */ + public com.google.protobuf.Duration getDuration() { + if (durationBuilder_ == null) { + return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_; + } else { + return durationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The travel time from previous waypoint to this point. Undefined for the
+     * first waypoint in a list.
+     * 
+ * + * .google.protobuf.Duration duration = 8; + */ + public Builder setDuration(com.google.protobuf.Duration value) { + if (durationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + duration_ = value; + } else { + durationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * The travel time from previous waypoint to this point. Undefined for the
+     * first waypoint in a list.
+     * 
+ * + * .google.protobuf.Duration duration = 8; + */ + public Builder setDuration(com.google.protobuf.Duration.Builder builderForValue) { + if (durationBuilder_ == null) { + duration_ = builderForValue.build(); + } else { + durationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * The travel time from previous waypoint to this point. Undefined for the
+     * first waypoint in a list.
+     * 
+ * + * .google.protobuf.Duration duration = 8; + */ + public Builder mergeDuration(com.google.protobuf.Duration value) { + if (durationBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && duration_ != null + && duration_ != com.google.protobuf.Duration.getDefaultInstance()) { + getDurationBuilder().mergeFrom(value); + } else { + duration_ = value; + } + } else { + durationBuilder_.mergeFrom(value); + } + if (duration_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The travel time from previous waypoint to this point. Undefined for the
+     * first waypoint in a list.
+     * 
+ * + * .google.protobuf.Duration duration = 8; + */ + public Builder clearDuration() { + bitField0_ = (bitField0_ & ~0x00000100); + duration_ = null; + if (durationBuilder_ != null) { + durationBuilder_.dispose(); + durationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The travel time from previous waypoint to this point. Undefined for the
+     * first waypoint in a list.
+     * 
+ * + * .google.protobuf.Duration duration = 8; + */ + public com.google.protobuf.Duration.Builder getDurationBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getDurationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The travel time from previous waypoint to this point. Undefined for the
+     * first waypoint in a list.
+     * 
+ * + * .google.protobuf.Duration duration = 8; + */ + public com.google.protobuf.DurationOrBuilder getDurationOrBuilder() { + if (durationBuilder_ != null) { + return durationBuilder_.getMessageOrBuilder(); + } else { + return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_; + } + } + /** + * + * + *
+     * The travel time from previous waypoint to this point. Undefined for the
+     * first waypoint in a list.
+     * 
+ * + * .google.protobuf.Duration duration = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getDurationFieldBuilder() { + if (durationBuilder_ == null) { + durationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getDuration(), getParentForChildren(), isClean()); + duration_ = null; + } + return durationBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:maps.fleetengine.v1.TripWaypoint) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.v1.TripWaypoint) + private static final com.google.maps.fleetengine.v1.TripWaypoint DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.fleetengine.v1.TripWaypoint(); + } + + public static com.google.maps.fleetengine.v1.TripWaypoint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TripWaypoint 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.fleetengine.v1.TripWaypoint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TripWaypointOrBuilder.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TripWaypointOrBuilder.java new file mode 100644 index 000000000000..44be7e9f6357 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/TripWaypointOrBuilder.java @@ -0,0 +1,353 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/fleetengine.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public interface TripWaypointOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.v1.TripWaypoint) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The location of this waypoint.
+   * 
+ * + * .maps.fleetengine.v1.TerminalLocation location = 1; + * + * @return Whether the location field is set. + */ + boolean hasLocation(); + /** + * + * + *
+   * The location of this waypoint.
+   * 
+ * + * .maps.fleetengine.v1.TerminalLocation location = 1; + * + * @return The location. + */ + com.google.maps.fleetengine.v1.TerminalLocation getLocation(); + /** + * + * + *
+   * The location of this waypoint.
+   * 
+ * + * .maps.fleetengine.v1.TerminalLocation location = 1; + */ + com.google.maps.fleetengine.v1.TerminalLocationOrBuilder getLocationOrBuilder(); + + /** + * + * + *
+   * The trip associated with this waypoint.
+   * 
+ * + * string trip_id = 2; + * + * @return The tripId. + */ + java.lang.String getTripId(); + /** + * + * + *
+   * The trip associated with this waypoint.
+   * 
+ * + * string trip_id = 2; + * + * @return The bytes for tripId. + */ + com.google.protobuf.ByteString getTripIdBytes(); + + /** + * + * + *
+   * The role this waypoint plays in this trip, such as pickup or dropoff.
+   * 
+ * + * .maps.fleetengine.v1.WaypointType waypoint_type = 3; + * + * @return The enum numeric value on the wire for waypointType. + */ + int getWaypointTypeValue(); + /** + * + * + *
+   * The role this waypoint plays in this trip, such as pickup or dropoff.
+   * 
+ * + * .maps.fleetengine.v1.WaypointType waypoint_type = 3; + * + * @return The waypointType. + */ + com.google.maps.fleetengine.v1.WaypointType getWaypointType(); + + /** + * + * + *
+   * The path from the previous waypoint to the current waypoint.  Undefined for
+   * the first waypoint in a list. This field is only populated when requested.
+   * 
+ * + * repeated .google.type.LatLng path_to_waypoint = 4; + */ + java.util.List getPathToWaypointList(); + /** + * + * + *
+   * The path from the previous waypoint to the current waypoint.  Undefined for
+   * the first waypoint in a list. This field is only populated when requested.
+   * 
+ * + * repeated .google.type.LatLng path_to_waypoint = 4; + */ + com.google.type.LatLng getPathToWaypoint(int index); + /** + * + * + *
+   * The path from the previous waypoint to the current waypoint.  Undefined for
+   * the first waypoint in a list. This field is only populated when requested.
+   * 
+ * + * repeated .google.type.LatLng path_to_waypoint = 4; + */ + int getPathToWaypointCount(); + /** + * + * + *
+   * The path from the previous waypoint to the current waypoint.  Undefined for
+   * the first waypoint in a list. This field is only populated when requested.
+   * 
+ * + * repeated .google.type.LatLng path_to_waypoint = 4; + */ + java.util.List getPathToWaypointOrBuilderList(); + /** + * + * + *
+   * The path from the previous waypoint to the current waypoint.  Undefined for
+   * the first waypoint in a list. This field is only populated when requested.
+   * 
+ * + * repeated .google.type.LatLng path_to_waypoint = 4; + */ + com.google.type.LatLngOrBuilder getPathToWaypointOrBuilder(int index); + + /** + * + * + *
+   * The encoded path from the previous waypoint to the current waypoint.
+   *
+   * <p>Note: This field is intended only for use by the Driver SDK and Consumer
+   * SDK. Decoding is not yet supported.
+   * 
+ * + * string encoded_path_to_waypoint = 5; + * + * @return The encodedPathToWaypoint. + */ + java.lang.String getEncodedPathToWaypoint(); + /** + * + * + *
+   * The encoded path from the previous waypoint to the current waypoint.
+   *
+   * <p>Note: This field is intended only for use by the Driver SDK and Consumer
+   * SDK. Decoding is not yet supported.
+   * 
+ * + * string encoded_path_to_waypoint = 5; + * + * @return The bytes for encodedPathToWaypoint. + */ + com.google.protobuf.ByteString getEncodedPathToWaypointBytes(); + + /** + * + * + *
+   * The traffic conditions along the path to this waypoint.  Note that traffic
+   * is only available for Google Map Platform Rides and Deliveries Solution
+   * customers.
+   * 
+ * + * .maps.fleetengine.v1.ConsumableTrafficPolyline traffic_to_waypoint = 10; + * + * @return Whether the trafficToWaypoint field is set. + */ + boolean hasTrafficToWaypoint(); + /** + * + * + *
+   * The traffic conditions along the path to this waypoint.  Note that traffic
+   * is only available for Google Map Platform Rides and Deliveries Solution
+   * customers.
+   * 
+ * + * .maps.fleetengine.v1.ConsumableTrafficPolyline traffic_to_waypoint = 10; + * + * @return The trafficToWaypoint. + */ + com.google.maps.fleetengine.v1.ConsumableTrafficPolyline getTrafficToWaypoint(); + /** + * + * + *
+   * The traffic conditions along the path to this waypoint.  Note that traffic
+   * is only available for Google Map Platform Rides and Deliveries Solution
+   * customers.
+   * 
+ * + * .maps.fleetengine.v1.ConsumableTrafficPolyline traffic_to_waypoint = 10; + */ + com.google.maps.fleetengine.v1.ConsumableTrafficPolylineOrBuilder getTrafficToWaypointOrBuilder(); + + /** + * + * + *
+   * The path distance from the previous waypoint to the current waypoint.
+   * Undefined for the first waypoint in a list.
+   * 
+ * + * .google.protobuf.Int32Value distance_meters = 6; + * + * @return Whether the distanceMeters field is set. + */ + boolean hasDistanceMeters(); + /** + * + * + *
+   * The path distance from the previous waypoint to the current waypoint.
+   * Undefined for the first waypoint in a list.
+   * 
+ * + * .google.protobuf.Int32Value distance_meters = 6; + * + * @return The distanceMeters. + */ + com.google.protobuf.Int32Value getDistanceMeters(); + /** + * + * + *
+   * The path distance from the previous waypoint to the current waypoint.
+   * Undefined for the first waypoint in a list.
+   * 
+ * + * .google.protobuf.Int32Value distance_meters = 6; + */ + com.google.protobuf.Int32ValueOrBuilder getDistanceMetersOrBuilder(); + + /** + * + * + *
+   * The estimated time of arrival at this waypoint. Undefined for the first
+   * waypoint in a list.
+   * 
+ * + * .google.protobuf.Timestamp eta = 7; + * + * @return Whether the eta field is set. + */ + boolean hasEta(); + /** + * + * + *
+   * The estimated time of arrival at this waypoint. Undefined for the first
+   * waypoint in a list.
+   * 
+ * + * .google.protobuf.Timestamp eta = 7; + * + * @return The eta. + */ + com.google.protobuf.Timestamp getEta(); + /** + * + * + *
+   * The estimated time of arrival at this waypoint. Undefined for the first
+   * waypoint in a list.
+   * 
+ * + * .google.protobuf.Timestamp eta = 7; + */ + com.google.protobuf.TimestampOrBuilder getEtaOrBuilder(); + + /** + * + * + *
+   * The travel time from previous waypoint to this point. Undefined for the
+   * first waypoint in a list.
+   * 
+ * + * .google.protobuf.Duration duration = 8; + * + * @return Whether the duration field is set. + */ + boolean hasDuration(); + /** + * + * + *
+   * The travel time from previous waypoint to this point. Undefined for the
+   * first waypoint in a list.
+   * 
+ * + * .google.protobuf.Duration duration = 8; + * + * @return The duration. + */ + com.google.protobuf.Duration getDuration(); + /** + * + * + *
+   * The travel time from previous waypoint to this point. Undefined for the
+   * first waypoint in a list.
+   * 
+ * + * .google.protobuf.Duration duration = 8; + */ + com.google.protobuf.DurationOrBuilder getDurationOrBuilder(); +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/Trips.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/Trips.java new file mode 100644 index 000000000000..8d08c195651d --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/Trips.java @@ -0,0 +1,208 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/trips.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public final class Trips { + private Trips() {} + + 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_maps_fleetengine_v1_Trip_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_v1_Trip_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_v1_StopLocation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_v1_StopLocation_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n&google/maps/fleetengine/v1/trips.proto" + + "\022\023maps.fleetengine.v1\032\037google/api/field_" + + "behavior.proto\032\031google/api/resource.prot" + + "o\032,google/maps/fleetengine/v1/fleetengin" + + "e.proto\032(google/maps/fleetengine/v1/traf" + + "fic.proto\032\036google/protobuf/duration.prot" + + "o\032\037google/protobuf/timestamp.proto\032\036goog" + + "le/protobuf/wrappers.proto\032\030google/type/" + + "latlng.proto\"\267\020\n\004Trip\022\021\n\004name\030\001 \001(\tB\003\340A\003" + + "\022\022\n\nvehicle_id\030\002 \001(\t\0224\n\013trip_status\030\003 \001(" + + "\0162\037.maps.fleetengine.v1.TripStatus\0220\n\ttr" + + "ip_type\030\004 \001(\0162\035.maps.fleetengine.v1.Trip" + + "Type\022;\n\014pickup_point\030\005 \001(\0132%.maps.fleete" + + "ngine.v1.TerminalLocation\022C\n\023actual_pick" + + "up_point\030\026 \001(\0132!.maps.fleetengine.v1.Sto" + + "pLocationB\003\340A\004\022K\n\033actual_pickup_arrival_" + + "point\030 \001(\0132!.maps.fleetengine.v1.StopLo" + + "cationB\003\340A\004\0224\n\013pickup_time\030\006 \001(\0132\032.googl" + + "e.protobuf.TimestampB\003\340A\003\022H\n\031intermediat" + + "e_destinations\030\016 \003(\0132%.maps.fleetengine." + + "v1.TerminalLocation\022E\n!intermediate_dest" + + "inations_version\030\031 \001(\0132\032.google.protobuf" + + ".Timestamp\022&\n\036intermediate_destination_i" + + "ndex\030\017 \001(\005\022^\n.actual_intermediate_destin" + + "ation_arrival_points\030! \003(\0132!.maps.fleete" + + "ngine.v1.StopLocationB\003\340A\004\022P\n actual_int" + + "ermediate_destinations\030\" \003(\0132!.maps.flee" + + "tengine.v1.StopLocationB\003\340A\004\022<\n\rdropoff_" + + "point\030\007 \001(\0132%.maps.fleetengine.v1.Termin" + + "alLocation\022D\n\024actual_dropoff_point\030\027 \001(\013" + + "2!.maps.fleetengine.v1.StopLocationB\003\340A\004" + + "\0225\n\014dropoff_time\030\010 \001(\0132\032.google.protobuf" + + ".TimestampB\003\340A\003\022C\n\023remaining_waypoints\030\020" + + " \003(\0132!.maps.fleetengine.v1.TripWaypointB" + + "\003\340A\003\022<\n\021vehicle_waypoints\030\024 \003(\0132!.maps.f" + + "leetengine.v1.TripWaypoint\022\'\n\005route\030\t \003(" + + "\0132\023.google.type.LatLngB\003\340A\003\022\"\n\025current_r" + + "oute_segment\030\025 \001(\tB\003\340A\003\022F\n\035current_route" + + "_segment_version\030\021 \001(\0132\032.google.protobuf" + + ".TimestampB\003\340A\003\022Z\n\035current_route_segment" + + "_traffic\030\034 \001(\0132..maps.fleetengine.v1.Con" + + "sumableTrafficPolylineB\003\340A\003\022N\n%current_r" + + "oute_segment_traffic_version\030\036 \001(\0132\032.goo" + + "gle.protobuf.TimestampB\003\340A\003\022O\n\037current_r" + + "oute_segment_end_point\030\030 \001(\0132!.maps.flee" + + "tengine.v1.TripWaypointB\003\340A\003\022C\n\031remainin" + + "g_distance_meters\030\014 \001(\0132\033.google.protobu" + + "f.Int32ValueB\003\340A\003\022>\n\025eta_to_first_waypoi" + + "nt\030\r \001(\0132\032.google.protobuf.TimestampB\003\340A" + + "\003\022H\n remaining_time_to_first_waypoint\030\033 " + + "\001(\0132\031.google.protobuf.DurationB\003\340A\003\022D\n\033r" + + "emaining_waypoints_version\030\023 \001(\0132\032.googl" + + "e.protobuf.TimestampB\003\340A\003\022J\n!remaining_w" + + "aypoints_route_version\030\035 \001(\0132\032.google.pr" + + "otobuf.TimestampB\003\340A\003\022!\n\024number_of_passe" + + "ngers\030\n \001(\005B\003\340A\005\022@\n\rlast_location\030\013 \001(\0132" + + "$.maps.fleetengine.v1.VehicleLocationB\003\340" + + "A\003\022$\n\027last_location_snappable\030\032 \001(\010B\003\340A\003" + + "\022+\n\004view\030\037 \001(\0162\035.maps.fleetengine.v1.Tri" + + "pView:G\352AD\n\037fleetengine.googleapis.com/T" + + "rip\022!providers/{provider}/trips/{trip}\"\234" + + "\001\n\014StopLocation\022\'\n\005point\030\001 \001(\0132\023.google." + + "type.LatLngB\003\340A\002\022-\n\ttimestamp\030\002 \001(\0132\032.go" + + "ogle.protobuf.Timestamp\0224\n\tstop_time\030\003 \001" + + "(\0132\032.google.protobuf.TimestampB\005\030\001\340A\004*\342\001" + + "\n\nTripStatus\022\027\n\023UNKNOWN_TRIP_STATUS\020\000\022\007\n" + + "\003NEW\020\001\022\025\n\021ENROUTE_TO_PICKUP\020\002\022\025\n\021ARRIVED" + + "_AT_PICKUP\020\003\022\'\n#ARRIVED_AT_INTERMEDIATE_" + + "DESTINATION\020\007\022\'\n#ENROUTE_TO_INTERMEDIATE" + + "_DESTINATION\020\010\022\026\n\022ENROUTE_TO_DROPOFF\020\004\022\014" + + "\n\010COMPLETE\020\005\022\014\n\010CANCELED\020\006*\177\n\031BillingPla" + + "tformIdentifier\022+\n\'BILLING_PLATFORM_IDEN" + + "TIFIER_UNSPECIFIED\020\000\022\n\n\006SERVER\020\001\022\007\n\003WEB\020" + + "\002\022\013\n\007ANDROID\020\003\022\007\n\003IOS\020\004\022\n\n\006OTHERS\020\005*G\n\010T" + + "ripView\022\031\n\025TRIP_VIEW_UNSPECIFIED\020\000\022\007\n\003SD" + + "K\020\001\022\027\n\023JOURNEY_SHARING_V1S\020\002B\321\001\n\036com.goo" + + "gle.maps.fleetengine.v1B\005TripsP\001ZFcloud." + + "google.com/go/maps/fleetengine/apiv1/fle" + + "etenginepb;fleetenginepb\242\002\003CFE\252\002\032Google." + + "Maps.FleetEngine.V1\312\002\032Google\\Maps\\FleetE" + + "ngine\\V1\352\002\035Google::Maps::FleetEngine::V1" + + "b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.maps.fleetengine.v1.FleetEngine.getDescriptor(), + com.google.maps.fleetengine.v1.TrafficProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.protobuf.WrappersProto.getDescriptor(), + com.google.type.LatLngProto.getDescriptor(), + }); + internal_static_maps_fleetengine_v1_Trip_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_maps_fleetengine_v1_Trip_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_v1_Trip_descriptor, + new java.lang.String[] { + "Name", + "VehicleId", + "TripStatus", + "TripType", + "PickupPoint", + "ActualPickupPoint", + "ActualPickupArrivalPoint", + "PickupTime", + "IntermediateDestinations", + "IntermediateDestinationsVersion", + "IntermediateDestinationIndex", + "ActualIntermediateDestinationArrivalPoints", + "ActualIntermediateDestinations", + "DropoffPoint", + "ActualDropoffPoint", + "DropoffTime", + "RemainingWaypoints", + "VehicleWaypoints", + "Route", + "CurrentRouteSegment", + "CurrentRouteSegmentVersion", + "CurrentRouteSegmentTraffic", + "CurrentRouteSegmentTrafficVersion", + "CurrentRouteSegmentEndPoint", + "RemainingDistanceMeters", + "EtaToFirstWaypoint", + "RemainingTimeToFirstWaypoint", + "RemainingWaypointsVersion", + "RemainingWaypointsRouteVersion", + "NumberOfPassengers", + "LastLocation", + "LastLocationSnappable", + "View", + }); + internal_static_maps_fleetengine_v1_StopLocation_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_maps_fleetengine_v1_StopLocation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_v1_StopLocation_descriptor, + new java.lang.String[] { + "Point", "Timestamp", "StopTime", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.maps.fleetengine.v1.FleetEngine.getDescriptor(); + com.google.maps.fleetengine.v1.TrafficProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.WrappersProto.getDescriptor(); + com.google.type.LatLngProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/UpdateTripRequest.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/UpdateTripRequest.java new file mode 100644 index 000000000000..1fcf26e80005 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/UpdateTripRequest.java @@ -0,0 +1,1953 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/trip_api.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * UpdateTrip request message.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.v1.UpdateTripRequest} + */ +public final class UpdateTripRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.v1.UpdateTripRequest) + UpdateTripRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateTripRequest.newBuilder() to construct. + private UpdateTripRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateTripRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateTripRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.TripApi + .internal_static_maps_fleetengine_v1_UpdateTripRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.TripApi + .internal_static_maps_fleetengine_v1_UpdateTripRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.UpdateTripRequest.class, + com.google.maps.fleetengine.v1.UpdateTripRequest.Builder.class); + } + + private int bitField0_; + public static final int HEADER_FIELD_NUMBER = 1; + private com.google.maps.fleetengine.v1.RequestHeader header_; + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return Whether the header field is set. + */ + @java.lang.Override + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return The header. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.RequestHeader getHeader() { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.RequestHeaderOrBuilder getHeaderOrBuilder() { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } + + public static final int NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Must be in the format
+   * `providers/{provider}/trips/{trip}`. The provider must
+   * be the Project ID (for example, `sample-consumer-project`) of the Google
+   * Cloud Project of which the service account making this call is a member.
+   * 
+ * + * string name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @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. Must be in the format
+   * `providers/{provider}/trips/{trip}`. The provider must
+   * be the Project ID (for example, `sample-consumer-project`) of the Google
+   * Cloud Project of which the service account making this call is a member.
+   * 
+ * + * string name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 TRIP_FIELD_NUMBER = 4; + private com.google.maps.fleetengine.v1.Trip trip_; + /** + * + * + *
+   * Required. The Trip associated with the update.
+   *
+   * The following fields are maintained by the Fleet Engine. Do not update
+   * them using Trip.update.
+   *
+   * * `current_route_segment`
+   * * `current_route_segment_end_point`
+   * * `current_route_segment_traffic`
+   * * `current_route_segment_traffic_version`
+   * * `current_route_segment_version`
+   * * `dropoff_time`
+   * * `eta_to_next_waypoint`
+   * * `intermediate_destinations_version`
+   * * `last_location`
+   * * `name`
+   * * `number_of_passengers`
+   * * `pickup_time`
+   * * `remaining_distance_meters`
+   * * `remaining_time_to_first_waypoint`
+   * * `remaining_waypoints`
+   * * `remaining_waypoints_version`
+   * * `route`
+   *
+   * When you update the `Trip.vehicle_id` for a shared trip, you must supply
+   * the list of `Trip.vehicle_waypoints` to specify the order of the remaining
+   * waypoints, otherwise the order will be undetermined.
+   *
+   * When you specify `Trip.vehicle_waypoints`, the list must contain all
+   * the remaining waypoints of the vehicle's trips, with no extra waypoints.
+   * You must order these waypoints such that for a given trip, the pickup
+   * point is before intermediate destinations, and all intermediate
+   * destinations come before the drop-off point. An `EXCLUSIVE` trip's
+   * waypoints must not interleave with any other trips.
+   * The `trip_id`, `waypoint_type` and `location` fields are used, and all
+   * other TripWaypoint fields in `vehicle_waypoints` are ignored.
+   *
+   * To avoid a race condition for trips with multiple destinations, you
+   * should provide `Trip.intermediate_destinations_version` when updating
+   * the trip status to `ENROUTE_TO_INTERMEDIATE_DESTINATION`. The
+   * `Trip.intermediate_destinations_version` passed must be consistent with
+   * Fleet Engine's version. If it isn't, the request fails.
+   * 
+ * + * .maps.fleetengine.v1.Trip trip = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the trip field is set. + */ + @java.lang.Override + public boolean hasTrip() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Required. The Trip associated with the update.
+   *
+   * The following fields are maintained by the Fleet Engine. Do not update
+   * them using Trip.update.
+   *
+   * * `current_route_segment`
+   * * `current_route_segment_end_point`
+   * * `current_route_segment_traffic`
+   * * `current_route_segment_traffic_version`
+   * * `current_route_segment_version`
+   * * `dropoff_time`
+   * * `eta_to_next_waypoint`
+   * * `intermediate_destinations_version`
+   * * `last_location`
+   * * `name`
+   * * `number_of_passengers`
+   * * `pickup_time`
+   * * `remaining_distance_meters`
+   * * `remaining_time_to_first_waypoint`
+   * * `remaining_waypoints`
+   * * `remaining_waypoints_version`
+   * * `route`
+   *
+   * When you update the `Trip.vehicle_id` for a shared trip, you must supply
+   * the list of `Trip.vehicle_waypoints` to specify the order of the remaining
+   * waypoints, otherwise the order will be undetermined.
+   *
+   * When you specify `Trip.vehicle_waypoints`, the list must contain all
+   * the remaining waypoints of the vehicle's trips, with no extra waypoints.
+   * You must order these waypoints such that for a given trip, the pickup
+   * point is before intermediate destinations, and all intermediate
+   * destinations come before the drop-off point. An `EXCLUSIVE` trip's
+   * waypoints must not interleave with any other trips.
+   * The `trip_id`, `waypoint_type` and `location` fields are used, and all
+   * other TripWaypoint fields in `vehicle_waypoints` are ignored.
+   *
+   * To avoid a race condition for trips with multiple destinations, you
+   * should provide `Trip.intermediate_destinations_version` when updating
+   * the trip status to `ENROUTE_TO_INTERMEDIATE_DESTINATION`. The
+   * `Trip.intermediate_destinations_version` passed must be consistent with
+   * Fleet Engine's version. If it isn't, the request fails.
+   * 
+ * + * .maps.fleetengine.v1.Trip trip = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The trip. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.Trip getTrip() { + return trip_ == null ? com.google.maps.fleetengine.v1.Trip.getDefaultInstance() : trip_; + } + /** + * + * + *
+   * Required. The Trip associated with the update.
+   *
+   * The following fields are maintained by the Fleet Engine. Do not update
+   * them using Trip.update.
+   *
+   * * `current_route_segment`
+   * * `current_route_segment_end_point`
+   * * `current_route_segment_traffic`
+   * * `current_route_segment_traffic_version`
+   * * `current_route_segment_version`
+   * * `dropoff_time`
+   * * `eta_to_next_waypoint`
+   * * `intermediate_destinations_version`
+   * * `last_location`
+   * * `name`
+   * * `number_of_passengers`
+   * * `pickup_time`
+   * * `remaining_distance_meters`
+   * * `remaining_time_to_first_waypoint`
+   * * `remaining_waypoints`
+   * * `remaining_waypoints_version`
+   * * `route`
+   *
+   * When you update the `Trip.vehicle_id` for a shared trip, you must supply
+   * the list of `Trip.vehicle_waypoints` to specify the order of the remaining
+   * waypoints, otherwise the order will be undetermined.
+   *
+   * When you specify `Trip.vehicle_waypoints`, the list must contain all
+   * the remaining waypoints of the vehicle's trips, with no extra waypoints.
+   * You must order these waypoints such that for a given trip, the pickup
+   * point is before intermediate destinations, and all intermediate
+   * destinations come before the drop-off point. An `EXCLUSIVE` trip's
+   * waypoints must not interleave with any other trips.
+   * The `trip_id`, `waypoint_type` and `location` fields are used, and all
+   * other TripWaypoint fields in `vehicle_waypoints` are ignored.
+   *
+   * To avoid a race condition for trips with multiple destinations, you
+   * should provide `Trip.intermediate_destinations_version` when updating
+   * the trip status to `ENROUTE_TO_INTERMEDIATE_DESTINATION`. The
+   * `Trip.intermediate_destinations_version` passed must be consistent with
+   * Fleet Engine's version. If it isn't, the request fails.
+   * 
+ * + * .maps.fleetengine.v1.Trip trip = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TripOrBuilder getTripOrBuilder() { + return trip_ == null ? com.google.maps.fleetengine.v1.Trip.getDefaultInstance() : trip_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 5; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. The field mask indicating which fields in Trip to update.
+   * The `update_mask` must contain at least one field.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Required. The field mask indicating which fields in Trip to update.
+   * The `update_mask` must contain at least one field.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. The field mask indicating which fields in Trip to update.
+   * The `update_mask` must contain at least one field.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + 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, getHeader()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getTrip()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(5, getUpdateMask()); + } + 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, getHeader()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getTrip()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateMask()); + } + 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.fleetengine.v1.UpdateTripRequest)) { + return super.equals(obj); + } + com.google.maps.fleetengine.v1.UpdateTripRequest other = + (com.google.maps.fleetengine.v1.UpdateTripRequest) obj; + + if (hasHeader() != other.hasHeader()) return false; + if (hasHeader()) { + if (!getHeader().equals(other.getHeader())) return false; + } + if (!getName().equals(other.getName())) return false; + if (hasTrip() != other.hasTrip()) return false; + if (hasTrip()) { + if (!getTrip().equals(other.getTrip())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) 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 (hasHeader()) { + hash = (37 * hash) + HEADER_FIELD_NUMBER; + hash = (53 * hash) + getHeader().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasTrip()) { + hash = (37 * hash) + TRIP_FIELD_NUMBER; + hash = (53 * hash) + getTrip().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.fleetengine.v1.UpdateTripRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.UpdateTripRequest 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.fleetengine.v1.UpdateTripRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.UpdateTripRequest 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.fleetengine.v1.UpdateTripRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.UpdateTripRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.UpdateTripRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.UpdateTripRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.UpdateTripRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.UpdateTripRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.UpdateTripRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.UpdateTripRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.fleetengine.v1.UpdateTripRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * UpdateTrip request message.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.v1.UpdateTripRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.v1.UpdateTripRequest) + com.google.maps.fleetengine.v1.UpdateTripRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.TripApi + .internal_static_maps_fleetengine_v1_UpdateTripRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.TripApi + .internal_static_maps_fleetengine_v1_UpdateTripRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.UpdateTripRequest.class, + com.google.maps.fleetengine.v1.UpdateTripRequest.Builder.class); + } + + // Construct using com.google.maps.fleetengine.v1.UpdateTripRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getHeaderFieldBuilder(); + getTripFieldBuilder(); + getUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + name_ = ""; + trip_ = null; + if (tripBuilder_ != null) { + tripBuilder_.dispose(); + tripBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.fleetengine.v1.TripApi + .internal_static_maps_fleetengine_v1_UpdateTripRequest_descriptor; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.UpdateTripRequest getDefaultInstanceForType() { + return com.google.maps.fleetengine.v1.UpdateTripRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.UpdateTripRequest build() { + com.google.maps.fleetengine.v1.UpdateTripRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.UpdateTripRequest buildPartial() { + com.google.maps.fleetengine.v1.UpdateTripRequest result = + new com.google.maps.fleetengine.v1.UpdateTripRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.fleetengine.v1.UpdateTripRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.header_ = headerBuilder_ == null ? header_ : headerBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.trip_ = tripBuilder_ == null ? trip_ : tripBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.fleetengine.v1.UpdateTripRequest) { + return mergeFrom((com.google.maps.fleetengine.v1.UpdateTripRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.fleetengine.v1.UpdateTripRequest other) { + if (other == com.google.maps.fleetengine.v1.UpdateTripRequest.getDefaultInstance()) + return this; + if (other.hasHeader()) { + mergeHeader(other.getHeader()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasTrip()) { + mergeTrip(other.getTrip()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + 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(getHeaderFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 34: + { + input.readMessage(getTripFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 34 + case 42: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.maps.fleetengine.v1.RequestHeader header_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.RequestHeader, + com.google.maps.fleetengine.v1.RequestHeader.Builder, + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder> + headerBuilder_; + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return Whether the header field is set. + */ + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return The header. + */ + public com.google.maps.fleetengine.v1.RequestHeader getHeader() { + if (headerBuilder_ == null) { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } else { + return headerBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public Builder setHeader(com.google.maps.fleetengine.v1.RequestHeader value) { + if (headerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + header_ = value; + } else { + headerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public Builder setHeader(com.google.maps.fleetengine.v1.RequestHeader.Builder builderForValue) { + if (headerBuilder_ == null) { + header_ = builderForValue.build(); + } else { + headerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public Builder mergeHeader(com.google.maps.fleetengine.v1.RequestHeader value) { + if (headerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && header_ != null + && header_ != com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance()) { + getHeaderBuilder().mergeFrom(value); + } else { + header_ = value; + } + } else { + headerBuilder_.mergeFrom(value); + } + if (header_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public Builder clearHeader() { + bitField0_ = (bitField0_ & ~0x00000001); + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public com.google.maps.fleetengine.v1.RequestHeader.Builder getHeaderBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getHeaderFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public com.google.maps.fleetengine.v1.RequestHeaderOrBuilder getHeaderOrBuilder() { + if (headerBuilder_ != null) { + return headerBuilder_.getMessageOrBuilder(); + } else { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.RequestHeader, + com.google.maps.fleetengine.v1.RequestHeader.Builder, + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder> + getHeaderFieldBuilder() { + if (headerBuilder_ == null) { + headerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.RequestHeader, + com.google.maps.fleetengine.v1.RequestHeader.Builder, + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder>( + getHeader(), getParentForChildren(), isClean()); + header_ = null; + } + return headerBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Must be in the format
+     * `providers/{provider}/trips/{trip}`. The provider must
+     * be the Project ID (for example, `sample-consumer-project`) of the Google
+     * Cloud Project of which the service account making this call is a member.
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @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. Must be in the format
+     * `providers/{provider}/trips/{trip}`. The provider must
+     * be the Project ID (for example, `sample-consumer-project`) of the Google
+     * Cloud Project of which the service account making this call is a member.
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @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. Must be in the format
+     * `providers/{provider}/trips/{trip}`. The provider must
+     * be the Project ID (for example, `sample-consumer-project`) of the Google
+     * Cloud Project of which the service account making this call is a member.
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Must be in the format
+     * `providers/{provider}/trips/{trip}`. The provider must
+     * be the Project ID (for example, `sample-consumer-project`) of the Google
+     * Cloud Project of which the service account making this call is a member.
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Must be in the format
+     * `providers/{provider}/trips/{trip}`. The provider must
+     * be the Project ID (for example, `sample-consumer-project`) of the Google
+     * Cloud Project of which the service account making this call is a member.
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.maps.fleetengine.v1.Trip trip_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.Trip, + com.google.maps.fleetengine.v1.Trip.Builder, + com.google.maps.fleetengine.v1.TripOrBuilder> + tripBuilder_; + /** + * + * + *
+     * Required. The Trip associated with the update.
+     *
+     * The following fields are maintained by the Fleet Engine. Do not update
+     * them using Trip.update.
+     *
+     * * `current_route_segment`
+     * * `current_route_segment_end_point`
+     * * `current_route_segment_traffic`
+     * * `current_route_segment_traffic_version`
+     * * `current_route_segment_version`
+     * * `dropoff_time`
+     * * `eta_to_next_waypoint`
+     * * `intermediate_destinations_version`
+     * * `last_location`
+     * * `name`
+     * * `number_of_passengers`
+     * * `pickup_time`
+     * * `remaining_distance_meters`
+     * * `remaining_time_to_first_waypoint`
+     * * `remaining_waypoints`
+     * * `remaining_waypoints_version`
+     * * `route`
+     *
+     * When you update the `Trip.vehicle_id` for a shared trip, you must supply
+     * the list of `Trip.vehicle_waypoints` to specify the order of the remaining
+     * waypoints, otherwise the order will be undetermined.
+     *
+     * When you specify `Trip.vehicle_waypoints`, the list must contain all
+     * the remaining waypoints of the vehicle's trips, with no extra waypoints.
+     * You must order these waypoints such that for a given trip, the pickup
+     * point is before intermediate destinations, and all intermediate
+     * destinations come before the drop-off point. An `EXCLUSIVE` trip's
+     * waypoints must not interleave with any other trips.
+     * The `trip_id`, `waypoint_type` and `location` fields are used, and all
+     * other TripWaypoint fields in `vehicle_waypoints` are ignored.
+     *
+     * To avoid a race condition for trips with multiple destinations, you
+     * should provide `Trip.intermediate_destinations_version` when updating
+     * the trip status to `ENROUTE_TO_INTERMEDIATE_DESTINATION`. The
+     * `Trip.intermediate_destinations_version` passed must be consistent with
+     * Fleet Engine's version. If it isn't, the request fails.
+     * 
+ * + * .maps.fleetengine.v1.Trip trip = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the trip field is set. + */ + public boolean hasTrip() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The Trip associated with the update.
+     *
+     * The following fields are maintained by the Fleet Engine. Do not update
+     * them using Trip.update.
+     *
+     * * `current_route_segment`
+     * * `current_route_segment_end_point`
+     * * `current_route_segment_traffic`
+     * * `current_route_segment_traffic_version`
+     * * `current_route_segment_version`
+     * * `dropoff_time`
+     * * `eta_to_next_waypoint`
+     * * `intermediate_destinations_version`
+     * * `last_location`
+     * * `name`
+     * * `number_of_passengers`
+     * * `pickup_time`
+     * * `remaining_distance_meters`
+     * * `remaining_time_to_first_waypoint`
+     * * `remaining_waypoints`
+     * * `remaining_waypoints_version`
+     * * `route`
+     *
+     * When you update the `Trip.vehicle_id` for a shared trip, you must supply
+     * the list of `Trip.vehicle_waypoints` to specify the order of the remaining
+     * waypoints, otherwise the order will be undetermined.
+     *
+     * When you specify `Trip.vehicle_waypoints`, the list must contain all
+     * the remaining waypoints of the vehicle's trips, with no extra waypoints.
+     * You must order these waypoints such that for a given trip, the pickup
+     * point is before intermediate destinations, and all intermediate
+     * destinations come before the drop-off point. An `EXCLUSIVE` trip's
+     * waypoints must not interleave with any other trips.
+     * The `trip_id`, `waypoint_type` and `location` fields are used, and all
+     * other TripWaypoint fields in `vehicle_waypoints` are ignored.
+     *
+     * To avoid a race condition for trips with multiple destinations, you
+     * should provide `Trip.intermediate_destinations_version` when updating
+     * the trip status to `ENROUTE_TO_INTERMEDIATE_DESTINATION`. The
+     * `Trip.intermediate_destinations_version` passed must be consistent with
+     * Fleet Engine's version. If it isn't, the request fails.
+     * 
+ * + * .maps.fleetengine.v1.Trip trip = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The trip. + */ + public com.google.maps.fleetengine.v1.Trip getTrip() { + if (tripBuilder_ == null) { + return trip_ == null ? com.google.maps.fleetengine.v1.Trip.getDefaultInstance() : trip_; + } else { + return tripBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The Trip associated with the update.
+     *
+     * The following fields are maintained by the Fleet Engine. Do not update
+     * them using Trip.update.
+     *
+     * * `current_route_segment`
+     * * `current_route_segment_end_point`
+     * * `current_route_segment_traffic`
+     * * `current_route_segment_traffic_version`
+     * * `current_route_segment_version`
+     * * `dropoff_time`
+     * * `eta_to_next_waypoint`
+     * * `intermediate_destinations_version`
+     * * `last_location`
+     * * `name`
+     * * `number_of_passengers`
+     * * `pickup_time`
+     * * `remaining_distance_meters`
+     * * `remaining_time_to_first_waypoint`
+     * * `remaining_waypoints`
+     * * `remaining_waypoints_version`
+     * * `route`
+     *
+     * When you update the `Trip.vehicle_id` for a shared trip, you must supply
+     * the list of `Trip.vehicle_waypoints` to specify the order of the remaining
+     * waypoints, otherwise the order will be undetermined.
+     *
+     * When you specify `Trip.vehicle_waypoints`, the list must contain all
+     * the remaining waypoints of the vehicle's trips, with no extra waypoints.
+     * You must order these waypoints such that for a given trip, the pickup
+     * point is before intermediate destinations, and all intermediate
+     * destinations come before the drop-off point. An `EXCLUSIVE` trip's
+     * waypoints must not interleave with any other trips.
+     * The `trip_id`, `waypoint_type` and `location` fields are used, and all
+     * other TripWaypoint fields in `vehicle_waypoints` are ignored.
+     *
+     * To avoid a race condition for trips with multiple destinations, you
+     * should provide `Trip.intermediate_destinations_version` when updating
+     * the trip status to `ENROUTE_TO_INTERMEDIATE_DESTINATION`. The
+     * `Trip.intermediate_destinations_version` passed must be consistent with
+     * Fleet Engine's version. If it isn't, the request fails.
+     * 
+ * + * .maps.fleetengine.v1.Trip trip = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setTrip(com.google.maps.fleetengine.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 associated with the update.
+     *
+     * The following fields are maintained by the Fleet Engine. Do not update
+     * them using Trip.update.
+     *
+     * * `current_route_segment`
+     * * `current_route_segment_end_point`
+     * * `current_route_segment_traffic`
+     * * `current_route_segment_traffic_version`
+     * * `current_route_segment_version`
+     * * `dropoff_time`
+     * * `eta_to_next_waypoint`
+     * * `intermediate_destinations_version`
+     * * `last_location`
+     * * `name`
+     * * `number_of_passengers`
+     * * `pickup_time`
+     * * `remaining_distance_meters`
+     * * `remaining_time_to_first_waypoint`
+     * * `remaining_waypoints`
+     * * `remaining_waypoints_version`
+     * * `route`
+     *
+     * When you update the `Trip.vehicle_id` for a shared trip, you must supply
+     * the list of `Trip.vehicle_waypoints` to specify the order of the remaining
+     * waypoints, otherwise the order will be undetermined.
+     *
+     * When you specify `Trip.vehicle_waypoints`, the list must contain all
+     * the remaining waypoints of the vehicle's trips, with no extra waypoints.
+     * You must order these waypoints such that for a given trip, the pickup
+     * point is before intermediate destinations, and all intermediate
+     * destinations come before the drop-off point. An `EXCLUSIVE` trip's
+     * waypoints must not interleave with any other trips.
+     * The `trip_id`, `waypoint_type` and `location` fields are used, and all
+     * other TripWaypoint fields in `vehicle_waypoints` are ignored.
+     *
+     * To avoid a race condition for trips with multiple destinations, you
+     * should provide `Trip.intermediate_destinations_version` when updating
+     * the trip status to `ENROUTE_TO_INTERMEDIATE_DESTINATION`. The
+     * `Trip.intermediate_destinations_version` passed must be consistent with
+     * Fleet Engine's version. If it isn't, the request fails.
+     * 
+ * + * .maps.fleetengine.v1.Trip trip = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setTrip(com.google.maps.fleetengine.v1.Trip.Builder builderForValue) { + if (tripBuilder_ == null) { + trip_ = builderForValue.build(); + } else { + tripBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Trip associated with the update.
+     *
+     * The following fields are maintained by the Fleet Engine. Do not update
+     * them using Trip.update.
+     *
+     * * `current_route_segment`
+     * * `current_route_segment_end_point`
+     * * `current_route_segment_traffic`
+     * * `current_route_segment_traffic_version`
+     * * `current_route_segment_version`
+     * * `dropoff_time`
+     * * `eta_to_next_waypoint`
+     * * `intermediate_destinations_version`
+     * * `last_location`
+     * * `name`
+     * * `number_of_passengers`
+     * * `pickup_time`
+     * * `remaining_distance_meters`
+     * * `remaining_time_to_first_waypoint`
+     * * `remaining_waypoints`
+     * * `remaining_waypoints_version`
+     * * `route`
+     *
+     * When you update the `Trip.vehicle_id` for a shared trip, you must supply
+     * the list of `Trip.vehicle_waypoints` to specify the order of the remaining
+     * waypoints, otherwise the order will be undetermined.
+     *
+     * When you specify `Trip.vehicle_waypoints`, the list must contain all
+     * the remaining waypoints of the vehicle's trips, with no extra waypoints.
+     * You must order these waypoints such that for a given trip, the pickup
+     * point is before intermediate destinations, and all intermediate
+     * destinations come before the drop-off point. An `EXCLUSIVE` trip's
+     * waypoints must not interleave with any other trips.
+     * The `trip_id`, `waypoint_type` and `location` fields are used, and all
+     * other TripWaypoint fields in `vehicle_waypoints` are ignored.
+     *
+     * To avoid a race condition for trips with multiple destinations, you
+     * should provide `Trip.intermediate_destinations_version` when updating
+     * the trip status to `ENROUTE_TO_INTERMEDIATE_DESTINATION`. The
+     * `Trip.intermediate_destinations_version` passed must be consistent with
+     * Fleet Engine's version. If it isn't, the request fails.
+     * 
+ * + * .maps.fleetengine.v1.Trip trip = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeTrip(com.google.maps.fleetengine.v1.Trip value) { + if (tripBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && trip_ != null + && trip_ != com.google.maps.fleetengine.v1.Trip.getDefaultInstance()) { + getTripBuilder().mergeFrom(value); + } else { + trip_ = value; + } + } else { + tripBuilder_.mergeFrom(value); + } + if (trip_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The Trip associated with the update.
+     *
+     * The following fields are maintained by the Fleet Engine. Do not update
+     * them using Trip.update.
+     *
+     * * `current_route_segment`
+     * * `current_route_segment_end_point`
+     * * `current_route_segment_traffic`
+     * * `current_route_segment_traffic_version`
+     * * `current_route_segment_version`
+     * * `dropoff_time`
+     * * `eta_to_next_waypoint`
+     * * `intermediate_destinations_version`
+     * * `last_location`
+     * * `name`
+     * * `number_of_passengers`
+     * * `pickup_time`
+     * * `remaining_distance_meters`
+     * * `remaining_time_to_first_waypoint`
+     * * `remaining_waypoints`
+     * * `remaining_waypoints_version`
+     * * `route`
+     *
+     * When you update the `Trip.vehicle_id` for a shared trip, you must supply
+     * the list of `Trip.vehicle_waypoints` to specify the order of the remaining
+     * waypoints, otherwise the order will be undetermined.
+     *
+     * When you specify `Trip.vehicle_waypoints`, the list must contain all
+     * the remaining waypoints of the vehicle's trips, with no extra waypoints.
+     * You must order these waypoints such that for a given trip, the pickup
+     * point is before intermediate destinations, and all intermediate
+     * destinations come before the drop-off point. An `EXCLUSIVE` trip's
+     * waypoints must not interleave with any other trips.
+     * The `trip_id`, `waypoint_type` and `location` fields are used, and all
+     * other TripWaypoint fields in `vehicle_waypoints` are ignored.
+     *
+     * To avoid a race condition for trips with multiple destinations, you
+     * should provide `Trip.intermediate_destinations_version` when updating
+     * the trip status to `ENROUTE_TO_INTERMEDIATE_DESTINATION`. The
+     * `Trip.intermediate_destinations_version` passed must be consistent with
+     * Fleet Engine's version. If it isn't, the request fails.
+     * 
+ * + * .maps.fleetengine.v1.Trip trip = 4 [(.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 associated with the update.
+     *
+     * The following fields are maintained by the Fleet Engine. Do not update
+     * them using Trip.update.
+     *
+     * * `current_route_segment`
+     * * `current_route_segment_end_point`
+     * * `current_route_segment_traffic`
+     * * `current_route_segment_traffic_version`
+     * * `current_route_segment_version`
+     * * `dropoff_time`
+     * * `eta_to_next_waypoint`
+     * * `intermediate_destinations_version`
+     * * `last_location`
+     * * `name`
+     * * `number_of_passengers`
+     * * `pickup_time`
+     * * `remaining_distance_meters`
+     * * `remaining_time_to_first_waypoint`
+     * * `remaining_waypoints`
+     * * `remaining_waypoints_version`
+     * * `route`
+     *
+     * When you update the `Trip.vehicle_id` for a shared trip, you must supply
+     * the list of `Trip.vehicle_waypoints` to specify the order of the remaining
+     * waypoints, otherwise the order will be undetermined.
+     *
+     * When you specify `Trip.vehicle_waypoints`, the list must contain all
+     * the remaining waypoints of the vehicle's trips, with no extra waypoints.
+     * You must order these waypoints such that for a given trip, the pickup
+     * point is before intermediate destinations, and all intermediate
+     * destinations come before the drop-off point. An `EXCLUSIVE` trip's
+     * waypoints must not interleave with any other trips.
+     * The `trip_id`, `waypoint_type` and `location` fields are used, and all
+     * other TripWaypoint fields in `vehicle_waypoints` are ignored.
+     *
+     * To avoid a race condition for trips with multiple destinations, you
+     * should provide `Trip.intermediate_destinations_version` when updating
+     * the trip status to `ENROUTE_TO_INTERMEDIATE_DESTINATION`. The
+     * `Trip.intermediate_destinations_version` passed must be consistent with
+     * Fleet Engine's version. If it isn't, the request fails.
+     * 
+ * + * .maps.fleetengine.v1.Trip trip = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.maps.fleetengine.v1.Trip.Builder getTripBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getTripFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The Trip associated with the update.
+     *
+     * The following fields are maintained by the Fleet Engine. Do not update
+     * them using Trip.update.
+     *
+     * * `current_route_segment`
+     * * `current_route_segment_end_point`
+     * * `current_route_segment_traffic`
+     * * `current_route_segment_traffic_version`
+     * * `current_route_segment_version`
+     * * `dropoff_time`
+     * * `eta_to_next_waypoint`
+     * * `intermediate_destinations_version`
+     * * `last_location`
+     * * `name`
+     * * `number_of_passengers`
+     * * `pickup_time`
+     * * `remaining_distance_meters`
+     * * `remaining_time_to_first_waypoint`
+     * * `remaining_waypoints`
+     * * `remaining_waypoints_version`
+     * * `route`
+     *
+     * When you update the `Trip.vehicle_id` for a shared trip, you must supply
+     * the list of `Trip.vehicle_waypoints` to specify the order of the remaining
+     * waypoints, otherwise the order will be undetermined.
+     *
+     * When you specify `Trip.vehicle_waypoints`, the list must contain all
+     * the remaining waypoints of the vehicle's trips, with no extra waypoints.
+     * You must order these waypoints such that for a given trip, the pickup
+     * point is before intermediate destinations, and all intermediate
+     * destinations come before the drop-off point. An `EXCLUSIVE` trip's
+     * waypoints must not interleave with any other trips.
+     * The `trip_id`, `waypoint_type` and `location` fields are used, and all
+     * other TripWaypoint fields in `vehicle_waypoints` are ignored.
+     *
+     * To avoid a race condition for trips with multiple destinations, you
+     * should provide `Trip.intermediate_destinations_version` when updating
+     * the trip status to `ENROUTE_TO_INTERMEDIATE_DESTINATION`. The
+     * `Trip.intermediate_destinations_version` passed must be consistent with
+     * Fleet Engine's version. If it isn't, the request fails.
+     * 
+ * + * .maps.fleetengine.v1.Trip trip = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.maps.fleetengine.v1.TripOrBuilder getTripOrBuilder() { + if (tripBuilder_ != null) { + return tripBuilder_.getMessageOrBuilder(); + } else { + return trip_ == null ? com.google.maps.fleetengine.v1.Trip.getDefaultInstance() : trip_; + } + } + /** + * + * + *
+     * Required. The Trip associated with the update.
+     *
+     * The following fields are maintained by the Fleet Engine. Do not update
+     * them using Trip.update.
+     *
+     * * `current_route_segment`
+     * * `current_route_segment_end_point`
+     * * `current_route_segment_traffic`
+     * * `current_route_segment_traffic_version`
+     * * `current_route_segment_version`
+     * * `dropoff_time`
+     * * `eta_to_next_waypoint`
+     * * `intermediate_destinations_version`
+     * * `last_location`
+     * * `name`
+     * * `number_of_passengers`
+     * * `pickup_time`
+     * * `remaining_distance_meters`
+     * * `remaining_time_to_first_waypoint`
+     * * `remaining_waypoints`
+     * * `remaining_waypoints_version`
+     * * `route`
+     *
+     * When you update the `Trip.vehicle_id` for a shared trip, you must supply
+     * the list of `Trip.vehicle_waypoints` to specify the order of the remaining
+     * waypoints, otherwise the order will be undetermined.
+     *
+     * When you specify `Trip.vehicle_waypoints`, the list must contain all
+     * the remaining waypoints of the vehicle's trips, with no extra waypoints.
+     * You must order these waypoints such that for a given trip, the pickup
+     * point is before intermediate destinations, and all intermediate
+     * destinations come before the drop-off point. An `EXCLUSIVE` trip's
+     * waypoints must not interleave with any other trips.
+     * The `trip_id`, `waypoint_type` and `location` fields are used, and all
+     * other TripWaypoint fields in `vehicle_waypoints` are ignored.
+     *
+     * To avoid a race condition for trips with multiple destinations, you
+     * should provide `Trip.intermediate_destinations_version` when updating
+     * the trip status to `ENROUTE_TO_INTERMEDIATE_DESTINATION`. The
+     * `Trip.intermediate_destinations_version` passed must be consistent with
+     * Fleet Engine's version. If it isn't, the request fails.
+     * 
+ * + * .maps.fleetengine.v1.Trip trip = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.Trip, + com.google.maps.fleetengine.v1.Trip.Builder, + com.google.maps.fleetengine.v1.TripOrBuilder> + getTripFieldBuilder() { + if (tripBuilder_ == null) { + tripBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.Trip, + com.google.maps.fleetengine.v1.Trip.Builder, + com.google.maps.fleetengine.v1.TripOrBuilder>( + getTrip(), getParentForChildren(), isClean()); + trip_ = null; + } + return tripBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. The field mask indicating which fields in Trip to update.
+     * The `update_mask` must contain at least one field.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Required. The field mask indicating which fields in Trip to update.
+     * The `update_mask` must contain at least one field.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The field mask indicating which fields in Trip to update.
+     * The `update_mask` must contain at least one field.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The field mask indicating which fields in Trip to update.
+     * The `update_mask` must contain at least one field.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The field mask indicating which fields in Trip to update.
+     * The `update_mask` must contain at least one field.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The field mask indicating which fields in Trip to update.
+     * The `update_mask` must contain at least one field.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000008); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The field mask indicating which fields in Trip to update.
+     * The `update_mask` must contain at least one field.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The field mask indicating which fields in Trip to update.
+     * The `update_mask` must contain at least one field.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. The field mask indicating which fields in Trip to update.
+     * The `update_mask` must contain at least one field.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:maps.fleetengine.v1.UpdateTripRequest) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.v1.UpdateTripRequest) + private static final com.google.maps.fleetengine.v1.UpdateTripRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.fleetengine.v1.UpdateTripRequest(); + } + + public static com.google.maps.fleetengine.v1.UpdateTripRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateTripRequest 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.fleetengine.v1.UpdateTripRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/UpdateTripRequestOrBuilder.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/UpdateTripRequestOrBuilder.java new file mode 100644 index 000000000000..da3dda04ee8e --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/UpdateTripRequestOrBuilder.java @@ -0,0 +1,288 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/trip_api.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public interface UpdateTripRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.v1.UpdateTripRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return Whether the header field is set. + */ + boolean hasHeader(); + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return The header. + */ + com.google.maps.fleetengine.v1.RequestHeader getHeader(); + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder getHeaderOrBuilder(); + + /** + * + * + *
+   * Required. Must be in the format
+   * `providers/{provider}/trips/{trip}`. The provider must
+   * be the Project ID (for example, `sample-consumer-project`) of the Google
+   * Cloud Project of which the service account making this call is a member.
+   * 
+ * + * string name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Must be in the format
+   * `providers/{provider}/trips/{trip}`. The provider must
+   * be the Project ID (for example, `sample-consumer-project`) of the Google
+   * Cloud Project of which the service account making this call is a member.
+   * 
+ * + * string name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The Trip associated with the update.
+   *
+   * The following fields are maintained by the Fleet Engine. Do not update
+   * them using Trip.update.
+   *
+   * * `current_route_segment`
+   * * `current_route_segment_end_point`
+   * * `current_route_segment_traffic`
+   * * `current_route_segment_traffic_version`
+   * * `current_route_segment_version`
+   * * `dropoff_time`
+   * * `eta_to_next_waypoint`
+   * * `intermediate_destinations_version`
+   * * `last_location`
+   * * `name`
+   * * `number_of_passengers`
+   * * `pickup_time`
+   * * `remaining_distance_meters`
+   * * `remaining_time_to_first_waypoint`
+   * * `remaining_waypoints`
+   * * `remaining_waypoints_version`
+   * * `route`
+   *
+   * When you update the `Trip.vehicle_id` for a shared trip, you must supply
+   * the list of `Trip.vehicle_waypoints` to specify the order of the remaining
+   * waypoints, otherwise the order will be undetermined.
+   *
+   * When you specify `Trip.vehicle_waypoints`, the list must contain all
+   * the remaining waypoints of the vehicle's trips, with no extra waypoints.
+   * You must order these waypoints such that for a given trip, the pickup
+   * point is before intermediate destinations, and all intermediate
+   * destinations come before the drop-off point. An `EXCLUSIVE` trip's
+   * waypoints must not interleave with any other trips.
+   * The `trip_id`, `waypoint_type` and `location` fields are used, and all
+   * other TripWaypoint fields in `vehicle_waypoints` are ignored.
+   *
+   * To avoid a race condition for trips with multiple destinations, you
+   * should provide `Trip.intermediate_destinations_version` when updating
+   * the trip status to `ENROUTE_TO_INTERMEDIATE_DESTINATION`. The
+   * `Trip.intermediate_destinations_version` passed must be consistent with
+   * Fleet Engine's version. If it isn't, the request fails.
+   * 
+ * + * .maps.fleetengine.v1.Trip trip = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the trip field is set. + */ + boolean hasTrip(); + /** + * + * + *
+   * Required. The Trip associated with the update.
+   *
+   * The following fields are maintained by the Fleet Engine. Do not update
+   * them using Trip.update.
+   *
+   * * `current_route_segment`
+   * * `current_route_segment_end_point`
+   * * `current_route_segment_traffic`
+   * * `current_route_segment_traffic_version`
+   * * `current_route_segment_version`
+   * * `dropoff_time`
+   * * `eta_to_next_waypoint`
+   * * `intermediate_destinations_version`
+   * * `last_location`
+   * * `name`
+   * * `number_of_passengers`
+   * * `pickup_time`
+   * * `remaining_distance_meters`
+   * * `remaining_time_to_first_waypoint`
+   * * `remaining_waypoints`
+   * * `remaining_waypoints_version`
+   * * `route`
+   *
+   * When you update the `Trip.vehicle_id` for a shared trip, you must supply
+   * the list of `Trip.vehicle_waypoints` to specify the order of the remaining
+   * waypoints, otherwise the order will be undetermined.
+   *
+   * When you specify `Trip.vehicle_waypoints`, the list must contain all
+   * the remaining waypoints of the vehicle's trips, with no extra waypoints.
+   * You must order these waypoints such that for a given trip, the pickup
+   * point is before intermediate destinations, and all intermediate
+   * destinations come before the drop-off point. An `EXCLUSIVE` trip's
+   * waypoints must not interleave with any other trips.
+   * The `trip_id`, `waypoint_type` and `location` fields are used, and all
+   * other TripWaypoint fields in `vehicle_waypoints` are ignored.
+   *
+   * To avoid a race condition for trips with multiple destinations, you
+   * should provide `Trip.intermediate_destinations_version` when updating
+   * the trip status to `ENROUTE_TO_INTERMEDIATE_DESTINATION`. The
+   * `Trip.intermediate_destinations_version` passed must be consistent with
+   * Fleet Engine's version. If it isn't, the request fails.
+   * 
+ * + * .maps.fleetengine.v1.Trip trip = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The trip. + */ + com.google.maps.fleetengine.v1.Trip getTrip(); + /** + * + * + *
+   * Required. The Trip associated with the update.
+   *
+   * The following fields are maintained by the Fleet Engine. Do not update
+   * them using Trip.update.
+   *
+   * * `current_route_segment`
+   * * `current_route_segment_end_point`
+   * * `current_route_segment_traffic`
+   * * `current_route_segment_traffic_version`
+   * * `current_route_segment_version`
+   * * `dropoff_time`
+   * * `eta_to_next_waypoint`
+   * * `intermediate_destinations_version`
+   * * `last_location`
+   * * `name`
+   * * `number_of_passengers`
+   * * `pickup_time`
+   * * `remaining_distance_meters`
+   * * `remaining_time_to_first_waypoint`
+   * * `remaining_waypoints`
+   * * `remaining_waypoints_version`
+   * * `route`
+   *
+   * When you update the `Trip.vehicle_id` for a shared trip, you must supply
+   * the list of `Trip.vehicle_waypoints` to specify the order of the remaining
+   * waypoints, otherwise the order will be undetermined.
+   *
+   * When you specify `Trip.vehicle_waypoints`, the list must contain all
+   * the remaining waypoints of the vehicle's trips, with no extra waypoints.
+   * You must order these waypoints such that for a given trip, the pickup
+   * point is before intermediate destinations, and all intermediate
+   * destinations come before the drop-off point. An `EXCLUSIVE` trip's
+   * waypoints must not interleave with any other trips.
+   * The `trip_id`, `waypoint_type` and `location` fields are used, and all
+   * other TripWaypoint fields in `vehicle_waypoints` are ignored.
+   *
+   * To avoid a race condition for trips with multiple destinations, you
+   * should provide `Trip.intermediate_destinations_version` when updating
+   * the trip status to `ENROUTE_TO_INTERMEDIATE_DESTINATION`. The
+   * `Trip.intermediate_destinations_version` passed must be consistent with
+   * Fleet Engine's version. If it isn't, the request fails.
+   * 
+ * + * .maps.fleetengine.v1.Trip trip = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.maps.fleetengine.v1.TripOrBuilder getTripOrBuilder(); + + /** + * + * + *
+   * Required. The field mask indicating which fields in Trip to update.
+   * The `update_mask` must contain at least one field.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. The field mask indicating which fields in Trip to update.
+   * The `update_mask` must contain at least one field.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. The field mask indicating which fields in Trip to update.
+   * The `update_mask` must contain at least one field.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/UpdateVehicleAttributesRequest.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/UpdateVehicleAttributesRequest.java new file mode 100644 index 000000000000..76cd9b93c8d1 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/UpdateVehicleAttributesRequest.java @@ -0,0 +1,1499 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicle_api.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * `UpdateVehicleAttributes` request message.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.v1.UpdateVehicleAttributesRequest} + */ +public final class UpdateVehicleAttributesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.v1.UpdateVehicleAttributesRequest) + UpdateVehicleAttributesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateVehicleAttributesRequest.newBuilder() to construct. + private UpdateVehicleAttributesRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateVehicleAttributesRequest() { + name_ = ""; + attributes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateVehicleAttributesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_UpdateVehicleAttributesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_UpdateVehicleAttributesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest.class, + com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest.Builder.class); + } + + private int bitField0_; + public static final int HEADER_FIELD_NUMBER = 1; + private com.google.maps.fleetengine.v1.RequestHeader header_; + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return Whether the header field is set. + */ + @java.lang.Override + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return The header. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.RequestHeader getHeader() { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.RequestHeaderOrBuilder getHeaderOrBuilder() { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } + + public static final int NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Must be in the format `providers/{provider}/vehicles/{vehicle}`.
+   * The provider must be the Project ID (for example, `sample-cloud-project`)
+   * of the Google Cloud Project of which the service account making
+   * this call is a member.
+   * 
+ * + * string name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @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. Must be in the format `providers/{provider}/vehicles/{vehicle}`.
+   * The provider must be the Project ID (for example, `sample-cloud-project`)
+   * of the Google Cloud Project of which the service account making
+   * this call is a member.
+   * 
+ * + * string name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 ATTRIBUTES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List attributes_; + /** + * + * + *
+   * Required. The vehicle attributes to update. Unmentioned attributes are not
+   * altered or removed.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getAttributesList() { + return attributes_; + } + /** + * + * + *
+   * Required. The vehicle attributes to update. Unmentioned attributes are not
+   * altered or removed.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getAttributesOrBuilderList() { + return attributes_; + } + /** + * + * + *
+   * Required. The vehicle attributes to update. Unmentioned attributes are not
+   * altered or removed.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getAttributesCount() { + return attributes_.size(); + } + /** + * + * + *
+   * Required. The vehicle attributes to update. Unmentioned attributes are not
+   * altered or removed.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleAttribute getAttributes(int index) { + return attributes_.get(index); + } + /** + * + * + *
+   * Required. The vehicle attributes to update. Unmentioned attributes are not
+   * altered or removed.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleAttributeOrBuilder getAttributesOrBuilder( + int index) { + return attributes_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getHeader()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); + } + for (int i = 0; i < attributes_.size(); i++) { + output.writeMessage(4, attributes_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getHeader()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); + } + for (int i = 0; i < attributes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, attributes_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest)) { + return super.equals(obj); + } + com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest other = + (com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest) obj; + + if (hasHeader() != other.hasHeader()) return false; + if (hasHeader()) { + if (!getHeader().equals(other.getHeader())) return false; + } + if (!getName().equals(other.getName())) return false; + if (!getAttributesList().equals(other.getAttributesList())) 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 (hasHeader()) { + hash = (37 * hash) + HEADER_FIELD_NUMBER; + hash = (53 * hash) + getHeader().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getAttributesCount() > 0) { + hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getAttributesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest 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.fleetengine.v1.UpdateVehicleAttributesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest 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.fleetengine.v1.UpdateVehicleAttributesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * `UpdateVehicleAttributes` request message.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.v1.UpdateVehicleAttributesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.v1.UpdateVehicleAttributesRequest) + com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_UpdateVehicleAttributesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_UpdateVehicleAttributesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest.class, + com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest.Builder.class); + } + + // Construct using com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getHeaderFieldBuilder(); + getAttributesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + name_ = ""; + if (attributesBuilder_ == null) { + attributes_ = java.util.Collections.emptyList(); + } else { + attributes_ = null; + attributesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_UpdateVehicleAttributesRequest_descriptor; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest + getDefaultInstanceForType() { + return com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest build() { + com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest buildPartial() { + com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest result = + new com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest result) { + if (attributesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + attributes_ = java.util.Collections.unmodifiableList(attributes_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.attributes_ = attributes_; + } else { + result.attributes_ = attributesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.header_ = headerBuilder_ == null ? header_ : headerBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest) { + return mergeFrom((com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest other) { + if (other + == com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest.getDefaultInstance()) + return this; + if (other.hasHeader()) { + mergeHeader(other.getHeader()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (attributesBuilder_ == null) { + if (!other.attributes_.isEmpty()) { + if (attributes_.isEmpty()) { + attributes_ = other.attributes_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureAttributesIsMutable(); + attributes_.addAll(other.attributes_); + } + onChanged(); + } + } else { + if (!other.attributes_.isEmpty()) { + if (attributesBuilder_.isEmpty()) { + attributesBuilder_.dispose(); + attributesBuilder_ = null; + attributes_ = other.attributes_; + bitField0_ = (bitField0_ & ~0x00000004); + attributesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAttributesFieldBuilder() + : null; + } else { + attributesBuilder_.addAllMessages(other.attributes_); + } + } + } + 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(getHeaderFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 34: + { + com.google.maps.fleetengine.v1.VehicleAttribute m = + input.readMessage( + com.google.maps.fleetengine.v1.VehicleAttribute.parser(), + extensionRegistry); + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.add(m); + } else { + attributesBuilder_.addMessage(m); + } + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.maps.fleetengine.v1.RequestHeader header_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.RequestHeader, + com.google.maps.fleetengine.v1.RequestHeader.Builder, + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder> + headerBuilder_; + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return Whether the header field is set. + */ + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return The header. + */ + public com.google.maps.fleetengine.v1.RequestHeader getHeader() { + if (headerBuilder_ == null) { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } else { + return headerBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public Builder setHeader(com.google.maps.fleetengine.v1.RequestHeader value) { + if (headerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + header_ = value; + } else { + headerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public Builder setHeader(com.google.maps.fleetengine.v1.RequestHeader.Builder builderForValue) { + if (headerBuilder_ == null) { + header_ = builderForValue.build(); + } else { + headerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public Builder mergeHeader(com.google.maps.fleetengine.v1.RequestHeader value) { + if (headerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && header_ != null + && header_ != com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance()) { + getHeaderBuilder().mergeFrom(value); + } else { + header_ = value; + } + } else { + headerBuilder_.mergeFrom(value); + } + if (header_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public Builder clearHeader() { + bitField0_ = (bitField0_ & ~0x00000001); + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public com.google.maps.fleetengine.v1.RequestHeader.Builder getHeaderBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getHeaderFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public com.google.maps.fleetengine.v1.RequestHeaderOrBuilder getHeaderOrBuilder() { + if (headerBuilder_ != null) { + return headerBuilder_.getMessageOrBuilder(); + } else { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.RequestHeader, + com.google.maps.fleetengine.v1.RequestHeader.Builder, + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder> + getHeaderFieldBuilder() { + if (headerBuilder_ == null) { + headerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.RequestHeader, + com.google.maps.fleetengine.v1.RequestHeader.Builder, + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder>( + getHeader(), getParentForChildren(), isClean()); + header_ = null; + } + return headerBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Must be in the format `providers/{provider}/vehicles/{vehicle}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @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. Must be in the format `providers/{provider}/vehicles/{vehicle}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @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. Must be in the format `providers/{provider}/vehicles/{vehicle}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Must be in the format `providers/{provider}/vehicles/{vehicle}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Must be in the format `providers/{provider}/vehicles/{vehicle}`.
+     * The provider must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List attributes_ = + java.util.Collections.emptyList(); + + private void ensureAttributesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + attributes_ = + new java.util.ArrayList(attributes_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.VehicleAttribute, + com.google.maps.fleetengine.v1.VehicleAttribute.Builder, + com.google.maps.fleetengine.v1.VehicleAttributeOrBuilder> + attributesBuilder_; + + /** + * + * + *
+     * Required. The vehicle attributes to update. Unmentioned attributes are not
+     * altered or removed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getAttributesList() { + if (attributesBuilder_ == null) { + return java.util.Collections.unmodifiableList(attributes_); + } else { + return attributesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. The vehicle attributes to update. Unmentioned attributes are not
+     * altered or removed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getAttributesCount() { + if (attributesBuilder_ == null) { + return attributes_.size(); + } else { + return attributesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. The vehicle attributes to update. Unmentioned attributes are not
+     * altered or removed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.maps.fleetengine.v1.VehicleAttribute getAttributes(int index) { + if (attributesBuilder_ == null) { + return attributes_.get(index); + } else { + return attributesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. The vehicle attributes to update. Unmentioned attributes are not
+     * altered or removed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAttributes(int index, com.google.maps.fleetengine.v1.VehicleAttribute value) { + if (attributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributesIsMutable(); + attributes_.set(index, value); + onChanged(); + } else { + attributesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The vehicle attributes to update. Unmentioned attributes are not
+     * altered or removed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAttributes( + int index, com.google.maps.fleetengine.v1.VehicleAttribute.Builder builderForValue) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.set(index, builderForValue.build()); + onChanged(); + } else { + attributesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The vehicle attributes to update. Unmentioned attributes are not
+     * altered or removed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAttributes(com.google.maps.fleetengine.v1.VehicleAttribute value) { + if (attributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributesIsMutable(); + attributes_.add(value); + onChanged(); + } else { + attributesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. The vehicle attributes to update. Unmentioned attributes are not
+     * altered or removed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAttributes(int index, com.google.maps.fleetengine.v1.VehicleAttribute value) { + if (attributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributesIsMutable(); + attributes_.add(index, value); + onChanged(); + } else { + attributesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The vehicle attributes to update. Unmentioned attributes are not
+     * altered or removed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAttributes( + com.google.maps.fleetengine.v1.VehicleAttribute.Builder builderForValue) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.add(builderForValue.build()); + onChanged(); + } else { + attributesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The vehicle attributes to update. Unmentioned attributes are not
+     * altered or removed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAttributes( + int index, com.google.maps.fleetengine.v1.VehicleAttribute.Builder builderForValue) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.add(index, builderForValue.build()); + onChanged(); + } else { + attributesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The vehicle attributes to update. Unmentioned attributes are not
+     * altered or removed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllAttributes( + java.lang.Iterable values) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, attributes_); + onChanged(); + } else { + attributesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. The vehicle attributes to update. Unmentioned attributes are not
+     * altered or removed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAttributes() { + if (attributesBuilder_ == null) { + attributes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + attributesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. The vehicle attributes to update. Unmentioned attributes are not
+     * altered or removed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeAttributes(int index) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.remove(index); + onChanged(); + } else { + attributesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. The vehicle attributes to update. Unmentioned attributes are not
+     * altered or removed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.maps.fleetengine.v1.VehicleAttribute.Builder getAttributesBuilder(int index) { + return getAttributesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. The vehicle attributes to update. Unmentioned attributes are not
+     * altered or removed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.maps.fleetengine.v1.VehicleAttributeOrBuilder getAttributesOrBuilder( + int index) { + if (attributesBuilder_ == null) { + return attributes_.get(index); + } else { + return attributesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. The vehicle attributes to update. Unmentioned attributes are not
+     * altered or removed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getAttributesOrBuilderList() { + if (attributesBuilder_ != null) { + return attributesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(attributes_); + } + } + /** + * + * + *
+     * Required. The vehicle attributes to update. Unmentioned attributes are not
+     * altered or removed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.maps.fleetengine.v1.VehicleAttribute.Builder addAttributesBuilder() { + return getAttributesFieldBuilder() + .addBuilder(com.google.maps.fleetengine.v1.VehicleAttribute.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The vehicle attributes to update. Unmentioned attributes are not
+     * altered or removed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.maps.fleetengine.v1.VehicleAttribute.Builder addAttributesBuilder(int index) { + return getAttributesFieldBuilder() + .addBuilder(index, com.google.maps.fleetengine.v1.VehicleAttribute.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The vehicle attributes to update. Unmentioned attributes are not
+     * altered or removed.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getAttributesBuilderList() { + return getAttributesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.VehicleAttribute, + com.google.maps.fleetengine.v1.VehicleAttribute.Builder, + com.google.maps.fleetengine.v1.VehicleAttributeOrBuilder> + getAttributesFieldBuilder() { + if (attributesBuilder_ == null) { + attributesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.VehicleAttribute, + com.google.maps.fleetengine.v1.VehicleAttribute.Builder, + com.google.maps.fleetengine.v1.VehicleAttributeOrBuilder>( + attributes_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + attributes_ = null; + } + return attributesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:maps.fleetengine.v1.UpdateVehicleAttributesRequest) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.v1.UpdateVehicleAttributesRequest) + private static final com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest(); + } + + public static com.google.maps.fleetengine.v1.UpdateVehicleAttributesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateVehicleAttributesRequest 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.fleetengine.v1.UpdateVehicleAttributesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/UpdateVehicleAttributesRequestOrBuilder.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/UpdateVehicleAttributesRequestOrBuilder.java new file mode 100644 index 000000000000..0ddd8239fd5a --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/UpdateVehicleAttributesRequestOrBuilder.java @@ -0,0 +1,159 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicle_api.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public interface UpdateVehicleAttributesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.v1.UpdateVehicleAttributesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return Whether the header field is set. + */ + boolean hasHeader(); + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return The header. + */ + com.google.maps.fleetengine.v1.RequestHeader getHeader(); + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder getHeaderOrBuilder(); + + /** + * + * + *
+   * Required. Must be in the format `providers/{provider}/vehicles/{vehicle}`.
+   * The provider must be the Project ID (for example, `sample-cloud-project`)
+   * of the Google Cloud Project of which the service account making
+   * this call is a member.
+   * 
+ * + * string name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Must be in the format `providers/{provider}/vehicles/{vehicle}`.
+   * The provider must be the Project ID (for example, `sample-cloud-project`)
+   * of the Google Cloud Project of which the service account making
+   * this call is a member.
+   * 
+ * + * string name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The vehicle attributes to update. Unmentioned attributes are not
+   * altered or removed.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getAttributesList(); + /** + * + * + *
+   * Required. The vehicle attributes to update. Unmentioned attributes are not
+   * altered or removed.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.maps.fleetengine.v1.VehicleAttribute getAttributes(int index); + /** + * + * + *
+   * Required. The vehicle attributes to update. Unmentioned attributes are not
+   * altered or removed.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getAttributesCount(); + /** + * + * + *
+   * Required. The vehicle attributes to update. Unmentioned attributes are not
+   * altered or removed.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getAttributesOrBuilderList(); + /** + * + * + *
+   * Required. The vehicle attributes to update. Unmentioned attributes are not
+   * altered or removed.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.maps.fleetengine.v1.VehicleAttributeOrBuilder getAttributesOrBuilder(int index); +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/UpdateVehicleAttributesResponse.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/UpdateVehicleAttributesResponse.java new file mode 100644 index 000000000000..9c6de75bfae1 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/UpdateVehicleAttributesResponse.java @@ -0,0 +1,1018 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicle_api.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * `UpdateVehicleAttributes` response message.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.v1.UpdateVehicleAttributesResponse} + */ +public final class UpdateVehicleAttributesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.v1.UpdateVehicleAttributesResponse) + UpdateVehicleAttributesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateVehicleAttributesResponse.newBuilder() to construct. + private UpdateVehicleAttributesResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateVehicleAttributesResponse() { + attributes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateVehicleAttributesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_UpdateVehicleAttributesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_UpdateVehicleAttributesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse.class, + com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse.Builder.class); + } + + public static final int ATTRIBUTES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List attributes_; + /** + * + * + *
+   * Required. The updated full list of vehicle attributes, including new,
+   * altered, and untouched attributes.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getAttributesList() { + return attributes_; + } + /** + * + * + *
+   * Required. The updated full list of vehicle attributes, including new,
+   * altered, and untouched attributes.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getAttributesOrBuilderList() { + return attributes_; + } + /** + * + * + *
+   * Required. The updated full list of vehicle attributes, including new,
+   * altered, and untouched attributes.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getAttributesCount() { + return attributes_.size(); + } + /** + * + * + *
+   * Required. The updated full list of vehicle attributes, including new,
+   * altered, and untouched attributes.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleAttribute getAttributes(int index) { + return attributes_.get(index); + } + /** + * + * + *
+   * Required. The updated full list of vehicle attributes, including new,
+   * altered, and untouched attributes.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleAttributeOrBuilder getAttributesOrBuilder( + int index) { + return attributes_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < attributes_.size(); i++) { + output.writeMessage(1, attributes_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < attributes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, attributes_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse)) { + return super.equals(obj); + } + com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse other = + (com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse) obj; + + if (!getAttributesList().equals(other.getAttributesList())) 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 (getAttributesCount() > 0) { + hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getAttributesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse 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.fleetengine.v1.UpdateVehicleAttributesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse 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.fleetengine.v1.UpdateVehicleAttributesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * `UpdateVehicleAttributes` response message.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.v1.UpdateVehicleAttributesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.v1.UpdateVehicleAttributesResponse) + com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_UpdateVehicleAttributesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_UpdateVehicleAttributesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse.class, + com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse.Builder.class); + } + + // Construct using com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (attributesBuilder_ == null) { + attributes_ = java.util.Collections.emptyList(); + } else { + attributes_ = null; + attributesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_UpdateVehicleAttributesResponse_descriptor; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse + getDefaultInstanceForType() { + return com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse build() { + com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse buildPartial() { + com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse result = + new com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse result) { + if (attributesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + attributes_ = java.util.Collections.unmodifiableList(attributes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.attributes_ = attributes_; + } else { + result.attributes_ = attributesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse) { + return mergeFrom((com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse other) { + if (other + == com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse.getDefaultInstance()) + return this; + if (attributesBuilder_ == null) { + if (!other.attributes_.isEmpty()) { + if (attributes_.isEmpty()) { + attributes_ = other.attributes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAttributesIsMutable(); + attributes_.addAll(other.attributes_); + } + onChanged(); + } + } else { + if (!other.attributes_.isEmpty()) { + if (attributesBuilder_.isEmpty()) { + attributesBuilder_.dispose(); + attributesBuilder_ = null; + attributes_ = other.attributes_; + bitField0_ = (bitField0_ & ~0x00000001); + attributesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAttributesFieldBuilder() + : null; + } else { + attributesBuilder_.addAllMessages(other.attributes_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.maps.fleetengine.v1.VehicleAttribute m = + input.readMessage( + com.google.maps.fleetengine.v1.VehicleAttribute.parser(), + extensionRegistry); + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.add(m); + } else { + attributesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List attributes_ = + java.util.Collections.emptyList(); + + private void ensureAttributesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + attributes_ = + new java.util.ArrayList(attributes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.VehicleAttribute, + com.google.maps.fleetengine.v1.VehicleAttribute.Builder, + com.google.maps.fleetengine.v1.VehicleAttributeOrBuilder> + attributesBuilder_; + + /** + * + * + *
+     * Required. The updated full list of vehicle attributes, including new,
+     * altered, and untouched attributes.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getAttributesList() { + if (attributesBuilder_ == null) { + return java.util.Collections.unmodifiableList(attributes_); + } else { + return attributesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. The updated full list of vehicle attributes, including new,
+     * altered, and untouched attributes.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getAttributesCount() { + if (attributesBuilder_ == null) { + return attributes_.size(); + } else { + return attributesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. The updated full list of vehicle attributes, including new,
+     * altered, and untouched attributes.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.maps.fleetengine.v1.VehicleAttribute getAttributes(int index) { + if (attributesBuilder_ == null) { + return attributes_.get(index); + } else { + return attributesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. The updated full list of vehicle attributes, including new,
+     * altered, and untouched attributes.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAttributes(int index, com.google.maps.fleetengine.v1.VehicleAttribute value) { + if (attributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributesIsMutable(); + attributes_.set(index, value); + onChanged(); + } else { + attributesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The updated full list of vehicle attributes, including new,
+     * altered, and untouched attributes.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAttributes( + int index, com.google.maps.fleetengine.v1.VehicleAttribute.Builder builderForValue) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.set(index, builderForValue.build()); + onChanged(); + } else { + attributesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The updated full list of vehicle attributes, including new,
+     * altered, and untouched attributes.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAttributes(com.google.maps.fleetengine.v1.VehicleAttribute value) { + if (attributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributesIsMutable(); + attributes_.add(value); + onChanged(); + } else { + attributesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. The updated full list of vehicle attributes, including new,
+     * altered, and untouched attributes.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAttributes(int index, com.google.maps.fleetengine.v1.VehicleAttribute value) { + if (attributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributesIsMutable(); + attributes_.add(index, value); + onChanged(); + } else { + attributesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The updated full list of vehicle attributes, including new,
+     * altered, and untouched attributes.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAttributes( + com.google.maps.fleetengine.v1.VehicleAttribute.Builder builderForValue) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.add(builderForValue.build()); + onChanged(); + } else { + attributesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The updated full list of vehicle attributes, including new,
+     * altered, and untouched attributes.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAttributes( + int index, com.google.maps.fleetengine.v1.VehicleAttribute.Builder builderForValue) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.add(index, builderForValue.build()); + onChanged(); + } else { + attributesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The updated full list of vehicle attributes, including new,
+     * altered, and untouched attributes.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllAttributes( + java.lang.Iterable values) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, attributes_); + onChanged(); + } else { + attributesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. The updated full list of vehicle attributes, including new,
+     * altered, and untouched attributes.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAttributes() { + if (attributesBuilder_ == null) { + attributes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + attributesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. The updated full list of vehicle attributes, including new,
+     * altered, and untouched attributes.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeAttributes(int index) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.remove(index); + onChanged(); + } else { + attributesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. The updated full list of vehicle attributes, including new,
+     * altered, and untouched attributes.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.maps.fleetengine.v1.VehicleAttribute.Builder getAttributesBuilder(int index) { + return getAttributesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. The updated full list of vehicle attributes, including new,
+     * altered, and untouched attributes.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.maps.fleetengine.v1.VehicleAttributeOrBuilder getAttributesOrBuilder( + int index) { + if (attributesBuilder_ == null) { + return attributes_.get(index); + } else { + return attributesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. The updated full list of vehicle attributes, including new,
+     * altered, and untouched attributes.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getAttributesOrBuilderList() { + if (attributesBuilder_ != null) { + return attributesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(attributes_); + } + } + /** + * + * + *
+     * Required. The updated full list of vehicle attributes, including new,
+     * altered, and untouched attributes.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.maps.fleetengine.v1.VehicleAttribute.Builder addAttributesBuilder() { + return getAttributesFieldBuilder() + .addBuilder(com.google.maps.fleetengine.v1.VehicleAttribute.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The updated full list of vehicle attributes, including new,
+     * altered, and untouched attributes.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.maps.fleetengine.v1.VehicleAttribute.Builder addAttributesBuilder(int index) { + return getAttributesFieldBuilder() + .addBuilder(index, com.google.maps.fleetengine.v1.VehicleAttribute.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The updated full list of vehicle attributes, including new,
+     * altered, and untouched attributes.
+     * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getAttributesBuilderList() { + return getAttributesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.VehicleAttribute, + com.google.maps.fleetengine.v1.VehicleAttribute.Builder, + com.google.maps.fleetengine.v1.VehicleAttributeOrBuilder> + getAttributesFieldBuilder() { + if (attributesBuilder_ == null) { + attributesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.VehicleAttribute, + com.google.maps.fleetengine.v1.VehicleAttribute.Builder, + com.google.maps.fleetengine.v1.VehicleAttributeOrBuilder>( + attributes_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + attributes_ = null; + } + return attributesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:maps.fleetengine.v1.UpdateVehicleAttributesResponse) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.v1.UpdateVehicleAttributesResponse) + private static final com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse(); + } + + public static com.google.maps.fleetengine.v1.UpdateVehicleAttributesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateVehicleAttributesResponse 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.fleetengine.v1.UpdateVehicleAttributesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/UpdateVehicleAttributesResponseOrBuilder.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/UpdateVehicleAttributesResponseOrBuilder.java new file mode 100644 index 000000000000..47fd4a29335d --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/UpdateVehicleAttributesResponseOrBuilder.java @@ -0,0 +1,93 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicle_api.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public interface UpdateVehicleAttributesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.v1.UpdateVehicleAttributesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The updated full list of vehicle attributes, including new,
+   * altered, and untouched attributes.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getAttributesList(); + /** + * + * + *
+   * Required. The updated full list of vehicle attributes, including new,
+   * altered, and untouched attributes.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.maps.fleetengine.v1.VehicleAttribute getAttributes(int index); + /** + * + * + *
+   * Required. The updated full list of vehicle attributes, including new,
+   * altered, and untouched attributes.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getAttributesCount(); + /** + * + * + *
+   * Required. The updated full list of vehicle attributes, including new,
+   * altered, and untouched attributes.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getAttributesOrBuilderList(); + /** + * + * + *
+   * Required. The updated full list of vehicle attributes, including new,
+   * altered, and untouched attributes.
+   * 
+ * + * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.maps.fleetengine.v1.VehicleAttributeOrBuilder getAttributesOrBuilder(int index); +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/UpdateVehicleRequest.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/UpdateVehicleRequest.java new file mode 100644 index 000000000000..bd1f3563bfdd --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/UpdateVehicleRequest.java @@ -0,0 +1,1680 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicle_api.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * `UpdateVehicle request message.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.v1.UpdateVehicleRequest} + */ +public final class UpdateVehicleRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.v1.UpdateVehicleRequest) + UpdateVehicleRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateVehicleRequest.newBuilder() to construct. + private UpdateVehicleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateVehicleRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateVehicleRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_UpdateVehicleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_UpdateVehicleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.UpdateVehicleRequest.class, + com.google.maps.fleetengine.v1.UpdateVehicleRequest.Builder.class); + } + + private int bitField0_; + public static final int HEADER_FIELD_NUMBER = 1; + private com.google.maps.fleetengine.v1.RequestHeader header_; + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return Whether the header field is set. + */ + @java.lang.Override + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return The header. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.RequestHeader getHeader() { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.RequestHeaderOrBuilder getHeaderOrBuilder() { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } + + public static final int NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Must be in the format
+   * `providers/{provider}/vehicles/{vehicle}`.
+   * The {provider} must be the Project ID (for example, `sample-cloud-project`)
+   * of the Google Cloud Project of which the service account making
+   * this call is a member.
+   * 
+ * + * string name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @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. Must be in the format
+   * `providers/{provider}/vehicles/{vehicle}`.
+   * The {provider} must be the Project ID (for example, `sample-cloud-project`)
+   * of the Google Cloud Project of which the service account making
+   * this call is a member.
+   * 
+ * + * string name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 VEHICLE_FIELD_NUMBER = 4; + private com.google.maps.fleetengine.v1.Vehicle vehicle_; + /** + * + * + *
+   * Required. The `Vehicle` entity values to apply.  When updating a `Vehicle`,
+   * the following fields may not be updated as they are managed by the
+   * server.
+   *
+   * * `available_capacity`
+   * * `current_route_segment_version`
+   * * `current_trips`
+   * * `name`
+   * * `waypoints_version`
+   *
+   * If the `attributes` field is updated, **all** the vehicle's attributes are
+   * replaced with the attributes provided in the request. If you want to update
+   * only some attributes, see the `UpdateVehicleAttributes` method.
+   *
+   * Likewise, the `waypoints` field can be updated, but must contain all the
+   * waypoints currently on the vehicle, and no other waypoints.
+   * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the vehicle field is set. + */ + @java.lang.Override + public boolean hasVehicle() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Required. The `Vehicle` entity values to apply.  When updating a `Vehicle`,
+   * the following fields may not be updated as they are managed by the
+   * server.
+   *
+   * * `available_capacity`
+   * * `current_route_segment_version`
+   * * `current_trips`
+   * * `name`
+   * * `waypoints_version`
+   *
+   * If the `attributes` field is updated, **all** the vehicle's attributes are
+   * replaced with the attributes provided in the request. If you want to update
+   * only some attributes, see the `UpdateVehicleAttributes` method.
+   *
+   * Likewise, the `waypoints` field can be updated, but must contain all the
+   * waypoints currently on the vehicle, and no other waypoints.
+   * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The vehicle. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.Vehicle getVehicle() { + return vehicle_ == null + ? com.google.maps.fleetengine.v1.Vehicle.getDefaultInstance() + : vehicle_; + } + /** + * + * + *
+   * Required. The `Vehicle` entity values to apply.  When updating a `Vehicle`,
+   * the following fields may not be updated as they are managed by the
+   * server.
+   *
+   * * `available_capacity`
+   * * `current_route_segment_version`
+   * * `current_trips`
+   * * `name`
+   * * `waypoints_version`
+   *
+   * If the `attributes` field is updated, **all** the vehicle's attributes are
+   * replaced with the attributes provided in the request. If you want to update
+   * only some attributes, see the `UpdateVehicleAttributes` method.
+   *
+   * Likewise, the `waypoints` field can be updated, but must contain all the
+   * waypoints currently on the vehicle, and no other waypoints.
+   * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleOrBuilder getVehicleOrBuilder() { + return vehicle_ == null + ? com.google.maps.fleetengine.v1.Vehicle.getDefaultInstance() + : vehicle_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 5; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. A field mask indicating which fields of the `Vehicle` to update.
+   * At least one field name must be provided.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Required. A field mask indicating which fields of the `Vehicle` to update.
+   * At least one field name must be provided.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. A field mask indicating which fields of the `Vehicle` to update.
+   * At least one field name must be provided.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + 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, getHeader()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getVehicle()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(5, getUpdateMask()); + } + 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, getHeader()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getVehicle()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateMask()); + } + 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.fleetengine.v1.UpdateVehicleRequest)) { + return super.equals(obj); + } + com.google.maps.fleetengine.v1.UpdateVehicleRequest other = + (com.google.maps.fleetengine.v1.UpdateVehicleRequest) obj; + + if (hasHeader() != other.hasHeader()) return false; + if (hasHeader()) { + if (!getHeader().equals(other.getHeader())) return false; + } + if (!getName().equals(other.getName())) return false; + if (hasVehicle() != other.hasVehicle()) return false; + if (hasVehicle()) { + if (!getVehicle().equals(other.getVehicle())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) 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 (hasHeader()) { + hash = (37 * hash) + HEADER_FIELD_NUMBER; + hash = (53 * hash) + getHeader().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasVehicle()) { + hash = (37 * hash) + VEHICLE_FIELD_NUMBER; + hash = (53 * hash) + getVehicle().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.fleetengine.v1.UpdateVehicleRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.UpdateVehicleRequest 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.fleetengine.v1.UpdateVehicleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.UpdateVehicleRequest 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.fleetengine.v1.UpdateVehicleRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.UpdateVehicleRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.UpdateVehicleRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.UpdateVehicleRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.UpdateVehicleRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.UpdateVehicleRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.UpdateVehicleRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.UpdateVehicleRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.fleetengine.v1.UpdateVehicleRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * `UpdateVehicle request message.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.v1.UpdateVehicleRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.v1.UpdateVehicleRequest) + com.google.maps.fleetengine.v1.UpdateVehicleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_UpdateVehicleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_UpdateVehicleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.UpdateVehicleRequest.class, + com.google.maps.fleetengine.v1.UpdateVehicleRequest.Builder.class); + } + + // Construct using com.google.maps.fleetengine.v1.UpdateVehicleRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getHeaderFieldBuilder(); + getVehicleFieldBuilder(); + getUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + name_ = ""; + vehicle_ = null; + if (vehicleBuilder_ != null) { + vehicleBuilder_.dispose(); + vehicleBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_UpdateVehicleRequest_descriptor; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.UpdateVehicleRequest getDefaultInstanceForType() { + return com.google.maps.fleetengine.v1.UpdateVehicleRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.UpdateVehicleRequest build() { + com.google.maps.fleetengine.v1.UpdateVehicleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.UpdateVehicleRequest buildPartial() { + com.google.maps.fleetengine.v1.UpdateVehicleRequest result = + new com.google.maps.fleetengine.v1.UpdateVehicleRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.fleetengine.v1.UpdateVehicleRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.header_ = headerBuilder_ == null ? header_ : headerBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.vehicle_ = vehicleBuilder_ == null ? vehicle_ : vehicleBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.fleetengine.v1.UpdateVehicleRequest) { + return mergeFrom((com.google.maps.fleetengine.v1.UpdateVehicleRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.fleetengine.v1.UpdateVehicleRequest other) { + if (other == com.google.maps.fleetengine.v1.UpdateVehicleRequest.getDefaultInstance()) + return this; + if (other.hasHeader()) { + mergeHeader(other.getHeader()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasVehicle()) { + mergeVehicle(other.getVehicle()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + 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(getHeaderFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 34: + { + input.readMessage(getVehicleFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 34 + case 42: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.maps.fleetengine.v1.RequestHeader header_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.RequestHeader, + com.google.maps.fleetengine.v1.RequestHeader.Builder, + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder> + headerBuilder_; + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return Whether the header field is set. + */ + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return The header. + */ + public com.google.maps.fleetengine.v1.RequestHeader getHeader() { + if (headerBuilder_ == null) { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } else { + return headerBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public Builder setHeader(com.google.maps.fleetengine.v1.RequestHeader value) { + if (headerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + header_ = value; + } else { + headerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public Builder setHeader(com.google.maps.fleetengine.v1.RequestHeader.Builder builderForValue) { + if (headerBuilder_ == null) { + header_ = builderForValue.build(); + } else { + headerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public Builder mergeHeader(com.google.maps.fleetengine.v1.RequestHeader value) { + if (headerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && header_ != null + && header_ != com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance()) { + getHeaderBuilder().mergeFrom(value); + } else { + header_ = value; + } + } else { + headerBuilder_.mergeFrom(value); + } + if (header_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public Builder clearHeader() { + bitField0_ = (bitField0_ & ~0x00000001); + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public com.google.maps.fleetengine.v1.RequestHeader.Builder getHeaderBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getHeaderFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + public com.google.maps.fleetengine.v1.RequestHeaderOrBuilder getHeaderOrBuilder() { + if (headerBuilder_ != null) { + return headerBuilder_.getMessageOrBuilder(); + } else { + return header_ == null + ? com.google.maps.fleetengine.v1.RequestHeader.getDefaultInstance() + : header_; + } + } + /** + * + * + *
+     * The standard Fleet Engine request header.
+     * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.RequestHeader, + com.google.maps.fleetengine.v1.RequestHeader.Builder, + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder> + getHeaderFieldBuilder() { + if (headerBuilder_ == null) { + headerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.RequestHeader, + com.google.maps.fleetengine.v1.RequestHeader.Builder, + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder>( + getHeader(), getParentForChildren(), isClean()); + header_ = null; + } + return headerBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Must be in the format
+     * `providers/{provider}/vehicles/{vehicle}`.
+     * The {provider} must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @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. Must be in the format
+     * `providers/{provider}/vehicles/{vehicle}`.
+     * The {provider} must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @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. Must be in the format
+     * `providers/{provider}/vehicles/{vehicle}`.
+     * The {provider} must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Must be in the format
+     * `providers/{provider}/vehicles/{vehicle}`.
+     * The {provider} must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Must be in the format
+     * `providers/{provider}/vehicles/{vehicle}`.
+     * The {provider} must be the Project ID (for example, `sample-cloud-project`)
+     * of the Google Cloud Project of which the service account making
+     * this call is a member.
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.maps.fleetengine.v1.Vehicle vehicle_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.Vehicle, + com.google.maps.fleetengine.v1.Vehicle.Builder, + com.google.maps.fleetengine.v1.VehicleOrBuilder> + vehicleBuilder_; + /** + * + * + *
+     * Required. The `Vehicle` entity values to apply.  When updating a `Vehicle`,
+     * the following fields may not be updated as they are managed by the
+     * server.
+     *
+     * * `available_capacity`
+     * * `current_route_segment_version`
+     * * `current_trips`
+     * * `name`
+     * * `waypoints_version`
+     *
+     * If the `attributes` field is updated, **all** the vehicle's attributes are
+     * replaced with the attributes provided in the request. If you want to update
+     * only some attributes, see the `UpdateVehicleAttributes` method.
+     *
+     * Likewise, the `waypoints` field can be updated, but must contain all the
+     * waypoints currently on the vehicle, and no other waypoints.
+     * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the vehicle field is set. + */ + public boolean hasVehicle() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The `Vehicle` entity values to apply.  When updating a `Vehicle`,
+     * the following fields may not be updated as they are managed by the
+     * server.
+     *
+     * * `available_capacity`
+     * * `current_route_segment_version`
+     * * `current_trips`
+     * * `name`
+     * * `waypoints_version`
+     *
+     * If the `attributes` field is updated, **all** the vehicle's attributes are
+     * replaced with the attributes provided in the request. If you want to update
+     * only some attributes, see the `UpdateVehicleAttributes` method.
+     *
+     * Likewise, the `waypoints` field can be updated, but must contain all the
+     * waypoints currently on the vehicle, and no other waypoints.
+     * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The vehicle. + */ + public com.google.maps.fleetengine.v1.Vehicle getVehicle() { + if (vehicleBuilder_ == null) { + return vehicle_ == null + ? com.google.maps.fleetengine.v1.Vehicle.getDefaultInstance() + : vehicle_; + } else { + return vehicleBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The `Vehicle` entity values to apply.  When updating a `Vehicle`,
+     * the following fields may not be updated as they are managed by the
+     * server.
+     *
+     * * `available_capacity`
+     * * `current_route_segment_version`
+     * * `current_trips`
+     * * `name`
+     * * `waypoints_version`
+     *
+     * If the `attributes` field is updated, **all** the vehicle's attributes are
+     * replaced with the attributes provided in the request. If you want to update
+     * only some attributes, see the `UpdateVehicleAttributes` method.
+     *
+     * Likewise, the `waypoints` field can be updated, but must contain all the
+     * waypoints currently on the vehicle, and no other waypoints.
+     * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setVehicle(com.google.maps.fleetengine.v1.Vehicle value) { + if (vehicleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + vehicle_ = value; + } else { + vehicleBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The `Vehicle` entity values to apply.  When updating a `Vehicle`,
+     * the following fields may not be updated as they are managed by the
+     * server.
+     *
+     * * `available_capacity`
+     * * `current_route_segment_version`
+     * * `current_trips`
+     * * `name`
+     * * `waypoints_version`
+     *
+     * If the `attributes` field is updated, **all** the vehicle's attributes are
+     * replaced with the attributes provided in the request. If you want to update
+     * only some attributes, see the `UpdateVehicleAttributes` method.
+     *
+     * Likewise, the `waypoints` field can be updated, but must contain all the
+     * waypoints currently on the vehicle, and no other waypoints.
+     * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setVehicle(com.google.maps.fleetengine.v1.Vehicle.Builder builderForValue) { + if (vehicleBuilder_ == null) { + vehicle_ = builderForValue.build(); + } else { + vehicleBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The `Vehicle` entity values to apply.  When updating a `Vehicle`,
+     * the following fields may not be updated as they are managed by the
+     * server.
+     *
+     * * `available_capacity`
+     * * `current_route_segment_version`
+     * * `current_trips`
+     * * `name`
+     * * `waypoints_version`
+     *
+     * If the `attributes` field is updated, **all** the vehicle's attributes are
+     * replaced with the attributes provided in the request. If you want to update
+     * only some attributes, see the `UpdateVehicleAttributes` method.
+     *
+     * Likewise, the `waypoints` field can be updated, but must contain all the
+     * waypoints currently on the vehicle, and no other waypoints.
+     * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeVehicle(com.google.maps.fleetengine.v1.Vehicle value) { + if (vehicleBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && vehicle_ != null + && vehicle_ != com.google.maps.fleetengine.v1.Vehicle.getDefaultInstance()) { + getVehicleBuilder().mergeFrom(value); + } else { + vehicle_ = value; + } + } else { + vehicleBuilder_.mergeFrom(value); + } + if (vehicle_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The `Vehicle` entity values to apply.  When updating a `Vehicle`,
+     * the following fields may not be updated as they are managed by the
+     * server.
+     *
+     * * `available_capacity`
+     * * `current_route_segment_version`
+     * * `current_trips`
+     * * `name`
+     * * `waypoints_version`
+     *
+     * If the `attributes` field is updated, **all** the vehicle's attributes are
+     * replaced with the attributes provided in the request. If you want to update
+     * only some attributes, see the `UpdateVehicleAttributes` method.
+     *
+     * Likewise, the `waypoints` field can be updated, but must contain all the
+     * waypoints currently on the vehicle, and no other waypoints.
+     * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearVehicle() { + bitField0_ = (bitField0_ & ~0x00000004); + vehicle_ = null; + if (vehicleBuilder_ != null) { + vehicleBuilder_.dispose(); + vehicleBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The `Vehicle` entity values to apply.  When updating a `Vehicle`,
+     * the following fields may not be updated as they are managed by the
+     * server.
+     *
+     * * `available_capacity`
+     * * `current_route_segment_version`
+     * * `current_trips`
+     * * `name`
+     * * `waypoints_version`
+     *
+     * If the `attributes` field is updated, **all** the vehicle's attributes are
+     * replaced with the attributes provided in the request. If you want to update
+     * only some attributes, see the `UpdateVehicleAttributes` method.
+     *
+     * Likewise, the `waypoints` field can be updated, but must contain all the
+     * waypoints currently on the vehicle, and no other waypoints.
+     * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.maps.fleetengine.v1.Vehicle.Builder getVehicleBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getVehicleFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The `Vehicle` entity values to apply.  When updating a `Vehicle`,
+     * the following fields may not be updated as they are managed by the
+     * server.
+     *
+     * * `available_capacity`
+     * * `current_route_segment_version`
+     * * `current_trips`
+     * * `name`
+     * * `waypoints_version`
+     *
+     * If the `attributes` field is updated, **all** the vehicle's attributes are
+     * replaced with the attributes provided in the request. If you want to update
+     * only some attributes, see the `UpdateVehicleAttributes` method.
+     *
+     * Likewise, the `waypoints` field can be updated, but must contain all the
+     * waypoints currently on the vehicle, and no other waypoints.
+     * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.maps.fleetengine.v1.VehicleOrBuilder getVehicleOrBuilder() { + if (vehicleBuilder_ != null) { + return vehicleBuilder_.getMessageOrBuilder(); + } else { + return vehicle_ == null + ? com.google.maps.fleetengine.v1.Vehicle.getDefaultInstance() + : vehicle_; + } + } + /** + * + * + *
+     * Required. The `Vehicle` entity values to apply.  When updating a `Vehicle`,
+     * the following fields may not be updated as they are managed by the
+     * server.
+     *
+     * * `available_capacity`
+     * * `current_route_segment_version`
+     * * `current_trips`
+     * * `name`
+     * * `waypoints_version`
+     *
+     * If the `attributes` field is updated, **all** the vehicle's attributes are
+     * replaced with the attributes provided in the request. If you want to update
+     * only some attributes, see the `UpdateVehicleAttributes` method.
+     *
+     * Likewise, the `waypoints` field can be updated, but must contain all the
+     * waypoints currently on the vehicle, and no other waypoints.
+     * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.Vehicle, + com.google.maps.fleetengine.v1.Vehicle.Builder, + com.google.maps.fleetengine.v1.VehicleOrBuilder> + getVehicleFieldBuilder() { + if (vehicleBuilder_ == null) { + vehicleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.Vehicle, + com.google.maps.fleetengine.v1.Vehicle.Builder, + com.google.maps.fleetengine.v1.VehicleOrBuilder>( + getVehicle(), getParentForChildren(), isClean()); + vehicle_ = null; + } + return vehicleBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. A field mask indicating which fields of the `Vehicle` to update.
+     * At least one field name must be provided.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Required. A field mask indicating which fields of the `Vehicle` to update.
+     * At least one field name must be provided.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. A field mask indicating which fields of the `Vehicle` to update.
+     * At least one field name must be provided.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A field mask indicating which fields of the `Vehicle` to update.
+     * At least one field name must be provided.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A field mask indicating which fields of the `Vehicle` to update.
+     * At least one field name must be provided.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. A field mask indicating which fields of the `Vehicle` to update.
+     * At least one field name must be provided.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000008); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A field mask indicating which fields of the `Vehicle` to update.
+     * At least one field name must be provided.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. A field mask indicating which fields of the `Vehicle` to update.
+     * At least one field name must be provided.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. A field mask indicating which fields of the `Vehicle` to update.
+     * At least one field name must be provided.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:maps.fleetengine.v1.UpdateVehicleRequest) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.v1.UpdateVehicleRequest) + private static final com.google.maps.fleetengine.v1.UpdateVehicleRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.fleetengine.v1.UpdateVehicleRequest(); + } + + public static com.google.maps.fleetengine.v1.UpdateVehicleRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateVehicleRequest 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.fleetengine.v1.UpdateVehicleRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/UpdateVehicleRequestOrBuilder.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/UpdateVehicleRequestOrBuilder.java new file mode 100644 index 000000000000..a272f612936c --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/UpdateVehicleRequestOrBuilder.java @@ -0,0 +1,218 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicle_api.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public interface UpdateVehicleRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.v1.UpdateVehicleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return Whether the header field is set. + */ + boolean hasHeader(); + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + * + * @return The header. + */ + com.google.maps.fleetengine.v1.RequestHeader getHeader(); + /** + * + * + *
+   * The standard Fleet Engine request header.
+   * 
+ * + * .maps.fleetengine.v1.RequestHeader header = 1; + */ + com.google.maps.fleetengine.v1.RequestHeaderOrBuilder getHeaderOrBuilder(); + + /** + * + * + *
+   * Required. Must be in the format
+   * `providers/{provider}/vehicles/{vehicle}`.
+   * The {provider} must be the Project ID (for example, `sample-cloud-project`)
+   * of the Google Cloud Project of which the service account making
+   * this call is a member.
+   * 
+ * + * string name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Must be in the format
+   * `providers/{provider}/vehicles/{vehicle}`.
+   * The {provider} must be the Project ID (for example, `sample-cloud-project`)
+   * of the Google Cloud Project of which the service account making
+   * this call is a member.
+   * 
+ * + * string name = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The `Vehicle` entity values to apply.  When updating a `Vehicle`,
+   * the following fields may not be updated as they are managed by the
+   * server.
+   *
+   * * `available_capacity`
+   * * `current_route_segment_version`
+   * * `current_trips`
+   * * `name`
+   * * `waypoints_version`
+   *
+   * If the `attributes` field is updated, **all** the vehicle's attributes are
+   * replaced with the attributes provided in the request. If you want to update
+   * only some attributes, see the `UpdateVehicleAttributes` method.
+   *
+   * Likewise, the `waypoints` field can be updated, but must contain all the
+   * waypoints currently on the vehicle, and no other waypoints.
+   * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the vehicle field is set. + */ + boolean hasVehicle(); + /** + * + * + *
+   * Required. The `Vehicle` entity values to apply.  When updating a `Vehicle`,
+   * the following fields may not be updated as they are managed by the
+   * server.
+   *
+   * * `available_capacity`
+   * * `current_route_segment_version`
+   * * `current_trips`
+   * * `name`
+   * * `waypoints_version`
+   *
+   * If the `attributes` field is updated, **all** the vehicle's attributes are
+   * replaced with the attributes provided in the request. If you want to update
+   * only some attributes, see the `UpdateVehicleAttributes` method.
+   *
+   * Likewise, the `waypoints` field can be updated, but must contain all the
+   * waypoints currently on the vehicle, and no other waypoints.
+   * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The vehicle. + */ + com.google.maps.fleetengine.v1.Vehicle getVehicle(); + /** + * + * + *
+   * Required. The `Vehicle` entity values to apply.  When updating a `Vehicle`,
+   * the following fields may not be updated as they are managed by the
+   * server.
+   *
+   * * `available_capacity`
+   * * `current_route_segment_version`
+   * * `current_trips`
+   * * `name`
+   * * `waypoints_version`
+   *
+   * If the `attributes` field is updated, **all** the vehicle's attributes are
+   * replaced with the attributes provided in the request. If you want to update
+   * only some attributes, see the `UpdateVehicleAttributes` method.
+   *
+   * Likewise, the `waypoints` field can be updated, but must contain all the
+   * waypoints currently on the vehicle, and no other waypoints.
+   * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.maps.fleetengine.v1.VehicleOrBuilder getVehicleOrBuilder(); + + /** + * + * + *
+   * Required. A field mask indicating which fields of the `Vehicle` to update.
+   * At least one field name must be provided.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. A field mask indicating which fields of the `Vehicle` to update.
+   * At least one field name must be provided.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. A field mask indicating which fields of the `Vehicle` to update.
+   * At least one field name must be provided.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/Vehicle.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/Vehicle.java new file mode 100644 index 000000000000..4d04659858f1 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/Vehicle.java @@ -0,0 +1,7899 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicles.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * Vehicle metadata.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.v1.Vehicle} + */ +public final class Vehicle extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.v1.Vehicle) + VehicleOrBuilder { + private static final long serialVersionUID = 0L; + // Use Vehicle.newBuilder() to construct. + private Vehicle(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Vehicle() { + name_ = ""; + vehicleState_ = 0; + supportedTripTypes_ = java.util.Collections.emptyList(); + currentTrips_ = com.google.protobuf.LazyStringArrayList.emptyList(); + attributes_ = java.util.Collections.emptyList(); + route_ = java.util.Collections.emptyList(); + currentRouteSegment_ = ""; + waypoints_ = java.util.Collections.emptyList(); + navigationStatus_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Vehicle(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.Vehicles + .internal_static_maps_fleetengine_v1_Vehicle_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.Vehicles + .internal_static_maps_fleetengine_v1_Vehicle_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.Vehicle.class, + com.google.maps.fleetengine.v1.Vehicle.Builder.class); + } + + public interface VehicleTypeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.v1.Vehicle.VehicleType) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Vehicle type category
+     * 
+ * + * .maps.fleetengine.v1.Vehicle.VehicleType.Category category = 1; + * + * @return The enum numeric value on the wire for category. + */ + int getCategoryValue(); + /** + * + * + *
+     * Vehicle type category
+     * 
+ * + * .maps.fleetengine.v1.Vehicle.VehicleType.Category category = 1; + * + * @return The category. + */ + com.google.maps.fleetengine.v1.Vehicle.VehicleType.Category getCategory(); + } + /** + * + * + *
+   * The type of vehicle.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.v1.Vehicle.VehicleType} + */ + public static final class VehicleType extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.v1.Vehicle.VehicleType) + VehicleTypeOrBuilder { + private static final long serialVersionUID = 0L; + // Use VehicleType.newBuilder() to construct. + private VehicleType(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VehicleType() { + category_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VehicleType(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.Vehicles + .internal_static_maps_fleetengine_v1_Vehicle_VehicleType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.Vehicles + .internal_static_maps_fleetengine_v1_Vehicle_VehicleType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.Vehicle.VehicleType.class, + com.google.maps.fleetengine.v1.Vehicle.VehicleType.Builder.class); + } + + /** + * + * + *
+     * Vehicle type categories
+     * 
+ * + * Protobuf enum {@code maps.fleetengine.v1.Vehicle.VehicleType.Category} + */ + public enum Category implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Default, used for unspecified or unrecognized vehicle categories.
+       * 
+ * + * UNKNOWN = 0; + */ + UNKNOWN(0), + /** + * + * + *
+       * An automobile.
+       * 
+ * + * AUTO = 1; + */ + AUTO(1), + /** + * + * + *
+       * Any vehicle that acts as a taxi (typically licensed or regulated).
+       * 
+ * + * TAXI = 2; + */ + TAXI(2), + /** + * + * + *
+       * Generally, a vehicle with a large storage capacity.
+       * 
+ * + * TRUCK = 3; + */ + TRUCK(3), + /** + * + * + *
+       * A motorcycle, moped, or other two-wheeled vehicle
+       * 
+ * + * TWO_WHEELER = 4; + */ + TWO_WHEELER(4), + /** + * + * + *
+       * Human-powered transport.
+       * 
+ * + * BICYCLE = 5; + */ + BICYCLE(5), + /** + * + * + *
+       * A human transporter, typically walking or running, traveling along
+       * pedestrian pathways.
+       * 
+ * + * PEDESTRIAN = 6; + */ + PEDESTRIAN(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Default, used for unspecified or unrecognized vehicle categories.
+       * 
+ * + * UNKNOWN = 0; + */ + public static final int UNKNOWN_VALUE = 0; + /** + * + * + *
+       * An automobile.
+       * 
+ * + * AUTO = 1; + */ + public static final int AUTO_VALUE = 1; + /** + * + * + *
+       * Any vehicle that acts as a taxi (typically licensed or regulated).
+       * 
+ * + * TAXI = 2; + */ + public static final int TAXI_VALUE = 2; + /** + * + * + *
+       * Generally, a vehicle with a large storage capacity.
+       * 
+ * + * TRUCK = 3; + */ + public static final int TRUCK_VALUE = 3; + /** + * + * + *
+       * A motorcycle, moped, or other two-wheeled vehicle
+       * 
+ * + * TWO_WHEELER = 4; + */ + public static final int TWO_WHEELER_VALUE = 4; + /** + * + * + *
+       * Human-powered transport.
+       * 
+ * + * BICYCLE = 5; + */ + public static final int BICYCLE_VALUE = 5; + /** + * + * + *
+       * A human transporter, typically walking or running, traveling along
+       * pedestrian pathways.
+       * 
+ * + * PEDESTRIAN = 6; + */ + public static final int PEDESTRIAN_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 Category 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 Category forNumber(int value) { + switch (value) { + case 0: + return UNKNOWN; + case 1: + return AUTO; + case 2: + return TAXI; + case 3: + return TRUCK; + case 4: + return TWO_WHEELER; + case 5: + return BICYCLE; + case 6: + return PEDESTRIAN; + 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 Category findValueByNumber(int number) { + return Category.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.maps.fleetengine.v1.Vehicle.VehicleType.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Category[] VALUES = values(); + + public static Category 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 Category(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:maps.fleetengine.v1.Vehicle.VehicleType.Category) + } + + public static final int CATEGORY_FIELD_NUMBER = 1; + private int category_ = 0; + /** + * + * + *
+     * Vehicle type category
+     * 
+ * + * .maps.fleetengine.v1.Vehicle.VehicleType.Category category = 1; + * + * @return The enum numeric value on the wire for category. + */ + @java.lang.Override + public int getCategoryValue() { + return category_; + } + /** + * + * + *
+     * Vehicle type category
+     * 
+ * + * .maps.fleetengine.v1.Vehicle.VehicleType.Category category = 1; + * + * @return The category. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.Vehicle.VehicleType.Category getCategory() { + com.google.maps.fleetengine.v1.Vehicle.VehicleType.Category result = + com.google.maps.fleetengine.v1.Vehicle.VehicleType.Category.forNumber(category_); + return result == null + ? com.google.maps.fleetengine.v1.Vehicle.VehicleType.Category.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (category_ + != com.google.maps.fleetengine.v1.Vehicle.VehicleType.Category.UNKNOWN.getNumber()) { + output.writeEnum(1, category_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (category_ + != com.google.maps.fleetengine.v1.Vehicle.VehicleType.Category.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, category_); + } + 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.fleetengine.v1.Vehicle.VehicleType)) { + return super.equals(obj); + } + com.google.maps.fleetengine.v1.Vehicle.VehicleType other = + (com.google.maps.fleetengine.v1.Vehicle.VehicleType) obj; + + if (category_ != other.category_) 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) + CATEGORY_FIELD_NUMBER; + hash = (53 * hash) + category_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.fleetengine.v1.Vehicle.VehicleType parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.Vehicle.VehicleType 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.fleetengine.v1.Vehicle.VehicleType parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.Vehicle.VehicleType 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.fleetengine.v1.Vehicle.VehicleType parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.Vehicle.VehicleType parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.Vehicle.VehicleType parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.Vehicle.VehicleType parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.Vehicle.VehicleType parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.Vehicle.VehicleType parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.Vehicle.VehicleType parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.Vehicle.VehicleType parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.fleetengine.v1.Vehicle.VehicleType prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The type of vehicle.
+     * 
+ * + * Protobuf type {@code maps.fleetengine.v1.Vehicle.VehicleType} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.v1.Vehicle.VehicleType) + com.google.maps.fleetengine.v1.Vehicle.VehicleTypeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.Vehicles + .internal_static_maps_fleetengine_v1_Vehicle_VehicleType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.Vehicles + .internal_static_maps_fleetengine_v1_Vehicle_VehicleType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.Vehicle.VehicleType.class, + com.google.maps.fleetengine.v1.Vehicle.VehicleType.Builder.class); + } + + // Construct using com.google.maps.fleetengine.v1.Vehicle.VehicleType.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + category_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.fleetengine.v1.Vehicles + .internal_static_maps_fleetengine_v1_Vehicle_VehicleType_descriptor; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.Vehicle.VehicleType getDefaultInstanceForType() { + return com.google.maps.fleetengine.v1.Vehicle.VehicleType.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.Vehicle.VehicleType build() { + com.google.maps.fleetengine.v1.Vehicle.VehicleType result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.Vehicle.VehicleType buildPartial() { + com.google.maps.fleetengine.v1.Vehicle.VehicleType result = + new com.google.maps.fleetengine.v1.Vehicle.VehicleType(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.fleetengine.v1.Vehicle.VehicleType result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.category_ = category_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.fleetengine.v1.Vehicle.VehicleType) { + return mergeFrom((com.google.maps.fleetengine.v1.Vehicle.VehicleType) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.fleetengine.v1.Vehicle.VehicleType other) { + if (other == com.google.maps.fleetengine.v1.Vehicle.VehicleType.getDefaultInstance()) + return this; + if (other.category_ != 0) { + setCategoryValue(other.getCategoryValue()); + } + 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: + { + category_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int category_ = 0; + /** + * + * + *
+       * Vehicle type category
+       * 
+ * + * .maps.fleetengine.v1.Vehicle.VehicleType.Category category = 1; + * + * @return The enum numeric value on the wire for category. + */ + @java.lang.Override + public int getCategoryValue() { + return category_; + } + /** + * + * + *
+       * Vehicle type category
+       * 
+ * + * .maps.fleetengine.v1.Vehicle.VehicleType.Category category = 1; + * + * @param value The enum numeric value on the wire for category to set. + * @return This builder for chaining. + */ + public Builder setCategoryValue(int value) { + category_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Vehicle type category
+       * 
+ * + * .maps.fleetengine.v1.Vehicle.VehicleType.Category category = 1; + * + * @return The category. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.Vehicle.VehicleType.Category getCategory() { + com.google.maps.fleetengine.v1.Vehicle.VehicleType.Category result = + com.google.maps.fleetengine.v1.Vehicle.VehicleType.Category.forNumber(category_); + return result == null + ? com.google.maps.fleetengine.v1.Vehicle.VehicleType.Category.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Vehicle type category
+       * 
+ * + * .maps.fleetengine.v1.Vehicle.VehicleType.Category category = 1; + * + * @param value The category to set. + * @return This builder for chaining. + */ + public Builder setCategory( + com.google.maps.fleetengine.v1.Vehicle.VehicleType.Category value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + category_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Vehicle type category
+       * 
+ * + * .maps.fleetengine.v1.Vehicle.VehicleType.Category category = 1; + * + * @return This builder for chaining. + */ + public Builder clearCategory() { + bitField0_ = (bitField0_ & ~0x00000001); + category_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:maps.fleetengine.v1.Vehicle.VehicleType) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.v1.Vehicle.VehicleType) + private static final com.google.maps.fleetengine.v1.Vehicle.VehicleType DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.fleetengine.v1.Vehicle.VehicleType(); + } + + public static com.google.maps.fleetengine.v1.Vehicle.VehicleType getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VehicleType 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.fleetengine.v1.Vehicle.VehicleType getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. The unique name for this vehicle.
+   * The format is `providers/{provider}/vehicles/{vehicle}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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. The unique name for this vehicle.
+   * The format is `providers/{provider}/vehicles/{vehicle}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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 VEHICLE_STATE_FIELD_NUMBER = 2; + private int vehicleState_ = 0; + /** + * + * + *
+   * The vehicle state.
+   * 
+ * + * .maps.fleetengine.v1.VehicleState vehicle_state = 2; + * + * @return The enum numeric value on the wire for vehicleState. + */ + @java.lang.Override + public int getVehicleStateValue() { + return vehicleState_; + } + /** + * + * + *
+   * The vehicle state.
+   * 
+ * + * .maps.fleetengine.v1.VehicleState vehicle_state = 2; + * + * @return The vehicleState. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleState getVehicleState() { + com.google.maps.fleetengine.v1.VehicleState result = + com.google.maps.fleetengine.v1.VehicleState.forNumber(vehicleState_); + return result == null ? com.google.maps.fleetengine.v1.VehicleState.UNRECOGNIZED : result; + } + + public static final int SUPPORTED_TRIP_TYPES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List supportedTripTypes_; + + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.maps.fleetengine.v1.TripType> + supportedTripTypes_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.maps.fleetengine.v1.TripType>() { + public com.google.maps.fleetengine.v1.TripType convert(java.lang.Integer from) { + com.google.maps.fleetengine.v1.TripType result = + com.google.maps.fleetengine.v1.TripType.forNumber(from); + return result == null ? com.google.maps.fleetengine.v1.TripType.UNRECOGNIZED : result; + } + }; + /** + * + * + *
+   * Trip types supported by this vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripType supported_trip_types = 3; + * + * @return A list containing the supportedTripTypes. + */ + @java.lang.Override + public java.util.List getSupportedTripTypesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.maps.fleetengine.v1.TripType>( + supportedTripTypes_, supportedTripTypes_converter_); + } + /** + * + * + *
+   * Trip types supported by this vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripType supported_trip_types = 3; + * + * @return The count of supportedTripTypes. + */ + @java.lang.Override + public int getSupportedTripTypesCount() { + return supportedTripTypes_.size(); + } + /** + * + * + *
+   * Trip types supported by this vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripType supported_trip_types = 3; + * + * @param index The index of the element to return. + * @return The supportedTripTypes at the given index. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TripType getSupportedTripTypes(int index) { + return supportedTripTypes_converter_.convert(supportedTripTypes_.get(index)); + } + /** + * + * + *
+   * Trip types supported by this vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripType supported_trip_types = 3; + * + * @return A list containing the enum numeric values on the wire for supportedTripTypes. + */ + @java.lang.Override + public java.util.List getSupportedTripTypesValueList() { + return supportedTripTypes_; + } + /** + * + * + *
+   * Trip types supported by this vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripType supported_trip_types = 3; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of supportedTripTypes at the given index. + */ + @java.lang.Override + public int getSupportedTripTypesValue(int index) { + return supportedTripTypes_.get(index); + } + + private int supportedTripTypesMemoizedSerializedSize; + + public static final int CURRENT_TRIPS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList currentTrips_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Output only. List of `trip_id`'s for trips currently assigned to this
+   * vehicle.
+   * 
+ * + * repeated string current_trips = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the currentTrips. + */ + public com.google.protobuf.ProtocolStringList getCurrentTripsList() { + return currentTrips_; + } + /** + * + * + *
+   * Output only. List of `trip_id`'s for trips currently assigned to this
+   * vehicle.
+   * 
+ * + * repeated string current_trips = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of currentTrips. + */ + public int getCurrentTripsCount() { + return currentTrips_.size(); + } + /** + * + * + *
+   * Output only. List of `trip_id`'s for trips currently assigned to this
+   * vehicle.
+   * 
+ * + * repeated string current_trips = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The currentTrips at the given index. + */ + public java.lang.String getCurrentTrips(int index) { + return currentTrips_.get(index); + } + /** + * + * + *
+   * Output only. List of `trip_id`'s for trips currently assigned to this
+   * vehicle.
+   * 
+ * + * repeated string current_trips = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the currentTrips at the given index. + */ + public com.google.protobuf.ByteString getCurrentTripsBytes(int index) { + return currentTrips_.getByteString(index); + } + + public static final int LAST_LOCATION_FIELD_NUMBER = 5; + private com.google.maps.fleetengine.v1.VehicleLocation lastLocation_; + /** + * + * + *
+   * Last reported location of the vehicle.
+   * 
+ * + * .maps.fleetengine.v1.VehicleLocation last_location = 5; + * + * @return Whether the lastLocation field is set. + */ + @java.lang.Override + public boolean hasLastLocation() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Last reported location of the vehicle.
+   * 
+ * + * .maps.fleetengine.v1.VehicleLocation last_location = 5; + * + * @return The lastLocation. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleLocation getLastLocation() { + return lastLocation_ == null + ? com.google.maps.fleetengine.v1.VehicleLocation.getDefaultInstance() + : lastLocation_; + } + /** + * + * + *
+   * Last reported location of the vehicle.
+   * 
+ * + * .maps.fleetengine.v1.VehicleLocation last_location = 5; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleLocationOrBuilder getLastLocationOrBuilder() { + return lastLocation_ == null + ? com.google.maps.fleetengine.v1.VehicleLocation.getDefaultInstance() + : lastLocation_; + } + + public static final int MAXIMUM_CAPACITY_FIELD_NUMBER = 6; + private int maximumCapacity_ = 0; + /** + * + * + *
+   * The total numbers of riders this vehicle can carry.  The driver is not
+   * considered in this value. This value must be greater than or equal to one.
+   * 
+ * + * int32 maximum_capacity = 6; + * + * @return The maximumCapacity. + */ + @java.lang.Override + public int getMaximumCapacity() { + return maximumCapacity_; + } + + public static final int ATTRIBUTES_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private java.util.List attributes_; + /** + * + * + *
+   * List of vehicle attributes. A vehicle can have at most 100
+   * attributes, and each attribute must have a unique key.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 8; + */ + @java.lang.Override + public java.util.List getAttributesList() { + return attributes_; + } + /** + * + * + *
+   * List of vehicle attributes. A vehicle can have at most 100
+   * attributes, and each attribute must have a unique key.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 8; + */ + @java.lang.Override + public java.util.List + getAttributesOrBuilderList() { + return attributes_; + } + /** + * + * + *
+   * List of vehicle attributes. A vehicle can have at most 100
+   * attributes, and each attribute must have a unique key.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 8; + */ + @java.lang.Override + public int getAttributesCount() { + return attributes_.size(); + } + /** + * + * + *
+   * List of vehicle attributes. A vehicle can have at most 100
+   * attributes, and each attribute must have a unique key.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 8; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleAttribute getAttributes(int index) { + return attributes_.get(index); + } + /** + * + * + *
+   * List of vehicle attributes. A vehicle can have at most 100
+   * attributes, and each attribute must have a unique key.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 8; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleAttributeOrBuilder getAttributesOrBuilder( + int index) { + return attributes_.get(index); + } + + public static final int VEHICLE_TYPE_FIELD_NUMBER = 9; + private com.google.maps.fleetengine.v1.Vehicle.VehicleType vehicleType_; + /** + * + * + *
+   * Required. The type of this vehicle.  Can be used to filter vehicles in
+   * `SearchVehicles` results.  Also influences ETA and route calculations.
+   * 
+ * + * + * .maps.fleetengine.v1.Vehicle.VehicleType vehicle_type = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the vehicleType field is set. + */ + @java.lang.Override + public boolean hasVehicleType() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Required. The type of this vehicle.  Can be used to filter vehicles in
+   * `SearchVehicles` results.  Also influences ETA and route calculations.
+   * 
+ * + * + * .maps.fleetengine.v1.Vehicle.VehicleType vehicle_type = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The vehicleType. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.Vehicle.VehicleType getVehicleType() { + return vehicleType_ == null + ? com.google.maps.fleetengine.v1.Vehicle.VehicleType.getDefaultInstance() + : vehicleType_; + } + /** + * + * + *
+   * Required. The type of this vehicle.  Can be used to filter vehicles in
+   * `SearchVehicles` results.  Also influences ETA and route calculations.
+   * 
+ * + * + * .maps.fleetengine.v1.Vehicle.VehicleType vehicle_type = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.Vehicle.VehicleTypeOrBuilder getVehicleTypeOrBuilder() { + return vehicleType_ == null + ? com.google.maps.fleetengine.v1.Vehicle.VehicleType.getDefaultInstance() + : vehicleType_; + } + + public static final int LICENSE_PLATE_FIELD_NUMBER = 10; + private com.google.maps.fleetengine.v1.LicensePlate licensePlate_; + /** + * + * + *
+   * License plate information for the vehicle.
+   * 
+ * + * .maps.fleetengine.v1.LicensePlate license_plate = 10; + * + * @return Whether the licensePlate field is set. + */ + @java.lang.Override + public boolean hasLicensePlate() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * License plate information for the vehicle.
+   * 
+ * + * .maps.fleetengine.v1.LicensePlate license_plate = 10; + * + * @return The licensePlate. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.LicensePlate getLicensePlate() { + return licensePlate_ == null + ? com.google.maps.fleetengine.v1.LicensePlate.getDefaultInstance() + : licensePlate_; + } + /** + * + * + *
+   * License plate information for the vehicle.
+   * 
+ * + * .maps.fleetengine.v1.LicensePlate license_plate = 10; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.LicensePlateOrBuilder getLicensePlateOrBuilder() { + return licensePlate_ == null + ? com.google.maps.fleetengine.v1.LicensePlate.getDefaultInstance() + : licensePlate_; + } + + public static final int ROUTE_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private java.util.List route_; + /** + * + * + *
+   * Deprecated: Use `Vehicle.waypoints` instead.
+   * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation route = 12 [deprecated = true]; + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.List getRouteList() { + return route_; + } + /** + * + * + *
+   * Deprecated: Use `Vehicle.waypoints` instead.
+   * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation route = 12 [deprecated = true]; + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.List + getRouteOrBuilderList() { + return route_; + } + /** + * + * + *
+   * Deprecated: Use `Vehicle.waypoints` instead.
+   * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation route = 12 [deprecated = true]; + */ + @java.lang.Override + @java.lang.Deprecated + public int getRouteCount() { + return route_.size(); + } + /** + * + * + *
+   * Deprecated: Use `Vehicle.waypoints` instead.
+   * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation route = 12 [deprecated = true]; + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.maps.fleetengine.v1.TerminalLocation getRoute(int index) { + return route_.get(index); + } + /** + * + * + *
+   * Deprecated: Use `Vehicle.waypoints` instead.
+   * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation route = 12 [deprecated = true]; + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.maps.fleetengine.v1.TerminalLocationOrBuilder getRouteOrBuilder(int index) { + return route_.get(index); + } + + public static final int CURRENT_ROUTE_SEGMENT_FIELD_NUMBER = 20; + + @SuppressWarnings("serial") + private volatile java.lang.Object currentRouteSegment_ = ""; + /** + * + * + *
+   * The polyline specifying the route the driver app intends to take to
+   * the next waypoint. This list is also returned in
+   * `Trip.current_route_segment` for all active trips assigned to the vehicle.
+   *
+   * Note: This field is intended only for use by the Driver SDK. Decoding is
+   * not yet supported.
+   * 
+ * + * string current_route_segment = 20; + * + * @return The currentRouteSegment. + */ + @java.lang.Override + public java.lang.String getCurrentRouteSegment() { + java.lang.Object ref = currentRouteSegment_; + 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(); + currentRouteSegment_ = s; + return s; + } + } + /** + * + * + *
+   * The polyline specifying the route the driver app intends to take to
+   * the next waypoint. This list is also returned in
+   * `Trip.current_route_segment` for all active trips assigned to the vehicle.
+   *
+   * Note: This field is intended only for use by the Driver SDK. Decoding is
+   * not yet supported.
+   * 
+ * + * string current_route_segment = 20; + * + * @return The bytes for currentRouteSegment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCurrentRouteSegmentBytes() { + java.lang.Object ref = currentRouteSegment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + currentRouteSegment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CURRENT_ROUTE_SEGMENT_TRAFFIC_FIELD_NUMBER = 28; + private com.google.maps.fleetengine.v1.TrafficPolylineData currentRouteSegmentTraffic_; + /** + * + * + *
+   * Input only. Fleet Engine uses this information to improve journey sharing.
+   * Note: This field is intended only for use by the Driver SDK.
+   * 
+ * + * + * .maps.fleetengine.v1.TrafficPolylineData current_route_segment_traffic = 28 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the currentRouteSegmentTraffic field is set. + */ + @java.lang.Override + public boolean hasCurrentRouteSegmentTraffic() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * Input only. Fleet Engine uses this information to improve journey sharing.
+   * Note: This field is intended only for use by the Driver SDK.
+   * 
+ * + * + * .maps.fleetengine.v1.TrafficPolylineData current_route_segment_traffic = 28 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The currentRouteSegmentTraffic. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TrafficPolylineData getCurrentRouteSegmentTraffic() { + return currentRouteSegmentTraffic_ == null + ? com.google.maps.fleetengine.v1.TrafficPolylineData.getDefaultInstance() + : currentRouteSegmentTraffic_; + } + /** + * + * + *
+   * Input only. Fleet Engine uses this information to improve journey sharing.
+   * Note: This field is intended only for use by the Driver SDK.
+   * 
+ * + * + * .maps.fleetengine.v1.TrafficPolylineData current_route_segment_traffic = 28 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TrafficPolylineDataOrBuilder + getCurrentRouteSegmentTrafficOrBuilder() { + return currentRouteSegmentTraffic_ == null + ? com.google.maps.fleetengine.v1.TrafficPolylineData.getDefaultInstance() + : currentRouteSegmentTraffic_; + } + + public static final int CURRENT_ROUTE_SEGMENT_VERSION_FIELD_NUMBER = 15; + private com.google.protobuf.Timestamp currentRouteSegmentVersion_; + /** + * + * + *
+   * Output only. Time when `current_route_segment` was set. It can be stored by
+   * the client and passed in future `GetVehicle` requests to prevent returning
+   * routes that haven't changed.
+   * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_version = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the currentRouteSegmentVersion field is set. + */ + @java.lang.Override + public boolean hasCurrentRouteSegmentVersion() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+   * Output only. Time when `current_route_segment` was set. It can be stored by
+   * the client and passed in future `GetVehicle` requests to prevent returning
+   * routes that haven't changed.
+   * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_version = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The currentRouteSegmentVersion. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCurrentRouteSegmentVersion() { + return currentRouteSegmentVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : currentRouteSegmentVersion_; + } + /** + * + * + *
+   * Output only. Time when `current_route_segment` was set. It can be stored by
+   * the client and passed in future `GetVehicle` requests to prevent returning
+   * routes that haven't changed.
+   * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_version = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCurrentRouteSegmentVersionOrBuilder() { + return currentRouteSegmentVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : currentRouteSegmentVersion_; + } + + public static final int CURRENT_ROUTE_SEGMENT_END_POINT_FIELD_NUMBER = 24; + private com.google.maps.fleetengine.v1.TripWaypoint currentRouteSegmentEndPoint_; + /** + * + * + *
+   * The waypoint where `current_route_segment` ends. This can be supplied by
+   * drivers on `UpdateVehicle` calls either as a full trip waypoint, a waypoint
+   * `LatLng`, or as the last `LatLng` of the `current_route_segment`. Fleet
+   * Engine will then do its best to interpolate to an actual waypoint if it is
+   * not fully specified. This field is ignored in `UpdateVehicle` calls unless
+   * `current_route_segment` is also specified.
+   * 
+ * + * .maps.fleetengine.v1.TripWaypoint current_route_segment_end_point = 24; + * + * @return Whether the currentRouteSegmentEndPoint field is set. + */ + @java.lang.Override + public boolean hasCurrentRouteSegmentEndPoint() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+   * The waypoint where `current_route_segment` ends. This can be supplied by
+   * drivers on `UpdateVehicle` calls either as a full trip waypoint, a waypoint
+   * `LatLng`, or as the last `LatLng` of the `current_route_segment`. Fleet
+   * Engine will then do its best to interpolate to an actual waypoint if it is
+   * not fully specified. This field is ignored in `UpdateVehicle` calls unless
+   * `current_route_segment` is also specified.
+   * 
+ * + * .maps.fleetengine.v1.TripWaypoint current_route_segment_end_point = 24; + * + * @return The currentRouteSegmentEndPoint. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TripWaypoint getCurrentRouteSegmentEndPoint() { + return currentRouteSegmentEndPoint_ == null + ? com.google.maps.fleetengine.v1.TripWaypoint.getDefaultInstance() + : currentRouteSegmentEndPoint_; + } + /** + * + * + *
+   * The waypoint where `current_route_segment` ends. This can be supplied by
+   * drivers on `UpdateVehicle` calls either as a full trip waypoint, a waypoint
+   * `LatLng`, or as the last `LatLng` of the `current_route_segment`. Fleet
+   * Engine will then do its best to interpolate to an actual waypoint if it is
+   * not fully specified. This field is ignored in `UpdateVehicle` calls unless
+   * `current_route_segment` is also specified.
+   * 
+ * + * .maps.fleetengine.v1.TripWaypoint current_route_segment_end_point = 24; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TripWaypointOrBuilder + getCurrentRouteSegmentEndPointOrBuilder() { + return currentRouteSegmentEndPoint_ == null + ? com.google.maps.fleetengine.v1.TripWaypoint.getDefaultInstance() + : currentRouteSegmentEndPoint_; + } + + public static final int REMAINING_DISTANCE_METERS_FIELD_NUMBER = 18; + private com.google.protobuf.Int32Value remainingDistanceMeters_; + /** + * + * + *
+   * The remaining driving distance for the `current_route_segment`.
+   * This value is also returned in `Trip.remaining_distance_meters` for all
+   * active trips assigned to the vehicle. The value is unspecified if the
+   * `current_route_segment` field is empty.
+   * 
+ * + * .google.protobuf.Int32Value remaining_distance_meters = 18; + * + * @return Whether the remainingDistanceMeters field is set. + */ + @java.lang.Override + public boolean hasRemainingDistanceMeters() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+   * The remaining driving distance for the `current_route_segment`.
+   * This value is also returned in `Trip.remaining_distance_meters` for all
+   * active trips assigned to the vehicle. The value is unspecified if the
+   * `current_route_segment` field is empty.
+   * 
+ * + * .google.protobuf.Int32Value remaining_distance_meters = 18; + * + * @return The remainingDistanceMeters. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getRemainingDistanceMeters() { + return remainingDistanceMeters_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : remainingDistanceMeters_; + } + /** + * + * + *
+   * The remaining driving distance for the `current_route_segment`.
+   * This value is also returned in `Trip.remaining_distance_meters` for all
+   * active trips assigned to the vehicle. The value is unspecified if the
+   * `current_route_segment` field is empty.
+   * 
+ * + * .google.protobuf.Int32Value remaining_distance_meters = 18; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getRemainingDistanceMetersOrBuilder() { + return remainingDistanceMeters_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : remainingDistanceMeters_; + } + + public static final int ETA_TO_FIRST_WAYPOINT_FIELD_NUMBER = 19; + private com.google.protobuf.Timestamp etaToFirstWaypoint_; + /** + * + * + *
+   * The ETA to the first entry in the `waypoints` field.  The value is
+   * unspecified if the `waypoints` field is empty or the
+   * `Vehicle.current_route_segment` field is empty.
+   *
+   * When updating a vehicle, `remaining_time_seconds` takes precedence over
+   * `eta_to_first_waypoint` in the same request.
+   * 
+ * + * .google.protobuf.Timestamp eta_to_first_waypoint = 19; + * + * @return Whether the etaToFirstWaypoint field is set. + */ + @java.lang.Override + public boolean hasEtaToFirstWaypoint() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+   * The ETA to the first entry in the `waypoints` field.  The value is
+   * unspecified if the `waypoints` field is empty or the
+   * `Vehicle.current_route_segment` field is empty.
+   *
+   * When updating a vehicle, `remaining_time_seconds` takes precedence over
+   * `eta_to_first_waypoint` in the same request.
+   * 
+ * + * .google.protobuf.Timestamp eta_to_first_waypoint = 19; + * + * @return The etaToFirstWaypoint. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEtaToFirstWaypoint() { + return etaToFirstWaypoint_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : etaToFirstWaypoint_; + } + /** + * + * + *
+   * The ETA to the first entry in the `waypoints` field.  The value is
+   * unspecified if the `waypoints` field is empty or the
+   * `Vehicle.current_route_segment` field is empty.
+   *
+   * When updating a vehicle, `remaining_time_seconds` takes precedence over
+   * `eta_to_first_waypoint` in the same request.
+   * 
+ * + * .google.protobuf.Timestamp eta_to_first_waypoint = 19; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEtaToFirstWaypointOrBuilder() { + return etaToFirstWaypoint_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : etaToFirstWaypoint_; + } + + public static final int REMAINING_TIME_SECONDS_FIELD_NUMBER = 25; + private com.google.protobuf.Int32Value remainingTimeSeconds_; + /** + * + * + *
+   * Input only. The remaining driving time for the `current_route_segment`. The
+   * value is unspecified if the `waypoints` field is empty or the
+   * `Vehicle.current_route_segment` field is empty. This value should match
+   * `eta_to_first_waypoint` - `current_time` if all parties are using the same
+   * clock.
+   *
+   * When updating a vehicle, `remaining_time_seconds` takes precedence over
+   * `eta_to_first_waypoint` in the same request.
+   * 
+ * + * + * .google.protobuf.Int32Value remaining_time_seconds = 25 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the remainingTimeSeconds field is set. + */ + @java.lang.Override + public boolean hasRemainingTimeSeconds() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+   * Input only. The remaining driving time for the `current_route_segment`. The
+   * value is unspecified if the `waypoints` field is empty or the
+   * `Vehicle.current_route_segment` field is empty. This value should match
+   * `eta_to_first_waypoint` - `current_time` if all parties are using the same
+   * clock.
+   *
+   * When updating a vehicle, `remaining_time_seconds` takes precedence over
+   * `eta_to_first_waypoint` in the same request.
+   * 
+ * + * + * .google.protobuf.Int32Value remaining_time_seconds = 25 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The remainingTimeSeconds. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getRemainingTimeSeconds() { + return remainingTimeSeconds_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : remainingTimeSeconds_; + } + /** + * + * + *
+   * Input only. The remaining driving time for the `current_route_segment`. The
+   * value is unspecified if the `waypoints` field is empty or the
+   * `Vehicle.current_route_segment` field is empty. This value should match
+   * `eta_to_first_waypoint` - `current_time` if all parties are using the same
+   * clock.
+   *
+   * When updating a vehicle, `remaining_time_seconds` takes precedence over
+   * `eta_to_first_waypoint` in the same request.
+   * 
+ * + * + * .google.protobuf.Int32Value remaining_time_seconds = 25 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getRemainingTimeSecondsOrBuilder() { + return remainingTimeSeconds_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : remainingTimeSeconds_; + } + + public static final int WAYPOINTS_FIELD_NUMBER = 22; + + @SuppressWarnings("serial") + private java.util.List waypoints_; + /** + * + * + *
+   * The remaining waypoints assigned to this Vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint waypoints = 22; + */ + @java.lang.Override + public java.util.List getWaypointsList() { + return waypoints_; + } + /** + * + * + *
+   * The remaining waypoints assigned to this Vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint waypoints = 22; + */ + @java.lang.Override + public java.util.List + getWaypointsOrBuilderList() { + return waypoints_; + } + /** + * + * + *
+   * The remaining waypoints assigned to this Vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint waypoints = 22; + */ + @java.lang.Override + public int getWaypointsCount() { + return waypoints_.size(); + } + /** + * + * + *
+   * The remaining waypoints assigned to this Vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint waypoints = 22; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TripWaypoint getWaypoints(int index) { + return waypoints_.get(index); + } + /** + * + * + *
+   * The remaining waypoints assigned to this Vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint waypoints = 22; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TripWaypointOrBuilder getWaypointsOrBuilder(int index) { + return waypoints_.get(index); + } + + public static final int WAYPOINTS_VERSION_FIELD_NUMBER = 16; + private com.google.protobuf.Timestamp waypointsVersion_; + /** + * + * + *
+   * Output only. Last time the `waypoints` field was updated. Clients should
+   * cache this value and pass it in `GetVehicleRequest` to ensure the
+   * `waypoints` field is only returned if it is updated.
+   * 
+ * + * + * .google.protobuf.Timestamp waypoints_version = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the waypointsVersion field is set. + */ + @java.lang.Override + public boolean hasWaypointsVersion() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * + * + *
+   * Output only. Last time the `waypoints` field was updated. Clients should
+   * cache this value and pass it in `GetVehicleRequest` to ensure the
+   * `waypoints` field is only returned if it is updated.
+   * 
+ * + * + * .google.protobuf.Timestamp waypoints_version = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The waypointsVersion. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getWaypointsVersion() { + return waypointsVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : waypointsVersion_; + } + /** + * + * + *
+   * Output only. Last time the `waypoints` field was updated. Clients should
+   * cache this value and pass it in `GetVehicleRequest` to ensure the
+   * `waypoints` field is only returned if it is updated.
+   * 
+ * + * + * .google.protobuf.Timestamp waypoints_version = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getWaypointsVersionOrBuilder() { + return waypointsVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : waypointsVersion_; + } + + public static final int BACK_TO_BACK_ENABLED_FIELD_NUMBER = 23; + private boolean backToBackEnabled_ = false; + /** + * + * + *
+   * Indicates if the driver accepts back-to-back trips. If `true`,
+   * `SearchVehicles` may include the vehicle even if it is currently assigned
+   * to a trip. The default value is `false`.
+   * 
+ * + * bool back_to_back_enabled = 23; + * + * @return The backToBackEnabled. + */ + @java.lang.Override + public boolean getBackToBackEnabled() { + return backToBackEnabled_; + } + + public static final int NAVIGATION_STATUS_FIELD_NUMBER = 26; + private int navigationStatus_ = 0; + /** + * + * + *
+   * The vehicle's navigation status.
+   * 
+ * + * .maps.fleetengine.v1.NavigationStatus navigation_status = 26; + * + * @return The enum numeric value on the wire for navigationStatus. + */ + @java.lang.Override + public int getNavigationStatusValue() { + return navigationStatus_; + } + /** + * + * + *
+   * The vehicle's navigation status.
+   * 
+ * + * .maps.fleetengine.v1.NavigationStatus navigation_status = 26; + * + * @return The navigationStatus. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.NavigationStatus getNavigationStatus() { + com.google.maps.fleetengine.v1.NavigationStatus result = + com.google.maps.fleetengine.v1.NavigationStatus.forNumber(navigationStatus_); + return result == null ? com.google.maps.fleetengine.v1.NavigationStatus.UNRECOGNIZED : result; + } + + public static final int DEVICE_SETTINGS_FIELD_NUMBER = 27; + private com.google.maps.fleetengine.v1.DeviceSettings deviceSettings_; + /** + * + * + *
+   * Input only. Information about settings in the mobile device being used by
+   * the driver.
+   * 
+ * + * + * .maps.fleetengine.v1.DeviceSettings device_settings = 27 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the deviceSettings field is set. + */ + @java.lang.Override + public boolean hasDeviceSettings() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * + * + *
+   * Input only. Information about settings in the mobile device being used by
+   * the driver.
+   * 
+ * + * + * .maps.fleetengine.v1.DeviceSettings device_settings = 27 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The deviceSettings. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.DeviceSettings getDeviceSettings() { + return deviceSettings_ == null + ? com.google.maps.fleetengine.v1.DeviceSettings.getDefaultInstance() + : deviceSettings_; + } + /** + * + * + *
+   * Input only. Information about settings in the mobile device being used by
+   * the driver.
+   * 
+ * + * + * .maps.fleetengine.v1.DeviceSettings device_settings = 27 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.DeviceSettingsOrBuilder getDeviceSettingsOrBuilder() { + return deviceSettings_ == null + ? com.google.maps.fleetengine.v1.DeviceSettings.getDefaultInstance() + : deviceSettings_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (vehicleState_ + != com.google.maps.fleetengine.v1.VehicleState.UNKNOWN_VEHICLE_STATE.getNumber()) { + output.writeEnum(2, vehicleState_); + } + if (getSupportedTripTypesList().size() > 0) { + output.writeUInt32NoTag(26); + output.writeUInt32NoTag(supportedTripTypesMemoizedSerializedSize); + } + for (int i = 0; i < supportedTripTypes_.size(); i++) { + output.writeEnumNoTag(supportedTripTypes_.get(i)); + } + for (int i = 0; i < currentTrips_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, currentTrips_.getRaw(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getLastLocation()); + } + if (maximumCapacity_ != 0) { + output.writeInt32(6, maximumCapacity_); + } + for (int i = 0; i < attributes_.size(); i++) { + output.writeMessage(8, attributes_.get(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(9, getVehicleType()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(10, getLicensePlate()); + } + for (int i = 0; i < route_.size(); i++) { + output.writeMessage(12, route_.get(i)); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(15, getCurrentRouteSegmentVersion()); + } + if (((bitField0_ & 0x00000200) != 0)) { + output.writeMessage(16, getWaypointsVersion()); + } + if (((bitField0_ & 0x00000040) != 0)) { + output.writeMessage(18, getRemainingDistanceMeters()); + } + if (((bitField0_ & 0x00000080) != 0)) { + output.writeMessage(19, getEtaToFirstWaypoint()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(currentRouteSegment_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 20, currentRouteSegment_); + } + for (int i = 0; i < waypoints_.size(); i++) { + output.writeMessage(22, waypoints_.get(i)); + } + if (backToBackEnabled_ != false) { + output.writeBool(23, backToBackEnabled_); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(24, getCurrentRouteSegmentEndPoint()); + } + if (((bitField0_ & 0x00000100) != 0)) { + output.writeMessage(25, getRemainingTimeSeconds()); + } + if (navigationStatus_ + != com.google.maps.fleetengine.v1.NavigationStatus.UNKNOWN_NAVIGATION_STATUS.getNumber()) { + output.writeEnum(26, navigationStatus_); + } + if (((bitField0_ & 0x00000400) != 0)) { + output.writeMessage(27, getDeviceSettings()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(28, getCurrentRouteSegmentTraffic()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (vehicleState_ + != com.google.maps.fleetengine.v1.VehicleState.UNKNOWN_VEHICLE_STATE.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, vehicleState_); + } + { + int dataSize = 0; + for (int i = 0; i < supportedTripTypes_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(supportedTripTypes_.get(i)); + } + size += dataSize; + if (!getSupportedTripTypesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + supportedTripTypesMemoizedSerializedSize = dataSize; + } + { + int dataSize = 0; + for (int i = 0; i < currentTrips_.size(); i++) { + dataSize += computeStringSizeNoTag(currentTrips_.getRaw(i)); + } + size += dataSize; + size += 1 * getCurrentTripsList().size(); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getLastLocation()); + } + if (maximumCapacity_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, maximumCapacity_); + } + for (int i = 0; i < attributes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, attributes_.get(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getVehicleType()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getLicensePlate()); + } + for (int i = 0; i < route_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, route_.get(i)); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 15, getCurrentRouteSegmentVersion()); + } + if (((bitField0_ & 0x00000200) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, getWaypointsVersion()); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 18, getRemainingDistanceMeters()); + } + if (((bitField0_ & 0x00000080) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, getEtaToFirstWaypoint()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(currentRouteSegment_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(20, currentRouteSegment_); + } + for (int i = 0; i < waypoints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(22, waypoints_.get(i)); + } + if (backToBackEnabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(23, backToBackEnabled_); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 24, getCurrentRouteSegmentEndPoint()); + } + if (((bitField0_ & 0x00000100) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(25, getRemainingTimeSeconds()); + } + if (navigationStatus_ + != com.google.maps.fleetengine.v1.NavigationStatus.UNKNOWN_NAVIGATION_STATUS.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(26, navigationStatus_); + } + if (((bitField0_ & 0x00000400) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(27, getDeviceSettings()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 28, getCurrentRouteSegmentTraffic()); + } + 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.fleetengine.v1.Vehicle)) { + return super.equals(obj); + } + com.google.maps.fleetengine.v1.Vehicle other = (com.google.maps.fleetengine.v1.Vehicle) obj; + + if (!getName().equals(other.getName())) return false; + if (vehicleState_ != other.vehicleState_) return false; + if (!supportedTripTypes_.equals(other.supportedTripTypes_)) return false; + if (!getCurrentTripsList().equals(other.getCurrentTripsList())) return false; + if (hasLastLocation() != other.hasLastLocation()) return false; + if (hasLastLocation()) { + if (!getLastLocation().equals(other.getLastLocation())) return false; + } + if (getMaximumCapacity() != other.getMaximumCapacity()) return false; + if (!getAttributesList().equals(other.getAttributesList())) return false; + if (hasVehicleType() != other.hasVehicleType()) return false; + if (hasVehicleType()) { + if (!getVehicleType().equals(other.getVehicleType())) return false; + } + if (hasLicensePlate() != other.hasLicensePlate()) return false; + if (hasLicensePlate()) { + if (!getLicensePlate().equals(other.getLicensePlate())) return false; + } + if (!getRouteList().equals(other.getRouteList())) return false; + if (!getCurrentRouteSegment().equals(other.getCurrentRouteSegment())) return false; + if (hasCurrentRouteSegmentTraffic() != other.hasCurrentRouteSegmentTraffic()) return false; + if (hasCurrentRouteSegmentTraffic()) { + if (!getCurrentRouteSegmentTraffic().equals(other.getCurrentRouteSegmentTraffic())) + return false; + } + if (hasCurrentRouteSegmentVersion() != other.hasCurrentRouteSegmentVersion()) return false; + if (hasCurrentRouteSegmentVersion()) { + if (!getCurrentRouteSegmentVersion().equals(other.getCurrentRouteSegmentVersion())) + return false; + } + if (hasCurrentRouteSegmentEndPoint() != other.hasCurrentRouteSegmentEndPoint()) return false; + if (hasCurrentRouteSegmentEndPoint()) { + if (!getCurrentRouteSegmentEndPoint().equals(other.getCurrentRouteSegmentEndPoint())) + return false; + } + if (hasRemainingDistanceMeters() != other.hasRemainingDistanceMeters()) return false; + if (hasRemainingDistanceMeters()) { + if (!getRemainingDistanceMeters().equals(other.getRemainingDistanceMeters())) return false; + } + if (hasEtaToFirstWaypoint() != other.hasEtaToFirstWaypoint()) return false; + if (hasEtaToFirstWaypoint()) { + if (!getEtaToFirstWaypoint().equals(other.getEtaToFirstWaypoint())) return false; + } + if (hasRemainingTimeSeconds() != other.hasRemainingTimeSeconds()) return false; + if (hasRemainingTimeSeconds()) { + if (!getRemainingTimeSeconds().equals(other.getRemainingTimeSeconds())) return false; + } + if (!getWaypointsList().equals(other.getWaypointsList())) return false; + if (hasWaypointsVersion() != other.hasWaypointsVersion()) return false; + if (hasWaypointsVersion()) { + if (!getWaypointsVersion().equals(other.getWaypointsVersion())) return false; + } + if (getBackToBackEnabled() != other.getBackToBackEnabled()) return false; + if (navigationStatus_ != other.navigationStatus_) return false; + if (hasDeviceSettings() != other.hasDeviceSettings()) return false; + if (hasDeviceSettings()) { + if (!getDeviceSettings().equals(other.getDeviceSettings())) 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 = (37 * hash) + VEHICLE_STATE_FIELD_NUMBER; + hash = (53 * hash) + vehicleState_; + if (getSupportedTripTypesCount() > 0) { + hash = (37 * hash) + SUPPORTED_TRIP_TYPES_FIELD_NUMBER; + hash = (53 * hash) + supportedTripTypes_.hashCode(); + } + if (getCurrentTripsCount() > 0) { + hash = (37 * hash) + CURRENT_TRIPS_FIELD_NUMBER; + hash = (53 * hash) + getCurrentTripsList().hashCode(); + } + if (hasLastLocation()) { + hash = (37 * hash) + LAST_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLastLocation().hashCode(); + } + hash = (37 * hash) + MAXIMUM_CAPACITY_FIELD_NUMBER; + hash = (53 * hash) + getMaximumCapacity(); + if (getAttributesCount() > 0) { + hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getAttributesList().hashCode(); + } + if (hasVehicleType()) { + hash = (37 * hash) + VEHICLE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getVehicleType().hashCode(); + } + if (hasLicensePlate()) { + hash = (37 * hash) + LICENSE_PLATE_FIELD_NUMBER; + hash = (53 * hash) + getLicensePlate().hashCode(); + } + if (getRouteCount() > 0) { + hash = (37 * hash) + ROUTE_FIELD_NUMBER; + hash = (53 * hash) + getRouteList().hashCode(); + } + hash = (37 * hash) + CURRENT_ROUTE_SEGMENT_FIELD_NUMBER; + hash = (53 * hash) + getCurrentRouteSegment().hashCode(); + if (hasCurrentRouteSegmentTraffic()) { + hash = (37 * hash) + CURRENT_ROUTE_SEGMENT_TRAFFIC_FIELD_NUMBER; + hash = (53 * hash) + getCurrentRouteSegmentTraffic().hashCode(); + } + if (hasCurrentRouteSegmentVersion()) { + hash = (37 * hash) + CURRENT_ROUTE_SEGMENT_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getCurrentRouteSegmentVersion().hashCode(); + } + if (hasCurrentRouteSegmentEndPoint()) { + hash = (37 * hash) + CURRENT_ROUTE_SEGMENT_END_POINT_FIELD_NUMBER; + hash = (53 * hash) + getCurrentRouteSegmentEndPoint().hashCode(); + } + if (hasRemainingDistanceMeters()) { + hash = (37 * hash) + REMAINING_DISTANCE_METERS_FIELD_NUMBER; + hash = (53 * hash) + getRemainingDistanceMeters().hashCode(); + } + if (hasEtaToFirstWaypoint()) { + hash = (37 * hash) + ETA_TO_FIRST_WAYPOINT_FIELD_NUMBER; + hash = (53 * hash) + getEtaToFirstWaypoint().hashCode(); + } + if (hasRemainingTimeSeconds()) { + hash = (37 * hash) + REMAINING_TIME_SECONDS_FIELD_NUMBER; + hash = (53 * hash) + getRemainingTimeSeconds().hashCode(); + } + if (getWaypointsCount() > 0) { + hash = (37 * hash) + WAYPOINTS_FIELD_NUMBER; + hash = (53 * hash) + getWaypointsList().hashCode(); + } + if (hasWaypointsVersion()) { + hash = (37 * hash) + WAYPOINTS_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getWaypointsVersion().hashCode(); + } + hash = (37 * hash) + BACK_TO_BACK_ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBackToBackEnabled()); + hash = (37 * hash) + NAVIGATION_STATUS_FIELD_NUMBER; + hash = (53 * hash) + navigationStatus_; + if (hasDeviceSettings()) { + hash = (37 * hash) + DEVICE_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getDeviceSettings().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.fleetengine.v1.Vehicle parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.Vehicle 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.fleetengine.v1.Vehicle parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.Vehicle 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.fleetengine.v1.Vehicle parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.Vehicle parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.Vehicle parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.Vehicle parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.Vehicle parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.Vehicle parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.Vehicle parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.Vehicle parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.fleetengine.v1.Vehicle prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Vehicle metadata.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.v1.Vehicle} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.v1.Vehicle) + com.google.maps.fleetengine.v1.VehicleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.Vehicles + .internal_static_maps_fleetengine_v1_Vehicle_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.Vehicles + .internal_static_maps_fleetengine_v1_Vehicle_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.Vehicle.class, + com.google.maps.fleetengine.v1.Vehicle.Builder.class); + } + + // Construct using com.google.maps.fleetengine.v1.Vehicle.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getLastLocationFieldBuilder(); + getAttributesFieldBuilder(); + getVehicleTypeFieldBuilder(); + getLicensePlateFieldBuilder(); + getRouteFieldBuilder(); + getCurrentRouteSegmentTrafficFieldBuilder(); + getCurrentRouteSegmentVersionFieldBuilder(); + getCurrentRouteSegmentEndPointFieldBuilder(); + getRemainingDistanceMetersFieldBuilder(); + getEtaToFirstWaypointFieldBuilder(); + getRemainingTimeSecondsFieldBuilder(); + getWaypointsFieldBuilder(); + getWaypointsVersionFieldBuilder(); + getDeviceSettingsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + vehicleState_ = 0; + supportedTripTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + currentTrips_ = com.google.protobuf.LazyStringArrayList.emptyList(); + lastLocation_ = null; + if (lastLocationBuilder_ != null) { + lastLocationBuilder_.dispose(); + lastLocationBuilder_ = null; + } + maximumCapacity_ = 0; + if (attributesBuilder_ == null) { + attributes_ = java.util.Collections.emptyList(); + } else { + attributes_ = null; + attributesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); + vehicleType_ = null; + if (vehicleTypeBuilder_ != null) { + vehicleTypeBuilder_.dispose(); + vehicleTypeBuilder_ = null; + } + licensePlate_ = null; + if (licensePlateBuilder_ != null) { + licensePlateBuilder_.dispose(); + licensePlateBuilder_ = null; + } + if (routeBuilder_ == null) { + route_ = java.util.Collections.emptyList(); + } else { + route_ = null; + routeBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000200); + currentRouteSegment_ = ""; + currentRouteSegmentTraffic_ = null; + if (currentRouteSegmentTrafficBuilder_ != null) { + currentRouteSegmentTrafficBuilder_.dispose(); + currentRouteSegmentTrafficBuilder_ = null; + } + currentRouteSegmentVersion_ = null; + if (currentRouteSegmentVersionBuilder_ != null) { + currentRouteSegmentVersionBuilder_.dispose(); + currentRouteSegmentVersionBuilder_ = null; + } + currentRouteSegmentEndPoint_ = null; + if (currentRouteSegmentEndPointBuilder_ != null) { + currentRouteSegmentEndPointBuilder_.dispose(); + currentRouteSegmentEndPointBuilder_ = null; + } + remainingDistanceMeters_ = null; + if (remainingDistanceMetersBuilder_ != null) { + remainingDistanceMetersBuilder_.dispose(); + remainingDistanceMetersBuilder_ = null; + } + etaToFirstWaypoint_ = null; + if (etaToFirstWaypointBuilder_ != null) { + etaToFirstWaypointBuilder_.dispose(); + etaToFirstWaypointBuilder_ = null; + } + remainingTimeSeconds_ = null; + if (remainingTimeSecondsBuilder_ != null) { + remainingTimeSecondsBuilder_.dispose(); + remainingTimeSecondsBuilder_ = null; + } + if (waypointsBuilder_ == null) { + waypoints_ = java.util.Collections.emptyList(); + } else { + waypoints_ = null; + waypointsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00020000); + waypointsVersion_ = null; + if (waypointsVersionBuilder_ != null) { + waypointsVersionBuilder_.dispose(); + waypointsVersionBuilder_ = null; + } + backToBackEnabled_ = false; + navigationStatus_ = 0; + deviceSettings_ = null; + if (deviceSettingsBuilder_ != null) { + deviceSettingsBuilder_.dispose(); + deviceSettingsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.fleetengine.v1.Vehicles + .internal_static_maps_fleetengine_v1_Vehicle_descriptor; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.Vehicle getDefaultInstanceForType() { + return com.google.maps.fleetengine.v1.Vehicle.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.Vehicle build() { + com.google.maps.fleetengine.v1.Vehicle result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.Vehicle buildPartial() { + com.google.maps.fleetengine.v1.Vehicle result = + new com.google.maps.fleetengine.v1.Vehicle(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.maps.fleetengine.v1.Vehicle result) { + if (((bitField0_ & 0x00000004) != 0)) { + supportedTripTypes_ = java.util.Collections.unmodifiableList(supportedTripTypes_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.supportedTripTypes_ = supportedTripTypes_; + if (attributesBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0)) { + attributes_ = java.util.Collections.unmodifiableList(attributes_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.attributes_ = attributes_; + } else { + result.attributes_ = attributesBuilder_.build(); + } + if (routeBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0)) { + route_ = java.util.Collections.unmodifiableList(route_); + bitField0_ = (bitField0_ & ~0x00000200); + } + result.route_ = route_; + } else { + result.route_ = routeBuilder_.build(); + } + if (waypointsBuilder_ == null) { + if (((bitField0_ & 0x00020000) != 0)) { + waypoints_ = java.util.Collections.unmodifiableList(waypoints_); + bitField0_ = (bitField0_ & ~0x00020000); + } + result.waypoints_ = waypoints_; + } else { + result.waypoints_ = waypointsBuilder_.build(); + } + } + + private void buildPartial0(com.google.maps.fleetengine.v1.Vehicle result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.vehicleState_ = vehicleState_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + currentTrips_.makeImmutable(); + result.currentTrips_ = currentTrips_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.lastLocation_ = + lastLocationBuilder_ == null ? lastLocation_ : lastLocationBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.maximumCapacity_ = maximumCapacity_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.vehicleType_ = + vehicleTypeBuilder_ == null ? vehicleType_ : vehicleTypeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.licensePlate_ = + licensePlateBuilder_ == null ? licensePlate_ : licensePlateBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.currentRouteSegment_ = currentRouteSegment_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.currentRouteSegmentTraffic_ = + currentRouteSegmentTrafficBuilder_ == null + ? currentRouteSegmentTraffic_ + : currentRouteSegmentTrafficBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.currentRouteSegmentVersion_ = + currentRouteSegmentVersionBuilder_ == null + ? currentRouteSegmentVersion_ + : currentRouteSegmentVersionBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.currentRouteSegmentEndPoint_ = + currentRouteSegmentEndPointBuilder_ == null + ? currentRouteSegmentEndPoint_ + : currentRouteSegmentEndPointBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.remainingDistanceMeters_ = + remainingDistanceMetersBuilder_ == null + ? remainingDistanceMeters_ + : remainingDistanceMetersBuilder_.build(); + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.etaToFirstWaypoint_ = + etaToFirstWaypointBuilder_ == null + ? etaToFirstWaypoint_ + : etaToFirstWaypointBuilder_.build(); + to_bitField0_ |= 0x00000080; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.remainingTimeSeconds_ = + remainingTimeSecondsBuilder_ == null + ? remainingTimeSeconds_ + : remainingTimeSecondsBuilder_.build(); + to_bitField0_ |= 0x00000100; + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.waypointsVersion_ = + waypointsVersionBuilder_ == null ? waypointsVersion_ : waypointsVersionBuilder_.build(); + to_bitField0_ |= 0x00000200; + } + if (((from_bitField0_ & 0x00080000) != 0)) { + result.backToBackEnabled_ = backToBackEnabled_; + } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.navigationStatus_ = navigationStatus_; + } + if (((from_bitField0_ & 0x00200000) != 0)) { + result.deviceSettings_ = + deviceSettingsBuilder_ == null ? deviceSettings_ : deviceSettingsBuilder_.build(); + to_bitField0_ |= 0x00000400; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.fleetengine.v1.Vehicle) { + return mergeFrom((com.google.maps.fleetengine.v1.Vehicle) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.fleetengine.v1.Vehicle other) { + if (other == com.google.maps.fleetengine.v1.Vehicle.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.vehicleState_ != 0) { + setVehicleStateValue(other.getVehicleStateValue()); + } + if (!other.supportedTripTypes_.isEmpty()) { + if (supportedTripTypes_.isEmpty()) { + supportedTripTypes_ = other.supportedTripTypes_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureSupportedTripTypesIsMutable(); + supportedTripTypes_.addAll(other.supportedTripTypes_); + } + onChanged(); + } + if (!other.currentTrips_.isEmpty()) { + if (currentTrips_.isEmpty()) { + currentTrips_ = other.currentTrips_; + bitField0_ |= 0x00000008; + } else { + ensureCurrentTripsIsMutable(); + currentTrips_.addAll(other.currentTrips_); + } + onChanged(); + } + if (other.hasLastLocation()) { + mergeLastLocation(other.getLastLocation()); + } + if (other.getMaximumCapacity() != 0) { + setMaximumCapacity(other.getMaximumCapacity()); + } + if (attributesBuilder_ == null) { + if (!other.attributes_.isEmpty()) { + if (attributes_.isEmpty()) { + attributes_ = other.attributes_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureAttributesIsMutable(); + attributes_.addAll(other.attributes_); + } + onChanged(); + } + } else { + if (!other.attributes_.isEmpty()) { + if (attributesBuilder_.isEmpty()) { + attributesBuilder_.dispose(); + attributesBuilder_ = null; + attributes_ = other.attributes_; + bitField0_ = (bitField0_ & ~0x00000040); + attributesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAttributesFieldBuilder() + : null; + } else { + attributesBuilder_.addAllMessages(other.attributes_); + } + } + } + if (other.hasVehicleType()) { + mergeVehicleType(other.getVehicleType()); + } + if (other.hasLicensePlate()) { + mergeLicensePlate(other.getLicensePlate()); + } + if (routeBuilder_ == null) { + if (!other.route_.isEmpty()) { + if (route_.isEmpty()) { + route_ = other.route_; + bitField0_ = (bitField0_ & ~0x00000200); + } else { + ensureRouteIsMutable(); + route_.addAll(other.route_); + } + onChanged(); + } + } else { + if (!other.route_.isEmpty()) { + if (routeBuilder_.isEmpty()) { + routeBuilder_.dispose(); + routeBuilder_ = null; + route_ = other.route_; + bitField0_ = (bitField0_ & ~0x00000200); + routeBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRouteFieldBuilder() + : null; + } else { + routeBuilder_.addAllMessages(other.route_); + } + } + } + if (!other.getCurrentRouteSegment().isEmpty()) { + currentRouteSegment_ = other.currentRouteSegment_; + bitField0_ |= 0x00000400; + onChanged(); + } + if (other.hasCurrentRouteSegmentTraffic()) { + mergeCurrentRouteSegmentTraffic(other.getCurrentRouteSegmentTraffic()); + } + if (other.hasCurrentRouteSegmentVersion()) { + mergeCurrentRouteSegmentVersion(other.getCurrentRouteSegmentVersion()); + } + if (other.hasCurrentRouteSegmentEndPoint()) { + mergeCurrentRouteSegmentEndPoint(other.getCurrentRouteSegmentEndPoint()); + } + if (other.hasRemainingDistanceMeters()) { + mergeRemainingDistanceMeters(other.getRemainingDistanceMeters()); + } + if (other.hasEtaToFirstWaypoint()) { + mergeEtaToFirstWaypoint(other.getEtaToFirstWaypoint()); + } + if (other.hasRemainingTimeSeconds()) { + mergeRemainingTimeSeconds(other.getRemainingTimeSeconds()); + } + if (waypointsBuilder_ == null) { + if (!other.waypoints_.isEmpty()) { + if (waypoints_.isEmpty()) { + waypoints_ = other.waypoints_; + bitField0_ = (bitField0_ & ~0x00020000); + } else { + ensureWaypointsIsMutable(); + waypoints_.addAll(other.waypoints_); + } + onChanged(); + } + } else { + if (!other.waypoints_.isEmpty()) { + if (waypointsBuilder_.isEmpty()) { + waypointsBuilder_.dispose(); + waypointsBuilder_ = null; + waypoints_ = other.waypoints_; + bitField0_ = (bitField0_ & ~0x00020000); + waypointsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getWaypointsFieldBuilder() + : null; + } else { + waypointsBuilder_.addAllMessages(other.waypoints_); + } + } + } + if (other.hasWaypointsVersion()) { + mergeWaypointsVersion(other.getWaypointsVersion()); + } + if (other.getBackToBackEnabled() != false) { + setBackToBackEnabled(other.getBackToBackEnabled()); + } + if (other.navigationStatus_ != 0) { + setNavigationStatusValue(other.getNavigationStatusValue()); + } + if (other.hasDeviceSettings()) { + mergeDeviceSettings(other.getDeviceSettings()); + } + 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 16: + { + vehicleState_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + int tmpRaw = input.readEnum(); + ensureSupportedTripTypesIsMutable(); + supportedTripTypes_.add(tmpRaw); + break; + } // case 24 + case 26: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureSupportedTripTypesIsMutable(); + supportedTripTypes_.add(tmpRaw); + } + input.popLimit(oldLimit); + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureCurrentTripsIsMutable(); + currentTrips_.add(s); + break; + } // case 34 + case 42: + { + input.readMessage(getLastLocationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + maximumCapacity_ = input.readInt32(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 66: + { + com.google.maps.fleetengine.v1.VehicleAttribute m = + input.readMessage( + com.google.maps.fleetengine.v1.VehicleAttribute.parser(), + extensionRegistry); + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.add(m); + } else { + attributesBuilder_.addMessage(m); + } + break; + } // case 66 + case 74: + { + input.readMessage(getVehicleTypeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 74 + case 82: + { + input.readMessage(getLicensePlateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 82 + case 98: + { + com.google.maps.fleetengine.v1.TerminalLocation m = + input.readMessage( + com.google.maps.fleetengine.v1.TerminalLocation.parser(), + extensionRegistry); + if (routeBuilder_ == null) { + ensureRouteIsMutable(); + route_.add(m); + } else { + routeBuilder_.addMessage(m); + } + break; + } // case 98 + case 122: + { + input.readMessage( + getCurrentRouteSegmentVersionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 122 + case 130: + { + input.readMessage( + getWaypointsVersionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00040000; + break; + } // case 130 + case 146: + { + input.readMessage( + getRemainingDistanceMetersFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 146 + case 154: + { + input.readMessage( + getEtaToFirstWaypointFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00008000; + break; + } // case 154 + case 162: + { + currentRouteSegment_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 162 + case 178: + { + com.google.maps.fleetengine.v1.TripWaypoint m = + input.readMessage( + com.google.maps.fleetengine.v1.TripWaypoint.parser(), extensionRegistry); + if (waypointsBuilder_ == null) { + ensureWaypointsIsMutable(); + waypoints_.add(m); + } else { + waypointsBuilder_.addMessage(m); + } + break; + } // case 178 + case 184: + { + backToBackEnabled_ = input.readBool(); + bitField0_ |= 0x00080000; + break; + } // case 184 + case 194: + { + input.readMessage( + getCurrentRouteSegmentEndPointFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 194 + case 202: + { + input.readMessage( + getRemainingTimeSecondsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00010000; + break; + } // case 202 + case 208: + { + navigationStatus_ = input.readEnum(); + bitField0_ |= 0x00100000; + break; + } // case 208 + case 218: + { + input.readMessage(getDeviceSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00200000; + break; + } // case 218 + case 226: + { + input.readMessage( + getCurrentRouteSegmentTrafficFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 226 + 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. The unique name for this vehicle.
+     * The format is `providers/{provider}/vehicles/{vehicle}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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. The unique name for this vehicle.
+     * The format is `providers/{provider}/vehicles/{vehicle}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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. The unique name for this vehicle.
+     * The format is `providers/{provider}/vehicles/{vehicle}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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. The unique name for this vehicle.
+     * The format is `providers/{provider}/vehicles/{vehicle}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The unique name for this vehicle.
+     * The format is `providers/{provider}/vehicles/{vehicle}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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 int vehicleState_ = 0; + /** + * + * + *
+     * The vehicle state.
+     * 
+ * + * .maps.fleetengine.v1.VehicleState vehicle_state = 2; + * + * @return The enum numeric value on the wire for vehicleState. + */ + @java.lang.Override + public int getVehicleStateValue() { + return vehicleState_; + } + /** + * + * + *
+     * The vehicle state.
+     * 
+ * + * .maps.fleetengine.v1.VehicleState vehicle_state = 2; + * + * @param value The enum numeric value on the wire for vehicleState to set. + * @return This builder for chaining. + */ + public Builder setVehicleStateValue(int value) { + vehicleState_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The vehicle state.
+     * 
+ * + * .maps.fleetengine.v1.VehicleState vehicle_state = 2; + * + * @return The vehicleState. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleState getVehicleState() { + com.google.maps.fleetengine.v1.VehicleState result = + com.google.maps.fleetengine.v1.VehicleState.forNumber(vehicleState_); + return result == null ? com.google.maps.fleetengine.v1.VehicleState.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The vehicle state.
+     * 
+ * + * .maps.fleetengine.v1.VehicleState vehicle_state = 2; + * + * @param value The vehicleState to set. + * @return This builder for chaining. + */ + public Builder setVehicleState(com.google.maps.fleetengine.v1.VehicleState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + vehicleState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The vehicle state.
+     * 
+ * + * .maps.fleetengine.v1.VehicleState vehicle_state = 2; + * + * @return This builder for chaining. + */ + public Builder clearVehicleState() { + bitField0_ = (bitField0_ & ~0x00000002); + vehicleState_ = 0; + onChanged(); + return this; + } + + private java.util.List supportedTripTypes_ = + java.util.Collections.emptyList(); + + private void ensureSupportedTripTypesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + supportedTripTypes_ = new java.util.ArrayList(supportedTripTypes_); + bitField0_ |= 0x00000004; + } + } + /** + * + * + *
+     * Trip types supported by this vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripType supported_trip_types = 3; + * + * @return A list containing the supportedTripTypes. + */ + public java.util.List getSupportedTripTypesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.maps.fleetengine.v1.TripType>( + supportedTripTypes_, supportedTripTypes_converter_); + } + /** + * + * + *
+     * Trip types supported by this vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripType supported_trip_types = 3; + * + * @return The count of supportedTripTypes. + */ + public int getSupportedTripTypesCount() { + return supportedTripTypes_.size(); + } + /** + * + * + *
+     * Trip types supported by this vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripType supported_trip_types = 3; + * + * @param index The index of the element to return. + * @return The supportedTripTypes at the given index. + */ + public com.google.maps.fleetengine.v1.TripType getSupportedTripTypes(int index) { + return supportedTripTypes_converter_.convert(supportedTripTypes_.get(index)); + } + /** + * + * + *
+     * Trip types supported by this vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripType supported_trip_types = 3; + * + * @param index The index to set the value at. + * @param value The supportedTripTypes to set. + * @return This builder for chaining. + */ + public Builder setSupportedTripTypes(int index, com.google.maps.fleetengine.v1.TripType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedTripTypesIsMutable(); + supportedTripTypes_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Trip types supported by this vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripType supported_trip_types = 3; + * + * @param value The supportedTripTypes to add. + * @return This builder for chaining. + */ + public Builder addSupportedTripTypes(com.google.maps.fleetengine.v1.TripType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedTripTypesIsMutable(); + supportedTripTypes_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Trip types supported by this vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripType supported_trip_types = 3; + * + * @param values The supportedTripTypes to add. + * @return This builder for chaining. + */ + public Builder addAllSupportedTripTypes( + java.lang.Iterable values) { + ensureSupportedTripTypesIsMutable(); + for (com.google.maps.fleetengine.v1.TripType value : values) { + supportedTripTypes_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * Trip types supported by this vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripType supported_trip_types = 3; + * + * @return This builder for chaining. + */ + public Builder clearSupportedTripTypes() { + supportedTripTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Trip types supported by this vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripType supported_trip_types = 3; + * + * @return A list containing the enum numeric values on the wire for supportedTripTypes. + */ + public java.util.List getSupportedTripTypesValueList() { + return java.util.Collections.unmodifiableList(supportedTripTypes_); + } + /** + * + * + *
+     * Trip types supported by this vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripType supported_trip_types = 3; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of supportedTripTypes at the given index. + */ + public int getSupportedTripTypesValue(int index) { + return supportedTripTypes_.get(index); + } + /** + * + * + *
+     * Trip types supported by this vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripType supported_trip_types = 3; + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for supportedTripTypes to set. + * @return This builder for chaining. + */ + public Builder setSupportedTripTypesValue(int index, int value) { + ensureSupportedTripTypesIsMutable(); + supportedTripTypes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Trip types supported by this vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripType supported_trip_types = 3; + * + * @param value The enum numeric value on the wire for supportedTripTypes to add. + * @return This builder for chaining. + */ + public Builder addSupportedTripTypesValue(int value) { + ensureSupportedTripTypesIsMutable(); + supportedTripTypes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Trip types supported by this vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripType supported_trip_types = 3; + * + * @param values The enum numeric values on the wire for supportedTripTypes to add. + * @return This builder for chaining. + */ + public Builder addAllSupportedTripTypesValue(java.lang.Iterable values) { + ensureSupportedTripTypesIsMutable(); + for (int value : values) { + supportedTripTypes_.add(value); + } + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList currentTrips_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureCurrentTripsIsMutable() { + if (!currentTrips_.isModifiable()) { + currentTrips_ = new com.google.protobuf.LazyStringArrayList(currentTrips_); + } + bitField0_ |= 0x00000008; + } + /** + * + * + *
+     * Output only. List of `trip_id`'s for trips currently assigned to this
+     * vehicle.
+     * 
+ * + * repeated string current_trips = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the currentTrips. + */ + public com.google.protobuf.ProtocolStringList getCurrentTripsList() { + currentTrips_.makeImmutable(); + return currentTrips_; + } + /** + * + * + *
+     * Output only. List of `trip_id`'s for trips currently assigned to this
+     * vehicle.
+     * 
+ * + * repeated string current_trips = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of currentTrips. + */ + public int getCurrentTripsCount() { + return currentTrips_.size(); + } + /** + * + * + *
+     * Output only. List of `trip_id`'s for trips currently assigned to this
+     * vehicle.
+     * 
+ * + * repeated string current_trips = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The currentTrips at the given index. + */ + public java.lang.String getCurrentTrips(int index) { + return currentTrips_.get(index); + } + /** + * + * + *
+     * Output only. List of `trip_id`'s for trips currently assigned to this
+     * vehicle.
+     * 
+ * + * repeated string current_trips = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the currentTrips at the given index. + */ + public com.google.protobuf.ByteString getCurrentTripsBytes(int index) { + return currentTrips_.getByteString(index); + } + /** + * + * + *
+     * Output only. List of `trip_id`'s for trips currently assigned to this
+     * vehicle.
+     * 
+ * + * repeated string current_trips = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index to set the value at. + * @param value The currentTrips to set. + * @return This builder for chaining. + */ + public Builder setCurrentTrips(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCurrentTripsIsMutable(); + currentTrips_.set(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. List of `trip_id`'s for trips currently assigned to this
+     * vehicle.
+     * 
+ * + * repeated string current_trips = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The currentTrips to add. + * @return This builder for chaining. + */ + public Builder addCurrentTrips(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCurrentTripsIsMutable(); + currentTrips_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. List of `trip_id`'s for trips currently assigned to this
+     * vehicle.
+     * 
+ * + * repeated string current_trips = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param values The currentTrips to add. + * @return This builder for chaining. + */ + public Builder addAllCurrentTrips(java.lang.Iterable values) { + ensureCurrentTripsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, currentTrips_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. List of `trip_id`'s for trips currently assigned to this
+     * vehicle.
+     * 
+ * + * repeated string current_trips = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearCurrentTrips() { + currentTrips_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. List of `trip_id`'s for trips currently assigned to this
+     * vehicle.
+     * 
+ * + * repeated string current_trips = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes of the currentTrips to add. + * @return This builder for chaining. + */ + public Builder addCurrentTripsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureCurrentTripsIsMutable(); + currentTrips_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.maps.fleetengine.v1.VehicleLocation lastLocation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.VehicleLocation, + com.google.maps.fleetengine.v1.VehicleLocation.Builder, + com.google.maps.fleetengine.v1.VehicleLocationOrBuilder> + lastLocationBuilder_; + /** + * + * + *
+     * Last reported location of the vehicle.
+     * 
+ * + * .maps.fleetengine.v1.VehicleLocation last_location = 5; + * + * @return Whether the lastLocation field is set. + */ + public boolean hasLastLocation() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Last reported location of the vehicle.
+     * 
+ * + * .maps.fleetengine.v1.VehicleLocation last_location = 5; + * + * @return The lastLocation. + */ + public com.google.maps.fleetengine.v1.VehicleLocation getLastLocation() { + if (lastLocationBuilder_ == null) { + return lastLocation_ == null + ? com.google.maps.fleetengine.v1.VehicleLocation.getDefaultInstance() + : lastLocation_; + } else { + return lastLocationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Last reported location of the vehicle.
+     * 
+ * + * .maps.fleetengine.v1.VehicleLocation last_location = 5; + */ + public Builder setLastLocation(com.google.maps.fleetengine.v1.VehicleLocation value) { + if (lastLocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastLocation_ = value; + } else { + lastLocationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Last reported location of the vehicle.
+     * 
+ * + * .maps.fleetengine.v1.VehicleLocation last_location = 5; + */ + public Builder setLastLocation( + com.google.maps.fleetengine.v1.VehicleLocation.Builder builderForValue) { + if (lastLocationBuilder_ == null) { + lastLocation_ = builderForValue.build(); + } else { + lastLocationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Last reported location of the vehicle.
+     * 
+ * + * .maps.fleetengine.v1.VehicleLocation last_location = 5; + */ + public Builder mergeLastLocation(com.google.maps.fleetengine.v1.VehicleLocation value) { + if (lastLocationBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && lastLocation_ != null + && lastLocation_ + != com.google.maps.fleetengine.v1.VehicleLocation.getDefaultInstance()) { + getLastLocationBuilder().mergeFrom(value); + } else { + lastLocation_ = value; + } + } else { + lastLocationBuilder_.mergeFrom(value); + } + if (lastLocation_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Last reported location of the vehicle.
+     * 
+ * + * .maps.fleetengine.v1.VehicleLocation last_location = 5; + */ + public Builder clearLastLocation() { + bitField0_ = (bitField0_ & ~0x00000010); + lastLocation_ = null; + if (lastLocationBuilder_ != null) { + lastLocationBuilder_.dispose(); + lastLocationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Last reported location of the vehicle.
+     * 
+ * + * .maps.fleetengine.v1.VehicleLocation last_location = 5; + */ + public com.google.maps.fleetengine.v1.VehicleLocation.Builder getLastLocationBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getLastLocationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Last reported location of the vehicle.
+     * 
+ * + * .maps.fleetengine.v1.VehicleLocation last_location = 5; + */ + public com.google.maps.fleetengine.v1.VehicleLocationOrBuilder getLastLocationOrBuilder() { + if (lastLocationBuilder_ != null) { + return lastLocationBuilder_.getMessageOrBuilder(); + } else { + return lastLocation_ == null + ? com.google.maps.fleetengine.v1.VehicleLocation.getDefaultInstance() + : lastLocation_; + } + } + /** + * + * + *
+     * Last reported location of the vehicle.
+     * 
+ * + * .maps.fleetengine.v1.VehicleLocation last_location = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.VehicleLocation, + com.google.maps.fleetengine.v1.VehicleLocation.Builder, + com.google.maps.fleetengine.v1.VehicleLocationOrBuilder> + getLastLocationFieldBuilder() { + if (lastLocationBuilder_ == null) { + lastLocationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.VehicleLocation, + com.google.maps.fleetengine.v1.VehicleLocation.Builder, + com.google.maps.fleetengine.v1.VehicleLocationOrBuilder>( + getLastLocation(), getParentForChildren(), isClean()); + lastLocation_ = null; + } + return lastLocationBuilder_; + } + + private int maximumCapacity_; + /** + * + * + *
+     * The total numbers of riders this vehicle can carry.  The driver is not
+     * considered in this value. This value must be greater than or equal to one.
+     * 
+ * + * int32 maximum_capacity = 6; + * + * @return The maximumCapacity. + */ + @java.lang.Override + public int getMaximumCapacity() { + return maximumCapacity_; + } + /** + * + * + *
+     * The total numbers of riders this vehicle can carry.  The driver is not
+     * considered in this value. This value must be greater than or equal to one.
+     * 
+ * + * int32 maximum_capacity = 6; + * + * @param value The maximumCapacity to set. + * @return This builder for chaining. + */ + public Builder setMaximumCapacity(int value) { + + maximumCapacity_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The total numbers of riders this vehicle can carry.  The driver is not
+     * considered in this value. This value must be greater than or equal to one.
+     * 
+ * + * int32 maximum_capacity = 6; + * + * @return This builder for chaining. + */ + public Builder clearMaximumCapacity() { + bitField0_ = (bitField0_ & ~0x00000020); + maximumCapacity_ = 0; + onChanged(); + return this; + } + + private java.util.List attributes_ = + java.util.Collections.emptyList(); + + private void ensureAttributesIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + attributes_ = + new java.util.ArrayList(attributes_); + bitField0_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.VehicleAttribute, + com.google.maps.fleetengine.v1.VehicleAttribute.Builder, + com.google.maps.fleetengine.v1.VehicleAttributeOrBuilder> + attributesBuilder_; + + /** + * + * + *
+     * List of vehicle attributes. A vehicle can have at most 100
+     * attributes, and each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 8; + */ + public java.util.List getAttributesList() { + if (attributesBuilder_ == null) { + return java.util.Collections.unmodifiableList(attributes_); + } else { + return attributesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of vehicle attributes. A vehicle can have at most 100
+     * attributes, and each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 8; + */ + public int getAttributesCount() { + if (attributesBuilder_ == null) { + return attributes_.size(); + } else { + return attributesBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of vehicle attributes. A vehicle can have at most 100
+     * attributes, and each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 8; + */ + public com.google.maps.fleetengine.v1.VehicleAttribute getAttributes(int index) { + if (attributesBuilder_ == null) { + return attributes_.get(index); + } else { + return attributesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of vehicle attributes. A vehicle can have at most 100
+     * attributes, and each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 8; + */ + public Builder setAttributes(int index, com.google.maps.fleetengine.v1.VehicleAttribute value) { + if (attributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributesIsMutable(); + attributes_.set(index, value); + onChanged(); + } else { + attributesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of vehicle attributes. A vehicle can have at most 100
+     * attributes, and each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 8; + */ + public Builder setAttributes( + int index, com.google.maps.fleetengine.v1.VehicleAttribute.Builder builderForValue) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.set(index, builderForValue.build()); + onChanged(); + } else { + attributesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of vehicle attributes. A vehicle can have at most 100
+     * attributes, and each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 8; + */ + public Builder addAttributes(com.google.maps.fleetengine.v1.VehicleAttribute value) { + if (attributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributesIsMutable(); + attributes_.add(value); + onChanged(); + } else { + attributesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of vehicle attributes. A vehicle can have at most 100
+     * attributes, and each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 8; + */ + public Builder addAttributes(int index, com.google.maps.fleetengine.v1.VehicleAttribute value) { + if (attributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributesIsMutable(); + attributes_.add(index, value); + onChanged(); + } else { + attributesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of vehicle attributes. A vehicle can have at most 100
+     * attributes, and each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 8; + */ + public Builder addAttributes( + com.google.maps.fleetengine.v1.VehicleAttribute.Builder builderForValue) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.add(builderForValue.build()); + onChanged(); + } else { + attributesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of vehicle attributes. A vehicle can have at most 100
+     * attributes, and each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 8; + */ + public Builder addAttributes( + int index, com.google.maps.fleetengine.v1.VehicleAttribute.Builder builderForValue) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.add(index, builderForValue.build()); + onChanged(); + } else { + attributesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of vehicle attributes. A vehicle can have at most 100
+     * attributes, and each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 8; + */ + public Builder addAllAttributes( + java.lang.Iterable values) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, attributes_); + onChanged(); + } else { + attributesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of vehicle attributes. A vehicle can have at most 100
+     * attributes, and each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 8; + */ + public Builder clearAttributes() { + if (attributesBuilder_ == null) { + attributes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + attributesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of vehicle attributes. A vehicle can have at most 100
+     * attributes, and each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 8; + */ + public Builder removeAttributes(int index) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.remove(index); + onChanged(); + } else { + attributesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of vehicle attributes. A vehicle can have at most 100
+     * attributes, and each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 8; + */ + public com.google.maps.fleetengine.v1.VehicleAttribute.Builder getAttributesBuilder(int index) { + return getAttributesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of vehicle attributes. A vehicle can have at most 100
+     * attributes, and each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 8; + */ + public com.google.maps.fleetengine.v1.VehicleAttributeOrBuilder getAttributesOrBuilder( + int index) { + if (attributesBuilder_ == null) { + return attributes_.get(index); + } else { + return attributesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of vehicle attributes. A vehicle can have at most 100
+     * attributes, and each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 8; + */ + public java.util.List + getAttributesOrBuilderList() { + if (attributesBuilder_ != null) { + return attributesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(attributes_); + } + } + /** + * + * + *
+     * List of vehicle attributes. A vehicle can have at most 100
+     * attributes, and each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 8; + */ + public com.google.maps.fleetengine.v1.VehicleAttribute.Builder addAttributesBuilder() { + return getAttributesFieldBuilder() + .addBuilder(com.google.maps.fleetengine.v1.VehicleAttribute.getDefaultInstance()); + } + /** + * + * + *
+     * List of vehicle attributes. A vehicle can have at most 100
+     * attributes, and each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 8; + */ + public com.google.maps.fleetengine.v1.VehicleAttribute.Builder addAttributesBuilder(int index) { + return getAttributesFieldBuilder() + .addBuilder(index, com.google.maps.fleetengine.v1.VehicleAttribute.getDefaultInstance()); + } + /** + * + * + *
+     * List of vehicle attributes. A vehicle can have at most 100
+     * attributes, and each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 8; + */ + public java.util.List + getAttributesBuilderList() { + return getAttributesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.VehicleAttribute, + com.google.maps.fleetengine.v1.VehicleAttribute.Builder, + com.google.maps.fleetengine.v1.VehicleAttributeOrBuilder> + getAttributesFieldBuilder() { + if (attributesBuilder_ == null) { + attributesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.VehicleAttribute, + com.google.maps.fleetengine.v1.VehicleAttribute.Builder, + com.google.maps.fleetengine.v1.VehicleAttributeOrBuilder>( + attributes_, ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean()); + attributes_ = null; + } + return attributesBuilder_; + } + + private com.google.maps.fleetengine.v1.Vehicle.VehicleType vehicleType_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.Vehicle.VehicleType, + com.google.maps.fleetengine.v1.Vehicle.VehicleType.Builder, + com.google.maps.fleetengine.v1.Vehicle.VehicleTypeOrBuilder> + vehicleTypeBuilder_; + /** + * + * + *
+     * Required. The type of this vehicle.  Can be used to filter vehicles in
+     * `SearchVehicles` results.  Also influences ETA and route calculations.
+     * 
+ * + * + * .maps.fleetengine.v1.Vehicle.VehicleType vehicle_type = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the vehicleType field is set. + */ + public boolean hasVehicleType() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Required. The type of this vehicle.  Can be used to filter vehicles in
+     * `SearchVehicles` results.  Also influences ETA and route calculations.
+     * 
+ * + * + * .maps.fleetengine.v1.Vehicle.VehicleType vehicle_type = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The vehicleType. + */ + public com.google.maps.fleetengine.v1.Vehicle.VehicleType getVehicleType() { + if (vehicleTypeBuilder_ == null) { + return vehicleType_ == null + ? com.google.maps.fleetengine.v1.Vehicle.VehicleType.getDefaultInstance() + : vehicleType_; + } else { + return vehicleTypeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The type of this vehicle.  Can be used to filter vehicles in
+     * `SearchVehicles` results.  Also influences ETA and route calculations.
+     * 
+ * + * + * .maps.fleetengine.v1.Vehicle.VehicleType vehicle_type = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setVehicleType(com.google.maps.fleetengine.v1.Vehicle.VehicleType value) { + if (vehicleTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + vehicleType_ = value; + } else { + vehicleTypeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The type of this vehicle.  Can be used to filter vehicles in
+     * `SearchVehicles` results.  Also influences ETA and route calculations.
+     * 
+ * + * + * .maps.fleetengine.v1.Vehicle.VehicleType vehicle_type = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setVehicleType( + com.google.maps.fleetengine.v1.Vehicle.VehicleType.Builder builderForValue) { + if (vehicleTypeBuilder_ == null) { + vehicleType_ = builderForValue.build(); + } else { + vehicleTypeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The type of this vehicle.  Can be used to filter vehicles in
+     * `SearchVehicles` results.  Also influences ETA and route calculations.
+     * 
+ * + * + * .maps.fleetengine.v1.Vehicle.VehicleType vehicle_type = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeVehicleType(com.google.maps.fleetengine.v1.Vehicle.VehicleType value) { + if (vehicleTypeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && vehicleType_ != null + && vehicleType_ + != com.google.maps.fleetengine.v1.Vehicle.VehicleType.getDefaultInstance()) { + getVehicleTypeBuilder().mergeFrom(value); + } else { + vehicleType_ = value; + } + } else { + vehicleTypeBuilder_.mergeFrom(value); + } + if (vehicleType_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The type of this vehicle.  Can be used to filter vehicles in
+     * `SearchVehicles` results.  Also influences ETA and route calculations.
+     * 
+ * + * + * .maps.fleetengine.v1.Vehicle.VehicleType vehicle_type = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearVehicleType() { + bitField0_ = (bitField0_ & ~0x00000080); + vehicleType_ = null; + if (vehicleTypeBuilder_ != null) { + vehicleTypeBuilder_.dispose(); + vehicleTypeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The type of this vehicle.  Can be used to filter vehicles in
+     * `SearchVehicles` results.  Also influences ETA and route calculations.
+     * 
+ * + * + * .maps.fleetengine.v1.Vehicle.VehicleType vehicle_type = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.maps.fleetengine.v1.Vehicle.VehicleType.Builder getVehicleTypeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getVehicleTypeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The type of this vehicle.  Can be used to filter vehicles in
+     * `SearchVehicles` results.  Also influences ETA and route calculations.
+     * 
+ * + * + * .maps.fleetengine.v1.Vehicle.VehicleType vehicle_type = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.maps.fleetengine.v1.Vehicle.VehicleTypeOrBuilder getVehicleTypeOrBuilder() { + if (vehicleTypeBuilder_ != null) { + return vehicleTypeBuilder_.getMessageOrBuilder(); + } else { + return vehicleType_ == null + ? com.google.maps.fleetengine.v1.Vehicle.VehicleType.getDefaultInstance() + : vehicleType_; + } + } + /** + * + * + *
+     * Required. The type of this vehicle.  Can be used to filter vehicles in
+     * `SearchVehicles` results.  Also influences ETA and route calculations.
+     * 
+ * + * + * .maps.fleetengine.v1.Vehicle.VehicleType vehicle_type = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.Vehicle.VehicleType, + com.google.maps.fleetengine.v1.Vehicle.VehicleType.Builder, + com.google.maps.fleetengine.v1.Vehicle.VehicleTypeOrBuilder> + getVehicleTypeFieldBuilder() { + if (vehicleTypeBuilder_ == null) { + vehicleTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.Vehicle.VehicleType, + com.google.maps.fleetengine.v1.Vehicle.VehicleType.Builder, + com.google.maps.fleetengine.v1.Vehicle.VehicleTypeOrBuilder>( + getVehicleType(), getParentForChildren(), isClean()); + vehicleType_ = null; + } + return vehicleTypeBuilder_; + } + + private com.google.maps.fleetengine.v1.LicensePlate licensePlate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.LicensePlate, + com.google.maps.fleetengine.v1.LicensePlate.Builder, + com.google.maps.fleetengine.v1.LicensePlateOrBuilder> + licensePlateBuilder_; + /** + * + * + *
+     * License plate information for the vehicle.
+     * 
+ * + * .maps.fleetengine.v1.LicensePlate license_plate = 10; + * + * @return Whether the licensePlate field is set. + */ + public boolean hasLicensePlate() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+     * License plate information for the vehicle.
+     * 
+ * + * .maps.fleetengine.v1.LicensePlate license_plate = 10; + * + * @return The licensePlate. + */ + public com.google.maps.fleetengine.v1.LicensePlate getLicensePlate() { + if (licensePlateBuilder_ == null) { + return licensePlate_ == null + ? com.google.maps.fleetengine.v1.LicensePlate.getDefaultInstance() + : licensePlate_; + } else { + return licensePlateBuilder_.getMessage(); + } + } + /** + * + * + *
+     * License plate information for the vehicle.
+     * 
+ * + * .maps.fleetengine.v1.LicensePlate license_plate = 10; + */ + public Builder setLicensePlate(com.google.maps.fleetengine.v1.LicensePlate value) { + if (licensePlateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + licensePlate_ = value; + } else { + licensePlateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * License plate information for the vehicle.
+     * 
+ * + * .maps.fleetengine.v1.LicensePlate license_plate = 10; + */ + public Builder setLicensePlate( + com.google.maps.fleetengine.v1.LicensePlate.Builder builderForValue) { + if (licensePlateBuilder_ == null) { + licensePlate_ = builderForValue.build(); + } else { + licensePlateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * License plate information for the vehicle.
+     * 
+ * + * .maps.fleetengine.v1.LicensePlate license_plate = 10; + */ + public Builder mergeLicensePlate(com.google.maps.fleetengine.v1.LicensePlate value) { + if (licensePlateBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && licensePlate_ != null + && licensePlate_ != com.google.maps.fleetengine.v1.LicensePlate.getDefaultInstance()) { + getLicensePlateBuilder().mergeFrom(value); + } else { + licensePlate_ = value; + } + } else { + licensePlateBuilder_.mergeFrom(value); + } + if (licensePlate_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + /** + * + * + *
+     * License plate information for the vehicle.
+     * 
+ * + * .maps.fleetengine.v1.LicensePlate license_plate = 10; + */ + public Builder clearLicensePlate() { + bitField0_ = (bitField0_ & ~0x00000100); + licensePlate_ = null; + if (licensePlateBuilder_ != null) { + licensePlateBuilder_.dispose(); + licensePlateBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * License plate information for the vehicle.
+     * 
+ * + * .maps.fleetengine.v1.LicensePlate license_plate = 10; + */ + public com.google.maps.fleetengine.v1.LicensePlate.Builder getLicensePlateBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getLicensePlateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * License plate information for the vehicle.
+     * 
+ * + * .maps.fleetengine.v1.LicensePlate license_plate = 10; + */ + public com.google.maps.fleetengine.v1.LicensePlateOrBuilder getLicensePlateOrBuilder() { + if (licensePlateBuilder_ != null) { + return licensePlateBuilder_.getMessageOrBuilder(); + } else { + return licensePlate_ == null + ? com.google.maps.fleetengine.v1.LicensePlate.getDefaultInstance() + : licensePlate_; + } + } + /** + * + * + *
+     * License plate information for the vehicle.
+     * 
+ * + * .maps.fleetengine.v1.LicensePlate license_plate = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.LicensePlate, + com.google.maps.fleetengine.v1.LicensePlate.Builder, + com.google.maps.fleetengine.v1.LicensePlateOrBuilder> + getLicensePlateFieldBuilder() { + if (licensePlateBuilder_ == null) { + licensePlateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.LicensePlate, + com.google.maps.fleetengine.v1.LicensePlate.Builder, + com.google.maps.fleetengine.v1.LicensePlateOrBuilder>( + getLicensePlate(), getParentForChildren(), isClean()); + licensePlate_ = null; + } + return licensePlateBuilder_; + } + + private java.util.List route_ = + java.util.Collections.emptyList(); + + private void ensureRouteIsMutable() { + if (!((bitField0_ & 0x00000200) != 0)) { + route_ = new java.util.ArrayList(route_); + bitField0_ |= 0x00000200; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.TerminalLocation, + com.google.maps.fleetengine.v1.TerminalLocation.Builder, + com.google.maps.fleetengine.v1.TerminalLocationOrBuilder> + routeBuilder_; + + /** + * + * + *
+     * Deprecated: Use `Vehicle.waypoints` instead.
+     * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation route = 12 [deprecated = true]; + */ + @java.lang.Deprecated + public java.util.List getRouteList() { + if (routeBuilder_ == null) { + return java.util.Collections.unmodifiableList(route_); + } else { + return routeBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Deprecated: Use `Vehicle.waypoints` instead.
+     * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation route = 12 [deprecated = true]; + */ + @java.lang.Deprecated + public int getRouteCount() { + if (routeBuilder_ == null) { + return route_.size(); + } else { + return routeBuilder_.getCount(); + } + } + /** + * + * + *
+     * Deprecated: Use `Vehicle.waypoints` instead.
+     * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation route = 12 [deprecated = true]; + */ + @java.lang.Deprecated + public com.google.maps.fleetengine.v1.TerminalLocation getRoute(int index) { + if (routeBuilder_ == null) { + return route_.get(index); + } else { + return routeBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Deprecated: Use `Vehicle.waypoints` instead.
+     * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation route = 12 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder setRoute(int index, com.google.maps.fleetengine.v1.TerminalLocation value) { + if (routeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRouteIsMutable(); + route_.set(index, value); + onChanged(); + } else { + routeBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Deprecated: Use `Vehicle.waypoints` instead.
+     * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation route = 12 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder setRoute( + int index, com.google.maps.fleetengine.v1.TerminalLocation.Builder builderForValue) { + if (routeBuilder_ == null) { + ensureRouteIsMutable(); + route_.set(index, builderForValue.build()); + onChanged(); + } else { + routeBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Deprecated: Use `Vehicle.waypoints` instead.
+     * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation route = 12 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder addRoute(com.google.maps.fleetengine.v1.TerminalLocation value) { + if (routeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRouteIsMutable(); + route_.add(value); + onChanged(); + } else { + routeBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Deprecated: Use `Vehicle.waypoints` instead.
+     * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation route = 12 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder addRoute(int index, com.google.maps.fleetengine.v1.TerminalLocation value) { + if (routeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRouteIsMutable(); + route_.add(index, value); + onChanged(); + } else { + routeBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Deprecated: Use `Vehicle.waypoints` instead.
+     * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation route = 12 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder addRoute( + com.google.maps.fleetengine.v1.TerminalLocation.Builder builderForValue) { + if (routeBuilder_ == null) { + ensureRouteIsMutable(); + route_.add(builderForValue.build()); + onChanged(); + } else { + routeBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Deprecated: Use `Vehicle.waypoints` instead.
+     * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation route = 12 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder addRoute( + int index, com.google.maps.fleetengine.v1.TerminalLocation.Builder builderForValue) { + if (routeBuilder_ == null) { + ensureRouteIsMutable(); + route_.add(index, builderForValue.build()); + onChanged(); + } else { + routeBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Deprecated: Use `Vehicle.waypoints` instead.
+     * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation route = 12 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder addAllRoute( + java.lang.Iterable values) { + if (routeBuilder_ == null) { + ensureRouteIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, route_); + onChanged(); + } else { + routeBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Deprecated: Use `Vehicle.waypoints` instead.
+     * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation route = 12 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder clearRoute() { + if (routeBuilder_ == null) { + route_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + } else { + routeBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Deprecated: Use `Vehicle.waypoints` instead.
+     * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation route = 12 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder removeRoute(int index) { + if (routeBuilder_ == null) { + ensureRouteIsMutable(); + route_.remove(index); + onChanged(); + } else { + routeBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Deprecated: Use `Vehicle.waypoints` instead.
+     * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation route = 12 [deprecated = true]; + */ + @java.lang.Deprecated + public com.google.maps.fleetengine.v1.TerminalLocation.Builder getRouteBuilder(int index) { + return getRouteFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Deprecated: Use `Vehicle.waypoints` instead.
+     * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation route = 12 [deprecated = true]; + */ + @java.lang.Deprecated + public com.google.maps.fleetengine.v1.TerminalLocationOrBuilder getRouteOrBuilder(int index) { + if (routeBuilder_ == null) { + return route_.get(index); + } else { + return routeBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Deprecated: Use `Vehicle.waypoints` instead.
+     * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation route = 12 [deprecated = true]; + */ + @java.lang.Deprecated + public java.util.List + getRouteOrBuilderList() { + if (routeBuilder_ != null) { + return routeBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(route_); + } + } + /** + * + * + *
+     * Deprecated: Use `Vehicle.waypoints` instead.
+     * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation route = 12 [deprecated = true]; + */ + @java.lang.Deprecated + public com.google.maps.fleetengine.v1.TerminalLocation.Builder addRouteBuilder() { + return getRouteFieldBuilder() + .addBuilder(com.google.maps.fleetengine.v1.TerminalLocation.getDefaultInstance()); + } + /** + * + * + *
+     * Deprecated: Use `Vehicle.waypoints` instead.
+     * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation route = 12 [deprecated = true]; + */ + @java.lang.Deprecated + public com.google.maps.fleetengine.v1.TerminalLocation.Builder addRouteBuilder(int index) { + return getRouteFieldBuilder() + .addBuilder(index, com.google.maps.fleetengine.v1.TerminalLocation.getDefaultInstance()); + } + /** + * + * + *
+     * Deprecated: Use `Vehicle.waypoints` instead.
+     * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation route = 12 [deprecated = true]; + */ + @java.lang.Deprecated + public java.util.List + getRouteBuilderList() { + return getRouteFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.TerminalLocation, + com.google.maps.fleetengine.v1.TerminalLocation.Builder, + com.google.maps.fleetengine.v1.TerminalLocationOrBuilder> + getRouteFieldBuilder() { + if (routeBuilder_ == null) { + routeBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.TerminalLocation, + com.google.maps.fleetengine.v1.TerminalLocation.Builder, + com.google.maps.fleetengine.v1.TerminalLocationOrBuilder>( + route_, ((bitField0_ & 0x00000200) != 0), getParentForChildren(), isClean()); + route_ = null; + } + return routeBuilder_; + } + + private java.lang.Object currentRouteSegment_ = ""; + /** + * + * + *
+     * The polyline specifying the route the driver app intends to take to
+     * the next waypoint. This list is also returned in
+     * `Trip.current_route_segment` for all active trips assigned to the vehicle.
+     *
+     * Note: This field is intended only for use by the Driver SDK. Decoding is
+     * not yet supported.
+     * 
+ * + * string current_route_segment = 20; + * + * @return The currentRouteSegment. + */ + public java.lang.String getCurrentRouteSegment() { + java.lang.Object ref = currentRouteSegment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + currentRouteSegment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The polyline specifying the route the driver app intends to take to
+     * the next waypoint. This list is also returned in
+     * `Trip.current_route_segment` for all active trips assigned to the vehicle.
+     *
+     * Note: This field is intended only for use by the Driver SDK. Decoding is
+     * not yet supported.
+     * 
+ * + * string current_route_segment = 20; + * + * @return The bytes for currentRouteSegment. + */ + public com.google.protobuf.ByteString getCurrentRouteSegmentBytes() { + java.lang.Object ref = currentRouteSegment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + currentRouteSegment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The polyline specifying the route the driver app intends to take to
+     * the next waypoint. This list is also returned in
+     * `Trip.current_route_segment` for all active trips assigned to the vehicle.
+     *
+     * Note: This field is intended only for use by the Driver SDK. Decoding is
+     * not yet supported.
+     * 
+ * + * string current_route_segment = 20; + * + * @param value The currentRouteSegment to set. + * @return This builder for chaining. + */ + public Builder setCurrentRouteSegment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + currentRouteSegment_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * The polyline specifying the route the driver app intends to take to
+     * the next waypoint. This list is also returned in
+     * `Trip.current_route_segment` for all active trips assigned to the vehicle.
+     *
+     * Note: This field is intended only for use by the Driver SDK. Decoding is
+     * not yet supported.
+     * 
+ * + * string current_route_segment = 20; + * + * @return This builder for chaining. + */ + public Builder clearCurrentRouteSegment() { + currentRouteSegment_ = getDefaultInstance().getCurrentRouteSegment(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + * + * + *
+     * The polyline specifying the route the driver app intends to take to
+     * the next waypoint. This list is also returned in
+     * `Trip.current_route_segment` for all active trips assigned to the vehicle.
+     *
+     * Note: This field is intended only for use by the Driver SDK. Decoding is
+     * not yet supported.
+     * 
+ * + * string current_route_segment = 20; + * + * @param value The bytes for currentRouteSegment to set. + * @return This builder for chaining. + */ + public Builder setCurrentRouteSegmentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + currentRouteSegment_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + private com.google.maps.fleetengine.v1.TrafficPolylineData currentRouteSegmentTraffic_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.TrafficPolylineData, + com.google.maps.fleetengine.v1.TrafficPolylineData.Builder, + com.google.maps.fleetengine.v1.TrafficPolylineDataOrBuilder> + currentRouteSegmentTrafficBuilder_; + /** + * + * + *
+     * Input only. Fleet Engine uses this information to improve journey sharing.
+     * Note: This field is intended only for use by the Driver SDK.
+     * 
+ * + * + * .maps.fleetengine.v1.TrafficPolylineData current_route_segment_traffic = 28 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the currentRouteSegmentTraffic field is set. + */ + public boolean hasCurrentRouteSegmentTraffic() { + return ((bitField0_ & 0x00000800) != 0); + } + /** + * + * + *
+     * Input only. Fleet Engine uses this information to improve journey sharing.
+     * Note: This field is intended only for use by the Driver SDK.
+     * 
+ * + * + * .maps.fleetengine.v1.TrafficPolylineData current_route_segment_traffic = 28 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The currentRouteSegmentTraffic. + */ + public com.google.maps.fleetengine.v1.TrafficPolylineData getCurrentRouteSegmentTraffic() { + if (currentRouteSegmentTrafficBuilder_ == null) { + return currentRouteSegmentTraffic_ == null + ? com.google.maps.fleetengine.v1.TrafficPolylineData.getDefaultInstance() + : currentRouteSegmentTraffic_; + } else { + return currentRouteSegmentTrafficBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Input only. Fleet Engine uses this information to improve journey sharing.
+     * Note: This field is intended only for use by the Driver SDK.
+     * 
+ * + * + * .maps.fleetengine.v1.TrafficPolylineData current_route_segment_traffic = 28 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setCurrentRouteSegmentTraffic( + com.google.maps.fleetengine.v1.TrafficPolylineData value) { + if (currentRouteSegmentTrafficBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + currentRouteSegmentTraffic_ = value; + } else { + currentRouteSegmentTrafficBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. Fleet Engine uses this information to improve journey sharing.
+     * Note: This field is intended only for use by the Driver SDK.
+     * 
+ * + * + * .maps.fleetengine.v1.TrafficPolylineData current_route_segment_traffic = 28 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setCurrentRouteSegmentTraffic( + com.google.maps.fleetengine.v1.TrafficPolylineData.Builder builderForValue) { + if (currentRouteSegmentTrafficBuilder_ == null) { + currentRouteSegmentTraffic_ = builderForValue.build(); + } else { + currentRouteSegmentTrafficBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. Fleet Engine uses this information to improve journey sharing.
+     * Note: This field is intended only for use by the Driver SDK.
+     * 
+ * + * + * .maps.fleetengine.v1.TrafficPolylineData current_route_segment_traffic = 28 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder mergeCurrentRouteSegmentTraffic( + com.google.maps.fleetengine.v1.TrafficPolylineData value) { + if (currentRouteSegmentTrafficBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) + && currentRouteSegmentTraffic_ != null + && currentRouteSegmentTraffic_ + != com.google.maps.fleetengine.v1.TrafficPolylineData.getDefaultInstance()) { + getCurrentRouteSegmentTrafficBuilder().mergeFrom(value); + } else { + currentRouteSegmentTraffic_ = value; + } + } else { + currentRouteSegmentTrafficBuilder_.mergeFrom(value); + } + if (currentRouteSegmentTraffic_ != null) { + bitField0_ |= 0x00000800; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Input only. Fleet Engine uses this information to improve journey sharing.
+     * Note: This field is intended only for use by the Driver SDK.
+     * 
+ * + * + * .maps.fleetengine.v1.TrafficPolylineData current_route_segment_traffic = 28 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder clearCurrentRouteSegmentTraffic() { + bitField0_ = (bitField0_ & ~0x00000800); + currentRouteSegmentTraffic_ = null; + if (currentRouteSegmentTrafficBuilder_ != null) { + currentRouteSegmentTrafficBuilder_.dispose(); + currentRouteSegmentTrafficBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. Fleet Engine uses this information to improve journey sharing.
+     * Note: This field is intended only for use by the Driver SDK.
+     * 
+ * + * + * .maps.fleetengine.v1.TrafficPolylineData current_route_segment_traffic = 28 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.maps.fleetengine.v1.TrafficPolylineData.Builder + getCurrentRouteSegmentTrafficBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return getCurrentRouteSegmentTrafficFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Input only. Fleet Engine uses this information to improve journey sharing.
+     * Note: This field is intended only for use by the Driver SDK.
+     * 
+ * + * + * .maps.fleetengine.v1.TrafficPolylineData current_route_segment_traffic = 28 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.maps.fleetengine.v1.TrafficPolylineDataOrBuilder + getCurrentRouteSegmentTrafficOrBuilder() { + if (currentRouteSegmentTrafficBuilder_ != null) { + return currentRouteSegmentTrafficBuilder_.getMessageOrBuilder(); + } else { + return currentRouteSegmentTraffic_ == null + ? com.google.maps.fleetengine.v1.TrafficPolylineData.getDefaultInstance() + : currentRouteSegmentTraffic_; + } + } + /** + * + * + *
+     * Input only. Fleet Engine uses this information to improve journey sharing.
+     * Note: This field is intended only for use by the Driver SDK.
+     * 
+ * + * + * .maps.fleetengine.v1.TrafficPolylineData current_route_segment_traffic = 28 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.TrafficPolylineData, + com.google.maps.fleetengine.v1.TrafficPolylineData.Builder, + com.google.maps.fleetengine.v1.TrafficPolylineDataOrBuilder> + getCurrentRouteSegmentTrafficFieldBuilder() { + if (currentRouteSegmentTrafficBuilder_ == null) { + currentRouteSegmentTrafficBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.TrafficPolylineData, + com.google.maps.fleetengine.v1.TrafficPolylineData.Builder, + com.google.maps.fleetengine.v1.TrafficPolylineDataOrBuilder>( + getCurrentRouteSegmentTraffic(), getParentForChildren(), isClean()); + currentRouteSegmentTraffic_ = null; + } + return currentRouteSegmentTrafficBuilder_; + } + + private com.google.protobuf.Timestamp currentRouteSegmentVersion_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + currentRouteSegmentVersionBuilder_; + /** + * + * + *
+     * Output only. Time when `current_route_segment` was set. It can be stored by
+     * the client and passed in future `GetVehicle` requests to prevent returning
+     * routes that haven't changed.
+     * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_version = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the currentRouteSegmentVersion field is set. + */ + public boolean hasCurrentRouteSegmentVersion() { + return ((bitField0_ & 0x00001000) != 0); + } + /** + * + * + *
+     * Output only. Time when `current_route_segment` was set. It can be stored by
+     * the client and passed in future `GetVehicle` requests to prevent returning
+     * routes that haven't changed.
+     * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_version = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The currentRouteSegmentVersion. + */ + public com.google.protobuf.Timestamp getCurrentRouteSegmentVersion() { + if (currentRouteSegmentVersionBuilder_ == null) { + return currentRouteSegmentVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : currentRouteSegmentVersion_; + } else { + return currentRouteSegmentVersionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when `current_route_segment` was set. It can be stored by
+     * the client and passed in future `GetVehicle` requests to prevent returning
+     * routes that haven't changed.
+     * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_version = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCurrentRouteSegmentVersion(com.google.protobuf.Timestamp value) { + if (currentRouteSegmentVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + currentRouteSegmentVersion_ = value; + } else { + currentRouteSegmentVersionBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when `current_route_segment` was set. It can be stored by
+     * the client and passed in future `GetVehicle` requests to prevent returning
+     * routes that haven't changed.
+     * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_version = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCurrentRouteSegmentVersion( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (currentRouteSegmentVersionBuilder_ == null) { + currentRouteSegmentVersion_ = builderForValue.build(); + } else { + currentRouteSegmentVersionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when `current_route_segment` was set. It can be stored by
+     * the client and passed in future `GetVehicle` requests to prevent returning
+     * routes that haven't changed.
+     * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_version = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCurrentRouteSegmentVersion(com.google.protobuf.Timestamp value) { + if (currentRouteSegmentVersionBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) + && currentRouteSegmentVersion_ != null + && currentRouteSegmentVersion_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCurrentRouteSegmentVersionBuilder().mergeFrom(value); + } else { + currentRouteSegmentVersion_ = value; + } + } else { + currentRouteSegmentVersionBuilder_.mergeFrom(value); + } + if (currentRouteSegmentVersion_ != null) { + bitField0_ |= 0x00001000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Time when `current_route_segment` was set. It can be stored by
+     * the client and passed in future `GetVehicle` requests to prevent returning
+     * routes that haven't changed.
+     * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_version = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCurrentRouteSegmentVersion() { + bitField0_ = (bitField0_ & ~0x00001000); + currentRouteSegmentVersion_ = null; + if (currentRouteSegmentVersionBuilder_ != null) { + currentRouteSegmentVersionBuilder_.dispose(); + currentRouteSegmentVersionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when `current_route_segment` was set. It can be stored by
+     * the client and passed in future `GetVehicle` requests to prevent returning
+     * routes that haven't changed.
+     * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_version = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCurrentRouteSegmentVersionBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return getCurrentRouteSegmentVersionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when `current_route_segment` was set. It can be stored by
+     * the client and passed in future `GetVehicle` requests to prevent returning
+     * routes that haven't changed.
+     * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_version = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCurrentRouteSegmentVersionOrBuilder() { + if (currentRouteSegmentVersionBuilder_ != null) { + return currentRouteSegmentVersionBuilder_.getMessageOrBuilder(); + } else { + return currentRouteSegmentVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : currentRouteSegmentVersion_; + } + } + /** + * + * + *
+     * Output only. Time when `current_route_segment` was set. It can be stored by
+     * the client and passed in future `GetVehicle` requests to prevent returning
+     * routes that haven't changed.
+     * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_version = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCurrentRouteSegmentVersionFieldBuilder() { + if (currentRouteSegmentVersionBuilder_ == null) { + currentRouteSegmentVersionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCurrentRouteSegmentVersion(), getParentForChildren(), isClean()); + currentRouteSegmentVersion_ = null; + } + return currentRouteSegmentVersionBuilder_; + } + + private com.google.maps.fleetengine.v1.TripWaypoint currentRouteSegmentEndPoint_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.TripWaypoint, + com.google.maps.fleetengine.v1.TripWaypoint.Builder, + com.google.maps.fleetengine.v1.TripWaypointOrBuilder> + currentRouteSegmentEndPointBuilder_; + /** + * + * + *
+     * The waypoint where `current_route_segment` ends. This can be supplied by
+     * drivers on `UpdateVehicle` calls either as a full trip waypoint, a waypoint
+     * `LatLng`, or as the last `LatLng` of the `current_route_segment`. Fleet
+     * Engine will then do its best to interpolate to an actual waypoint if it is
+     * not fully specified. This field is ignored in `UpdateVehicle` calls unless
+     * `current_route_segment` is also specified.
+     * 
+ * + * .maps.fleetengine.v1.TripWaypoint current_route_segment_end_point = 24; + * + * @return Whether the currentRouteSegmentEndPoint field is set. + */ + public boolean hasCurrentRouteSegmentEndPoint() { + return ((bitField0_ & 0x00002000) != 0); + } + /** + * + * + *
+     * The waypoint where `current_route_segment` ends. This can be supplied by
+     * drivers on `UpdateVehicle` calls either as a full trip waypoint, a waypoint
+     * `LatLng`, or as the last `LatLng` of the `current_route_segment`. Fleet
+     * Engine will then do its best to interpolate to an actual waypoint if it is
+     * not fully specified. This field is ignored in `UpdateVehicle` calls unless
+     * `current_route_segment` is also specified.
+     * 
+ * + * .maps.fleetengine.v1.TripWaypoint current_route_segment_end_point = 24; + * + * @return The currentRouteSegmentEndPoint. + */ + public com.google.maps.fleetengine.v1.TripWaypoint getCurrentRouteSegmentEndPoint() { + if (currentRouteSegmentEndPointBuilder_ == null) { + return currentRouteSegmentEndPoint_ == null + ? com.google.maps.fleetengine.v1.TripWaypoint.getDefaultInstance() + : currentRouteSegmentEndPoint_; + } else { + return currentRouteSegmentEndPointBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The waypoint where `current_route_segment` ends. This can be supplied by
+     * drivers on `UpdateVehicle` calls either as a full trip waypoint, a waypoint
+     * `LatLng`, or as the last `LatLng` of the `current_route_segment`. Fleet
+     * Engine will then do its best to interpolate to an actual waypoint if it is
+     * not fully specified. This field is ignored in `UpdateVehicle` calls unless
+     * `current_route_segment` is also specified.
+     * 
+ * + * .maps.fleetengine.v1.TripWaypoint current_route_segment_end_point = 24; + */ + public Builder setCurrentRouteSegmentEndPoint( + com.google.maps.fleetengine.v1.TripWaypoint value) { + if (currentRouteSegmentEndPointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + currentRouteSegmentEndPoint_ = value; + } else { + currentRouteSegmentEndPointBuilder_.setMessage(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * The waypoint where `current_route_segment` ends. This can be supplied by
+     * drivers on `UpdateVehicle` calls either as a full trip waypoint, a waypoint
+     * `LatLng`, or as the last `LatLng` of the `current_route_segment`. Fleet
+     * Engine will then do its best to interpolate to an actual waypoint if it is
+     * not fully specified. This field is ignored in `UpdateVehicle` calls unless
+     * `current_route_segment` is also specified.
+     * 
+ * + * .maps.fleetengine.v1.TripWaypoint current_route_segment_end_point = 24; + */ + public Builder setCurrentRouteSegmentEndPoint( + com.google.maps.fleetengine.v1.TripWaypoint.Builder builderForValue) { + if (currentRouteSegmentEndPointBuilder_ == null) { + currentRouteSegmentEndPoint_ = builderForValue.build(); + } else { + currentRouteSegmentEndPointBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * The waypoint where `current_route_segment` ends. This can be supplied by
+     * drivers on `UpdateVehicle` calls either as a full trip waypoint, a waypoint
+     * `LatLng`, or as the last `LatLng` of the `current_route_segment`. Fleet
+     * Engine will then do its best to interpolate to an actual waypoint if it is
+     * not fully specified. This field is ignored in `UpdateVehicle` calls unless
+     * `current_route_segment` is also specified.
+     * 
+ * + * .maps.fleetengine.v1.TripWaypoint current_route_segment_end_point = 24; + */ + public Builder mergeCurrentRouteSegmentEndPoint( + com.google.maps.fleetengine.v1.TripWaypoint value) { + if (currentRouteSegmentEndPointBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0) + && currentRouteSegmentEndPoint_ != null + && currentRouteSegmentEndPoint_ + != com.google.maps.fleetengine.v1.TripWaypoint.getDefaultInstance()) { + getCurrentRouteSegmentEndPointBuilder().mergeFrom(value); + } else { + currentRouteSegmentEndPoint_ = value; + } + } else { + currentRouteSegmentEndPointBuilder_.mergeFrom(value); + } + if (currentRouteSegmentEndPoint_ != null) { + bitField0_ |= 0x00002000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The waypoint where `current_route_segment` ends. This can be supplied by
+     * drivers on `UpdateVehicle` calls either as a full trip waypoint, a waypoint
+     * `LatLng`, or as the last `LatLng` of the `current_route_segment`. Fleet
+     * Engine will then do its best to interpolate to an actual waypoint if it is
+     * not fully specified. This field is ignored in `UpdateVehicle` calls unless
+     * `current_route_segment` is also specified.
+     * 
+ * + * .maps.fleetengine.v1.TripWaypoint current_route_segment_end_point = 24; + */ + public Builder clearCurrentRouteSegmentEndPoint() { + bitField0_ = (bitField0_ & ~0x00002000); + currentRouteSegmentEndPoint_ = null; + if (currentRouteSegmentEndPointBuilder_ != null) { + currentRouteSegmentEndPointBuilder_.dispose(); + currentRouteSegmentEndPointBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The waypoint where `current_route_segment` ends. This can be supplied by
+     * drivers on `UpdateVehicle` calls either as a full trip waypoint, a waypoint
+     * `LatLng`, or as the last `LatLng` of the `current_route_segment`. Fleet
+     * Engine will then do its best to interpolate to an actual waypoint if it is
+     * not fully specified. This field is ignored in `UpdateVehicle` calls unless
+     * `current_route_segment` is also specified.
+     * 
+ * + * .maps.fleetengine.v1.TripWaypoint current_route_segment_end_point = 24; + */ + public com.google.maps.fleetengine.v1.TripWaypoint.Builder + getCurrentRouteSegmentEndPointBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return getCurrentRouteSegmentEndPointFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The waypoint where `current_route_segment` ends. This can be supplied by
+     * drivers on `UpdateVehicle` calls either as a full trip waypoint, a waypoint
+     * `LatLng`, or as the last `LatLng` of the `current_route_segment`. Fleet
+     * Engine will then do its best to interpolate to an actual waypoint if it is
+     * not fully specified. This field is ignored in `UpdateVehicle` calls unless
+     * `current_route_segment` is also specified.
+     * 
+ * + * .maps.fleetengine.v1.TripWaypoint current_route_segment_end_point = 24; + */ + public com.google.maps.fleetengine.v1.TripWaypointOrBuilder + getCurrentRouteSegmentEndPointOrBuilder() { + if (currentRouteSegmentEndPointBuilder_ != null) { + return currentRouteSegmentEndPointBuilder_.getMessageOrBuilder(); + } else { + return currentRouteSegmentEndPoint_ == null + ? com.google.maps.fleetengine.v1.TripWaypoint.getDefaultInstance() + : currentRouteSegmentEndPoint_; + } + } + /** + * + * + *
+     * The waypoint where `current_route_segment` ends. This can be supplied by
+     * drivers on `UpdateVehicle` calls either as a full trip waypoint, a waypoint
+     * `LatLng`, or as the last `LatLng` of the `current_route_segment`. Fleet
+     * Engine will then do its best to interpolate to an actual waypoint if it is
+     * not fully specified. This field is ignored in `UpdateVehicle` calls unless
+     * `current_route_segment` is also specified.
+     * 
+ * + * .maps.fleetengine.v1.TripWaypoint current_route_segment_end_point = 24; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.TripWaypoint, + com.google.maps.fleetengine.v1.TripWaypoint.Builder, + com.google.maps.fleetengine.v1.TripWaypointOrBuilder> + getCurrentRouteSegmentEndPointFieldBuilder() { + if (currentRouteSegmentEndPointBuilder_ == null) { + currentRouteSegmentEndPointBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.TripWaypoint, + com.google.maps.fleetengine.v1.TripWaypoint.Builder, + com.google.maps.fleetengine.v1.TripWaypointOrBuilder>( + getCurrentRouteSegmentEndPoint(), getParentForChildren(), isClean()); + currentRouteSegmentEndPoint_ = null; + } + return currentRouteSegmentEndPointBuilder_; + } + + private com.google.protobuf.Int32Value remainingDistanceMeters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + remainingDistanceMetersBuilder_; + /** + * + * + *
+     * The remaining driving distance for the `current_route_segment`.
+     * This value is also returned in `Trip.remaining_distance_meters` for all
+     * active trips assigned to the vehicle. The value is unspecified if the
+     * `current_route_segment` field is empty.
+     * 
+ * + * .google.protobuf.Int32Value remaining_distance_meters = 18; + * + * @return Whether the remainingDistanceMeters field is set. + */ + public boolean hasRemainingDistanceMeters() { + return ((bitField0_ & 0x00004000) != 0); + } + /** + * + * + *
+     * The remaining driving distance for the `current_route_segment`.
+     * This value is also returned in `Trip.remaining_distance_meters` for all
+     * active trips assigned to the vehicle. The value is unspecified if the
+     * `current_route_segment` field is empty.
+     * 
+ * + * .google.protobuf.Int32Value remaining_distance_meters = 18; + * + * @return The remainingDistanceMeters. + */ + public com.google.protobuf.Int32Value getRemainingDistanceMeters() { + if (remainingDistanceMetersBuilder_ == null) { + return remainingDistanceMeters_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : remainingDistanceMeters_; + } else { + return remainingDistanceMetersBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The remaining driving distance for the `current_route_segment`.
+     * This value is also returned in `Trip.remaining_distance_meters` for all
+     * active trips assigned to the vehicle. The value is unspecified if the
+     * `current_route_segment` field is empty.
+     * 
+ * + * .google.protobuf.Int32Value remaining_distance_meters = 18; + */ + public Builder setRemainingDistanceMeters(com.google.protobuf.Int32Value value) { + if (remainingDistanceMetersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + remainingDistanceMeters_ = value; + } else { + remainingDistanceMetersBuilder_.setMessage(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * The remaining driving distance for the `current_route_segment`.
+     * This value is also returned in `Trip.remaining_distance_meters` for all
+     * active trips assigned to the vehicle. The value is unspecified if the
+     * `current_route_segment` field is empty.
+     * 
+ * + * .google.protobuf.Int32Value remaining_distance_meters = 18; + */ + public Builder setRemainingDistanceMeters( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (remainingDistanceMetersBuilder_ == null) { + remainingDistanceMeters_ = builderForValue.build(); + } else { + remainingDistanceMetersBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * The remaining driving distance for the `current_route_segment`.
+     * This value is also returned in `Trip.remaining_distance_meters` for all
+     * active trips assigned to the vehicle. The value is unspecified if the
+     * `current_route_segment` field is empty.
+     * 
+ * + * .google.protobuf.Int32Value remaining_distance_meters = 18; + */ + public Builder mergeRemainingDistanceMeters(com.google.protobuf.Int32Value value) { + if (remainingDistanceMetersBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0) + && remainingDistanceMeters_ != null + && remainingDistanceMeters_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getRemainingDistanceMetersBuilder().mergeFrom(value); + } else { + remainingDistanceMeters_ = value; + } + } else { + remainingDistanceMetersBuilder_.mergeFrom(value); + } + if (remainingDistanceMeters_ != null) { + bitField0_ |= 0x00004000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The remaining driving distance for the `current_route_segment`.
+     * This value is also returned in `Trip.remaining_distance_meters` for all
+     * active trips assigned to the vehicle. The value is unspecified if the
+     * `current_route_segment` field is empty.
+     * 
+ * + * .google.protobuf.Int32Value remaining_distance_meters = 18; + */ + public Builder clearRemainingDistanceMeters() { + bitField0_ = (bitField0_ & ~0x00004000); + remainingDistanceMeters_ = null; + if (remainingDistanceMetersBuilder_ != null) { + remainingDistanceMetersBuilder_.dispose(); + remainingDistanceMetersBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The remaining driving distance for the `current_route_segment`.
+     * This value is also returned in `Trip.remaining_distance_meters` for all
+     * active trips assigned to the vehicle. The value is unspecified if the
+     * `current_route_segment` field is empty.
+     * 
+ * + * .google.protobuf.Int32Value remaining_distance_meters = 18; + */ + public com.google.protobuf.Int32Value.Builder getRemainingDistanceMetersBuilder() { + bitField0_ |= 0x00004000; + onChanged(); + return getRemainingDistanceMetersFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The remaining driving distance for the `current_route_segment`.
+     * This value is also returned in `Trip.remaining_distance_meters` for all
+     * active trips assigned to the vehicle. The value is unspecified if the
+     * `current_route_segment` field is empty.
+     * 
+ * + * .google.protobuf.Int32Value remaining_distance_meters = 18; + */ + public com.google.protobuf.Int32ValueOrBuilder getRemainingDistanceMetersOrBuilder() { + if (remainingDistanceMetersBuilder_ != null) { + return remainingDistanceMetersBuilder_.getMessageOrBuilder(); + } else { + return remainingDistanceMeters_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : remainingDistanceMeters_; + } + } + /** + * + * + *
+     * The remaining driving distance for the `current_route_segment`.
+     * This value is also returned in `Trip.remaining_distance_meters` for all
+     * active trips assigned to the vehicle. The value is unspecified if the
+     * `current_route_segment` field is empty.
+     * 
+ * + * .google.protobuf.Int32Value remaining_distance_meters = 18; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + getRemainingDistanceMetersFieldBuilder() { + if (remainingDistanceMetersBuilder_ == null) { + remainingDistanceMetersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder>( + getRemainingDistanceMeters(), getParentForChildren(), isClean()); + remainingDistanceMeters_ = null; + } + return remainingDistanceMetersBuilder_; + } + + private com.google.protobuf.Timestamp etaToFirstWaypoint_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + etaToFirstWaypointBuilder_; + /** + * + * + *
+     * The ETA to the first entry in the `waypoints` field.  The value is
+     * unspecified if the `waypoints` field is empty or the
+     * `Vehicle.current_route_segment` field is empty.
+     *
+     * When updating a vehicle, `remaining_time_seconds` takes precedence over
+     * `eta_to_first_waypoint` in the same request.
+     * 
+ * + * .google.protobuf.Timestamp eta_to_first_waypoint = 19; + * + * @return Whether the etaToFirstWaypoint field is set. + */ + public boolean hasEtaToFirstWaypoint() { + return ((bitField0_ & 0x00008000) != 0); + } + /** + * + * + *
+     * The ETA to the first entry in the `waypoints` field.  The value is
+     * unspecified if the `waypoints` field is empty or the
+     * `Vehicle.current_route_segment` field is empty.
+     *
+     * When updating a vehicle, `remaining_time_seconds` takes precedence over
+     * `eta_to_first_waypoint` in the same request.
+     * 
+ * + * .google.protobuf.Timestamp eta_to_first_waypoint = 19; + * + * @return The etaToFirstWaypoint. + */ + public com.google.protobuf.Timestamp getEtaToFirstWaypoint() { + if (etaToFirstWaypointBuilder_ == null) { + return etaToFirstWaypoint_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : etaToFirstWaypoint_; + } else { + return etaToFirstWaypointBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The ETA to the first entry in the `waypoints` field.  The value is
+     * unspecified if the `waypoints` field is empty or the
+     * `Vehicle.current_route_segment` field is empty.
+     *
+     * When updating a vehicle, `remaining_time_seconds` takes precedence over
+     * `eta_to_first_waypoint` in the same request.
+     * 
+ * + * .google.protobuf.Timestamp eta_to_first_waypoint = 19; + */ + public Builder setEtaToFirstWaypoint(com.google.protobuf.Timestamp value) { + if (etaToFirstWaypointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + etaToFirstWaypoint_ = value; + } else { + etaToFirstWaypointBuilder_.setMessage(value); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+     * The ETA to the first entry in the `waypoints` field.  The value is
+     * unspecified if the `waypoints` field is empty or the
+     * `Vehicle.current_route_segment` field is empty.
+     *
+     * When updating a vehicle, `remaining_time_seconds` takes precedence over
+     * `eta_to_first_waypoint` in the same request.
+     * 
+ * + * .google.protobuf.Timestamp eta_to_first_waypoint = 19; + */ + public Builder setEtaToFirstWaypoint(com.google.protobuf.Timestamp.Builder builderForValue) { + if (etaToFirstWaypointBuilder_ == null) { + etaToFirstWaypoint_ = builderForValue.build(); + } else { + etaToFirstWaypointBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+     * The ETA to the first entry in the `waypoints` field.  The value is
+     * unspecified if the `waypoints` field is empty or the
+     * `Vehicle.current_route_segment` field is empty.
+     *
+     * When updating a vehicle, `remaining_time_seconds` takes precedence over
+     * `eta_to_first_waypoint` in the same request.
+     * 
+ * + * .google.protobuf.Timestamp eta_to_first_waypoint = 19; + */ + public Builder mergeEtaToFirstWaypoint(com.google.protobuf.Timestamp value) { + if (etaToFirstWaypointBuilder_ == null) { + if (((bitField0_ & 0x00008000) != 0) + && etaToFirstWaypoint_ != null + && etaToFirstWaypoint_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEtaToFirstWaypointBuilder().mergeFrom(value); + } else { + etaToFirstWaypoint_ = value; + } + } else { + etaToFirstWaypointBuilder_.mergeFrom(value); + } + if (etaToFirstWaypoint_ != null) { + bitField0_ |= 0x00008000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The ETA to the first entry in the `waypoints` field.  The value is
+     * unspecified if the `waypoints` field is empty or the
+     * `Vehicle.current_route_segment` field is empty.
+     *
+     * When updating a vehicle, `remaining_time_seconds` takes precedence over
+     * `eta_to_first_waypoint` in the same request.
+     * 
+ * + * .google.protobuf.Timestamp eta_to_first_waypoint = 19; + */ + public Builder clearEtaToFirstWaypoint() { + bitField0_ = (bitField0_ & ~0x00008000); + etaToFirstWaypoint_ = null; + if (etaToFirstWaypointBuilder_ != null) { + etaToFirstWaypointBuilder_.dispose(); + etaToFirstWaypointBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The ETA to the first entry in the `waypoints` field.  The value is
+     * unspecified if the `waypoints` field is empty or the
+     * `Vehicle.current_route_segment` field is empty.
+     *
+     * When updating a vehicle, `remaining_time_seconds` takes precedence over
+     * `eta_to_first_waypoint` in the same request.
+     * 
+ * + * .google.protobuf.Timestamp eta_to_first_waypoint = 19; + */ + public com.google.protobuf.Timestamp.Builder getEtaToFirstWaypointBuilder() { + bitField0_ |= 0x00008000; + onChanged(); + return getEtaToFirstWaypointFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The ETA to the first entry in the `waypoints` field.  The value is
+     * unspecified if the `waypoints` field is empty or the
+     * `Vehicle.current_route_segment` field is empty.
+     *
+     * When updating a vehicle, `remaining_time_seconds` takes precedence over
+     * `eta_to_first_waypoint` in the same request.
+     * 
+ * + * .google.protobuf.Timestamp eta_to_first_waypoint = 19; + */ + public com.google.protobuf.TimestampOrBuilder getEtaToFirstWaypointOrBuilder() { + if (etaToFirstWaypointBuilder_ != null) { + return etaToFirstWaypointBuilder_.getMessageOrBuilder(); + } else { + return etaToFirstWaypoint_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : etaToFirstWaypoint_; + } + } + /** + * + * + *
+     * The ETA to the first entry in the `waypoints` field.  The value is
+     * unspecified if the `waypoints` field is empty or the
+     * `Vehicle.current_route_segment` field is empty.
+     *
+     * When updating a vehicle, `remaining_time_seconds` takes precedence over
+     * `eta_to_first_waypoint` in the same request.
+     * 
+ * + * .google.protobuf.Timestamp eta_to_first_waypoint = 19; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEtaToFirstWaypointFieldBuilder() { + if (etaToFirstWaypointBuilder_ == null) { + etaToFirstWaypointBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEtaToFirstWaypoint(), getParentForChildren(), isClean()); + etaToFirstWaypoint_ = null; + } + return etaToFirstWaypointBuilder_; + } + + private com.google.protobuf.Int32Value remainingTimeSeconds_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + remainingTimeSecondsBuilder_; + /** + * + * + *
+     * Input only. The remaining driving time for the `current_route_segment`. The
+     * value is unspecified if the `waypoints` field is empty or the
+     * `Vehicle.current_route_segment` field is empty. This value should match
+     * `eta_to_first_waypoint` - `current_time` if all parties are using the same
+     * clock.
+     *
+     * When updating a vehicle, `remaining_time_seconds` takes precedence over
+     * `eta_to_first_waypoint` in the same request.
+     * 
+ * + * + * .google.protobuf.Int32Value remaining_time_seconds = 25 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the remainingTimeSeconds field is set. + */ + public boolean hasRemainingTimeSeconds() { + return ((bitField0_ & 0x00010000) != 0); + } + /** + * + * + *
+     * Input only. The remaining driving time for the `current_route_segment`. The
+     * value is unspecified if the `waypoints` field is empty or the
+     * `Vehicle.current_route_segment` field is empty. This value should match
+     * `eta_to_first_waypoint` - `current_time` if all parties are using the same
+     * clock.
+     *
+     * When updating a vehicle, `remaining_time_seconds` takes precedence over
+     * `eta_to_first_waypoint` in the same request.
+     * 
+ * + * + * .google.protobuf.Int32Value remaining_time_seconds = 25 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The remainingTimeSeconds. + */ + public com.google.protobuf.Int32Value getRemainingTimeSeconds() { + if (remainingTimeSecondsBuilder_ == null) { + return remainingTimeSeconds_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : remainingTimeSeconds_; + } else { + return remainingTimeSecondsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Input only. The remaining driving time for the `current_route_segment`. The
+     * value is unspecified if the `waypoints` field is empty or the
+     * `Vehicle.current_route_segment` field is empty. This value should match
+     * `eta_to_first_waypoint` - `current_time` if all parties are using the same
+     * clock.
+     *
+     * When updating a vehicle, `remaining_time_seconds` takes precedence over
+     * `eta_to_first_waypoint` in the same request.
+     * 
+ * + * + * .google.protobuf.Int32Value remaining_time_seconds = 25 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setRemainingTimeSeconds(com.google.protobuf.Int32Value value) { + if (remainingTimeSecondsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + remainingTimeSeconds_ = value; + } else { + remainingTimeSecondsBuilder_.setMessage(value); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. The remaining driving time for the `current_route_segment`. The
+     * value is unspecified if the `waypoints` field is empty or the
+     * `Vehicle.current_route_segment` field is empty. This value should match
+     * `eta_to_first_waypoint` - `current_time` if all parties are using the same
+     * clock.
+     *
+     * When updating a vehicle, `remaining_time_seconds` takes precedence over
+     * `eta_to_first_waypoint` in the same request.
+     * 
+ * + * + * .google.protobuf.Int32Value remaining_time_seconds = 25 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setRemainingTimeSeconds(com.google.protobuf.Int32Value.Builder builderForValue) { + if (remainingTimeSecondsBuilder_ == null) { + remainingTimeSeconds_ = builderForValue.build(); + } else { + remainingTimeSecondsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. The remaining driving time for the `current_route_segment`. The
+     * value is unspecified if the `waypoints` field is empty or the
+     * `Vehicle.current_route_segment` field is empty. This value should match
+     * `eta_to_first_waypoint` - `current_time` if all parties are using the same
+     * clock.
+     *
+     * When updating a vehicle, `remaining_time_seconds` takes precedence over
+     * `eta_to_first_waypoint` in the same request.
+     * 
+ * + * + * .google.protobuf.Int32Value remaining_time_seconds = 25 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder mergeRemainingTimeSeconds(com.google.protobuf.Int32Value value) { + if (remainingTimeSecondsBuilder_ == null) { + if (((bitField0_ & 0x00010000) != 0) + && remainingTimeSeconds_ != null + && remainingTimeSeconds_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getRemainingTimeSecondsBuilder().mergeFrom(value); + } else { + remainingTimeSeconds_ = value; + } + } else { + remainingTimeSecondsBuilder_.mergeFrom(value); + } + if (remainingTimeSeconds_ != null) { + bitField0_ |= 0x00010000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Input only. The remaining driving time for the `current_route_segment`. The
+     * value is unspecified if the `waypoints` field is empty or the
+     * `Vehicle.current_route_segment` field is empty. This value should match
+     * `eta_to_first_waypoint` - `current_time` if all parties are using the same
+     * clock.
+     *
+     * When updating a vehicle, `remaining_time_seconds` takes precedence over
+     * `eta_to_first_waypoint` in the same request.
+     * 
+ * + * + * .google.protobuf.Int32Value remaining_time_seconds = 25 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder clearRemainingTimeSeconds() { + bitField0_ = (bitField0_ & ~0x00010000); + remainingTimeSeconds_ = null; + if (remainingTimeSecondsBuilder_ != null) { + remainingTimeSecondsBuilder_.dispose(); + remainingTimeSecondsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. The remaining driving time for the `current_route_segment`. The
+     * value is unspecified if the `waypoints` field is empty or the
+     * `Vehicle.current_route_segment` field is empty. This value should match
+     * `eta_to_first_waypoint` - `current_time` if all parties are using the same
+     * clock.
+     *
+     * When updating a vehicle, `remaining_time_seconds` takes precedence over
+     * `eta_to_first_waypoint` in the same request.
+     * 
+ * + * + * .google.protobuf.Int32Value remaining_time_seconds = 25 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.protobuf.Int32Value.Builder getRemainingTimeSecondsBuilder() { + bitField0_ |= 0x00010000; + onChanged(); + return getRemainingTimeSecondsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Input only. The remaining driving time for the `current_route_segment`. The
+     * value is unspecified if the `waypoints` field is empty or the
+     * `Vehicle.current_route_segment` field is empty. This value should match
+     * `eta_to_first_waypoint` - `current_time` if all parties are using the same
+     * clock.
+     *
+     * When updating a vehicle, `remaining_time_seconds` takes precedence over
+     * `eta_to_first_waypoint` in the same request.
+     * 
+ * + * + * .google.protobuf.Int32Value remaining_time_seconds = 25 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.protobuf.Int32ValueOrBuilder getRemainingTimeSecondsOrBuilder() { + if (remainingTimeSecondsBuilder_ != null) { + return remainingTimeSecondsBuilder_.getMessageOrBuilder(); + } else { + return remainingTimeSeconds_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : remainingTimeSeconds_; + } + } + /** + * + * + *
+     * Input only. The remaining driving time for the `current_route_segment`. The
+     * value is unspecified if the `waypoints` field is empty or the
+     * `Vehicle.current_route_segment` field is empty. This value should match
+     * `eta_to_first_waypoint` - `current_time` if all parties are using the same
+     * clock.
+     *
+     * When updating a vehicle, `remaining_time_seconds` takes precedence over
+     * `eta_to_first_waypoint` in the same request.
+     * 
+ * + * + * .google.protobuf.Int32Value remaining_time_seconds = 25 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + getRemainingTimeSecondsFieldBuilder() { + if (remainingTimeSecondsBuilder_ == null) { + remainingTimeSecondsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder>( + getRemainingTimeSeconds(), getParentForChildren(), isClean()); + remainingTimeSeconds_ = null; + } + return remainingTimeSecondsBuilder_; + } + + private java.util.List waypoints_ = + java.util.Collections.emptyList(); + + private void ensureWaypointsIsMutable() { + if (!((bitField0_ & 0x00020000) != 0)) { + waypoints_ = + new java.util.ArrayList(waypoints_); + bitField0_ |= 0x00020000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.TripWaypoint, + com.google.maps.fleetengine.v1.TripWaypoint.Builder, + com.google.maps.fleetengine.v1.TripWaypointOrBuilder> + waypointsBuilder_; + + /** + * + * + *
+     * The remaining waypoints assigned to this Vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint waypoints = 22; + */ + public java.util.List getWaypointsList() { + if (waypointsBuilder_ == null) { + return java.util.Collections.unmodifiableList(waypoints_); + } else { + return waypointsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The remaining waypoints assigned to this Vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint waypoints = 22; + */ + public int getWaypointsCount() { + if (waypointsBuilder_ == null) { + return waypoints_.size(); + } else { + return waypointsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The remaining waypoints assigned to this Vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint waypoints = 22; + */ + public com.google.maps.fleetengine.v1.TripWaypoint getWaypoints(int index) { + if (waypointsBuilder_ == null) { + return waypoints_.get(index); + } else { + return waypointsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The remaining waypoints assigned to this Vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint waypoints = 22; + */ + public Builder setWaypoints(int index, com.google.maps.fleetengine.v1.TripWaypoint value) { + if (waypointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWaypointsIsMutable(); + waypoints_.set(index, value); + onChanged(); + } else { + waypointsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The remaining waypoints assigned to this Vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint waypoints = 22; + */ + public Builder setWaypoints( + int index, com.google.maps.fleetengine.v1.TripWaypoint.Builder builderForValue) { + if (waypointsBuilder_ == null) { + ensureWaypointsIsMutable(); + waypoints_.set(index, builderForValue.build()); + onChanged(); + } else { + waypointsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The remaining waypoints assigned to this Vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint waypoints = 22; + */ + public Builder addWaypoints(com.google.maps.fleetengine.v1.TripWaypoint value) { + if (waypointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWaypointsIsMutable(); + waypoints_.add(value); + onChanged(); + } else { + waypointsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The remaining waypoints assigned to this Vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint waypoints = 22; + */ + public Builder addWaypoints(int index, com.google.maps.fleetengine.v1.TripWaypoint value) { + if (waypointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWaypointsIsMutable(); + waypoints_.add(index, value); + onChanged(); + } else { + waypointsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The remaining waypoints assigned to this Vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint waypoints = 22; + */ + public Builder addWaypoints( + com.google.maps.fleetengine.v1.TripWaypoint.Builder builderForValue) { + if (waypointsBuilder_ == null) { + ensureWaypointsIsMutable(); + waypoints_.add(builderForValue.build()); + onChanged(); + } else { + waypointsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The remaining waypoints assigned to this Vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint waypoints = 22; + */ + public Builder addWaypoints( + int index, com.google.maps.fleetengine.v1.TripWaypoint.Builder builderForValue) { + if (waypointsBuilder_ == null) { + ensureWaypointsIsMutable(); + waypoints_.add(index, builderForValue.build()); + onChanged(); + } else { + waypointsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The remaining waypoints assigned to this Vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint waypoints = 22; + */ + public Builder addAllWaypoints( + java.lang.Iterable values) { + if (waypointsBuilder_ == null) { + ensureWaypointsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, waypoints_); + onChanged(); + } else { + waypointsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The remaining waypoints assigned to this Vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint waypoints = 22; + */ + public Builder clearWaypoints() { + if (waypointsBuilder_ == null) { + waypoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00020000); + onChanged(); + } else { + waypointsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The remaining waypoints assigned to this Vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint waypoints = 22; + */ + public Builder removeWaypoints(int index) { + if (waypointsBuilder_ == null) { + ensureWaypointsIsMutable(); + waypoints_.remove(index); + onChanged(); + } else { + waypointsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The remaining waypoints assigned to this Vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint waypoints = 22; + */ + public com.google.maps.fleetengine.v1.TripWaypoint.Builder getWaypointsBuilder(int index) { + return getWaypointsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The remaining waypoints assigned to this Vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint waypoints = 22; + */ + public com.google.maps.fleetengine.v1.TripWaypointOrBuilder getWaypointsOrBuilder(int index) { + if (waypointsBuilder_ == null) { + return waypoints_.get(index); + } else { + return waypointsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The remaining waypoints assigned to this Vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint waypoints = 22; + */ + public java.util.List + getWaypointsOrBuilderList() { + if (waypointsBuilder_ != null) { + return waypointsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(waypoints_); + } + } + /** + * + * + *
+     * The remaining waypoints assigned to this Vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint waypoints = 22; + */ + public com.google.maps.fleetengine.v1.TripWaypoint.Builder addWaypointsBuilder() { + return getWaypointsFieldBuilder() + .addBuilder(com.google.maps.fleetengine.v1.TripWaypoint.getDefaultInstance()); + } + /** + * + * + *
+     * The remaining waypoints assigned to this Vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint waypoints = 22; + */ + public com.google.maps.fleetengine.v1.TripWaypoint.Builder addWaypointsBuilder(int index) { + return getWaypointsFieldBuilder() + .addBuilder(index, com.google.maps.fleetengine.v1.TripWaypoint.getDefaultInstance()); + } + /** + * + * + *
+     * The remaining waypoints assigned to this Vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint waypoints = 22; + */ + public java.util.List + getWaypointsBuilderList() { + return getWaypointsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.TripWaypoint, + com.google.maps.fleetengine.v1.TripWaypoint.Builder, + com.google.maps.fleetengine.v1.TripWaypointOrBuilder> + getWaypointsFieldBuilder() { + if (waypointsBuilder_ == null) { + waypointsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.TripWaypoint, + com.google.maps.fleetengine.v1.TripWaypoint.Builder, + com.google.maps.fleetengine.v1.TripWaypointOrBuilder>( + waypoints_, ((bitField0_ & 0x00020000) != 0), getParentForChildren(), isClean()); + waypoints_ = null; + } + return waypointsBuilder_; + } + + private com.google.protobuf.Timestamp waypointsVersion_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + waypointsVersionBuilder_; + /** + * + * + *
+     * Output only. Last time the `waypoints` field was updated. Clients should
+     * cache this value and pass it in `GetVehicleRequest` to ensure the
+     * `waypoints` field is only returned if it is updated.
+     * 
+ * + * + * .google.protobuf.Timestamp waypoints_version = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the waypointsVersion field is set. + */ + public boolean hasWaypointsVersion() { + return ((bitField0_ & 0x00040000) != 0); + } + /** + * + * + *
+     * Output only. Last time the `waypoints` field was updated. Clients should
+     * cache this value and pass it in `GetVehicleRequest` to ensure the
+     * `waypoints` field is only returned if it is updated.
+     * 
+ * + * + * .google.protobuf.Timestamp waypoints_version = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The waypointsVersion. + */ + public com.google.protobuf.Timestamp getWaypointsVersion() { + if (waypointsVersionBuilder_ == null) { + return waypointsVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : waypointsVersion_; + } else { + return waypointsVersionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Last time the `waypoints` field was updated. Clients should
+     * cache this value and pass it in `GetVehicleRequest` to ensure the
+     * `waypoints` field is only returned if it is updated.
+     * 
+ * + * + * .google.protobuf.Timestamp waypoints_version = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setWaypointsVersion(com.google.protobuf.Timestamp value) { + if (waypointsVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + waypointsVersion_ = value; + } else { + waypointsVersionBuilder_.setMessage(value); + } + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Last time the `waypoints` field was updated. Clients should
+     * cache this value and pass it in `GetVehicleRequest` to ensure the
+     * `waypoints` field is only returned if it is updated.
+     * 
+ * + * + * .google.protobuf.Timestamp waypoints_version = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setWaypointsVersion(com.google.protobuf.Timestamp.Builder builderForValue) { + if (waypointsVersionBuilder_ == null) { + waypointsVersion_ = builderForValue.build(); + } else { + waypointsVersionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Last time the `waypoints` field was updated. Clients should
+     * cache this value and pass it in `GetVehicleRequest` to ensure the
+     * `waypoints` field is only returned if it is updated.
+     * 
+ * + * + * .google.protobuf.Timestamp waypoints_version = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeWaypointsVersion(com.google.protobuf.Timestamp value) { + if (waypointsVersionBuilder_ == null) { + if (((bitField0_ & 0x00040000) != 0) + && waypointsVersion_ != null + && waypointsVersion_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getWaypointsVersionBuilder().mergeFrom(value); + } else { + waypointsVersion_ = value; + } + } else { + waypointsVersionBuilder_.mergeFrom(value); + } + if (waypointsVersion_ != null) { + bitField0_ |= 0x00040000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Last time the `waypoints` field was updated. Clients should
+     * cache this value and pass it in `GetVehicleRequest` to ensure the
+     * `waypoints` field is only returned if it is updated.
+     * 
+ * + * + * .google.protobuf.Timestamp waypoints_version = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearWaypointsVersion() { + bitField0_ = (bitField0_ & ~0x00040000); + waypointsVersion_ = null; + if (waypointsVersionBuilder_ != null) { + waypointsVersionBuilder_.dispose(); + waypointsVersionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Last time the `waypoints` field was updated. Clients should
+     * cache this value and pass it in `GetVehicleRequest` to ensure the
+     * `waypoints` field is only returned if it is updated.
+     * 
+ * + * + * .google.protobuf.Timestamp waypoints_version = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getWaypointsVersionBuilder() { + bitField0_ |= 0x00040000; + onChanged(); + return getWaypointsVersionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Last time the `waypoints` field was updated. Clients should
+     * cache this value and pass it in `GetVehicleRequest` to ensure the
+     * `waypoints` field is only returned if it is updated.
+     * 
+ * + * + * .google.protobuf.Timestamp waypoints_version = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getWaypointsVersionOrBuilder() { + if (waypointsVersionBuilder_ != null) { + return waypointsVersionBuilder_.getMessageOrBuilder(); + } else { + return waypointsVersion_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : waypointsVersion_; + } + } + /** + * + * + *
+     * Output only. Last time the `waypoints` field was updated. Clients should
+     * cache this value and pass it in `GetVehicleRequest` to ensure the
+     * `waypoints` field is only returned if it is updated.
+     * 
+ * + * + * .google.protobuf.Timestamp waypoints_version = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getWaypointsVersionFieldBuilder() { + if (waypointsVersionBuilder_ == null) { + waypointsVersionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getWaypointsVersion(), getParentForChildren(), isClean()); + waypointsVersion_ = null; + } + return waypointsVersionBuilder_; + } + + private boolean backToBackEnabled_; + /** + * + * + *
+     * Indicates if the driver accepts back-to-back trips. If `true`,
+     * `SearchVehicles` may include the vehicle even if it is currently assigned
+     * to a trip. The default value is `false`.
+     * 
+ * + * bool back_to_back_enabled = 23; + * + * @return The backToBackEnabled. + */ + @java.lang.Override + public boolean getBackToBackEnabled() { + return backToBackEnabled_; + } + /** + * + * + *
+     * Indicates if the driver accepts back-to-back trips. If `true`,
+     * `SearchVehicles` may include the vehicle even if it is currently assigned
+     * to a trip. The default value is `false`.
+     * 
+ * + * bool back_to_back_enabled = 23; + * + * @param value The backToBackEnabled to set. + * @return This builder for chaining. + */ + public Builder setBackToBackEnabled(boolean value) { + + backToBackEnabled_ = value; + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates if the driver accepts back-to-back trips. If `true`,
+     * `SearchVehicles` may include the vehicle even if it is currently assigned
+     * to a trip. The default value is `false`.
+     * 
+ * + * bool back_to_back_enabled = 23; + * + * @return This builder for chaining. + */ + public Builder clearBackToBackEnabled() { + bitField0_ = (bitField0_ & ~0x00080000); + backToBackEnabled_ = false; + onChanged(); + return this; + } + + private int navigationStatus_ = 0; + /** + * + * + *
+     * The vehicle's navigation status.
+     * 
+ * + * .maps.fleetengine.v1.NavigationStatus navigation_status = 26; + * + * @return The enum numeric value on the wire for navigationStatus. + */ + @java.lang.Override + public int getNavigationStatusValue() { + return navigationStatus_; + } + /** + * + * + *
+     * The vehicle's navigation status.
+     * 
+ * + * .maps.fleetengine.v1.NavigationStatus navigation_status = 26; + * + * @param value The enum numeric value on the wire for navigationStatus to set. + * @return This builder for chaining. + */ + public Builder setNavigationStatusValue(int value) { + navigationStatus_ = value; + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + * + * + *
+     * The vehicle's navigation status.
+     * 
+ * + * .maps.fleetengine.v1.NavigationStatus navigation_status = 26; + * + * @return The navigationStatus. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.NavigationStatus getNavigationStatus() { + com.google.maps.fleetengine.v1.NavigationStatus result = + com.google.maps.fleetengine.v1.NavigationStatus.forNumber(navigationStatus_); + return result == null ? com.google.maps.fleetengine.v1.NavigationStatus.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The vehicle's navigation status.
+     * 
+ * + * .maps.fleetengine.v1.NavigationStatus navigation_status = 26; + * + * @param value The navigationStatus to set. + * @return This builder for chaining. + */ + public Builder setNavigationStatus(com.google.maps.fleetengine.v1.NavigationStatus value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00100000; + navigationStatus_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The vehicle's navigation status.
+     * 
+ * + * .maps.fleetengine.v1.NavigationStatus navigation_status = 26; + * + * @return This builder for chaining. + */ + public Builder clearNavigationStatus() { + bitField0_ = (bitField0_ & ~0x00100000); + navigationStatus_ = 0; + onChanged(); + return this; + } + + private com.google.maps.fleetengine.v1.DeviceSettings deviceSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.DeviceSettings, + com.google.maps.fleetengine.v1.DeviceSettings.Builder, + com.google.maps.fleetengine.v1.DeviceSettingsOrBuilder> + deviceSettingsBuilder_; + /** + * + * + *
+     * Input only. Information about settings in the mobile device being used by
+     * the driver.
+     * 
+ * + * + * .maps.fleetengine.v1.DeviceSettings device_settings = 27 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the deviceSettings field is set. + */ + public boolean hasDeviceSettings() { + return ((bitField0_ & 0x00200000) != 0); + } + /** + * + * + *
+     * Input only. Information about settings in the mobile device being used by
+     * the driver.
+     * 
+ * + * + * .maps.fleetengine.v1.DeviceSettings device_settings = 27 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The deviceSettings. + */ + public com.google.maps.fleetengine.v1.DeviceSettings getDeviceSettings() { + if (deviceSettingsBuilder_ == null) { + return deviceSettings_ == null + ? com.google.maps.fleetengine.v1.DeviceSettings.getDefaultInstance() + : deviceSettings_; + } else { + return deviceSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Input only. Information about settings in the mobile device being used by
+     * the driver.
+     * 
+ * + * + * .maps.fleetengine.v1.DeviceSettings device_settings = 27 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setDeviceSettings(com.google.maps.fleetengine.v1.DeviceSettings value) { + if (deviceSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deviceSettings_ = value; + } else { + deviceSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. Information about settings in the mobile device being used by
+     * the driver.
+     * 
+ * + * + * .maps.fleetengine.v1.DeviceSettings device_settings = 27 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setDeviceSettings( + com.google.maps.fleetengine.v1.DeviceSettings.Builder builderForValue) { + if (deviceSettingsBuilder_ == null) { + deviceSettings_ = builderForValue.build(); + } else { + deviceSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. Information about settings in the mobile device being used by
+     * the driver.
+     * 
+ * + * + * .maps.fleetengine.v1.DeviceSettings device_settings = 27 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder mergeDeviceSettings(com.google.maps.fleetengine.v1.DeviceSettings value) { + if (deviceSettingsBuilder_ == null) { + if (((bitField0_ & 0x00200000) != 0) + && deviceSettings_ != null + && deviceSettings_ + != com.google.maps.fleetengine.v1.DeviceSettings.getDefaultInstance()) { + getDeviceSettingsBuilder().mergeFrom(value); + } else { + deviceSettings_ = value; + } + } else { + deviceSettingsBuilder_.mergeFrom(value); + } + if (deviceSettings_ != null) { + bitField0_ |= 0x00200000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Input only. Information about settings in the mobile device being used by
+     * the driver.
+     * 
+ * + * + * .maps.fleetengine.v1.DeviceSettings device_settings = 27 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder clearDeviceSettings() { + bitField0_ = (bitField0_ & ~0x00200000); + deviceSettings_ = null; + if (deviceSettingsBuilder_ != null) { + deviceSettingsBuilder_.dispose(); + deviceSettingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. Information about settings in the mobile device being used by
+     * the driver.
+     * 
+ * + * + * .maps.fleetengine.v1.DeviceSettings device_settings = 27 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.maps.fleetengine.v1.DeviceSettings.Builder getDeviceSettingsBuilder() { + bitField0_ |= 0x00200000; + onChanged(); + return getDeviceSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Input only. Information about settings in the mobile device being used by
+     * the driver.
+     * 
+ * + * + * .maps.fleetengine.v1.DeviceSettings device_settings = 27 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.maps.fleetengine.v1.DeviceSettingsOrBuilder getDeviceSettingsOrBuilder() { + if (deviceSettingsBuilder_ != null) { + return deviceSettingsBuilder_.getMessageOrBuilder(); + } else { + return deviceSettings_ == null + ? com.google.maps.fleetengine.v1.DeviceSettings.getDefaultInstance() + : deviceSettings_; + } + } + /** + * + * + *
+     * Input only. Information about settings in the mobile device being used by
+     * the driver.
+     * 
+ * + * + * .maps.fleetengine.v1.DeviceSettings device_settings = 27 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.DeviceSettings, + com.google.maps.fleetengine.v1.DeviceSettings.Builder, + com.google.maps.fleetengine.v1.DeviceSettingsOrBuilder> + getDeviceSettingsFieldBuilder() { + if (deviceSettingsBuilder_ == null) { + deviceSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.DeviceSettings, + com.google.maps.fleetengine.v1.DeviceSettings.Builder, + com.google.maps.fleetengine.v1.DeviceSettingsOrBuilder>( + getDeviceSettings(), getParentForChildren(), isClean()); + deviceSettings_ = null; + } + return deviceSettingsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:maps.fleetengine.v1.Vehicle) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.v1.Vehicle) + private static final com.google.maps.fleetengine.v1.Vehicle DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.fleetengine.v1.Vehicle(); + } + + public static com.google.maps.fleetengine.v1.Vehicle getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Vehicle 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.fleetengine.v1.Vehicle getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleApi.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleApi.java new file mode 100644 index 000000000000..205447fb61f0 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleApi.java @@ -0,0 +1,424 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicle_api.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public final class VehicleApi { + private VehicleApi() {} + + 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_maps_fleetengine_v1_CreateVehicleRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_v1_CreateVehicleRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_v1_GetVehicleRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_v1_GetVehicleRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_v1_UpdateVehicleRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_v1_UpdateVehicleRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_v1_UpdateVehicleAttributesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_v1_UpdateVehicleAttributesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_v1_UpdateVehicleAttributesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_v1_UpdateVehicleAttributesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_v1_SearchVehiclesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_v1_SearchVehiclesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_v1_SearchVehiclesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_v1_SearchVehiclesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_v1_ListVehiclesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_v1_ListVehiclesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_v1_ListVehiclesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_v1_ListVehiclesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_v1_Waypoint_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_v1_Waypoint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_v1_VehicleMatch_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_v1_VehicleMatch_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_v1_VehicleAttributeList_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_v1_VehicleAttributeList_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n,google/maps/fleetengine/v1/vehicle_api" + + ".proto\022\023maps.fleetengine.v1\032\034google/api/" + + "annotations.proto\032\027google/api/client.pro" + + "to\032\037google/api/field_behavior.proto\032\031goo" + + "gle/api/resource.proto\032\030google/api/routi" + + "ng.proto\032\036google/geo/type/viewport.proto" + + "\032,google/maps/fleetengine/v1/fleetengine" + + ".proto\032\'google/maps/fleetengine/v1/heade" + + "r.proto\032)google/maps/fleetengine/v1/vehi" + + "cles.proto\032\036google/protobuf/duration.pro" + + "to\032 google/protobuf/field_mask.proto\032\037go" + + "ogle/protobuf/timestamp.proto\032\036google/pr" + + "otobuf/wrappers.proto\032\030google/type/latln" + + "g.proto\"\254\001\n\024CreateVehicleRequest\0222\n\006head" + + "er\030\001 \001(\0132\".maps.fleetengine.v1.RequestHe" + + "ader\022\023\n\006parent\030\003 \001(\tB\003\340A\002\022\027\n\nvehicle_id\030" + + "\004 \001(\tB\003\340A\002\0222\n\007vehicle\030\005 \001(\0132\034.maps.fleet" + + "engine.v1.VehicleB\003\340A\002\"\373\001\n\021GetVehicleReq" + + "uest\0222\n\006header\030\001 \001(\0132\".maps.fleetengine." + + "v1.RequestHeader\0228\n\004name\030\003 \001(\tB*\340A\002\372A$\n\"" + + "fleetengine.googleapis.com/Vehicle\022A\n\035cu" + + "rrent_route_segment_version\030\004 \001(\0132\032.goog" + + "le.protobuf.Timestamp\0225\n\021waypoints_versi" + + "on\030\005 \001(\0132\032.google.protobuf.Timestamp\"\307\001\n" + + "\024UpdateVehicleRequest\0222\n\006header\030\001 \001(\0132\"." + + "maps.fleetengine.v1.RequestHeader\022\021\n\004nam" + + "e\030\003 \001(\tB\003\340A\002\0222\n\007vehicle\030\004 \001(\0132\034.maps.fle" + + "etengine.v1.VehicleB\003\340A\002\0224\n\013update_mask\030" + + "\005 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\"\247" + + "\001\n\036UpdateVehicleAttributesRequest\0222\n\006hea" + + "der\030\001 \001(\0132\".maps.fleetengine.v1.RequestH" + + "eader\022\021\n\004name\030\003 \001(\tB\003\340A\002\022>\n\nattributes\030\004" + + " \003(\0132%.maps.fleetengine.v1.VehicleAttrib" + + "uteB\003\340A\002\"a\n\037UpdateVehicleAttributesRespo" + + "nse\022>\n\nattributes\030\001 \003(\0132%.maps.fleetengi" + + "ne.v1.VehicleAttributeB\003\340A\002\"\306\t\n\025SearchVe" + + "hiclesRequest\0222\n\006header\030\001 \001(\0132\".maps.fle" + + "etengine.v1.RequestHeader\022\023\n\006parent\030\003 \001(" + + "\tB\003\340A\002\022@\n\014pickup_point\030\004 \001(\0132%.maps.flee" + + "tengine.v1.TerminalLocationB\003\340A\002\022<\n\rdrop" + + "off_point\030\005 \001(\0132%.maps.fleetengine.v1.Te" + + "rminalLocation\022!\n\024pickup_radius_meters\030\006" + + " \001(\005B\003\340A\002\022\022\n\005count\030\007 \001(\005B\003\340A\002\022\035\n\020minimum" + + "_capacity\030\010 \001(\005B\003\340A\002\0226\n\ntrip_types\030\t \003(\016" + + "2\035.maps.fleetengine.v1.TripTypeB\003\340A\002\0224\n\021" + + "maximum_staleness\030\n \001(\0132\031.google.protobu" + + "f.Duration\022D\n\rvehicle_types\030\016 \003(\0132(.maps" + + ".fleetengine.v1.Vehicle.VehicleTypeB\003\340A\002" + + "\022B\n\023required_attributes\030\014 \003(\0132%.maps.fle" + + "etengine.v1.VehicleAttribute\022M\n\032required" + + "_one_of_attributes\030\017 \003(\0132).maps.fleeteng" + + "ine.v1.VehicleAttributeList\022Q\n\036required_" + + "one_of_attribute_sets\030\024 \003(\0132).maps.fleet" + + "engine.v1.VehicleAttributeList\022S\n\010order_" + + "by\030\r \001(\0162<.maps.fleetengine.v1.SearchVeh" + + "iclesRequest.VehicleMatchOrderB\003\340A\002\022\034\n\024i" + + "nclude_back_to_back\030\022 \001(\010\022\017\n\007trip_id\030\023 \001" + + "(\t\022]\n\025current_trips_present\030\025 \001(\0162>.maps" + + ".fleetengine.v1.SearchVehiclesRequest.Cu" + + "rrentTripsPresent\022\023\n\006filter\030\026 \001(\tB\003\340A\001\"\252" + + "\001\n\021VehicleMatchOrder\022\037\n\033UNKNOWN_VEHICLE_" + + "MATCH_ORDER\020\000\022\024\n\020PICKUP_POINT_ETA\020\001\022\031\n\025P" + + "ICKUP_POINT_DISTANCE\020\002\022\025\n\021DROPOFF_POINT_" + + "ETA\020\003\022\"\n\036PICKUP_POINT_STRAIGHT_DISTANCE\020" + + "\004\022\010\n\004COST\020\005\"O\n\023CurrentTripsPresent\022%\n!CU" + + "RRENT_TRIPS_PRESENT_UNSPECIFIED\020\000\022\010\n\004NON" + + "E\020\001\022\007\n\003ANY\020\002\"L\n\026SearchVehiclesResponse\0222" + + "\n\007matches\030\001 \003(\0132!.maps.fleetengine.v1.Ve" + + "hicleMatch\"\376\004\n\023ListVehiclesRequest\0222\n\006he" + + "ader\030\014 \001(\0132\".maps.fleetengine.v1.Request" + + "Header\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022\021\n\tpage_size" + + "\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\0225\n\020minimum_ca" + + "pacity\030\006 \001(\0132\033.google.protobuf.Int32Valu" + + "e\0221\n\ntrip_types\030\007 \003(\0162\035.maps.fleetengine" + + ".v1.TripType\0224\n\021maximum_staleness\030\010 \001(\0132" + + "\031.google.protobuf.Duration\022W\n\027vehicle_ty" + + "pe_categories\030\t \003(\01621.maps.fleetengine.v" + + "1.Vehicle.VehicleType.CategoryB\003\340A\002\022\033\n\023r" + + "equired_attributes\030\n \003(\t\022\"\n\032required_one" + + "_of_attributes\030\r \003(\t\022&\n\036required_one_of_" + + "attribute_sets\030\017 \003(\t\0228\n\rvehicle_state\030\013 " + + "\001(\0162!.maps.fleetengine.v1.VehicleState\022\024" + + "\n\014on_trip_only\030\016 \001(\010\022\023\n\006filter\030\020 \001(\tB\003\340A" + + "\001\0220\n\010viewport\030\021 \001(\0132\031.google.geo.type.Vi" + + "ewportB\003\340A\001\"x\n\024ListVehiclesResponse\022.\n\010v" + + "ehicles\030\001 \003(\0132\034.maps.fleetengine.v1.Vehi" + + "cle\022\027\n\017next_page_token\030\002 \001(\t\022\027\n\ntotal_si" + + "ze\030\003 \001(\003B\003\340A\002\"Y\n\010Waypoint\022$\n\007lat_lng\030\001 \001" + + "(\0132\023.google.type.LatLng\022\'\n\003eta\030\002 \001(\0132\032.g" + + "oogle.protobuf.Timestamp\"\376\006\n\014VehicleMatc" + + "h\0222\n\007vehicle\030\001 \001(\0132\034.maps.fleetengine.v1" + + ".VehicleB\003\340A\002\0226\n\022vehicle_pickup_eta\030\002 \001(" + + "\0132\032.google.protobuf.Timestamp\022C\n\036vehicle" + + "_pickup_distance_meters\030\003 \001(\0132\033.google.p" + + "rotobuf.Int32Value\022V\n,vehicle_pickup_str" + + "aight_line_distance_meters\030\013 \001(\0132\033.googl" + + "e.protobuf.Int32ValueB\003\340A\002\0227\n\023vehicle_dr" + + "opoff_eta\030\004 \001(\0132\032.google.protobuf.Timest" + + "amp\022N\n)vehicle_pickup_to_dropoff_distanc" + + "e_meters\030\005 \001(\0132\033.google.protobuf.Int32Va" + + "lue\0225\n\ttrip_type\030\006 \001(\0162\035.maps.fleetengin" + + "e.v1.TripTypeB\003\340A\002\022>\n\027vehicle_trips_wayp" + + "oints\030\007 \003(\0132\035.maps.fleetengine.v1.Waypoi" + + "nt\022N\n\022vehicle_match_type\030\010 \001(\01622.maps.fl" + + "eetengine.v1.VehicleMatch.VehicleMatchTy" + + "pe\022Z\n\024requested_ordered_by\030\t \001(\0162<.maps." + + "fleetengine.v1.SearchVehiclesRequest.Veh" + + "icleMatchOrder\022P\n\nordered_by\030\n \001(\0162<.map" + + "s.fleetengine.v1.SearchVehiclesRequest.V" + + "ehicleMatchOrder\"g\n\020VehicleMatchType\022\013\n\007" + + "UNKNOWN\020\000\022\r\n\tEXCLUSIVE\020\001\022\020\n\014BACK_TO_BACK" + + "\020\002\022\013\n\007CARPOOL\020\003\022\030\n\024CARPOOL_BACK_TO_BACK\020" + + "\004\"Q\n\024VehicleAttributeList\0229\n\nattributes\030" + + "\001 \003(\0132%.maps.fleetengine.v1.VehicleAttri" + + "bute2\362\t\n\016VehicleService\022\267\001\n\rCreateVehicl" + + "e\022).maps.fleetengine.v1.CreateVehicleReq" + + "uest\032\034.maps.fleetengine.v1.Vehicle\"]\202\323\344\223" + + "\002,\"!/v1/{parent=providers/*}/vehicles:\007v" + + "ehicle\212\323\344\223\002%\022#\n\006parent\022\031{provider_id=pro" + + "viders/*}\022\246\001\n\nGetVehicle\022&.maps.fleeteng" + + "ine.v1.GetVehicleRequest\032\034.maps.fleeteng" + + "ine.v1.Vehicle\"R\202\323\344\223\002#\022!/v1/{name=provid" + + "ers/*/vehicles/*}\212\323\344\223\002#\022!\n\004name\022\031{provid" + + "er_id=providers/*}\022\265\001\n\rUpdateVehicle\022).m" + + "aps.fleetengine.v1.UpdateVehicleRequest\032" + + "\034.maps.fleetengine.v1.Vehicle\"[\202\323\344\223\002,\032!/" + + "v1/{name=providers/*/vehicles/*}:\007vehicl" + + "e\212\323\344\223\002#\022!\n\004name\022\031{provider_id=providers/" + + "*}\022\354\001\n\027UpdateVehicleAttributes\0223.maps.fl" + + "eetengine.v1.UpdateVehicleAttributesRequ" + + "est\0324.maps.fleetengine.v1.UpdateVehicleA" + + "ttributesResponse\"f\202\323\344\223\0027\"2/v1/{name=pro" + + "viders/*/vehicles/*}:updateAttributes:\001*" + + "\212\323\344\223\002#\022!\n\004name\022\031{provider_id=providers/*" + + "}\022\271\001\n\014ListVehicles\022(.maps.fleetengine.v1" + + ".ListVehiclesRequest\032).maps.fleetengine." + + "v1.ListVehiclesResponse\"T\202\323\344\223\002#\022!/v1/{pa" + + "rent=providers/*}/vehicles\212\323\344\223\002%\022#\n\006pare" + + "nt\022\031{provider_id=providers/*}\022\311\001\n\016Search" + + "Vehicles\022*.maps.fleetengine.v1.SearchVeh" + + "iclesRequest\032+.maps.fleetengine.v1.Searc" + + "hVehiclesResponse\"^\202\323\344\223\002-\"(/v1/{parent=p" + + "roviders/*}/vehicles:search:\001*\212\323\344\223\002%\022#\n\006" + + "parent\022\031{provider_id=providers/*}\032N\312A\032fl" + + "eetengine.googleapis.com\322A.https://www.g" + + "oogleapis.com/auth/cloud-platformB\326\001\n\036co" + + "m.google.maps.fleetengine.v1B\nVehicleApi" + + "P\001ZFcloud.google.com/go/maps/fleetengine" + + "/apiv1/fleetenginepb;fleetenginepb\242\002\003CFE" + + "\252\002\032Google.Maps.FleetEngine.V1\312\002\032Google\\M" + + "aps\\FleetEngine\\V1\352\002\035Google::Maps::Fleet" + + "Engine::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.api.RoutingProto.getDescriptor(), + com.google.geo.type.ViewportProto.getDescriptor(), + com.google.maps.fleetengine.v1.FleetEngine.getDescriptor(), + com.google.maps.fleetengine.v1.Headers.getDescriptor(), + com.google.maps.fleetengine.v1.Vehicles.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.protobuf.WrappersProto.getDescriptor(), + com.google.type.LatLngProto.getDescriptor(), + }); + internal_static_maps_fleetengine_v1_CreateVehicleRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_maps_fleetengine_v1_CreateVehicleRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_v1_CreateVehicleRequest_descriptor, + new java.lang.String[] { + "Header", "Parent", "VehicleId", "Vehicle", + }); + internal_static_maps_fleetengine_v1_GetVehicleRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_maps_fleetengine_v1_GetVehicleRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_v1_GetVehicleRequest_descriptor, + new java.lang.String[] { + "Header", "Name", "CurrentRouteSegmentVersion", "WaypointsVersion", + }); + internal_static_maps_fleetengine_v1_UpdateVehicleRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_maps_fleetengine_v1_UpdateVehicleRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_v1_UpdateVehicleRequest_descriptor, + new java.lang.String[] { + "Header", "Name", "Vehicle", "UpdateMask", + }); + internal_static_maps_fleetengine_v1_UpdateVehicleAttributesRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_maps_fleetengine_v1_UpdateVehicleAttributesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_v1_UpdateVehicleAttributesRequest_descriptor, + new java.lang.String[] { + "Header", "Name", "Attributes", + }); + internal_static_maps_fleetengine_v1_UpdateVehicleAttributesResponse_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_maps_fleetengine_v1_UpdateVehicleAttributesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_v1_UpdateVehicleAttributesResponse_descriptor, + new java.lang.String[] { + "Attributes", + }); + internal_static_maps_fleetengine_v1_SearchVehiclesRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_maps_fleetengine_v1_SearchVehiclesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_v1_SearchVehiclesRequest_descriptor, + new java.lang.String[] { + "Header", + "Parent", + "PickupPoint", + "DropoffPoint", + "PickupRadiusMeters", + "Count", + "MinimumCapacity", + "TripTypes", + "MaximumStaleness", + "VehicleTypes", + "RequiredAttributes", + "RequiredOneOfAttributes", + "RequiredOneOfAttributeSets", + "OrderBy", + "IncludeBackToBack", + "TripId", + "CurrentTripsPresent", + "Filter", + }); + internal_static_maps_fleetengine_v1_SearchVehiclesResponse_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_maps_fleetengine_v1_SearchVehiclesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_v1_SearchVehiclesResponse_descriptor, + new java.lang.String[] { + "Matches", + }); + internal_static_maps_fleetengine_v1_ListVehiclesRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_maps_fleetengine_v1_ListVehiclesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_v1_ListVehiclesRequest_descriptor, + new java.lang.String[] { + "Header", + "Parent", + "PageSize", + "PageToken", + "MinimumCapacity", + "TripTypes", + "MaximumStaleness", + "VehicleTypeCategories", + "RequiredAttributes", + "RequiredOneOfAttributes", + "RequiredOneOfAttributeSets", + "VehicleState", + "OnTripOnly", + "Filter", + "Viewport", + }); + internal_static_maps_fleetengine_v1_ListVehiclesResponse_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_maps_fleetengine_v1_ListVehiclesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_v1_ListVehiclesResponse_descriptor, + new java.lang.String[] { + "Vehicles", "NextPageToken", "TotalSize", + }); + internal_static_maps_fleetengine_v1_Waypoint_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_maps_fleetengine_v1_Waypoint_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_v1_Waypoint_descriptor, + new java.lang.String[] { + "LatLng", "Eta", + }); + internal_static_maps_fleetengine_v1_VehicleMatch_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_maps_fleetengine_v1_VehicleMatch_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_v1_VehicleMatch_descriptor, + new java.lang.String[] { + "Vehicle", + "VehiclePickupEta", + "VehiclePickupDistanceMeters", + "VehiclePickupStraightLineDistanceMeters", + "VehicleDropoffEta", + "VehiclePickupToDropoffDistanceMeters", + "TripType", + "VehicleTripsWaypoints", + "VehicleMatchType", + "RequestedOrderedBy", + "OrderedBy", + }); + internal_static_maps_fleetengine_v1_VehicleAttributeList_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_maps_fleetengine_v1_VehicleAttributeList_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_v1_VehicleAttributeList_descriptor, + new java.lang.String[] { + "Attributes", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.api.RoutingProto.routing); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.api.RoutingProto.getDescriptor(); + com.google.geo.type.ViewportProto.getDescriptor(); + com.google.maps.fleetengine.v1.FleetEngine.getDescriptor(); + com.google.maps.fleetengine.v1.Headers.getDescriptor(); + com.google.maps.fleetengine.v1.Vehicles.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.WrappersProto.getDescriptor(); + com.google.type.LatLngProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleAttribute.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleAttribute.java new file mode 100644 index 000000000000..80fd6f7f8db8 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleAttribute.java @@ -0,0 +1,1449 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/fleetengine.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * Describes a vehicle attribute as a key-value pair. The "key:value" string
+ * length cannot exceed 256 characters.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.v1.VehicleAttribute} + */ +public final class VehicleAttribute extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.v1.VehicleAttribute) + VehicleAttributeOrBuilder { + private static final long serialVersionUID = 0L; + // Use VehicleAttribute.newBuilder() to construct. + private VehicleAttribute(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VehicleAttribute() { + key_ = ""; + value_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VehicleAttribute(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.FleetEngine + .internal_static_maps_fleetengine_v1_VehicleAttribute_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.FleetEngine + .internal_static_maps_fleetengine_v1_VehicleAttribute_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.VehicleAttribute.class, + com.google.maps.fleetengine.v1.VehicleAttribute.Builder.class); + } + + private int vehicleAttributeValueCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object vehicleAttributeValue_; + + public enum VehicleAttributeValueCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + STRING_VALUE(3), + BOOL_VALUE(4), + NUMBER_VALUE(5), + VEHICLEATTRIBUTEVALUE_NOT_SET(0); + private final int value; + + private VehicleAttributeValueCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static VehicleAttributeValueCase valueOf(int value) { + return forNumber(value); + } + + public static VehicleAttributeValueCase forNumber(int value) { + switch (value) { + case 3: + return STRING_VALUE; + case 4: + return BOOL_VALUE; + case 5: + return NUMBER_VALUE; + case 0: + return VEHICLEATTRIBUTEVALUE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public VehicleAttributeValueCase getVehicleAttributeValueCase() { + return VehicleAttributeValueCase.forNumber(vehicleAttributeValueCase_); + } + + public static final int KEY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object key_ = ""; + /** + * + * + *
+   * The attribute's key. Keys may not contain the colon character (:).
+   * 
+ * + * string key = 1; + * + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + 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(); + key_ = s; + return s; + } + } + /** + * + * + *
+   * The attribute's key. Keys may not contain the colon character (:).
+   * 
+ * + * string key = 1; + * + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object value_ = ""; + /** + * + * + *
+   * The attribute's value.
+   * 
+ * + * string value = 2; + * + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + 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(); + value_ = s; + return s; + } + } + /** + * + * + *
+   * The attribute's value.
+   * 
+ * + * string value = 2; + * + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STRING_VALUE_FIELD_NUMBER = 3; + /** + * + * + *
+   * String typed attribute value.
+   *
+   * Note: This is identical to the `value` field which will eventually be
+   * deprecated. For create or update methods, either field can be used, but
+   * it's strongly recommended to use `string_value`. If both `string_value`
+   * and `value` are set, they must be identical or an error will be thrown.
+   * Both fields are populated in responses.
+   * 
+ * + * string string_value = 3; + * + * @return Whether the stringValue field is set. + */ + public boolean hasStringValue() { + return vehicleAttributeValueCase_ == 3; + } + /** + * + * + *
+   * String typed attribute value.
+   *
+   * Note: This is identical to the `value` field which will eventually be
+   * deprecated. For create or update methods, either field can be used, but
+   * it's strongly recommended to use `string_value`. If both `string_value`
+   * and `value` are set, they must be identical or an error will be thrown.
+   * Both fields are populated in responses.
+   * 
+ * + * string string_value = 3; + * + * @return The stringValue. + */ + public java.lang.String getStringValue() { + java.lang.Object ref = ""; + if (vehicleAttributeValueCase_ == 3) { + ref = vehicleAttributeValue_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (vehicleAttributeValueCase_ == 3) { + vehicleAttributeValue_ = s; + } + return s; + } + } + /** + * + * + *
+   * String typed attribute value.
+   *
+   * Note: This is identical to the `value` field which will eventually be
+   * deprecated. For create or update methods, either field can be used, but
+   * it's strongly recommended to use `string_value`. If both `string_value`
+   * and `value` are set, they must be identical or an error will be thrown.
+   * Both fields are populated in responses.
+   * 
+ * + * string string_value = 3; + * + * @return The bytes for stringValue. + */ + public com.google.protobuf.ByteString getStringValueBytes() { + java.lang.Object ref = ""; + if (vehicleAttributeValueCase_ == 3) { + ref = vehicleAttributeValue_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (vehicleAttributeValueCase_ == 3) { + vehicleAttributeValue_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BOOL_VALUE_FIELD_NUMBER = 4; + /** + * + * + *
+   * Boolean typed attribute value.
+   * 
+ * + * bool bool_value = 4; + * + * @return Whether the boolValue field is set. + */ + @java.lang.Override + public boolean hasBoolValue() { + return vehicleAttributeValueCase_ == 4; + } + /** + * + * + *
+   * Boolean typed attribute value.
+   * 
+ * + * bool bool_value = 4; + * + * @return The boolValue. + */ + @java.lang.Override + public boolean getBoolValue() { + if (vehicleAttributeValueCase_ == 4) { + return (java.lang.Boolean) vehicleAttributeValue_; + } + return false; + } + + public static final int NUMBER_VALUE_FIELD_NUMBER = 5; + /** + * + * + *
+   * Double typed attribute value.
+   * 
+ * + * double number_value = 5; + * + * @return Whether the numberValue field is set. + */ + @java.lang.Override + public boolean hasNumberValue() { + return vehicleAttributeValueCase_ == 5; + } + /** + * + * + *
+   * Double typed attribute value.
+   * 
+ * + * double number_value = 5; + * + * @return The numberValue. + */ + @java.lang.Override + public double getNumberValue() { + if (vehicleAttributeValueCase_ == 5) { + return (java.lang.Double) vehicleAttributeValue_; + } + return 0D; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); + } + if (vehicleAttributeValueCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, vehicleAttributeValue_); + } + if (vehicleAttributeValueCase_ == 4) { + output.writeBool(4, (boolean) ((java.lang.Boolean) vehicleAttributeValue_)); + } + if (vehicleAttributeValueCase_ == 5) { + output.writeDouble(5, (double) ((java.lang.Double) vehicleAttributeValue_)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); + } + if (vehicleAttributeValueCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, vehicleAttributeValue_); + } + if (vehicleAttributeValueCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 4, (boolean) ((java.lang.Boolean) vehicleAttributeValue_)); + } + if (vehicleAttributeValueCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize( + 5, (double) ((java.lang.Double) vehicleAttributeValue_)); + } + 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.fleetengine.v1.VehicleAttribute)) { + return super.equals(obj); + } + com.google.maps.fleetengine.v1.VehicleAttribute other = + (com.google.maps.fleetengine.v1.VehicleAttribute) obj; + + if (!getKey().equals(other.getKey())) return false; + if (!getValue().equals(other.getValue())) return false; + if (!getVehicleAttributeValueCase().equals(other.getVehicleAttributeValueCase())) return false; + switch (vehicleAttributeValueCase_) { + case 3: + if (!getStringValue().equals(other.getStringValue())) return false; + break; + case 4: + if (getBoolValue() != other.getBoolValue()) return false; + break; + case 5: + if (java.lang.Double.doubleToLongBits(getNumberValue()) + != java.lang.Double.doubleToLongBits(other.getNumberValue())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + switch (vehicleAttributeValueCase_) { + case 3: + hash = (37 * hash) + STRING_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getStringValue().hashCode(); + break; + case 4: + hash = (37 * hash) + BOOL_VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBoolValue()); + break; + case 5: + hash = (37 * hash) + NUMBER_VALUE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getNumberValue())); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.fleetengine.v1.VehicleAttribute parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.VehicleAttribute 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.fleetengine.v1.VehicleAttribute parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.VehicleAttribute 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.fleetengine.v1.VehicleAttribute parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.VehicleAttribute parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.VehicleAttribute parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.VehicleAttribute parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.VehicleAttribute parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.VehicleAttribute parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.VehicleAttribute parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.VehicleAttribute parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.fleetengine.v1.VehicleAttribute prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Describes a vehicle attribute as a key-value pair. The "key:value" string
+   * length cannot exceed 256 characters.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.v1.VehicleAttribute} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.v1.VehicleAttribute) + com.google.maps.fleetengine.v1.VehicleAttributeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.FleetEngine + .internal_static_maps_fleetengine_v1_VehicleAttribute_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.FleetEngine + .internal_static_maps_fleetengine_v1_VehicleAttribute_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.VehicleAttribute.class, + com.google.maps.fleetengine.v1.VehicleAttribute.Builder.class); + } + + // Construct using com.google.maps.fleetengine.v1.VehicleAttribute.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + key_ = ""; + value_ = ""; + vehicleAttributeValueCase_ = 0; + vehicleAttributeValue_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.fleetengine.v1.FleetEngine + .internal_static_maps_fleetengine_v1_VehicleAttribute_descriptor; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleAttribute getDefaultInstanceForType() { + return com.google.maps.fleetengine.v1.VehicleAttribute.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleAttribute build() { + com.google.maps.fleetengine.v1.VehicleAttribute result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleAttribute buildPartial() { + com.google.maps.fleetengine.v1.VehicleAttribute result = + new com.google.maps.fleetengine.v1.VehicleAttribute(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.fleetengine.v1.VehicleAttribute result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.key_ = key_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.value_ = value_; + } + } + + private void buildPartialOneofs(com.google.maps.fleetengine.v1.VehicleAttribute result) { + result.vehicleAttributeValueCase_ = vehicleAttributeValueCase_; + result.vehicleAttributeValue_ = this.vehicleAttributeValue_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.fleetengine.v1.VehicleAttribute) { + return mergeFrom((com.google.maps.fleetengine.v1.VehicleAttribute) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.fleetengine.v1.VehicleAttribute other) { + if (other == com.google.maps.fleetengine.v1.VehicleAttribute.getDefaultInstance()) + return this; + if (!other.getKey().isEmpty()) { + key_ = other.key_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getValue().isEmpty()) { + value_ = other.value_; + bitField0_ |= 0x00000002; + onChanged(); + } + switch (other.getVehicleAttributeValueCase()) { + case STRING_VALUE: + { + vehicleAttributeValueCase_ = 3; + vehicleAttributeValue_ = other.vehicleAttributeValue_; + onChanged(); + break; + } + case BOOL_VALUE: + { + setBoolValue(other.getBoolValue()); + break; + } + case NUMBER_VALUE: + { + setNumberValue(other.getNumberValue()); + break; + } + case VEHICLEATTRIBUTEVALUE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + value_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + vehicleAttributeValueCase_ = 3; + vehicleAttributeValue_ = s; + break; + } // case 26 + case 32: + { + vehicleAttributeValue_ = input.readBool(); + vehicleAttributeValueCase_ = 4; + break; + } // case 32 + case 41: + { + vehicleAttributeValue_ = input.readDouble(); + vehicleAttributeValueCase_ = 5; + break; + } // case 41 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int vehicleAttributeValueCase_ = 0; + private java.lang.Object vehicleAttributeValue_; + + public VehicleAttributeValueCase getVehicleAttributeValueCase() { + return VehicleAttributeValueCase.forNumber(vehicleAttributeValueCase_); + } + + public Builder clearVehicleAttributeValue() { + vehicleAttributeValueCase_ = 0; + vehicleAttributeValue_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object key_ = ""; + /** + * + * + *
+     * The attribute's key. Keys may not contain the colon character (:).
+     * 
+ * + * string key = 1; + * + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The attribute's key. Keys may not contain the colon character (:).
+     * 
+ * + * string key = 1; + * + * @return The bytes for key. + */ + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The attribute's key. Keys may not contain the colon character (:).
+     * 
+ * + * string key = 1; + * + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The attribute's key. Keys may not contain the colon character (:).
+     * 
+ * + * string key = 1; + * + * @return This builder for chaining. + */ + public Builder clearKey() { + key_ = getDefaultInstance().getKey(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The attribute's key. Keys may not contain the colon character (:).
+     * 
+ * + * string key = 1; + * + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + /** + * + * + *
+     * The attribute's value.
+     * 
+ * + * string value = 2; + * + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The attribute's value.
+     * 
+ * + * string value = 2; + * + * @return The bytes for value. + */ + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The attribute's value.
+     * 
+ * + * string value = 2; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The attribute's value.
+     * 
+ * + * string value = 2; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + value_ = getDefaultInstance().getValue(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The attribute's value.
+     * 
+ * + * string value = 2; + * + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * String typed attribute value.
+     *
+     * Note: This is identical to the `value` field which will eventually be
+     * deprecated. For create or update methods, either field can be used, but
+     * it's strongly recommended to use `string_value`. If both `string_value`
+     * and `value` are set, they must be identical or an error will be thrown.
+     * Both fields are populated in responses.
+     * 
+ * + * string string_value = 3; + * + * @return Whether the stringValue field is set. + */ + @java.lang.Override + public boolean hasStringValue() { + return vehicleAttributeValueCase_ == 3; + } + /** + * + * + *
+     * String typed attribute value.
+     *
+     * Note: This is identical to the `value` field which will eventually be
+     * deprecated. For create or update methods, either field can be used, but
+     * it's strongly recommended to use `string_value`. If both `string_value`
+     * and `value` are set, they must be identical or an error will be thrown.
+     * Both fields are populated in responses.
+     * 
+ * + * string string_value = 3; + * + * @return The stringValue. + */ + @java.lang.Override + public java.lang.String getStringValue() { + java.lang.Object ref = ""; + if (vehicleAttributeValueCase_ == 3) { + ref = vehicleAttributeValue_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (vehicleAttributeValueCase_ == 3) { + vehicleAttributeValue_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * String typed attribute value.
+     *
+     * Note: This is identical to the `value` field which will eventually be
+     * deprecated. For create or update methods, either field can be used, but
+     * it's strongly recommended to use `string_value`. If both `string_value`
+     * and `value` are set, they must be identical or an error will be thrown.
+     * Both fields are populated in responses.
+     * 
+ * + * string string_value = 3; + * + * @return The bytes for stringValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStringValueBytes() { + java.lang.Object ref = ""; + if (vehicleAttributeValueCase_ == 3) { + ref = vehicleAttributeValue_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (vehicleAttributeValueCase_ == 3) { + vehicleAttributeValue_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * String typed attribute value.
+     *
+     * Note: This is identical to the `value` field which will eventually be
+     * deprecated. For create or update methods, either field can be used, but
+     * it's strongly recommended to use `string_value`. If both `string_value`
+     * and `value` are set, they must be identical or an error will be thrown.
+     * Both fields are populated in responses.
+     * 
+ * + * string string_value = 3; + * + * @param value The stringValue to set. + * @return This builder for chaining. + */ + public Builder setStringValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + vehicleAttributeValueCase_ = 3; + vehicleAttributeValue_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * String typed attribute value.
+     *
+     * Note: This is identical to the `value` field which will eventually be
+     * deprecated. For create or update methods, either field can be used, but
+     * it's strongly recommended to use `string_value`. If both `string_value`
+     * and `value` are set, they must be identical or an error will be thrown.
+     * Both fields are populated in responses.
+     * 
+ * + * string string_value = 3; + * + * @return This builder for chaining. + */ + public Builder clearStringValue() { + if (vehicleAttributeValueCase_ == 3) { + vehicleAttributeValueCase_ = 0; + vehicleAttributeValue_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * String typed attribute value.
+     *
+     * Note: This is identical to the `value` field which will eventually be
+     * deprecated. For create or update methods, either field can be used, but
+     * it's strongly recommended to use `string_value`. If both `string_value`
+     * and `value` are set, they must be identical or an error will be thrown.
+     * Both fields are populated in responses.
+     * 
+ * + * string string_value = 3; + * + * @param value The bytes for stringValue to set. + * @return This builder for chaining. + */ + public Builder setStringValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + vehicleAttributeValueCase_ = 3; + vehicleAttributeValue_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Boolean typed attribute value.
+     * 
+ * + * bool bool_value = 4; + * + * @return Whether the boolValue field is set. + */ + public boolean hasBoolValue() { + return vehicleAttributeValueCase_ == 4; + } + /** + * + * + *
+     * Boolean typed attribute value.
+     * 
+ * + * bool bool_value = 4; + * + * @return The boolValue. + */ + public boolean getBoolValue() { + if (vehicleAttributeValueCase_ == 4) { + return (java.lang.Boolean) vehicleAttributeValue_; + } + return false; + } + /** + * + * + *
+     * Boolean typed attribute value.
+     * 
+ * + * bool bool_value = 4; + * + * @param value The boolValue to set. + * @return This builder for chaining. + */ + public Builder setBoolValue(boolean value) { + + vehicleAttributeValueCase_ = 4; + vehicleAttributeValue_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Boolean typed attribute value.
+     * 
+ * + * bool bool_value = 4; + * + * @return This builder for chaining. + */ + public Builder clearBoolValue() { + if (vehicleAttributeValueCase_ == 4) { + vehicleAttributeValueCase_ = 0; + vehicleAttributeValue_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Double typed attribute value.
+     * 
+ * + * double number_value = 5; + * + * @return Whether the numberValue field is set. + */ + public boolean hasNumberValue() { + return vehicleAttributeValueCase_ == 5; + } + /** + * + * + *
+     * Double typed attribute value.
+     * 
+ * + * double number_value = 5; + * + * @return The numberValue. + */ + public double getNumberValue() { + if (vehicleAttributeValueCase_ == 5) { + return (java.lang.Double) vehicleAttributeValue_; + } + return 0D; + } + /** + * + * + *
+     * Double typed attribute value.
+     * 
+ * + * double number_value = 5; + * + * @param value The numberValue to set. + * @return This builder for chaining. + */ + public Builder setNumberValue(double value) { + + vehicleAttributeValueCase_ = 5; + vehicleAttributeValue_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Double typed attribute value.
+     * 
+ * + * double number_value = 5; + * + * @return This builder for chaining. + */ + public Builder clearNumberValue() { + if (vehicleAttributeValueCase_ == 5) { + vehicleAttributeValueCase_ = 0; + vehicleAttributeValue_ = null; + onChanged(); + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:maps.fleetengine.v1.VehicleAttribute) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.v1.VehicleAttribute) + private static final com.google.maps.fleetengine.v1.VehicleAttribute DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.fleetengine.v1.VehicleAttribute(); + } + + public static com.google.maps.fleetengine.v1.VehicleAttribute getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VehicleAttribute 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.fleetengine.v1.VehicleAttribute getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleAttributeList.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleAttributeList.java new file mode 100644 index 000000000000..566e172ad487 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleAttributeList.java @@ -0,0 +1,941 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicle_api.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * A list-of-lists datatype for vehicle attributes.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.v1.VehicleAttributeList} + */ +public final class VehicleAttributeList extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.v1.VehicleAttributeList) + VehicleAttributeListOrBuilder { + private static final long serialVersionUID = 0L; + // Use VehicleAttributeList.newBuilder() to construct. + private VehicleAttributeList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VehicleAttributeList() { + attributes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VehicleAttributeList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_VehicleAttributeList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_VehicleAttributeList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.VehicleAttributeList.class, + com.google.maps.fleetengine.v1.VehicleAttributeList.Builder.class); + } + + public static final int ATTRIBUTES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List attributes_; + /** + * + * + *
+   * A list of attributes in this collection.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1; + */ + @java.lang.Override + public java.util.List getAttributesList() { + return attributes_; + } + /** + * + * + *
+   * A list of attributes in this collection.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1; + */ + @java.lang.Override + public java.util.List + getAttributesOrBuilderList() { + return attributes_; + } + /** + * + * + *
+   * A list of attributes in this collection.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1; + */ + @java.lang.Override + public int getAttributesCount() { + return attributes_.size(); + } + /** + * + * + *
+   * A list of attributes in this collection.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleAttribute getAttributes(int index) { + return attributes_.get(index); + } + /** + * + * + *
+   * A list of attributes in this collection.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleAttributeOrBuilder getAttributesOrBuilder( + int index) { + return attributes_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < attributes_.size(); i++) { + output.writeMessage(1, attributes_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < attributes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, attributes_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.maps.fleetengine.v1.VehicleAttributeList)) { + return super.equals(obj); + } + com.google.maps.fleetengine.v1.VehicleAttributeList other = + (com.google.maps.fleetengine.v1.VehicleAttributeList) obj; + + if (!getAttributesList().equals(other.getAttributesList())) 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 (getAttributesCount() > 0) { + hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getAttributesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.fleetengine.v1.VehicleAttributeList parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.VehicleAttributeList 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.fleetengine.v1.VehicleAttributeList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.VehicleAttributeList 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.fleetengine.v1.VehicleAttributeList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.VehicleAttributeList parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.VehicleAttributeList parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.VehicleAttributeList parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.VehicleAttributeList parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.VehicleAttributeList parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.VehicleAttributeList parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.VehicleAttributeList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.fleetengine.v1.VehicleAttributeList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A list-of-lists datatype for vehicle attributes.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.v1.VehicleAttributeList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.v1.VehicleAttributeList) + com.google.maps.fleetengine.v1.VehicleAttributeListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_VehicleAttributeList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_VehicleAttributeList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.VehicleAttributeList.class, + com.google.maps.fleetengine.v1.VehicleAttributeList.Builder.class); + } + + // Construct using com.google.maps.fleetengine.v1.VehicleAttributeList.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (attributesBuilder_ == null) { + attributes_ = java.util.Collections.emptyList(); + } else { + attributes_ = null; + attributesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_VehicleAttributeList_descriptor; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleAttributeList getDefaultInstanceForType() { + return com.google.maps.fleetengine.v1.VehicleAttributeList.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleAttributeList build() { + com.google.maps.fleetengine.v1.VehicleAttributeList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleAttributeList buildPartial() { + com.google.maps.fleetengine.v1.VehicleAttributeList result = + new com.google.maps.fleetengine.v1.VehicleAttributeList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.maps.fleetengine.v1.VehicleAttributeList result) { + if (attributesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + attributes_ = java.util.Collections.unmodifiableList(attributes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.attributes_ = attributes_; + } else { + result.attributes_ = attributesBuilder_.build(); + } + } + + private void buildPartial0(com.google.maps.fleetengine.v1.VehicleAttributeList result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.fleetengine.v1.VehicleAttributeList) { + return mergeFrom((com.google.maps.fleetengine.v1.VehicleAttributeList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.fleetengine.v1.VehicleAttributeList other) { + if (other == com.google.maps.fleetengine.v1.VehicleAttributeList.getDefaultInstance()) + return this; + if (attributesBuilder_ == null) { + if (!other.attributes_.isEmpty()) { + if (attributes_.isEmpty()) { + attributes_ = other.attributes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAttributesIsMutable(); + attributes_.addAll(other.attributes_); + } + onChanged(); + } + } else { + if (!other.attributes_.isEmpty()) { + if (attributesBuilder_.isEmpty()) { + attributesBuilder_.dispose(); + attributesBuilder_ = null; + attributes_ = other.attributes_; + bitField0_ = (bitField0_ & ~0x00000001); + attributesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAttributesFieldBuilder() + : null; + } else { + attributesBuilder_.addAllMessages(other.attributes_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.maps.fleetengine.v1.VehicleAttribute m = + input.readMessage( + com.google.maps.fleetengine.v1.VehicleAttribute.parser(), + extensionRegistry); + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.add(m); + } else { + attributesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List attributes_ = + java.util.Collections.emptyList(); + + private void ensureAttributesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + attributes_ = + new java.util.ArrayList(attributes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.VehicleAttribute, + com.google.maps.fleetengine.v1.VehicleAttribute.Builder, + com.google.maps.fleetengine.v1.VehicleAttributeOrBuilder> + attributesBuilder_; + + /** + * + * + *
+     * A list of attributes in this collection.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1; + */ + public java.util.List getAttributesList() { + if (attributesBuilder_ == null) { + return java.util.Collections.unmodifiableList(attributes_); + } else { + return attributesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of attributes in this collection.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1; + */ + public int getAttributesCount() { + if (attributesBuilder_ == null) { + return attributes_.size(); + } else { + return attributesBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of attributes in this collection.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1; + */ + public com.google.maps.fleetengine.v1.VehicleAttribute getAttributes(int index) { + if (attributesBuilder_ == null) { + return attributes_.get(index); + } else { + return attributesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of attributes in this collection.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1; + */ + public Builder setAttributes(int index, com.google.maps.fleetengine.v1.VehicleAttribute value) { + if (attributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributesIsMutable(); + attributes_.set(index, value); + onChanged(); + } else { + attributesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of attributes in this collection.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1; + */ + public Builder setAttributes( + int index, com.google.maps.fleetengine.v1.VehicleAttribute.Builder builderForValue) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.set(index, builderForValue.build()); + onChanged(); + } else { + attributesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of attributes in this collection.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1; + */ + public Builder addAttributes(com.google.maps.fleetengine.v1.VehicleAttribute value) { + if (attributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributesIsMutable(); + attributes_.add(value); + onChanged(); + } else { + attributesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of attributes in this collection.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1; + */ + public Builder addAttributes(int index, com.google.maps.fleetengine.v1.VehicleAttribute value) { + if (attributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributesIsMutable(); + attributes_.add(index, value); + onChanged(); + } else { + attributesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of attributes in this collection.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1; + */ + public Builder addAttributes( + com.google.maps.fleetengine.v1.VehicleAttribute.Builder builderForValue) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.add(builderForValue.build()); + onChanged(); + } else { + attributesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of attributes in this collection.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1; + */ + public Builder addAttributes( + int index, com.google.maps.fleetengine.v1.VehicleAttribute.Builder builderForValue) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.add(index, builderForValue.build()); + onChanged(); + } else { + attributesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of attributes in this collection.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1; + */ + public Builder addAllAttributes( + java.lang.Iterable values) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, attributes_); + onChanged(); + } else { + attributesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of attributes in this collection.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1; + */ + public Builder clearAttributes() { + if (attributesBuilder_ == null) { + attributes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + attributesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of attributes in this collection.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1; + */ + public Builder removeAttributes(int index) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.remove(index); + onChanged(); + } else { + attributesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of attributes in this collection.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1; + */ + public com.google.maps.fleetengine.v1.VehicleAttribute.Builder getAttributesBuilder(int index) { + return getAttributesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of attributes in this collection.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1; + */ + public com.google.maps.fleetengine.v1.VehicleAttributeOrBuilder getAttributesOrBuilder( + int index) { + if (attributesBuilder_ == null) { + return attributes_.get(index); + } else { + return attributesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of attributes in this collection.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1; + */ + public java.util.List + getAttributesOrBuilderList() { + if (attributesBuilder_ != null) { + return attributesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(attributes_); + } + } + /** + * + * + *
+     * A list of attributes in this collection.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1; + */ + public com.google.maps.fleetengine.v1.VehicleAttribute.Builder addAttributesBuilder() { + return getAttributesFieldBuilder() + .addBuilder(com.google.maps.fleetengine.v1.VehicleAttribute.getDefaultInstance()); + } + /** + * + * + *
+     * A list of attributes in this collection.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1; + */ + public com.google.maps.fleetengine.v1.VehicleAttribute.Builder addAttributesBuilder(int index) { + return getAttributesFieldBuilder() + .addBuilder(index, com.google.maps.fleetengine.v1.VehicleAttribute.getDefaultInstance()); + } + /** + * + * + *
+     * A list of attributes in this collection.
+     * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1; + */ + public java.util.List + getAttributesBuilderList() { + return getAttributesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.VehicleAttribute, + com.google.maps.fleetengine.v1.VehicleAttribute.Builder, + com.google.maps.fleetengine.v1.VehicleAttributeOrBuilder> + getAttributesFieldBuilder() { + if (attributesBuilder_ == null) { + attributesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.VehicleAttribute, + com.google.maps.fleetengine.v1.VehicleAttribute.Builder, + com.google.maps.fleetengine.v1.VehicleAttributeOrBuilder>( + attributes_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + attributes_ = null; + } + return attributesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:maps.fleetengine.v1.VehicleAttributeList) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.v1.VehicleAttributeList) + private static final com.google.maps.fleetengine.v1.VehicleAttributeList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.fleetengine.v1.VehicleAttributeList(); + } + + public static com.google.maps.fleetengine.v1.VehicleAttributeList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VehicleAttributeList 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.fleetengine.v1.VehicleAttributeList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleAttributeListOrBuilder.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleAttributeListOrBuilder.java new file mode 100644 index 000000000000..5eaadf9e677a --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleAttributeListOrBuilder.java @@ -0,0 +1,78 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicle_api.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public interface VehicleAttributeListOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.v1.VehicleAttributeList) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of attributes in this collection.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1; + */ + java.util.List getAttributesList(); + /** + * + * + *
+   * A list of attributes in this collection.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1; + */ + com.google.maps.fleetengine.v1.VehicleAttribute getAttributes(int index); + /** + * + * + *
+   * A list of attributes in this collection.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1; + */ + int getAttributesCount(); + /** + * + * + *
+   * A list of attributes in this collection.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1; + */ + java.util.List + getAttributesOrBuilderList(); + /** + * + * + *
+   * A list of attributes in this collection.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 1; + */ + com.google.maps.fleetengine.v1.VehicleAttributeOrBuilder getAttributesOrBuilder(int index); +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleAttributeOrBuilder.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleAttributeOrBuilder.java new file mode 100644 index 000000000000..4d19dba3be15 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleAttributeOrBuilder.java @@ -0,0 +1,184 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/fleetengine.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public interface VehicleAttributeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.v1.VehicleAttribute) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The attribute's key. Keys may not contain the colon character (:).
+   * 
+ * + * string key = 1; + * + * @return The key. + */ + java.lang.String getKey(); + /** + * + * + *
+   * The attribute's key. Keys may not contain the colon character (:).
+   * 
+ * + * string key = 1; + * + * @return The bytes for key. + */ + com.google.protobuf.ByteString getKeyBytes(); + + /** + * + * + *
+   * The attribute's value.
+   * 
+ * + * string value = 2; + * + * @return The value. + */ + java.lang.String getValue(); + /** + * + * + *
+   * The attribute's value.
+   * 
+ * + * string value = 2; + * + * @return The bytes for value. + */ + com.google.protobuf.ByteString getValueBytes(); + + /** + * + * + *
+   * String typed attribute value.
+   *
+   * Note: This is identical to the `value` field which will eventually be
+   * deprecated. For create or update methods, either field can be used, but
+   * it's strongly recommended to use `string_value`. If both `string_value`
+   * and `value` are set, they must be identical or an error will be thrown.
+   * Both fields are populated in responses.
+   * 
+ * + * string string_value = 3; + * + * @return Whether the stringValue field is set. + */ + boolean hasStringValue(); + /** + * + * + *
+   * String typed attribute value.
+   *
+   * Note: This is identical to the `value` field which will eventually be
+   * deprecated. For create or update methods, either field can be used, but
+   * it's strongly recommended to use `string_value`. If both `string_value`
+   * and `value` are set, they must be identical or an error will be thrown.
+   * Both fields are populated in responses.
+   * 
+ * + * string string_value = 3; + * + * @return The stringValue. + */ + java.lang.String getStringValue(); + /** + * + * + *
+   * String typed attribute value.
+   *
+   * Note: This is identical to the `value` field which will eventually be
+   * deprecated. For create or update methods, either field can be used, but
+   * it's strongly recommended to use `string_value`. If both `string_value`
+   * and `value` are set, they must be identical or an error will be thrown.
+   * Both fields are populated in responses.
+   * 
+ * + * string string_value = 3; + * + * @return The bytes for stringValue. + */ + com.google.protobuf.ByteString getStringValueBytes(); + + /** + * + * + *
+   * Boolean typed attribute value.
+   * 
+ * + * bool bool_value = 4; + * + * @return Whether the boolValue field is set. + */ + boolean hasBoolValue(); + /** + * + * + *
+   * Boolean typed attribute value.
+   * 
+ * + * bool bool_value = 4; + * + * @return The boolValue. + */ + boolean getBoolValue(); + + /** + * + * + *
+   * Double typed attribute value.
+   * 
+ * + * double number_value = 5; + * + * @return Whether the numberValue field is set. + */ + boolean hasNumberValue(); + /** + * + * + *
+   * Double typed attribute value.
+   * 
+ * + * double number_value = 5; + * + * @return The numberValue. + */ + double getNumberValue(); + + com.google.maps.fleetengine.v1.VehicleAttribute.VehicleAttributeValueCase + getVehicleAttributeValueCase(); +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleLocation.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleLocation.java new file mode 100644 index 000000000000..7155260431b8 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleLocation.java @@ -0,0 +1,7751 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/fleetengine.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * The location, speed, and heading of a vehicle at a point in time.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.v1.VehicleLocation} + */ +public final class VehicleLocation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.v1.VehicleLocation) + VehicleLocationOrBuilder { + private static final long serialVersionUID = 0L; + // Use VehicleLocation.newBuilder() to construct. + private VehicleLocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VehicleLocation() { + locationSensor_ = 0; + rawLocationSensor_ = 0; + supplementalLocationSensor_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VehicleLocation(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.FleetEngine + .internal_static_maps_fleetengine_v1_VehicleLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.FleetEngine + .internal_static_maps_fleetengine_v1_VehicleLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.VehicleLocation.class, + com.google.maps.fleetengine.v1.VehicleLocation.Builder.class); + } + + private int bitField0_; + public static final int LOCATION_FIELD_NUMBER = 1; + private com.google.type.LatLng location_; + /** + * + * + *
+   * The location of the vehicle.
+   * When it is sent to Fleet Engine, the vehicle's location is a GPS location.
+   * When you receive it in a response, the vehicle's location can be either a
+   * GPS location, a supplemental location, or some other estimated location.
+   * The source is specified in `location_sensor`.
+   * 
+ * + * .google.type.LatLng location = 1; + * + * @return Whether the location field is set. + */ + @java.lang.Override + public boolean hasLocation() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The location of the vehicle.
+   * When it is sent to Fleet Engine, the vehicle's location is a GPS location.
+   * When you receive it in a response, the vehicle's location can be either a
+   * GPS location, a supplemental location, or some other estimated location.
+   * The source is specified in `location_sensor`.
+   * 
+ * + * .google.type.LatLng location = 1; + * + * @return The location. + */ + @java.lang.Override + public com.google.type.LatLng getLocation() { + return location_ == null ? com.google.type.LatLng.getDefaultInstance() : location_; + } + /** + * + * + *
+   * The location of the vehicle.
+   * When it is sent to Fleet Engine, the vehicle's location is a GPS location.
+   * When you receive it in a response, the vehicle's location can be either a
+   * GPS location, a supplemental location, or some other estimated location.
+   * The source is specified in `location_sensor`.
+   * 
+ * + * .google.type.LatLng location = 1; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getLocationOrBuilder() { + return location_ == null ? com.google.type.LatLng.getDefaultInstance() : location_; + } + + public static final int HORIZONTAL_ACCURACY_FIELD_NUMBER = 8; + private com.google.protobuf.DoubleValue horizontalAccuracy_; + /** + * + * + *
+   * Deprecated: Use `latlng_accuracy` instead.
+   * 
+ * + * .google.protobuf.DoubleValue horizontal_accuracy = 8 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.VehicleLocation.horizontal_accuracy is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=207 + * @return Whether the horizontalAccuracy field is set. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean hasHorizontalAccuracy() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Deprecated: Use `latlng_accuracy` instead.
+   * 
+ * + * .google.protobuf.DoubleValue horizontal_accuracy = 8 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.VehicleLocation.horizontal_accuracy is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=207 + * @return The horizontalAccuracy. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.DoubleValue getHorizontalAccuracy() { + return horizontalAccuracy_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : horizontalAccuracy_; + } + /** + * + * + *
+   * Deprecated: Use `latlng_accuracy` instead.
+   * 
+ * + * .google.protobuf.DoubleValue horizontal_accuracy = 8 [deprecated = true]; + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.DoubleValueOrBuilder getHorizontalAccuracyOrBuilder() { + return horizontalAccuracy_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : horizontalAccuracy_; + } + + public static final int LATLNG_ACCURACY_FIELD_NUMBER = 22; + private com.google.protobuf.DoubleValue latlngAccuracy_; + /** + * + * + *
+   * Accuracy of `location` in meters as a radius.
+   * 
+ * + * .google.protobuf.DoubleValue latlng_accuracy = 22; + * + * @return Whether the latlngAccuracy field is set. + */ + @java.lang.Override + public boolean hasLatlngAccuracy() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Accuracy of `location` in meters as a radius.
+   * 
+ * + * .google.protobuf.DoubleValue latlng_accuracy = 22; + * + * @return The latlngAccuracy. + */ + @java.lang.Override + public com.google.protobuf.DoubleValue getLatlngAccuracy() { + return latlngAccuracy_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : latlngAccuracy_; + } + /** + * + * + *
+   * Accuracy of `location` in meters as a radius.
+   * 
+ * + * .google.protobuf.DoubleValue latlng_accuracy = 22; + */ + @java.lang.Override + public com.google.protobuf.DoubleValueOrBuilder getLatlngAccuracyOrBuilder() { + return latlngAccuracy_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : latlngAccuracy_; + } + + public static final int HEADING_FIELD_NUMBER = 2; + private com.google.protobuf.Int32Value heading_; + /** + * + * + *
+   * Direction the vehicle is moving in degrees.  0 represents North.
+   * The valid range is [0,360).
+   * 
+ * + * .google.protobuf.Int32Value heading = 2; + * + * @return Whether the heading field is set. + */ + @java.lang.Override + public boolean hasHeading() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * Direction the vehicle is moving in degrees.  0 represents North.
+   * The valid range is [0,360).
+   * 
+ * + * .google.protobuf.Int32Value heading = 2; + * + * @return The heading. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getHeading() { + return heading_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : heading_; + } + /** + * + * + *
+   * Direction the vehicle is moving in degrees.  0 represents North.
+   * The valid range is [0,360).
+   * 
+ * + * .google.protobuf.Int32Value heading = 2; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getHeadingOrBuilder() { + return heading_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : heading_; + } + + public static final int BEARING_ACCURACY_FIELD_NUMBER = 10; + private com.google.protobuf.DoubleValue bearingAccuracy_; + /** + * + * + *
+   * Deprecated: Use `heading_accuracy` instead.
+   * 
+ * + * .google.protobuf.DoubleValue bearing_accuracy = 10 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.VehicleLocation.bearing_accuracy is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=217 + * @return Whether the bearingAccuracy field is set. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean hasBearingAccuracy() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+   * Deprecated: Use `heading_accuracy` instead.
+   * 
+ * + * .google.protobuf.DoubleValue bearing_accuracy = 10 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.VehicleLocation.bearing_accuracy is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=217 + * @return The bearingAccuracy. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.DoubleValue getBearingAccuracy() { + return bearingAccuracy_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : bearingAccuracy_; + } + /** + * + * + *
+   * Deprecated: Use `heading_accuracy` instead.
+   * 
+ * + * .google.protobuf.DoubleValue bearing_accuracy = 10 [deprecated = true]; + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.DoubleValueOrBuilder getBearingAccuracyOrBuilder() { + return bearingAccuracy_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : bearingAccuracy_; + } + + public static final int HEADING_ACCURACY_FIELD_NUMBER = 23; + private com.google.protobuf.DoubleValue headingAccuracy_; + /** + * + * + *
+   * Accuracy of `heading` in degrees.
+   * 
+ * + * .google.protobuf.DoubleValue heading_accuracy = 23; + * + * @return Whether the headingAccuracy field is set. + */ + @java.lang.Override + public boolean hasHeadingAccuracy() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+   * Accuracy of `heading` in degrees.
+   * 
+ * + * .google.protobuf.DoubleValue heading_accuracy = 23; + * + * @return The headingAccuracy. + */ + @java.lang.Override + public com.google.protobuf.DoubleValue getHeadingAccuracy() { + return headingAccuracy_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : headingAccuracy_; + } + /** + * + * + *
+   * Accuracy of `heading` in degrees.
+   * 
+ * + * .google.protobuf.DoubleValue heading_accuracy = 23; + */ + @java.lang.Override + public com.google.protobuf.DoubleValueOrBuilder getHeadingAccuracyOrBuilder() { + return headingAccuracy_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : headingAccuracy_; + } + + public static final int ALTITUDE_FIELD_NUMBER = 5; + private com.google.protobuf.DoubleValue altitude_; + /** + * + * + *
+   * Altitude in meters above WGS84.
+   * 
+ * + * .google.protobuf.DoubleValue altitude = 5; + * + * @return Whether the altitude field is set. + */ + @java.lang.Override + public boolean hasAltitude() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+   * Altitude in meters above WGS84.
+   * 
+ * + * .google.protobuf.DoubleValue altitude = 5; + * + * @return The altitude. + */ + @java.lang.Override + public com.google.protobuf.DoubleValue getAltitude() { + return altitude_ == null ? com.google.protobuf.DoubleValue.getDefaultInstance() : altitude_; + } + /** + * + * + *
+   * Altitude in meters above WGS84.
+   * 
+ * + * .google.protobuf.DoubleValue altitude = 5; + */ + @java.lang.Override + public com.google.protobuf.DoubleValueOrBuilder getAltitudeOrBuilder() { + return altitude_ == null ? com.google.protobuf.DoubleValue.getDefaultInstance() : altitude_; + } + + public static final int VERTICAL_ACCURACY_FIELD_NUMBER = 9; + private com.google.protobuf.DoubleValue verticalAccuracy_; + /** + * + * + *
+   * Deprecated: Use `altitude_accuracy` instead.
+   * 
+ * + * .google.protobuf.DoubleValue vertical_accuracy = 9 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.VehicleLocation.vertical_accuracy is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=226 + * @return Whether the verticalAccuracy field is set. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean hasVerticalAccuracy() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+   * Deprecated: Use `altitude_accuracy` instead.
+   * 
+ * + * .google.protobuf.DoubleValue vertical_accuracy = 9 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.VehicleLocation.vertical_accuracy is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=226 + * @return The verticalAccuracy. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.DoubleValue getVerticalAccuracy() { + return verticalAccuracy_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : verticalAccuracy_; + } + /** + * + * + *
+   * Deprecated: Use `altitude_accuracy` instead.
+   * 
+ * + * .google.protobuf.DoubleValue vertical_accuracy = 9 [deprecated = true]; + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.DoubleValueOrBuilder getVerticalAccuracyOrBuilder() { + return verticalAccuracy_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : verticalAccuracy_; + } + + public static final int ALTITUDE_ACCURACY_FIELD_NUMBER = 24; + private com.google.protobuf.DoubleValue altitudeAccuracy_; + /** + * + * + *
+   * Accuracy of `altitude` in meters.
+   * 
+ * + * .google.protobuf.DoubleValue altitude_accuracy = 24; + * + * @return Whether the altitudeAccuracy field is set. + */ + @java.lang.Override + public boolean hasAltitudeAccuracy() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+   * Accuracy of `altitude` in meters.
+   * 
+ * + * .google.protobuf.DoubleValue altitude_accuracy = 24; + * + * @return The altitudeAccuracy. + */ + @java.lang.Override + public com.google.protobuf.DoubleValue getAltitudeAccuracy() { + return altitudeAccuracy_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : altitudeAccuracy_; + } + /** + * + * + *
+   * Accuracy of `altitude` in meters.
+   * 
+ * + * .google.protobuf.DoubleValue altitude_accuracy = 24; + */ + @java.lang.Override + public com.google.protobuf.DoubleValueOrBuilder getAltitudeAccuracyOrBuilder() { + return altitudeAccuracy_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : altitudeAccuracy_; + } + + public static final int SPEED_KMPH_FIELD_NUMBER = 3; + private com.google.protobuf.Int32Value speedKmph_; + /** + * + * + *
+   * Speed of the vehicle in kilometers per hour.
+   * Deprecated: Use `speed` instead.
+   * 
+ * + * .google.protobuf.Int32Value speed_kmph = 3 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.VehicleLocation.speed_kmph is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=233 + * @return Whether the speedKmph field is set. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean hasSpeedKmph() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * + * + *
+   * Speed of the vehicle in kilometers per hour.
+   * Deprecated: Use `speed` instead.
+   * 
+ * + * .google.protobuf.Int32Value speed_kmph = 3 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.VehicleLocation.speed_kmph is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=233 + * @return The speedKmph. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.Int32Value getSpeedKmph() { + return speedKmph_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : speedKmph_; + } + /** + * + * + *
+   * Speed of the vehicle in kilometers per hour.
+   * Deprecated: Use `speed` instead.
+   * 
+ * + * .google.protobuf.Int32Value speed_kmph = 3 [deprecated = true]; + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.Int32ValueOrBuilder getSpeedKmphOrBuilder() { + return speedKmph_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : speedKmph_; + } + + public static final int SPEED_FIELD_NUMBER = 6; + private com.google.protobuf.DoubleValue speed_; + /** + * + * + *
+   * Speed of the vehicle in meters/second
+   * 
+ * + * .google.protobuf.DoubleValue speed = 6; + * + * @return Whether the speed field is set. + */ + @java.lang.Override + public boolean hasSpeed() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * + * + *
+   * Speed of the vehicle in meters/second
+   * 
+ * + * .google.protobuf.DoubleValue speed = 6; + * + * @return The speed. + */ + @java.lang.Override + public com.google.protobuf.DoubleValue getSpeed() { + return speed_ == null ? com.google.protobuf.DoubleValue.getDefaultInstance() : speed_; + } + /** + * + * + *
+   * Speed of the vehicle in meters/second
+   * 
+ * + * .google.protobuf.DoubleValue speed = 6; + */ + @java.lang.Override + public com.google.protobuf.DoubleValueOrBuilder getSpeedOrBuilder() { + return speed_ == null ? com.google.protobuf.DoubleValue.getDefaultInstance() : speed_; + } + + public static final int SPEED_ACCURACY_FIELD_NUMBER = 7; + private com.google.protobuf.DoubleValue speedAccuracy_; + /** + * + * + *
+   * Accuracy of `speed` in meters/second.
+   * 
+ * + * .google.protobuf.DoubleValue speed_accuracy = 7; + * + * @return Whether the speedAccuracy field is set. + */ + @java.lang.Override + public boolean hasSpeedAccuracy() { + return ((bitField0_ & 0x00000800) != 0); + } + /** + * + * + *
+   * Accuracy of `speed` in meters/second.
+   * 
+ * + * .google.protobuf.DoubleValue speed_accuracy = 7; + * + * @return The speedAccuracy. + */ + @java.lang.Override + public com.google.protobuf.DoubleValue getSpeedAccuracy() { + return speedAccuracy_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : speedAccuracy_; + } + /** + * + * + *
+   * Accuracy of `speed` in meters/second.
+   * 
+ * + * .google.protobuf.DoubleValue speed_accuracy = 7; + */ + @java.lang.Override + public com.google.protobuf.DoubleValueOrBuilder getSpeedAccuracyOrBuilder() { + return speedAccuracy_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : speedAccuracy_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * The time when `location` was reported by the sensor according to the
+   * sensor's clock.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00001000) != 0); + } + /** + * + * + *
+   * The time when `location` was reported by the sensor according to the
+   * sensor's clock.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * The time when `location` was reported by the sensor according to the
+   * sensor's clock.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int SERVER_TIME_FIELD_NUMBER = 13; + private com.google.protobuf.Timestamp serverTime_; + /** + * + * + *
+   * Output only. The time when the server received the location information.
+   * 
+ * + * .google.protobuf.Timestamp server_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the serverTime field is set. + */ + @java.lang.Override + public boolean hasServerTime() { + return ((bitField0_ & 0x00002000) != 0); + } + /** + * + * + *
+   * Output only. The time when the server received the location information.
+   * 
+ * + * .google.protobuf.Timestamp server_time = 13 [(.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 when the server received the location information.
+   * 
+ * + * .google.protobuf.Timestamp server_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getServerTimeOrBuilder() { + return serverTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : serverTime_; + } + + public static final int LOCATION_SENSOR_FIELD_NUMBER = 11; + private int locationSensor_ = 0; + /** + * + * + *
+   * Provider of location data (for example, `GPS`).
+   * 
+ * + * .maps.fleetengine.v1.LocationSensor location_sensor = 11; + * + * @return The enum numeric value on the wire for locationSensor. + */ + @java.lang.Override + public int getLocationSensorValue() { + return locationSensor_; + } + /** + * + * + *
+   * Provider of location data (for example, `GPS`).
+   * 
+ * + * .maps.fleetengine.v1.LocationSensor location_sensor = 11; + * + * @return The locationSensor. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.LocationSensor getLocationSensor() { + com.google.maps.fleetengine.v1.LocationSensor result = + com.google.maps.fleetengine.v1.LocationSensor.forNumber(locationSensor_); + return result == null ? com.google.maps.fleetengine.v1.LocationSensor.UNRECOGNIZED : result; + } + + public static final int IS_ROAD_SNAPPED_FIELD_NUMBER = 27; + private com.google.protobuf.BoolValue isRoadSnapped_; + /** + * + * + *
+   * Whether `location` is snapped to a road.
+   * 
+ * + * .google.protobuf.BoolValue is_road_snapped = 27; + * + * @return Whether the isRoadSnapped field is set. + */ + @java.lang.Override + public boolean hasIsRoadSnapped() { + return ((bitField0_ & 0x00004000) != 0); + } + /** + * + * + *
+   * Whether `location` is snapped to a road.
+   * 
+ * + * .google.protobuf.BoolValue is_road_snapped = 27; + * + * @return The isRoadSnapped. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getIsRoadSnapped() { + return isRoadSnapped_ == null + ? com.google.protobuf.BoolValue.getDefaultInstance() + : isRoadSnapped_; + } + /** + * + * + *
+   * Whether `location` is snapped to a road.
+   * 
+ * + * .google.protobuf.BoolValue is_road_snapped = 27; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getIsRoadSnappedOrBuilder() { + return isRoadSnapped_ == null + ? com.google.protobuf.BoolValue.getDefaultInstance() + : isRoadSnapped_; + } + + public static final int IS_GPS_SENSOR_ENABLED_FIELD_NUMBER = 12; + private com.google.protobuf.BoolValue isGpsSensorEnabled_; + /** + * + * + *
+   * Input only. Indicates whether the GPS sensor is enabled on the mobile
+   * device.
+   * 
+ * + * + * .google.protobuf.BoolValue is_gps_sensor_enabled = 12 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the isGpsSensorEnabled field is set. + */ + @java.lang.Override + public boolean hasIsGpsSensorEnabled() { + return ((bitField0_ & 0x00008000) != 0); + } + /** + * + * + *
+   * Input only. Indicates whether the GPS sensor is enabled on the mobile
+   * device.
+   * 
+ * + * + * .google.protobuf.BoolValue is_gps_sensor_enabled = 12 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The isGpsSensorEnabled. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getIsGpsSensorEnabled() { + return isGpsSensorEnabled_ == null + ? com.google.protobuf.BoolValue.getDefaultInstance() + : isGpsSensorEnabled_; + } + /** + * + * + *
+   * Input only. Indicates whether the GPS sensor is enabled on the mobile
+   * device.
+   * 
+ * + * + * .google.protobuf.BoolValue is_gps_sensor_enabled = 12 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getIsGpsSensorEnabledOrBuilder() { + return isGpsSensorEnabled_ == null + ? com.google.protobuf.BoolValue.getDefaultInstance() + : isGpsSensorEnabled_; + } + + public static final int TIME_SINCE_UPDATE_FIELD_NUMBER = 14; + private com.google.protobuf.Int32Value timeSinceUpdate_; + /** + * + * + *
+   * Input only. Time (in seconds) since this location was first sent to the
+   * server. This will be zero for the first update. If the time is unknown (for
+   * example, when the app restarts), this value resets to zero.
+   * 
+ * + * + * .google.protobuf.Int32Value time_since_update = 14 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the timeSinceUpdate field is set. + */ + @java.lang.Override + public boolean hasTimeSinceUpdate() { + return ((bitField0_ & 0x00010000) != 0); + } + /** + * + * + *
+   * Input only. Time (in seconds) since this location was first sent to the
+   * server. This will be zero for the first update. If the time is unknown (for
+   * example, when the app restarts), this value resets to zero.
+   * 
+ * + * + * .google.protobuf.Int32Value time_since_update = 14 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The timeSinceUpdate. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getTimeSinceUpdate() { + return timeSinceUpdate_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : timeSinceUpdate_; + } + /** + * + * + *
+   * Input only. Time (in seconds) since this location was first sent to the
+   * server. This will be zero for the first update. If the time is unknown (for
+   * example, when the app restarts), this value resets to zero.
+   * 
+ * + * + * .google.protobuf.Int32Value time_since_update = 14 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getTimeSinceUpdateOrBuilder() { + return timeSinceUpdate_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : timeSinceUpdate_; + } + + public static final int NUM_STALE_UPDATES_FIELD_NUMBER = 15; + private com.google.protobuf.Int32Value numStaleUpdates_; + /** + * + * + *
+   * Input only. Deprecated: Other signals are now used to determine if a
+   * location is stale.
+   * 
+ * + * + * .google.protobuf.Int32Value num_stale_updates = 15 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @deprecated maps.fleetengine.v1.VehicleLocation.num_stale_updates is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=268 + * @return Whether the numStaleUpdates field is set. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean hasNumStaleUpdates() { + return ((bitField0_ & 0x00020000) != 0); + } + /** + * + * + *
+   * Input only. Deprecated: Other signals are now used to determine if a
+   * location is stale.
+   * 
+ * + * + * .google.protobuf.Int32Value num_stale_updates = 15 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @deprecated maps.fleetengine.v1.VehicleLocation.num_stale_updates is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=268 + * @return The numStaleUpdates. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.Int32Value getNumStaleUpdates() { + return numStaleUpdates_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : numStaleUpdates_; + } + /** + * + * + *
+   * Input only. Deprecated: Other signals are now used to determine if a
+   * location is stale.
+   * 
+ * + * + * .google.protobuf.Int32Value num_stale_updates = 15 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.Int32ValueOrBuilder getNumStaleUpdatesOrBuilder() { + return numStaleUpdates_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : numStaleUpdates_; + } + + public static final int RAW_LOCATION_FIELD_NUMBER = 16; + private com.google.type.LatLng rawLocation_; + /** + * + * + *
+   * Raw vehicle location (unprocessed by road-snapper).
+   * 
+ * + * .google.type.LatLng raw_location = 16; + * + * @return Whether the rawLocation field is set. + */ + @java.lang.Override + public boolean hasRawLocation() { + return ((bitField0_ & 0x00040000) != 0); + } + /** + * + * + *
+   * Raw vehicle location (unprocessed by road-snapper).
+   * 
+ * + * .google.type.LatLng raw_location = 16; + * + * @return The rawLocation. + */ + @java.lang.Override + public com.google.type.LatLng getRawLocation() { + return rawLocation_ == null ? com.google.type.LatLng.getDefaultInstance() : rawLocation_; + } + /** + * + * + *
+   * Raw vehicle location (unprocessed by road-snapper).
+   * 
+ * + * .google.type.LatLng raw_location = 16; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getRawLocationOrBuilder() { + return rawLocation_ == null ? com.google.type.LatLng.getDefaultInstance() : rawLocation_; + } + + public static final int RAW_LOCATION_TIME_FIELD_NUMBER = 17; + private com.google.protobuf.Timestamp rawLocationTime_; + /** + * + * + *
+   * Timestamp associated with the raw location.
+   * 
+ * + * .google.protobuf.Timestamp raw_location_time = 17; + * + * @return Whether the rawLocationTime field is set. + */ + @java.lang.Override + public boolean hasRawLocationTime() { + return ((bitField0_ & 0x00080000) != 0); + } + /** + * + * + *
+   * Timestamp associated with the raw location.
+   * 
+ * + * .google.protobuf.Timestamp raw_location_time = 17; + * + * @return The rawLocationTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getRawLocationTime() { + return rawLocationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : rawLocationTime_; + } + /** + * + * + *
+   * Timestamp associated with the raw location.
+   * 
+ * + * .google.protobuf.Timestamp raw_location_time = 17; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getRawLocationTimeOrBuilder() { + return rawLocationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : rawLocationTime_; + } + + public static final int RAW_LOCATION_SENSOR_FIELD_NUMBER = 28; + private int rawLocationSensor_ = 0; + /** + * + * + *
+   * Source of the raw location. Defaults to `GPS`.
+   * 
+ * + * .maps.fleetengine.v1.LocationSensor raw_location_sensor = 28; + * + * @return The enum numeric value on the wire for rawLocationSensor. + */ + @java.lang.Override + public int getRawLocationSensorValue() { + return rawLocationSensor_; + } + /** + * + * + *
+   * Source of the raw location. Defaults to `GPS`.
+   * 
+ * + * .maps.fleetengine.v1.LocationSensor raw_location_sensor = 28; + * + * @return The rawLocationSensor. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.LocationSensor getRawLocationSensor() { + com.google.maps.fleetengine.v1.LocationSensor result = + com.google.maps.fleetengine.v1.LocationSensor.forNumber(rawLocationSensor_); + return result == null ? com.google.maps.fleetengine.v1.LocationSensor.UNRECOGNIZED : result; + } + + public static final int RAW_LOCATION_ACCURACY_FIELD_NUMBER = 25; + private com.google.protobuf.DoubleValue rawLocationAccuracy_; + /** + * + * + *
+   * Accuracy of `raw_location` as a radius, in meters.
+   * 
+ * + * .google.protobuf.DoubleValue raw_location_accuracy = 25; + * + * @return Whether the rawLocationAccuracy field is set. + */ + @java.lang.Override + public boolean hasRawLocationAccuracy() { + return ((bitField0_ & 0x00100000) != 0); + } + /** + * + * + *
+   * Accuracy of `raw_location` as a radius, in meters.
+   * 
+ * + * .google.protobuf.DoubleValue raw_location_accuracy = 25; + * + * @return The rawLocationAccuracy. + */ + @java.lang.Override + public com.google.protobuf.DoubleValue getRawLocationAccuracy() { + return rawLocationAccuracy_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : rawLocationAccuracy_; + } + /** + * + * + *
+   * Accuracy of `raw_location` as a radius, in meters.
+   * 
+ * + * .google.protobuf.DoubleValue raw_location_accuracy = 25; + */ + @java.lang.Override + public com.google.protobuf.DoubleValueOrBuilder getRawLocationAccuracyOrBuilder() { + return rawLocationAccuracy_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : rawLocationAccuracy_; + } + + public static final int SUPPLEMENTAL_LOCATION_FIELD_NUMBER = 18; + private com.google.type.LatLng supplementalLocation_; + /** + * + * + *
+   * Supplemental location provided by the integrating app.
+   * 
+ * + * .google.type.LatLng supplemental_location = 18; + * + * @return Whether the supplementalLocation field is set. + */ + @java.lang.Override + public boolean hasSupplementalLocation() { + return ((bitField0_ & 0x00200000) != 0); + } + /** + * + * + *
+   * Supplemental location provided by the integrating app.
+   * 
+ * + * .google.type.LatLng supplemental_location = 18; + * + * @return The supplementalLocation. + */ + @java.lang.Override + public com.google.type.LatLng getSupplementalLocation() { + return supplementalLocation_ == null + ? com.google.type.LatLng.getDefaultInstance() + : supplementalLocation_; + } + /** + * + * + *
+   * Supplemental location provided by the integrating app.
+   * 
+ * + * .google.type.LatLng supplemental_location = 18; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getSupplementalLocationOrBuilder() { + return supplementalLocation_ == null + ? com.google.type.LatLng.getDefaultInstance() + : supplementalLocation_; + } + + public static final int SUPPLEMENTAL_LOCATION_TIME_FIELD_NUMBER = 19; + private com.google.protobuf.Timestamp supplementalLocationTime_; + /** + * + * + *
+   * Timestamp associated with the supplemental location.
+   * 
+ * + * .google.protobuf.Timestamp supplemental_location_time = 19; + * + * @return Whether the supplementalLocationTime field is set. + */ + @java.lang.Override + public boolean hasSupplementalLocationTime() { + return ((bitField0_ & 0x00400000) != 0); + } + /** + * + * + *
+   * Timestamp associated with the supplemental location.
+   * 
+ * + * .google.protobuf.Timestamp supplemental_location_time = 19; + * + * @return The supplementalLocationTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getSupplementalLocationTime() { + return supplementalLocationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : supplementalLocationTime_; + } + /** + * + * + *
+   * Timestamp associated with the supplemental location.
+   * 
+ * + * .google.protobuf.Timestamp supplemental_location_time = 19; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getSupplementalLocationTimeOrBuilder() { + return supplementalLocationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : supplementalLocationTime_; + } + + public static final int SUPPLEMENTAL_LOCATION_SENSOR_FIELD_NUMBER = 20; + private int supplementalLocationSensor_ = 0; + /** + * + * + *
+   * Source of the supplemental location. Defaults to
+   * `CUSTOMER_SUPPLIED_LOCATION`.
+   * 
+ * + * .maps.fleetengine.v1.LocationSensor supplemental_location_sensor = 20; + * + * @return The enum numeric value on the wire for supplementalLocationSensor. + */ + @java.lang.Override + public int getSupplementalLocationSensorValue() { + return supplementalLocationSensor_; + } + /** + * + * + *
+   * Source of the supplemental location. Defaults to
+   * `CUSTOMER_SUPPLIED_LOCATION`.
+   * 
+ * + * .maps.fleetengine.v1.LocationSensor supplemental_location_sensor = 20; + * + * @return The supplementalLocationSensor. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.LocationSensor getSupplementalLocationSensor() { + com.google.maps.fleetengine.v1.LocationSensor result = + com.google.maps.fleetengine.v1.LocationSensor.forNumber(supplementalLocationSensor_); + return result == null ? com.google.maps.fleetengine.v1.LocationSensor.UNRECOGNIZED : result; + } + + public static final int SUPPLEMENTAL_LOCATION_ACCURACY_FIELD_NUMBER = 21; + private com.google.protobuf.DoubleValue supplementalLocationAccuracy_; + /** + * + * + *
+   * Accuracy of `supplemental_location` as a radius, in meters.
+   * 
+ * + * .google.protobuf.DoubleValue supplemental_location_accuracy = 21; + * + * @return Whether the supplementalLocationAccuracy field is set. + */ + @java.lang.Override + public boolean hasSupplementalLocationAccuracy() { + return ((bitField0_ & 0x00800000) != 0); + } + /** + * + * + *
+   * Accuracy of `supplemental_location` as a radius, in meters.
+   * 
+ * + * .google.protobuf.DoubleValue supplemental_location_accuracy = 21; + * + * @return The supplementalLocationAccuracy. + */ + @java.lang.Override + public com.google.protobuf.DoubleValue getSupplementalLocationAccuracy() { + return supplementalLocationAccuracy_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : supplementalLocationAccuracy_; + } + /** + * + * + *
+   * Accuracy of `supplemental_location` as a radius, in meters.
+   * 
+ * + * .google.protobuf.DoubleValue supplemental_location_accuracy = 21; + */ + @java.lang.Override + public com.google.protobuf.DoubleValueOrBuilder getSupplementalLocationAccuracyOrBuilder() { + return supplementalLocationAccuracy_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : supplementalLocationAccuracy_; + } + + public static final int ROAD_SNAPPED_FIELD_NUMBER = 26; + private boolean roadSnapped_ = false; + /** + * + * + *
+   * Deprecated: Use `is_road_snapped` instead.
+   * 
+ * + * bool road_snapped = 26 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.VehicleLocation.road_snapped is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=297 + * @return The roadSnapped. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean getRoadSnapped() { + return roadSnapped_; + } + + 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, getLocation()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(2, getHeading()); + } + if (((bitField0_ & 0x00000200) != 0)) { + output.writeMessage(3, getSpeedKmph()); + } + if (((bitField0_ & 0x00001000) != 0)) { + output.writeMessage(4, getUpdateTime()); + } + if (((bitField0_ & 0x00000040) != 0)) { + output.writeMessage(5, getAltitude()); + } + if (((bitField0_ & 0x00000400) != 0)) { + output.writeMessage(6, getSpeed()); + } + if (((bitField0_ & 0x00000800) != 0)) { + output.writeMessage(7, getSpeedAccuracy()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(8, getHorizontalAccuracy()); + } + if (((bitField0_ & 0x00000080) != 0)) { + output.writeMessage(9, getVerticalAccuracy()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(10, getBearingAccuracy()); + } + if (locationSensor_ + != com.google.maps.fleetengine.v1.LocationSensor.UNKNOWN_SENSOR.getNumber()) { + output.writeEnum(11, locationSensor_); + } + if (((bitField0_ & 0x00008000) != 0)) { + output.writeMessage(12, getIsGpsSensorEnabled()); + } + if (((bitField0_ & 0x00002000) != 0)) { + output.writeMessage(13, getServerTime()); + } + if (((bitField0_ & 0x00010000) != 0)) { + output.writeMessage(14, getTimeSinceUpdate()); + } + if (((bitField0_ & 0x00020000) != 0)) { + output.writeMessage(15, getNumStaleUpdates()); + } + if (((bitField0_ & 0x00040000) != 0)) { + output.writeMessage(16, getRawLocation()); + } + if (((bitField0_ & 0x00080000) != 0)) { + output.writeMessage(17, getRawLocationTime()); + } + if (((bitField0_ & 0x00200000) != 0)) { + output.writeMessage(18, getSupplementalLocation()); + } + if (((bitField0_ & 0x00400000) != 0)) { + output.writeMessage(19, getSupplementalLocationTime()); + } + if (supplementalLocationSensor_ + != com.google.maps.fleetengine.v1.LocationSensor.UNKNOWN_SENSOR.getNumber()) { + output.writeEnum(20, supplementalLocationSensor_); + } + if (((bitField0_ & 0x00800000) != 0)) { + output.writeMessage(21, getSupplementalLocationAccuracy()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(22, getLatlngAccuracy()); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(23, getHeadingAccuracy()); + } + if (((bitField0_ & 0x00000100) != 0)) { + output.writeMessage(24, getAltitudeAccuracy()); + } + if (((bitField0_ & 0x00100000) != 0)) { + output.writeMessage(25, getRawLocationAccuracy()); + } + if (roadSnapped_ != false) { + output.writeBool(26, roadSnapped_); + } + if (((bitField0_ & 0x00004000) != 0)) { + output.writeMessage(27, getIsRoadSnapped()); + } + if (rawLocationSensor_ + != com.google.maps.fleetengine.v1.LocationSensor.UNKNOWN_SENSOR.getNumber()) { + output.writeEnum(28, rawLocationSensor_); + } + 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, getLocation()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getHeading()); + } + if (((bitField0_ & 0x00000200) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSpeedKmph()); + } + if (((bitField0_ & 0x00001000) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime()); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getAltitude()); + } + if (((bitField0_ & 0x00000400) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getSpeed()); + } + if (((bitField0_ & 0x00000800) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getSpeedAccuracy()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getHorizontalAccuracy()); + } + if (((bitField0_ & 0x00000080) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getVerticalAccuracy()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getBearingAccuracy()); + } + if (locationSensor_ + != com.google.maps.fleetengine.v1.LocationSensor.UNKNOWN_SENSOR.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, locationSensor_); + } + if (((bitField0_ & 0x00008000) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getIsGpsSensorEnabled()); + } + if (((bitField0_ & 0x00002000) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getServerTime()); + } + if (((bitField0_ & 0x00010000) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getTimeSinceUpdate()); + } + if (((bitField0_ & 0x00020000) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getNumStaleUpdates()); + } + if (((bitField0_ & 0x00040000) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, getRawLocation()); + } + if (((bitField0_ & 0x00080000) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, getRawLocationTime()); + } + if (((bitField0_ & 0x00200000) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(18, getSupplementalLocation()); + } + if (((bitField0_ & 0x00400000) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 19, getSupplementalLocationTime()); + } + if (supplementalLocationSensor_ + != com.google.maps.fleetengine.v1.LocationSensor.UNKNOWN_SENSOR.getNumber()) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize(20, supplementalLocationSensor_); + } + if (((bitField0_ & 0x00800000) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 21, getSupplementalLocationAccuracy()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(22, getLatlngAccuracy()); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(23, getHeadingAccuracy()); + } + if (((bitField0_ & 0x00000100) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(24, getAltitudeAccuracy()); + } + if (((bitField0_ & 0x00100000) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(25, getRawLocationAccuracy()); + } + if (roadSnapped_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(26, roadSnapped_); + } + if (((bitField0_ & 0x00004000) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(27, getIsRoadSnapped()); + } + if (rawLocationSensor_ + != com.google.maps.fleetengine.v1.LocationSensor.UNKNOWN_SENSOR.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(28, rawLocationSensor_); + } + 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.fleetengine.v1.VehicleLocation)) { + return super.equals(obj); + } + com.google.maps.fleetengine.v1.VehicleLocation other = + (com.google.maps.fleetengine.v1.VehicleLocation) obj; + + if (hasLocation() != other.hasLocation()) return false; + if (hasLocation()) { + if (!getLocation().equals(other.getLocation())) return false; + } + if (hasHorizontalAccuracy() != other.hasHorizontalAccuracy()) return false; + if (hasHorizontalAccuracy()) { + if (!getHorizontalAccuracy().equals(other.getHorizontalAccuracy())) return false; + } + if (hasLatlngAccuracy() != other.hasLatlngAccuracy()) return false; + if (hasLatlngAccuracy()) { + if (!getLatlngAccuracy().equals(other.getLatlngAccuracy())) return false; + } + if (hasHeading() != other.hasHeading()) return false; + if (hasHeading()) { + if (!getHeading().equals(other.getHeading())) return false; + } + if (hasBearingAccuracy() != other.hasBearingAccuracy()) return false; + if (hasBearingAccuracy()) { + if (!getBearingAccuracy().equals(other.getBearingAccuracy())) return false; + } + if (hasHeadingAccuracy() != other.hasHeadingAccuracy()) return false; + if (hasHeadingAccuracy()) { + if (!getHeadingAccuracy().equals(other.getHeadingAccuracy())) return false; + } + if (hasAltitude() != other.hasAltitude()) return false; + if (hasAltitude()) { + if (!getAltitude().equals(other.getAltitude())) return false; + } + if (hasVerticalAccuracy() != other.hasVerticalAccuracy()) return false; + if (hasVerticalAccuracy()) { + if (!getVerticalAccuracy().equals(other.getVerticalAccuracy())) return false; + } + if (hasAltitudeAccuracy() != other.hasAltitudeAccuracy()) return false; + if (hasAltitudeAccuracy()) { + if (!getAltitudeAccuracy().equals(other.getAltitudeAccuracy())) return false; + } + if (hasSpeedKmph() != other.hasSpeedKmph()) return false; + if (hasSpeedKmph()) { + if (!getSpeedKmph().equals(other.getSpeedKmph())) return false; + } + if (hasSpeed() != other.hasSpeed()) return false; + if (hasSpeed()) { + if (!getSpeed().equals(other.getSpeed())) return false; + } + if (hasSpeedAccuracy() != other.hasSpeedAccuracy()) return false; + if (hasSpeedAccuracy()) { + if (!getSpeedAccuracy().equals(other.getSpeedAccuracy())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (hasServerTime() != other.hasServerTime()) return false; + if (hasServerTime()) { + if (!getServerTime().equals(other.getServerTime())) return false; + } + if (locationSensor_ != other.locationSensor_) return false; + if (hasIsRoadSnapped() != other.hasIsRoadSnapped()) return false; + if (hasIsRoadSnapped()) { + if (!getIsRoadSnapped().equals(other.getIsRoadSnapped())) return false; + } + if (hasIsGpsSensorEnabled() != other.hasIsGpsSensorEnabled()) return false; + if (hasIsGpsSensorEnabled()) { + if (!getIsGpsSensorEnabled().equals(other.getIsGpsSensorEnabled())) return false; + } + if (hasTimeSinceUpdate() != other.hasTimeSinceUpdate()) return false; + if (hasTimeSinceUpdate()) { + if (!getTimeSinceUpdate().equals(other.getTimeSinceUpdate())) return false; + } + if (hasNumStaleUpdates() != other.hasNumStaleUpdates()) return false; + if (hasNumStaleUpdates()) { + if (!getNumStaleUpdates().equals(other.getNumStaleUpdates())) return false; + } + if (hasRawLocation() != other.hasRawLocation()) return false; + if (hasRawLocation()) { + if (!getRawLocation().equals(other.getRawLocation())) return false; + } + if (hasRawLocationTime() != other.hasRawLocationTime()) return false; + if (hasRawLocationTime()) { + if (!getRawLocationTime().equals(other.getRawLocationTime())) return false; + } + if (rawLocationSensor_ != other.rawLocationSensor_) return false; + if (hasRawLocationAccuracy() != other.hasRawLocationAccuracy()) return false; + if (hasRawLocationAccuracy()) { + if (!getRawLocationAccuracy().equals(other.getRawLocationAccuracy())) return false; + } + if (hasSupplementalLocation() != other.hasSupplementalLocation()) return false; + if (hasSupplementalLocation()) { + if (!getSupplementalLocation().equals(other.getSupplementalLocation())) return false; + } + if (hasSupplementalLocationTime() != other.hasSupplementalLocationTime()) return false; + if (hasSupplementalLocationTime()) { + if (!getSupplementalLocationTime().equals(other.getSupplementalLocationTime())) return false; + } + if (supplementalLocationSensor_ != other.supplementalLocationSensor_) return false; + if (hasSupplementalLocationAccuracy() != other.hasSupplementalLocationAccuracy()) return false; + if (hasSupplementalLocationAccuracy()) { + if (!getSupplementalLocationAccuracy().equals(other.getSupplementalLocationAccuracy())) + return false; + } + if (getRoadSnapped() != other.getRoadSnapped()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLocation()) { + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + } + if (hasHorizontalAccuracy()) { + hash = (37 * hash) + HORIZONTAL_ACCURACY_FIELD_NUMBER; + hash = (53 * hash) + getHorizontalAccuracy().hashCode(); + } + if (hasLatlngAccuracy()) { + hash = (37 * hash) + LATLNG_ACCURACY_FIELD_NUMBER; + hash = (53 * hash) + getLatlngAccuracy().hashCode(); + } + if (hasHeading()) { + hash = (37 * hash) + HEADING_FIELD_NUMBER; + hash = (53 * hash) + getHeading().hashCode(); + } + if (hasBearingAccuracy()) { + hash = (37 * hash) + BEARING_ACCURACY_FIELD_NUMBER; + hash = (53 * hash) + getBearingAccuracy().hashCode(); + } + if (hasHeadingAccuracy()) { + hash = (37 * hash) + HEADING_ACCURACY_FIELD_NUMBER; + hash = (53 * hash) + getHeadingAccuracy().hashCode(); + } + if (hasAltitude()) { + hash = (37 * hash) + ALTITUDE_FIELD_NUMBER; + hash = (53 * hash) + getAltitude().hashCode(); + } + if (hasVerticalAccuracy()) { + hash = (37 * hash) + VERTICAL_ACCURACY_FIELD_NUMBER; + hash = (53 * hash) + getVerticalAccuracy().hashCode(); + } + if (hasAltitudeAccuracy()) { + hash = (37 * hash) + ALTITUDE_ACCURACY_FIELD_NUMBER; + hash = (53 * hash) + getAltitudeAccuracy().hashCode(); + } + if (hasSpeedKmph()) { + hash = (37 * hash) + SPEED_KMPH_FIELD_NUMBER; + hash = (53 * hash) + getSpeedKmph().hashCode(); + } + if (hasSpeed()) { + hash = (37 * hash) + SPEED_FIELD_NUMBER; + hash = (53 * hash) + getSpeed().hashCode(); + } + if (hasSpeedAccuracy()) { + hash = (37 * hash) + SPEED_ACCURACY_FIELD_NUMBER; + hash = (53 * hash) + getSpeedAccuracy().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasServerTime()) { + hash = (37 * hash) + SERVER_TIME_FIELD_NUMBER; + hash = (53 * hash) + getServerTime().hashCode(); + } + hash = (37 * hash) + LOCATION_SENSOR_FIELD_NUMBER; + hash = (53 * hash) + locationSensor_; + if (hasIsRoadSnapped()) { + hash = (37 * hash) + IS_ROAD_SNAPPED_FIELD_NUMBER; + hash = (53 * hash) + getIsRoadSnapped().hashCode(); + } + if (hasIsGpsSensorEnabled()) { + hash = (37 * hash) + IS_GPS_SENSOR_ENABLED_FIELD_NUMBER; + hash = (53 * hash) + getIsGpsSensorEnabled().hashCode(); + } + if (hasTimeSinceUpdate()) { + hash = (37 * hash) + TIME_SINCE_UPDATE_FIELD_NUMBER; + hash = (53 * hash) + getTimeSinceUpdate().hashCode(); + } + if (hasNumStaleUpdates()) { + hash = (37 * hash) + NUM_STALE_UPDATES_FIELD_NUMBER; + hash = (53 * hash) + getNumStaleUpdates().hashCode(); + } + if (hasRawLocation()) { + hash = (37 * hash) + RAW_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getRawLocation().hashCode(); + } + if (hasRawLocationTime()) { + hash = (37 * hash) + RAW_LOCATION_TIME_FIELD_NUMBER; + hash = (53 * hash) + getRawLocationTime().hashCode(); + } + hash = (37 * hash) + RAW_LOCATION_SENSOR_FIELD_NUMBER; + hash = (53 * hash) + rawLocationSensor_; + if (hasRawLocationAccuracy()) { + hash = (37 * hash) + RAW_LOCATION_ACCURACY_FIELD_NUMBER; + hash = (53 * hash) + getRawLocationAccuracy().hashCode(); + } + if (hasSupplementalLocation()) { + hash = (37 * hash) + SUPPLEMENTAL_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getSupplementalLocation().hashCode(); + } + if (hasSupplementalLocationTime()) { + hash = (37 * hash) + SUPPLEMENTAL_LOCATION_TIME_FIELD_NUMBER; + hash = (53 * hash) + getSupplementalLocationTime().hashCode(); + } + hash = (37 * hash) + SUPPLEMENTAL_LOCATION_SENSOR_FIELD_NUMBER; + hash = (53 * hash) + supplementalLocationSensor_; + if (hasSupplementalLocationAccuracy()) { + hash = (37 * hash) + SUPPLEMENTAL_LOCATION_ACCURACY_FIELD_NUMBER; + hash = (53 * hash) + getSupplementalLocationAccuracy().hashCode(); + } + hash = (37 * hash) + ROAD_SNAPPED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRoadSnapped()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.fleetengine.v1.VehicleLocation parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.VehicleLocation 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.fleetengine.v1.VehicleLocation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.VehicleLocation 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.fleetengine.v1.VehicleLocation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.VehicleLocation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.VehicleLocation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.VehicleLocation parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.VehicleLocation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.VehicleLocation parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.VehicleLocation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.VehicleLocation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.fleetengine.v1.VehicleLocation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The location, speed, and heading of a vehicle at a point in time.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.v1.VehicleLocation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.v1.VehicleLocation) + com.google.maps.fleetengine.v1.VehicleLocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.FleetEngine + .internal_static_maps_fleetengine_v1_VehicleLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.FleetEngine + .internal_static_maps_fleetengine_v1_VehicleLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.VehicleLocation.class, + com.google.maps.fleetengine.v1.VehicleLocation.Builder.class); + } + + // Construct using com.google.maps.fleetengine.v1.VehicleLocation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getLocationFieldBuilder(); + getHorizontalAccuracyFieldBuilder(); + getLatlngAccuracyFieldBuilder(); + getHeadingFieldBuilder(); + getBearingAccuracyFieldBuilder(); + getHeadingAccuracyFieldBuilder(); + getAltitudeFieldBuilder(); + getVerticalAccuracyFieldBuilder(); + getAltitudeAccuracyFieldBuilder(); + getSpeedKmphFieldBuilder(); + getSpeedFieldBuilder(); + getSpeedAccuracyFieldBuilder(); + getUpdateTimeFieldBuilder(); + getServerTimeFieldBuilder(); + getIsRoadSnappedFieldBuilder(); + getIsGpsSensorEnabledFieldBuilder(); + getTimeSinceUpdateFieldBuilder(); + getNumStaleUpdatesFieldBuilder(); + getRawLocationFieldBuilder(); + getRawLocationTimeFieldBuilder(); + getRawLocationAccuracyFieldBuilder(); + getSupplementalLocationFieldBuilder(); + getSupplementalLocationTimeFieldBuilder(); + getSupplementalLocationAccuracyFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + location_ = null; + if (locationBuilder_ != null) { + locationBuilder_.dispose(); + locationBuilder_ = null; + } + horizontalAccuracy_ = null; + if (horizontalAccuracyBuilder_ != null) { + horizontalAccuracyBuilder_.dispose(); + horizontalAccuracyBuilder_ = null; + } + latlngAccuracy_ = null; + if (latlngAccuracyBuilder_ != null) { + latlngAccuracyBuilder_.dispose(); + latlngAccuracyBuilder_ = null; + } + heading_ = null; + if (headingBuilder_ != null) { + headingBuilder_.dispose(); + headingBuilder_ = null; + } + bearingAccuracy_ = null; + if (bearingAccuracyBuilder_ != null) { + bearingAccuracyBuilder_.dispose(); + bearingAccuracyBuilder_ = null; + } + headingAccuracy_ = null; + if (headingAccuracyBuilder_ != null) { + headingAccuracyBuilder_.dispose(); + headingAccuracyBuilder_ = null; + } + altitude_ = null; + if (altitudeBuilder_ != null) { + altitudeBuilder_.dispose(); + altitudeBuilder_ = null; + } + verticalAccuracy_ = null; + if (verticalAccuracyBuilder_ != null) { + verticalAccuracyBuilder_.dispose(); + verticalAccuracyBuilder_ = null; + } + altitudeAccuracy_ = null; + if (altitudeAccuracyBuilder_ != null) { + altitudeAccuracyBuilder_.dispose(); + altitudeAccuracyBuilder_ = null; + } + speedKmph_ = null; + if (speedKmphBuilder_ != null) { + speedKmphBuilder_.dispose(); + speedKmphBuilder_ = null; + } + speed_ = null; + if (speedBuilder_ != null) { + speedBuilder_.dispose(); + speedBuilder_ = null; + } + speedAccuracy_ = null; + if (speedAccuracyBuilder_ != null) { + speedAccuracyBuilder_.dispose(); + speedAccuracyBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + serverTime_ = null; + if (serverTimeBuilder_ != null) { + serverTimeBuilder_.dispose(); + serverTimeBuilder_ = null; + } + locationSensor_ = 0; + isRoadSnapped_ = null; + if (isRoadSnappedBuilder_ != null) { + isRoadSnappedBuilder_.dispose(); + isRoadSnappedBuilder_ = null; + } + isGpsSensorEnabled_ = null; + if (isGpsSensorEnabledBuilder_ != null) { + isGpsSensorEnabledBuilder_.dispose(); + isGpsSensorEnabledBuilder_ = null; + } + timeSinceUpdate_ = null; + if (timeSinceUpdateBuilder_ != null) { + timeSinceUpdateBuilder_.dispose(); + timeSinceUpdateBuilder_ = null; + } + numStaleUpdates_ = null; + if (numStaleUpdatesBuilder_ != null) { + numStaleUpdatesBuilder_.dispose(); + numStaleUpdatesBuilder_ = null; + } + rawLocation_ = null; + if (rawLocationBuilder_ != null) { + rawLocationBuilder_.dispose(); + rawLocationBuilder_ = null; + } + rawLocationTime_ = null; + if (rawLocationTimeBuilder_ != null) { + rawLocationTimeBuilder_.dispose(); + rawLocationTimeBuilder_ = null; + } + rawLocationSensor_ = 0; + rawLocationAccuracy_ = null; + if (rawLocationAccuracyBuilder_ != null) { + rawLocationAccuracyBuilder_.dispose(); + rawLocationAccuracyBuilder_ = null; + } + supplementalLocation_ = null; + if (supplementalLocationBuilder_ != null) { + supplementalLocationBuilder_.dispose(); + supplementalLocationBuilder_ = null; + } + supplementalLocationTime_ = null; + if (supplementalLocationTimeBuilder_ != null) { + supplementalLocationTimeBuilder_.dispose(); + supplementalLocationTimeBuilder_ = null; + } + supplementalLocationSensor_ = 0; + supplementalLocationAccuracy_ = null; + if (supplementalLocationAccuracyBuilder_ != null) { + supplementalLocationAccuracyBuilder_.dispose(); + supplementalLocationAccuracyBuilder_ = null; + } + roadSnapped_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.fleetengine.v1.FleetEngine + .internal_static_maps_fleetengine_v1_VehicleLocation_descriptor; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleLocation getDefaultInstanceForType() { + return com.google.maps.fleetengine.v1.VehicleLocation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleLocation build() { + com.google.maps.fleetengine.v1.VehicleLocation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleLocation buildPartial() { + com.google.maps.fleetengine.v1.VehicleLocation result = + new com.google.maps.fleetengine.v1.VehicleLocation(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.fleetengine.v1.VehicleLocation result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.location_ = locationBuilder_ == null ? location_ : locationBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.horizontalAccuracy_ = + horizontalAccuracyBuilder_ == null + ? horizontalAccuracy_ + : horizontalAccuracyBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.latlngAccuracy_ = + latlngAccuracyBuilder_ == null ? latlngAccuracy_ : latlngAccuracyBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.heading_ = headingBuilder_ == null ? heading_ : headingBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.bearingAccuracy_ = + bearingAccuracyBuilder_ == null ? bearingAccuracy_ : bearingAccuracyBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.headingAccuracy_ = + headingAccuracyBuilder_ == null ? headingAccuracy_ : headingAccuracyBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.altitude_ = altitudeBuilder_ == null ? altitude_ : altitudeBuilder_.build(); + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.verticalAccuracy_ = + verticalAccuracyBuilder_ == null ? verticalAccuracy_ : verticalAccuracyBuilder_.build(); + to_bitField0_ |= 0x00000080; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.altitudeAccuracy_ = + altitudeAccuracyBuilder_ == null ? altitudeAccuracy_ : altitudeAccuracyBuilder_.build(); + to_bitField0_ |= 0x00000100; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.speedKmph_ = speedKmphBuilder_ == null ? speedKmph_ : speedKmphBuilder_.build(); + to_bitField0_ |= 0x00000200; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.speed_ = speedBuilder_ == null ? speed_ : speedBuilder_.build(); + to_bitField0_ |= 0x00000400; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.speedAccuracy_ = + speedAccuracyBuilder_ == null ? speedAccuracy_ : speedAccuracyBuilder_.build(); + to_bitField0_ |= 0x00000800; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00001000; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.serverTime_ = serverTimeBuilder_ == null ? serverTime_ : serverTimeBuilder_.build(); + to_bitField0_ |= 0x00002000; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.locationSensor_ = locationSensor_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.isRoadSnapped_ = + isRoadSnappedBuilder_ == null ? isRoadSnapped_ : isRoadSnappedBuilder_.build(); + to_bitField0_ |= 0x00004000; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.isGpsSensorEnabled_ = + isGpsSensorEnabledBuilder_ == null + ? isGpsSensorEnabled_ + : isGpsSensorEnabledBuilder_.build(); + to_bitField0_ |= 0x00008000; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.timeSinceUpdate_ = + timeSinceUpdateBuilder_ == null ? timeSinceUpdate_ : timeSinceUpdateBuilder_.build(); + to_bitField0_ |= 0x00010000; + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.numStaleUpdates_ = + numStaleUpdatesBuilder_ == null ? numStaleUpdates_ : numStaleUpdatesBuilder_.build(); + to_bitField0_ |= 0x00020000; + } + if (((from_bitField0_ & 0x00080000) != 0)) { + result.rawLocation_ = + rawLocationBuilder_ == null ? rawLocation_ : rawLocationBuilder_.build(); + to_bitField0_ |= 0x00040000; + } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.rawLocationTime_ = + rawLocationTimeBuilder_ == null ? rawLocationTime_ : rawLocationTimeBuilder_.build(); + to_bitField0_ |= 0x00080000; + } + if (((from_bitField0_ & 0x00200000) != 0)) { + result.rawLocationSensor_ = rawLocationSensor_; + } + if (((from_bitField0_ & 0x00400000) != 0)) { + result.rawLocationAccuracy_ = + rawLocationAccuracyBuilder_ == null + ? rawLocationAccuracy_ + : rawLocationAccuracyBuilder_.build(); + to_bitField0_ |= 0x00100000; + } + if (((from_bitField0_ & 0x00800000) != 0)) { + result.supplementalLocation_ = + supplementalLocationBuilder_ == null + ? supplementalLocation_ + : supplementalLocationBuilder_.build(); + to_bitField0_ |= 0x00200000; + } + if (((from_bitField0_ & 0x01000000) != 0)) { + result.supplementalLocationTime_ = + supplementalLocationTimeBuilder_ == null + ? supplementalLocationTime_ + : supplementalLocationTimeBuilder_.build(); + to_bitField0_ |= 0x00400000; + } + if (((from_bitField0_ & 0x02000000) != 0)) { + result.supplementalLocationSensor_ = supplementalLocationSensor_; + } + if (((from_bitField0_ & 0x04000000) != 0)) { + result.supplementalLocationAccuracy_ = + supplementalLocationAccuracyBuilder_ == null + ? supplementalLocationAccuracy_ + : supplementalLocationAccuracyBuilder_.build(); + to_bitField0_ |= 0x00800000; + } + if (((from_bitField0_ & 0x08000000) != 0)) { + result.roadSnapped_ = roadSnapped_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.fleetengine.v1.VehicleLocation) { + return mergeFrom((com.google.maps.fleetengine.v1.VehicleLocation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.fleetengine.v1.VehicleLocation other) { + if (other == com.google.maps.fleetengine.v1.VehicleLocation.getDefaultInstance()) return this; + if (other.hasLocation()) { + mergeLocation(other.getLocation()); + } + if (other.hasHorizontalAccuracy()) { + mergeHorizontalAccuracy(other.getHorizontalAccuracy()); + } + if (other.hasLatlngAccuracy()) { + mergeLatlngAccuracy(other.getLatlngAccuracy()); + } + if (other.hasHeading()) { + mergeHeading(other.getHeading()); + } + if (other.hasBearingAccuracy()) { + mergeBearingAccuracy(other.getBearingAccuracy()); + } + if (other.hasHeadingAccuracy()) { + mergeHeadingAccuracy(other.getHeadingAccuracy()); + } + if (other.hasAltitude()) { + mergeAltitude(other.getAltitude()); + } + if (other.hasVerticalAccuracy()) { + mergeVerticalAccuracy(other.getVerticalAccuracy()); + } + if (other.hasAltitudeAccuracy()) { + mergeAltitudeAccuracy(other.getAltitudeAccuracy()); + } + if (other.hasSpeedKmph()) { + mergeSpeedKmph(other.getSpeedKmph()); + } + if (other.hasSpeed()) { + mergeSpeed(other.getSpeed()); + } + if (other.hasSpeedAccuracy()) { + mergeSpeedAccuracy(other.getSpeedAccuracy()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasServerTime()) { + mergeServerTime(other.getServerTime()); + } + if (other.locationSensor_ != 0) { + setLocationSensorValue(other.getLocationSensorValue()); + } + if (other.hasIsRoadSnapped()) { + mergeIsRoadSnapped(other.getIsRoadSnapped()); + } + if (other.hasIsGpsSensorEnabled()) { + mergeIsGpsSensorEnabled(other.getIsGpsSensorEnabled()); + } + if (other.hasTimeSinceUpdate()) { + mergeTimeSinceUpdate(other.getTimeSinceUpdate()); + } + if (other.hasNumStaleUpdates()) { + mergeNumStaleUpdates(other.getNumStaleUpdates()); + } + if (other.hasRawLocation()) { + mergeRawLocation(other.getRawLocation()); + } + if (other.hasRawLocationTime()) { + mergeRawLocationTime(other.getRawLocationTime()); + } + if (other.rawLocationSensor_ != 0) { + setRawLocationSensorValue(other.getRawLocationSensorValue()); + } + if (other.hasRawLocationAccuracy()) { + mergeRawLocationAccuracy(other.getRawLocationAccuracy()); + } + if (other.hasSupplementalLocation()) { + mergeSupplementalLocation(other.getSupplementalLocation()); + } + if (other.hasSupplementalLocationTime()) { + mergeSupplementalLocationTime(other.getSupplementalLocationTime()); + } + if (other.supplementalLocationSensor_ != 0) { + setSupplementalLocationSensorValue(other.getSupplementalLocationSensorValue()); + } + if (other.hasSupplementalLocationAccuracy()) { + mergeSupplementalLocationAccuracy(other.getSupplementalLocationAccuracy()); + } + if (other.getRoadSnapped() != false) { + setRoadSnapped(other.getRoadSnapped()); + } + 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(getLocationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getHeadingFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 18 + case 26: + { + input.readMessage(getSpeedKmphFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 26 + case 34: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 34 + case 42: + { + input.readMessage(getAltitudeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 42 + case 50: + { + input.readMessage(getSpeedFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 50 + case 58: + { + input.readMessage(getSpeedAccuracyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 58 + case 66: + { + input.readMessage( + getHorizontalAccuracyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 66 + case 74: + { + input.readMessage( + getVerticalAccuracyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 74 + case 82: + { + input.readMessage(getBearingAccuracyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 82 + case 88: + { + locationSensor_ = input.readEnum(); + bitField0_ |= 0x00004000; + break; + } // case 88 + case 98: + { + input.readMessage( + getIsGpsSensorEnabledFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00010000; + break; + } // case 98 + case 106: + { + input.readMessage(getServerTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 106 + case 114: + { + input.readMessage(getTimeSinceUpdateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00020000; + break; + } // case 114 + case 122: + { + input.readMessage(getNumStaleUpdatesFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00040000; + break; + } // case 122 + case 130: + { + input.readMessage(getRawLocationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00080000; + break; + } // case 130 + case 138: + { + input.readMessage(getRawLocationTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00100000; + break; + } // case 138 + case 146: + { + input.readMessage( + getSupplementalLocationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00800000; + break; + } // case 146 + case 154: + { + input.readMessage( + getSupplementalLocationTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x01000000; + break; + } // case 154 + case 160: + { + supplementalLocationSensor_ = input.readEnum(); + bitField0_ |= 0x02000000; + break; + } // case 160 + case 170: + { + input.readMessage( + getSupplementalLocationAccuracyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x04000000; + break; + } // case 170 + case 178: + { + input.readMessage(getLatlngAccuracyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 178 + case 186: + { + input.readMessage(getHeadingAccuracyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 186 + case 194: + { + input.readMessage( + getAltitudeAccuracyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 194 + case 202: + { + input.readMessage( + getRawLocationAccuracyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00400000; + break; + } // case 202 + case 208: + { + roadSnapped_ = input.readBool(); + bitField0_ |= 0x08000000; + break; + } // case 208 + case 218: + { + input.readMessage(getIsRoadSnappedFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00008000; + break; + } // case 218 + case 224: + { + rawLocationSensor_ = input.readEnum(); + bitField0_ |= 0x00200000; + break; + } // case 224 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.type.LatLng location_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + locationBuilder_; + /** + * + * + *
+     * The location of the vehicle.
+     * When it is sent to Fleet Engine, the vehicle's location is a GPS location.
+     * When you receive it in a response, the vehicle's location can be either a
+     * GPS location, a supplemental location, or some other estimated location.
+     * The source is specified in `location_sensor`.
+     * 
+ * + * .google.type.LatLng location = 1; + * + * @return Whether the location field is set. + */ + public boolean hasLocation() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The location of the vehicle.
+     * When it is sent to Fleet Engine, the vehicle's location is a GPS location.
+     * When you receive it in a response, the vehicle's location can be either a
+     * GPS location, a supplemental location, or some other estimated location.
+     * The source is specified in `location_sensor`.
+     * 
+ * + * .google.type.LatLng location = 1; + * + * @return The location. + */ + public com.google.type.LatLng getLocation() { + if (locationBuilder_ == null) { + return location_ == null ? com.google.type.LatLng.getDefaultInstance() : location_; + } else { + return locationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The location of the vehicle.
+     * When it is sent to Fleet Engine, the vehicle's location is a GPS location.
+     * When you receive it in a response, the vehicle's location can be either a
+     * GPS location, a supplemental location, or some other estimated location.
+     * The source is specified in `location_sensor`.
+     * 
+ * + * .google.type.LatLng location = 1; + */ + public Builder setLocation(com.google.type.LatLng value) { + if (locationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + } else { + locationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The location of the vehicle.
+     * When it is sent to Fleet Engine, the vehicle's location is a GPS location.
+     * When you receive it in a response, the vehicle's location can be either a
+     * GPS location, a supplemental location, or some other estimated location.
+     * The source is specified in `location_sensor`.
+     * 
+ * + * .google.type.LatLng location = 1; + */ + public Builder setLocation(com.google.type.LatLng.Builder builderForValue) { + if (locationBuilder_ == null) { + location_ = builderForValue.build(); + } else { + locationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The location of the vehicle.
+     * When it is sent to Fleet Engine, the vehicle's location is a GPS location.
+     * When you receive it in a response, the vehicle's location can be either a
+     * GPS location, a supplemental location, or some other estimated location.
+     * The source is specified in `location_sensor`.
+     * 
+ * + * .google.type.LatLng location = 1; + */ + public Builder mergeLocation(com.google.type.LatLng value) { + if (locationBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && location_ != null + && location_ != com.google.type.LatLng.getDefaultInstance()) { + getLocationBuilder().mergeFrom(value); + } else { + location_ = value; + } + } else { + locationBuilder_.mergeFrom(value); + } + if (location_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The location of the vehicle.
+     * When it is sent to Fleet Engine, the vehicle's location is a GPS location.
+     * When you receive it in a response, the vehicle's location can be either a
+     * GPS location, a supplemental location, or some other estimated location.
+     * The source is specified in `location_sensor`.
+     * 
+ * + * .google.type.LatLng location = 1; + */ + public Builder clearLocation() { + bitField0_ = (bitField0_ & ~0x00000001); + location_ = null; + if (locationBuilder_ != null) { + locationBuilder_.dispose(); + locationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The location of the vehicle.
+     * When it is sent to Fleet Engine, the vehicle's location is a GPS location.
+     * When you receive it in a response, the vehicle's location can be either a
+     * GPS location, a supplemental location, or some other estimated location.
+     * The source is specified in `location_sensor`.
+     * 
+ * + * .google.type.LatLng location = 1; + */ + public com.google.type.LatLng.Builder getLocationBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getLocationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The location of the vehicle.
+     * When it is sent to Fleet Engine, the vehicle's location is a GPS location.
+     * When you receive it in a response, the vehicle's location can be either a
+     * GPS location, a supplemental location, or some other estimated location.
+     * The source is specified in `location_sensor`.
+     * 
+ * + * .google.type.LatLng location = 1; + */ + public com.google.type.LatLngOrBuilder getLocationOrBuilder() { + if (locationBuilder_ != null) { + return locationBuilder_.getMessageOrBuilder(); + } else { + return location_ == null ? com.google.type.LatLng.getDefaultInstance() : location_; + } + } + /** + * + * + *
+     * The location of the vehicle.
+     * When it is sent to Fleet Engine, the vehicle's location is a GPS location.
+     * When you receive it in a response, the vehicle's location can be either a
+     * GPS location, a supplemental location, or some other estimated location.
+     * The source is specified in `location_sensor`.
+     * 
+ * + * .google.type.LatLng location = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + getLocationFieldBuilder() { + if (locationBuilder_ == null) { + locationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, + com.google.type.LatLng.Builder, + com.google.type.LatLngOrBuilder>(getLocation(), getParentForChildren(), isClean()); + location_ = null; + } + return locationBuilder_; + } + + private com.google.protobuf.DoubleValue horizontalAccuracy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.DoubleValue, + com.google.protobuf.DoubleValue.Builder, + com.google.protobuf.DoubleValueOrBuilder> + horizontalAccuracyBuilder_; + /** + * + * + *
+     * Deprecated: Use `latlng_accuracy` instead.
+     * 
+ * + * .google.protobuf.DoubleValue horizontal_accuracy = 8 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.VehicleLocation.horizontal_accuracy is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=207 + * @return Whether the horizontalAccuracy field is set. + */ + @java.lang.Deprecated + public boolean hasHorizontalAccuracy() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Deprecated: Use `latlng_accuracy` instead.
+     * 
+ * + * .google.protobuf.DoubleValue horizontal_accuracy = 8 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.VehicleLocation.horizontal_accuracy is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=207 + * @return The horizontalAccuracy. + */ + @java.lang.Deprecated + public com.google.protobuf.DoubleValue getHorizontalAccuracy() { + if (horizontalAccuracyBuilder_ == null) { + return horizontalAccuracy_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : horizontalAccuracy_; + } else { + return horizontalAccuracyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Deprecated: Use `latlng_accuracy` instead.
+     * 
+ * + * .google.protobuf.DoubleValue horizontal_accuracy = 8 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder setHorizontalAccuracy(com.google.protobuf.DoubleValue value) { + if (horizontalAccuracyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + horizontalAccuracy_ = value; + } else { + horizontalAccuracyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Deprecated: Use `latlng_accuracy` instead.
+     * 
+ * + * .google.protobuf.DoubleValue horizontal_accuracy = 8 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder setHorizontalAccuracy(com.google.protobuf.DoubleValue.Builder builderForValue) { + if (horizontalAccuracyBuilder_ == null) { + horizontalAccuracy_ = builderForValue.build(); + } else { + horizontalAccuracyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Deprecated: Use `latlng_accuracy` instead.
+     * 
+ * + * .google.protobuf.DoubleValue horizontal_accuracy = 8 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder mergeHorizontalAccuracy(com.google.protobuf.DoubleValue value) { + if (horizontalAccuracyBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && horizontalAccuracy_ != null + && horizontalAccuracy_ != com.google.protobuf.DoubleValue.getDefaultInstance()) { + getHorizontalAccuracyBuilder().mergeFrom(value); + } else { + horizontalAccuracy_ = value; + } + } else { + horizontalAccuracyBuilder_.mergeFrom(value); + } + if (horizontalAccuracy_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Deprecated: Use `latlng_accuracy` instead.
+     * 
+ * + * .google.protobuf.DoubleValue horizontal_accuracy = 8 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder clearHorizontalAccuracy() { + bitField0_ = (bitField0_ & ~0x00000002); + horizontalAccuracy_ = null; + if (horizontalAccuracyBuilder_ != null) { + horizontalAccuracyBuilder_.dispose(); + horizontalAccuracyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Deprecated: Use `latlng_accuracy` instead.
+     * 
+ * + * .google.protobuf.DoubleValue horizontal_accuracy = 8 [deprecated = true]; + */ + @java.lang.Deprecated + public com.google.protobuf.DoubleValue.Builder getHorizontalAccuracyBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getHorizontalAccuracyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Deprecated: Use `latlng_accuracy` instead.
+     * 
+ * + * .google.protobuf.DoubleValue horizontal_accuracy = 8 [deprecated = true]; + */ + @java.lang.Deprecated + public com.google.protobuf.DoubleValueOrBuilder getHorizontalAccuracyOrBuilder() { + if (horizontalAccuracyBuilder_ != null) { + return horizontalAccuracyBuilder_.getMessageOrBuilder(); + } else { + return horizontalAccuracy_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : horizontalAccuracy_; + } + } + /** + * + * + *
+     * Deprecated: Use `latlng_accuracy` instead.
+     * 
+ * + * .google.protobuf.DoubleValue horizontal_accuracy = 8 [deprecated = true]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.DoubleValue, + com.google.protobuf.DoubleValue.Builder, + com.google.protobuf.DoubleValueOrBuilder> + getHorizontalAccuracyFieldBuilder() { + if (horizontalAccuracyBuilder_ == null) { + horizontalAccuracyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.DoubleValue, + com.google.protobuf.DoubleValue.Builder, + com.google.protobuf.DoubleValueOrBuilder>( + getHorizontalAccuracy(), getParentForChildren(), isClean()); + horizontalAccuracy_ = null; + } + return horizontalAccuracyBuilder_; + } + + private com.google.protobuf.DoubleValue latlngAccuracy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.DoubleValue, + com.google.protobuf.DoubleValue.Builder, + com.google.protobuf.DoubleValueOrBuilder> + latlngAccuracyBuilder_; + /** + * + * + *
+     * Accuracy of `location` in meters as a radius.
+     * 
+ * + * .google.protobuf.DoubleValue latlng_accuracy = 22; + * + * @return Whether the latlngAccuracy field is set. + */ + public boolean hasLatlngAccuracy() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Accuracy of `location` in meters as a radius.
+     * 
+ * + * .google.protobuf.DoubleValue latlng_accuracy = 22; + * + * @return The latlngAccuracy. + */ + public com.google.protobuf.DoubleValue getLatlngAccuracy() { + if (latlngAccuracyBuilder_ == null) { + return latlngAccuracy_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : latlngAccuracy_; + } else { + return latlngAccuracyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Accuracy of `location` in meters as a radius.
+     * 
+ * + * .google.protobuf.DoubleValue latlng_accuracy = 22; + */ + public Builder setLatlngAccuracy(com.google.protobuf.DoubleValue value) { + if (latlngAccuracyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + latlngAccuracy_ = value; + } else { + latlngAccuracyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Accuracy of `location` in meters as a radius.
+     * 
+ * + * .google.protobuf.DoubleValue latlng_accuracy = 22; + */ + public Builder setLatlngAccuracy(com.google.protobuf.DoubleValue.Builder builderForValue) { + if (latlngAccuracyBuilder_ == null) { + latlngAccuracy_ = builderForValue.build(); + } else { + latlngAccuracyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Accuracy of `location` in meters as a radius.
+     * 
+ * + * .google.protobuf.DoubleValue latlng_accuracy = 22; + */ + public Builder mergeLatlngAccuracy(com.google.protobuf.DoubleValue value) { + if (latlngAccuracyBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && latlngAccuracy_ != null + && latlngAccuracy_ != com.google.protobuf.DoubleValue.getDefaultInstance()) { + getLatlngAccuracyBuilder().mergeFrom(value); + } else { + latlngAccuracy_ = value; + } + } else { + latlngAccuracyBuilder_.mergeFrom(value); + } + if (latlngAccuracy_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Accuracy of `location` in meters as a radius.
+     * 
+ * + * .google.protobuf.DoubleValue latlng_accuracy = 22; + */ + public Builder clearLatlngAccuracy() { + bitField0_ = (bitField0_ & ~0x00000004); + latlngAccuracy_ = null; + if (latlngAccuracyBuilder_ != null) { + latlngAccuracyBuilder_.dispose(); + latlngAccuracyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Accuracy of `location` in meters as a radius.
+     * 
+ * + * .google.protobuf.DoubleValue latlng_accuracy = 22; + */ + public com.google.protobuf.DoubleValue.Builder getLatlngAccuracyBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getLatlngAccuracyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Accuracy of `location` in meters as a radius.
+     * 
+ * + * .google.protobuf.DoubleValue latlng_accuracy = 22; + */ + public com.google.protobuf.DoubleValueOrBuilder getLatlngAccuracyOrBuilder() { + if (latlngAccuracyBuilder_ != null) { + return latlngAccuracyBuilder_.getMessageOrBuilder(); + } else { + return latlngAccuracy_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : latlngAccuracy_; + } + } + /** + * + * + *
+     * Accuracy of `location` in meters as a radius.
+     * 
+ * + * .google.protobuf.DoubleValue latlng_accuracy = 22; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.DoubleValue, + com.google.protobuf.DoubleValue.Builder, + com.google.protobuf.DoubleValueOrBuilder> + getLatlngAccuracyFieldBuilder() { + if (latlngAccuracyBuilder_ == null) { + latlngAccuracyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.DoubleValue, + com.google.protobuf.DoubleValue.Builder, + com.google.protobuf.DoubleValueOrBuilder>( + getLatlngAccuracy(), getParentForChildren(), isClean()); + latlngAccuracy_ = null; + } + return latlngAccuracyBuilder_; + } + + private com.google.protobuf.Int32Value heading_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + headingBuilder_; + /** + * + * + *
+     * Direction the vehicle is moving in degrees.  0 represents North.
+     * The valid range is [0,360).
+     * 
+ * + * .google.protobuf.Int32Value heading = 2; + * + * @return Whether the heading field is set. + */ + public boolean hasHeading() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Direction the vehicle is moving in degrees.  0 represents North.
+     * The valid range is [0,360).
+     * 
+ * + * .google.protobuf.Int32Value heading = 2; + * + * @return The heading. + */ + public com.google.protobuf.Int32Value getHeading() { + if (headingBuilder_ == null) { + return heading_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : heading_; + } else { + return headingBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Direction the vehicle is moving in degrees.  0 represents North.
+     * The valid range is [0,360).
+     * 
+ * + * .google.protobuf.Int32Value heading = 2; + */ + public Builder setHeading(com.google.protobuf.Int32Value value) { + if (headingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + heading_ = value; + } else { + headingBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Direction the vehicle is moving in degrees.  0 represents North.
+     * The valid range is [0,360).
+     * 
+ * + * .google.protobuf.Int32Value heading = 2; + */ + public Builder setHeading(com.google.protobuf.Int32Value.Builder builderForValue) { + if (headingBuilder_ == null) { + heading_ = builderForValue.build(); + } else { + headingBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Direction the vehicle is moving in degrees.  0 represents North.
+     * The valid range is [0,360).
+     * 
+ * + * .google.protobuf.Int32Value heading = 2; + */ + public Builder mergeHeading(com.google.protobuf.Int32Value value) { + if (headingBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && heading_ != null + && heading_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getHeadingBuilder().mergeFrom(value); + } else { + heading_ = value; + } + } else { + headingBuilder_.mergeFrom(value); + } + if (heading_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Direction the vehicle is moving in degrees.  0 represents North.
+     * The valid range is [0,360).
+     * 
+ * + * .google.protobuf.Int32Value heading = 2; + */ + public Builder clearHeading() { + bitField0_ = (bitField0_ & ~0x00000008); + heading_ = null; + if (headingBuilder_ != null) { + headingBuilder_.dispose(); + headingBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Direction the vehicle is moving in degrees.  0 represents North.
+     * The valid range is [0,360).
+     * 
+ * + * .google.protobuf.Int32Value heading = 2; + */ + public com.google.protobuf.Int32Value.Builder getHeadingBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getHeadingFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Direction the vehicle is moving in degrees.  0 represents North.
+     * The valid range is [0,360).
+     * 
+ * + * .google.protobuf.Int32Value heading = 2; + */ + public com.google.protobuf.Int32ValueOrBuilder getHeadingOrBuilder() { + if (headingBuilder_ != null) { + return headingBuilder_.getMessageOrBuilder(); + } else { + return heading_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : heading_; + } + } + /** + * + * + *
+     * Direction the vehicle is moving in degrees.  0 represents North.
+     * The valid range is [0,360).
+     * 
+ * + * .google.protobuf.Int32Value heading = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + getHeadingFieldBuilder() { + if (headingBuilder_ == null) { + headingBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder>( + getHeading(), getParentForChildren(), isClean()); + heading_ = null; + } + return headingBuilder_; + } + + private com.google.protobuf.DoubleValue bearingAccuracy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.DoubleValue, + com.google.protobuf.DoubleValue.Builder, + com.google.protobuf.DoubleValueOrBuilder> + bearingAccuracyBuilder_; + /** + * + * + *
+     * Deprecated: Use `heading_accuracy` instead.
+     * 
+ * + * .google.protobuf.DoubleValue bearing_accuracy = 10 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.VehicleLocation.bearing_accuracy is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=217 + * @return Whether the bearingAccuracy field is set. + */ + @java.lang.Deprecated + public boolean hasBearingAccuracy() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Deprecated: Use `heading_accuracy` instead.
+     * 
+ * + * .google.protobuf.DoubleValue bearing_accuracy = 10 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.VehicleLocation.bearing_accuracy is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=217 + * @return The bearingAccuracy. + */ + @java.lang.Deprecated + public com.google.protobuf.DoubleValue getBearingAccuracy() { + if (bearingAccuracyBuilder_ == null) { + return bearingAccuracy_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : bearingAccuracy_; + } else { + return bearingAccuracyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Deprecated: Use `heading_accuracy` instead.
+     * 
+ * + * .google.protobuf.DoubleValue bearing_accuracy = 10 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder setBearingAccuracy(com.google.protobuf.DoubleValue value) { + if (bearingAccuracyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + bearingAccuracy_ = value; + } else { + bearingAccuracyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Deprecated: Use `heading_accuracy` instead.
+     * 
+ * + * .google.protobuf.DoubleValue bearing_accuracy = 10 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder setBearingAccuracy(com.google.protobuf.DoubleValue.Builder builderForValue) { + if (bearingAccuracyBuilder_ == null) { + bearingAccuracy_ = builderForValue.build(); + } else { + bearingAccuracyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Deprecated: Use `heading_accuracy` instead.
+     * 
+ * + * .google.protobuf.DoubleValue bearing_accuracy = 10 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder mergeBearingAccuracy(com.google.protobuf.DoubleValue value) { + if (bearingAccuracyBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && bearingAccuracy_ != null + && bearingAccuracy_ != com.google.protobuf.DoubleValue.getDefaultInstance()) { + getBearingAccuracyBuilder().mergeFrom(value); + } else { + bearingAccuracy_ = value; + } + } else { + bearingAccuracyBuilder_.mergeFrom(value); + } + if (bearingAccuracy_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Deprecated: Use `heading_accuracy` instead.
+     * 
+ * + * .google.protobuf.DoubleValue bearing_accuracy = 10 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder clearBearingAccuracy() { + bitField0_ = (bitField0_ & ~0x00000010); + bearingAccuracy_ = null; + if (bearingAccuracyBuilder_ != null) { + bearingAccuracyBuilder_.dispose(); + bearingAccuracyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Deprecated: Use `heading_accuracy` instead.
+     * 
+ * + * .google.protobuf.DoubleValue bearing_accuracy = 10 [deprecated = true]; + */ + @java.lang.Deprecated + public com.google.protobuf.DoubleValue.Builder getBearingAccuracyBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getBearingAccuracyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Deprecated: Use `heading_accuracy` instead.
+     * 
+ * + * .google.protobuf.DoubleValue bearing_accuracy = 10 [deprecated = true]; + */ + @java.lang.Deprecated + public com.google.protobuf.DoubleValueOrBuilder getBearingAccuracyOrBuilder() { + if (bearingAccuracyBuilder_ != null) { + return bearingAccuracyBuilder_.getMessageOrBuilder(); + } else { + return bearingAccuracy_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : bearingAccuracy_; + } + } + /** + * + * + *
+     * Deprecated: Use `heading_accuracy` instead.
+     * 
+ * + * .google.protobuf.DoubleValue bearing_accuracy = 10 [deprecated = true]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.DoubleValue, + com.google.protobuf.DoubleValue.Builder, + com.google.protobuf.DoubleValueOrBuilder> + getBearingAccuracyFieldBuilder() { + if (bearingAccuracyBuilder_ == null) { + bearingAccuracyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.DoubleValue, + com.google.protobuf.DoubleValue.Builder, + com.google.protobuf.DoubleValueOrBuilder>( + getBearingAccuracy(), getParentForChildren(), isClean()); + bearingAccuracy_ = null; + } + return bearingAccuracyBuilder_; + } + + private com.google.protobuf.DoubleValue headingAccuracy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.DoubleValue, + com.google.protobuf.DoubleValue.Builder, + com.google.protobuf.DoubleValueOrBuilder> + headingAccuracyBuilder_; + /** + * + * + *
+     * Accuracy of `heading` in degrees.
+     * 
+ * + * .google.protobuf.DoubleValue heading_accuracy = 23; + * + * @return Whether the headingAccuracy field is set. + */ + public boolean hasHeadingAccuracy() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * Accuracy of `heading` in degrees.
+     * 
+ * + * .google.protobuf.DoubleValue heading_accuracy = 23; + * + * @return The headingAccuracy. + */ + public com.google.protobuf.DoubleValue getHeadingAccuracy() { + if (headingAccuracyBuilder_ == null) { + return headingAccuracy_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : headingAccuracy_; + } else { + return headingAccuracyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Accuracy of `heading` in degrees.
+     * 
+ * + * .google.protobuf.DoubleValue heading_accuracy = 23; + */ + public Builder setHeadingAccuracy(com.google.protobuf.DoubleValue value) { + if (headingAccuracyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + headingAccuracy_ = value; + } else { + headingAccuracyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Accuracy of `heading` in degrees.
+     * 
+ * + * .google.protobuf.DoubleValue heading_accuracy = 23; + */ + public Builder setHeadingAccuracy(com.google.protobuf.DoubleValue.Builder builderForValue) { + if (headingAccuracyBuilder_ == null) { + headingAccuracy_ = builderForValue.build(); + } else { + headingAccuracyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Accuracy of `heading` in degrees.
+     * 
+ * + * .google.protobuf.DoubleValue heading_accuracy = 23; + */ + public Builder mergeHeadingAccuracy(com.google.protobuf.DoubleValue value) { + if (headingAccuracyBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && headingAccuracy_ != null + && headingAccuracy_ != com.google.protobuf.DoubleValue.getDefaultInstance()) { + getHeadingAccuracyBuilder().mergeFrom(value); + } else { + headingAccuracy_ = value; + } + } else { + headingAccuracyBuilder_.mergeFrom(value); + } + if (headingAccuracy_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Accuracy of `heading` in degrees.
+     * 
+ * + * .google.protobuf.DoubleValue heading_accuracy = 23; + */ + public Builder clearHeadingAccuracy() { + bitField0_ = (bitField0_ & ~0x00000020); + headingAccuracy_ = null; + if (headingAccuracyBuilder_ != null) { + headingAccuracyBuilder_.dispose(); + headingAccuracyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Accuracy of `heading` in degrees.
+     * 
+ * + * .google.protobuf.DoubleValue heading_accuracy = 23; + */ + public com.google.protobuf.DoubleValue.Builder getHeadingAccuracyBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getHeadingAccuracyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Accuracy of `heading` in degrees.
+     * 
+ * + * .google.protobuf.DoubleValue heading_accuracy = 23; + */ + public com.google.protobuf.DoubleValueOrBuilder getHeadingAccuracyOrBuilder() { + if (headingAccuracyBuilder_ != null) { + return headingAccuracyBuilder_.getMessageOrBuilder(); + } else { + return headingAccuracy_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : headingAccuracy_; + } + } + /** + * + * + *
+     * Accuracy of `heading` in degrees.
+     * 
+ * + * .google.protobuf.DoubleValue heading_accuracy = 23; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.DoubleValue, + com.google.protobuf.DoubleValue.Builder, + com.google.protobuf.DoubleValueOrBuilder> + getHeadingAccuracyFieldBuilder() { + if (headingAccuracyBuilder_ == null) { + headingAccuracyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.DoubleValue, + com.google.protobuf.DoubleValue.Builder, + com.google.protobuf.DoubleValueOrBuilder>( + getHeadingAccuracy(), getParentForChildren(), isClean()); + headingAccuracy_ = null; + } + return headingAccuracyBuilder_; + } + + private com.google.protobuf.DoubleValue altitude_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.DoubleValue, + com.google.protobuf.DoubleValue.Builder, + com.google.protobuf.DoubleValueOrBuilder> + altitudeBuilder_; + /** + * + * + *
+     * Altitude in meters above WGS84.
+     * 
+ * + * .google.protobuf.DoubleValue altitude = 5; + * + * @return Whether the altitude field is set. + */ + public boolean hasAltitude() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Altitude in meters above WGS84.
+     * 
+ * + * .google.protobuf.DoubleValue altitude = 5; + * + * @return The altitude. + */ + public com.google.protobuf.DoubleValue getAltitude() { + if (altitudeBuilder_ == null) { + return altitude_ == null ? com.google.protobuf.DoubleValue.getDefaultInstance() : altitude_; + } else { + return altitudeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Altitude in meters above WGS84.
+     * 
+ * + * .google.protobuf.DoubleValue altitude = 5; + */ + public Builder setAltitude(com.google.protobuf.DoubleValue value) { + if (altitudeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + altitude_ = value; + } else { + altitudeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Altitude in meters above WGS84.
+     * 
+ * + * .google.protobuf.DoubleValue altitude = 5; + */ + public Builder setAltitude(com.google.protobuf.DoubleValue.Builder builderForValue) { + if (altitudeBuilder_ == null) { + altitude_ = builderForValue.build(); + } else { + altitudeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Altitude in meters above WGS84.
+     * 
+ * + * .google.protobuf.DoubleValue altitude = 5; + */ + public Builder mergeAltitude(com.google.protobuf.DoubleValue value) { + if (altitudeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && altitude_ != null + && altitude_ != com.google.protobuf.DoubleValue.getDefaultInstance()) { + getAltitudeBuilder().mergeFrom(value); + } else { + altitude_ = value; + } + } else { + altitudeBuilder_.mergeFrom(value); + } + if (altitude_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Altitude in meters above WGS84.
+     * 
+ * + * .google.protobuf.DoubleValue altitude = 5; + */ + public Builder clearAltitude() { + bitField0_ = (bitField0_ & ~0x00000040); + altitude_ = null; + if (altitudeBuilder_ != null) { + altitudeBuilder_.dispose(); + altitudeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Altitude in meters above WGS84.
+     * 
+ * + * .google.protobuf.DoubleValue altitude = 5; + */ + public com.google.protobuf.DoubleValue.Builder getAltitudeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getAltitudeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Altitude in meters above WGS84.
+     * 
+ * + * .google.protobuf.DoubleValue altitude = 5; + */ + public com.google.protobuf.DoubleValueOrBuilder getAltitudeOrBuilder() { + if (altitudeBuilder_ != null) { + return altitudeBuilder_.getMessageOrBuilder(); + } else { + return altitude_ == null ? com.google.protobuf.DoubleValue.getDefaultInstance() : altitude_; + } + } + /** + * + * + *
+     * Altitude in meters above WGS84.
+     * 
+ * + * .google.protobuf.DoubleValue altitude = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.DoubleValue, + com.google.protobuf.DoubleValue.Builder, + com.google.protobuf.DoubleValueOrBuilder> + getAltitudeFieldBuilder() { + if (altitudeBuilder_ == null) { + altitudeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.DoubleValue, + com.google.protobuf.DoubleValue.Builder, + com.google.protobuf.DoubleValueOrBuilder>( + getAltitude(), getParentForChildren(), isClean()); + altitude_ = null; + } + return altitudeBuilder_; + } + + private com.google.protobuf.DoubleValue verticalAccuracy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.DoubleValue, + com.google.protobuf.DoubleValue.Builder, + com.google.protobuf.DoubleValueOrBuilder> + verticalAccuracyBuilder_; + /** + * + * + *
+     * Deprecated: Use `altitude_accuracy` instead.
+     * 
+ * + * .google.protobuf.DoubleValue vertical_accuracy = 9 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.VehicleLocation.vertical_accuracy is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=226 + * @return Whether the verticalAccuracy field is set. + */ + @java.lang.Deprecated + public boolean hasVerticalAccuracy() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Deprecated: Use `altitude_accuracy` instead.
+     * 
+ * + * .google.protobuf.DoubleValue vertical_accuracy = 9 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.VehicleLocation.vertical_accuracy is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=226 + * @return The verticalAccuracy. + */ + @java.lang.Deprecated + public com.google.protobuf.DoubleValue getVerticalAccuracy() { + if (verticalAccuracyBuilder_ == null) { + return verticalAccuracy_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : verticalAccuracy_; + } else { + return verticalAccuracyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Deprecated: Use `altitude_accuracy` instead.
+     * 
+ * + * .google.protobuf.DoubleValue vertical_accuracy = 9 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder setVerticalAccuracy(com.google.protobuf.DoubleValue value) { + if (verticalAccuracyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + verticalAccuracy_ = value; + } else { + verticalAccuracyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Deprecated: Use `altitude_accuracy` instead.
+     * 
+ * + * .google.protobuf.DoubleValue vertical_accuracy = 9 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder setVerticalAccuracy(com.google.protobuf.DoubleValue.Builder builderForValue) { + if (verticalAccuracyBuilder_ == null) { + verticalAccuracy_ = builderForValue.build(); + } else { + verticalAccuracyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Deprecated: Use `altitude_accuracy` instead.
+     * 
+ * + * .google.protobuf.DoubleValue vertical_accuracy = 9 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder mergeVerticalAccuracy(com.google.protobuf.DoubleValue value) { + if (verticalAccuracyBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && verticalAccuracy_ != null + && verticalAccuracy_ != com.google.protobuf.DoubleValue.getDefaultInstance()) { + getVerticalAccuracyBuilder().mergeFrom(value); + } else { + verticalAccuracy_ = value; + } + } else { + verticalAccuracyBuilder_.mergeFrom(value); + } + if (verticalAccuracy_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Deprecated: Use `altitude_accuracy` instead.
+     * 
+ * + * .google.protobuf.DoubleValue vertical_accuracy = 9 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder clearVerticalAccuracy() { + bitField0_ = (bitField0_ & ~0x00000080); + verticalAccuracy_ = null; + if (verticalAccuracyBuilder_ != null) { + verticalAccuracyBuilder_.dispose(); + verticalAccuracyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Deprecated: Use `altitude_accuracy` instead.
+     * 
+ * + * .google.protobuf.DoubleValue vertical_accuracy = 9 [deprecated = true]; + */ + @java.lang.Deprecated + public com.google.protobuf.DoubleValue.Builder getVerticalAccuracyBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getVerticalAccuracyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Deprecated: Use `altitude_accuracy` instead.
+     * 
+ * + * .google.protobuf.DoubleValue vertical_accuracy = 9 [deprecated = true]; + */ + @java.lang.Deprecated + public com.google.protobuf.DoubleValueOrBuilder getVerticalAccuracyOrBuilder() { + if (verticalAccuracyBuilder_ != null) { + return verticalAccuracyBuilder_.getMessageOrBuilder(); + } else { + return verticalAccuracy_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : verticalAccuracy_; + } + } + /** + * + * + *
+     * Deprecated: Use `altitude_accuracy` instead.
+     * 
+ * + * .google.protobuf.DoubleValue vertical_accuracy = 9 [deprecated = true]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.DoubleValue, + com.google.protobuf.DoubleValue.Builder, + com.google.protobuf.DoubleValueOrBuilder> + getVerticalAccuracyFieldBuilder() { + if (verticalAccuracyBuilder_ == null) { + verticalAccuracyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.DoubleValue, + com.google.protobuf.DoubleValue.Builder, + com.google.protobuf.DoubleValueOrBuilder>( + getVerticalAccuracy(), getParentForChildren(), isClean()); + verticalAccuracy_ = null; + } + return verticalAccuracyBuilder_; + } + + private com.google.protobuf.DoubleValue altitudeAccuracy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.DoubleValue, + com.google.protobuf.DoubleValue.Builder, + com.google.protobuf.DoubleValueOrBuilder> + altitudeAccuracyBuilder_; + /** + * + * + *
+     * Accuracy of `altitude` in meters.
+     * 
+ * + * .google.protobuf.DoubleValue altitude_accuracy = 24; + * + * @return Whether the altitudeAccuracy field is set. + */ + public boolean hasAltitudeAccuracy() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+     * Accuracy of `altitude` in meters.
+     * 
+ * + * .google.protobuf.DoubleValue altitude_accuracy = 24; + * + * @return The altitudeAccuracy. + */ + public com.google.protobuf.DoubleValue getAltitudeAccuracy() { + if (altitudeAccuracyBuilder_ == null) { + return altitudeAccuracy_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : altitudeAccuracy_; + } else { + return altitudeAccuracyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Accuracy of `altitude` in meters.
+     * 
+ * + * .google.protobuf.DoubleValue altitude_accuracy = 24; + */ + public Builder setAltitudeAccuracy(com.google.protobuf.DoubleValue value) { + if (altitudeAccuracyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + altitudeAccuracy_ = value; + } else { + altitudeAccuracyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Accuracy of `altitude` in meters.
+     * 
+ * + * .google.protobuf.DoubleValue altitude_accuracy = 24; + */ + public Builder setAltitudeAccuracy(com.google.protobuf.DoubleValue.Builder builderForValue) { + if (altitudeAccuracyBuilder_ == null) { + altitudeAccuracy_ = builderForValue.build(); + } else { + altitudeAccuracyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Accuracy of `altitude` in meters.
+     * 
+ * + * .google.protobuf.DoubleValue altitude_accuracy = 24; + */ + public Builder mergeAltitudeAccuracy(com.google.protobuf.DoubleValue value) { + if (altitudeAccuracyBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && altitudeAccuracy_ != null + && altitudeAccuracy_ != com.google.protobuf.DoubleValue.getDefaultInstance()) { + getAltitudeAccuracyBuilder().mergeFrom(value); + } else { + altitudeAccuracy_ = value; + } + } else { + altitudeAccuracyBuilder_.mergeFrom(value); + } + if (altitudeAccuracy_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Accuracy of `altitude` in meters.
+     * 
+ * + * .google.protobuf.DoubleValue altitude_accuracy = 24; + */ + public Builder clearAltitudeAccuracy() { + bitField0_ = (bitField0_ & ~0x00000100); + altitudeAccuracy_ = null; + if (altitudeAccuracyBuilder_ != null) { + altitudeAccuracyBuilder_.dispose(); + altitudeAccuracyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Accuracy of `altitude` in meters.
+     * 
+ * + * .google.protobuf.DoubleValue altitude_accuracy = 24; + */ + public com.google.protobuf.DoubleValue.Builder getAltitudeAccuracyBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getAltitudeAccuracyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Accuracy of `altitude` in meters.
+     * 
+ * + * .google.protobuf.DoubleValue altitude_accuracy = 24; + */ + public com.google.protobuf.DoubleValueOrBuilder getAltitudeAccuracyOrBuilder() { + if (altitudeAccuracyBuilder_ != null) { + return altitudeAccuracyBuilder_.getMessageOrBuilder(); + } else { + return altitudeAccuracy_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : altitudeAccuracy_; + } + } + /** + * + * + *
+     * Accuracy of `altitude` in meters.
+     * 
+ * + * .google.protobuf.DoubleValue altitude_accuracy = 24; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.DoubleValue, + com.google.protobuf.DoubleValue.Builder, + com.google.protobuf.DoubleValueOrBuilder> + getAltitudeAccuracyFieldBuilder() { + if (altitudeAccuracyBuilder_ == null) { + altitudeAccuracyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.DoubleValue, + com.google.protobuf.DoubleValue.Builder, + com.google.protobuf.DoubleValueOrBuilder>( + getAltitudeAccuracy(), getParentForChildren(), isClean()); + altitudeAccuracy_ = null; + } + return altitudeAccuracyBuilder_; + } + + private com.google.protobuf.Int32Value speedKmph_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + speedKmphBuilder_; + /** + * + * + *
+     * Speed of the vehicle in kilometers per hour.
+     * Deprecated: Use `speed` instead.
+     * 
+ * + * .google.protobuf.Int32Value speed_kmph = 3 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.VehicleLocation.speed_kmph is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=233 + * @return Whether the speedKmph field is set. + */ + @java.lang.Deprecated + public boolean hasSpeedKmph() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * + * + *
+     * Speed of the vehicle in kilometers per hour.
+     * Deprecated: Use `speed` instead.
+     * 
+ * + * .google.protobuf.Int32Value speed_kmph = 3 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.VehicleLocation.speed_kmph is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=233 + * @return The speedKmph. + */ + @java.lang.Deprecated + public com.google.protobuf.Int32Value getSpeedKmph() { + if (speedKmphBuilder_ == null) { + return speedKmph_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : speedKmph_; + } else { + return speedKmphBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Speed of the vehicle in kilometers per hour.
+     * Deprecated: Use `speed` instead.
+     * 
+ * + * .google.protobuf.Int32Value speed_kmph = 3 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder setSpeedKmph(com.google.protobuf.Int32Value value) { + if (speedKmphBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + speedKmph_ = value; + } else { + speedKmphBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Speed of the vehicle in kilometers per hour.
+     * Deprecated: Use `speed` instead.
+     * 
+ * + * .google.protobuf.Int32Value speed_kmph = 3 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder setSpeedKmph(com.google.protobuf.Int32Value.Builder builderForValue) { + if (speedKmphBuilder_ == null) { + speedKmph_ = builderForValue.build(); + } else { + speedKmphBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Speed of the vehicle in kilometers per hour.
+     * Deprecated: Use `speed` instead.
+     * 
+ * + * .google.protobuf.Int32Value speed_kmph = 3 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder mergeSpeedKmph(com.google.protobuf.Int32Value value) { + if (speedKmphBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && speedKmph_ != null + && speedKmph_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getSpeedKmphBuilder().mergeFrom(value); + } else { + speedKmph_ = value; + } + } else { + speedKmphBuilder_.mergeFrom(value); + } + if (speedKmph_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Speed of the vehicle in kilometers per hour.
+     * Deprecated: Use `speed` instead.
+     * 
+ * + * .google.protobuf.Int32Value speed_kmph = 3 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder clearSpeedKmph() { + bitField0_ = (bitField0_ & ~0x00000200); + speedKmph_ = null; + if (speedKmphBuilder_ != null) { + speedKmphBuilder_.dispose(); + speedKmphBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Speed of the vehicle in kilometers per hour.
+     * Deprecated: Use `speed` instead.
+     * 
+ * + * .google.protobuf.Int32Value speed_kmph = 3 [deprecated = true]; + */ + @java.lang.Deprecated + public com.google.protobuf.Int32Value.Builder getSpeedKmphBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getSpeedKmphFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Speed of the vehicle in kilometers per hour.
+     * Deprecated: Use `speed` instead.
+     * 
+ * + * .google.protobuf.Int32Value speed_kmph = 3 [deprecated = true]; + */ + @java.lang.Deprecated + public com.google.protobuf.Int32ValueOrBuilder getSpeedKmphOrBuilder() { + if (speedKmphBuilder_ != null) { + return speedKmphBuilder_.getMessageOrBuilder(); + } else { + return speedKmph_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : speedKmph_; + } + } + /** + * + * + *
+     * Speed of the vehicle in kilometers per hour.
+     * Deprecated: Use `speed` instead.
+     * 
+ * + * .google.protobuf.Int32Value speed_kmph = 3 [deprecated = true]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + getSpeedKmphFieldBuilder() { + if (speedKmphBuilder_ == null) { + speedKmphBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder>( + getSpeedKmph(), getParentForChildren(), isClean()); + speedKmph_ = null; + } + return speedKmphBuilder_; + } + + private com.google.protobuf.DoubleValue speed_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.DoubleValue, + com.google.protobuf.DoubleValue.Builder, + com.google.protobuf.DoubleValueOrBuilder> + speedBuilder_; + /** + * + * + *
+     * Speed of the vehicle in meters/second
+     * 
+ * + * .google.protobuf.DoubleValue speed = 6; + * + * @return Whether the speed field is set. + */ + public boolean hasSpeed() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * + * + *
+     * Speed of the vehicle in meters/second
+     * 
+ * + * .google.protobuf.DoubleValue speed = 6; + * + * @return The speed. + */ + public com.google.protobuf.DoubleValue getSpeed() { + if (speedBuilder_ == null) { + return speed_ == null ? com.google.protobuf.DoubleValue.getDefaultInstance() : speed_; + } else { + return speedBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Speed of the vehicle in meters/second
+     * 
+ * + * .google.protobuf.DoubleValue speed = 6; + */ + public Builder setSpeed(com.google.protobuf.DoubleValue value) { + if (speedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + speed_ = value; + } else { + speedBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Speed of the vehicle in meters/second
+     * 
+ * + * .google.protobuf.DoubleValue speed = 6; + */ + public Builder setSpeed(com.google.protobuf.DoubleValue.Builder builderForValue) { + if (speedBuilder_ == null) { + speed_ = builderForValue.build(); + } else { + speedBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Speed of the vehicle in meters/second
+     * 
+ * + * .google.protobuf.DoubleValue speed = 6; + */ + public Builder mergeSpeed(com.google.protobuf.DoubleValue value) { + if (speedBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && speed_ != null + && speed_ != com.google.protobuf.DoubleValue.getDefaultInstance()) { + getSpeedBuilder().mergeFrom(value); + } else { + speed_ = value; + } + } else { + speedBuilder_.mergeFrom(value); + } + if (speed_ != null) { + bitField0_ |= 0x00000400; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Speed of the vehicle in meters/second
+     * 
+ * + * .google.protobuf.DoubleValue speed = 6; + */ + public Builder clearSpeed() { + bitField0_ = (bitField0_ & ~0x00000400); + speed_ = null; + if (speedBuilder_ != null) { + speedBuilder_.dispose(); + speedBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Speed of the vehicle in meters/second
+     * 
+ * + * .google.protobuf.DoubleValue speed = 6; + */ + public com.google.protobuf.DoubleValue.Builder getSpeedBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return getSpeedFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Speed of the vehicle in meters/second
+     * 
+ * + * .google.protobuf.DoubleValue speed = 6; + */ + public com.google.protobuf.DoubleValueOrBuilder getSpeedOrBuilder() { + if (speedBuilder_ != null) { + return speedBuilder_.getMessageOrBuilder(); + } else { + return speed_ == null ? com.google.protobuf.DoubleValue.getDefaultInstance() : speed_; + } + } + /** + * + * + *
+     * Speed of the vehicle in meters/second
+     * 
+ * + * .google.protobuf.DoubleValue speed = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.DoubleValue, + com.google.protobuf.DoubleValue.Builder, + com.google.protobuf.DoubleValueOrBuilder> + getSpeedFieldBuilder() { + if (speedBuilder_ == null) { + speedBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.DoubleValue, + com.google.protobuf.DoubleValue.Builder, + com.google.protobuf.DoubleValueOrBuilder>( + getSpeed(), getParentForChildren(), isClean()); + speed_ = null; + } + return speedBuilder_; + } + + private com.google.protobuf.DoubleValue speedAccuracy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.DoubleValue, + com.google.protobuf.DoubleValue.Builder, + com.google.protobuf.DoubleValueOrBuilder> + speedAccuracyBuilder_; + /** + * + * + *
+     * Accuracy of `speed` in meters/second.
+     * 
+ * + * .google.protobuf.DoubleValue speed_accuracy = 7; + * + * @return Whether the speedAccuracy field is set. + */ + public boolean hasSpeedAccuracy() { + return ((bitField0_ & 0x00000800) != 0); + } + /** + * + * + *
+     * Accuracy of `speed` in meters/second.
+     * 
+ * + * .google.protobuf.DoubleValue speed_accuracy = 7; + * + * @return The speedAccuracy. + */ + public com.google.protobuf.DoubleValue getSpeedAccuracy() { + if (speedAccuracyBuilder_ == null) { + return speedAccuracy_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : speedAccuracy_; + } else { + return speedAccuracyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Accuracy of `speed` in meters/second.
+     * 
+ * + * .google.protobuf.DoubleValue speed_accuracy = 7; + */ + public Builder setSpeedAccuracy(com.google.protobuf.DoubleValue value) { + if (speedAccuracyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + speedAccuracy_ = value; + } else { + speedAccuracyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Accuracy of `speed` in meters/second.
+     * 
+ * + * .google.protobuf.DoubleValue speed_accuracy = 7; + */ + public Builder setSpeedAccuracy(com.google.protobuf.DoubleValue.Builder builderForValue) { + if (speedAccuracyBuilder_ == null) { + speedAccuracy_ = builderForValue.build(); + } else { + speedAccuracyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Accuracy of `speed` in meters/second.
+     * 
+ * + * .google.protobuf.DoubleValue speed_accuracy = 7; + */ + public Builder mergeSpeedAccuracy(com.google.protobuf.DoubleValue value) { + if (speedAccuracyBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) + && speedAccuracy_ != null + && speedAccuracy_ != com.google.protobuf.DoubleValue.getDefaultInstance()) { + getSpeedAccuracyBuilder().mergeFrom(value); + } else { + speedAccuracy_ = value; + } + } else { + speedAccuracyBuilder_.mergeFrom(value); + } + if (speedAccuracy_ != null) { + bitField0_ |= 0x00000800; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Accuracy of `speed` in meters/second.
+     * 
+ * + * .google.protobuf.DoubleValue speed_accuracy = 7; + */ + public Builder clearSpeedAccuracy() { + bitField0_ = (bitField0_ & ~0x00000800); + speedAccuracy_ = null; + if (speedAccuracyBuilder_ != null) { + speedAccuracyBuilder_.dispose(); + speedAccuracyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Accuracy of `speed` in meters/second.
+     * 
+ * + * .google.protobuf.DoubleValue speed_accuracy = 7; + */ + public com.google.protobuf.DoubleValue.Builder getSpeedAccuracyBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return getSpeedAccuracyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Accuracy of `speed` in meters/second.
+     * 
+ * + * .google.protobuf.DoubleValue speed_accuracy = 7; + */ + public com.google.protobuf.DoubleValueOrBuilder getSpeedAccuracyOrBuilder() { + if (speedAccuracyBuilder_ != null) { + return speedAccuracyBuilder_.getMessageOrBuilder(); + } else { + return speedAccuracy_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : speedAccuracy_; + } + } + /** + * + * + *
+     * Accuracy of `speed` in meters/second.
+     * 
+ * + * .google.protobuf.DoubleValue speed_accuracy = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.DoubleValue, + com.google.protobuf.DoubleValue.Builder, + com.google.protobuf.DoubleValueOrBuilder> + getSpeedAccuracyFieldBuilder() { + if (speedAccuracyBuilder_ == null) { + speedAccuracyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.DoubleValue, + com.google.protobuf.DoubleValue.Builder, + com.google.protobuf.DoubleValueOrBuilder>( + getSpeedAccuracy(), getParentForChildren(), isClean()); + speedAccuracy_ = null; + } + return speedAccuracyBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * The time when `location` was reported by the sensor according to the
+     * sensor's clock.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00001000) != 0); + } + /** + * + * + *
+     * The time when `location` was reported by the sensor according to the
+     * sensor's clock.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * + * @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(); + } + } + /** + * + * + *
+     * The time when `location` was reported by the sensor according to the
+     * sensor's clock.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * The time when `location` was reported by the sensor according to the
+     * sensor's clock.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * The time when `location` was reported by the sensor according to the
+     * sensor's clock.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00001000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The time when `location` was reported by the sensor according to the
+     * sensor's clock.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00001000); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The time when `location` was reported by the sensor according to the
+     * sensor's clock.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time when `location` was reported by the sensor according to the
+     * sensor's clock.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * The time when `location` was reported by the sensor according to the
+     * sensor's clock.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.Timestamp serverTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + serverTimeBuilder_; + /** + * + * + *
+     * Output only. The time when the server received the location information.
+     * 
+ * + * + * .google.protobuf.Timestamp server_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the serverTime field is set. + */ + public boolean hasServerTime() { + return ((bitField0_ & 0x00002000) != 0); + } + /** + * + * + *
+     * Output only. The time when the server received the location information.
+     * 
+ * + * + * .google.protobuf.Timestamp server_time = 13 [(.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 when the server received the location information.
+     * 
+ * + * + * .google.protobuf.Timestamp server_time = 13 [(.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_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the server received the location information.
+     * 
+ * + * + * .google.protobuf.Timestamp server_time = 13 [(.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_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the server received the location information.
+     * 
+ * + * + * .google.protobuf.Timestamp server_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeServerTime(com.google.protobuf.Timestamp value) { + if (serverTimeBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0) + && serverTime_ != null + && serverTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getServerTimeBuilder().mergeFrom(value); + } else { + serverTime_ = value; + } + } else { + serverTimeBuilder_.mergeFrom(value); + } + if (serverTime_ != null) { + bitField0_ |= 0x00002000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The time when the server received the location information.
+     * 
+ * + * + * .google.protobuf.Timestamp server_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearServerTime() { + bitField0_ = (bitField0_ & ~0x00002000); + serverTime_ = null; + if (serverTimeBuilder_ != null) { + serverTimeBuilder_.dispose(); + serverTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the server received the location information.
+     * 
+ * + * + * .google.protobuf.Timestamp server_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getServerTimeBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return getServerTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time when the server received the location information.
+     * 
+ * + * + * .google.protobuf.Timestamp server_time = 13 [(.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 when the server received the location information.
+     * 
+ * + * + * .google.protobuf.Timestamp server_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getServerTimeFieldBuilder() { + if (serverTimeBuilder_ == null) { + serverTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getServerTime(), getParentForChildren(), isClean()); + serverTime_ = null; + } + return serverTimeBuilder_; + } + + private int locationSensor_ = 0; + /** + * + * + *
+     * Provider of location data (for example, `GPS`).
+     * 
+ * + * .maps.fleetengine.v1.LocationSensor location_sensor = 11; + * + * @return The enum numeric value on the wire for locationSensor. + */ + @java.lang.Override + public int getLocationSensorValue() { + return locationSensor_; + } + /** + * + * + *
+     * Provider of location data (for example, `GPS`).
+     * 
+ * + * .maps.fleetengine.v1.LocationSensor location_sensor = 11; + * + * @param value The enum numeric value on the wire for locationSensor to set. + * @return This builder for chaining. + */ + public Builder setLocationSensorValue(int value) { + locationSensor_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Provider of location data (for example, `GPS`).
+     * 
+ * + * .maps.fleetengine.v1.LocationSensor location_sensor = 11; + * + * @return The locationSensor. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.LocationSensor getLocationSensor() { + com.google.maps.fleetengine.v1.LocationSensor result = + com.google.maps.fleetengine.v1.LocationSensor.forNumber(locationSensor_); + return result == null ? com.google.maps.fleetengine.v1.LocationSensor.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Provider of location data (for example, `GPS`).
+     * 
+ * + * .maps.fleetengine.v1.LocationSensor location_sensor = 11; + * + * @param value The locationSensor to set. + * @return This builder for chaining. + */ + public Builder setLocationSensor(com.google.maps.fleetengine.v1.LocationSensor value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00004000; + locationSensor_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Provider of location data (for example, `GPS`).
+     * 
+ * + * .maps.fleetengine.v1.LocationSensor location_sensor = 11; + * + * @return This builder for chaining. + */ + public Builder clearLocationSensor() { + bitField0_ = (bitField0_ & ~0x00004000); + locationSensor_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.BoolValue isRoadSnapped_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, + com.google.protobuf.BoolValue.Builder, + com.google.protobuf.BoolValueOrBuilder> + isRoadSnappedBuilder_; + /** + * + * + *
+     * Whether `location` is snapped to a road.
+     * 
+ * + * .google.protobuf.BoolValue is_road_snapped = 27; + * + * @return Whether the isRoadSnapped field is set. + */ + public boolean hasIsRoadSnapped() { + return ((bitField0_ & 0x00008000) != 0); + } + /** + * + * + *
+     * Whether `location` is snapped to a road.
+     * 
+ * + * .google.protobuf.BoolValue is_road_snapped = 27; + * + * @return The isRoadSnapped. + */ + public com.google.protobuf.BoolValue getIsRoadSnapped() { + if (isRoadSnappedBuilder_ == null) { + return isRoadSnapped_ == null + ? com.google.protobuf.BoolValue.getDefaultInstance() + : isRoadSnapped_; + } else { + return isRoadSnappedBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Whether `location` is snapped to a road.
+     * 
+ * + * .google.protobuf.BoolValue is_road_snapped = 27; + */ + public Builder setIsRoadSnapped(com.google.protobuf.BoolValue value) { + if (isRoadSnappedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + isRoadSnapped_ = value; + } else { + isRoadSnappedBuilder_.setMessage(value); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether `location` is snapped to a road.
+     * 
+ * + * .google.protobuf.BoolValue is_road_snapped = 27; + */ + public Builder setIsRoadSnapped(com.google.protobuf.BoolValue.Builder builderForValue) { + if (isRoadSnappedBuilder_ == null) { + isRoadSnapped_ = builderForValue.build(); + } else { + isRoadSnappedBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether `location` is snapped to a road.
+     * 
+ * + * .google.protobuf.BoolValue is_road_snapped = 27; + */ + public Builder mergeIsRoadSnapped(com.google.protobuf.BoolValue value) { + if (isRoadSnappedBuilder_ == null) { + if (((bitField0_ & 0x00008000) != 0) + && isRoadSnapped_ != null + && isRoadSnapped_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getIsRoadSnappedBuilder().mergeFrom(value); + } else { + isRoadSnapped_ = value; + } + } else { + isRoadSnappedBuilder_.mergeFrom(value); + } + if (isRoadSnapped_ != null) { + bitField0_ |= 0x00008000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Whether `location` is snapped to a road.
+     * 
+ * + * .google.protobuf.BoolValue is_road_snapped = 27; + */ + public Builder clearIsRoadSnapped() { + bitField0_ = (bitField0_ & ~0x00008000); + isRoadSnapped_ = null; + if (isRoadSnappedBuilder_ != null) { + isRoadSnappedBuilder_.dispose(); + isRoadSnappedBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Whether `location` is snapped to a road.
+     * 
+ * + * .google.protobuf.BoolValue is_road_snapped = 27; + */ + public com.google.protobuf.BoolValue.Builder getIsRoadSnappedBuilder() { + bitField0_ |= 0x00008000; + onChanged(); + return getIsRoadSnappedFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Whether `location` is snapped to a road.
+     * 
+ * + * .google.protobuf.BoolValue is_road_snapped = 27; + */ + public com.google.protobuf.BoolValueOrBuilder getIsRoadSnappedOrBuilder() { + if (isRoadSnappedBuilder_ != null) { + return isRoadSnappedBuilder_.getMessageOrBuilder(); + } else { + return isRoadSnapped_ == null + ? com.google.protobuf.BoolValue.getDefaultInstance() + : isRoadSnapped_; + } + } + /** + * + * + *
+     * Whether `location` is snapped to a road.
+     * 
+ * + * .google.protobuf.BoolValue is_road_snapped = 27; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, + com.google.protobuf.BoolValue.Builder, + com.google.protobuf.BoolValueOrBuilder> + getIsRoadSnappedFieldBuilder() { + if (isRoadSnappedBuilder_ == null) { + isRoadSnappedBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, + com.google.protobuf.BoolValue.Builder, + com.google.protobuf.BoolValueOrBuilder>( + getIsRoadSnapped(), getParentForChildren(), isClean()); + isRoadSnapped_ = null; + } + return isRoadSnappedBuilder_; + } + + private com.google.protobuf.BoolValue isGpsSensorEnabled_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, + com.google.protobuf.BoolValue.Builder, + com.google.protobuf.BoolValueOrBuilder> + isGpsSensorEnabledBuilder_; + /** + * + * + *
+     * Input only. Indicates whether the GPS sensor is enabled on the mobile
+     * device.
+     * 
+ * + * + * .google.protobuf.BoolValue is_gps_sensor_enabled = 12 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the isGpsSensorEnabled field is set. + */ + public boolean hasIsGpsSensorEnabled() { + return ((bitField0_ & 0x00010000) != 0); + } + /** + * + * + *
+     * Input only. Indicates whether the GPS sensor is enabled on the mobile
+     * device.
+     * 
+ * + * + * .google.protobuf.BoolValue is_gps_sensor_enabled = 12 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The isGpsSensorEnabled. + */ + public com.google.protobuf.BoolValue getIsGpsSensorEnabled() { + if (isGpsSensorEnabledBuilder_ == null) { + return isGpsSensorEnabled_ == null + ? com.google.protobuf.BoolValue.getDefaultInstance() + : isGpsSensorEnabled_; + } else { + return isGpsSensorEnabledBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Input only. Indicates whether the GPS sensor is enabled on the mobile
+     * device.
+     * 
+ * + * + * .google.protobuf.BoolValue is_gps_sensor_enabled = 12 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setIsGpsSensorEnabled(com.google.protobuf.BoolValue value) { + if (isGpsSensorEnabledBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + isGpsSensorEnabled_ = value; + } else { + isGpsSensorEnabledBuilder_.setMessage(value); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. Indicates whether the GPS sensor is enabled on the mobile
+     * device.
+     * 
+ * + * + * .google.protobuf.BoolValue is_gps_sensor_enabled = 12 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setIsGpsSensorEnabled(com.google.protobuf.BoolValue.Builder builderForValue) { + if (isGpsSensorEnabledBuilder_ == null) { + isGpsSensorEnabled_ = builderForValue.build(); + } else { + isGpsSensorEnabledBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. Indicates whether the GPS sensor is enabled on the mobile
+     * device.
+     * 
+ * + * + * .google.protobuf.BoolValue is_gps_sensor_enabled = 12 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder mergeIsGpsSensorEnabled(com.google.protobuf.BoolValue value) { + if (isGpsSensorEnabledBuilder_ == null) { + if (((bitField0_ & 0x00010000) != 0) + && isGpsSensorEnabled_ != null + && isGpsSensorEnabled_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getIsGpsSensorEnabledBuilder().mergeFrom(value); + } else { + isGpsSensorEnabled_ = value; + } + } else { + isGpsSensorEnabledBuilder_.mergeFrom(value); + } + if (isGpsSensorEnabled_ != null) { + bitField0_ |= 0x00010000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Input only. Indicates whether the GPS sensor is enabled on the mobile
+     * device.
+     * 
+ * + * + * .google.protobuf.BoolValue is_gps_sensor_enabled = 12 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder clearIsGpsSensorEnabled() { + bitField0_ = (bitField0_ & ~0x00010000); + isGpsSensorEnabled_ = null; + if (isGpsSensorEnabledBuilder_ != null) { + isGpsSensorEnabledBuilder_.dispose(); + isGpsSensorEnabledBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. Indicates whether the GPS sensor is enabled on the mobile
+     * device.
+     * 
+ * + * + * .google.protobuf.BoolValue is_gps_sensor_enabled = 12 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.protobuf.BoolValue.Builder getIsGpsSensorEnabledBuilder() { + bitField0_ |= 0x00010000; + onChanged(); + return getIsGpsSensorEnabledFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Input only. Indicates whether the GPS sensor is enabled on the mobile
+     * device.
+     * 
+ * + * + * .google.protobuf.BoolValue is_gps_sensor_enabled = 12 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.protobuf.BoolValueOrBuilder getIsGpsSensorEnabledOrBuilder() { + if (isGpsSensorEnabledBuilder_ != null) { + return isGpsSensorEnabledBuilder_.getMessageOrBuilder(); + } else { + return isGpsSensorEnabled_ == null + ? com.google.protobuf.BoolValue.getDefaultInstance() + : isGpsSensorEnabled_; + } + } + /** + * + * + *
+     * Input only. Indicates whether the GPS sensor is enabled on the mobile
+     * device.
+     * 
+ * + * + * .google.protobuf.BoolValue is_gps_sensor_enabled = 12 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, + com.google.protobuf.BoolValue.Builder, + com.google.protobuf.BoolValueOrBuilder> + getIsGpsSensorEnabledFieldBuilder() { + if (isGpsSensorEnabledBuilder_ == null) { + isGpsSensorEnabledBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, + com.google.protobuf.BoolValue.Builder, + com.google.protobuf.BoolValueOrBuilder>( + getIsGpsSensorEnabled(), getParentForChildren(), isClean()); + isGpsSensorEnabled_ = null; + } + return isGpsSensorEnabledBuilder_; + } + + private com.google.protobuf.Int32Value timeSinceUpdate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + timeSinceUpdateBuilder_; + /** + * + * + *
+     * Input only. Time (in seconds) since this location was first sent to the
+     * server. This will be zero for the first update. If the time is unknown (for
+     * example, when the app restarts), this value resets to zero.
+     * 
+ * + * + * .google.protobuf.Int32Value time_since_update = 14 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the timeSinceUpdate field is set. + */ + public boolean hasTimeSinceUpdate() { + return ((bitField0_ & 0x00020000) != 0); + } + /** + * + * + *
+     * Input only. Time (in seconds) since this location was first sent to the
+     * server. This will be zero for the first update. If the time is unknown (for
+     * example, when the app restarts), this value resets to zero.
+     * 
+ * + * + * .google.protobuf.Int32Value time_since_update = 14 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The timeSinceUpdate. + */ + public com.google.protobuf.Int32Value getTimeSinceUpdate() { + if (timeSinceUpdateBuilder_ == null) { + return timeSinceUpdate_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : timeSinceUpdate_; + } else { + return timeSinceUpdateBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Input only. Time (in seconds) since this location was first sent to the
+     * server. This will be zero for the first update. If the time is unknown (for
+     * example, when the app restarts), this value resets to zero.
+     * 
+ * + * + * .google.protobuf.Int32Value time_since_update = 14 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setTimeSinceUpdate(com.google.protobuf.Int32Value value) { + if (timeSinceUpdateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeSinceUpdate_ = value; + } else { + timeSinceUpdateBuilder_.setMessage(value); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. Time (in seconds) since this location was first sent to the
+     * server. This will be zero for the first update. If the time is unknown (for
+     * example, when the app restarts), this value resets to zero.
+     * 
+ * + * + * .google.protobuf.Int32Value time_since_update = 14 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setTimeSinceUpdate(com.google.protobuf.Int32Value.Builder builderForValue) { + if (timeSinceUpdateBuilder_ == null) { + timeSinceUpdate_ = builderForValue.build(); + } else { + timeSinceUpdateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. Time (in seconds) since this location was first sent to the
+     * server. This will be zero for the first update. If the time is unknown (for
+     * example, when the app restarts), this value resets to zero.
+     * 
+ * + * + * .google.protobuf.Int32Value time_since_update = 14 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder mergeTimeSinceUpdate(com.google.protobuf.Int32Value value) { + if (timeSinceUpdateBuilder_ == null) { + if (((bitField0_ & 0x00020000) != 0) + && timeSinceUpdate_ != null + && timeSinceUpdate_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getTimeSinceUpdateBuilder().mergeFrom(value); + } else { + timeSinceUpdate_ = value; + } + } else { + timeSinceUpdateBuilder_.mergeFrom(value); + } + if (timeSinceUpdate_ != null) { + bitField0_ |= 0x00020000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Input only. Time (in seconds) since this location was first sent to the
+     * server. This will be zero for the first update. If the time is unknown (for
+     * example, when the app restarts), this value resets to zero.
+     * 
+ * + * + * .google.protobuf.Int32Value time_since_update = 14 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder clearTimeSinceUpdate() { + bitField0_ = (bitField0_ & ~0x00020000); + timeSinceUpdate_ = null; + if (timeSinceUpdateBuilder_ != null) { + timeSinceUpdateBuilder_.dispose(); + timeSinceUpdateBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. Time (in seconds) since this location was first sent to the
+     * server. This will be zero for the first update. If the time is unknown (for
+     * example, when the app restarts), this value resets to zero.
+     * 
+ * + * + * .google.protobuf.Int32Value time_since_update = 14 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.protobuf.Int32Value.Builder getTimeSinceUpdateBuilder() { + bitField0_ |= 0x00020000; + onChanged(); + return getTimeSinceUpdateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Input only. Time (in seconds) since this location was first sent to the
+     * server. This will be zero for the first update. If the time is unknown (for
+     * example, when the app restarts), this value resets to zero.
+     * 
+ * + * + * .google.protobuf.Int32Value time_since_update = 14 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.protobuf.Int32ValueOrBuilder getTimeSinceUpdateOrBuilder() { + if (timeSinceUpdateBuilder_ != null) { + return timeSinceUpdateBuilder_.getMessageOrBuilder(); + } else { + return timeSinceUpdate_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : timeSinceUpdate_; + } + } + /** + * + * + *
+     * Input only. Time (in seconds) since this location was first sent to the
+     * server. This will be zero for the first update. If the time is unknown (for
+     * example, when the app restarts), this value resets to zero.
+     * 
+ * + * + * .google.protobuf.Int32Value time_since_update = 14 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + getTimeSinceUpdateFieldBuilder() { + if (timeSinceUpdateBuilder_ == null) { + timeSinceUpdateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder>( + getTimeSinceUpdate(), getParentForChildren(), isClean()); + timeSinceUpdate_ = null; + } + return timeSinceUpdateBuilder_; + } + + private com.google.protobuf.Int32Value numStaleUpdates_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + numStaleUpdatesBuilder_; + /** + * + * + *
+     * Input only. Deprecated: Other signals are now used to determine if a
+     * location is stale.
+     * 
+ * + * + * .google.protobuf.Int32Value num_stale_updates = 15 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @deprecated maps.fleetengine.v1.VehicleLocation.num_stale_updates is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=268 + * @return Whether the numStaleUpdates field is set. + */ + @java.lang.Deprecated + public boolean hasNumStaleUpdates() { + return ((bitField0_ & 0x00040000) != 0); + } + /** + * + * + *
+     * Input only. Deprecated: Other signals are now used to determine if a
+     * location is stale.
+     * 
+ * + * + * .google.protobuf.Int32Value num_stale_updates = 15 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @deprecated maps.fleetengine.v1.VehicleLocation.num_stale_updates is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=268 + * @return The numStaleUpdates. + */ + @java.lang.Deprecated + public com.google.protobuf.Int32Value getNumStaleUpdates() { + if (numStaleUpdatesBuilder_ == null) { + return numStaleUpdates_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : numStaleUpdates_; + } else { + return numStaleUpdatesBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Input only. Deprecated: Other signals are now used to determine if a
+     * location is stale.
+     * 
+ * + * + * .google.protobuf.Int32Value num_stale_updates = 15 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Deprecated + public Builder setNumStaleUpdates(com.google.protobuf.Int32Value value) { + if (numStaleUpdatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + numStaleUpdates_ = value; + } else { + numStaleUpdatesBuilder_.setMessage(value); + } + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. Deprecated: Other signals are now used to determine if a
+     * location is stale.
+     * 
+ * + * + * .google.protobuf.Int32Value num_stale_updates = 15 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Deprecated + public Builder setNumStaleUpdates(com.google.protobuf.Int32Value.Builder builderForValue) { + if (numStaleUpdatesBuilder_ == null) { + numStaleUpdates_ = builderForValue.build(); + } else { + numStaleUpdatesBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. Deprecated: Other signals are now used to determine if a
+     * location is stale.
+     * 
+ * + * + * .google.protobuf.Int32Value num_stale_updates = 15 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Deprecated + public Builder mergeNumStaleUpdates(com.google.protobuf.Int32Value value) { + if (numStaleUpdatesBuilder_ == null) { + if (((bitField0_ & 0x00040000) != 0) + && numStaleUpdates_ != null + && numStaleUpdates_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getNumStaleUpdatesBuilder().mergeFrom(value); + } else { + numStaleUpdates_ = value; + } + } else { + numStaleUpdatesBuilder_.mergeFrom(value); + } + if (numStaleUpdates_ != null) { + bitField0_ |= 0x00040000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Input only. Deprecated: Other signals are now used to determine if a
+     * location is stale.
+     * 
+ * + * + * .google.protobuf.Int32Value num_stale_updates = 15 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Deprecated + public Builder clearNumStaleUpdates() { + bitField0_ = (bitField0_ & ~0x00040000); + numStaleUpdates_ = null; + if (numStaleUpdatesBuilder_ != null) { + numStaleUpdatesBuilder_.dispose(); + numStaleUpdatesBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. Deprecated: Other signals are now used to determine if a
+     * location is stale.
+     * 
+ * + * + * .google.protobuf.Int32Value num_stale_updates = 15 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Deprecated + public com.google.protobuf.Int32Value.Builder getNumStaleUpdatesBuilder() { + bitField0_ |= 0x00040000; + onChanged(); + return getNumStaleUpdatesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Input only. Deprecated: Other signals are now used to determine if a
+     * location is stale.
+     * 
+ * + * + * .google.protobuf.Int32Value num_stale_updates = 15 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Deprecated + public com.google.protobuf.Int32ValueOrBuilder getNumStaleUpdatesOrBuilder() { + if (numStaleUpdatesBuilder_ != null) { + return numStaleUpdatesBuilder_.getMessageOrBuilder(); + } else { + return numStaleUpdates_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : numStaleUpdates_; + } + } + /** + * + * + *
+     * Input only. Deprecated: Other signals are now used to determine if a
+     * location is stale.
+     * 
+ * + * + * .google.protobuf.Int32Value num_stale_updates = 15 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + getNumStaleUpdatesFieldBuilder() { + if (numStaleUpdatesBuilder_ == null) { + numStaleUpdatesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder>( + getNumStaleUpdates(), getParentForChildren(), isClean()); + numStaleUpdates_ = null; + } + return numStaleUpdatesBuilder_; + } + + private com.google.type.LatLng rawLocation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + rawLocationBuilder_; + /** + * + * + *
+     * Raw vehicle location (unprocessed by road-snapper).
+     * 
+ * + * .google.type.LatLng raw_location = 16; + * + * @return Whether the rawLocation field is set. + */ + public boolean hasRawLocation() { + return ((bitField0_ & 0x00080000) != 0); + } + /** + * + * + *
+     * Raw vehicle location (unprocessed by road-snapper).
+     * 
+ * + * .google.type.LatLng raw_location = 16; + * + * @return The rawLocation. + */ + public com.google.type.LatLng getRawLocation() { + if (rawLocationBuilder_ == null) { + return rawLocation_ == null ? com.google.type.LatLng.getDefaultInstance() : rawLocation_; + } else { + return rawLocationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Raw vehicle location (unprocessed by road-snapper).
+     * 
+ * + * .google.type.LatLng raw_location = 16; + */ + public Builder setRawLocation(com.google.type.LatLng value) { + if (rawLocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rawLocation_ = value; + } else { + rawLocationBuilder_.setMessage(value); + } + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * + * + *
+     * Raw vehicle location (unprocessed by road-snapper).
+     * 
+ * + * .google.type.LatLng raw_location = 16; + */ + public Builder setRawLocation(com.google.type.LatLng.Builder builderForValue) { + if (rawLocationBuilder_ == null) { + rawLocation_ = builderForValue.build(); + } else { + rawLocationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * + * + *
+     * Raw vehicle location (unprocessed by road-snapper).
+     * 
+ * + * .google.type.LatLng raw_location = 16; + */ + public Builder mergeRawLocation(com.google.type.LatLng value) { + if (rawLocationBuilder_ == null) { + if (((bitField0_ & 0x00080000) != 0) + && rawLocation_ != null + && rawLocation_ != com.google.type.LatLng.getDefaultInstance()) { + getRawLocationBuilder().mergeFrom(value); + } else { + rawLocation_ = value; + } + } else { + rawLocationBuilder_.mergeFrom(value); + } + if (rawLocation_ != null) { + bitField0_ |= 0x00080000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Raw vehicle location (unprocessed by road-snapper).
+     * 
+ * + * .google.type.LatLng raw_location = 16; + */ + public Builder clearRawLocation() { + bitField0_ = (bitField0_ & ~0x00080000); + rawLocation_ = null; + if (rawLocationBuilder_ != null) { + rawLocationBuilder_.dispose(); + rawLocationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Raw vehicle location (unprocessed by road-snapper).
+     * 
+ * + * .google.type.LatLng raw_location = 16; + */ + public com.google.type.LatLng.Builder getRawLocationBuilder() { + bitField0_ |= 0x00080000; + onChanged(); + return getRawLocationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Raw vehicle location (unprocessed by road-snapper).
+     * 
+ * + * .google.type.LatLng raw_location = 16; + */ + public com.google.type.LatLngOrBuilder getRawLocationOrBuilder() { + if (rawLocationBuilder_ != null) { + return rawLocationBuilder_.getMessageOrBuilder(); + } else { + return rawLocation_ == null ? com.google.type.LatLng.getDefaultInstance() : rawLocation_; + } + } + /** + * + * + *
+     * Raw vehicle location (unprocessed by road-snapper).
+     * 
+ * + * .google.type.LatLng raw_location = 16; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + getRawLocationFieldBuilder() { + if (rawLocationBuilder_ == null) { + rawLocationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, + com.google.type.LatLng.Builder, + com.google.type.LatLngOrBuilder>( + getRawLocation(), getParentForChildren(), isClean()); + rawLocation_ = null; + } + return rawLocationBuilder_; + } + + private com.google.protobuf.Timestamp rawLocationTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + rawLocationTimeBuilder_; + /** + * + * + *
+     * Timestamp associated with the raw location.
+     * 
+ * + * .google.protobuf.Timestamp raw_location_time = 17; + * + * @return Whether the rawLocationTime field is set. + */ + public boolean hasRawLocationTime() { + return ((bitField0_ & 0x00100000) != 0); + } + /** + * + * + *
+     * Timestamp associated with the raw location.
+     * 
+ * + * .google.protobuf.Timestamp raw_location_time = 17; + * + * @return The rawLocationTime. + */ + public com.google.protobuf.Timestamp getRawLocationTime() { + if (rawLocationTimeBuilder_ == null) { + return rawLocationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : rawLocationTime_; + } else { + return rawLocationTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Timestamp associated with the raw location.
+     * 
+ * + * .google.protobuf.Timestamp raw_location_time = 17; + */ + public Builder setRawLocationTime(com.google.protobuf.Timestamp value) { + if (rawLocationTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rawLocationTime_ = value; + } else { + rawLocationTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + * + * + *
+     * Timestamp associated with the raw location.
+     * 
+ * + * .google.protobuf.Timestamp raw_location_time = 17; + */ + public Builder setRawLocationTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (rawLocationTimeBuilder_ == null) { + rawLocationTime_ = builderForValue.build(); + } else { + rawLocationTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + * + * + *
+     * Timestamp associated with the raw location.
+     * 
+ * + * .google.protobuf.Timestamp raw_location_time = 17; + */ + public Builder mergeRawLocationTime(com.google.protobuf.Timestamp value) { + if (rawLocationTimeBuilder_ == null) { + if (((bitField0_ & 0x00100000) != 0) + && rawLocationTime_ != null + && rawLocationTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getRawLocationTimeBuilder().mergeFrom(value); + } else { + rawLocationTime_ = value; + } + } else { + rawLocationTimeBuilder_.mergeFrom(value); + } + if (rawLocationTime_ != null) { + bitField0_ |= 0x00100000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Timestamp associated with the raw location.
+     * 
+ * + * .google.protobuf.Timestamp raw_location_time = 17; + */ + public Builder clearRawLocationTime() { + bitField0_ = (bitField0_ & ~0x00100000); + rawLocationTime_ = null; + if (rawLocationTimeBuilder_ != null) { + rawLocationTimeBuilder_.dispose(); + rawLocationTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Timestamp associated with the raw location.
+     * 
+ * + * .google.protobuf.Timestamp raw_location_time = 17; + */ + public com.google.protobuf.Timestamp.Builder getRawLocationTimeBuilder() { + bitField0_ |= 0x00100000; + onChanged(); + return getRawLocationTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Timestamp associated with the raw location.
+     * 
+ * + * .google.protobuf.Timestamp raw_location_time = 17; + */ + public com.google.protobuf.TimestampOrBuilder getRawLocationTimeOrBuilder() { + if (rawLocationTimeBuilder_ != null) { + return rawLocationTimeBuilder_.getMessageOrBuilder(); + } else { + return rawLocationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : rawLocationTime_; + } + } + /** + * + * + *
+     * Timestamp associated with the raw location.
+     * 
+ * + * .google.protobuf.Timestamp raw_location_time = 17; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getRawLocationTimeFieldBuilder() { + if (rawLocationTimeBuilder_ == null) { + rawLocationTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getRawLocationTime(), getParentForChildren(), isClean()); + rawLocationTime_ = null; + } + return rawLocationTimeBuilder_; + } + + private int rawLocationSensor_ = 0; + /** + * + * + *
+     * Source of the raw location. Defaults to `GPS`.
+     * 
+ * + * .maps.fleetengine.v1.LocationSensor raw_location_sensor = 28; + * + * @return The enum numeric value on the wire for rawLocationSensor. + */ + @java.lang.Override + public int getRawLocationSensorValue() { + return rawLocationSensor_; + } + /** + * + * + *
+     * Source of the raw location. Defaults to `GPS`.
+     * 
+ * + * .maps.fleetengine.v1.LocationSensor raw_location_sensor = 28; + * + * @param value The enum numeric value on the wire for rawLocationSensor to set. + * @return This builder for chaining. + */ + public Builder setRawLocationSensorValue(int value) { + rawLocationSensor_ = value; + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + /** + * + * + *
+     * Source of the raw location. Defaults to `GPS`.
+     * 
+ * + * .maps.fleetengine.v1.LocationSensor raw_location_sensor = 28; + * + * @return The rawLocationSensor. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.LocationSensor getRawLocationSensor() { + com.google.maps.fleetengine.v1.LocationSensor result = + com.google.maps.fleetengine.v1.LocationSensor.forNumber(rawLocationSensor_); + return result == null ? com.google.maps.fleetengine.v1.LocationSensor.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Source of the raw location. Defaults to `GPS`.
+     * 
+ * + * .maps.fleetengine.v1.LocationSensor raw_location_sensor = 28; + * + * @param value The rawLocationSensor to set. + * @return This builder for chaining. + */ + public Builder setRawLocationSensor(com.google.maps.fleetengine.v1.LocationSensor value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00200000; + rawLocationSensor_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Source of the raw location. Defaults to `GPS`.
+     * 
+ * + * .maps.fleetengine.v1.LocationSensor raw_location_sensor = 28; + * + * @return This builder for chaining. + */ + public Builder clearRawLocationSensor() { + bitField0_ = (bitField0_ & ~0x00200000); + rawLocationSensor_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.DoubleValue rawLocationAccuracy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.DoubleValue, + com.google.protobuf.DoubleValue.Builder, + com.google.protobuf.DoubleValueOrBuilder> + rawLocationAccuracyBuilder_; + /** + * + * + *
+     * Accuracy of `raw_location` as a radius, in meters.
+     * 
+ * + * .google.protobuf.DoubleValue raw_location_accuracy = 25; + * + * @return Whether the rawLocationAccuracy field is set. + */ + public boolean hasRawLocationAccuracy() { + return ((bitField0_ & 0x00400000) != 0); + } + /** + * + * + *
+     * Accuracy of `raw_location` as a radius, in meters.
+     * 
+ * + * .google.protobuf.DoubleValue raw_location_accuracy = 25; + * + * @return The rawLocationAccuracy. + */ + public com.google.protobuf.DoubleValue getRawLocationAccuracy() { + if (rawLocationAccuracyBuilder_ == null) { + return rawLocationAccuracy_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : rawLocationAccuracy_; + } else { + return rawLocationAccuracyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Accuracy of `raw_location` as a radius, in meters.
+     * 
+ * + * .google.protobuf.DoubleValue raw_location_accuracy = 25; + */ + public Builder setRawLocationAccuracy(com.google.protobuf.DoubleValue value) { + if (rawLocationAccuracyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rawLocationAccuracy_ = value; + } else { + rawLocationAccuracyBuilder_.setMessage(value); + } + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + /** + * + * + *
+     * Accuracy of `raw_location` as a radius, in meters.
+     * 
+ * + * .google.protobuf.DoubleValue raw_location_accuracy = 25; + */ + public Builder setRawLocationAccuracy(com.google.protobuf.DoubleValue.Builder builderForValue) { + if (rawLocationAccuracyBuilder_ == null) { + rawLocationAccuracy_ = builderForValue.build(); + } else { + rawLocationAccuracyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + /** + * + * + *
+     * Accuracy of `raw_location` as a radius, in meters.
+     * 
+ * + * .google.protobuf.DoubleValue raw_location_accuracy = 25; + */ + public Builder mergeRawLocationAccuracy(com.google.protobuf.DoubleValue value) { + if (rawLocationAccuracyBuilder_ == null) { + if (((bitField0_ & 0x00400000) != 0) + && rawLocationAccuracy_ != null + && rawLocationAccuracy_ != com.google.protobuf.DoubleValue.getDefaultInstance()) { + getRawLocationAccuracyBuilder().mergeFrom(value); + } else { + rawLocationAccuracy_ = value; + } + } else { + rawLocationAccuracyBuilder_.mergeFrom(value); + } + if (rawLocationAccuracy_ != null) { + bitField0_ |= 0x00400000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Accuracy of `raw_location` as a radius, in meters.
+     * 
+ * + * .google.protobuf.DoubleValue raw_location_accuracy = 25; + */ + public Builder clearRawLocationAccuracy() { + bitField0_ = (bitField0_ & ~0x00400000); + rawLocationAccuracy_ = null; + if (rawLocationAccuracyBuilder_ != null) { + rawLocationAccuracyBuilder_.dispose(); + rawLocationAccuracyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Accuracy of `raw_location` as a radius, in meters.
+     * 
+ * + * .google.protobuf.DoubleValue raw_location_accuracy = 25; + */ + public com.google.protobuf.DoubleValue.Builder getRawLocationAccuracyBuilder() { + bitField0_ |= 0x00400000; + onChanged(); + return getRawLocationAccuracyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Accuracy of `raw_location` as a radius, in meters.
+     * 
+ * + * .google.protobuf.DoubleValue raw_location_accuracy = 25; + */ + public com.google.protobuf.DoubleValueOrBuilder getRawLocationAccuracyOrBuilder() { + if (rawLocationAccuracyBuilder_ != null) { + return rawLocationAccuracyBuilder_.getMessageOrBuilder(); + } else { + return rawLocationAccuracy_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : rawLocationAccuracy_; + } + } + /** + * + * + *
+     * Accuracy of `raw_location` as a radius, in meters.
+     * 
+ * + * .google.protobuf.DoubleValue raw_location_accuracy = 25; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.DoubleValue, + com.google.protobuf.DoubleValue.Builder, + com.google.protobuf.DoubleValueOrBuilder> + getRawLocationAccuracyFieldBuilder() { + if (rawLocationAccuracyBuilder_ == null) { + rawLocationAccuracyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.DoubleValue, + com.google.protobuf.DoubleValue.Builder, + com.google.protobuf.DoubleValueOrBuilder>( + getRawLocationAccuracy(), getParentForChildren(), isClean()); + rawLocationAccuracy_ = null; + } + return rawLocationAccuracyBuilder_; + } + + private com.google.type.LatLng supplementalLocation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + supplementalLocationBuilder_; + /** + * + * + *
+     * Supplemental location provided by the integrating app.
+     * 
+ * + * .google.type.LatLng supplemental_location = 18; + * + * @return Whether the supplementalLocation field is set. + */ + public boolean hasSupplementalLocation() { + return ((bitField0_ & 0x00800000) != 0); + } + /** + * + * + *
+     * Supplemental location provided by the integrating app.
+     * 
+ * + * .google.type.LatLng supplemental_location = 18; + * + * @return The supplementalLocation. + */ + public com.google.type.LatLng getSupplementalLocation() { + if (supplementalLocationBuilder_ == null) { + return supplementalLocation_ == null + ? com.google.type.LatLng.getDefaultInstance() + : supplementalLocation_; + } else { + return supplementalLocationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Supplemental location provided by the integrating app.
+     * 
+ * + * .google.type.LatLng supplemental_location = 18; + */ + public Builder setSupplementalLocation(com.google.type.LatLng value) { + if (supplementalLocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + supplementalLocation_ = value; + } else { + supplementalLocationBuilder_.setMessage(value); + } + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + /** + * + * + *
+     * Supplemental location provided by the integrating app.
+     * 
+ * + * .google.type.LatLng supplemental_location = 18; + */ + public Builder setSupplementalLocation(com.google.type.LatLng.Builder builderForValue) { + if (supplementalLocationBuilder_ == null) { + supplementalLocation_ = builderForValue.build(); + } else { + supplementalLocationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + /** + * + * + *
+     * Supplemental location provided by the integrating app.
+     * 
+ * + * .google.type.LatLng supplemental_location = 18; + */ + public Builder mergeSupplementalLocation(com.google.type.LatLng value) { + if (supplementalLocationBuilder_ == null) { + if (((bitField0_ & 0x00800000) != 0) + && supplementalLocation_ != null + && supplementalLocation_ != com.google.type.LatLng.getDefaultInstance()) { + getSupplementalLocationBuilder().mergeFrom(value); + } else { + supplementalLocation_ = value; + } + } else { + supplementalLocationBuilder_.mergeFrom(value); + } + if (supplementalLocation_ != null) { + bitField0_ |= 0x00800000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Supplemental location provided by the integrating app.
+     * 
+ * + * .google.type.LatLng supplemental_location = 18; + */ + public Builder clearSupplementalLocation() { + bitField0_ = (bitField0_ & ~0x00800000); + supplementalLocation_ = null; + if (supplementalLocationBuilder_ != null) { + supplementalLocationBuilder_.dispose(); + supplementalLocationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Supplemental location provided by the integrating app.
+     * 
+ * + * .google.type.LatLng supplemental_location = 18; + */ + public com.google.type.LatLng.Builder getSupplementalLocationBuilder() { + bitField0_ |= 0x00800000; + onChanged(); + return getSupplementalLocationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Supplemental location provided by the integrating app.
+     * 
+ * + * .google.type.LatLng supplemental_location = 18; + */ + public com.google.type.LatLngOrBuilder getSupplementalLocationOrBuilder() { + if (supplementalLocationBuilder_ != null) { + return supplementalLocationBuilder_.getMessageOrBuilder(); + } else { + return supplementalLocation_ == null + ? com.google.type.LatLng.getDefaultInstance() + : supplementalLocation_; + } + } + /** + * + * + *
+     * Supplemental location provided by the integrating app.
+     * 
+ * + * .google.type.LatLng supplemental_location = 18; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + getSupplementalLocationFieldBuilder() { + if (supplementalLocationBuilder_ == null) { + supplementalLocationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, + com.google.type.LatLng.Builder, + com.google.type.LatLngOrBuilder>( + getSupplementalLocation(), getParentForChildren(), isClean()); + supplementalLocation_ = null; + } + return supplementalLocationBuilder_; + } + + private com.google.protobuf.Timestamp supplementalLocationTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + supplementalLocationTimeBuilder_; + /** + * + * + *
+     * Timestamp associated with the supplemental location.
+     * 
+ * + * .google.protobuf.Timestamp supplemental_location_time = 19; + * + * @return Whether the supplementalLocationTime field is set. + */ + public boolean hasSupplementalLocationTime() { + return ((bitField0_ & 0x01000000) != 0); + } + /** + * + * + *
+     * Timestamp associated with the supplemental location.
+     * 
+ * + * .google.protobuf.Timestamp supplemental_location_time = 19; + * + * @return The supplementalLocationTime. + */ + public com.google.protobuf.Timestamp getSupplementalLocationTime() { + if (supplementalLocationTimeBuilder_ == null) { + return supplementalLocationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : supplementalLocationTime_; + } else { + return supplementalLocationTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Timestamp associated with the supplemental location.
+     * 
+ * + * .google.protobuf.Timestamp supplemental_location_time = 19; + */ + public Builder setSupplementalLocationTime(com.google.protobuf.Timestamp value) { + if (supplementalLocationTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + supplementalLocationTime_ = value; + } else { + supplementalLocationTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Timestamp associated with the supplemental location.
+     * 
+ * + * .google.protobuf.Timestamp supplemental_location_time = 19; + */ + public Builder setSupplementalLocationTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (supplementalLocationTimeBuilder_ == null) { + supplementalLocationTime_ = builderForValue.build(); + } else { + supplementalLocationTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Timestamp associated with the supplemental location.
+     * 
+ * + * .google.protobuf.Timestamp supplemental_location_time = 19; + */ + public Builder mergeSupplementalLocationTime(com.google.protobuf.Timestamp value) { + if (supplementalLocationTimeBuilder_ == null) { + if (((bitField0_ & 0x01000000) != 0) + && supplementalLocationTime_ != null + && supplementalLocationTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getSupplementalLocationTimeBuilder().mergeFrom(value); + } else { + supplementalLocationTime_ = value; + } + } else { + supplementalLocationTimeBuilder_.mergeFrom(value); + } + if (supplementalLocationTime_ != null) { + bitField0_ |= 0x01000000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Timestamp associated with the supplemental location.
+     * 
+ * + * .google.protobuf.Timestamp supplemental_location_time = 19; + */ + public Builder clearSupplementalLocationTime() { + bitField0_ = (bitField0_ & ~0x01000000); + supplementalLocationTime_ = null; + if (supplementalLocationTimeBuilder_ != null) { + supplementalLocationTimeBuilder_.dispose(); + supplementalLocationTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Timestamp associated with the supplemental location.
+     * 
+ * + * .google.protobuf.Timestamp supplemental_location_time = 19; + */ + public com.google.protobuf.Timestamp.Builder getSupplementalLocationTimeBuilder() { + bitField0_ |= 0x01000000; + onChanged(); + return getSupplementalLocationTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Timestamp associated with the supplemental location.
+     * 
+ * + * .google.protobuf.Timestamp supplemental_location_time = 19; + */ + public com.google.protobuf.TimestampOrBuilder getSupplementalLocationTimeOrBuilder() { + if (supplementalLocationTimeBuilder_ != null) { + return supplementalLocationTimeBuilder_.getMessageOrBuilder(); + } else { + return supplementalLocationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : supplementalLocationTime_; + } + } + /** + * + * + *
+     * Timestamp associated with the supplemental location.
+     * 
+ * + * .google.protobuf.Timestamp supplemental_location_time = 19; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getSupplementalLocationTimeFieldBuilder() { + if (supplementalLocationTimeBuilder_ == null) { + supplementalLocationTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getSupplementalLocationTime(), getParentForChildren(), isClean()); + supplementalLocationTime_ = null; + } + return supplementalLocationTimeBuilder_; + } + + private int supplementalLocationSensor_ = 0; + /** + * + * + *
+     * Source of the supplemental location. Defaults to
+     * `CUSTOMER_SUPPLIED_LOCATION`.
+     * 
+ * + * .maps.fleetengine.v1.LocationSensor supplemental_location_sensor = 20; + * + * @return The enum numeric value on the wire for supplementalLocationSensor. + */ + @java.lang.Override + public int getSupplementalLocationSensorValue() { + return supplementalLocationSensor_; + } + /** + * + * + *
+     * Source of the supplemental location. Defaults to
+     * `CUSTOMER_SUPPLIED_LOCATION`.
+     * 
+ * + * .maps.fleetengine.v1.LocationSensor supplemental_location_sensor = 20; + * + * @param value The enum numeric value on the wire for supplementalLocationSensor to set. + * @return This builder for chaining. + */ + public Builder setSupplementalLocationSensorValue(int value) { + supplementalLocationSensor_ = value; + bitField0_ |= 0x02000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Source of the supplemental location. Defaults to
+     * `CUSTOMER_SUPPLIED_LOCATION`.
+     * 
+ * + * .maps.fleetengine.v1.LocationSensor supplemental_location_sensor = 20; + * + * @return The supplementalLocationSensor. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.LocationSensor getSupplementalLocationSensor() { + com.google.maps.fleetengine.v1.LocationSensor result = + com.google.maps.fleetengine.v1.LocationSensor.forNumber(supplementalLocationSensor_); + return result == null ? com.google.maps.fleetengine.v1.LocationSensor.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Source of the supplemental location. Defaults to
+     * `CUSTOMER_SUPPLIED_LOCATION`.
+     * 
+ * + * .maps.fleetengine.v1.LocationSensor supplemental_location_sensor = 20; + * + * @param value The supplementalLocationSensor to set. + * @return This builder for chaining. + */ + public Builder setSupplementalLocationSensor( + com.google.maps.fleetengine.v1.LocationSensor value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x02000000; + supplementalLocationSensor_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Source of the supplemental location. Defaults to
+     * `CUSTOMER_SUPPLIED_LOCATION`.
+     * 
+ * + * .maps.fleetengine.v1.LocationSensor supplemental_location_sensor = 20; + * + * @return This builder for chaining. + */ + public Builder clearSupplementalLocationSensor() { + bitField0_ = (bitField0_ & ~0x02000000); + supplementalLocationSensor_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.DoubleValue supplementalLocationAccuracy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.DoubleValue, + com.google.protobuf.DoubleValue.Builder, + com.google.protobuf.DoubleValueOrBuilder> + supplementalLocationAccuracyBuilder_; + /** + * + * + *
+     * Accuracy of `supplemental_location` as a radius, in meters.
+     * 
+ * + * .google.protobuf.DoubleValue supplemental_location_accuracy = 21; + * + * @return Whether the supplementalLocationAccuracy field is set. + */ + public boolean hasSupplementalLocationAccuracy() { + return ((bitField0_ & 0x04000000) != 0); + } + /** + * + * + *
+     * Accuracy of `supplemental_location` as a radius, in meters.
+     * 
+ * + * .google.protobuf.DoubleValue supplemental_location_accuracy = 21; + * + * @return The supplementalLocationAccuracy. + */ + public com.google.protobuf.DoubleValue getSupplementalLocationAccuracy() { + if (supplementalLocationAccuracyBuilder_ == null) { + return supplementalLocationAccuracy_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : supplementalLocationAccuracy_; + } else { + return supplementalLocationAccuracyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Accuracy of `supplemental_location` as a radius, in meters.
+     * 
+ * + * .google.protobuf.DoubleValue supplemental_location_accuracy = 21; + */ + public Builder setSupplementalLocationAccuracy(com.google.protobuf.DoubleValue value) { + if (supplementalLocationAccuracyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + supplementalLocationAccuracy_ = value; + } else { + supplementalLocationAccuracyBuilder_.setMessage(value); + } + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Accuracy of `supplemental_location` as a radius, in meters.
+     * 
+ * + * .google.protobuf.DoubleValue supplemental_location_accuracy = 21; + */ + public Builder setSupplementalLocationAccuracy( + com.google.protobuf.DoubleValue.Builder builderForValue) { + if (supplementalLocationAccuracyBuilder_ == null) { + supplementalLocationAccuracy_ = builderForValue.build(); + } else { + supplementalLocationAccuracyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Accuracy of `supplemental_location` as a radius, in meters.
+     * 
+ * + * .google.protobuf.DoubleValue supplemental_location_accuracy = 21; + */ + public Builder mergeSupplementalLocationAccuracy(com.google.protobuf.DoubleValue value) { + if (supplementalLocationAccuracyBuilder_ == null) { + if (((bitField0_ & 0x04000000) != 0) + && supplementalLocationAccuracy_ != null + && supplementalLocationAccuracy_ + != com.google.protobuf.DoubleValue.getDefaultInstance()) { + getSupplementalLocationAccuracyBuilder().mergeFrom(value); + } else { + supplementalLocationAccuracy_ = value; + } + } else { + supplementalLocationAccuracyBuilder_.mergeFrom(value); + } + if (supplementalLocationAccuracy_ != null) { + bitField0_ |= 0x04000000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Accuracy of `supplemental_location` as a radius, in meters.
+     * 
+ * + * .google.protobuf.DoubleValue supplemental_location_accuracy = 21; + */ + public Builder clearSupplementalLocationAccuracy() { + bitField0_ = (bitField0_ & ~0x04000000); + supplementalLocationAccuracy_ = null; + if (supplementalLocationAccuracyBuilder_ != null) { + supplementalLocationAccuracyBuilder_.dispose(); + supplementalLocationAccuracyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Accuracy of `supplemental_location` as a radius, in meters.
+     * 
+ * + * .google.protobuf.DoubleValue supplemental_location_accuracy = 21; + */ + public com.google.protobuf.DoubleValue.Builder getSupplementalLocationAccuracyBuilder() { + bitField0_ |= 0x04000000; + onChanged(); + return getSupplementalLocationAccuracyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Accuracy of `supplemental_location` as a radius, in meters.
+     * 
+ * + * .google.protobuf.DoubleValue supplemental_location_accuracy = 21; + */ + public com.google.protobuf.DoubleValueOrBuilder getSupplementalLocationAccuracyOrBuilder() { + if (supplementalLocationAccuracyBuilder_ != null) { + return supplementalLocationAccuracyBuilder_.getMessageOrBuilder(); + } else { + return supplementalLocationAccuracy_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : supplementalLocationAccuracy_; + } + } + /** + * + * + *
+     * Accuracy of `supplemental_location` as a radius, in meters.
+     * 
+ * + * .google.protobuf.DoubleValue supplemental_location_accuracy = 21; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.DoubleValue, + com.google.protobuf.DoubleValue.Builder, + com.google.protobuf.DoubleValueOrBuilder> + getSupplementalLocationAccuracyFieldBuilder() { + if (supplementalLocationAccuracyBuilder_ == null) { + supplementalLocationAccuracyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.DoubleValue, + com.google.protobuf.DoubleValue.Builder, + com.google.protobuf.DoubleValueOrBuilder>( + getSupplementalLocationAccuracy(), getParentForChildren(), isClean()); + supplementalLocationAccuracy_ = null; + } + return supplementalLocationAccuracyBuilder_; + } + + private boolean roadSnapped_; + /** + * + * + *
+     * Deprecated: Use `is_road_snapped` instead.
+     * 
+ * + * bool road_snapped = 26 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.VehicleLocation.road_snapped is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=297 + * @return The roadSnapped. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean getRoadSnapped() { + return roadSnapped_; + } + /** + * + * + *
+     * Deprecated: Use `is_road_snapped` instead.
+     * 
+ * + * bool road_snapped = 26 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.VehicleLocation.road_snapped is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=297 + * @param value The roadSnapped to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setRoadSnapped(boolean value) { + + roadSnapped_ = value; + bitField0_ |= 0x08000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Deprecated: Use `is_road_snapped` instead.
+     * 
+ * + * bool road_snapped = 26 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.VehicleLocation.road_snapped is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=297 + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearRoadSnapped() { + bitField0_ = (bitField0_ & ~0x08000000); + roadSnapped_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:maps.fleetengine.v1.VehicleLocation) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.v1.VehicleLocation) + private static final com.google.maps.fleetengine.v1.VehicleLocation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.fleetengine.v1.VehicleLocation(); + } + + public static com.google.maps.fleetengine.v1.VehicleLocation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VehicleLocation 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.fleetengine.v1.VehicleLocation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleLocationOrBuilder.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleLocationOrBuilder.java new file mode 100644 index 000000000000..37279373a9ef --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleLocationOrBuilder.java @@ -0,0 +1,1048 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/fleetengine.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public interface VehicleLocationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.v1.VehicleLocation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The location of the vehicle.
+   * When it is sent to Fleet Engine, the vehicle's location is a GPS location.
+   * When you receive it in a response, the vehicle's location can be either a
+   * GPS location, a supplemental location, or some other estimated location.
+   * The source is specified in `location_sensor`.
+   * 
+ * + * .google.type.LatLng location = 1; + * + * @return Whether the location field is set. + */ + boolean hasLocation(); + /** + * + * + *
+   * The location of the vehicle.
+   * When it is sent to Fleet Engine, the vehicle's location is a GPS location.
+   * When you receive it in a response, the vehicle's location can be either a
+   * GPS location, a supplemental location, or some other estimated location.
+   * The source is specified in `location_sensor`.
+   * 
+ * + * .google.type.LatLng location = 1; + * + * @return The location. + */ + com.google.type.LatLng getLocation(); + /** + * + * + *
+   * The location of the vehicle.
+   * When it is sent to Fleet Engine, the vehicle's location is a GPS location.
+   * When you receive it in a response, the vehicle's location can be either a
+   * GPS location, a supplemental location, or some other estimated location.
+   * The source is specified in `location_sensor`.
+   * 
+ * + * .google.type.LatLng location = 1; + */ + com.google.type.LatLngOrBuilder getLocationOrBuilder(); + + /** + * + * + *
+   * Deprecated: Use `latlng_accuracy` instead.
+   * 
+ * + * .google.protobuf.DoubleValue horizontal_accuracy = 8 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.VehicleLocation.horizontal_accuracy is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=207 + * @return Whether the horizontalAccuracy field is set. + */ + @java.lang.Deprecated + boolean hasHorizontalAccuracy(); + /** + * + * + *
+   * Deprecated: Use `latlng_accuracy` instead.
+   * 
+ * + * .google.protobuf.DoubleValue horizontal_accuracy = 8 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.VehicleLocation.horizontal_accuracy is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=207 + * @return The horizontalAccuracy. + */ + @java.lang.Deprecated + com.google.protobuf.DoubleValue getHorizontalAccuracy(); + /** + * + * + *
+   * Deprecated: Use `latlng_accuracy` instead.
+   * 
+ * + * .google.protobuf.DoubleValue horizontal_accuracy = 8 [deprecated = true]; + */ + @java.lang.Deprecated + com.google.protobuf.DoubleValueOrBuilder getHorizontalAccuracyOrBuilder(); + + /** + * + * + *
+   * Accuracy of `location` in meters as a radius.
+   * 
+ * + * .google.protobuf.DoubleValue latlng_accuracy = 22; + * + * @return Whether the latlngAccuracy field is set. + */ + boolean hasLatlngAccuracy(); + /** + * + * + *
+   * Accuracy of `location` in meters as a radius.
+   * 
+ * + * .google.protobuf.DoubleValue latlng_accuracy = 22; + * + * @return The latlngAccuracy. + */ + com.google.protobuf.DoubleValue getLatlngAccuracy(); + /** + * + * + *
+   * Accuracy of `location` in meters as a radius.
+   * 
+ * + * .google.protobuf.DoubleValue latlng_accuracy = 22; + */ + com.google.protobuf.DoubleValueOrBuilder getLatlngAccuracyOrBuilder(); + + /** + * + * + *
+   * Direction the vehicle is moving in degrees.  0 represents North.
+   * The valid range is [0,360).
+   * 
+ * + * .google.protobuf.Int32Value heading = 2; + * + * @return Whether the heading field is set. + */ + boolean hasHeading(); + /** + * + * + *
+   * Direction the vehicle is moving in degrees.  0 represents North.
+   * The valid range is [0,360).
+   * 
+ * + * .google.protobuf.Int32Value heading = 2; + * + * @return The heading. + */ + com.google.protobuf.Int32Value getHeading(); + /** + * + * + *
+   * Direction the vehicle is moving in degrees.  0 represents North.
+   * The valid range is [0,360).
+   * 
+ * + * .google.protobuf.Int32Value heading = 2; + */ + com.google.protobuf.Int32ValueOrBuilder getHeadingOrBuilder(); + + /** + * + * + *
+   * Deprecated: Use `heading_accuracy` instead.
+   * 
+ * + * .google.protobuf.DoubleValue bearing_accuracy = 10 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.VehicleLocation.bearing_accuracy is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=217 + * @return Whether the bearingAccuracy field is set. + */ + @java.lang.Deprecated + boolean hasBearingAccuracy(); + /** + * + * + *
+   * Deprecated: Use `heading_accuracy` instead.
+   * 
+ * + * .google.protobuf.DoubleValue bearing_accuracy = 10 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.VehicleLocation.bearing_accuracy is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=217 + * @return The bearingAccuracy. + */ + @java.lang.Deprecated + com.google.protobuf.DoubleValue getBearingAccuracy(); + /** + * + * + *
+   * Deprecated: Use `heading_accuracy` instead.
+   * 
+ * + * .google.protobuf.DoubleValue bearing_accuracy = 10 [deprecated = true]; + */ + @java.lang.Deprecated + com.google.protobuf.DoubleValueOrBuilder getBearingAccuracyOrBuilder(); + + /** + * + * + *
+   * Accuracy of `heading` in degrees.
+   * 
+ * + * .google.protobuf.DoubleValue heading_accuracy = 23; + * + * @return Whether the headingAccuracy field is set. + */ + boolean hasHeadingAccuracy(); + /** + * + * + *
+   * Accuracy of `heading` in degrees.
+   * 
+ * + * .google.protobuf.DoubleValue heading_accuracy = 23; + * + * @return The headingAccuracy. + */ + com.google.protobuf.DoubleValue getHeadingAccuracy(); + /** + * + * + *
+   * Accuracy of `heading` in degrees.
+   * 
+ * + * .google.protobuf.DoubleValue heading_accuracy = 23; + */ + com.google.protobuf.DoubleValueOrBuilder getHeadingAccuracyOrBuilder(); + + /** + * + * + *
+   * Altitude in meters above WGS84.
+   * 
+ * + * .google.protobuf.DoubleValue altitude = 5; + * + * @return Whether the altitude field is set. + */ + boolean hasAltitude(); + /** + * + * + *
+   * Altitude in meters above WGS84.
+   * 
+ * + * .google.protobuf.DoubleValue altitude = 5; + * + * @return The altitude. + */ + com.google.protobuf.DoubleValue getAltitude(); + /** + * + * + *
+   * Altitude in meters above WGS84.
+   * 
+ * + * .google.protobuf.DoubleValue altitude = 5; + */ + com.google.protobuf.DoubleValueOrBuilder getAltitudeOrBuilder(); + + /** + * + * + *
+   * Deprecated: Use `altitude_accuracy` instead.
+   * 
+ * + * .google.protobuf.DoubleValue vertical_accuracy = 9 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.VehicleLocation.vertical_accuracy is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=226 + * @return Whether the verticalAccuracy field is set. + */ + @java.lang.Deprecated + boolean hasVerticalAccuracy(); + /** + * + * + *
+   * Deprecated: Use `altitude_accuracy` instead.
+   * 
+ * + * .google.protobuf.DoubleValue vertical_accuracy = 9 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.VehicleLocation.vertical_accuracy is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=226 + * @return The verticalAccuracy. + */ + @java.lang.Deprecated + com.google.protobuf.DoubleValue getVerticalAccuracy(); + /** + * + * + *
+   * Deprecated: Use `altitude_accuracy` instead.
+   * 
+ * + * .google.protobuf.DoubleValue vertical_accuracy = 9 [deprecated = true]; + */ + @java.lang.Deprecated + com.google.protobuf.DoubleValueOrBuilder getVerticalAccuracyOrBuilder(); + + /** + * + * + *
+   * Accuracy of `altitude` in meters.
+   * 
+ * + * .google.protobuf.DoubleValue altitude_accuracy = 24; + * + * @return Whether the altitudeAccuracy field is set. + */ + boolean hasAltitudeAccuracy(); + /** + * + * + *
+   * Accuracy of `altitude` in meters.
+   * 
+ * + * .google.protobuf.DoubleValue altitude_accuracy = 24; + * + * @return The altitudeAccuracy. + */ + com.google.protobuf.DoubleValue getAltitudeAccuracy(); + /** + * + * + *
+   * Accuracy of `altitude` in meters.
+   * 
+ * + * .google.protobuf.DoubleValue altitude_accuracy = 24; + */ + com.google.protobuf.DoubleValueOrBuilder getAltitudeAccuracyOrBuilder(); + + /** + * + * + *
+   * Speed of the vehicle in kilometers per hour.
+   * Deprecated: Use `speed` instead.
+   * 
+ * + * .google.protobuf.Int32Value speed_kmph = 3 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.VehicleLocation.speed_kmph is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=233 + * @return Whether the speedKmph field is set. + */ + @java.lang.Deprecated + boolean hasSpeedKmph(); + /** + * + * + *
+   * Speed of the vehicle in kilometers per hour.
+   * Deprecated: Use `speed` instead.
+   * 
+ * + * .google.protobuf.Int32Value speed_kmph = 3 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.VehicleLocation.speed_kmph is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=233 + * @return The speedKmph. + */ + @java.lang.Deprecated + com.google.protobuf.Int32Value getSpeedKmph(); + /** + * + * + *
+   * Speed of the vehicle in kilometers per hour.
+   * Deprecated: Use `speed` instead.
+   * 
+ * + * .google.protobuf.Int32Value speed_kmph = 3 [deprecated = true]; + */ + @java.lang.Deprecated + com.google.protobuf.Int32ValueOrBuilder getSpeedKmphOrBuilder(); + + /** + * + * + *
+   * Speed of the vehicle in meters/second
+   * 
+ * + * .google.protobuf.DoubleValue speed = 6; + * + * @return Whether the speed field is set. + */ + boolean hasSpeed(); + /** + * + * + *
+   * Speed of the vehicle in meters/second
+   * 
+ * + * .google.protobuf.DoubleValue speed = 6; + * + * @return The speed. + */ + com.google.protobuf.DoubleValue getSpeed(); + /** + * + * + *
+   * Speed of the vehicle in meters/second
+   * 
+ * + * .google.protobuf.DoubleValue speed = 6; + */ + com.google.protobuf.DoubleValueOrBuilder getSpeedOrBuilder(); + + /** + * + * + *
+   * Accuracy of `speed` in meters/second.
+   * 
+ * + * .google.protobuf.DoubleValue speed_accuracy = 7; + * + * @return Whether the speedAccuracy field is set. + */ + boolean hasSpeedAccuracy(); + /** + * + * + *
+   * Accuracy of `speed` in meters/second.
+   * 
+ * + * .google.protobuf.DoubleValue speed_accuracy = 7; + * + * @return The speedAccuracy. + */ + com.google.protobuf.DoubleValue getSpeedAccuracy(); + /** + * + * + *
+   * Accuracy of `speed` in meters/second.
+   * 
+ * + * .google.protobuf.DoubleValue speed_accuracy = 7; + */ + com.google.protobuf.DoubleValueOrBuilder getSpeedAccuracyOrBuilder(); + + /** + * + * + *
+   * The time when `location` was reported by the sensor according to the
+   * sensor's clock.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * The time when `location` was reported by the sensor according to the
+   * sensor's clock.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * The time when `location` was reported by the sensor according to the
+   * sensor's clock.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time when the server received the location information.
+   * 
+ * + * .google.protobuf.Timestamp server_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the serverTime field is set. + */ + boolean hasServerTime(); + /** + * + * + *
+   * Output only. The time when the server received the location information.
+   * 
+ * + * .google.protobuf.Timestamp server_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The serverTime. + */ + com.google.protobuf.Timestamp getServerTime(); + /** + * + * + *
+   * Output only. The time when the server received the location information.
+   * 
+ * + * .google.protobuf.Timestamp server_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getServerTimeOrBuilder(); + + /** + * + * + *
+   * Provider of location data (for example, `GPS`).
+   * 
+ * + * .maps.fleetengine.v1.LocationSensor location_sensor = 11; + * + * @return The enum numeric value on the wire for locationSensor. + */ + int getLocationSensorValue(); + /** + * + * + *
+   * Provider of location data (for example, `GPS`).
+   * 
+ * + * .maps.fleetengine.v1.LocationSensor location_sensor = 11; + * + * @return The locationSensor. + */ + com.google.maps.fleetengine.v1.LocationSensor getLocationSensor(); + + /** + * + * + *
+   * Whether `location` is snapped to a road.
+   * 
+ * + * .google.protobuf.BoolValue is_road_snapped = 27; + * + * @return Whether the isRoadSnapped field is set. + */ + boolean hasIsRoadSnapped(); + /** + * + * + *
+   * Whether `location` is snapped to a road.
+   * 
+ * + * .google.protobuf.BoolValue is_road_snapped = 27; + * + * @return The isRoadSnapped. + */ + com.google.protobuf.BoolValue getIsRoadSnapped(); + /** + * + * + *
+   * Whether `location` is snapped to a road.
+   * 
+ * + * .google.protobuf.BoolValue is_road_snapped = 27; + */ + com.google.protobuf.BoolValueOrBuilder getIsRoadSnappedOrBuilder(); + + /** + * + * + *
+   * Input only. Indicates whether the GPS sensor is enabled on the mobile
+   * device.
+   * 
+ * + * + * .google.protobuf.BoolValue is_gps_sensor_enabled = 12 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the isGpsSensorEnabled field is set. + */ + boolean hasIsGpsSensorEnabled(); + /** + * + * + *
+   * Input only. Indicates whether the GPS sensor is enabled on the mobile
+   * device.
+   * 
+ * + * + * .google.protobuf.BoolValue is_gps_sensor_enabled = 12 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The isGpsSensorEnabled. + */ + com.google.protobuf.BoolValue getIsGpsSensorEnabled(); + /** + * + * + *
+   * Input only. Indicates whether the GPS sensor is enabled on the mobile
+   * device.
+   * 
+ * + * + * .google.protobuf.BoolValue is_gps_sensor_enabled = 12 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + com.google.protobuf.BoolValueOrBuilder getIsGpsSensorEnabledOrBuilder(); + + /** + * + * + *
+   * Input only. Time (in seconds) since this location was first sent to the
+   * server. This will be zero for the first update. If the time is unknown (for
+   * example, when the app restarts), this value resets to zero.
+   * 
+ * + * + * .google.protobuf.Int32Value time_since_update = 14 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the timeSinceUpdate field is set. + */ + boolean hasTimeSinceUpdate(); + /** + * + * + *
+   * Input only. Time (in seconds) since this location was first sent to the
+   * server. This will be zero for the first update. If the time is unknown (for
+   * example, when the app restarts), this value resets to zero.
+   * 
+ * + * + * .google.protobuf.Int32Value time_since_update = 14 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The timeSinceUpdate. + */ + com.google.protobuf.Int32Value getTimeSinceUpdate(); + /** + * + * + *
+   * Input only. Time (in seconds) since this location was first sent to the
+   * server. This will be zero for the first update. If the time is unknown (for
+   * example, when the app restarts), this value resets to zero.
+   * 
+ * + * + * .google.protobuf.Int32Value time_since_update = 14 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + com.google.protobuf.Int32ValueOrBuilder getTimeSinceUpdateOrBuilder(); + + /** + * + * + *
+   * Input only. Deprecated: Other signals are now used to determine if a
+   * location is stale.
+   * 
+ * + * + * .google.protobuf.Int32Value num_stale_updates = 15 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @deprecated maps.fleetengine.v1.VehicleLocation.num_stale_updates is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=268 + * @return Whether the numStaleUpdates field is set. + */ + @java.lang.Deprecated + boolean hasNumStaleUpdates(); + /** + * + * + *
+   * Input only. Deprecated: Other signals are now used to determine if a
+   * location is stale.
+   * 
+ * + * + * .google.protobuf.Int32Value num_stale_updates = 15 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @deprecated maps.fleetengine.v1.VehicleLocation.num_stale_updates is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=268 + * @return The numStaleUpdates. + */ + @java.lang.Deprecated + com.google.protobuf.Int32Value getNumStaleUpdates(); + /** + * + * + *
+   * Input only. Deprecated: Other signals are now used to determine if a
+   * location is stale.
+   * 
+ * + * + * .google.protobuf.Int32Value num_stale_updates = 15 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Deprecated + com.google.protobuf.Int32ValueOrBuilder getNumStaleUpdatesOrBuilder(); + + /** + * + * + *
+   * Raw vehicle location (unprocessed by road-snapper).
+   * 
+ * + * .google.type.LatLng raw_location = 16; + * + * @return Whether the rawLocation field is set. + */ + boolean hasRawLocation(); + /** + * + * + *
+   * Raw vehicle location (unprocessed by road-snapper).
+   * 
+ * + * .google.type.LatLng raw_location = 16; + * + * @return The rawLocation. + */ + com.google.type.LatLng getRawLocation(); + /** + * + * + *
+   * Raw vehicle location (unprocessed by road-snapper).
+   * 
+ * + * .google.type.LatLng raw_location = 16; + */ + com.google.type.LatLngOrBuilder getRawLocationOrBuilder(); + + /** + * + * + *
+   * Timestamp associated with the raw location.
+   * 
+ * + * .google.protobuf.Timestamp raw_location_time = 17; + * + * @return Whether the rawLocationTime field is set. + */ + boolean hasRawLocationTime(); + /** + * + * + *
+   * Timestamp associated with the raw location.
+   * 
+ * + * .google.protobuf.Timestamp raw_location_time = 17; + * + * @return The rawLocationTime. + */ + com.google.protobuf.Timestamp getRawLocationTime(); + /** + * + * + *
+   * Timestamp associated with the raw location.
+   * 
+ * + * .google.protobuf.Timestamp raw_location_time = 17; + */ + com.google.protobuf.TimestampOrBuilder getRawLocationTimeOrBuilder(); + + /** + * + * + *
+   * Source of the raw location. Defaults to `GPS`.
+   * 
+ * + * .maps.fleetengine.v1.LocationSensor raw_location_sensor = 28; + * + * @return The enum numeric value on the wire for rawLocationSensor. + */ + int getRawLocationSensorValue(); + /** + * + * + *
+   * Source of the raw location. Defaults to `GPS`.
+   * 
+ * + * .maps.fleetengine.v1.LocationSensor raw_location_sensor = 28; + * + * @return The rawLocationSensor. + */ + com.google.maps.fleetengine.v1.LocationSensor getRawLocationSensor(); + + /** + * + * + *
+   * Accuracy of `raw_location` as a radius, in meters.
+   * 
+ * + * .google.protobuf.DoubleValue raw_location_accuracy = 25; + * + * @return Whether the rawLocationAccuracy field is set. + */ + boolean hasRawLocationAccuracy(); + /** + * + * + *
+   * Accuracy of `raw_location` as a radius, in meters.
+   * 
+ * + * .google.protobuf.DoubleValue raw_location_accuracy = 25; + * + * @return The rawLocationAccuracy. + */ + com.google.protobuf.DoubleValue getRawLocationAccuracy(); + /** + * + * + *
+   * Accuracy of `raw_location` as a radius, in meters.
+   * 
+ * + * .google.protobuf.DoubleValue raw_location_accuracy = 25; + */ + com.google.protobuf.DoubleValueOrBuilder getRawLocationAccuracyOrBuilder(); + + /** + * + * + *
+   * Supplemental location provided by the integrating app.
+   * 
+ * + * .google.type.LatLng supplemental_location = 18; + * + * @return Whether the supplementalLocation field is set. + */ + boolean hasSupplementalLocation(); + /** + * + * + *
+   * Supplemental location provided by the integrating app.
+   * 
+ * + * .google.type.LatLng supplemental_location = 18; + * + * @return The supplementalLocation. + */ + com.google.type.LatLng getSupplementalLocation(); + /** + * + * + *
+   * Supplemental location provided by the integrating app.
+   * 
+ * + * .google.type.LatLng supplemental_location = 18; + */ + com.google.type.LatLngOrBuilder getSupplementalLocationOrBuilder(); + + /** + * + * + *
+   * Timestamp associated with the supplemental location.
+   * 
+ * + * .google.protobuf.Timestamp supplemental_location_time = 19; + * + * @return Whether the supplementalLocationTime field is set. + */ + boolean hasSupplementalLocationTime(); + /** + * + * + *
+   * Timestamp associated with the supplemental location.
+   * 
+ * + * .google.protobuf.Timestamp supplemental_location_time = 19; + * + * @return The supplementalLocationTime. + */ + com.google.protobuf.Timestamp getSupplementalLocationTime(); + /** + * + * + *
+   * Timestamp associated with the supplemental location.
+   * 
+ * + * .google.protobuf.Timestamp supplemental_location_time = 19; + */ + com.google.protobuf.TimestampOrBuilder getSupplementalLocationTimeOrBuilder(); + + /** + * + * + *
+   * Source of the supplemental location. Defaults to
+   * `CUSTOMER_SUPPLIED_LOCATION`.
+   * 
+ * + * .maps.fleetengine.v1.LocationSensor supplemental_location_sensor = 20; + * + * @return The enum numeric value on the wire for supplementalLocationSensor. + */ + int getSupplementalLocationSensorValue(); + /** + * + * + *
+   * Source of the supplemental location. Defaults to
+   * `CUSTOMER_SUPPLIED_LOCATION`.
+   * 
+ * + * .maps.fleetengine.v1.LocationSensor supplemental_location_sensor = 20; + * + * @return The supplementalLocationSensor. + */ + com.google.maps.fleetengine.v1.LocationSensor getSupplementalLocationSensor(); + + /** + * + * + *
+   * Accuracy of `supplemental_location` as a radius, in meters.
+   * 
+ * + * .google.protobuf.DoubleValue supplemental_location_accuracy = 21; + * + * @return Whether the supplementalLocationAccuracy field is set. + */ + boolean hasSupplementalLocationAccuracy(); + /** + * + * + *
+   * Accuracy of `supplemental_location` as a radius, in meters.
+   * 
+ * + * .google.protobuf.DoubleValue supplemental_location_accuracy = 21; + * + * @return The supplementalLocationAccuracy. + */ + com.google.protobuf.DoubleValue getSupplementalLocationAccuracy(); + /** + * + * + *
+   * Accuracy of `supplemental_location` as a radius, in meters.
+   * 
+ * + * .google.protobuf.DoubleValue supplemental_location_accuracy = 21; + */ + com.google.protobuf.DoubleValueOrBuilder getSupplementalLocationAccuracyOrBuilder(); + + /** + * + * + *
+   * Deprecated: Use `is_road_snapped` instead.
+   * 
+ * + * bool road_snapped = 26 [deprecated = true]; + * + * @deprecated maps.fleetengine.v1.VehicleLocation.road_snapped is deprecated. See + * google/maps/fleetengine/v1/fleetengine.proto;l=297 + * @return The roadSnapped. + */ + @java.lang.Deprecated + boolean getRoadSnapped(); +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleMatch.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleMatch.java new file mode 100644 index 000000000000..c8adb4829728 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleMatch.java @@ -0,0 +1,3889 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicle_api.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * Contains the vehicle and related estimates for a vehicle that match the
+ * points of active trips for the vehicle `SearchVehiclesRequest`.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.v1.VehicleMatch} + */ +public final class VehicleMatch extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.v1.VehicleMatch) + VehicleMatchOrBuilder { + private static final long serialVersionUID = 0L; + // Use VehicleMatch.newBuilder() to construct. + private VehicleMatch(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VehicleMatch() { + tripType_ = 0; + vehicleTripsWaypoints_ = java.util.Collections.emptyList(); + vehicleMatchType_ = 0; + requestedOrderedBy_ = 0; + orderedBy_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VehicleMatch(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_VehicleMatch_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_VehicleMatch_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.VehicleMatch.class, + com.google.maps.fleetengine.v1.VehicleMatch.Builder.class); + } + + /** + * + * + *
+   * Type of vehicle match.
+   * 
+ * + * Protobuf enum {@code maps.fleetengine.v1.VehicleMatch.VehicleMatchType} + */ + public enum VehicleMatchType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unknown vehicle match type
+     * 
+ * + * UNKNOWN = 0; + */ + UNKNOWN(0), + /** + * + * + *
+     * The vehicle currently has no trip assigned to it and can proceed to the
+     * pickup point.
+     * 
+ * + * EXCLUSIVE = 1; + */ + EXCLUSIVE(1), + /** + * + * + *
+     * The vehicle is currently assigned to a trip, but can proceed to the
+     * pickup point after completing the in-progress trip.  ETA and distance
+     * calculations take the existing trip into account.
+     * 
+ * + * BACK_TO_BACK = 2; + */ + BACK_TO_BACK(2), + /** + * + * + *
+     * The vehicle has sufficient capacity for a shared ride.
+     * 
+ * + * CARPOOL = 3; + */ + CARPOOL(3), + /** + * + * + *
+     * The vehicle will finish its current, active trip before proceeding to the
+     * pickup point.  ETA and distance calculations take the existing trip into
+     * account.
+     * 
+ * + * CARPOOL_BACK_TO_BACK = 4; + */ + CARPOOL_BACK_TO_BACK(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unknown vehicle match type
+     * 
+ * + * UNKNOWN = 0; + */ + public static final int UNKNOWN_VALUE = 0; + /** + * + * + *
+     * The vehicle currently has no trip assigned to it and can proceed to the
+     * pickup point.
+     * 
+ * + * EXCLUSIVE = 1; + */ + public static final int EXCLUSIVE_VALUE = 1; + /** + * + * + *
+     * The vehicle is currently assigned to a trip, but can proceed to the
+     * pickup point after completing the in-progress trip.  ETA and distance
+     * calculations take the existing trip into account.
+     * 
+ * + * BACK_TO_BACK = 2; + */ + public static final int BACK_TO_BACK_VALUE = 2; + /** + * + * + *
+     * The vehicle has sufficient capacity for a shared ride.
+     * 
+ * + * CARPOOL = 3; + */ + public static final int CARPOOL_VALUE = 3; + /** + * + * + *
+     * The vehicle will finish its current, active trip before proceeding to the
+     * pickup point.  ETA and distance calculations take the existing trip into
+     * account.
+     * 
+ * + * CARPOOL_BACK_TO_BACK = 4; + */ + public static final int CARPOOL_BACK_TO_BACK_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static VehicleMatchType 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 VehicleMatchType forNumber(int value) { + switch (value) { + case 0: + return UNKNOWN; + case 1: + return EXCLUSIVE; + case 2: + return BACK_TO_BACK; + case 3: + return CARPOOL; + case 4: + return CARPOOL_BACK_TO_BACK; + 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 VehicleMatchType findValueByNumber(int number) { + return VehicleMatchType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.maps.fleetengine.v1.VehicleMatch.getDescriptor().getEnumTypes().get(0); + } + + private static final VehicleMatchType[] VALUES = values(); + + public static VehicleMatchType 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 VehicleMatchType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:maps.fleetengine.v1.VehicleMatch.VehicleMatchType) + } + + private int bitField0_; + public static final int VEHICLE_FIELD_NUMBER = 1; + private com.google.maps.fleetengine.v1.Vehicle vehicle_; + /** + * + * + *
+   * Required. A vehicle that matches the request.
+   * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the vehicle field is set. + */ + @java.lang.Override + public boolean hasVehicle() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. A vehicle that matches the request.
+   * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The vehicle. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.Vehicle getVehicle() { + return vehicle_ == null + ? com.google.maps.fleetengine.v1.Vehicle.getDefaultInstance() + : vehicle_; + } + /** + * + * + *
+   * Required. A vehicle that matches the request.
+   * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleOrBuilder getVehicleOrBuilder() { + return vehicle_ == null + ? com.google.maps.fleetengine.v1.Vehicle.getDefaultInstance() + : vehicle_; + } + + public static final int VEHICLE_PICKUP_ETA_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp vehiclePickupEta_; + /** + * + * + *
+   * The vehicle's driving ETA to the pickup point specified in the
+   * request. An empty value indicates a failure in calculating ETA for the
+   * vehicle.  If `SearchVehiclesRequest.include_back_to_back` was `true` and
+   * this vehicle has an active trip, `vehicle_pickup_eta` includes the time
+   * required to complete the current active trip.
+   * 
+ * + * .google.protobuf.Timestamp vehicle_pickup_eta = 2; + * + * @return Whether the vehiclePickupEta field is set. + */ + @java.lang.Override + public boolean hasVehiclePickupEta() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * The vehicle's driving ETA to the pickup point specified in the
+   * request. An empty value indicates a failure in calculating ETA for the
+   * vehicle.  If `SearchVehiclesRequest.include_back_to_back` was `true` and
+   * this vehicle has an active trip, `vehicle_pickup_eta` includes the time
+   * required to complete the current active trip.
+   * 
+ * + * .google.protobuf.Timestamp vehicle_pickup_eta = 2; + * + * @return The vehiclePickupEta. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getVehiclePickupEta() { + return vehiclePickupEta_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : vehiclePickupEta_; + } + /** + * + * + *
+   * The vehicle's driving ETA to the pickup point specified in the
+   * request. An empty value indicates a failure in calculating ETA for the
+   * vehicle.  If `SearchVehiclesRequest.include_back_to_back` was `true` and
+   * this vehicle has an active trip, `vehicle_pickup_eta` includes the time
+   * required to complete the current active trip.
+   * 
+ * + * .google.protobuf.Timestamp vehicle_pickup_eta = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getVehiclePickupEtaOrBuilder() { + return vehiclePickupEta_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : vehiclePickupEta_; + } + + public static final int VEHICLE_PICKUP_DISTANCE_METERS_FIELD_NUMBER = 3; + private com.google.protobuf.Int32Value vehiclePickupDistanceMeters_; + /** + * + * + *
+   * The distance from the Vehicle's current location to the pickup point
+   * specified in the request, including any intermediate pickup or dropoff
+   * points for existing trips. This distance comprises the calculated driving
+   * (route) distance, plus the straight line distance between the navigation
+   * end point and the requested pickup point. (The distance between the
+   * navigation end point and the requested pickup point is typically small.) An
+   * empty value indicates an error in calculating the distance.
+   * 
+ * + * .google.protobuf.Int32Value vehicle_pickup_distance_meters = 3; + * + * @return Whether the vehiclePickupDistanceMeters field is set. + */ + @java.lang.Override + public boolean hasVehiclePickupDistanceMeters() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * The distance from the Vehicle's current location to the pickup point
+   * specified in the request, including any intermediate pickup or dropoff
+   * points for existing trips. This distance comprises the calculated driving
+   * (route) distance, plus the straight line distance between the navigation
+   * end point and the requested pickup point. (The distance between the
+   * navigation end point and the requested pickup point is typically small.) An
+   * empty value indicates an error in calculating the distance.
+   * 
+ * + * .google.protobuf.Int32Value vehicle_pickup_distance_meters = 3; + * + * @return The vehiclePickupDistanceMeters. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getVehiclePickupDistanceMeters() { + return vehiclePickupDistanceMeters_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : vehiclePickupDistanceMeters_; + } + /** + * + * + *
+   * The distance from the Vehicle's current location to the pickup point
+   * specified in the request, including any intermediate pickup or dropoff
+   * points for existing trips. This distance comprises the calculated driving
+   * (route) distance, plus the straight line distance between the navigation
+   * end point and the requested pickup point. (The distance between the
+   * navigation end point and the requested pickup point is typically small.) An
+   * empty value indicates an error in calculating the distance.
+   * 
+ * + * .google.protobuf.Int32Value vehicle_pickup_distance_meters = 3; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getVehiclePickupDistanceMetersOrBuilder() { + return vehiclePickupDistanceMeters_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : vehiclePickupDistanceMeters_; + } + + public static final int VEHICLE_PICKUP_STRAIGHT_LINE_DISTANCE_METERS_FIELD_NUMBER = 11; + private com.google.protobuf.Int32Value vehiclePickupStraightLineDistanceMeters_; + /** + * + * + *
+   * Required. The straight-line distance between the vehicle and the pickup
+   * point specified in the request.
+   * 
+ * + * + * .google.protobuf.Int32Value vehicle_pickup_straight_line_distance_meters = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the vehiclePickupStraightLineDistanceMeters field is set. + */ + @java.lang.Override + public boolean hasVehiclePickupStraightLineDistanceMeters() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * Required. The straight-line distance between the vehicle and the pickup
+   * point specified in the request.
+   * 
+ * + * + * .google.protobuf.Int32Value vehicle_pickup_straight_line_distance_meters = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The vehiclePickupStraightLineDistanceMeters. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getVehiclePickupStraightLineDistanceMeters() { + return vehiclePickupStraightLineDistanceMeters_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : vehiclePickupStraightLineDistanceMeters_; + } + /** + * + * + *
+   * Required. The straight-line distance between the vehicle and the pickup
+   * point specified in the request.
+   * 
+ * + * + * .google.protobuf.Int32Value vehicle_pickup_straight_line_distance_meters = 11 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder + getVehiclePickupStraightLineDistanceMetersOrBuilder() { + return vehiclePickupStraightLineDistanceMeters_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : vehiclePickupStraightLineDistanceMeters_; + } + + public static final int VEHICLE_DROPOFF_ETA_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp vehicleDropoffEta_; + /** + * + * + *
+   * The complete vehicle's driving ETA to the drop off point specified in the
+   * request. The ETA includes stopping at any waypoints before the
+   * `dropoff_point` specified in the request. The value will only be populated
+   * when a drop off point is specified in the request. An empty value indicates
+   * an error calculating the ETA.
+   * 
+ * + * .google.protobuf.Timestamp vehicle_dropoff_eta = 4; + * + * @return Whether the vehicleDropoffEta field is set. + */ + @java.lang.Override + public boolean hasVehicleDropoffEta() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+   * The complete vehicle's driving ETA to the drop off point specified in the
+   * request. The ETA includes stopping at any waypoints before the
+   * `dropoff_point` specified in the request. The value will only be populated
+   * when a drop off point is specified in the request. An empty value indicates
+   * an error calculating the ETA.
+   * 
+ * + * .google.protobuf.Timestamp vehicle_dropoff_eta = 4; + * + * @return The vehicleDropoffEta. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getVehicleDropoffEta() { + return vehicleDropoffEta_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : vehicleDropoffEta_; + } + /** + * + * + *
+   * The complete vehicle's driving ETA to the drop off point specified in the
+   * request. The ETA includes stopping at any waypoints before the
+   * `dropoff_point` specified in the request. The value will only be populated
+   * when a drop off point is specified in the request. An empty value indicates
+   * an error calculating the ETA.
+   * 
+ * + * .google.protobuf.Timestamp vehicle_dropoff_eta = 4; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getVehicleDropoffEtaOrBuilder() { + return vehicleDropoffEta_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : vehicleDropoffEta_; + } + + public static final int VEHICLE_PICKUP_TO_DROPOFF_DISTANCE_METERS_FIELD_NUMBER = 5; + private com.google.protobuf.Int32Value vehiclePickupToDropoffDistanceMeters_; + /** + * + * + *
+   * The vehicle's driving distance (in meters) from the pickup point
+   * to the drop off point specified in the request. The distance is only
+   * between the two points and does not include the vehicle location or any
+   * other points that must be visited before the vehicle visits either the
+   * pickup point or dropoff point. The value will only be populated when a
+   * `dropoff_point` is specified in the request. An empty value indicates
+   * a failure in calculating the distance from the pickup to
+   * drop off point specified in the request.
+   * 
+ * + * .google.protobuf.Int32Value vehicle_pickup_to_dropoff_distance_meters = 5; + * + * @return Whether the vehiclePickupToDropoffDistanceMeters field is set. + */ + @java.lang.Override + public boolean hasVehiclePickupToDropoffDistanceMeters() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+   * The vehicle's driving distance (in meters) from the pickup point
+   * to the drop off point specified in the request. The distance is only
+   * between the two points and does not include the vehicle location or any
+   * other points that must be visited before the vehicle visits either the
+   * pickup point or dropoff point. The value will only be populated when a
+   * `dropoff_point` is specified in the request. An empty value indicates
+   * a failure in calculating the distance from the pickup to
+   * drop off point specified in the request.
+   * 
+ * + * .google.protobuf.Int32Value vehicle_pickup_to_dropoff_distance_meters = 5; + * + * @return The vehiclePickupToDropoffDistanceMeters. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getVehiclePickupToDropoffDistanceMeters() { + return vehiclePickupToDropoffDistanceMeters_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : vehiclePickupToDropoffDistanceMeters_; + } + /** + * + * + *
+   * The vehicle's driving distance (in meters) from the pickup point
+   * to the drop off point specified in the request. The distance is only
+   * between the two points and does not include the vehicle location or any
+   * other points that must be visited before the vehicle visits either the
+   * pickup point or dropoff point. The value will only be populated when a
+   * `dropoff_point` is specified in the request. An empty value indicates
+   * a failure in calculating the distance from the pickup to
+   * drop off point specified in the request.
+   * 
+ * + * .google.protobuf.Int32Value vehicle_pickup_to_dropoff_distance_meters = 5; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder + getVehiclePickupToDropoffDistanceMetersOrBuilder() { + return vehiclePickupToDropoffDistanceMeters_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : vehiclePickupToDropoffDistanceMeters_; + } + + public static final int TRIP_TYPE_FIELD_NUMBER = 6; + private int tripType_ = 0; + /** + * + * + *
+   * Required. The trip type of the request that was used to calculate the ETA
+   * to the pickup point.
+   * 
+ * + * .maps.fleetengine.v1.TripType trip_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for tripType. + */ + @java.lang.Override + public int getTripTypeValue() { + return tripType_; + } + /** + * + * + *
+   * Required. The trip type of the request that was used to calculate the ETA
+   * to the pickup point.
+   * 
+ * + * .maps.fleetengine.v1.TripType trip_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tripType. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TripType getTripType() { + com.google.maps.fleetengine.v1.TripType result = + com.google.maps.fleetengine.v1.TripType.forNumber(tripType_); + return result == null ? com.google.maps.fleetengine.v1.TripType.UNRECOGNIZED : result; + } + + public static final int VEHICLE_TRIPS_WAYPOINTS_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private java.util.List vehicleTripsWaypoints_; + /** + * + * + *
+   * The ordered list of waypoints used to calculate the ETA. The list
+   * includes vehicle location, the pickup points of active
+   * trips for the vehicle, and the pickup points provided in the
+   * request. An empty list indicates a failure in calculating ETA for the
+   * vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.Waypoint vehicle_trips_waypoints = 7; + */ + @java.lang.Override + public java.util.List getVehicleTripsWaypointsList() { + return vehicleTripsWaypoints_; + } + /** + * + * + *
+   * The ordered list of waypoints used to calculate the ETA. The list
+   * includes vehicle location, the pickup points of active
+   * trips for the vehicle, and the pickup points provided in the
+   * request. An empty list indicates a failure in calculating ETA for the
+   * vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.Waypoint vehicle_trips_waypoints = 7; + */ + @java.lang.Override + public java.util.List + getVehicleTripsWaypointsOrBuilderList() { + return vehicleTripsWaypoints_; + } + /** + * + * + *
+   * The ordered list of waypoints used to calculate the ETA. The list
+   * includes vehicle location, the pickup points of active
+   * trips for the vehicle, and the pickup points provided in the
+   * request. An empty list indicates a failure in calculating ETA for the
+   * vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.Waypoint vehicle_trips_waypoints = 7; + */ + @java.lang.Override + public int getVehicleTripsWaypointsCount() { + return vehicleTripsWaypoints_.size(); + } + /** + * + * + *
+   * The ordered list of waypoints used to calculate the ETA. The list
+   * includes vehicle location, the pickup points of active
+   * trips for the vehicle, and the pickup points provided in the
+   * request. An empty list indicates a failure in calculating ETA for the
+   * vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.Waypoint vehicle_trips_waypoints = 7; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.Waypoint getVehicleTripsWaypoints(int index) { + return vehicleTripsWaypoints_.get(index); + } + /** + * + * + *
+   * The ordered list of waypoints used to calculate the ETA. The list
+   * includes vehicle location, the pickup points of active
+   * trips for the vehicle, and the pickup points provided in the
+   * request. An empty list indicates a failure in calculating ETA for the
+   * vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.Waypoint vehicle_trips_waypoints = 7; + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.WaypointOrBuilder getVehicleTripsWaypointsOrBuilder( + int index) { + return vehicleTripsWaypoints_.get(index); + } + + public static final int VEHICLE_MATCH_TYPE_FIELD_NUMBER = 8; + private int vehicleMatchType_ = 0; + /** + * + * + *
+   * Type of the vehicle match.
+   * 
+ * + * .maps.fleetengine.v1.VehicleMatch.VehicleMatchType vehicle_match_type = 8; + * + * @return The enum numeric value on the wire for vehicleMatchType. + */ + @java.lang.Override + public int getVehicleMatchTypeValue() { + return vehicleMatchType_; + } + /** + * + * + *
+   * Type of the vehicle match.
+   * 
+ * + * .maps.fleetengine.v1.VehicleMatch.VehicleMatchType vehicle_match_type = 8; + * + * @return The vehicleMatchType. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleMatch.VehicleMatchType getVehicleMatchType() { + com.google.maps.fleetengine.v1.VehicleMatch.VehicleMatchType result = + com.google.maps.fleetengine.v1.VehicleMatch.VehicleMatchType.forNumber(vehicleMatchType_); + return result == null + ? com.google.maps.fleetengine.v1.VehicleMatch.VehicleMatchType.UNRECOGNIZED + : result; + } + + public static final int REQUESTED_ORDERED_BY_FIELD_NUMBER = 9; + private int requestedOrderedBy_ = 0; + /** + * + * + *
+   * The order requested for sorting vehicle matches.
+   * 
+ * + * .maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder requested_ordered_by = 9; + * + * + * @return The enum numeric value on the wire for requestedOrderedBy. + */ + @java.lang.Override + public int getRequestedOrderedByValue() { + return requestedOrderedBy_; + } + /** + * + * + *
+   * The order requested for sorting vehicle matches.
+   * 
+ * + * .maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder requested_ordered_by = 9; + * + * + * @return The requestedOrderedBy. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder + getRequestedOrderedBy() { + com.google.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder result = + com.google.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder.forNumber( + requestedOrderedBy_); + return result == null + ? com.google.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder.UNRECOGNIZED + : result; + } + + public static final int ORDERED_BY_FIELD_NUMBER = 10; + private int orderedBy_ = 0; + /** + * + * + *
+   * The actual order that was used for this vehicle. Normally this
+   * will match the 'order_by' field from the request; however, in certain
+   * circumstances such as an internal server error, a different method
+   * may be used (such as `PICKUP_POINT_STRAIGHT_DISTANCE`).
+   * 
+ * + * .maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder ordered_by = 10; + * + * @return The enum numeric value on the wire for orderedBy. + */ + @java.lang.Override + public int getOrderedByValue() { + return orderedBy_; + } + /** + * + * + *
+   * The actual order that was used for this vehicle. Normally this
+   * will match the 'order_by' field from the request; however, in certain
+   * circumstances such as an internal server error, a different method
+   * may be used (such as `PICKUP_POINT_STRAIGHT_DISTANCE`).
+   * 
+ * + * .maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder ordered_by = 10; + * + * @return The orderedBy. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder getOrderedBy() { + com.google.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder result = + com.google.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder.forNumber( + orderedBy_); + return result == null + ? com.google.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getVehicle()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getVehiclePickupEta()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getVehiclePickupDistanceMeters()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(4, getVehicleDropoffEta()); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(5, getVehiclePickupToDropoffDistanceMeters()); + } + if (tripType_ != com.google.maps.fleetengine.v1.TripType.UNKNOWN_TRIP_TYPE.getNumber()) { + output.writeEnum(6, tripType_); + } + for (int i = 0; i < vehicleTripsWaypoints_.size(); i++) { + output.writeMessage(7, vehicleTripsWaypoints_.get(i)); + } + if (vehicleMatchType_ + != com.google.maps.fleetengine.v1.VehicleMatch.VehicleMatchType.UNKNOWN.getNumber()) { + output.writeEnum(8, vehicleMatchType_); + } + if (requestedOrderedBy_ + != com.google.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder + .UNKNOWN_VEHICLE_MATCH_ORDER + .getNumber()) { + output.writeEnum(9, requestedOrderedBy_); + } + if (orderedBy_ + != com.google.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder + .UNKNOWN_VEHICLE_MATCH_ORDER + .getNumber()) { + output.writeEnum(10, orderedBy_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(11, getVehiclePickupStraightLineDistanceMeters()); + } + 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, getVehicle()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getVehiclePickupEta()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, getVehiclePickupDistanceMeters()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getVehicleDropoffEta()); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, getVehiclePickupToDropoffDistanceMeters()); + } + if (tripType_ != com.google.maps.fleetengine.v1.TripType.UNKNOWN_TRIP_TYPE.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, tripType_); + } + for (int i = 0; i < vehicleTripsWaypoints_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, vehicleTripsWaypoints_.get(i)); + } + if (vehicleMatchType_ + != com.google.maps.fleetengine.v1.VehicleMatch.VehicleMatchType.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, vehicleMatchType_); + } + if (requestedOrderedBy_ + != com.google.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder + .UNKNOWN_VEHICLE_MATCH_ORDER + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, requestedOrderedBy_); + } + if (orderedBy_ + != com.google.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder + .UNKNOWN_VEHICLE_MATCH_ORDER + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, orderedBy_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 11, getVehiclePickupStraightLineDistanceMeters()); + } + 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.fleetengine.v1.VehicleMatch)) { + return super.equals(obj); + } + com.google.maps.fleetengine.v1.VehicleMatch other = + (com.google.maps.fleetengine.v1.VehicleMatch) obj; + + if (hasVehicle() != other.hasVehicle()) return false; + if (hasVehicle()) { + if (!getVehicle().equals(other.getVehicle())) return false; + } + if (hasVehiclePickupEta() != other.hasVehiclePickupEta()) return false; + if (hasVehiclePickupEta()) { + if (!getVehiclePickupEta().equals(other.getVehiclePickupEta())) return false; + } + if (hasVehiclePickupDistanceMeters() != other.hasVehiclePickupDistanceMeters()) return false; + if (hasVehiclePickupDistanceMeters()) { + if (!getVehiclePickupDistanceMeters().equals(other.getVehiclePickupDistanceMeters())) + return false; + } + if (hasVehiclePickupStraightLineDistanceMeters() + != other.hasVehiclePickupStraightLineDistanceMeters()) return false; + if (hasVehiclePickupStraightLineDistanceMeters()) { + if (!getVehiclePickupStraightLineDistanceMeters() + .equals(other.getVehiclePickupStraightLineDistanceMeters())) return false; + } + if (hasVehicleDropoffEta() != other.hasVehicleDropoffEta()) return false; + if (hasVehicleDropoffEta()) { + if (!getVehicleDropoffEta().equals(other.getVehicleDropoffEta())) return false; + } + if (hasVehiclePickupToDropoffDistanceMeters() + != other.hasVehiclePickupToDropoffDistanceMeters()) return false; + if (hasVehiclePickupToDropoffDistanceMeters()) { + if (!getVehiclePickupToDropoffDistanceMeters() + .equals(other.getVehiclePickupToDropoffDistanceMeters())) return false; + } + if (tripType_ != other.tripType_) return false; + if (!getVehicleTripsWaypointsList().equals(other.getVehicleTripsWaypointsList())) return false; + if (vehicleMatchType_ != other.vehicleMatchType_) return false; + if (requestedOrderedBy_ != other.requestedOrderedBy_) return false; + if (orderedBy_ != other.orderedBy_) 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 (hasVehicle()) { + hash = (37 * hash) + VEHICLE_FIELD_NUMBER; + hash = (53 * hash) + getVehicle().hashCode(); + } + if (hasVehiclePickupEta()) { + hash = (37 * hash) + VEHICLE_PICKUP_ETA_FIELD_NUMBER; + hash = (53 * hash) + getVehiclePickupEta().hashCode(); + } + if (hasVehiclePickupDistanceMeters()) { + hash = (37 * hash) + VEHICLE_PICKUP_DISTANCE_METERS_FIELD_NUMBER; + hash = (53 * hash) + getVehiclePickupDistanceMeters().hashCode(); + } + if (hasVehiclePickupStraightLineDistanceMeters()) { + hash = (37 * hash) + VEHICLE_PICKUP_STRAIGHT_LINE_DISTANCE_METERS_FIELD_NUMBER; + hash = (53 * hash) + getVehiclePickupStraightLineDistanceMeters().hashCode(); + } + if (hasVehicleDropoffEta()) { + hash = (37 * hash) + VEHICLE_DROPOFF_ETA_FIELD_NUMBER; + hash = (53 * hash) + getVehicleDropoffEta().hashCode(); + } + if (hasVehiclePickupToDropoffDistanceMeters()) { + hash = (37 * hash) + VEHICLE_PICKUP_TO_DROPOFF_DISTANCE_METERS_FIELD_NUMBER; + hash = (53 * hash) + getVehiclePickupToDropoffDistanceMeters().hashCode(); + } + hash = (37 * hash) + TRIP_TYPE_FIELD_NUMBER; + hash = (53 * hash) + tripType_; + if (getVehicleTripsWaypointsCount() > 0) { + hash = (37 * hash) + VEHICLE_TRIPS_WAYPOINTS_FIELD_NUMBER; + hash = (53 * hash) + getVehicleTripsWaypointsList().hashCode(); + } + hash = (37 * hash) + VEHICLE_MATCH_TYPE_FIELD_NUMBER; + hash = (53 * hash) + vehicleMatchType_; + hash = (37 * hash) + REQUESTED_ORDERED_BY_FIELD_NUMBER; + hash = (53 * hash) + requestedOrderedBy_; + hash = (37 * hash) + ORDERED_BY_FIELD_NUMBER; + hash = (53 * hash) + orderedBy_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.fleetengine.v1.VehicleMatch parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.VehicleMatch 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.fleetengine.v1.VehicleMatch parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.VehicleMatch 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.fleetengine.v1.VehicleMatch parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.fleetengine.v1.VehicleMatch parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.VehicleMatch parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.VehicleMatch parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.VehicleMatch parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.VehicleMatch parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.fleetengine.v1.VehicleMatch parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.fleetengine.v1.VehicleMatch parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.fleetengine.v1.VehicleMatch prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Contains the vehicle and related estimates for a vehicle that match the
+   * points of active trips for the vehicle `SearchVehiclesRequest`.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.v1.VehicleMatch} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.v1.VehicleMatch) + com.google.maps.fleetengine.v1.VehicleMatchOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_VehicleMatch_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_VehicleMatch_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.VehicleMatch.class, + com.google.maps.fleetengine.v1.VehicleMatch.Builder.class); + } + + // Construct using com.google.maps.fleetengine.v1.VehicleMatch.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getVehicleFieldBuilder(); + getVehiclePickupEtaFieldBuilder(); + getVehiclePickupDistanceMetersFieldBuilder(); + getVehiclePickupStraightLineDistanceMetersFieldBuilder(); + getVehicleDropoffEtaFieldBuilder(); + getVehiclePickupToDropoffDistanceMetersFieldBuilder(); + getVehicleTripsWaypointsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + vehicle_ = null; + if (vehicleBuilder_ != null) { + vehicleBuilder_.dispose(); + vehicleBuilder_ = null; + } + vehiclePickupEta_ = null; + if (vehiclePickupEtaBuilder_ != null) { + vehiclePickupEtaBuilder_.dispose(); + vehiclePickupEtaBuilder_ = null; + } + vehiclePickupDistanceMeters_ = null; + if (vehiclePickupDistanceMetersBuilder_ != null) { + vehiclePickupDistanceMetersBuilder_.dispose(); + vehiclePickupDistanceMetersBuilder_ = null; + } + vehiclePickupStraightLineDistanceMeters_ = null; + if (vehiclePickupStraightLineDistanceMetersBuilder_ != null) { + vehiclePickupStraightLineDistanceMetersBuilder_.dispose(); + vehiclePickupStraightLineDistanceMetersBuilder_ = null; + } + vehicleDropoffEta_ = null; + if (vehicleDropoffEtaBuilder_ != null) { + vehicleDropoffEtaBuilder_.dispose(); + vehicleDropoffEtaBuilder_ = null; + } + vehiclePickupToDropoffDistanceMeters_ = null; + if (vehiclePickupToDropoffDistanceMetersBuilder_ != null) { + vehiclePickupToDropoffDistanceMetersBuilder_.dispose(); + vehiclePickupToDropoffDistanceMetersBuilder_ = null; + } + tripType_ = 0; + if (vehicleTripsWaypointsBuilder_ == null) { + vehicleTripsWaypoints_ = java.util.Collections.emptyList(); + } else { + vehicleTripsWaypoints_ = null; + vehicleTripsWaypointsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + vehicleMatchType_ = 0; + requestedOrderedBy_ = 0; + orderedBy_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.fleetengine.v1.VehicleApi + .internal_static_maps_fleetengine_v1_VehicleMatch_descriptor; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleMatch getDefaultInstanceForType() { + return com.google.maps.fleetengine.v1.VehicleMatch.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleMatch build() { + com.google.maps.fleetengine.v1.VehicleMatch result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleMatch buildPartial() { + com.google.maps.fleetengine.v1.VehicleMatch result = + new com.google.maps.fleetengine.v1.VehicleMatch(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.maps.fleetengine.v1.VehicleMatch result) { + if (vehicleTripsWaypointsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0)) { + vehicleTripsWaypoints_ = java.util.Collections.unmodifiableList(vehicleTripsWaypoints_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.vehicleTripsWaypoints_ = vehicleTripsWaypoints_; + } else { + result.vehicleTripsWaypoints_ = vehicleTripsWaypointsBuilder_.build(); + } + } + + private void buildPartial0(com.google.maps.fleetengine.v1.VehicleMatch result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.vehicle_ = vehicleBuilder_ == null ? vehicle_ : vehicleBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.vehiclePickupEta_ = + vehiclePickupEtaBuilder_ == null ? vehiclePickupEta_ : vehiclePickupEtaBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.vehiclePickupDistanceMeters_ = + vehiclePickupDistanceMetersBuilder_ == null + ? vehiclePickupDistanceMeters_ + : vehiclePickupDistanceMetersBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.vehiclePickupStraightLineDistanceMeters_ = + vehiclePickupStraightLineDistanceMetersBuilder_ == null + ? vehiclePickupStraightLineDistanceMeters_ + : vehiclePickupStraightLineDistanceMetersBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.vehicleDropoffEta_ = + vehicleDropoffEtaBuilder_ == null + ? vehicleDropoffEta_ + : vehicleDropoffEtaBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.vehiclePickupToDropoffDistanceMeters_ = + vehiclePickupToDropoffDistanceMetersBuilder_ == null + ? vehiclePickupToDropoffDistanceMeters_ + : vehiclePickupToDropoffDistanceMetersBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.tripType_ = tripType_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.vehicleMatchType_ = vehicleMatchType_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.requestedOrderedBy_ = requestedOrderedBy_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.orderedBy_ = orderedBy_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.fleetengine.v1.VehicleMatch) { + return mergeFrom((com.google.maps.fleetengine.v1.VehicleMatch) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.fleetengine.v1.VehicleMatch other) { + if (other == com.google.maps.fleetengine.v1.VehicleMatch.getDefaultInstance()) return this; + if (other.hasVehicle()) { + mergeVehicle(other.getVehicle()); + } + if (other.hasVehiclePickupEta()) { + mergeVehiclePickupEta(other.getVehiclePickupEta()); + } + if (other.hasVehiclePickupDistanceMeters()) { + mergeVehiclePickupDistanceMeters(other.getVehiclePickupDistanceMeters()); + } + if (other.hasVehiclePickupStraightLineDistanceMeters()) { + mergeVehiclePickupStraightLineDistanceMeters( + other.getVehiclePickupStraightLineDistanceMeters()); + } + if (other.hasVehicleDropoffEta()) { + mergeVehicleDropoffEta(other.getVehicleDropoffEta()); + } + if (other.hasVehiclePickupToDropoffDistanceMeters()) { + mergeVehiclePickupToDropoffDistanceMeters(other.getVehiclePickupToDropoffDistanceMeters()); + } + if (other.tripType_ != 0) { + setTripTypeValue(other.getTripTypeValue()); + } + if (vehicleTripsWaypointsBuilder_ == null) { + if (!other.vehicleTripsWaypoints_.isEmpty()) { + if (vehicleTripsWaypoints_.isEmpty()) { + vehicleTripsWaypoints_ = other.vehicleTripsWaypoints_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureVehicleTripsWaypointsIsMutable(); + vehicleTripsWaypoints_.addAll(other.vehicleTripsWaypoints_); + } + onChanged(); + } + } else { + if (!other.vehicleTripsWaypoints_.isEmpty()) { + if (vehicleTripsWaypointsBuilder_.isEmpty()) { + vehicleTripsWaypointsBuilder_.dispose(); + vehicleTripsWaypointsBuilder_ = null; + vehicleTripsWaypoints_ = other.vehicleTripsWaypoints_; + bitField0_ = (bitField0_ & ~0x00000080); + vehicleTripsWaypointsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getVehicleTripsWaypointsFieldBuilder() + : null; + } else { + vehicleTripsWaypointsBuilder_.addAllMessages(other.vehicleTripsWaypoints_); + } + } + } + if (other.vehicleMatchType_ != 0) { + setVehicleMatchTypeValue(other.getVehicleMatchTypeValue()); + } + if (other.requestedOrderedBy_ != 0) { + setRequestedOrderedByValue(other.getRequestedOrderedByValue()); + } + if (other.orderedBy_ != 0) { + setOrderedByValue(other.getOrderedByValue()); + } + 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(getVehicleFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + getVehiclePickupEtaFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + getVehiclePickupDistanceMetersFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + getVehicleDropoffEtaFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 34 + case 42: + { + input.readMessage( + getVehiclePickupToDropoffDistanceMetersFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 42 + case 48: + { + tripType_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 48 + case 58: + { + com.google.maps.fleetengine.v1.Waypoint m = + input.readMessage( + com.google.maps.fleetengine.v1.Waypoint.parser(), extensionRegistry); + if (vehicleTripsWaypointsBuilder_ == null) { + ensureVehicleTripsWaypointsIsMutable(); + vehicleTripsWaypoints_.add(m); + } else { + vehicleTripsWaypointsBuilder_.addMessage(m); + } + break; + } // case 58 + case 64: + { + vehicleMatchType_ = input.readEnum(); + bitField0_ |= 0x00000100; + break; + } // case 64 + case 72: + { + requestedOrderedBy_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 72 + case 80: + { + orderedBy_ = input.readEnum(); + bitField0_ |= 0x00000400; + break; + } // case 80 + case 90: + { + input.readMessage( + getVehiclePickupStraightLineDistanceMetersFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 90 + 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.fleetengine.v1.Vehicle vehicle_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.Vehicle, + com.google.maps.fleetengine.v1.Vehicle.Builder, + com.google.maps.fleetengine.v1.VehicleOrBuilder> + vehicleBuilder_; + /** + * + * + *
+     * Required. A vehicle that matches the request.
+     * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the vehicle field is set. + */ + public boolean hasVehicle() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. A vehicle that matches the request.
+     * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The vehicle. + */ + public com.google.maps.fleetengine.v1.Vehicle getVehicle() { + if (vehicleBuilder_ == null) { + return vehicle_ == null + ? com.google.maps.fleetengine.v1.Vehicle.getDefaultInstance() + : vehicle_; + } else { + return vehicleBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. A vehicle that matches the request.
+     * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setVehicle(com.google.maps.fleetengine.v1.Vehicle value) { + if (vehicleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + vehicle_ = value; + } else { + vehicleBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A vehicle that matches the request.
+     * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setVehicle(com.google.maps.fleetengine.v1.Vehicle.Builder builderForValue) { + if (vehicleBuilder_ == null) { + vehicle_ = builderForValue.build(); + } else { + vehicleBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A vehicle that matches the request.
+     * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeVehicle(com.google.maps.fleetengine.v1.Vehicle value) { + if (vehicleBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && vehicle_ != null + && vehicle_ != com.google.maps.fleetengine.v1.Vehicle.getDefaultInstance()) { + getVehicleBuilder().mergeFrom(value); + } else { + vehicle_ = value; + } + } else { + vehicleBuilder_.mergeFrom(value); + } + if (vehicle_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. A vehicle that matches the request.
+     * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearVehicle() { + bitField0_ = (bitField0_ & ~0x00000001); + vehicle_ = null; + if (vehicleBuilder_ != null) { + vehicleBuilder_.dispose(); + vehicleBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A vehicle that matches the request.
+     * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.maps.fleetengine.v1.Vehicle.Builder getVehicleBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getVehicleFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. A vehicle that matches the request.
+     * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.maps.fleetengine.v1.VehicleOrBuilder getVehicleOrBuilder() { + if (vehicleBuilder_ != null) { + return vehicleBuilder_.getMessageOrBuilder(); + } else { + return vehicle_ == null + ? com.google.maps.fleetengine.v1.Vehicle.getDefaultInstance() + : vehicle_; + } + } + /** + * + * + *
+     * Required. A vehicle that matches the request.
+     * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.Vehicle, + com.google.maps.fleetengine.v1.Vehicle.Builder, + com.google.maps.fleetengine.v1.VehicleOrBuilder> + getVehicleFieldBuilder() { + if (vehicleBuilder_ == null) { + vehicleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.fleetengine.v1.Vehicle, + com.google.maps.fleetengine.v1.Vehicle.Builder, + com.google.maps.fleetengine.v1.VehicleOrBuilder>( + getVehicle(), getParentForChildren(), isClean()); + vehicle_ = null; + } + return vehicleBuilder_; + } + + private com.google.protobuf.Timestamp vehiclePickupEta_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + vehiclePickupEtaBuilder_; + /** + * + * + *
+     * The vehicle's driving ETA to the pickup point specified in the
+     * request. An empty value indicates a failure in calculating ETA for the
+     * vehicle.  If `SearchVehiclesRequest.include_back_to_back` was `true` and
+     * this vehicle has an active trip, `vehicle_pickup_eta` includes the time
+     * required to complete the current active trip.
+     * 
+ * + * .google.protobuf.Timestamp vehicle_pickup_eta = 2; + * + * @return Whether the vehiclePickupEta field is set. + */ + public boolean hasVehiclePickupEta() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The vehicle's driving ETA to the pickup point specified in the
+     * request. An empty value indicates a failure in calculating ETA for the
+     * vehicle.  If `SearchVehiclesRequest.include_back_to_back` was `true` and
+     * this vehicle has an active trip, `vehicle_pickup_eta` includes the time
+     * required to complete the current active trip.
+     * 
+ * + * .google.protobuf.Timestamp vehicle_pickup_eta = 2; + * + * @return The vehiclePickupEta. + */ + public com.google.protobuf.Timestamp getVehiclePickupEta() { + if (vehiclePickupEtaBuilder_ == null) { + return vehiclePickupEta_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : vehiclePickupEta_; + } else { + return vehiclePickupEtaBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The vehicle's driving ETA to the pickup point specified in the
+     * request. An empty value indicates a failure in calculating ETA for the
+     * vehicle.  If `SearchVehiclesRequest.include_back_to_back` was `true` and
+     * this vehicle has an active trip, `vehicle_pickup_eta` includes the time
+     * required to complete the current active trip.
+     * 
+ * + * .google.protobuf.Timestamp vehicle_pickup_eta = 2; + */ + public Builder setVehiclePickupEta(com.google.protobuf.Timestamp value) { + if (vehiclePickupEtaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + vehiclePickupEta_ = value; + } else { + vehiclePickupEtaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The vehicle's driving ETA to the pickup point specified in the
+     * request. An empty value indicates a failure in calculating ETA for the
+     * vehicle.  If `SearchVehiclesRequest.include_back_to_back` was `true` and
+     * this vehicle has an active trip, `vehicle_pickup_eta` includes the time
+     * required to complete the current active trip.
+     * 
+ * + * .google.protobuf.Timestamp vehicle_pickup_eta = 2; + */ + public Builder setVehiclePickupEta(com.google.protobuf.Timestamp.Builder builderForValue) { + if (vehiclePickupEtaBuilder_ == null) { + vehiclePickupEta_ = builderForValue.build(); + } else { + vehiclePickupEtaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The vehicle's driving ETA to the pickup point specified in the
+     * request. An empty value indicates a failure in calculating ETA for the
+     * vehicle.  If `SearchVehiclesRequest.include_back_to_back` was `true` and
+     * this vehicle has an active trip, `vehicle_pickup_eta` includes the time
+     * required to complete the current active trip.
+     * 
+ * + * .google.protobuf.Timestamp vehicle_pickup_eta = 2; + */ + public Builder mergeVehiclePickupEta(com.google.protobuf.Timestamp value) { + if (vehiclePickupEtaBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && vehiclePickupEta_ != null + && vehiclePickupEta_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getVehiclePickupEtaBuilder().mergeFrom(value); + } else { + vehiclePickupEta_ = value; + } + } else { + vehiclePickupEtaBuilder_.mergeFrom(value); + } + if (vehiclePickupEta_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The vehicle's driving ETA to the pickup point specified in the
+     * request. An empty value indicates a failure in calculating ETA for the
+     * vehicle.  If `SearchVehiclesRequest.include_back_to_back` was `true` and
+     * this vehicle has an active trip, `vehicle_pickup_eta` includes the time
+     * required to complete the current active trip.
+     * 
+ * + * .google.protobuf.Timestamp vehicle_pickup_eta = 2; + */ + public Builder clearVehiclePickupEta() { + bitField0_ = (bitField0_ & ~0x00000002); + vehiclePickupEta_ = null; + if (vehiclePickupEtaBuilder_ != null) { + vehiclePickupEtaBuilder_.dispose(); + vehiclePickupEtaBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The vehicle's driving ETA to the pickup point specified in the
+     * request. An empty value indicates a failure in calculating ETA for the
+     * vehicle.  If `SearchVehiclesRequest.include_back_to_back` was `true` and
+     * this vehicle has an active trip, `vehicle_pickup_eta` includes the time
+     * required to complete the current active trip.
+     * 
+ * + * .google.protobuf.Timestamp vehicle_pickup_eta = 2; + */ + public com.google.protobuf.Timestamp.Builder getVehiclePickupEtaBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getVehiclePickupEtaFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The vehicle's driving ETA to the pickup point specified in the
+     * request. An empty value indicates a failure in calculating ETA for the
+     * vehicle.  If `SearchVehiclesRequest.include_back_to_back` was `true` and
+     * this vehicle has an active trip, `vehicle_pickup_eta` includes the time
+     * required to complete the current active trip.
+     * 
+ * + * .google.protobuf.Timestamp vehicle_pickup_eta = 2; + */ + public com.google.protobuf.TimestampOrBuilder getVehiclePickupEtaOrBuilder() { + if (vehiclePickupEtaBuilder_ != null) { + return vehiclePickupEtaBuilder_.getMessageOrBuilder(); + } else { + return vehiclePickupEta_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : vehiclePickupEta_; + } + } + /** + * + * + *
+     * The vehicle's driving ETA to the pickup point specified in the
+     * request. An empty value indicates a failure in calculating ETA for the
+     * vehicle.  If `SearchVehiclesRequest.include_back_to_back` was `true` and
+     * this vehicle has an active trip, `vehicle_pickup_eta` includes the time
+     * required to complete the current active trip.
+     * 
+ * + * .google.protobuf.Timestamp vehicle_pickup_eta = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getVehiclePickupEtaFieldBuilder() { + if (vehiclePickupEtaBuilder_ == null) { + vehiclePickupEtaBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getVehiclePickupEta(), getParentForChildren(), isClean()); + vehiclePickupEta_ = null; + } + return vehiclePickupEtaBuilder_; + } + + private com.google.protobuf.Int32Value vehiclePickupDistanceMeters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + vehiclePickupDistanceMetersBuilder_; + /** + * + * + *
+     * The distance from the Vehicle's current location to the pickup point
+     * specified in the request, including any intermediate pickup or dropoff
+     * points for existing trips. This distance comprises the calculated driving
+     * (route) distance, plus the straight line distance between the navigation
+     * end point and the requested pickup point. (The distance between the
+     * navigation end point and the requested pickup point is typically small.) An
+     * empty value indicates an error in calculating the distance.
+     * 
+ * + * .google.protobuf.Int32Value vehicle_pickup_distance_meters = 3; + * + * @return Whether the vehiclePickupDistanceMeters field is set. + */ + public boolean hasVehiclePickupDistanceMeters() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * The distance from the Vehicle's current location to the pickup point
+     * specified in the request, including any intermediate pickup or dropoff
+     * points for existing trips. This distance comprises the calculated driving
+     * (route) distance, plus the straight line distance between the navigation
+     * end point and the requested pickup point. (The distance between the
+     * navigation end point and the requested pickup point is typically small.) An
+     * empty value indicates an error in calculating the distance.
+     * 
+ * + * .google.protobuf.Int32Value vehicle_pickup_distance_meters = 3; + * + * @return The vehiclePickupDistanceMeters. + */ + public com.google.protobuf.Int32Value getVehiclePickupDistanceMeters() { + if (vehiclePickupDistanceMetersBuilder_ == null) { + return vehiclePickupDistanceMeters_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : vehiclePickupDistanceMeters_; + } else { + return vehiclePickupDistanceMetersBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The distance from the Vehicle's current location to the pickup point
+     * specified in the request, including any intermediate pickup or dropoff
+     * points for existing trips. This distance comprises the calculated driving
+     * (route) distance, plus the straight line distance between the navigation
+     * end point and the requested pickup point. (The distance between the
+     * navigation end point and the requested pickup point is typically small.) An
+     * empty value indicates an error in calculating the distance.
+     * 
+ * + * .google.protobuf.Int32Value vehicle_pickup_distance_meters = 3; + */ + public Builder setVehiclePickupDistanceMeters(com.google.protobuf.Int32Value value) { + if (vehiclePickupDistanceMetersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + vehiclePickupDistanceMeters_ = value; + } else { + vehiclePickupDistanceMetersBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The distance from the Vehicle's current location to the pickup point
+     * specified in the request, including any intermediate pickup or dropoff
+     * points for existing trips. This distance comprises the calculated driving
+     * (route) distance, plus the straight line distance between the navigation
+     * end point and the requested pickup point. (The distance between the
+     * navigation end point and the requested pickup point is typically small.) An
+     * empty value indicates an error in calculating the distance.
+     * 
+ * + * .google.protobuf.Int32Value vehicle_pickup_distance_meters = 3; + */ + public Builder setVehiclePickupDistanceMeters( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (vehiclePickupDistanceMetersBuilder_ == null) { + vehiclePickupDistanceMeters_ = builderForValue.build(); + } else { + vehiclePickupDistanceMetersBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The distance from the Vehicle's current location to the pickup point
+     * specified in the request, including any intermediate pickup or dropoff
+     * points for existing trips. This distance comprises the calculated driving
+     * (route) distance, plus the straight line distance between the navigation
+     * end point and the requested pickup point. (The distance between the
+     * navigation end point and the requested pickup point is typically small.) An
+     * empty value indicates an error in calculating the distance.
+     * 
+ * + * .google.protobuf.Int32Value vehicle_pickup_distance_meters = 3; + */ + public Builder mergeVehiclePickupDistanceMeters(com.google.protobuf.Int32Value value) { + if (vehiclePickupDistanceMetersBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && vehiclePickupDistanceMeters_ != null + && vehiclePickupDistanceMeters_ + != com.google.protobuf.Int32Value.getDefaultInstance()) { + getVehiclePickupDistanceMetersBuilder().mergeFrom(value); + } else { + vehiclePickupDistanceMeters_ = value; + } + } else { + vehiclePickupDistanceMetersBuilder_.mergeFrom(value); + } + if (vehiclePickupDistanceMeters_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The distance from the Vehicle's current location to the pickup point
+     * specified in the request, including any intermediate pickup or dropoff
+     * points for existing trips. This distance comprises the calculated driving
+     * (route) distance, plus the straight line distance between the navigation
+     * end point and the requested pickup point. (The distance between the
+     * navigation end point and the requested pickup point is typically small.) An
+     * empty value indicates an error in calculating the distance.
+     * 
+ * + * .google.protobuf.Int32Value vehicle_pickup_distance_meters = 3; + */ + public Builder clearVehiclePickupDistanceMeters() { + bitField0_ = (bitField0_ & ~0x00000004); + vehiclePickupDistanceMeters_ = null; + if (vehiclePickupDistanceMetersBuilder_ != null) { + vehiclePickupDistanceMetersBuilder_.dispose(); + vehiclePickupDistanceMetersBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The distance from the Vehicle's current location to the pickup point
+     * specified in the request, including any intermediate pickup or dropoff
+     * points for existing trips. This distance comprises the calculated driving
+     * (route) distance, plus the straight line distance between the navigation
+     * end point and the requested pickup point. (The distance between the
+     * navigation end point and the requested pickup point is typically small.) An
+     * empty value indicates an error in calculating the distance.
+     * 
+ * + * .google.protobuf.Int32Value vehicle_pickup_distance_meters = 3; + */ + public com.google.protobuf.Int32Value.Builder getVehiclePickupDistanceMetersBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getVehiclePickupDistanceMetersFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The distance from the Vehicle's current location to the pickup point
+     * specified in the request, including any intermediate pickup or dropoff
+     * points for existing trips. This distance comprises the calculated driving
+     * (route) distance, plus the straight line distance between the navigation
+     * end point and the requested pickup point. (The distance between the
+     * navigation end point and the requested pickup point is typically small.) An
+     * empty value indicates an error in calculating the distance.
+     * 
+ * + * .google.protobuf.Int32Value vehicle_pickup_distance_meters = 3; + */ + public com.google.protobuf.Int32ValueOrBuilder getVehiclePickupDistanceMetersOrBuilder() { + if (vehiclePickupDistanceMetersBuilder_ != null) { + return vehiclePickupDistanceMetersBuilder_.getMessageOrBuilder(); + } else { + return vehiclePickupDistanceMeters_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : vehiclePickupDistanceMeters_; + } + } + /** + * + * + *
+     * The distance from the Vehicle's current location to the pickup point
+     * specified in the request, including any intermediate pickup or dropoff
+     * points for existing trips. This distance comprises the calculated driving
+     * (route) distance, plus the straight line distance between the navigation
+     * end point and the requested pickup point. (The distance between the
+     * navigation end point and the requested pickup point is typically small.) An
+     * empty value indicates an error in calculating the distance.
+     * 
+ * + * .google.protobuf.Int32Value vehicle_pickup_distance_meters = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + getVehiclePickupDistanceMetersFieldBuilder() { + if (vehiclePickupDistanceMetersBuilder_ == null) { + vehiclePickupDistanceMetersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder>( + getVehiclePickupDistanceMeters(), getParentForChildren(), isClean()); + vehiclePickupDistanceMeters_ = null; + } + return vehiclePickupDistanceMetersBuilder_; + } + + private com.google.protobuf.Int32Value vehiclePickupStraightLineDistanceMeters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + vehiclePickupStraightLineDistanceMetersBuilder_; + /** + * + * + *
+     * Required. The straight-line distance between the vehicle and the pickup
+     * point specified in the request.
+     * 
+ * + * + * .google.protobuf.Int32Value vehicle_pickup_straight_line_distance_meters = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the vehiclePickupStraightLineDistanceMeters field is set. + */ + public boolean hasVehiclePickupStraightLineDistanceMeters() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Required. The straight-line distance between the vehicle and the pickup
+     * point specified in the request.
+     * 
+ * + * + * .google.protobuf.Int32Value vehicle_pickup_straight_line_distance_meters = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The vehiclePickupStraightLineDistanceMeters. + */ + public com.google.protobuf.Int32Value getVehiclePickupStraightLineDistanceMeters() { + if (vehiclePickupStraightLineDistanceMetersBuilder_ == null) { + return vehiclePickupStraightLineDistanceMeters_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : vehiclePickupStraightLineDistanceMeters_; + } else { + return vehiclePickupStraightLineDistanceMetersBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The straight-line distance between the vehicle and the pickup
+     * point specified in the request.
+     * 
+ * + * + * .google.protobuf.Int32Value vehicle_pickup_straight_line_distance_meters = 11 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setVehiclePickupStraightLineDistanceMeters( + com.google.protobuf.Int32Value value) { + if (vehiclePickupStraightLineDistanceMetersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + vehiclePickupStraightLineDistanceMeters_ = value; + } else { + vehiclePickupStraightLineDistanceMetersBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The straight-line distance between the vehicle and the pickup
+     * point specified in the request.
+     * 
+ * + * + * .google.protobuf.Int32Value vehicle_pickup_straight_line_distance_meters = 11 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setVehiclePickupStraightLineDistanceMeters( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (vehiclePickupStraightLineDistanceMetersBuilder_ == null) { + vehiclePickupStraightLineDistanceMeters_ = builderForValue.build(); + } else { + vehiclePickupStraightLineDistanceMetersBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The straight-line distance between the vehicle and the pickup
+     * point specified in the request.
+     * 
+ * + * + * .google.protobuf.Int32Value vehicle_pickup_straight_line_distance_meters = 11 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeVehiclePickupStraightLineDistanceMeters( + com.google.protobuf.Int32Value value) { + if (vehiclePickupStraightLineDistanceMetersBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && vehiclePickupStraightLineDistanceMeters_ != null + && vehiclePickupStraightLineDistanceMeters_ + != com.google.protobuf.Int32Value.getDefaultInstance()) { + getVehiclePickupStraightLineDistanceMetersBuilder().mergeFrom(value); + } else { + vehiclePickupStraightLineDistanceMeters_ = value; + } + } else { + vehiclePickupStraightLineDistanceMetersBuilder_.mergeFrom(value); + } + if (vehiclePickupStraightLineDistanceMeters_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The straight-line distance between the vehicle and the pickup
+     * point specified in the request.
+     * 
+ * + * + * .google.protobuf.Int32Value vehicle_pickup_straight_line_distance_meters = 11 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearVehiclePickupStraightLineDistanceMeters() { + bitField0_ = (bitField0_ & ~0x00000008); + vehiclePickupStraightLineDistanceMeters_ = null; + if (vehiclePickupStraightLineDistanceMetersBuilder_ != null) { + vehiclePickupStraightLineDistanceMetersBuilder_.dispose(); + vehiclePickupStraightLineDistanceMetersBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The straight-line distance between the vehicle and the pickup
+     * point specified in the request.
+     * 
+ * + * + * .google.protobuf.Int32Value vehicle_pickup_straight_line_distance_meters = 11 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Int32Value.Builder + getVehiclePickupStraightLineDistanceMetersBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getVehiclePickupStraightLineDistanceMetersFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The straight-line distance between the vehicle and the pickup
+     * point specified in the request.
+     * 
+ * + * + * .google.protobuf.Int32Value vehicle_pickup_straight_line_distance_meters = 11 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Int32ValueOrBuilder + getVehiclePickupStraightLineDistanceMetersOrBuilder() { + if (vehiclePickupStraightLineDistanceMetersBuilder_ != null) { + return vehiclePickupStraightLineDistanceMetersBuilder_.getMessageOrBuilder(); + } else { + return vehiclePickupStraightLineDistanceMeters_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : vehiclePickupStraightLineDistanceMeters_; + } + } + /** + * + * + *
+     * Required. The straight-line distance between the vehicle and the pickup
+     * point specified in the request.
+     * 
+ * + * + * .google.protobuf.Int32Value vehicle_pickup_straight_line_distance_meters = 11 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + getVehiclePickupStraightLineDistanceMetersFieldBuilder() { + if (vehiclePickupStraightLineDistanceMetersBuilder_ == null) { + vehiclePickupStraightLineDistanceMetersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder>( + getVehiclePickupStraightLineDistanceMeters(), getParentForChildren(), isClean()); + vehiclePickupStraightLineDistanceMeters_ = null; + } + return vehiclePickupStraightLineDistanceMetersBuilder_; + } + + private com.google.protobuf.Timestamp vehicleDropoffEta_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + vehicleDropoffEtaBuilder_; + /** + * + * + *
+     * The complete vehicle's driving ETA to the drop off point specified in the
+     * request. The ETA includes stopping at any waypoints before the
+     * `dropoff_point` specified in the request. The value will only be populated
+     * when a drop off point is specified in the request. An empty value indicates
+     * an error calculating the ETA.
+     * 
+ * + * .google.protobuf.Timestamp vehicle_dropoff_eta = 4; + * + * @return Whether the vehicleDropoffEta field is set. + */ + public boolean hasVehicleDropoffEta() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * The complete vehicle's driving ETA to the drop off point specified in the
+     * request. The ETA includes stopping at any waypoints before the
+     * `dropoff_point` specified in the request. The value will only be populated
+     * when a drop off point is specified in the request. An empty value indicates
+     * an error calculating the ETA.
+     * 
+ * + * .google.protobuf.Timestamp vehicle_dropoff_eta = 4; + * + * @return The vehicleDropoffEta. + */ + public com.google.protobuf.Timestamp getVehicleDropoffEta() { + if (vehicleDropoffEtaBuilder_ == null) { + return vehicleDropoffEta_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : vehicleDropoffEta_; + } else { + return vehicleDropoffEtaBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The complete vehicle's driving ETA to the drop off point specified in the
+     * request. The ETA includes stopping at any waypoints before the
+     * `dropoff_point` specified in the request. The value will only be populated
+     * when a drop off point is specified in the request. An empty value indicates
+     * an error calculating the ETA.
+     * 
+ * + * .google.protobuf.Timestamp vehicle_dropoff_eta = 4; + */ + public Builder setVehicleDropoffEta(com.google.protobuf.Timestamp value) { + if (vehicleDropoffEtaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + vehicleDropoffEta_ = value; + } else { + vehicleDropoffEtaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The complete vehicle's driving ETA to the drop off point specified in the
+     * request. The ETA includes stopping at any waypoints before the
+     * `dropoff_point` specified in the request. The value will only be populated
+     * when a drop off point is specified in the request. An empty value indicates
+     * an error calculating the ETA.
+     * 
+ * + * .google.protobuf.Timestamp vehicle_dropoff_eta = 4; + */ + public Builder setVehicleDropoffEta(com.google.protobuf.Timestamp.Builder builderForValue) { + if (vehicleDropoffEtaBuilder_ == null) { + vehicleDropoffEta_ = builderForValue.build(); + } else { + vehicleDropoffEtaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The complete vehicle's driving ETA to the drop off point specified in the
+     * request. The ETA includes stopping at any waypoints before the
+     * `dropoff_point` specified in the request. The value will only be populated
+     * when a drop off point is specified in the request. An empty value indicates
+     * an error calculating the ETA.
+     * 
+ * + * .google.protobuf.Timestamp vehicle_dropoff_eta = 4; + */ + public Builder mergeVehicleDropoffEta(com.google.protobuf.Timestamp value) { + if (vehicleDropoffEtaBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && vehicleDropoffEta_ != null + && vehicleDropoffEta_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getVehicleDropoffEtaBuilder().mergeFrom(value); + } else { + vehicleDropoffEta_ = value; + } + } else { + vehicleDropoffEtaBuilder_.mergeFrom(value); + } + if (vehicleDropoffEta_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The complete vehicle's driving ETA to the drop off point specified in the
+     * request. The ETA includes stopping at any waypoints before the
+     * `dropoff_point` specified in the request. The value will only be populated
+     * when a drop off point is specified in the request. An empty value indicates
+     * an error calculating the ETA.
+     * 
+ * + * .google.protobuf.Timestamp vehicle_dropoff_eta = 4; + */ + public Builder clearVehicleDropoffEta() { + bitField0_ = (bitField0_ & ~0x00000010); + vehicleDropoffEta_ = null; + if (vehicleDropoffEtaBuilder_ != null) { + vehicleDropoffEtaBuilder_.dispose(); + vehicleDropoffEtaBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The complete vehicle's driving ETA to the drop off point specified in the
+     * request. The ETA includes stopping at any waypoints before the
+     * `dropoff_point` specified in the request. The value will only be populated
+     * when a drop off point is specified in the request. An empty value indicates
+     * an error calculating the ETA.
+     * 
+ * + * .google.protobuf.Timestamp vehicle_dropoff_eta = 4; + */ + public com.google.protobuf.Timestamp.Builder getVehicleDropoffEtaBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getVehicleDropoffEtaFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The complete vehicle's driving ETA to the drop off point specified in the
+     * request. The ETA includes stopping at any waypoints before the
+     * `dropoff_point` specified in the request. The value will only be populated
+     * when a drop off point is specified in the request. An empty value indicates
+     * an error calculating the ETA.
+     * 
+ * + * .google.protobuf.Timestamp vehicle_dropoff_eta = 4; + */ + public com.google.protobuf.TimestampOrBuilder getVehicleDropoffEtaOrBuilder() { + if (vehicleDropoffEtaBuilder_ != null) { + return vehicleDropoffEtaBuilder_.getMessageOrBuilder(); + } else { + return vehicleDropoffEta_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : vehicleDropoffEta_; + } + } + /** + * + * + *
+     * The complete vehicle's driving ETA to the drop off point specified in the
+     * request. The ETA includes stopping at any waypoints before the
+     * `dropoff_point` specified in the request. The value will only be populated
+     * when a drop off point is specified in the request. An empty value indicates
+     * an error calculating the ETA.
+     * 
+ * + * .google.protobuf.Timestamp vehicle_dropoff_eta = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getVehicleDropoffEtaFieldBuilder() { + if (vehicleDropoffEtaBuilder_ == null) { + vehicleDropoffEtaBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getVehicleDropoffEta(), getParentForChildren(), isClean()); + vehicleDropoffEta_ = null; + } + return vehicleDropoffEtaBuilder_; + } + + private com.google.protobuf.Int32Value vehiclePickupToDropoffDistanceMeters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + vehiclePickupToDropoffDistanceMetersBuilder_; + /** + * + * + *
+     * The vehicle's driving distance (in meters) from the pickup point
+     * to the drop off point specified in the request. The distance is only
+     * between the two points and does not include the vehicle location or any
+     * other points that must be visited before the vehicle visits either the
+     * pickup point or dropoff point. The value will only be populated when a
+     * `dropoff_point` is specified in the request. An empty value indicates
+     * a failure in calculating the distance from the pickup to
+     * drop off point specified in the request.
+     * 
+ * + * .google.protobuf.Int32Value vehicle_pickup_to_dropoff_distance_meters = 5; + * + * @return Whether the vehiclePickupToDropoffDistanceMeters field is set. + */ + public boolean hasVehiclePickupToDropoffDistanceMeters() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * The vehicle's driving distance (in meters) from the pickup point
+     * to the drop off point specified in the request. The distance is only
+     * between the two points and does not include the vehicle location or any
+     * other points that must be visited before the vehicle visits either the
+     * pickup point or dropoff point. The value will only be populated when a
+     * `dropoff_point` is specified in the request. An empty value indicates
+     * a failure in calculating the distance from the pickup to
+     * drop off point specified in the request.
+     * 
+ * + * .google.protobuf.Int32Value vehicle_pickup_to_dropoff_distance_meters = 5; + * + * @return The vehiclePickupToDropoffDistanceMeters. + */ + public com.google.protobuf.Int32Value getVehiclePickupToDropoffDistanceMeters() { + if (vehiclePickupToDropoffDistanceMetersBuilder_ == null) { + return vehiclePickupToDropoffDistanceMeters_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : vehiclePickupToDropoffDistanceMeters_; + } else { + return vehiclePickupToDropoffDistanceMetersBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The vehicle's driving distance (in meters) from the pickup point
+     * to the drop off point specified in the request. The distance is only
+     * between the two points and does not include the vehicle location or any
+     * other points that must be visited before the vehicle visits either the
+     * pickup point or dropoff point. The value will only be populated when a
+     * `dropoff_point` is specified in the request. An empty value indicates
+     * a failure in calculating the distance from the pickup to
+     * drop off point specified in the request.
+     * 
+ * + * .google.protobuf.Int32Value vehicle_pickup_to_dropoff_distance_meters = 5; + */ + public Builder setVehiclePickupToDropoffDistanceMeters(com.google.protobuf.Int32Value value) { + if (vehiclePickupToDropoffDistanceMetersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + vehiclePickupToDropoffDistanceMeters_ = value; + } else { + vehiclePickupToDropoffDistanceMetersBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The vehicle's driving distance (in meters) from the pickup point
+     * to the drop off point specified in the request. The distance is only
+     * between the two points and does not include the vehicle location or any
+     * other points that must be visited before the vehicle visits either the
+     * pickup point or dropoff point. The value will only be populated when a
+     * `dropoff_point` is specified in the request. An empty value indicates
+     * a failure in calculating the distance from the pickup to
+     * drop off point specified in the request.
+     * 
+ * + * .google.protobuf.Int32Value vehicle_pickup_to_dropoff_distance_meters = 5; + */ + public Builder setVehiclePickupToDropoffDistanceMeters( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (vehiclePickupToDropoffDistanceMetersBuilder_ == null) { + vehiclePickupToDropoffDistanceMeters_ = builderForValue.build(); + } else { + vehiclePickupToDropoffDistanceMetersBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The vehicle's driving distance (in meters) from the pickup point
+     * to the drop off point specified in the request. The distance is only
+     * between the two points and does not include the vehicle location or any
+     * other points that must be visited before the vehicle visits either the
+     * pickup point or dropoff point. The value will only be populated when a
+     * `dropoff_point` is specified in the request. An empty value indicates
+     * a failure in calculating the distance from the pickup to
+     * drop off point specified in the request.
+     * 
+ * + * .google.protobuf.Int32Value vehicle_pickup_to_dropoff_distance_meters = 5; + */ + public Builder mergeVehiclePickupToDropoffDistanceMeters(com.google.protobuf.Int32Value value) { + if (vehiclePickupToDropoffDistanceMetersBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && vehiclePickupToDropoffDistanceMeters_ != null + && vehiclePickupToDropoffDistanceMeters_ + != com.google.protobuf.Int32Value.getDefaultInstance()) { + getVehiclePickupToDropoffDistanceMetersBuilder().mergeFrom(value); + } else { + vehiclePickupToDropoffDistanceMeters_ = value; + } + } else { + vehiclePickupToDropoffDistanceMetersBuilder_.mergeFrom(value); + } + if (vehiclePickupToDropoffDistanceMeters_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The vehicle's driving distance (in meters) from the pickup point
+     * to the drop off point specified in the request. The distance is only
+     * between the two points and does not include the vehicle location or any
+     * other points that must be visited before the vehicle visits either the
+     * pickup point or dropoff point. The value will only be populated when a
+     * `dropoff_point` is specified in the request. An empty value indicates
+     * a failure in calculating the distance from the pickup to
+     * drop off point specified in the request.
+     * 
+ * + * .google.protobuf.Int32Value vehicle_pickup_to_dropoff_distance_meters = 5; + */ + public Builder clearVehiclePickupToDropoffDistanceMeters() { + bitField0_ = (bitField0_ & ~0x00000020); + vehiclePickupToDropoffDistanceMeters_ = null; + if (vehiclePickupToDropoffDistanceMetersBuilder_ != null) { + vehiclePickupToDropoffDistanceMetersBuilder_.dispose(); + vehiclePickupToDropoffDistanceMetersBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The vehicle's driving distance (in meters) from the pickup point
+     * to the drop off point specified in the request. The distance is only
+     * between the two points and does not include the vehicle location or any
+     * other points that must be visited before the vehicle visits either the
+     * pickup point or dropoff point. The value will only be populated when a
+     * `dropoff_point` is specified in the request. An empty value indicates
+     * a failure in calculating the distance from the pickup to
+     * drop off point specified in the request.
+     * 
+ * + * .google.protobuf.Int32Value vehicle_pickup_to_dropoff_distance_meters = 5; + */ + public com.google.protobuf.Int32Value.Builder getVehiclePickupToDropoffDistanceMetersBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getVehiclePickupToDropoffDistanceMetersFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The vehicle's driving distance (in meters) from the pickup point
+     * to the drop off point specified in the request. The distance is only
+     * between the two points and does not include the vehicle location or any
+     * other points that must be visited before the vehicle visits either the
+     * pickup point or dropoff point. The value will only be populated when a
+     * `dropoff_point` is specified in the request. An empty value indicates
+     * a failure in calculating the distance from the pickup to
+     * drop off point specified in the request.
+     * 
+ * + * .google.protobuf.Int32Value vehicle_pickup_to_dropoff_distance_meters = 5; + */ + public com.google.protobuf.Int32ValueOrBuilder + getVehiclePickupToDropoffDistanceMetersOrBuilder() { + if (vehiclePickupToDropoffDistanceMetersBuilder_ != null) { + return vehiclePickupToDropoffDistanceMetersBuilder_.getMessageOrBuilder(); + } else { + return vehiclePickupToDropoffDistanceMeters_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : vehiclePickupToDropoffDistanceMeters_; + } + } + /** + * + * + *
+     * The vehicle's driving distance (in meters) from the pickup point
+     * to the drop off point specified in the request. The distance is only
+     * between the two points and does not include the vehicle location or any
+     * other points that must be visited before the vehicle visits either the
+     * pickup point or dropoff point. The value will only be populated when a
+     * `dropoff_point` is specified in the request. An empty value indicates
+     * a failure in calculating the distance from the pickup to
+     * drop off point specified in the request.
+     * 
+ * + * .google.protobuf.Int32Value vehicle_pickup_to_dropoff_distance_meters = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + getVehiclePickupToDropoffDistanceMetersFieldBuilder() { + if (vehiclePickupToDropoffDistanceMetersBuilder_ == null) { + vehiclePickupToDropoffDistanceMetersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder>( + getVehiclePickupToDropoffDistanceMeters(), getParentForChildren(), isClean()); + vehiclePickupToDropoffDistanceMeters_ = null; + } + return vehiclePickupToDropoffDistanceMetersBuilder_; + } + + private int tripType_ = 0; + /** + * + * + *
+     * Required. The trip type of the request that was used to calculate the ETA
+     * to the pickup point.
+     * 
+ * + * .maps.fleetengine.v1.TripType trip_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for tripType. + */ + @java.lang.Override + public int getTripTypeValue() { + return tripType_; + } + /** + * + * + *
+     * Required. The trip type of the request that was used to calculate the ETA
+     * to the pickup point.
+     * 
+ * + * .maps.fleetengine.v1.TripType trip_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for tripType to set. + * @return This builder for chaining. + */ + public Builder setTripTypeValue(int value) { + tripType_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The trip type of the request that was used to calculate the ETA
+     * to the pickup point.
+     * 
+ * + * .maps.fleetengine.v1.TripType trip_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tripType. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.TripType getTripType() { + com.google.maps.fleetengine.v1.TripType result = + com.google.maps.fleetengine.v1.TripType.forNumber(tripType_); + return result == null ? com.google.maps.fleetengine.v1.TripType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Required. The trip type of the request that was used to calculate the ETA
+     * to the pickup point.
+     * 
+ * + * .maps.fleetengine.v1.TripType trip_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The tripType to set. + * @return This builder for chaining. + */ + public Builder setTripType(com.google.maps.fleetengine.v1.TripType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + tripType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The trip type of the request that was used to calculate the ETA
+     * to the pickup point.
+     * 
+ * + * .maps.fleetengine.v1.TripType trip_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearTripType() { + bitField0_ = (bitField0_ & ~0x00000040); + tripType_ = 0; + onChanged(); + return this; + } + + private java.util.List vehicleTripsWaypoints_ = + java.util.Collections.emptyList(); + + private void ensureVehicleTripsWaypointsIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + vehicleTripsWaypoints_ = + new java.util.ArrayList( + vehicleTripsWaypoints_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.Waypoint, + com.google.maps.fleetengine.v1.Waypoint.Builder, + com.google.maps.fleetengine.v1.WaypointOrBuilder> + vehicleTripsWaypointsBuilder_; + + /** + * + * + *
+     * The ordered list of waypoints used to calculate the ETA. The list
+     * includes vehicle location, the pickup points of active
+     * trips for the vehicle, and the pickup points provided in the
+     * request. An empty list indicates a failure in calculating ETA for the
+     * vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.Waypoint vehicle_trips_waypoints = 7; + */ + public java.util.List getVehicleTripsWaypointsList() { + if (vehicleTripsWaypointsBuilder_ == null) { + return java.util.Collections.unmodifiableList(vehicleTripsWaypoints_); + } else { + return vehicleTripsWaypointsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The ordered list of waypoints used to calculate the ETA. The list
+     * includes vehicle location, the pickup points of active
+     * trips for the vehicle, and the pickup points provided in the
+     * request. An empty list indicates a failure in calculating ETA for the
+     * vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.Waypoint vehicle_trips_waypoints = 7; + */ + public int getVehicleTripsWaypointsCount() { + if (vehicleTripsWaypointsBuilder_ == null) { + return vehicleTripsWaypoints_.size(); + } else { + return vehicleTripsWaypointsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The ordered list of waypoints used to calculate the ETA. The list
+     * includes vehicle location, the pickup points of active
+     * trips for the vehicle, and the pickup points provided in the
+     * request. An empty list indicates a failure in calculating ETA for the
+     * vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.Waypoint vehicle_trips_waypoints = 7; + */ + public com.google.maps.fleetengine.v1.Waypoint getVehicleTripsWaypoints(int index) { + if (vehicleTripsWaypointsBuilder_ == null) { + return vehicleTripsWaypoints_.get(index); + } else { + return vehicleTripsWaypointsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The ordered list of waypoints used to calculate the ETA. The list
+     * includes vehicle location, the pickup points of active
+     * trips for the vehicle, and the pickup points provided in the
+     * request. An empty list indicates a failure in calculating ETA for the
+     * vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.Waypoint vehicle_trips_waypoints = 7; + */ + public Builder setVehicleTripsWaypoints( + int index, com.google.maps.fleetengine.v1.Waypoint value) { + if (vehicleTripsWaypointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVehicleTripsWaypointsIsMutable(); + vehicleTripsWaypoints_.set(index, value); + onChanged(); + } else { + vehicleTripsWaypointsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The ordered list of waypoints used to calculate the ETA. The list
+     * includes vehicle location, the pickup points of active
+     * trips for the vehicle, and the pickup points provided in the
+     * request. An empty list indicates a failure in calculating ETA for the
+     * vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.Waypoint vehicle_trips_waypoints = 7; + */ + public Builder setVehicleTripsWaypoints( + int index, com.google.maps.fleetengine.v1.Waypoint.Builder builderForValue) { + if (vehicleTripsWaypointsBuilder_ == null) { + ensureVehicleTripsWaypointsIsMutable(); + vehicleTripsWaypoints_.set(index, builderForValue.build()); + onChanged(); + } else { + vehicleTripsWaypointsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The ordered list of waypoints used to calculate the ETA. The list
+     * includes vehicle location, the pickup points of active
+     * trips for the vehicle, and the pickup points provided in the
+     * request. An empty list indicates a failure in calculating ETA for the
+     * vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.Waypoint vehicle_trips_waypoints = 7; + */ + public Builder addVehicleTripsWaypoints(com.google.maps.fleetengine.v1.Waypoint value) { + if (vehicleTripsWaypointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVehicleTripsWaypointsIsMutable(); + vehicleTripsWaypoints_.add(value); + onChanged(); + } else { + vehicleTripsWaypointsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The ordered list of waypoints used to calculate the ETA. The list
+     * includes vehicle location, the pickup points of active
+     * trips for the vehicle, and the pickup points provided in the
+     * request. An empty list indicates a failure in calculating ETA for the
+     * vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.Waypoint vehicle_trips_waypoints = 7; + */ + public Builder addVehicleTripsWaypoints( + int index, com.google.maps.fleetengine.v1.Waypoint value) { + if (vehicleTripsWaypointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVehicleTripsWaypointsIsMutable(); + vehicleTripsWaypoints_.add(index, value); + onChanged(); + } else { + vehicleTripsWaypointsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The ordered list of waypoints used to calculate the ETA. The list
+     * includes vehicle location, the pickup points of active
+     * trips for the vehicle, and the pickup points provided in the
+     * request. An empty list indicates a failure in calculating ETA for the
+     * vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.Waypoint vehicle_trips_waypoints = 7; + */ + public Builder addVehicleTripsWaypoints( + com.google.maps.fleetengine.v1.Waypoint.Builder builderForValue) { + if (vehicleTripsWaypointsBuilder_ == null) { + ensureVehicleTripsWaypointsIsMutable(); + vehicleTripsWaypoints_.add(builderForValue.build()); + onChanged(); + } else { + vehicleTripsWaypointsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The ordered list of waypoints used to calculate the ETA. The list
+     * includes vehicle location, the pickup points of active
+     * trips for the vehicle, and the pickup points provided in the
+     * request. An empty list indicates a failure in calculating ETA for the
+     * vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.Waypoint vehicle_trips_waypoints = 7; + */ + public Builder addVehicleTripsWaypoints( + int index, com.google.maps.fleetengine.v1.Waypoint.Builder builderForValue) { + if (vehicleTripsWaypointsBuilder_ == null) { + ensureVehicleTripsWaypointsIsMutable(); + vehicleTripsWaypoints_.add(index, builderForValue.build()); + onChanged(); + } else { + vehicleTripsWaypointsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The ordered list of waypoints used to calculate the ETA. The list
+     * includes vehicle location, the pickup points of active
+     * trips for the vehicle, and the pickup points provided in the
+     * request. An empty list indicates a failure in calculating ETA for the
+     * vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.Waypoint vehicle_trips_waypoints = 7; + */ + public Builder addAllVehicleTripsWaypoints( + java.lang.Iterable values) { + if (vehicleTripsWaypointsBuilder_ == null) { + ensureVehicleTripsWaypointsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, vehicleTripsWaypoints_); + onChanged(); + } else { + vehicleTripsWaypointsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The ordered list of waypoints used to calculate the ETA. The list
+     * includes vehicle location, the pickup points of active
+     * trips for the vehicle, and the pickup points provided in the
+     * request. An empty list indicates a failure in calculating ETA for the
+     * vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.Waypoint vehicle_trips_waypoints = 7; + */ + public Builder clearVehicleTripsWaypoints() { + if (vehicleTripsWaypointsBuilder_ == null) { + vehicleTripsWaypoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + vehicleTripsWaypointsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The ordered list of waypoints used to calculate the ETA. The list
+     * includes vehicle location, the pickup points of active
+     * trips for the vehicle, and the pickup points provided in the
+     * request. An empty list indicates a failure in calculating ETA for the
+     * vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.Waypoint vehicle_trips_waypoints = 7; + */ + public Builder removeVehicleTripsWaypoints(int index) { + if (vehicleTripsWaypointsBuilder_ == null) { + ensureVehicleTripsWaypointsIsMutable(); + vehicleTripsWaypoints_.remove(index); + onChanged(); + } else { + vehicleTripsWaypointsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The ordered list of waypoints used to calculate the ETA. The list
+     * includes vehicle location, the pickup points of active
+     * trips for the vehicle, and the pickup points provided in the
+     * request. An empty list indicates a failure in calculating ETA for the
+     * vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.Waypoint vehicle_trips_waypoints = 7; + */ + public com.google.maps.fleetengine.v1.Waypoint.Builder getVehicleTripsWaypointsBuilder( + int index) { + return getVehicleTripsWaypointsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The ordered list of waypoints used to calculate the ETA. The list
+     * includes vehicle location, the pickup points of active
+     * trips for the vehicle, and the pickup points provided in the
+     * request. An empty list indicates a failure in calculating ETA for the
+     * vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.Waypoint vehicle_trips_waypoints = 7; + */ + public com.google.maps.fleetengine.v1.WaypointOrBuilder getVehicleTripsWaypointsOrBuilder( + int index) { + if (vehicleTripsWaypointsBuilder_ == null) { + return vehicleTripsWaypoints_.get(index); + } else { + return vehicleTripsWaypointsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The ordered list of waypoints used to calculate the ETA. The list
+     * includes vehicle location, the pickup points of active
+     * trips for the vehicle, and the pickup points provided in the
+     * request. An empty list indicates a failure in calculating ETA for the
+     * vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.Waypoint vehicle_trips_waypoints = 7; + */ + public java.util.List + getVehicleTripsWaypointsOrBuilderList() { + if (vehicleTripsWaypointsBuilder_ != null) { + return vehicleTripsWaypointsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(vehicleTripsWaypoints_); + } + } + /** + * + * + *
+     * The ordered list of waypoints used to calculate the ETA. The list
+     * includes vehicle location, the pickup points of active
+     * trips for the vehicle, and the pickup points provided in the
+     * request. An empty list indicates a failure in calculating ETA for the
+     * vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.Waypoint vehicle_trips_waypoints = 7; + */ + public com.google.maps.fleetengine.v1.Waypoint.Builder addVehicleTripsWaypointsBuilder() { + return getVehicleTripsWaypointsFieldBuilder() + .addBuilder(com.google.maps.fleetengine.v1.Waypoint.getDefaultInstance()); + } + /** + * + * + *
+     * The ordered list of waypoints used to calculate the ETA. The list
+     * includes vehicle location, the pickup points of active
+     * trips for the vehicle, and the pickup points provided in the
+     * request. An empty list indicates a failure in calculating ETA for the
+     * vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.Waypoint vehicle_trips_waypoints = 7; + */ + public com.google.maps.fleetengine.v1.Waypoint.Builder addVehicleTripsWaypointsBuilder( + int index) { + return getVehicleTripsWaypointsFieldBuilder() + .addBuilder(index, com.google.maps.fleetengine.v1.Waypoint.getDefaultInstance()); + } + /** + * + * + *
+     * The ordered list of waypoints used to calculate the ETA. The list
+     * includes vehicle location, the pickup points of active
+     * trips for the vehicle, and the pickup points provided in the
+     * request. An empty list indicates a failure in calculating ETA for the
+     * vehicle.
+     * 
+ * + * repeated .maps.fleetengine.v1.Waypoint vehicle_trips_waypoints = 7; + */ + public java.util.List + getVehicleTripsWaypointsBuilderList() { + return getVehicleTripsWaypointsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.Waypoint, + com.google.maps.fleetengine.v1.Waypoint.Builder, + com.google.maps.fleetengine.v1.WaypointOrBuilder> + getVehicleTripsWaypointsFieldBuilder() { + if (vehicleTripsWaypointsBuilder_ == null) { + vehicleTripsWaypointsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.fleetengine.v1.Waypoint, + com.google.maps.fleetengine.v1.Waypoint.Builder, + com.google.maps.fleetengine.v1.WaypointOrBuilder>( + vehicleTripsWaypoints_, + ((bitField0_ & 0x00000080) != 0), + getParentForChildren(), + isClean()); + vehicleTripsWaypoints_ = null; + } + return vehicleTripsWaypointsBuilder_; + } + + private int vehicleMatchType_ = 0; + /** + * + * + *
+     * Type of the vehicle match.
+     * 
+ * + * .maps.fleetengine.v1.VehicleMatch.VehicleMatchType vehicle_match_type = 8; + * + * @return The enum numeric value on the wire for vehicleMatchType. + */ + @java.lang.Override + public int getVehicleMatchTypeValue() { + return vehicleMatchType_; + } + /** + * + * + *
+     * Type of the vehicle match.
+     * 
+ * + * .maps.fleetengine.v1.VehicleMatch.VehicleMatchType vehicle_match_type = 8; + * + * @param value The enum numeric value on the wire for vehicleMatchType to set. + * @return This builder for chaining. + */ + public Builder setVehicleMatchTypeValue(int value) { + vehicleMatchType_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Type of the vehicle match.
+     * 
+ * + * .maps.fleetengine.v1.VehicleMatch.VehicleMatchType vehicle_match_type = 8; + * + * @return The vehicleMatchType. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.VehicleMatch.VehicleMatchType getVehicleMatchType() { + com.google.maps.fleetengine.v1.VehicleMatch.VehicleMatchType result = + com.google.maps.fleetengine.v1.VehicleMatch.VehicleMatchType.forNumber(vehicleMatchType_); + return result == null + ? com.google.maps.fleetengine.v1.VehicleMatch.VehicleMatchType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Type of the vehicle match.
+     * 
+ * + * .maps.fleetengine.v1.VehicleMatch.VehicleMatchType vehicle_match_type = 8; + * + * @param value The vehicleMatchType to set. + * @return This builder for chaining. + */ + public Builder setVehicleMatchType( + com.google.maps.fleetengine.v1.VehicleMatch.VehicleMatchType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + vehicleMatchType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Type of the vehicle match.
+     * 
+ * + * .maps.fleetengine.v1.VehicleMatch.VehicleMatchType vehicle_match_type = 8; + * + * @return This builder for chaining. + */ + public Builder clearVehicleMatchType() { + bitField0_ = (bitField0_ & ~0x00000100); + vehicleMatchType_ = 0; + onChanged(); + return this; + } + + private int requestedOrderedBy_ = 0; + /** + * + * + *
+     * The order requested for sorting vehicle matches.
+     * 
+ * + * .maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder requested_ordered_by = 9; + * + * + * @return The enum numeric value on the wire for requestedOrderedBy. + */ + @java.lang.Override + public int getRequestedOrderedByValue() { + return requestedOrderedBy_; + } + /** + * + * + *
+     * The order requested for sorting vehicle matches.
+     * 
+ * + * .maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder requested_ordered_by = 9; + * + * + * @param value The enum numeric value on the wire for requestedOrderedBy to set. + * @return This builder for chaining. + */ + public Builder setRequestedOrderedByValue(int value) { + requestedOrderedBy_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * The order requested for sorting vehicle matches.
+     * 
+ * + * .maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder requested_ordered_by = 9; + * + * + * @return The requestedOrderedBy. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder + getRequestedOrderedBy() { + com.google.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder result = + com.google.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder.forNumber( + requestedOrderedBy_); + return result == null + ? com.google.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The order requested for sorting vehicle matches.
+     * 
+ * + * .maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder requested_ordered_by = 9; + * + * + * @param value The requestedOrderedBy to set. + * @return This builder for chaining. + */ + public Builder setRequestedOrderedBy( + com.google.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + requestedOrderedBy_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The order requested for sorting vehicle matches.
+     * 
+ * + * .maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder requested_ordered_by = 9; + * + * + * @return This builder for chaining. + */ + public Builder clearRequestedOrderedBy() { + bitField0_ = (bitField0_ & ~0x00000200); + requestedOrderedBy_ = 0; + onChanged(); + return this; + } + + private int orderedBy_ = 0; + /** + * + * + *
+     * The actual order that was used for this vehicle. Normally this
+     * will match the 'order_by' field from the request; however, in certain
+     * circumstances such as an internal server error, a different method
+     * may be used (such as `PICKUP_POINT_STRAIGHT_DISTANCE`).
+     * 
+ * + * .maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder ordered_by = 10; + * + * @return The enum numeric value on the wire for orderedBy. + */ + @java.lang.Override + public int getOrderedByValue() { + return orderedBy_; + } + /** + * + * + *
+     * The actual order that was used for this vehicle. Normally this
+     * will match the 'order_by' field from the request; however, in certain
+     * circumstances such as an internal server error, a different method
+     * may be used (such as `PICKUP_POINT_STRAIGHT_DISTANCE`).
+     * 
+ * + * .maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder ordered_by = 10; + * + * @param value The enum numeric value on the wire for orderedBy to set. + * @return This builder for chaining. + */ + public Builder setOrderedByValue(int value) { + orderedBy_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * The actual order that was used for this vehicle. Normally this
+     * will match the 'order_by' field from the request; however, in certain
+     * circumstances such as an internal server error, a different method
+     * may be used (such as `PICKUP_POINT_STRAIGHT_DISTANCE`).
+     * 
+ * + * .maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder ordered_by = 10; + * + * @return The orderedBy. + */ + @java.lang.Override + public com.google.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder getOrderedBy() { + com.google.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder result = + com.google.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder.forNumber( + orderedBy_); + return result == null + ? com.google.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The actual order that was used for this vehicle. Normally this
+     * will match the 'order_by' field from the request; however, in certain
+     * circumstances such as an internal server error, a different method
+     * may be used (such as `PICKUP_POINT_STRAIGHT_DISTANCE`).
+     * 
+ * + * .maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder ordered_by = 10; + * + * @param value The orderedBy to set. + * @return This builder for chaining. + */ + public Builder setOrderedBy( + com.google.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + orderedBy_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The actual order that was used for this vehicle. Normally this
+     * will match the 'order_by' field from the request; however, in certain
+     * circumstances such as an internal server error, a different method
+     * may be used (such as `PICKUP_POINT_STRAIGHT_DISTANCE`).
+     * 
+ * + * .maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder ordered_by = 10; + * + * @return This builder for chaining. + */ + public Builder clearOrderedBy() { + bitField0_ = (bitField0_ & ~0x00000400); + orderedBy_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:maps.fleetengine.v1.VehicleMatch) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.v1.VehicleMatch) + private static final com.google.maps.fleetengine.v1.VehicleMatch DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.fleetengine.v1.VehicleMatch(); + } + + public static com.google.maps.fleetengine.v1.VehicleMatch getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VehicleMatch 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.fleetengine.v1.VehicleMatch getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleMatchOrBuilder.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleMatchOrBuilder.java new file mode 100644 index 000000000000..7274f14f28ef --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleMatchOrBuilder.java @@ -0,0 +1,495 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicle_api.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public interface VehicleMatchOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.v1.VehicleMatch) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A vehicle that matches the request.
+   * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the vehicle field is set. + */ + boolean hasVehicle(); + /** + * + * + *
+   * Required. A vehicle that matches the request.
+   * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The vehicle. + */ + com.google.maps.fleetengine.v1.Vehicle getVehicle(); + /** + * + * + *
+   * Required. A vehicle that matches the request.
+   * 
+ * + * .maps.fleetengine.v1.Vehicle vehicle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.maps.fleetengine.v1.VehicleOrBuilder getVehicleOrBuilder(); + + /** + * + * + *
+   * The vehicle's driving ETA to the pickup point specified in the
+   * request. An empty value indicates a failure in calculating ETA for the
+   * vehicle.  If `SearchVehiclesRequest.include_back_to_back` was `true` and
+   * this vehicle has an active trip, `vehicle_pickup_eta` includes the time
+   * required to complete the current active trip.
+   * 
+ * + * .google.protobuf.Timestamp vehicle_pickup_eta = 2; + * + * @return Whether the vehiclePickupEta field is set. + */ + boolean hasVehiclePickupEta(); + /** + * + * + *
+   * The vehicle's driving ETA to the pickup point specified in the
+   * request. An empty value indicates a failure in calculating ETA for the
+   * vehicle.  If `SearchVehiclesRequest.include_back_to_back` was `true` and
+   * this vehicle has an active trip, `vehicle_pickup_eta` includes the time
+   * required to complete the current active trip.
+   * 
+ * + * .google.protobuf.Timestamp vehicle_pickup_eta = 2; + * + * @return The vehiclePickupEta. + */ + com.google.protobuf.Timestamp getVehiclePickupEta(); + /** + * + * + *
+   * The vehicle's driving ETA to the pickup point specified in the
+   * request. An empty value indicates a failure in calculating ETA for the
+   * vehicle.  If `SearchVehiclesRequest.include_back_to_back` was `true` and
+   * this vehicle has an active trip, `vehicle_pickup_eta` includes the time
+   * required to complete the current active trip.
+   * 
+ * + * .google.protobuf.Timestamp vehicle_pickup_eta = 2; + */ + com.google.protobuf.TimestampOrBuilder getVehiclePickupEtaOrBuilder(); + + /** + * + * + *
+   * The distance from the Vehicle's current location to the pickup point
+   * specified in the request, including any intermediate pickup or dropoff
+   * points for existing trips. This distance comprises the calculated driving
+   * (route) distance, plus the straight line distance between the navigation
+   * end point and the requested pickup point. (The distance between the
+   * navigation end point and the requested pickup point is typically small.) An
+   * empty value indicates an error in calculating the distance.
+   * 
+ * + * .google.protobuf.Int32Value vehicle_pickup_distance_meters = 3; + * + * @return Whether the vehiclePickupDistanceMeters field is set. + */ + boolean hasVehiclePickupDistanceMeters(); + /** + * + * + *
+   * The distance from the Vehicle's current location to the pickup point
+   * specified in the request, including any intermediate pickup or dropoff
+   * points for existing trips. This distance comprises the calculated driving
+   * (route) distance, plus the straight line distance between the navigation
+   * end point and the requested pickup point. (The distance between the
+   * navigation end point and the requested pickup point is typically small.) An
+   * empty value indicates an error in calculating the distance.
+   * 
+ * + * .google.protobuf.Int32Value vehicle_pickup_distance_meters = 3; + * + * @return The vehiclePickupDistanceMeters. + */ + com.google.protobuf.Int32Value getVehiclePickupDistanceMeters(); + /** + * + * + *
+   * The distance from the Vehicle's current location to the pickup point
+   * specified in the request, including any intermediate pickup or dropoff
+   * points for existing trips. This distance comprises the calculated driving
+   * (route) distance, plus the straight line distance between the navigation
+   * end point and the requested pickup point. (The distance between the
+   * navigation end point and the requested pickup point is typically small.) An
+   * empty value indicates an error in calculating the distance.
+   * 
+ * + * .google.protobuf.Int32Value vehicle_pickup_distance_meters = 3; + */ + com.google.protobuf.Int32ValueOrBuilder getVehiclePickupDistanceMetersOrBuilder(); + + /** + * + * + *
+   * Required. The straight-line distance between the vehicle and the pickup
+   * point specified in the request.
+   * 
+ * + * + * .google.protobuf.Int32Value vehicle_pickup_straight_line_distance_meters = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the vehiclePickupStraightLineDistanceMeters field is set. + */ + boolean hasVehiclePickupStraightLineDistanceMeters(); + /** + * + * + *
+   * Required. The straight-line distance between the vehicle and the pickup
+   * point specified in the request.
+   * 
+ * + * + * .google.protobuf.Int32Value vehicle_pickup_straight_line_distance_meters = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The vehiclePickupStraightLineDistanceMeters. + */ + com.google.protobuf.Int32Value getVehiclePickupStraightLineDistanceMeters(); + /** + * + * + *
+   * Required. The straight-line distance between the vehicle and the pickup
+   * point specified in the request.
+   * 
+ * + * + * .google.protobuf.Int32Value vehicle_pickup_straight_line_distance_meters = 11 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.Int32ValueOrBuilder getVehiclePickupStraightLineDistanceMetersOrBuilder(); + + /** + * + * + *
+   * The complete vehicle's driving ETA to the drop off point specified in the
+   * request. The ETA includes stopping at any waypoints before the
+   * `dropoff_point` specified in the request. The value will only be populated
+   * when a drop off point is specified in the request. An empty value indicates
+   * an error calculating the ETA.
+   * 
+ * + * .google.protobuf.Timestamp vehicle_dropoff_eta = 4; + * + * @return Whether the vehicleDropoffEta field is set. + */ + boolean hasVehicleDropoffEta(); + /** + * + * + *
+   * The complete vehicle's driving ETA to the drop off point specified in the
+   * request. The ETA includes stopping at any waypoints before the
+   * `dropoff_point` specified in the request. The value will only be populated
+   * when a drop off point is specified in the request. An empty value indicates
+   * an error calculating the ETA.
+   * 
+ * + * .google.protobuf.Timestamp vehicle_dropoff_eta = 4; + * + * @return The vehicleDropoffEta. + */ + com.google.protobuf.Timestamp getVehicleDropoffEta(); + /** + * + * + *
+   * The complete vehicle's driving ETA to the drop off point specified in the
+   * request. The ETA includes stopping at any waypoints before the
+   * `dropoff_point` specified in the request. The value will only be populated
+   * when a drop off point is specified in the request. An empty value indicates
+   * an error calculating the ETA.
+   * 
+ * + * .google.protobuf.Timestamp vehicle_dropoff_eta = 4; + */ + com.google.protobuf.TimestampOrBuilder getVehicleDropoffEtaOrBuilder(); + + /** + * + * + *
+   * The vehicle's driving distance (in meters) from the pickup point
+   * to the drop off point specified in the request. The distance is only
+   * between the two points and does not include the vehicle location or any
+   * other points that must be visited before the vehicle visits either the
+   * pickup point or dropoff point. The value will only be populated when a
+   * `dropoff_point` is specified in the request. An empty value indicates
+   * a failure in calculating the distance from the pickup to
+   * drop off point specified in the request.
+   * 
+ * + * .google.protobuf.Int32Value vehicle_pickup_to_dropoff_distance_meters = 5; + * + * @return Whether the vehiclePickupToDropoffDistanceMeters field is set. + */ + boolean hasVehiclePickupToDropoffDistanceMeters(); + /** + * + * + *
+   * The vehicle's driving distance (in meters) from the pickup point
+   * to the drop off point specified in the request. The distance is only
+   * between the two points and does not include the vehicle location or any
+   * other points that must be visited before the vehicle visits either the
+   * pickup point or dropoff point. The value will only be populated when a
+   * `dropoff_point` is specified in the request. An empty value indicates
+   * a failure in calculating the distance from the pickup to
+   * drop off point specified in the request.
+   * 
+ * + * .google.protobuf.Int32Value vehicle_pickup_to_dropoff_distance_meters = 5; + * + * @return The vehiclePickupToDropoffDistanceMeters. + */ + com.google.protobuf.Int32Value getVehiclePickupToDropoffDistanceMeters(); + /** + * + * + *
+   * The vehicle's driving distance (in meters) from the pickup point
+   * to the drop off point specified in the request. The distance is only
+   * between the two points and does not include the vehicle location or any
+   * other points that must be visited before the vehicle visits either the
+   * pickup point or dropoff point. The value will only be populated when a
+   * `dropoff_point` is specified in the request. An empty value indicates
+   * a failure in calculating the distance from the pickup to
+   * drop off point specified in the request.
+   * 
+ * + * .google.protobuf.Int32Value vehicle_pickup_to_dropoff_distance_meters = 5; + */ + com.google.protobuf.Int32ValueOrBuilder getVehiclePickupToDropoffDistanceMetersOrBuilder(); + + /** + * + * + *
+   * Required. The trip type of the request that was used to calculate the ETA
+   * to the pickup point.
+   * 
+ * + * .maps.fleetengine.v1.TripType trip_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for tripType. + */ + int getTripTypeValue(); + /** + * + * + *
+   * Required. The trip type of the request that was used to calculate the ETA
+   * to the pickup point.
+   * 
+ * + * .maps.fleetengine.v1.TripType trip_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tripType. + */ + com.google.maps.fleetengine.v1.TripType getTripType(); + + /** + * + * + *
+   * The ordered list of waypoints used to calculate the ETA. The list
+   * includes vehicle location, the pickup points of active
+   * trips for the vehicle, and the pickup points provided in the
+   * request. An empty list indicates a failure in calculating ETA for the
+   * vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.Waypoint vehicle_trips_waypoints = 7; + */ + java.util.List getVehicleTripsWaypointsList(); + /** + * + * + *
+   * The ordered list of waypoints used to calculate the ETA. The list
+   * includes vehicle location, the pickup points of active
+   * trips for the vehicle, and the pickup points provided in the
+   * request. An empty list indicates a failure in calculating ETA for the
+   * vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.Waypoint vehicle_trips_waypoints = 7; + */ + com.google.maps.fleetengine.v1.Waypoint getVehicleTripsWaypoints(int index); + /** + * + * + *
+   * The ordered list of waypoints used to calculate the ETA. The list
+   * includes vehicle location, the pickup points of active
+   * trips for the vehicle, and the pickup points provided in the
+   * request. An empty list indicates a failure in calculating ETA for the
+   * vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.Waypoint vehicle_trips_waypoints = 7; + */ + int getVehicleTripsWaypointsCount(); + /** + * + * + *
+   * The ordered list of waypoints used to calculate the ETA. The list
+   * includes vehicle location, the pickup points of active
+   * trips for the vehicle, and the pickup points provided in the
+   * request. An empty list indicates a failure in calculating ETA for the
+   * vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.Waypoint vehicle_trips_waypoints = 7; + */ + java.util.List + getVehicleTripsWaypointsOrBuilderList(); + /** + * + * + *
+   * The ordered list of waypoints used to calculate the ETA. The list
+   * includes vehicle location, the pickup points of active
+   * trips for the vehicle, and the pickup points provided in the
+   * request. An empty list indicates a failure in calculating ETA for the
+   * vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.Waypoint vehicle_trips_waypoints = 7; + */ + com.google.maps.fleetengine.v1.WaypointOrBuilder getVehicleTripsWaypointsOrBuilder(int index); + + /** + * + * + *
+   * Type of the vehicle match.
+   * 
+ * + * .maps.fleetengine.v1.VehicleMatch.VehicleMatchType vehicle_match_type = 8; + * + * @return The enum numeric value on the wire for vehicleMatchType. + */ + int getVehicleMatchTypeValue(); + /** + * + * + *
+   * Type of the vehicle match.
+   * 
+ * + * .maps.fleetengine.v1.VehicleMatch.VehicleMatchType vehicle_match_type = 8; + * + * @return The vehicleMatchType. + */ + com.google.maps.fleetengine.v1.VehicleMatch.VehicleMatchType getVehicleMatchType(); + + /** + * + * + *
+   * The order requested for sorting vehicle matches.
+   * 
+ * + * .maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder requested_ordered_by = 9; + * + * + * @return The enum numeric value on the wire for requestedOrderedBy. + */ + int getRequestedOrderedByValue(); + /** + * + * + *
+   * The order requested for sorting vehicle matches.
+   * 
+ * + * .maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder requested_ordered_by = 9; + * + * + * @return The requestedOrderedBy. + */ + com.google.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder getRequestedOrderedBy(); + + /** + * + * + *
+   * The actual order that was used for this vehicle. Normally this
+   * will match the 'order_by' field from the request; however, in certain
+   * circumstances such as an internal server error, a different method
+   * may be used (such as `PICKUP_POINT_STRAIGHT_DISTANCE`).
+   * 
+ * + * .maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder ordered_by = 10; + * + * @return The enum numeric value on the wire for orderedBy. + */ + int getOrderedByValue(); + /** + * + * + *
+   * The actual order that was used for this vehicle. Normally this
+   * will match the 'order_by' field from the request; however, in certain
+   * circumstances such as an internal server error, a different method
+   * may be used (such as `PICKUP_POINT_STRAIGHT_DISTANCE`).
+   * 
+ * + * .maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder ordered_by = 10; + * + * @return The orderedBy. + */ + com.google.maps.fleetengine.v1.SearchVehiclesRequest.VehicleMatchOrder getOrderedBy(); +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleName.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleName.java new file mode 100644 index 000000000000..332966d48c5e --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.maps.fleetengine.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 VehicleName implements ResourceName { + private static final PathTemplate PROVIDER_VEHICLE = + PathTemplate.createWithoutUrlEncoding("providers/{provider}/vehicles/{vehicle}"); + private volatile Map fieldValuesMap; + private final String provider; + private final String vehicle; + + @Deprecated + protected VehicleName() { + provider = null; + vehicle = null; + } + + private VehicleName(Builder builder) { + provider = Preconditions.checkNotNull(builder.getProvider()); + vehicle = Preconditions.checkNotNull(builder.getVehicle()); + } + + public String getProvider() { + return provider; + } + + public String getVehicle() { + return vehicle; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static VehicleName of(String provider, String vehicle) { + return newBuilder().setProvider(provider).setVehicle(vehicle).build(); + } + + public static String format(String provider, String vehicle) { + return newBuilder().setProvider(provider).setVehicle(vehicle).build().toString(); + } + + public static VehicleName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROVIDER_VEHICLE.validatedMatch( + formattedString, "VehicleName.parse: formattedString not in valid format"); + return of(matchMap.get("provider"), matchMap.get("vehicle")); + } + + 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 (VehicleName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROVIDER_VEHICLE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (provider != null) { + fieldMapBuilder.put("provider", provider); + } + if (vehicle != null) { + fieldMapBuilder.put("vehicle", vehicle); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROVIDER_VEHICLE.instantiate("provider", provider, "vehicle", vehicle); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + VehicleName that = ((VehicleName) o); + return Objects.equals(this.provider, that.provider) + && Objects.equals(this.vehicle, that.vehicle); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(provider); + h *= 1000003; + h ^= Objects.hashCode(vehicle); + return h; + } + + /** Builder for providers/{provider}/vehicles/{vehicle}. */ + public static class Builder { + private String provider; + private String vehicle; + + protected Builder() {} + + public String getProvider() { + return provider; + } + + public String getVehicle() { + return vehicle; + } + + public Builder setProvider(String provider) { + this.provider = provider; + return this; + } + + public Builder setVehicle(String vehicle) { + this.vehicle = vehicle; + return this; + } + + private Builder(VehicleName vehicleName) { + this.provider = vehicleName.provider; + this.vehicle = vehicleName.vehicle; + } + + public VehicleName build() { + return new VehicleName(this); + } + } +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleOrBuilder.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleOrBuilder.java new file mode 100644 index 000000000000..63fc3f96d281 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleOrBuilder.java @@ -0,0 +1,954 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicles.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public interface VehicleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.v1.Vehicle) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The unique name for this vehicle.
+   * The format is `providers/{provider}/vehicles/{vehicle}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The unique name for this vehicle.
+   * The format is `providers/{provider}/vehicles/{vehicle}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The vehicle state.
+   * 
+ * + * .maps.fleetengine.v1.VehicleState vehicle_state = 2; + * + * @return The enum numeric value on the wire for vehicleState. + */ + int getVehicleStateValue(); + /** + * + * + *
+   * The vehicle state.
+   * 
+ * + * .maps.fleetengine.v1.VehicleState vehicle_state = 2; + * + * @return The vehicleState. + */ + com.google.maps.fleetengine.v1.VehicleState getVehicleState(); + + /** + * + * + *
+   * Trip types supported by this vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripType supported_trip_types = 3; + * + * @return A list containing the supportedTripTypes. + */ + java.util.List getSupportedTripTypesList(); + /** + * + * + *
+   * Trip types supported by this vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripType supported_trip_types = 3; + * + * @return The count of supportedTripTypes. + */ + int getSupportedTripTypesCount(); + /** + * + * + *
+   * Trip types supported by this vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripType supported_trip_types = 3; + * + * @param index The index of the element to return. + * @return The supportedTripTypes at the given index. + */ + com.google.maps.fleetengine.v1.TripType getSupportedTripTypes(int index); + /** + * + * + *
+   * Trip types supported by this vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripType supported_trip_types = 3; + * + * @return A list containing the enum numeric values on the wire for supportedTripTypes. + */ + java.util.List getSupportedTripTypesValueList(); + /** + * + * + *
+   * Trip types supported by this vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripType supported_trip_types = 3; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of supportedTripTypes at the given index. + */ + int getSupportedTripTypesValue(int index); + + /** + * + * + *
+   * Output only. List of `trip_id`'s for trips currently assigned to this
+   * vehicle.
+   * 
+ * + * repeated string current_trips = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the currentTrips. + */ + java.util.List getCurrentTripsList(); + /** + * + * + *
+   * Output only. List of `trip_id`'s for trips currently assigned to this
+   * vehicle.
+   * 
+ * + * repeated string current_trips = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of currentTrips. + */ + int getCurrentTripsCount(); + /** + * + * + *
+   * Output only. List of `trip_id`'s for trips currently assigned to this
+   * vehicle.
+   * 
+ * + * repeated string current_trips = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The currentTrips at the given index. + */ + java.lang.String getCurrentTrips(int index); + /** + * + * + *
+   * Output only. List of `trip_id`'s for trips currently assigned to this
+   * vehicle.
+   * 
+ * + * repeated string current_trips = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the currentTrips at the given index. + */ + com.google.protobuf.ByteString getCurrentTripsBytes(int index); + + /** + * + * + *
+   * Last reported location of the vehicle.
+   * 
+ * + * .maps.fleetengine.v1.VehicleLocation last_location = 5; + * + * @return Whether the lastLocation field is set. + */ + boolean hasLastLocation(); + /** + * + * + *
+   * Last reported location of the vehicle.
+   * 
+ * + * .maps.fleetengine.v1.VehicleLocation last_location = 5; + * + * @return The lastLocation. + */ + com.google.maps.fleetengine.v1.VehicleLocation getLastLocation(); + /** + * + * + *
+   * Last reported location of the vehicle.
+   * 
+ * + * .maps.fleetengine.v1.VehicleLocation last_location = 5; + */ + com.google.maps.fleetengine.v1.VehicleLocationOrBuilder getLastLocationOrBuilder(); + + /** + * + * + *
+   * The total numbers of riders this vehicle can carry.  The driver is not
+   * considered in this value. This value must be greater than or equal to one.
+   * 
+ * + * int32 maximum_capacity = 6; + * + * @return The maximumCapacity. + */ + int getMaximumCapacity(); + + /** + * + * + *
+   * List of vehicle attributes. A vehicle can have at most 100
+   * attributes, and each attribute must have a unique key.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 8; + */ + java.util.List getAttributesList(); + /** + * + * + *
+   * List of vehicle attributes. A vehicle can have at most 100
+   * attributes, and each attribute must have a unique key.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 8; + */ + com.google.maps.fleetengine.v1.VehicleAttribute getAttributes(int index); + /** + * + * + *
+   * List of vehicle attributes. A vehicle can have at most 100
+   * attributes, and each attribute must have a unique key.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 8; + */ + int getAttributesCount(); + /** + * + * + *
+   * List of vehicle attributes. A vehicle can have at most 100
+   * attributes, and each attribute must have a unique key.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 8; + */ + java.util.List + getAttributesOrBuilderList(); + /** + * + * + *
+   * List of vehicle attributes. A vehicle can have at most 100
+   * attributes, and each attribute must have a unique key.
+   * 
+ * + * repeated .maps.fleetengine.v1.VehicleAttribute attributes = 8; + */ + com.google.maps.fleetengine.v1.VehicleAttributeOrBuilder getAttributesOrBuilder(int index); + + /** + * + * + *
+   * Required. The type of this vehicle.  Can be used to filter vehicles in
+   * `SearchVehicles` results.  Also influences ETA and route calculations.
+   * 
+ * + * + * .maps.fleetengine.v1.Vehicle.VehicleType vehicle_type = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the vehicleType field is set. + */ + boolean hasVehicleType(); + /** + * + * + *
+   * Required. The type of this vehicle.  Can be used to filter vehicles in
+   * `SearchVehicles` results.  Also influences ETA and route calculations.
+   * 
+ * + * + * .maps.fleetengine.v1.Vehicle.VehicleType vehicle_type = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The vehicleType. + */ + com.google.maps.fleetengine.v1.Vehicle.VehicleType getVehicleType(); + /** + * + * + *
+   * Required. The type of this vehicle.  Can be used to filter vehicles in
+   * `SearchVehicles` results.  Also influences ETA and route calculations.
+   * 
+ * + * + * .maps.fleetengine.v1.Vehicle.VehicleType vehicle_type = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.maps.fleetengine.v1.Vehicle.VehicleTypeOrBuilder getVehicleTypeOrBuilder(); + + /** + * + * + *
+   * License plate information for the vehicle.
+   * 
+ * + * .maps.fleetengine.v1.LicensePlate license_plate = 10; + * + * @return Whether the licensePlate field is set. + */ + boolean hasLicensePlate(); + /** + * + * + *
+   * License plate information for the vehicle.
+   * 
+ * + * .maps.fleetengine.v1.LicensePlate license_plate = 10; + * + * @return The licensePlate. + */ + com.google.maps.fleetengine.v1.LicensePlate getLicensePlate(); + /** + * + * + *
+   * License plate information for the vehicle.
+   * 
+ * + * .maps.fleetengine.v1.LicensePlate license_plate = 10; + */ + com.google.maps.fleetengine.v1.LicensePlateOrBuilder getLicensePlateOrBuilder(); + + /** + * + * + *
+   * Deprecated: Use `Vehicle.waypoints` instead.
+   * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation route = 12 [deprecated = true]; + */ + @java.lang.Deprecated + java.util.List getRouteList(); + /** + * + * + *
+   * Deprecated: Use `Vehicle.waypoints` instead.
+   * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation route = 12 [deprecated = true]; + */ + @java.lang.Deprecated + com.google.maps.fleetengine.v1.TerminalLocation getRoute(int index); + /** + * + * + *
+   * Deprecated: Use `Vehicle.waypoints` instead.
+   * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation route = 12 [deprecated = true]; + */ + @java.lang.Deprecated + int getRouteCount(); + /** + * + * + *
+   * Deprecated: Use `Vehicle.waypoints` instead.
+   * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation route = 12 [deprecated = true]; + */ + @java.lang.Deprecated + java.util.List + getRouteOrBuilderList(); + /** + * + * + *
+   * Deprecated: Use `Vehicle.waypoints` instead.
+   * 
+ * + * repeated .maps.fleetengine.v1.TerminalLocation route = 12 [deprecated = true]; + */ + @java.lang.Deprecated + com.google.maps.fleetengine.v1.TerminalLocationOrBuilder getRouteOrBuilder(int index); + + /** + * + * + *
+   * The polyline specifying the route the driver app intends to take to
+   * the next waypoint. This list is also returned in
+   * `Trip.current_route_segment` for all active trips assigned to the vehicle.
+   *
+   * Note: This field is intended only for use by the Driver SDK. Decoding is
+   * not yet supported.
+   * 
+ * + * string current_route_segment = 20; + * + * @return The currentRouteSegment. + */ + java.lang.String getCurrentRouteSegment(); + /** + * + * + *
+   * The polyline specifying the route the driver app intends to take to
+   * the next waypoint. This list is also returned in
+   * `Trip.current_route_segment` for all active trips assigned to the vehicle.
+   *
+   * Note: This field is intended only for use by the Driver SDK. Decoding is
+   * not yet supported.
+   * 
+ * + * string current_route_segment = 20; + * + * @return The bytes for currentRouteSegment. + */ + com.google.protobuf.ByteString getCurrentRouteSegmentBytes(); + + /** + * + * + *
+   * Input only. Fleet Engine uses this information to improve journey sharing.
+   * Note: This field is intended only for use by the Driver SDK.
+   * 
+ * + * + * .maps.fleetengine.v1.TrafficPolylineData current_route_segment_traffic = 28 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the currentRouteSegmentTraffic field is set. + */ + boolean hasCurrentRouteSegmentTraffic(); + /** + * + * + *
+   * Input only. Fleet Engine uses this information to improve journey sharing.
+   * Note: This field is intended only for use by the Driver SDK.
+   * 
+ * + * + * .maps.fleetengine.v1.TrafficPolylineData current_route_segment_traffic = 28 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The currentRouteSegmentTraffic. + */ + com.google.maps.fleetengine.v1.TrafficPolylineData getCurrentRouteSegmentTraffic(); + /** + * + * + *
+   * Input only. Fleet Engine uses this information to improve journey sharing.
+   * Note: This field is intended only for use by the Driver SDK.
+   * 
+ * + * + * .maps.fleetengine.v1.TrafficPolylineData current_route_segment_traffic = 28 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + com.google.maps.fleetengine.v1.TrafficPolylineDataOrBuilder + getCurrentRouteSegmentTrafficOrBuilder(); + + /** + * + * + *
+   * Output only. Time when `current_route_segment` was set. It can be stored by
+   * the client and passed in future `GetVehicle` requests to prevent returning
+   * routes that haven't changed.
+   * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_version = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the currentRouteSegmentVersion field is set. + */ + boolean hasCurrentRouteSegmentVersion(); + /** + * + * + *
+   * Output only. Time when `current_route_segment` was set. It can be stored by
+   * the client and passed in future `GetVehicle` requests to prevent returning
+   * routes that haven't changed.
+   * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_version = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The currentRouteSegmentVersion. + */ + com.google.protobuf.Timestamp getCurrentRouteSegmentVersion(); + /** + * + * + *
+   * Output only. Time when `current_route_segment` was set. It can be stored by
+   * the client and passed in future `GetVehicle` requests to prevent returning
+   * routes that haven't changed.
+   * 
+ * + * + * .google.protobuf.Timestamp current_route_segment_version = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCurrentRouteSegmentVersionOrBuilder(); + + /** + * + * + *
+   * The waypoint where `current_route_segment` ends. This can be supplied by
+   * drivers on `UpdateVehicle` calls either as a full trip waypoint, a waypoint
+   * `LatLng`, or as the last `LatLng` of the `current_route_segment`. Fleet
+   * Engine will then do its best to interpolate to an actual waypoint if it is
+   * not fully specified. This field is ignored in `UpdateVehicle` calls unless
+   * `current_route_segment` is also specified.
+   * 
+ * + * .maps.fleetengine.v1.TripWaypoint current_route_segment_end_point = 24; + * + * @return Whether the currentRouteSegmentEndPoint field is set. + */ + boolean hasCurrentRouteSegmentEndPoint(); + /** + * + * + *
+   * The waypoint where `current_route_segment` ends. This can be supplied by
+   * drivers on `UpdateVehicle` calls either as a full trip waypoint, a waypoint
+   * `LatLng`, or as the last `LatLng` of the `current_route_segment`. Fleet
+   * Engine will then do its best to interpolate to an actual waypoint if it is
+   * not fully specified. This field is ignored in `UpdateVehicle` calls unless
+   * `current_route_segment` is also specified.
+   * 
+ * + * .maps.fleetengine.v1.TripWaypoint current_route_segment_end_point = 24; + * + * @return The currentRouteSegmentEndPoint. + */ + com.google.maps.fleetengine.v1.TripWaypoint getCurrentRouteSegmentEndPoint(); + /** + * + * + *
+   * The waypoint where `current_route_segment` ends. This can be supplied by
+   * drivers on `UpdateVehicle` calls either as a full trip waypoint, a waypoint
+   * `LatLng`, or as the last `LatLng` of the `current_route_segment`. Fleet
+   * Engine will then do its best to interpolate to an actual waypoint if it is
+   * not fully specified. This field is ignored in `UpdateVehicle` calls unless
+   * `current_route_segment` is also specified.
+   * 
+ * + * .maps.fleetengine.v1.TripWaypoint current_route_segment_end_point = 24; + */ + com.google.maps.fleetengine.v1.TripWaypointOrBuilder getCurrentRouteSegmentEndPointOrBuilder(); + + /** + * + * + *
+   * The remaining driving distance for the `current_route_segment`.
+   * This value is also returned in `Trip.remaining_distance_meters` for all
+   * active trips assigned to the vehicle. The value is unspecified if the
+   * `current_route_segment` field is empty.
+   * 
+ * + * .google.protobuf.Int32Value remaining_distance_meters = 18; + * + * @return Whether the remainingDistanceMeters field is set. + */ + boolean hasRemainingDistanceMeters(); + /** + * + * + *
+   * The remaining driving distance for the `current_route_segment`.
+   * This value is also returned in `Trip.remaining_distance_meters` for all
+   * active trips assigned to the vehicle. The value is unspecified if the
+   * `current_route_segment` field is empty.
+   * 
+ * + * .google.protobuf.Int32Value remaining_distance_meters = 18; + * + * @return The remainingDistanceMeters. + */ + com.google.protobuf.Int32Value getRemainingDistanceMeters(); + /** + * + * + *
+   * The remaining driving distance for the `current_route_segment`.
+   * This value is also returned in `Trip.remaining_distance_meters` for all
+   * active trips assigned to the vehicle. The value is unspecified if the
+   * `current_route_segment` field is empty.
+   * 
+ * + * .google.protobuf.Int32Value remaining_distance_meters = 18; + */ + com.google.protobuf.Int32ValueOrBuilder getRemainingDistanceMetersOrBuilder(); + + /** + * + * + *
+   * The ETA to the first entry in the `waypoints` field.  The value is
+   * unspecified if the `waypoints` field is empty or the
+   * `Vehicle.current_route_segment` field is empty.
+   *
+   * When updating a vehicle, `remaining_time_seconds` takes precedence over
+   * `eta_to_first_waypoint` in the same request.
+   * 
+ * + * .google.protobuf.Timestamp eta_to_first_waypoint = 19; + * + * @return Whether the etaToFirstWaypoint field is set. + */ + boolean hasEtaToFirstWaypoint(); + /** + * + * + *
+   * The ETA to the first entry in the `waypoints` field.  The value is
+   * unspecified if the `waypoints` field is empty or the
+   * `Vehicle.current_route_segment` field is empty.
+   *
+   * When updating a vehicle, `remaining_time_seconds` takes precedence over
+   * `eta_to_first_waypoint` in the same request.
+   * 
+ * + * .google.protobuf.Timestamp eta_to_first_waypoint = 19; + * + * @return The etaToFirstWaypoint. + */ + com.google.protobuf.Timestamp getEtaToFirstWaypoint(); + /** + * + * + *
+   * The ETA to the first entry in the `waypoints` field.  The value is
+   * unspecified if the `waypoints` field is empty or the
+   * `Vehicle.current_route_segment` field is empty.
+   *
+   * When updating a vehicle, `remaining_time_seconds` takes precedence over
+   * `eta_to_first_waypoint` in the same request.
+   * 
+ * + * .google.protobuf.Timestamp eta_to_first_waypoint = 19; + */ + com.google.protobuf.TimestampOrBuilder getEtaToFirstWaypointOrBuilder(); + + /** + * + * + *
+   * Input only. The remaining driving time for the `current_route_segment`. The
+   * value is unspecified if the `waypoints` field is empty or the
+   * `Vehicle.current_route_segment` field is empty. This value should match
+   * `eta_to_first_waypoint` - `current_time` if all parties are using the same
+   * clock.
+   *
+   * When updating a vehicle, `remaining_time_seconds` takes precedence over
+   * `eta_to_first_waypoint` in the same request.
+   * 
+ * + * + * .google.protobuf.Int32Value remaining_time_seconds = 25 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the remainingTimeSeconds field is set. + */ + boolean hasRemainingTimeSeconds(); + /** + * + * + *
+   * Input only. The remaining driving time for the `current_route_segment`. The
+   * value is unspecified if the `waypoints` field is empty or the
+   * `Vehicle.current_route_segment` field is empty. This value should match
+   * `eta_to_first_waypoint` - `current_time` if all parties are using the same
+   * clock.
+   *
+   * When updating a vehicle, `remaining_time_seconds` takes precedence over
+   * `eta_to_first_waypoint` in the same request.
+   * 
+ * + * + * .google.protobuf.Int32Value remaining_time_seconds = 25 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The remainingTimeSeconds. + */ + com.google.protobuf.Int32Value getRemainingTimeSeconds(); + /** + * + * + *
+   * Input only. The remaining driving time for the `current_route_segment`. The
+   * value is unspecified if the `waypoints` field is empty or the
+   * `Vehicle.current_route_segment` field is empty. This value should match
+   * `eta_to_first_waypoint` - `current_time` if all parties are using the same
+   * clock.
+   *
+   * When updating a vehicle, `remaining_time_seconds` takes precedence over
+   * `eta_to_first_waypoint` in the same request.
+   * 
+ * + * + * .google.protobuf.Int32Value remaining_time_seconds = 25 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + com.google.protobuf.Int32ValueOrBuilder getRemainingTimeSecondsOrBuilder(); + + /** + * + * + *
+   * The remaining waypoints assigned to this Vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint waypoints = 22; + */ + java.util.List getWaypointsList(); + /** + * + * + *
+   * The remaining waypoints assigned to this Vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint waypoints = 22; + */ + com.google.maps.fleetengine.v1.TripWaypoint getWaypoints(int index); + /** + * + * + *
+   * The remaining waypoints assigned to this Vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint waypoints = 22; + */ + int getWaypointsCount(); + /** + * + * + *
+   * The remaining waypoints assigned to this Vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint waypoints = 22; + */ + java.util.List + getWaypointsOrBuilderList(); + /** + * + * + *
+   * The remaining waypoints assigned to this Vehicle.
+   * 
+ * + * repeated .maps.fleetengine.v1.TripWaypoint waypoints = 22; + */ + com.google.maps.fleetengine.v1.TripWaypointOrBuilder getWaypointsOrBuilder(int index); + + /** + * + * + *
+   * Output only. Last time the `waypoints` field was updated. Clients should
+   * cache this value and pass it in `GetVehicleRequest` to ensure the
+   * `waypoints` field is only returned if it is updated.
+   * 
+ * + * + * .google.protobuf.Timestamp waypoints_version = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the waypointsVersion field is set. + */ + boolean hasWaypointsVersion(); + /** + * + * + *
+   * Output only. Last time the `waypoints` field was updated. Clients should
+   * cache this value and pass it in `GetVehicleRequest` to ensure the
+   * `waypoints` field is only returned if it is updated.
+   * 
+ * + * + * .google.protobuf.Timestamp waypoints_version = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The waypointsVersion. + */ + com.google.protobuf.Timestamp getWaypointsVersion(); + /** + * + * + *
+   * Output only. Last time the `waypoints` field was updated. Clients should
+   * cache this value and pass it in `GetVehicleRequest` to ensure the
+   * `waypoints` field is only returned if it is updated.
+   * 
+ * + * + * .google.protobuf.Timestamp waypoints_version = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getWaypointsVersionOrBuilder(); + + /** + * + * + *
+   * Indicates if the driver accepts back-to-back trips. If `true`,
+   * `SearchVehicles` may include the vehicle even if it is currently assigned
+   * to a trip. The default value is `false`.
+   * 
+ * + * bool back_to_back_enabled = 23; + * + * @return The backToBackEnabled. + */ + boolean getBackToBackEnabled(); + + /** + * + * + *
+   * The vehicle's navigation status.
+   * 
+ * + * .maps.fleetengine.v1.NavigationStatus navigation_status = 26; + * + * @return The enum numeric value on the wire for navigationStatus. + */ + int getNavigationStatusValue(); + /** + * + * + *
+   * The vehicle's navigation status.
+   * 
+ * + * .maps.fleetengine.v1.NavigationStatus navigation_status = 26; + * + * @return The navigationStatus. + */ + com.google.maps.fleetengine.v1.NavigationStatus getNavigationStatus(); + + /** + * + * + *
+   * Input only. Information about settings in the mobile device being used by
+   * the driver.
+   * 
+ * + * + * .maps.fleetengine.v1.DeviceSettings device_settings = 27 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the deviceSettings field is set. + */ + boolean hasDeviceSettings(); + /** + * + * + *
+   * Input only. Information about settings in the mobile device being used by
+   * the driver.
+   * 
+ * + * + * .maps.fleetengine.v1.DeviceSettings device_settings = 27 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The deviceSettings. + */ + com.google.maps.fleetengine.v1.DeviceSettings getDeviceSettings(); + /** + * + * + *
+   * Input only. Information about settings in the mobile device being used by
+   * the driver.
+   * 
+ * + * + * .maps.fleetengine.v1.DeviceSettings device_settings = 27 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + com.google.maps.fleetengine.v1.DeviceSettingsOrBuilder getDeviceSettingsOrBuilder(); +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleState.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleState.java new file mode 100644 index 000000000000..90e6f9e5f57d --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VehicleState.java @@ -0,0 +1,179 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicles.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * The state of a `Vehicle`.
+ * 
+ * + * Protobuf enum {@code maps.fleetengine.v1.VehicleState} + */ +public enum VehicleState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Default, used for unspecified or unrecognized vehicle states.
+   * 
+ * + * UNKNOWN_VEHICLE_STATE = 0; + */ + UNKNOWN_VEHICLE_STATE(0), + /** + * + * + *
+   * The vehicle is not accepting new trips. Note: the vehicle may continue to
+   * operate in this state while completing a trip assigned to it.
+   * 
+ * + * OFFLINE = 1; + */ + OFFLINE(1), + /** + * + * + *
+   * The vehicle is accepting new trips.
+   * 
+ * + * ONLINE = 2; + */ + ONLINE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Default, used for unspecified or unrecognized vehicle states.
+   * 
+ * + * UNKNOWN_VEHICLE_STATE = 0; + */ + public static final int UNKNOWN_VEHICLE_STATE_VALUE = 0; + /** + * + * + *
+   * The vehicle is not accepting new trips. Note: the vehicle may continue to
+   * operate in this state while completing a trip assigned to it.
+   * 
+ * + * OFFLINE = 1; + */ + public static final int OFFLINE_VALUE = 1; + /** + * + * + *
+   * The vehicle is accepting new trips.
+   * 
+ * + * ONLINE = 2; + */ + public static final int ONLINE_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static VehicleState 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 VehicleState forNumber(int value) { + switch (value) { + case 0: + return UNKNOWN_VEHICLE_STATE; + case 1: + return OFFLINE; + case 2: + return ONLINE; + 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 VehicleState findValueByNumber(int number) { + return VehicleState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.maps.fleetengine.v1.Vehicles.getDescriptor().getEnumTypes().get(0); + } + + private static final VehicleState[] VALUES = values(); + + public static VehicleState 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 VehicleState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:maps.fleetengine.v1.VehicleState) +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/Vehicles.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/Vehicles.java new file mode 100644 index 000000000000..bcf9af186ba7 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/Vehicles.java @@ -0,0 +1,274 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicles.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +public final class Vehicles { + private Vehicles() {} + + 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_maps_fleetengine_v1_Vehicle_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_v1_Vehicle_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_v1_Vehicle_VehicleType_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_v1_Vehicle_VehicleType_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_v1_BatteryInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_v1_BatteryInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_v1_DeviceSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_v1_DeviceSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_v1_LicensePlate_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_v1_LicensePlate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_v1_VisualTrafficReportPolylineRendering_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_v1_VisualTrafficReportPolylineRendering_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_v1_VisualTrafficReportPolylineRendering_RoadStretch_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_v1_VisualTrafficReportPolylineRendering_RoadStretch_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_v1_TrafficPolylineData_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_v1_TrafficPolylineData_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n)google/maps/fleetengine/v1/vehicles.pr" + + "oto\022\023maps.fleetengine.v1\032\037google/api/fie" + + "ld_behavior.proto\032\031google/api/resource.p" + + "roto\032,google/maps/fleetengine/v1/fleeten" + + "gine.proto\032\037google/protobuf/timestamp.pr" + + "oto\032\036google/protobuf/wrappers.proto\"\342\013\n\007" + + "Vehicle\022\021\n\004name\030\001 \001(\tB\003\340A\003\0228\n\rvehicle_st" + + "ate\030\002 \001(\0162!.maps.fleetengine.v1.VehicleS" + + "tate\022;\n\024supported_trip_types\030\003 \003(\0162\035.map" + + "s.fleetengine.v1.TripType\022\032\n\rcurrent_tri" + + "ps\030\004 \003(\tB\003\340A\003\022;\n\rlast_location\030\005 \001(\0132$.m" + + "aps.fleetengine.v1.VehicleLocation\022\030\n\020ma" + + "ximum_capacity\030\006 \001(\005\0229\n\nattributes\030\010 \003(\013" + + "2%.maps.fleetengine.v1.VehicleAttribute\022" + + "C\n\014vehicle_type\030\t \001(\0132(.maps.fleetengine" + + ".v1.Vehicle.VehicleTypeB\003\340A\002\0228\n\rlicense_" + + "plate\030\n \001(\0132!.maps.fleetengine.v1.Licens" + + "ePlate\0228\n\005route\030\014 \003(\0132%.maps.fleetengine" + + ".v1.TerminalLocationB\002\030\001\022\035\n\025current_rout" + + "e_segment\030\024 \001(\t\022T\n\035current_route_segment" + + "_traffic\030\034 \001(\0132(.maps.fleetengine.v1.Tra" + + "fficPolylineDataB\003\340A\004\022F\n\035current_route_s" + + "egment_version\030\017 \001(\0132\032.google.protobuf.T" + + "imestampB\003\340A\003\022J\n\037current_route_segment_e" + + "nd_point\030\030 \001(\0132!.maps.fleetengine.v1.Tri" + + "pWaypoint\022>\n\031remaining_distance_meters\030\022" + + " \001(\0132\033.google.protobuf.Int32Value\0229\n\025eta" + + "_to_first_waypoint\030\023 \001(\0132\032.google.protob" + + "uf.Timestamp\022@\n\026remaining_time_seconds\030\031" + + " \001(\0132\033.google.protobuf.Int32ValueB\003\340A\004\0224" + + "\n\twaypoints\030\026 \003(\0132!.maps.fleetengine.v1." + + "TripWaypoint\022:\n\021waypoints_version\030\020 \001(\0132" + + "\032.google.protobuf.TimestampB\003\340A\003\022\034\n\024back" + + "_to_back_enabled\030\027 \001(\010\022@\n\021navigation_sta" + + "tus\030\032 \001(\0162%.maps.fleetengine.v1.Navigati" + + "onStatus\022A\n\017device_settings\030\033 \001(\0132#.maps" + + ".fleetengine.v1.DeviceSettingsB\003\340A\004\032\270\001\n\013" + + "VehicleType\022C\n\010category\030\001 \001(\01621.maps.fle" + + "etengine.v1.Vehicle.VehicleType.Category" + + "\"d\n\010Category\022\013\n\007UNKNOWN\020\000\022\010\n\004AUTO\020\001\022\010\n\004T" + + "AXI\020\002\022\t\n\005TRUCK\020\003\022\017\n\013TWO_WHEELER\020\004\022\013\n\007BIC" + + "YCLE\020\005\022\016\n\nPEDESTRIAN\020\006:P\352AM\n\"fleetengine" + + ".googleapis.com/Vehicle\022\'providers/{prov" + + "ider}/vehicles/{vehicle}\"\235\001\n\013BatteryInfo" + + "\022:\n\016battery_status\030\001 \001(\0162\".maps.fleeteng" + + "ine.v1.BatteryStatus\0226\n\014power_source\030\002 \001" + + "(\0162 .maps.fleetengine.v1.PowerSource\022\032\n\022" + + "battery_percentage\030\003 \001(\002\"\312\001\n\016DeviceSetti" + + "ngs\022L\n\030location_power_save_mode\030\001 \001(\0162*." + + "maps.fleetengine.v1.LocationPowerSaveMod" + + "e\022\032\n\022is_power_save_mode\030\002 \001(\010\022\026\n\016is_inte" + + "ractive\030\003 \001(\010\0226\n\014battery_info\030\004 \001(\0132 .ma" + + "ps.fleetengine.v1.BatteryInfo\"A\n\014License" + + "Plate\022\031\n\014country_code\030\001 \001(\tB\003\340A\002\022\026\n\016last" + + "_character\030\002 \001(\t\"\366\002\n$VisualTrafficReport" + + "PolylineRendering\022`\n\014road_stretch\030\001 \003(\0132" + + "E.maps.fleetengine.v1.VisualTrafficRepor" + + "tPolylineRendering.RoadStretchB\003\340A\001\032\353\001\n\013" + + "RoadStretch\022_\n\005style\030\001 \001(\0162K.maps.fleete" + + "ngine.v1.VisualTrafficReportPolylineRend" + + "ering.RoadStretch.StyleB\003\340A\002\022\032\n\roffset_m" + + "eters\030\002 \001(\005B\003\340A\002\022\032\n\rlength_meters\030\003 \001(\005B" + + "\003\340A\002\"C\n\005Style\022\025\n\021STYLE_UNSPECIFIED\020\000\022\022\n\016" + + "SLOWER_TRAFFIC\020\001\022\017\n\013TRAFFIC_JAM\020\002\"k\n\023Tra" + + "fficPolylineData\022T\n\021traffic_rendering\030\001 " + + "\001(\01329.maps.fleetengine.v1.VisualTrafficR" + + "eportPolylineRendering*B\n\014VehicleState\022\031" + + "\n\025UNKNOWN_VEHICLE_STATE\020\000\022\013\n\007OFFLINE\020\001\022\n" + + "\n\006ONLINE\020\002*\222\002\n\025LocationPowerSaveMode\022$\n " + + "UNKNOWN_LOCATION_POWER_SAVE_MODE\020\000\022\033\n\027LO" + + "CATION_MODE_NO_CHANGE\020\001\022.\n*LOCATION_MODE" + + "_GPS_DISABLED_WHEN_SCREEN_OFF\020\002\022.\n*LOCAT" + + "ION_MODE_ALL_DISABLED_WHEN_SCREEN_OFF\020\003\022" + + "!\n\035LOCATION_MODE_FOREGROUND_ONLY\020\004\0223\n/LO" + + "CATION_MODE_THROTTLE_REQUESTS_WHEN_SCREE" + + "N_OFF\020\005*\300\001\n\rBatteryStatus\022\032\n\026UNKNOWN_BAT" + + "TERY_STATUS\020\000\022\033\n\027BATTERY_STATUS_CHARGING" + + "\020\001\022\036\n\032BATTERY_STATUS_DISCHARGING\020\002\022\027\n\023BA" + + "TTERY_STATUS_FULL\020\003\022\037\n\033BATTERY_STATUS_NO" + + "T_CHARGING\020\004\022\034\n\030BATTERY_STATUS_POWER_LOW" + + "\020\005*\211\001\n\013PowerSource\022\030\n\024UNKNOWN_POWER_SOUR" + + "CE\020\000\022\023\n\017POWER_SOURCE_AC\020\001\022\024\n\020POWER_SOURC" + + "E_USB\020\002\022\031\n\025POWER_SOURCE_WIRELESS\020\003\022\032\n\026PO" + + "WER_SOURCE_UNPLUGGED\020\004B\324\001\n\036com.google.ma" + + "ps.fleetengine.v1B\010VehiclesP\001ZFcloud.goo" + + "gle.com/go/maps/fleetengine/apiv1/fleete" + + "nginepb;fleetenginepb\242\002\003CFE\252\002\032Google.Map" + + "s.FleetEngine.V1\312\002\032Google\\Maps\\FleetEngi" + + "ne\\V1\352\002\035Google::Maps::FleetEngine::V1b\006p" + + "roto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.maps.fleetengine.v1.FleetEngine.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.protobuf.WrappersProto.getDescriptor(), + }); + internal_static_maps_fleetengine_v1_Vehicle_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_maps_fleetengine_v1_Vehicle_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_v1_Vehicle_descriptor, + new java.lang.String[] { + "Name", + "VehicleState", + "SupportedTripTypes", + "CurrentTrips", + "LastLocation", + "MaximumCapacity", + "Attributes", + "VehicleType", + "LicensePlate", + "Route", + "CurrentRouteSegment", + "CurrentRouteSegmentTraffic", + "CurrentRouteSegmentVersion", + "CurrentRouteSegmentEndPoint", + "RemainingDistanceMeters", + "EtaToFirstWaypoint", + "RemainingTimeSeconds", + "Waypoints", + "WaypointsVersion", + "BackToBackEnabled", + "NavigationStatus", + "DeviceSettings", + }); + internal_static_maps_fleetengine_v1_Vehicle_VehicleType_descriptor = + internal_static_maps_fleetengine_v1_Vehicle_descriptor.getNestedTypes().get(0); + internal_static_maps_fleetengine_v1_Vehicle_VehicleType_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_v1_Vehicle_VehicleType_descriptor, + new java.lang.String[] { + "Category", + }); + internal_static_maps_fleetengine_v1_BatteryInfo_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_maps_fleetengine_v1_BatteryInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_v1_BatteryInfo_descriptor, + new java.lang.String[] { + "BatteryStatus", "PowerSource", "BatteryPercentage", + }); + internal_static_maps_fleetengine_v1_DeviceSettings_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_maps_fleetengine_v1_DeviceSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_v1_DeviceSettings_descriptor, + new java.lang.String[] { + "LocationPowerSaveMode", "IsPowerSaveMode", "IsInteractive", "BatteryInfo", + }); + internal_static_maps_fleetengine_v1_LicensePlate_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_maps_fleetengine_v1_LicensePlate_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_v1_LicensePlate_descriptor, + new java.lang.String[] { + "CountryCode", "LastCharacter", + }); + internal_static_maps_fleetengine_v1_VisualTrafficReportPolylineRendering_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_maps_fleetengine_v1_VisualTrafficReportPolylineRendering_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_v1_VisualTrafficReportPolylineRendering_descriptor, + new java.lang.String[] { + "RoadStretch", + }); + internal_static_maps_fleetengine_v1_VisualTrafficReportPolylineRendering_RoadStretch_descriptor = + internal_static_maps_fleetengine_v1_VisualTrafficReportPolylineRendering_descriptor + .getNestedTypes() + .get(0); + internal_static_maps_fleetengine_v1_VisualTrafficReportPolylineRendering_RoadStretch_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_v1_VisualTrafficReportPolylineRendering_RoadStretch_descriptor, + new java.lang.String[] { + "Style", "OffsetMeters", "LengthMeters", + }); + internal_static_maps_fleetengine_v1_TrafficPolylineData_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_maps_fleetengine_v1_TrafficPolylineData_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_v1_TrafficPolylineData_descriptor, + new java.lang.String[] { + "TrafficRendering", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.maps.fleetengine.v1.FleetEngine.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.WrappersProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VisualTrafficReportPolylineRendering.java b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VisualTrafficReportPolylineRendering.java new file mode 100644 index 000000000000..bb31a7ce32c6 --- /dev/null +++ b/java-maps-fleetengine/proto-google-maps-fleetengine-v1/src/main/java/com/google/maps/fleetengine/v1/VisualTrafficReportPolylineRendering.java @@ -0,0 +1,2216 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/fleetengine/v1/vehicles.proto + +// Protobuf Java Version: 3.25.5 +package com.google.maps.fleetengine.v1; + +/** + * + * + *
+ * Describes how clients should color one portion of the polyline along the
+ * route.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.v1.VisualTrafficReportPolylineRendering} + */ +public final class VisualTrafficReportPolylineRendering + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.v1.VisualTrafficReportPolylineRendering) + VisualTrafficReportPolylineRenderingOrBuilder { + private static final long serialVersionUID = 0L; + // Use VisualTrafficReportPolylineRendering.newBuilder() to construct. + private VisualTrafficReportPolylineRendering( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VisualTrafficReportPolylineRendering() { + roadStretch_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VisualTrafficReportPolylineRendering(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.Vehicles + .internal_static_maps_fleetengine_v1_VisualTrafficReportPolylineRendering_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.Vehicles + .internal_static_maps_fleetengine_v1_VisualTrafficReportPolylineRendering_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.VisualTrafficReportPolylineRendering.class, + com.google.maps.fleetengine.v1.VisualTrafficReportPolylineRendering.Builder.class); + } + + public interface RoadStretchOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.v1.VisualTrafficReportPolylineRendering.RoadStretch) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The style to apply.
+     * 
+ * + * + * .maps.fleetengine.v1.VisualTrafficReportPolylineRendering.RoadStretch.Style style = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for style. + */ + int getStyleValue(); + /** + * + * + *
+     * Required. The style to apply.
+     * 
+ * + * + * .maps.fleetengine.v1.VisualTrafficReportPolylineRendering.RoadStretch.Style style = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The style. + */ + com.google.maps.fleetengine.v1.VisualTrafficReportPolylineRendering.RoadStretch.Style + getStyle(); + + /** + * + * + *
+     * Required. The style should be applied between `[offset_meters,
+     * offset_meters + length_meters)`.
+     * 
+ * + * int32 offset_meters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The offsetMeters. + */ + int getOffsetMeters(); + + /** + * + * + *
+     * Required. The length of the path where to apply the style.
+     * 
+ * + * int32 length_meters = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The lengthMeters. + */ + int getLengthMeters(); + } + /** + * + * + *
+   * One road stretch that should be rendered.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.v1.VisualTrafficReportPolylineRendering.RoadStretch} + */ + public static final class RoadStretch extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.v1.VisualTrafficReportPolylineRendering.RoadStretch) + RoadStretchOrBuilder { + private static final long serialVersionUID = 0L; + // Use RoadStretch.newBuilder() to construct. + private RoadStretch(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RoadStretch() { + style_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RoadStretch(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.fleetengine.v1.Vehicles + .internal_static_maps_fleetengine_v1_VisualTrafficReportPolylineRendering_RoadStretch_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.fleetengine.v1.Vehicles + .internal_static_maps_fleetengine_v1_VisualTrafficReportPolylineRendering_RoadStretch_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.fleetengine.v1.VisualTrafficReportPolylineRendering.RoadStretch.class, + com.google.maps.fleetengine.v1.VisualTrafficReportPolylineRendering.RoadStretch + .Builder.class); + } + + /** + * + * + *
+     * The traffic style, indicating traffic speed.
+     * 
+ * + * Protobuf enum {@code + * maps.fleetengine.v1.VisualTrafficReportPolylineRendering.RoadStretch.Style} + */ + public enum Style implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * No style selected.
+       * 
+ * + * STYLE_UNSPECIFIED = 0; + */ + STYLE_UNSPECIFIED(0), + /** + * + * + *
+       * Traffic is slowing down.
+       * 
+ * + * SLOWER_TRAFFIC = 1; + */ + SLOWER_TRAFFIC(1), + /** + * + * + *
+       * There is a traffic jam.
+       * 
+ * + * TRAFFIC_JAM = 2; + */ + TRAFFIC_JAM(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * No style selected.
+       * 
+ * + * STYLE_UNSPECIFIED = 0; + */ + public static final int STYLE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Traffic is slowing down.
+       * 
+ * + * SLOWER_TRAFFIC = 1; + */ + public static final int SLOWER_TRAFFIC_VALUE = 1; + /** + * + * + *
+       * There is a traffic jam.
+       * 
+ * + * TRAFFIC_JAM = 2; + */ + public static final int TRAFFIC_JAM_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Style 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 Style forNumber(int value) { + switch (value) { + case 0: + return STYLE_UNSPECIFIED; + case 1: + return SLOWER_TRAFFIC; + case 2: + return TRAFFIC_JAM; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap