diff --git a/java-maps-fleetengine-delivery/.OwlBot.yaml b/java-maps-fleetengine-delivery/.OwlBot.yaml new file mode 100644 index 000000000000..9c52025a3f12 --- /dev/null +++ b/java-maps-fleetengine-delivery/.OwlBot.yaml @@ -0,0 +1,36 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +deep-remove-regex: +- "/java-maps-fleetengine-delivery/grpc-google-.*/src" +- "/java-maps-fleetengine-delivery/proto-google-.*/src" +- "/java-maps-fleetengine-delivery/google-.*/src" +- "/java-maps-fleetengine-delivery/samples/snippets/generated" + +deep-preserve-regex: +- "/java-maps-fleetengine-delivery/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" + +deep-copy-regex: +- source: "/google/maps/fleetengine/delivery/(v.*)/.*-java/proto-google-.*/src" + dest: "/owl-bot-staging/java-maps-fleetengine-delivery/$1/proto-google-maps-fleetengine-delivery-$1/src" +- source: "/google/maps/fleetengine/delivery/(v.*)/.*-java/grpc-google-.*/src" + dest: "/owl-bot-staging/java-maps-fleetengine-delivery/$1/grpc-google-maps-fleetengine-delivery-$1/src" +- source: "/google/maps/fleetengine/delivery/(v.*)/.*-java/gapic-google-.*/src" + dest: "/owl-bot-staging/java-maps-fleetengine-delivery/$1/google-maps-fleetengine-delivery/src" +- source: "/google/maps/fleetengine/delivery/(v.*)/.*-java/samples/snippets/generated" + dest: "/owl-bot-staging/java-maps-fleetengine-delivery/$1/samples/snippets/generated" + + +api-name: maps-fleetengine-delivery \ No newline at end of file diff --git a/java-maps-fleetengine-delivery/.repo-metadata.json b/java-maps-fleetengine-delivery/.repo-metadata.json new file mode 100644 index 000000000000..76134383ff1a --- /dev/null +++ b/java-maps-fleetengine-delivery/.repo-metadata.json @@ -0,0 +1,16 @@ +{ + "api_shortname": "maps-fleetengine-delivery", + "name_pretty": "Last Mile Fleet Solution Delivery 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\n Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in\n the Cloud Logging Services is subject to the Google Maps Platform Terms of\n Service located at https://cloud.google.com/maps-platform/terms.", + "client_documentation": "https://cloud.google.com/java/docs/reference/google-maps-fleetengine-delivery/latest/overview", + "release_level": "preview", + "transport": "grpc", + "language": "java", + "repo": "googleapis/java-maps-fleetengine-delivery", + "repo_short": "java-maps-fleetengine-delivery", + "distribution_name": "com.google.maps:google-maps-fleetengine-delivery", + "api_id": "maps-fleetengine-delivery.googleapis.com", + "library_type": "GAPIC_AUTO", + "requires_billing": true +} \ No newline at end of file diff --git a/java-maps-fleetengine-delivery/README.md b/java-maps-fleetengine-delivery/README.md new file mode 100644 index 000000000000..ff0aed4ab3d4 --- /dev/null +++ b/java-maps-fleetengine-delivery/README.md @@ -0,0 +1,228 @@ +# Google Last Mile Fleet Solution Delivery API Client for Java + +Java idiomatic client for [Last Mile Fleet Solution Delivery 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.26.0 + pom + import + + + + + + + com.google.maps + google-maps-fleetengine-delivery + +``` + +If you are using Maven without the BOM, add this to your dependencies: + + + +```xml + + com.google.maps + google-maps-fleetengine-delivery + 0.0.0 + +``` + +If you are using Gradle without BOM, add this to your dependencies: + +```Groovy +implementation 'com.google.maps:google-maps-fleetengine-delivery:0.0.0' +``` + +If you are using SBT, add this to your dependencies: + +```Scala +libraryDependencies += "com.google.maps" % "google-maps-fleetengine-delivery" % "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 Last Mile Fleet Solution Delivery API APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the Last Mile Fleet Solution Delivery API API calls. + +## Getting Started + +### Prerequisites + +You will need a [Google Cloud Platform Console][developer-console] project with the Last Mile Fleet Solution Delivery API [API enabled][enable-api]. +You will need to [enable billing][enable-billing] to use Google Last Mile Fleet Solution Delivery 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-delivery` library. See the [Quickstart](#quickstart) section +to add `google-maps-fleetengine-delivery` as a dependency in your code. + +## About Last Mile Fleet Solution Delivery API + + +[Last Mile Fleet Solution Delivery 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 [Last Mile Fleet Solution Delivery API client library docs][javadocs] to learn how to +use this Last Mile Fleet Solution Delivery API Client Library. + + + + + + +## Troubleshooting + +To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. + +## Transport + +Last Mile Fleet Solution Delivery 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-delivery/latest/overview +[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-maps-fleetengine-delivery/java7.svg +[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-maps-fleetengine-delivery/java7.html +[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-maps-fleetengine-delivery/java8.svg +[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-maps-fleetengine-delivery/java8.html +[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-maps-fleetengine-delivery/java8-osx.svg +[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-maps-fleetengine-delivery/java8-osx.html +[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-maps-fleetengine-delivery/java8-win.svg +[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-maps-fleetengine-delivery/java8-win.html +[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-maps-fleetengine-delivery/java11.svg +[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-maps-fleetengine-delivery/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-delivery.svg +[maven-version-link]: https://central.sonatype.com/artifact/com.google.maps/google-maps-fleetengine-delivery/0.0.0 +[authentication]: https://github.com/googleapis/google-cloud-java#authentication +[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes +[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles +[iam-policy]: https://cloud.google.com/iam/docs/overview#cloud-iam-policy +[developer-console]: https://console.developers.google.com/ +[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects +[cloud-cli]: https://cloud.google.com/cli +[troubleshooting]: https://github.com/googleapis/google-cloud-java/blob/main/TROUBLESHOOTING.md +[contributing]: https://github.com/googleapis/java-maps-fleetengine-delivery/blob/main/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/java-maps-fleetengine-delivery/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/java-maps-fleetengine-delivery/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-delivery.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-delivery/google-maps-fleetengine-delivery-bom/pom.xml b/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery-bom/pom.xml new file mode 100644 index 000000000000..2b05ca2351f8 --- /dev/null +++ b/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery-bom/pom.xml @@ -0,0 +1,44 @@ + + + 4.0.0 + com.google.maps + google-maps-fleetengine-delivery-bom + 0.0.1-SNAPSHOT + pom + + + com.google.cloud + google-cloud-pom-parent + 1.24.0-SNAPSHOT + ../../google-cloud-pom-parent/pom.xml + + + Google Last Mile Fleet Solution Delivery API BOM + + BOM for Last Mile Fleet Solution Delivery API + + + + true + + + + + + com.google.maps + google-maps-fleetengine-delivery + 0.0.1-SNAPSHOT + + + com.google.maps.api.grpc + grpc-google-maps-fleetengine-delivery-v1 + 0.0.1-SNAPSHOT + + + com.google.maps.api.grpc + proto-google-maps-fleetengine-delivery-v1 + 0.0.1-SNAPSHOT + + + + diff --git a/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/pom.xml b/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/pom.xml new file mode 100644 index 000000000000..8ae13b8d8a9b --- /dev/null +++ b/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/pom.xml @@ -0,0 +1,116 @@ + + + 4.0.0 + com.google.maps + google-maps-fleetengine-delivery + 0.0.1-SNAPSHOT + jar + Google Last Mile Fleet Solution Delivery API + Last Mile Fleet Solution Delivery 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-delivery-parent + 0.0.1-SNAPSHOT + + + google-maps-fleetengine-delivery + + + + 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-delivery-v1 + + + com.google.guava + guava + + + com.google.api + gax + + + com.google.api + gax-grpc + + + com.google.api + gax-httpjson + + + com.google.api.grpc + grpc-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api.grpc + grpc-google-iam-v1 + + + org.threeten + threetenbp + + + + + junit + junit + test + + + + com.google.maps.api.grpc + grpc-google-maps-fleetengine-delivery-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-delivery/google-maps-fleetengine-delivery/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryServiceClient.java b/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryServiceClient.java new file mode 100644 index 000000000000..f8d1a1a91a11 --- /dev/null +++ b/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryServiceClient.java @@ -0,0 +1,1784 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.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.protobuf.FieldMask; +import google.maps.fleetengine.delivery.v1.stub.DeliveryServiceStub; +import google.maps.fleetengine.delivery.v1.stub.DeliveryServiceStubSettings; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: The Last Mile Delivery 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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+ *   String parent = "parent-995424086";
+ *   DeliveryVehicle deliveryVehicle = DeliveryVehicle.newBuilder().build();
+ *   String deliveryVehicleId = "deliveryVehicleId-861424685";
+ *   DeliveryVehicle response =
+ *       deliveryServiceClient.createDeliveryVehicle(parent, deliveryVehicle, deliveryVehicleId);
+ * }
+ * }
+ * + *

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

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

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

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

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

This class can be customized by passing in a custom instance of DeliveryServiceSettings 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
+ * DeliveryServiceSettings deliveryServiceSettings =
+ *     DeliveryServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * DeliveryServiceClient deliveryServiceClient =
+ *     DeliveryServiceClient.create(deliveryServiceSettings);
+ * }
+ * + *

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
+ * DeliveryServiceSettings deliveryServiceSettings =
+ *     DeliveryServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * DeliveryServiceClient deliveryServiceClient =
+ *     DeliveryServiceClient.create(deliveryServiceSettings);
+ * }
+ * + *

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

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DeliveryServiceSettings deliveryServiceSettings =
+ *     DeliveryServiceSettings.newHttpJsonBuilder().build();
+ * DeliveryServiceClient deliveryServiceClient =
+ *     DeliveryServiceClient.create(deliveryServiceSettings);
+ * }
+ * + *

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

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   String parent = "parent-995424086";
+   *   DeliveryVehicle deliveryVehicle = DeliveryVehicle.newBuilder().build();
+   *   String deliveryVehicleId = "deliveryVehicleId-861424685";
+   *   DeliveryVehicle response =
+   *       deliveryServiceClient.createDeliveryVehicle(parent, deliveryVehicle, deliveryVehicleId);
+   * }
+   * }
+ * + * @param parent Required. Must be in the format `providers/{provider}`. The provider must be the + * Google Cloud Project ID. For example, `sample-cloud-project`. + * @param deliveryVehicle Required. The `DeliveryVehicle` entity to create. When creating a new + * delivery vehicle, you may set the following optional fields: + * + *

Note: The DeliveryVehicle's `name` field is ignored. All other DeliveryVehicle fields + * must not be set; otherwise, an error is returned. + * @param deliveryVehicleId Required. The Delivery Vehicle ID must be unique and subject to the + * following restrictions: + *

+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DeliveryVehicle createDeliveryVehicle( + String parent, DeliveryVehicle deliveryVehicle, String deliveryVehicleId) { + CreateDeliveryVehicleRequest request = + CreateDeliveryVehicleRequest.newBuilder() + .setParent(parent) + .setDeliveryVehicle(deliveryVehicle) + .setDeliveryVehicleId(deliveryVehicleId) + .build(); + return createDeliveryVehicle(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new `DeliveryVehicle`. + * + *

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   CreateDeliveryVehicleRequest request =
+   *       CreateDeliveryVehicleRequest.newBuilder()
+   *           .setHeader(DeliveryRequestHeader.newBuilder().build())
+   *           .setParent("parent-995424086")
+   *           .setDeliveryVehicleId("deliveryVehicleId-861424685")
+   *           .setDeliveryVehicle(DeliveryVehicle.newBuilder().build())
+   *           .build();
+   *   DeliveryVehicle response = deliveryServiceClient.createDeliveryVehicle(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 DeliveryVehicle createDeliveryVehicle(CreateDeliveryVehicleRequest request) { + return createDeliveryVehicleCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new `DeliveryVehicle`. + * + *

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   CreateDeliveryVehicleRequest request =
+   *       CreateDeliveryVehicleRequest.newBuilder()
+   *           .setHeader(DeliveryRequestHeader.newBuilder().build())
+   *           .setParent("parent-995424086")
+   *           .setDeliveryVehicleId("deliveryVehicleId-861424685")
+   *           .setDeliveryVehicle(DeliveryVehicle.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       deliveryServiceClient.createDeliveryVehicleCallable().futureCall(request);
+   *   // Do something.
+   *   DeliveryVehicle response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createDeliveryVehicleCallable() { + return stub.createDeliveryVehicleCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the specified `DeliveryVehicle` instance. + * + *

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   DeliveryVehicleName name = DeliveryVehicleName.of("[PROVIDER]", "[VEHICLE]");
+   *   DeliveryVehicle response = deliveryServiceClient.getDeliveryVehicle(name);
+   * }
+   * }
+ * + * @param name Required. Must be in the format + * `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. The `provider` must be the + * Google Cloud Project ID. For example, `sample-cloud-project`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DeliveryVehicle getDeliveryVehicle(DeliveryVehicleName name) { + GetDeliveryVehicleRequest request = + GetDeliveryVehicleRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getDeliveryVehicle(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the specified `DeliveryVehicle` instance. + * + *

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   String name = DeliveryVehicleName.of("[PROVIDER]", "[VEHICLE]").toString();
+   *   DeliveryVehicle response = deliveryServiceClient.getDeliveryVehicle(name);
+   * }
+   * }
+ * + * @param name Required. Must be in the format + * `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. The `provider` must be the + * Google Cloud Project ID. For example, `sample-cloud-project`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DeliveryVehicle getDeliveryVehicle(String name) { + GetDeliveryVehicleRequest request = + GetDeliveryVehicleRequest.newBuilder().setName(name).build(); + return getDeliveryVehicle(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the specified `DeliveryVehicle` instance. + * + *

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   GetDeliveryVehicleRequest request =
+   *       GetDeliveryVehicleRequest.newBuilder()
+   *           .setHeader(DeliveryRequestHeader.newBuilder().build())
+   *           .setName(DeliveryVehicleName.of("[PROVIDER]", "[VEHICLE]").toString())
+   *           .build();
+   *   DeliveryVehicle response = deliveryServiceClient.getDeliveryVehicle(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 DeliveryVehicle getDeliveryVehicle(GetDeliveryVehicleRequest request) { + return getDeliveryVehicleCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the specified `DeliveryVehicle` instance. + * + *

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   GetDeliveryVehicleRequest request =
+   *       GetDeliveryVehicleRequest.newBuilder()
+   *           .setHeader(DeliveryRequestHeader.newBuilder().build())
+   *           .setName(DeliveryVehicleName.of("[PROVIDER]", "[VEHICLE]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       deliveryServiceClient.getDeliveryVehicleCallable().futureCall(request);
+   *   // Do something.
+   *   DeliveryVehicle response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getDeliveryVehicleCallable() { + return stub.getDeliveryVehicleCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Writes updated `DeliveryVehicle` data to Fleet Engine, and assigns `Tasks` to the + * `DeliveryVehicle`. You cannot update the name of the `DeliveryVehicle`. You *can* + * update `remaining_vehicle_journey_segments` though, but it must contain all of the + * `VehicleJourneySegment`s currently on the `DeliveryVehicle`. The `task_id`s are retrieved from + * `remaining_vehicle_journey_segments`, and their corresponding `Tasks` are assigned to the + * `DeliveryVehicle` if they have not yet been assigned. + * + *

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   DeliveryVehicle deliveryVehicle = DeliveryVehicle.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   DeliveryVehicle response =
+   *       deliveryServiceClient.updateDeliveryVehicle(deliveryVehicle, updateMask);
+   * }
+   * }
+ * + * @param deliveryVehicle Required. The `DeliveryVehicle` entity update to apply. Note: You cannot + * update the name of the `DeliveryVehicle`. + * @param updateMask Required. A field mask that indicates which `DeliveryVehicle` fields to + * update. Note that the update_mask must contain at least one field. + *

This is a comma-separated list of fully qualified names of fields. Example: + * `"remaining_vehicle_journey_segments"`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DeliveryVehicle updateDeliveryVehicle( + DeliveryVehicle deliveryVehicle, FieldMask updateMask) { + UpdateDeliveryVehicleRequest request = + UpdateDeliveryVehicleRequest.newBuilder() + .setDeliveryVehicle(deliveryVehicle) + .setUpdateMask(updateMask) + .build(); + return updateDeliveryVehicle(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Writes updated `DeliveryVehicle` data to Fleet Engine, and assigns `Tasks` to the + * `DeliveryVehicle`. You cannot update the name of the `DeliveryVehicle`. You *can* + * update `remaining_vehicle_journey_segments` though, but it must contain all of the + * `VehicleJourneySegment`s currently on the `DeliveryVehicle`. The `task_id`s are retrieved from + * `remaining_vehicle_journey_segments`, and their corresponding `Tasks` are assigned to the + * `DeliveryVehicle` if they have not yet been assigned. + * + *

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   UpdateDeliveryVehicleRequest request =
+   *       UpdateDeliveryVehicleRequest.newBuilder()
+   *           .setHeader(DeliveryRequestHeader.newBuilder().build())
+   *           .setDeliveryVehicle(DeliveryVehicle.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   DeliveryVehicle response = deliveryServiceClient.updateDeliveryVehicle(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 DeliveryVehicle updateDeliveryVehicle(UpdateDeliveryVehicleRequest request) { + return updateDeliveryVehicleCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Writes updated `DeliveryVehicle` data to Fleet Engine, and assigns `Tasks` to the + * `DeliveryVehicle`. You cannot update the name of the `DeliveryVehicle`. You *can* + * update `remaining_vehicle_journey_segments` though, but it must contain all of the + * `VehicleJourneySegment`s currently on the `DeliveryVehicle`. The `task_id`s are retrieved from + * `remaining_vehicle_journey_segments`, and their corresponding `Tasks` are assigned to the + * `DeliveryVehicle` if they have not yet been assigned. + * + *

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   UpdateDeliveryVehicleRequest request =
+   *       UpdateDeliveryVehicleRequest.newBuilder()
+   *           .setHeader(DeliveryRequestHeader.newBuilder().build())
+   *           .setDeliveryVehicle(DeliveryVehicle.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       deliveryServiceClient.updateDeliveryVehicleCallable().futureCall(request);
+   *   // Do something.
+   *   DeliveryVehicle response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateDeliveryVehicleCallable() { + return stub.updateDeliveryVehicleCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a batch of new `Task` objects. + * + *

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   BatchCreateTasksRequest request =
+   *       BatchCreateTasksRequest.newBuilder()
+   *           .setHeader(DeliveryRequestHeader.newBuilder().build())
+   *           .setParent(ProviderName.of("[PROVIDER]").toString())
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   BatchCreateTasksResponse response = deliveryServiceClient.batchCreateTasks(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 BatchCreateTasksResponse batchCreateTasks(BatchCreateTasksRequest request) { + return batchCreateTasksCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a batch of new `Task` objects. + * + *

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   BatchCreateTasksRequest request =
+   *       BatchCreateTasksRequest.newBuilder()
+   *           .setHeader(DeliveryRequestHeader.newBuilder().build())
+   *           .setParent(ProviderName.of("[PROVIDER]").toString())
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       deliveryServiceClient.batchCreateTasksCallable().futureCall(request);
+   *   // Do something.
+   *   BatchCreateTasksResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + batchCreateTasksCallable() { + return stub.batchCreateTasksCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new `Task` object. + * + *

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   String parent = "parent-995424086";
+   *   Task task = Task.newBuilder().build();
+   *   String taskId = "taskId-880873088";
+   *   Task response = deliveryServiceClient.createTask(parent, task, taskId);
+   * }
+   * }
+ * + * @param parent Required. Must be in the format `providers/{provider}`. The `provider` must be + * the Google Cloud Project ID. For example, `sample-cloud-project`. + * @param task Required. The Task entity to create. When creating a Task, the following fields are + * required: + *
    + *
  • `type` + *
  • `state` (must be set to `OPEN`) + *
  • `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP` tasks, but + * required for all other task types) + *
  • `planned_location` (optional for `UNAVAILABLE` tasks) + *
  • `task_duration` + *
+ *

Note: The Task's `name` field is ignored. All other Task fields must not be set; + * otherwise, an error is returned. + * @param taskId Required. The Task ID must be unique, but it should be not a shipment tracking + * ID. To store a shipment tracking ID, use the `tracking_id` field. Note that multiple tasks + * can have the same `tracking_id`. Task IDs are 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 '#'. + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Task createTask(String parent, Task task, String taskId) { + CreateTaskRequest request = + CreateTaskRequest.newBuilder().setParent(parent).setTask(task).setTaskId(taskId).build(); + return createTask(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new `Task` object. + * + *

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   CreateTaskRequest request =
+   *       CreateTaskRequest.newBuilder()
+   *           .setHeader(DeliveryRequestHeader.newBuilder().build())
+   *           .setParent("parent-995424086")
+   *           .setTaskId("taskId-880873088")
+   *           .setTask(Task.newBuilder().build())
+   *           .build();
+   *   Task response = deliveryServiceClient.createTask(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 Task createTask(CreateTaskRequest request) { + return createTaskCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new `Task` object. + * + *

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   CreateTaskRequest request =
+   *       CreateTaskRequest.newBuilder()
+   *           .setHeader(DeliveryRequestHeader.newBuilder().build())
+   *           .setParent("parent-995424086")
+   *           .setTaskId("taskId-880873088")
+   *           .setTask(Task.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = deliveryServiceClient.createTaskCallable().futureCall(request);
+   *   // Do something.
+   *   Task response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createTaskCallable() { + return stub.createTaskCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a `Task`. + * + *

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   TaskName name = TaskName.of("[PROVIDER]", "[TASK]");
+   *   Task response = deliveryServiceClient.getTask(name);
+   * }
+   * }
+ * + * @param name Required. Must be in the format `providers/{provider}/tasks/{task}`. The `provider` + * must be the Google Cloud Project ID. For example, `sample-cloud-project`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Task getTask(TaskName name) { + GetTaskRequest request = + GetTaskRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getTask(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a `Task`. + * + *

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   String name = TaskName.of("[PROVIDER]", "[TASK]").toString();
+   *   Task response = deliveryServiceClient.getTask(name);
+   * }
+   * }
+ * + * @param name Required. Must be in the format `providers/{provider}/tasks/{task}`. The `provider` + * must be the Google Cloud Project ID. For example, `sample-cloud-project`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Task getTask(String name) { + GetTaskRequest request = GetTaskRequest.newBuilder().setName(name).build(); + return getTask(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a `Task`. + * + *

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   GetTaskRequest request =
+   *       GetTaskRequest.newBuilder()
+   *           .setHeader(DeliveryRequestHeader.newBuilder().build())
+   *           .setName(TaskName.of("[PROVIDER]", "[TASK]").toString())
+   *           .build();
+   *   Task response = deliveryServiceClient.getTask(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 Task getTask(GetTaskRequest request) { + return getTaskCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a `Task`. + * + *

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   GetTaskRequest request =
+   *       GetTaskRequest.newBuilder()
+   *           .setHeader(DeliveryRequestHeader.newBuilder().build())
+   *           .setName(TaskName.of("[PROVIDER]", "[TASK]").toString())
+   *           .build();
+   *   ApiFuture future = deliveryServiceClient.getTaskCallable().futureCall(request);
+   *   // Do something.
+   *   Task response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getTaskCallable() { + return stub.getTaskCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deprecated: Use `GetTaskTrackingInfo` instead. + * + *

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   String parent = "parent-995424086";
+   *   for (Task element : deliveryServiceClient.searchTasks(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Must be in the format `providers/{provider}`. The provider must be the + * Google Cloud Project ID. For example, `sample-cloud-project`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated This method is deprecated and will be removed in the next major version update. + */ + @Deprecated + public final SearchTasksPagedResponse searchTasks(String parent) { + SearchTasksRequest request = SearchTasksRequest.newBuilder().setParent(parent).build(); + return searchTasks(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deprecated: Use `GetTaskTrackingInfo` instead. + * + *

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   SearchTasksRequest request =
+   *       SearchTasksRequest.newBuilder()
+   *           .setHeader(DeliveryRequestHeader.newBuilder().build())
+   *           .setParent("parent-995424086")
+   *           .setTrackingId("trackingId1168987698")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Task element : deliveryServiceClient.searchTasks(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 + * @deprecated This method is deprecated and will be removed in the next major version update. + */ + @Deprecated + public final SearchTasksPagedResponse searchTasks(SearchTasksRequest request) { + return searchTasksPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deprecated: Use `GetTaskTrackingInfo` instead. + * + *

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   SearchTasksRequest request =
+   *       SearchTasksRequest.newBuilder()
+   *           .setHeader(DeliveryRequestHeader.newBuilder().build())
+   *           .setParent("parent-995424086")
+   *           .setTrackingId("trackingId1168987698")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = deliveryServiceClient.searchTasksPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Task element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @deprecated This method is deprecated and will be removed in the next major version update. + */ + @Deprecated + public final UnaryCallable + searchTasksPagedCallable() { + return stub.searchTasksPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deprecated: Use `GetTaskTrackingInfo` instead. + * + *

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   SearchTasksRequest request =
+   *       SearchTasksRequest.newBuilder()
+   *           .setHeader(DeliveryRequestHeader.newBuilder().build())
+   *           .setParent("parent-995424086")
+   *           .setTrackingId("trackingId1168987698")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     SearchTasksResponse response = deliveryServiceClient.searchTasksCallable().call(request);
+   *     for (Task element : response.getTasksList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ * + * @deprecated This method is deprecated and will be removed in the next major version update. + */ + @Deprecated + public final UnaryCallable searchTasksCallable() { + return stub.searchTasksCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates `Task` 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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   Task task = Task.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Task response = deliveryServiceClient.updateTask(task, updateMask);
+   * }
+   * }
+ * + * @param task Required. The Task associated with the update. The following fields are maintained + * by Fleet Engine. Do not update them using `Task.update`. + *

* `last_location`. * `last_location_snappable`. * `name`. * + * `remaining_vehicle_journey_segments`. * `task_outcome_location_source`. + *

Note: You cannot change the value of `task_outcome` once you set it. + *

If the Task has been assigned to a delivery vehicle, then don't set the Task state to + * CLOSED using `Task.update`. Instead, remove the `VehicleStop` that contains the Task from + * the delivery vehicle, which automatically sets the Task state to CLOSED. + * @param updateMask Required. The field mask that indicates which Task fields to update. Note: + * The `update_mask` must contain at least one field. + *

This is a comma-separated list of fully qualified names of fields. Example: + * `"task_outcome,task_outcome_time,task_outcome_location"`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Task updateTask(Task task, FieldMask updateMask) { + UpdateTaskRequest request = + UpdateTaskRequest.newBuilder().setTask(task).setUpdateMask(updateMask).build(); + return updateTask(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates `Task` 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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   UpdateTaskRequest request =
+   *       UpdateTaskRequest.newBuilder()
+   *           .setHeader(DeliveryRequestHeader.newBuilder().build())
+   *           .setTask(Task.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Task response = deliveryServiceClient.updateTask(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 Task updateTask(UpdateTaskRequest request) { + return updateTaskCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates `Task` 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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   UpdateTaskRequest request =
+   *       UpdateTaskRequest.newBuilder()
+   *           .setHeader(DeliveryRequestHeader.newBuilder().build())
+   *           .setTask(Task.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = deliveryServiceClient.updateTaskCallable().futureCall(request);
+   *   // Do something.
+   *   Task response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateTaskCallable() { + return stub.updateTaskCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets all `Task`s that meet the specified filtering criteria. + * + *

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   ProviderName parent = ProviderName.of("[PROVIDER]");
+   *   for (Task element : deliveryServiceClient.listTasks(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Must be in the format `providers/{provider}`. The `provider` must be + * the Google Cloud Project ID. For example, `sample-cloud-project`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTasksPagedResponse listTasks(ProviderName parent) { + ListTasksRequest request = + ListTasksRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listTasks(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets all `Task`s that meet the specified filtering criteria. + * + *

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   String parent = ProviderName.of("[PROVIDER]").toString();
+   *   for (Task element : deliveryServiceClient.listTasks(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Must be in the format `providers/{provider}`. The `provider` must be + * the Google Cloud Project ID. For example, `sample-cloud-project`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTasksPagedResponse listTasks(String parent) { + ListTasksRequest request = ListTasksRequest.newBuilder().setParent(parent).build(); + return listTasks(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets all `Task`s that meet the specified filtering criteria. + * + *

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   ListTasksRequest request =
+   *       ListTasksRequest.newBuilder()
+   *           .setHeader(DeliveryRequestHeader.newBuilder().build())
+   *           .setParent(ProviderName.of("[PROVIDER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   for (Task element : deliveryServiceClient.listTasks(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 ListTasksPagedResponse listTasks(ListTasksRequest request) { + return listTasksPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets all `Task`s that meet the specified filtering criteria. + * + *

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   ListTasksRequest request =
+   *       ListTasksRequest.newBuilder()
+   *           .setHeader(DeliveryRequestHeader.newBuilder().build())
+   *           .setParent(ProviderName.of("[PROVIDER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future = deliveryServiceClient.listTasksPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Task element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listTasksPagedCallable() { + return stub.listTasksPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets all `Task`s that meet the specified filtering criteria. + * + *

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   ListTasksRequest request =
+   *       ListTasksRequest.newBuilder()
+   *           .setHeader(DeliveryRequestHeader.newBuilder().build())
+   *           .setParent(ProviderName.of("[PROVIDER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   while (true) {
+   *     ListTasksResponse response = deliveryServiceClient.listTasksCallable().call(request);
+   *     for (Task element : response.getTasksList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listTasksCallable() { + return stub.listTasksCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the specified `TaskTrackingInfo` instance. + * + *

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   TaskTrackingInfoName name = TaskTrackingInfoName.of("[PROVIDER]", "[TRACKING]");
+   *   TaskTrackingInfo response = deliveryServiceClient.getTaskTrackingInfo(name);
+   * }
+   * }
+ * + * @param name Required. Must be in the format + * `providers/{provider}/taskTrackingInfo/{tracking_id}`. The `provider` must be the Google + * Cloud Project ID, and the `tracking_id` must be the tracking ID associated with the task. + * An example name can be + * `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TaskTrackingInfo getTaskTrackingInfo(TaskTrackingInfoName name) { + GetTaskTrackingInfoRequest request = + GetTaskTrackingInfoRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getTaskTrackingInfo(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the specified `TaskTrackingInfo` instance. + * + *

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   String name = TaskTrackingInfoName.of("[PROVIDER]", "[TRACKING]").toString();
+   *   TaskTrackingInfo response = deliveryServiceClient.getTaskTrackingInfo(name);
+   * }
+   * }
+ * + * @param name Required. Must be in the format + * `providers/{provider}/taskTrackingInfo/{tracking_id}`. The `provider` must be the Google + * Cloud Project ID, and the `tracking_id` must be the tracking ID associated with the task. + * An example name can be + * `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TaskTrackingInfo getTaskTrackingInfo(String name) { + GetTaskTrackingInfoRequest request = + GetTaskTrackingInfoRequest.newBuilder().setName(name).build(); + return getTaskTrackingInfo(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the specified `TaskTrackingInfo` instance. + * + *

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   GetTaskTrackingInfoRequest request =
+   *       GetTaskTrackingInfoRequest.newBuilder()
+   *           .setHeader(DeliveryRequestHeader.newBuilder().build())
+   *           .setName(TaskTrackingInfoName.of("[PROVIDER]", "[TRACKING]").toString())
+   *           .build();
+   *   TaskTrackingInfo response = deliveryServiceClient.getTaskTrackingInfo(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 TaskTrackingInfo getTaskTrackingInfo(GetTaskTrackingInfoRequest request) { + return getTaskTrackingInfoCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the specified `TaskTrackingInfo` instance. + * + *

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   GetTaskTrackingInfoRequest request =
+   *       GetTaskTrackingInfoRequest.newBuilder()
+   *           .setHeader(DeliveryRequestHeader.newBuilder().build())
+   *           .setName(TaskTrackingInfoName.of("[PROVIDER]", "[TRACKING]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       deliveryServiceClient.getTaskTrackingInfoCallable().futureCall(request);
+   *   // Do something.
+   *   TaskTrackingInfo response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getTaskTrackingInfoCallable() { + return stub.getTaskTrackingInfoCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets all `DeliveryVehicle`s that meet the specified filtering criteria. + * + *

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   ProviderName parent = ProviderName.of("[PROVIDER]");
+   *   for (DeliveryVehicle element :
+   *       deliveryServiceClient.listDeliveryVehicles(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Must be in the format `providers/{provider}`. The `provider` must be + * the Google Cloud Project ID. For example, `sample-cloud-project`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDeliveryVehiclesPagedResponse listDeliveryVehicles(ProviderName parent) { + ListDeliveryVehiclesRequest request = + ListDeliveryVehiclesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listDeliveryVehicles(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets all `DeliveryVehicle`s that meet the specified filtering criteria. + * + *

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   String parent = ProviderName.of("[PROVIDER]").toString();
+   *   for (DeliveryVehicle element :
+   *       deliveryServiceClient.listDeliveryVehicles(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Must be in the format `providers/{provider}`. The `provider` must be + * the Google Cloud Project ID. For example, `sample-cloud-project`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDeliveryVehiclesPagedResponse listDeliveryVehicles(String parent) { + ListDeliveryVehiclesRequest request = + ListDeliveryVehiclesRequest.newBuilder().setParent(parent).build(); + return listDeliveryVehicles(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets all `DeliveryVehicle`s that meet the specified filtering criteria. + * + *

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   ListDeliveryVehiclesRequest request =
+   *       ListDeliveryVehiclesRequest.newBuilder()
+   *           .setHeader(DeliveryRequestHeader.newBuilder().build())
+   *           .setParent(ProviderName.of("[PROVIDER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setViewport(Viewport.newBuilder().build())
+   *           .build();
+   *   for (DeliveryVehicle element :
+   *       deliveryServiceClient.listDeliveryVehicles(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 ListDeliveryVehiclesPagedResponse listDeliveryVehicles( + ListDeliveryVehiclesRequest request) { + return listDeliveryVehiclesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets all `DeliveryVehicle`s that meet the specified filtering criteria. + * + *

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   ListDeliveryVehiclesRequest request =
+   *       ListDeliveryVehiclesRequest.newBuilder()
+   *           .setHeader(DeliveryRequestHeader.newBuilder().build())
+   *           .setParent(ProviderName.of("[PROVIDER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setViewport(Viewport.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       deliveryServiceClient.listDeliveryVehiclesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (DeliveryVehicle element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDeliveryVehiclesPagedCallable() { + return stub.listDeliveryVehiclesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets all `DeliveryVehicle`s that meet the specified filtering criteria. + * + *

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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+   *   ListDeliveryVehiclesRequest request =
+   *       ListDeliveryVehiclesRequest.newBuilder()
+   *           .setHeader(DeliveryRequestHeader.newBuilder().build())
+   *           .setParent(ProviderName.of("[PROVIDER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setViewport(Viewport.newBuilder().build())
+   *           .build();
+   *   while (true) {
+   *     ListDeliveryVehiclesResponse response =
+   *         deliveryServiceClient.listDeliveryVehiclesCallable().call(request);
+   *     for (DeliveryVehicle element : response.getDeliveryVehiclesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDeliveryVehiclesCallable() { + return stub.listDeliveryVehiclesCallable(); + } + + @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 SearchTasksPagedResponse + extends AbstractPagedListResponse< + SearchTasksRequest, + SearchTasksResponse, + Task, + SearchTasksPage, + SearchTasksFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + SearchTasksPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new SearchTasksPagedResponse(input), MoreExecutors.directExecutor()); + } + + private SearchTasksPagedResponse(SearchTasksPage page) { + super(page, SearchTasksFixedSizeCollection.createEmptyCollection()); + } + } + + public static class SearchTasksPage + extends AbstractPage { + + private SearchTasksPage( + PageContext context, + SearchTasksResponse response) { + super(context, response); + } + + private static SearchTasksPage createEmptyPage() { + return new SearchTasksPage(null, null); + } + + @Override + protected SearchTasksPage createPage( + PageContext context, + SearchTasksResponse response) { + return new SearchTasksPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class SearchTasksFixedSizeCollection + extends AbstractFixedSizeCollection< + SearchTasksRequest, + SearchTasksResponse, + Task, + SearchTasksPage, + SearchTasksFixedSizeCollection> { + + private SearchTasksFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static SearchTasksFixedSizeCollection createEmptyCollection() { + return new SearchTasksFixedSizeCollection(null, 0); + } + + @Override + protected SearchTasksFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new SearchTasksFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListTasksPagedResponse + extends AbstractPagedListResponse< + ListTasksRequest, ListTasksResponse, Task, ListTasksPage, ListTasksFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListTasksPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListTasksPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListTasksPagedResponse(ListTasksPage page) { + super(page, ListTasksFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListTasksPage + extends AbstractPage { + + private ListTasksPage( + PageContext context, + ListTasksResponse response) { + super(context, response); + } + + private static ListTasksPage createEmptyPage() { + return new ListTasksPage(null, null); + } + + @Override + protected ListTasksPage createPage( + PageContext context, + ListTasksResponse response) { + return new ListTasksPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListTasksFixedSizeCollection + extends AbstractFixedSizeCollection< + ListTasksRequest, ListTasksResponse, Task, ListTasksPage, ListTasksFixedSizeCollection> { + + private ListTasksFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListTasksFixedSizeCollection createEmptyCollection() { + return new ListTasksFixedSizeCollection(null, 0); + } + + @Override + protected ListTasksFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListTasksFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListDeliveryVehiclesPagedResponse + extends AbstractPagedListResponse< + ListDeliveryVehiclesRequest, + ListDeliveryVehiclesResponse, + DeliveryVehicle, + ListDeliveryVehiclesPage, + ListDeliveryVehiclesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListDeliveryVehiclesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListDeliveryVehiclesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListDeliveryVehiclesPagedResponse(ListDeliveryVehiclesPage page) { + super(page, ListDeliveryVehiclesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListDeliveryVehiclesPage + extends AbstractPage< + ListDeliveryVehiclesRequest, + ListDeliveryVehiclesResponse, + DeliveryVehicle, + ListDeliveryVehiclesPage> { + + private ListDeliveryVehiclesPage( + PageContext + context, + ListDeliveryVehiclesResponse response) { + super(context, response); + } + + private static ListDeliveryVehiclesPage createEmptyPage() { + return new ListDeliveryVehiclesPage(null, null); + } + + @Override + protected ListDeliveryVehiclesPage createPage( + PageContext + context, + ListDeliveryVehiclesResponse response) { + return new ListDeliveryVehiclesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListDeliveryVehiclesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListDeliveryVehiclesRequest, + ListDeliveryVehiclesResponse, + DeliveryVehicle, + ListDeliveryVehiclesPage, + ListDeliveryVehiclesFixedSizeCollection> { + + private ListDeliveryVehiclesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListDeliveryVehiclesFixedSizeCollection createEmptyCollection() { + return new ListDeliveryVehiclesFixedSizeCollection(null, 0); + } + + @Override + protected ListDeliveryVehiclesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListDeliveryVehiclesFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryServiceSettings.java b/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryServiceSettings.java new file mode 100644 index 000000000000..827bc6807bbb --- /dev/null +++ b/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryServiceSettings.java @@ -0,0 +1,343 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1; + +import static google.maps.fleetengine.delivery.v1.DeliveryServiceClient.ListDeliveryVehiclesPagedResponse; +import static google.maps.fleetengine.delivery.v1.DeliveryServiceClient.ListTasksPagedResponse; +import static google.maps.fleetengine.delivery.v1.DeliveryServiceClient.SearchTasksPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import google.maps.fleetengine.delivery.v1.stub.DeliveryServiceStubSettings; +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 DeliveryServiceClient}. + * + *

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 total timeout of createDeliveryVehicle to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DeliveryServiceSettings.Builder deliveryServiceSettingsBuilder =
+ *     DeliveryServiceSettings.newBuilder();
+ * deliveryServiceSettingsBuilder
+ *     .createDeliveryVehicleSettings()
+ *     .setRetrySettings(
+ *         deliveryServiceSettingsBuilder
+ *             .createDeliveryVehicleSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * DeliveryServiceSettings deliveryServiceSettings = deliveryServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class DeliveryServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createDeliveryVehicle. */ + public UnaryCallSettings + createDeliveryVehicleSettings() { + return ((DeliveryServiceStubSettings) getStubSettings()).createDeliveryVehicleSettings(); + } + + /** Returns the object with the settings used for calls to getDeliveryVehicle. */ + public UnaryCallSettings + getDeliveryVehicleSettings() { + return ((DeliveryServiceStubSettings) getStubSettings()).getDeliveryVehicleSettings(); + } + + /** Returns the object with the settings used for calls to updateDeliveryVehicle. */ + public UnaryCallSettings + updateDeliveryVehicleSettings() { + return ((DeliveryServiceStubSettings) getStubSettings()).updateDeliveryVehicleSettings(); + } + + /** Returns the object with the settings used for calls to batchCreateTasks. */ + public UnaryCallSettings + batchCreateTasksSettings() { + return ((DeliveryServiceStubSettings) getStubSettings()).batchCreateTasksSettings(); + } + + /** Returns the object with the settings used for calls to createTask. */ + public UnaryCallSettings createTaskSettings() { + return ((DeliveryServiceStubSettings) getStubSettings()).createTaskSettings(); + } + + /** Returns the object with the settings used for calls to getTask. */ + public UnaryCallSettings getTaskSettings() { + return ((DeliveryServiceStubSettings) getStubSettings()).getTaskSettings(); + } + + /** + * Returns the object with the settings used for calls to searchTasks. + * + * @deprecated This method is deprecated and will be removed in the next major version update. + */ + @Deprecated + public PagedCallSettings + searchTasksSettings() { + return ((DeliveryServiceStubSettings) getStubSettings()).searchTasksSettings(); + } + + /** Returns the object with the settings used for calls to updateTask. */ + public UnaryCallSettings updateTaskSettings() { + return ((DeliveryServiceStubSettings) getStubSettings()).updateTaskSettings(); + } + + /** Returns the object with the settings used for calls to listTasks. */ + public PagedCallSettings + listTasksSettings() { + return ((DeliveryServiceStubSettings) getStubSettings()).listTasksSettings(); + } + + /** Returns the object with the settings used for calls to getTaskTrackingInfo. */ + public UnaryCallSettings + getTaskTrackingInfoSettings() { + return ((DeliveryServiceStubSettings) getStubSettings()).getTaskTrackingInfoSettings(); + } + + /** Returns the object with the settings used for calls to listDeliveryVehicles. */ + public PagedCallSettings< + ListDeliveryVehiclesRequest, + ListDeliveryVehiclesResponse, + ListDeliveryVehiclesPagedResponse> + listDeliveryVehiclesSettings() { + return ((DeliveryServiceStubSettings) getStubSettings()).listDeliveryVehiclesSettings(); + } + + public static final DeliveryServiceSettings create(DeliveryServiceStubSettings stub) + throws IOException { + return new DeliveryServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return DeliveryServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return DeliveryServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DeliveryServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return DeliveryServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return DeliveryServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return DeliveryServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return DeliveryServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DeliveryServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected DeliveryServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for DeliveryServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(DeliveryServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(DeliveryServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(DeliveryServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(DeliveryServiceStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(DeliveryServiceStubSettings.newHttpJsonBuilder()); + } + + public DeliveryServiceStubSettings.Builder getStubSettingsBuilder() { + return ((DeliveryServiceStubSettings.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 createDeliveryVehicle. */ + public UnaryCallSettings.Builder + createDeliveryVehicleSettings() { + return getStubSettingsBuilder().createDeliveryVehicleSettings(); + } + + /** Returns the builder for the settings used for calls to getDeliveryVehicle. */ + public UnaryCallSettings.Builder + getDeliveryVehicleSettings() { + return getStubSettingsBuilder().getDeliveryVehicleSettings(); + } + + /** Returns the builder for the settings used for calls to updateDeliveryVehicle. */ + public UnaryCallSettings.Builder + updateDeliveryVehicleSettings() { + return getStubSettingsBuilder().updateDeliveryVehicleSettings(); + } + + /** Returns the builder for the settings used for calls to batchCreateTasks. */ + public UnaryCallSettings.Builder + batchCreateTasksSettings() { + return getStubSettingsBuilder().batchCreateTasksSettings(); + } + + /** Returns the builder for the settings used for calls to createTask. */ + public UnaryCallSettings.Builder createTaskSettings() { + return getStubSettingsBuilder().createTaskSettings(); + } + + /** Returns the builder for the settings used for calls to getTask. */ + public UnaryCallSettings.Builder getTaskSettings() { + return getStubSettingsBuilder().getTaskSettings(); + } + + /** + * Returns the builder for the settings used for calls to searchTasks. + * + * @deprecated This method is deprecated and will be removed in the next major version update. + */ + @Deprecated + public PagedCallSettings.Builder< + SearchTasksRequest, SearchTasksResponse, SearchTasksPagedResponse> + searchTasksSettings() { + return getStubSettingsBuilder().searchTasksSettings(); + } + + /** Returns the builder for the settings used for calls to updateTask. */ + public UnaryCallSettings.Builder updateTaskSettings() { + return getStubSettingsBuilder().updateTaskSettings(); + } + + /** Returns the builder for the settings used for calls to listTasks. */ + public PagedCallSettings.Builder + listTasksSettings() { + return getStubSettingsBuilder().listTasksSettings(); + } + + /** Returns the builder for the settings used for calls to getTaskTrackingInfo. */ + public UnaryCallSettings.Builder + getTaskTrackingInfoSettings() { + return getStubSettingsBuilder().getTaskTrackingInfoSettings(); + } + + /** Returns the builder for the settings used for calls to listDeliveryVehicles. */ + public PagedCallSettings.Builder< + ListDeliveryVehiclesRequest, + ListDeliveryVehiclesResponse, + ListDeliveryVehiclesPagedResponse> + listDeliveryVehiclesSettings() { + return getStubSettingsBuilder().listDeliveryVehiclesSettings(); + } + + @Override + public DeliveryServiceSettings build() throws IOException { + return new DeliveryServiceSettings(this); + } + } +} diff --git a/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/main/java/com/google/maps/fleetengine/delivery/v1/gapic_metadata.json b/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/main/java/com/google/maps/fleetengine/delivery/v1/gapic_metadata.json new file mode 100644 index 000000000000..fc0a50cd1d3d --- /dev/null +++ b/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/main/java/com/google/maps/fleetengine/delivery/v1/gapic_metadata.json @@ -0,0 +1,51 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "maps.fleetengine.delivery.v1", + "libraryPackage": "google.maps.fleetengine.delivery.v1", + "services": { + "DeliveryService": { + "clients": { + "grpc": { + "libraryClient": "DeliveryServiceClient", + "rpcs": { + "BatchCreateTasks": { + "methods": ["batchCreateTasks", "batchCreateTasksCallable"] + }, + "CreateDeliveryVehicle": { + "methods": ["createDeliveryVehicle", "createDeliveryVehicle", "createDeliveryVehicleCallable"] + }, + "CreateTask": { + "methods": ["createTask", "createTask", "createTaskCallable"] + }, + "GetDeliveryVehicle": { + "methods": ["getDeliveryVehicle", "getDeliveryVehicle", "getDeliveryVehicle", "getDeliveryVehicleCallable"] + }, + "GetTask": { + "methods": ["getTask", "getTask", "getTask", "getTaskCallable"] + }, + "GetTaskTrackingInfo": { + "methods": ["getTaskTrackingInfo", "getTaskTrackingInfo", "getTaskTrackingInfo", "getTaskTrackingInfoCallable"] + }, + "ListDeliveryVehicles": { + "methods": ["listDeliveryVehicles", "listDeliveryVehicles", "listDeliveryVehicles", "listDeliveryVehiclesPagedCallable", "listDeliveryVehiclesCallable"] + }, + "ListTasks": { + "methods": ["listTasks", "listTasks", "listTasks", "listTasksPagedCallable", "listTasksCallable"] + }, + "SearchTasks": { + "methods": ["searchTasks", "searchTasks", "searchTasksPagedCallable", "searchTasksCallable"] + }, + "UpdateDeliveryVehicle": { + "methods": ["updateDeliveryVehicle", "updateDeliveryVehicle", "updateDeliveryVehicleCallable"] + }, + "UpdateTask": { + "methods": ["updateTask", "updateTask", "updateTaskCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/main/java/com/google/maps/fleetengine/delivery/v1/package-info.java b/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/main/java/com/google/maps/fleetengine/delivery/v1/package-info.java new file mode 100644 index 000000000000..d28cc12d2ba6 --- /dev/null +++ b/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/main/java/com/google/maps/fleetengine/delivery/v1/package-info.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 Last Mile Fleet Solution Delivery API + * + *

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

======================= DeliveryServiceClient ======================= + * + *

Service Description: The Last Mile Delivery service. + * + *

Sample for DeliveryServiceClient: + * + *

{@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 (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) {
+ *   String parent = "parent-995424086";
+ *   DeliveryVehicle deliveryVehicle = DeliveryVehicle.newBuilder().build();
+ *   String deliveryVehicleId = "deliveryVehicleId-861424685";
+ *   DeliveryVehicle response =
+ *       deliveryServiceClient.createDeliveryVehicle(parent, deliveryVehicle, deliveryVehicleId);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package google.maps.fleetengine.delivery.v1; + +import javax.annotation.Generated; diff --git a/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/main/java/com/google/maps/fleetengine/delivery/v1/stub/DeliveryServiceStub.java b/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/main/java/com/google/maps/fleetengine/delivery/v1/stub/DeliveryServiceStub.java new file mode 100644 index 000000000000..013f4028130b --- /dev/null +++ b/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/main/java/com/google/maps/fleetengine/delivery/v1/stub/DeliveryServiceStub.java @@ -0,0 +1,119 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.stub; + +import static google.maps.fleetengine.delivery.v1.DeliveryServiceClient.ListDeliveryVehiclesPagedResponse; +import static google.maps.fleetengine.delivery.v1.DeliveryServiceClient.ListTasksPagedResponse; +import static google.maps.fleetengine.delivery.v1.DeliveryServiceClient.SearchTasksPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest; +import google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse; +import google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest; +import google.maps.fleetengine.delivery.v1.CreateTaskRequest; +import google.maps.fleetengine.delivery.v1.DeliveryVehicle; +import google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest; +import google.maps.fleetengine.delivery.v1.GetTaskRequest; +import google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest; +import google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest; +import google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse; +import google.maps.fleetengine.delivery.v1.ListTasksRequest; +import google.maps.fleetengine.delivery.v1.ListTasksResponse; +import google.maps.fleetengine.delivery.v1.SearchTasksRequest; +import google.maps.fleetengine.delivery.v1.SearchTasksResponse; +import google.maps.fleetengine.delivery.v1.Task; +import google.maps.fleetengine.delivery.v1.TaskTrackingInfo; +import google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest; +import google.maps.fleetengine.delivery.v1.UpdateTaskRequest; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the DeliveryService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class DeliveryServiceStub implements BackgroundResource { + + public UnaryCallable + createDeliveryVehicleCallable() { + throw new UnsupportedOperationException("Not implemented: createDeliveryVehicleCallable()"); + } + + public UnaryCallable getDeliveryVehicleCallable() { + throw new UnsupportedOperationException("Not implemented: getDeliveryVehicleCallable()"); + } + + public UnaryCallable + updateDeliveryVehicleCallable() { + throw new UnsupportedOperationException("Not implemented: updateDeliveryVehicleCallable()"); + } + + public UnaryCallable + batchCreateTasksCallable() { + throw new UnsupportedOperationException("Not implemented: batchCreateTasksCallable()"); + } + + public UnaryCallable createTaskCallable() { + throw new UnsupportedOperationException("Not implemented: createTaskCallable()"); + } + + public UnaryCallable getTaskCallable() { + throw new UnsupportedOperationException("Not implemented: getTaskCallable()"); + } + + @Deprecated + public UnaryCallable searchTasksPagedCallable() { + throw new UnsupportedOperationException("Not implemented: searchTasksPagedCallable()"); + } + + @Deprecated + public UnaryCallable searchTasksCallable() { + throw new UnsupportedOperationException("Not implemented: searchTasksCallable()"); + } + + public UnaryCallable updateTaskCallable() { + throw new UnsupportedOperationException("Not implemented: updateTaskCallable()"); + } + + public UnaryCallable listTasksPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listTasksPagedCallable()"); + } + + public UnaryCallable listTasksCallable() { + throw new UnsupportedOperationException("Not implemented: listTasksCallable()"); + } + + public UnaryCallable getTaskTrackingInfoCallable() { + throw new UnsupportedOperationException("Not implemented: getTaskTrackingInfoCallable()"); + } + + public UnaryCallable + listDeliveryVehiclesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listDeliveryVehiclesPagedCallable()"); + } + + public UnaryCallable + listDeliveryVehiclesCallable() { + throw new UnsupportedOperationException("Not implemented: listDeliveryVehiclesCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/main/java/com/google/maps/fleetengine/delivery/v1/stub/DeliveryServiceStubSettings.java b/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/main/java/com/google/maps/fleetengine/delivery/v1/stub/DeliveryServiceStubSettings.java new file mode 100644 index 000000000000..ac598bd2c643 --- /dev/null +++ b/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/main/java/com/google/maps/fleetengine/delivery/v1/stub/DeliveryServiceStubSettings.java @@ -0,0 +1,803 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.stub; + +import static google.maps.fleetengine.delivery.v1.DeliveryServiceClient.ListDeliveryVehiclesPagedResponse; +import static google.maps.fleetengine.delivery.v1.DeliveryServiceClient.ListTasksPagedResponse; +import static google.maps.fleetengine.delivery.v1.DeliveryServiceClient.SearchTasksPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.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 google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest; +import google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse; +import google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest; +import google.maps.fleetengine.delivery.v1.CreateTaskRequest; +import google.maps.fleetengine.delivery.v1.DeliveryVehicle; +import google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest; +import google.maps.fleetengine.delivery.v1.GetTaskRequest; +import google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest; +import google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest; +import google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse; +import google.maps.fleetengine.delivery.v1.ListTasksRequest; +import google.maps.fleetengine.delivery.v1.ListTasksResponse; +import google.maps.fleetengine.delivery.v1.SearchTasksRequest; +import google.maps.fleetengine.delivery.v1.SearchTasksResponse; +import google.maps.fleetengine.delivery.v1.Task; +import google.maps.fleetengine.delivery.v1.TaskTrackingInfo; +import google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest; +import google.maps.fleetengine.delivery.v1.UpdateTaskRequest; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link DeliveryServiceStub}. + * + *

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 total timeout of createDeliveryVehicle to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DeliveryServiceStubSettings.Builder deliveryServiceSettingsBuilder =
+ *     DeliveryServiceStubSettings.newBuilder();
+ * deliveryServiceSettingsBuilder
+ *     .createDeliveryVehicleSettings()
+ *     .setRetrySettings(
+ *         deliveryServiceSettingsBuilder
+ *             .createDeliveryVehicleSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * DeliveryServiceStubSettings deliveryServiceSettings = deliveryServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class DeliveryServiceStubSettings 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 + createDeliveryVehicleSettings; + private final UnaryCallSettings + getDeliveryVehicleSettings; + private final UnaryCallSettings + updateDeliveryVehicleSettings; + private final UnaryCallSettings + batchCreateTasksSettings; + private final UnaryCallSettings createTaskSettings; + private final UnaryCallSettings getTaskSettings; + private final PagedCallSettings + searchTasksSettings; + private final UnaryCallSettings updateTaskSettings; + private final PagedCallSettings + listTasksSettings; + private final UnaryCallSettings + getTaskTrackingInfoSettings; + private final PagedCallSettings< + ListDeliveryVehiclesRequest, + ListDeliveryVehiclesResponse, + ListDeliveryVehiclesPagedResponse> + listDeliveryVehiclesSettings; + + private static final PagedListDescriptor + SEARCH_TASKS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public SearchTasksRequest injectToken(SearchTasksRequest payload, String token) { + return SearchTasksRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public SearchTasksRequest injectPageSize(SearchTasksRequest payload, int pageSize) { + return SearchTasksRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(SearchTasksRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(SearchTasksResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(SearchTasksResponse payload) { + return payload.getTasksList() == null + ? ImmutableList.of() + : payload.getTasksList(); + } + }; + + private static final PagedListDescriptor + LIST_TASKS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListTasksRequest injectToken(ListTasksRequest payload, String token) { + return ListTasksRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListTasksRequest injectPageSize(ListTasksRequest payload, int pageSize) { + return ListTasksRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListTasksRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListTasksResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListTasksResponse payload) { + return payload.getTasksList() == null + ? ImmutableList.of() + : payload.getTasksList(); + } + }; + + private static final PagedListDescriptor< + ListDeliveryVehiclesRequest, ListDeliveryVehiclesResponse, DeliveryVehicle> + LIST_DELIVERY_VEHICLES_PAGE_STR_DESC = + new PagedListDescriptor< + ListDeliveryVehiclesRequest, ListDeliveryVehiclesResponse, DeliveryVehicle>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListDeliveryVehiclesRequest injectToken( + ListDeliveryVehiclesRequest payload, String token) { + return ListDeliveryVehiclesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListDeliveryVehiclesRequest injectPageSize( + ListDeliveryVehiclesRequest payload, int pageSize) { + return ListDeliveryVehiclesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListDeliveryVehiclesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListDeliveryVehiclesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListDeliveryVehiclesResponse payload) { + return payload.getDeliveryVehiclesList() == null + ? ImmutableList.of() + : payload.getDeliveryVehiclesList(); + } + }; + + private static final PagedListResponseFactory< + SearchTasksRequest, SearchTasksResponse, SearchTasksPagedResponse> + SEARCH_TASKS_PAGE_STR_FACT = + new PagedListResponseFactory< + SearchTasksRequest, SearchTasksResponse, SearchTasksPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + SearchTasksRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, SEARCH_TASKS_PAGE_STR_DESC, request, context); + return SearchTasksPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListTasksRequest, ListTasksResponse, ListTasksPagedResponse> + LIST_TASKS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListTasksRequest, ListTasksResponse, ListTasksPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListTasksRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_TASKS_PAGE_STR_DESC, request, context); + return ListTasksPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListDeliveryVehiclesRequest, + ListDeliveryVehiclesResponse, + ListDeliveryVehiclesPagedResponse> + LIST_DELIVERY_VEHICLES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListDeliveryVehiclesRequest, + ListDeliveryVehiclesResponse, + ListDeliveryVehiclesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListDeliveryVehiclesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListDeliveryVehiclesRequest, ListDeliveryVehiclesResponse, DeliveryVehicle> + pageContext = + PageContext.create( + callable, LIST_DELIVERY_VEHICLES_PAGE_STR_DESC, request, context); + return ListDeliveryVehiclesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createDeliveryVehicle. */ + public UnaryCallSettings + createDeliveryVehicleSettings() { + return createDeliveryVehicleSettings; + } + + /** Returns the object with the settings used for calls to getDeliveryVehicle. */ + public UnaryCallSettings + getDeliveryVehicleSettings() { + return getDeliveryVehicleSettings; + } + + /** Returns the object with the settings used for calls to updateDeliveryVehicle. */ + public UnaryCallSettings + updateDeliveryVehicleSettings() { + return updateDeliveryVehicleSettings; + } + + /** Returns the object with the settings used for calls to batchCreateTasks. */ + public UnaryCallSettings + batchCreateTasksSettings() { + return batchCreateTasksSettings; + } + + /** Returns the object with the settings used for calls to createTask. */ + public UnaryCallSettings createTaskSettings() { + return createTaskSettings; + } + + /** Returns the object with the settings used for calls to getTask. */ + public UnaryCallSettings getTaskSettings() { + return getTaskSettings; + } + + /** + * Returns the object with the settings used for calls to searchTasks. + * + * @deprecated This method is deprecated and will be removed in the next major version update. + */ + @Deprecated + public PagedCallSettings + searchTasksSettings() { + return searchTasksSettings; + } + + /** Returns the object with the settings used for calls to updateTask. */ + public UnaryCallSettings updateTaskSettings() { + return updateTaskSettings; + } + + /** Returns the object with the settings used for calls to listTasks. */ + public PagedCallSettings + listTasksSettings() { + return listTasksSettings; + } + + /** Returns the object with the settings used for calls to getTaskTrackingInfo. */ + public UnaryCallSettings + getTaskTrackingInfoSettings() { + return getTaskTrackingInfoSettings; + } + + /** Returns the object with the settings used for calls to listDeliveryVehicles. */ + public PagedCallSettings< + ListDeliveryVehiclesRequest, + ListDeliveryVehiclesResponse, + ListDeliveryVehiclesPagedResponse> + listDeliveryVehiclesSettings() { + return listDeliveryVehiclesSettings; + } + + public DeliveryServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcDeliveryServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonDeliveryServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "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 gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(DeliveryServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(DeliveryServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DeliveryServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected DeliveryServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createDeliveryVehicleSettings = settingsBuilder.createDeliveryVehicleSettings().build(); + getDeliveryVehicleSettings = settingsBuilder.getDeliveryVehicleSettings().build(); + updateDeliveryVehicleSettings = settingsBuilder.updateDeliveryVehicleSettings().build(); + batchCreateTasksSettings = settingsBuilder.batchCreateTasksSettings().build(); + createTaskSettings = settingsBuilder.createTaskSettings().build(); + getTaskSettings = settingsBuilder.getTaskSettings().build(); + searchTasksSettings = settingsBuilder.searchTasksSettings().build(); + updateTaskSettings = settingsBuilder.updateTaskSettings().build(); + listTasksSettings = settingsBuilder.listTasksSettings().build(); + getTaskTrackingInfoSettings = settingsBuilder.getTaskTrackingInfoSettings().build(); + listDeliveryVehiclesSettings = settingsBuilder.listDeliveryVehiclesSettings().build(); + } + + /** Builder for DeliveryServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + createDeliveryVehicleSettings; + private final UnaryCallSettings.Builder + getDeliveryVehicleSettings; + private final UnaryCallSettings.Builder + updateDeliveryVehicleSettings; + private final UnaryCallSettings.Builder + batchCreateTasksSettings; + private final UnaryCallSettings.Builder createTaskSettings; + private final UnaryCallSettings.Builder getTaskSettings; + private final PagedCallSettings.Builder< + SearchTasksRequest, SearchTasksResponse, SearchTasksPagedResponse> + searchTasksSettings; + private final UnaryCallSettings.Builder updateTaskSettings; + private final PagedCallSettings.Builder< + ListTasksRequest, ListTasksResponse, ListTasksPagedResponse> + listTasksSettings; + private final UnaryCallSettings.Builder + getTaskTrackingInfoSettings; + private final PagedCallSettings.Builder< + ListDeliveryVehiclesRequest, + ListDeliveryVehiclesResponse, + ListDeliveryVehiclesPagedResponse> + listDeliveryVehiclesSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(10000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createDeliveryVehicleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getDeliveryVehicleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateDeliveryVehicleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + batchCreateTasksSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createTaskSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getTaskSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + searchTasksSettings = PagedCallSettings.newBuilder(SEARCH_TASKS_PAGE_STR_FACT); + updateTaskSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listTasksSettings = PagedCallSettings.newBuilder(LIST_TASKS_PAGE_STR_FACT); + getTaskTrackingInfoSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listDeliveryVehiclesSettings = + PagedCallSettings.newBuilder(LIST_DELIVERY_VEHICLES_PAGE_STR_FACT); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createDeliveryVehicleSettings, + getDeliveryVehicleSettings, + updateDeliveryVehicleSettings, + batchCreateTasksSettings, + createTaskSettings, + getTaskSettings, + searchTasksSettings, + updateTaskSettings, + listTasksSettings, + getTaskTrackingInfoSettings, + listDeliveryVehiclesSettings); + initDefaults(this); + } + + protected Builder(DeliveryServiceStubSettings settings) { + super(settings); + + createDeliveryVehicleSettings = settings.createDeliveryVehicleSettings.toBuilder(); + getDeliveryVehicleSettings = settings.getDeliveryVehicleSettings.toBuilder(); + updateDeliveryVehicleSettings = settings.updateDeliveryVehicleSettings.toBuilder(); + batchCreateTasksSettings = settings.batchCreateTasksSettings.toBuilder(); + createTaskSettings = settings.createTaskSettings.toBuilder(); + getTaskSettings = settings.getTaskSettings.toBuilder(); + searchTasksSettings = settings.searchTasksSettings.toBuilder(); + updateTaskSettings = settings.updateTaskSettings.toBuilder(); + listTasksSettings = settings.listTasksSettings.toBuilder(); + getTaskTrackingInfoSettings = settings.getTaskTrackingInfoSettings.toBuilder(); + listDeliveryVehiclesSettings = settings.listDeliveryVehiclesSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createDeliveryVehicleSettings, + getDeliveryVehicleSettings, + updateDeliveryVehicleSettings, + batchCreateTasksSettings, + createTaskSettings, + getTaskSettings, + searchTasksSettings, + updateTaskSettings, + listTasksSettings, + getTaskTrackingInfoSettings, + listDeliveryVehiclesSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createDeliveryVehicleSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getDeliveryVehicleSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateDeliveryVehicleSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .batchCreateTasksSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createTaskSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getTaskSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .searchTasksSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateTaskSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listTasksSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getTaskTrackingInfoSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listDeliveryVehiclesSettings() + .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 createDeliveryVehicle. */ + public UnaryCallSettings.Builder + createDeliveryVehicleSettings() { + return createDeliveryVehicleSettings; + } + + /** Returns the builder for the settings used for calls to getDeliveryVehicle. */ + public UnaryCallSettings.Builder + getDeliveryVehicleSettings() { + return getDeliveryVehicleSettings; + } + + /** Returns the builder for the settings used for calls to updateDeliveryVehicle. */ + public UnaryCallSettings.Builder + updateDeliveryVehicleSettings() { + return updateDeliveryVehicleSettings; + } + + /** Returns the builder for the settings used for calls to batchCreateTasks. */ + public UnaryCallSettings.Builder + batchCreateTasksSettings() { + return batchCreateTasksSettings; + } + + /** Returns the builder for the settings used for calls to createTask. */ + public UnaryCallSettings.Builder createTaskSettings() { + return createTaskSettings; + } + + /** Returns the builder for the settings used for calls to getTask. */ + public UnaryCallSettings.Builder getTaskSettings() { + return getTaskSettings; + } + + /** + * Returns the builder for the settings used for calls to searchTasks. + * + * @deprecated This method is deprecated and will be removed in the next major version update. + */ + @Deprecated + public PagedCallSettings.Builder< + SearchTasksRequest, SearchTasksResponse, SearchTasksPagedResponse> + searchTasksSettings() { + return searchTasksSettings; + } + + /** Returns the builder for the settings used for calls to updateTask. */ + public UnaryCallSettings.Builder updateTaskSettings() { + return updateTaskSettings; + } + + /** Returns the builder for the settings used for calls to listTasks. */ + public PagedCallSettings.Builder + listTasksSettings() { + return listTasksSettings; + } + + /** Returns the builder for the settings used for calls to getTaskTrackingInfo. */ + public UnaryCallSettings.Builder + getTaskTrackingInfoSettings() { + return getTaskTrackingInfoSettings; + } + + /** Returns the builder for the settings used for calls to listDeliveryVehicles. */ + public PagedCallSettings.Builder< + ListDeliveryVehiclesRequest, + ListDeliveryVehiclesResponse, + ListDeliveryVehiclesPagedResponse> + listDeliveryVehiclesSettings() { + return listDeliveryVehiclesSettings; + } + + @Override + public DeliveryServiceStubSettings build() throws IOException { + return new DeliveryServiceStubSettings(this); + } + } +} diff --git a/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/main/java/com/google/maps/fleetengine/delivery/v1/stub/GrpcDeliveryServiceCallableFactory.java b/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/main/java/com/google/maps/fleetengine/delivery/v1/stub/GrpcDeliveryServiceCallableFactory.java new file mode 100644 index 000000000000..69f0257583bc --- /dev/null +++ b/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/main/java/com/google/maps/fleetengine/delivery/v1/stub/GrpcDeliveryServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.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 DeliveryService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcDeliveryServiceCallableFactory 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-delivery/google-maps-fleetengine-delivery/src/main/java/com/google/maps/fleetengine/delivery/v1/stub/GrpcDeliveryServiceStub.java b/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/main/java/com/google/maps/fleetengine/delivery/v1/stub/GrpcDeliveryServiceStub.java new file mode 100644 index 000000000000..b1ce89822abd --- /dev/null +++ b/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/main/java/com/google/maps/fleetengine/delivery/v1/stub/GrpcDeliveryServiceStub.java @@ -0,0 +1,569 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.stub; + +import static google.maps.fleetengine.delivery.v1.DeliveryServiceClient.ListDeliveryVehiclesPagedResponse; +import static google.maps.fleetengine.delivery.v1.DeliveryServiceClient.ListTasksPagedResponse; +import static google.maps.fleetengine.delivery.v1.DeliveryServiceClient.SearchTasksPagedResponse; + +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 google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest; +import google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse; +import google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest; +import google.maps.fleetengine.delivery.v1.CreateTaskRequest; +import google.maps.fleetengine.delivery.v1.DeliveryVehicle; +import google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest; +import google.maps.fleetengine.delivery.v1.GetTaskRequest; +import google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest; +import google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest; +import google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse; +import google.maps.fleetengine.delivery.v1.ListTasksRequest; +import google.maps.fleetengine.delivery.v1.ListTasksResponse; +import google.maps.fleetengine.delivery.v1.SearchTasksRequest; +import google.maps.fleetengine.delivery.v1.SearchTasksResponse; +import google.maps.fleetengine.delivery.v1.Task; +import google.maps.fleetengine.delivery.v1.TaskTrackingInfo; +import google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest; +import google.maps.fleetengine.delivery.v1.UpdateTaskRequest; +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 DeliveryService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcDeliveryServiceStub extends DeliveryServiceStub { + private static final MethodDescriptor + createDeliveryVehicleMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "maps.fleetengine.delivery.v1.DeliveryService/CreateDeliveryVehicle") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateDeliveryVehicleRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(DeliveryVehicle.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getDeliveryVehicleMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("maps.fleetengine.delivery.v1.DeliveryService/GetDeliveryVehicle") + .setRequestMarshaller( + ProtoUtils.marshaller(GetDeliveryVehicleRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(DeliveryVehicle.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateDeliveryVehicleMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "maps.fleetengine.delivery.v1.DeliveryService/UpdateDeliveryVehicle") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateDeliveryVehicleRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(DeliveryVehicle.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + batchCreateTasksMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("maps.fleetengine.delivery.v1.DeliveryService/BatchCreateTasks") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchCreateTasksRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(BatchCreateTasksResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor createTaskMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("maps.fleetengine.delivery.v1.DeliveryService/CreateTask") + .setRequestMarshaller(ProtoUtils.marshaller(CreateTaskRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Task.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getTaskMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("maps.fleetengine.delivery.v1.DeliveryService/GetTask") + .setRequestMarshaller(ProtoUtils.marshaller(GetTaskRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Task.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + searchTasksMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("maps.fleetengine.delivery.v1.DeliveryService/SearchTasks") + .setRequestMarshaller(ProtoUtils.marshaller(SearchTasksRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(SearchTasksResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor updateTaskMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("maps.fleetengine.delivery.v1.DeliveryService/UpdateTask") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateTaskRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Task.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listTasksMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("maps.fleetengine.delivery.v1.DeliveryService/ListTasks") + .setRequestMarshaller(ProtoUtils.marshaller(ListTasksRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListTasksResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getTaskTrackingInfoMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("maps.fleetengine.delivery.v1.DeliveryService/GetTaskTrackingInfo") + .setRequestMarshaller( + ProtoUtils.marshaller(GetTaskTrackingInfoRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(TaskTrackingInfo.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listDeliveryVehiclesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "maps.fleetengine.delivery.v1.DeliveryService/ListDeliveryVehicles") + .setRequestMarshaller( + ProtoUtils.marshaller(ListDeliveryVehiclesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListDeliveryVehiclesResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable + createDeliveryVehicleCallable; + private final UnaryCallable + getDeliveryVehicleCallable; + private final UnaryCallable + updateDeliveryVehicleCallable; + private final UnaryCallable + batchCreateTasksCallable; + private final UnaryCallable createTaskCallable; + private final UnaryCallable getTaskCallable; + private final UnaryCallable searchTasksCallable; + private final UnaryCallable + searchTasksPagedCallable; + private final UnaryCallable updateTaskCallable; + private final UnaryCallable listTasksCallable; + private final UnaryCallable listTasksPagedCallable; + private final UnaryCallable + getTaskTrackingInfoCallable; + private final UnaryCallable + listDeliveryVehiclesCallable; + private final UnaryCallable + listDeliveryVehiclesPagedCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + private static final PathTemplate CREATE_DELIVERY_VEHICLE_0_PATH_TEMPLATE = + PathTemplate.create("{provider_id=providers/*}"); + private static final PathTemplate GET_DELIVERY_VEHICLE_0_PATH_TEMPLATE = + PathTemplate.create("{provider_id=providers/*}"); + private static final PathTemplate UPDATE_DELIVERY_VEHICLE_0_PATH_TEMPLATE = + PathTemplate.create("{provider_id=providers/*}"); + private static final PathTemplate BATCH_CREATE_TASKS_0_PATH_TEMPLATE = + PathTemplate.create("{provider_id=providers/*}"); + private static final PathTemplate CREATE_TASK_0_PATH_TEMPLATE = + PathTemplate.create("{provider_id=providers/*}"); + private static final PathTemplate GET_TASK_0_PATH_TEMPLATE = + PathTemplate.create("{provider_id=providers/*}"); + private static final PathTemplate SEARCH_TASKS_0_PATH_TEMPLATE = + PathTemplate.create("{provider_id=providers/*}"); + private static final PathTemplate UPDATE_TASK_0_PATH_TEMPLATE = + PathTemplate.create("{provider_id=providers/*}"); + private static final PathTemplate LIST_TASKS_0_PATH_TEMPLATE = + PathTemplate.create("{provider_id=providers/*}"); + private static final PathTemplate GET_TASK_TRACKING_INFO_0_PATH_TEMPLATE = + PathTemplate.create("{provider_id=providers/*}"); + private static final PathTemplate LIST_DELIVERY_VEHICLES_0_PATH_TEMPLATE = + PathTemplate.create("{provider_id=providers/*}"); + + public static final GrpcDeliveryServiceStub create(DeliveryServiceStubSettings settings) + throws IOException { + return new GrpcDeliveryServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcDeliveryServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcDeliveryServiceStub( + DeliveryServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcDeliveryServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcDeliveryServiceStub( + DeliveryServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcDeliveryServiceStub, 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 GrpcDeliveryServiceStub( + DeliveryServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcDeliveryServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcDeliveryServiceStub, 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 GrpcDeliveryServiceStub( + DeliveryServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + createDeliveryVehicleTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createDeliveryVehicleMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + request.getParent(), + "provider_id", + CREATE_DELIVERY_VEHICLE_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + GrpcCallSettings + getDeliveryVehicleTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getDeliveryVehicleMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + request.getName(), "provider_id", GET_DELIVERY_VEHICLE_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + GrpcCallSettings + updateDeliveryVehicleTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateDeliveryVehicleMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + if (request.getDeliveryVehicle() != null) { + builder.add( + request.getDeliveryVehicle().getName(), + "provider_id", + UPDATE_DELIVERY_VEHICLE_0_PATH_TEMPLATE); + } + return builder.build(); + }) + .build(); + GrpcCallSettings + batchCreateTasksTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(batchCreateTasksMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + request.getParent(), "provider_id", BATCH_CREATE_TASKS_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + GrpcCallSettings createTaskTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createTaskMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getParent(), "provider_id", CREATE_TASK_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + GrpcCallSettings getTaskTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getTaskMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getName(), "provider_id", GET_TASK_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + GrpcCallSettings searchTasksTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(searchTasksMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getParent(), "provider_id", SEARCH_TASKS_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + GrpcCallSettings updateTaskTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateTaskMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + if (request.getTask() != null) { + builder.add( + request.getTask().getName(), "provider_id", UPDATE_TASK_0_PATH_TEMPLATE); + } + return builder.build(); + }) + .build(); + GrpcCallSettings listTasksTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listTasksMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getParent(), "provider_id", LIST_TASKS_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + GrpcCallSettings + getTaskTrackingInfoTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getTaskTrackingInfoMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + request.getName(), "provider_id", GET_TASK_TRACKING_INFO_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + GrpcCallSettings + listDeliveryVehiclesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listDeliveryVehiclesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + request.getParent(), + "provider_id", + LIST_DELIVERY_VEHICLES_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + + this.createDeliveryVehicleCallable = + callableFactory.createUnaryCallable( + createDeliveryVehicleTransportSettings, + settings.createDeliveryVehicleSettings(), + clientContext); + this.getDeliveryVehicleCallable = + callableFactory.createUnaryCallable( + getDeliveryVehicleTransportSettings, + settings.getDeliveryVehicleSettings(), + clientContext); + this.updateDeliveryVehicleCallable = + callableFactory.createUnaryCallable( + updateDeliveryVehicleTransportSettings, + settings.updateDeliveryVehicleSettings(), + clientContext); + this.batchCreateTasksCallable = + callableFactory.createUnaryCallable( + batchCreateTasksTransportSettings, settings.batchCreateTasksSettings(), clientContext); + this.createTaskCallable = + callableFactory.createUnaryCallable( + createTaskTransportSettings, settings.createTaskSettings(), clientContext); + this.getTaskCallable = + callableFactory.createUnaryCallable( + getTaskTransportSettings, settings.getTaskSettings(), clientContext); + this.searchTasksCallable = + callableFactory.createUnaryCallable( + searchTasksTransportSettings, settings.searchTasksSettings(), clientContext); + this.searchTasksPagedCallable = + callableFactory.createPagedCallable( + searchTasksTransportSettings, settings.searchTasksSettings(), clientContext); + this.updateTaskCallable = + callableFactory.createUnaryCallable( + updateTaskTransportSettings, settings.updateTaskSettings(), clientContext); + this.listTasksCallable = + callableFactory.createUnaryCallable( + listTasksTransportSettings, settings.listTasksSettings(), clientContext); + this.listTasksPagedCallable = + callableFactory.createPagedCallable( + listTasksTransportSettings, settings.listTasksSettings(), clientContext); + this.getTaskTrackingInfoCallable = + callableFactory.createUnaryCallable( + getTaskTrackingInfoTransportSettings, + settings.getTaskTrackingInfoSettings(), + clientContext); + this.listDeliveryVehiclesCallable = + callableFactory.createUnaryCallable( + listDeliveryVehiclesTransportSettings, + settings.listDeliveryVehiclesSettings(), + clientContext); + this.listDeliveryVehiclesPagedCallable = + callableFactory.createPagedCallable( + listDeliveryVehiclesTransportSettings, + settings.listDeliveryVehiclesSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + createDeliveryVehicleCallable() { + return createDeliveryVehicleCallable; + } + + @Override + public UnaryCallable getDeliveryVehicleCallable() { + return getDeliveryVehicleCallable; + } + + @Override + public UnaryCallable + updateDeliveryVehicleCallable() { + return updateDeliveryVehicleCallable; + } + + @Override + public UnaryCallable + batchCreateTasksCallable() { + return batchCreateTasksCallable; + } + + @Override + public UnaryCallable createTaskCallable() { + return createTaskCallable; + } + + @Override + public UnaryCallable getTaskCallable() { + return getTaskCallable; + } + + @Override + public UnaryCallable searchTasksCallable() { + return searchTasksCallable; + } + + @Override + public UnaryCallable searchTasksPagedCallable() { + return searchTasksPagedCallable; + } + + @Override + public UnaryCallable updateTaskCallable() { + return updateTaskCallable; + } + + @Override + public UnaryCallable listTasksCallable() { + return listTasksCallable; + } + + @Override + public UnaryCallable listTasksPagedCallable() { + return listTasksPagedCallable; + } + + @Override + public UnaryCallable getTaskTrackingInfoCallable() { + return getTaskTrackingInfoCallable; + } + + @Override + public UnaryCallable + listDeliveryVehiclesCallable() { + return listDeliveryVehiclesCallable; + } + + @Override + public UnaryCallable + listDeliveryVehiclesPagedCallable() { + return listDeliveryVehiclesPagedCallable; + } + + @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-delivery/google-maps-fleetengine-delivery/src/main/java/com/google/maps/fleetengine/delivery/v1/stub/HttpJsonDeliveryServiceCallableFactory.java b/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/main/java/com/google/maps/fleetengine/delivery/v1/stub/HttpJsonDeliveryServiceCallableFactory.java new file mode 100644 index 000000000000..bfbca62a5e62 --- /dev/null +++ b/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/main/java/com/google/maps/fleetengine/delivery/v1/stub/HttpJsonDeliveryServiceCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the DeliveryService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonDeliveryServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/main/java/com/google/maps/fleetengine/delivery/v1/stub/HttpJsonDeliveryServiceStub.java b/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/main/java/com/google/maps/fleetengine/delivery/v1/stub/HttpJsonDeliveryServiceStub.java new file mode 100644 index 000000000000..f12f6c49c7d0 --- /dev/null +++ b/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/main/java/com/google/maps/fleetengine/delivery/v1/stub/HttpJsonDeliveryServiceStub.java @@ -0,0 +1,912 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.stub; + +import static google.maps.fleetengine.delivery.v1.DeliveryServiceClient.ListDeliveryVehiclesPagedResponse; +import static google.maps.fleetengine.delivery.v1.DeliveryServiceClient.ListTasksPagedResponse; +import static google.maps.fleetengine.delivery.v1.DeliveryServiceClient.SearchTasksPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.api.pathtemplate.PathTemplate; +import com.google.protobuf.TypeRegistry; +import google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest; +import google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse; +import google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest; +import google.maps.fleetengine.delivery.v1.CreateTaskRequest; +import google.maps.fleetengine.delivery.v1.DeliveryVehicle; +import google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest; +import google.maps.fleetengine.delivery.v1.GetTaskRequest; +import google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest; +import google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest; +import google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse; +import google.maps.fleetengine.delivery.v1.ListTasksRequest; +import google.maps.fleetengine.delivery.v1.ListTasksResponse; +import google.maps.fleetengine.delivery.v1.SearchTasksRequest; +import google.maps.fleetengine.delivery.v1.SearchTasksResponse; +import google.maps.fleetengine.delivery.v1.Task; +import google.maps.fleetengine.delivery.v1.TaskTrackingInfo; +import google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest; +import google.maps.fleetengine.delivery.v1.UpdateTaskRequest; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the DeliveryService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonDeliveryServiceStub extends DeliveryServiceStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor + createDeliveryVehicleMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "maps.fleetengine.delivery.v1.DeliveryService/CreateDeliveryVehicle") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=providers/*}/deliveryVehicles", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "deliveryVehicleId", request.getDeliveryVehicleId()); + serializer.putQueryParam(fields, "header", request.getHeader()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("deliveryVehicle", request.getDeliveryVehicle(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DeliveryVehicle.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getDeliveryVehicleMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("maps.fleetengine.delivery.v1.DeliveryService/GetDeliveryVehicle") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=providers/*/deliveryVehicles/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "header", request.getHeader()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DeliveryVehicle.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateDeliveryVehicleMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "maps.fleetengine.delivery.v1.DeliveryService/UpdateDeliveryVehicle") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{deliveryVehicle.name=providers/*/deliveryVehicles/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, + "deliveryVehicle.name", + request.getDeliveryVehicle().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "header", request.getHeader()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("deliveryVehicle", request.getDeliveryVehicle(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DeliveryVehicle.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + batchCreateTasksMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("maps.fleetengine.delivery.v1.DeliveryService/BatchCreateTasks") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=providers/*}/tasks:batchCreate", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(BatchCreateTasksResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor createTaskMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("maps.fleetengine.delivery.v1.DeliveryService/CreateTask") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=providers/*}/tasks", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "header", request.getHeader()); + serializer.putQueryParam(fields, "taskId", request.getTaskId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create().toBody("task", request.getTask(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Task.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getTaskMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("maps.fleetengine.delivery.v1.DeliveryService/GetTask") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=providers/*/tasks/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "header", request.getHeader()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Task.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + searchTasksMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("maps.fleetengine.delivery.v1.DeliveryService/SearchTasks") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=providers/*}/tasks:search", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "header", request.getHeader()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "trackingId", request.getTrackingId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SearchTasksResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor updateTaskMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("maps.fleetengine.delivery.v1.DeliveryService/UpdateTask") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{task.name=providers/*/tasks/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "task.name", request.getTask().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "header", request.getHeader()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create().toBody("task", request.getTask(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Task.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listTasksMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("maps.fleetengine.delivery.v1.DeliveryService/ListTasks") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=providers/*}/tasks", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "header", request.getHeader()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListTasksResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getTaskTrackingInfoMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("maps.fleetengine.delivery.v1.DeliveryService/GetTaskTrackingInfo") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=providers/*/taskTrackingInfo/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "header", request.getHeader()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(TaskTrackingInfo.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListDeliveryVehiclesRequest, ListDeliveryVehiclesResponse> + listDeliveryVehiclesMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "maps.fleetengine.delivery.v1.DeliveryService/ListDeliveryVehicles") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=providers/*}/deliveryVehicles", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "header", request.getHeader()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "viewport", request.getViewport()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListDeliveryVehiclesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable + createDeliveryVehicleCallable; + private final UnaryCallable + getDeliveryVehicleCallable; + private final UnaryCallable + updateDeliveryVehicleCallable; + private final UnaryCallable + batchCreateTasksCallable; + private final UnaryCallable createTaskCallable; + private final UnaryCallable getTaskCallable; + private final UnaryCallable searchTasksCallable; + private final UnaryCallable + searchTasksPagedCallable; + private final UnaryCallable updateTaskCallable; + private final UnaryCallable listTasksCallable; + private final UnaryCallable listTasksPagedCallable; + private final UnaryCallable + getTaskTrackingInfoCallable; + private final UnaryCallable + listDeliveryVehiclesCallable; + private final UnaryCallable + listDeliveryVehiclesPagedCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + private static final PathTemplate CREATE_DELIVERY_VEHICLE_0_PATH_TEMPLATE = + PathTemplate.create("{provider_id=providers/*}"); + private static final PathTemplate GET_DELIVERY_VEHICLE_0_PATH_TEMPLATE = + PathTemplate.create("{provider_id=providers/*}"); + private static final PathTemplate UPDATE_DELIVERY_VEHICLE_0_PATH_TEMPLATE = + PathTemplate.create("{provider_id=providers/*}"); + private static final PathTemplate BATCH_CREATE_TASKS_0_PATH_TEMPLATE = + PathTemplate.create("{provider_id=providers/*}"); + private static final PathTemplate CREATE_TASK_0_PATH_TEMPLATE = + PathTemplate.create("{provider_id=providers/*}"); + private static final PathTemplate GET_TASK_0_PATH_TEMPLATE = + PathTemplate.create("{provider_id=providers/*}"); + private static final PathTemplate SEARCH_TASKS_0_PATH_TEMPLATE = + PathTemplate.create("{provider_id=providers/*}"); + private static final PathTemplate UPDATE_TASK_0_PATH_TEMPLATE = + PathTemplate.create("{provider_id=providers/*}"); + private static final PathTemplate LIST_TASKS_0_PATH_TEMPLATE = + PathTemplate.create("{provider_id=providers/*}"); + private static final PathTemplate GET_TASK_TRACKING_INFO_0_PATH_TEMPLATE = + PathTemplate.create("{provider_id=providers/*}"); + private static final PathTemplate LIST_DELIVERY_VEHICLES_0_PATH_TEMPLATE = + PathTemplate.create("{provider_id=providers/*}"); + + public static final HttpJsonDeliveryServiceStub create(DeliveryServiceStubSettings settings) + throws IOException { + return new HttpJsonDeliveryServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonDeliveryServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonDeliveryServiceStub( + DeliveryServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonDeliveryServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonDeliveryServiceStub( + DeliveryServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonDeliveryServiceStub, 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 HttpJsonDeliveryServiceStub( + DeliveryServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonDeliveryServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonDeliveryServiceStub, 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 HttpJsonDeliveryServiceStub( + DeliveryServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings + createDeliveryVehicleTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createDeliveryVehicleMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + request.getParent(), + "provider_id", + CREATE_DELIVERY_VEHICLE_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + getDeliveryVehicleTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getDeliveryVehicleMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + request.getName(), "provider_id", GET_DELIVERY_VEHICLE_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + updateDeliveryVehicleTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateDeliveryVehicleMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + if (request.getDeliveryVehicle() != null) { + builder.add( + request.getDeliveryVehicle().getName(), + "provider_id", + UPDATE_DELIVERY_VEHICLE_0_PATH_TEMPLATE); + } + return builder.build(); + }) + .build(); + HttpJsonCallSettings + batchCreateTasksTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(batchCreateTasksMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + request.getParent(), "provider_id", BATCH_CREATE_TASKS_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createTaskTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createTaskMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getParent(), "provider_id", CREATE_TASK_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getTaskTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getTaskMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getName(), "provider_id", GET_TASK_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + HttpJsonCallSettings searchTasksTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(searchTasksMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getParent(), "provider_id", SEARCH_TASKS_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateTaskTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateTaskMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + if (request.getTask() != null) { + builder.add( + request.getTask().getName(), "provider_id", UPDATE_TASK_0_PATH_TEMPLATE); + } + return builder.build(); + }) + .build(); + HttpJsonCallSettings listTasksTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listTasksMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getParent(), "provider_id", LIST_TASKS_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + getTaskTrackingInfoTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getTaskTrackingInfoMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + request.getName(), "provider_id", GET_TASK_TRACKING_INFO_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listDeliveryVehiclesTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listDeliveryVehiclesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + request.getParent(), + "provider_id", + LIST_DELIVERY_VEHICLES_0_PATH_TEMPLATE); + return builder.build(); + }) + .build(); + + this.createDeliveryVehicleCallable = + callableFactory.createUnaryCallable( + createDeliveryVehicleTransportSettings, + settings.createDeliveryVehicleSettings(), + clientContext); + this.getDeliveryVehicleCallable = + callableFactory.createUnaryCallable( + getDeliveryVehicleTransportSettings, + settings.getDeliveryVehicleSettings(), + clientContext); + this.updateDeliveryVehicleCallable = + callableFactory.createUnaryCallable( + updateDeliveryVehicleTransportSettings, + settings.updateDeliveryVehicleSettings(), + clientContext); + this.batchCreateTasksCallable = + callableFactory.createUnaryCallable( + batchCreateTasksTransportSettings, settings.batchCreateTasksSettings(), clientContext); + this.createTaskCallable = + callableFactory.createUnaryCallable( + createTaskTransportSettings, settings.createTaskSettings(), clientContext); + this.getTaskCallable = + callableFactory.createUnaryCallable( + getTaskTransportSettings, settings.getTaskSettings(), clientContext); + this.searchTasksCallable = + callableFactory.createUnaryCallable( + searchTasksTransportSettings, settings.searchTasksSettings(), clientContext); + this.searchTasksPagedCallable = + callableFactory.createPagedCallable( + searchTasksTransportSettings, settings.searchTasksSettings(), clientContext); + this.updateTaskCallable = + callableFactory.createUnaryCallable( + updateTaskTransportSettings, settings.updateTaskSettings(), clientContext); + this.listTasksCallable = + callableFactory.createUnaryCallable( + listTasksTransportSettings, settings.listTasksSettings(), clientContext); + this.listTasksPagedCallable = + callableFactory.createPagedCallable( + listTasksTransportSettings, settings.listTasksSettings(), clientContext); + this.getTaskTrackingInfoCallable = + callableFactory.createUnaryCallable( + getTaskTrackingInfoTransportSettings, + settings.getTaskTrackingInfoSettings(), + clientContext); + this.listDeliveryVehiclesCallable = + callableFactory.createUnaryCallable( + listDeliveryVehiclesTransportSettings, + settings.listDeliveryVehiclesSettings(), + clientContext); + this.listDeliveryVehiclesPagedCallable = + callableFactory.createPagedCallable( + listDeliveryVehiclesTransportSettings, + settings.listDeliveryVehiclesSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(createDeliveryVehicleMethodDescriptor); + methodDescriptors.add(getDeliveryVehicleMethodDescriptor); + methodDescriptors.add(updateDeliveryVehicleMethodDescriptor); + methodDescriptors.add(batchCreateTasksMethodDescriptor); + methodDescriptors.add(createTaskMethodDescriptor); + methodDescriptors.add(getTaskMethodDescriptor); + methodDescriptors.add(searchTasksMethodDescriptor); + methodDescriptors.add(updateTaskMethodDescriptor); + methodDescriptors.add(listTasksMethodDescriptor); + methodDescriptors.add(getTaskTrackingInfoMethodDescriptor); + methodDescriptors.add(listDeliveryVehiclesMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable + createDeliveryVehicleCallable() { + return createDeliveryVehicleCallable; + } + + @Override + public UnaryCallable getDeliveryVehicleCallable() { + return getDeliveryVehicleCallable; + } + + @Override + public UnaryCallable + updateDeliveryVehicleCallable() { + return updateDeliveryVehicleCallable; + } + + @Override + public UnaryCallable + batchCreateTasksCallable() { + return batchCreateTasksCallable; + } + + @Override + public UnaryCallable createTaskCallable() { + return createTaskCallable; + } + + @Override + public UnaryCallable getTaskCallable() { + return getTaskCallable; + } + + @Override + public UnaryCallable searchTasksCallable() { + return searchTasksCallable; + } + + @Override + public UnaryCallable searchTasksPagedCallable() { + return searchTasksPagedCallable; + } + + @Override + public UnaryCallable updateTaskCallable() { + return updateTaskCallable; + } + + @Override + public UnaryCallable listTasksCallable() { + return listTasksCallable; + } + + @Override + public UnaryCallable listTasksPagedCallable() { + return listTasksPagedCallable; + } + + @Override + public UnaryCallable getTaskTrackingInfoCallable() { + return getTaskTrackingInfoCallable; + } + + @Override + public UnaryCallable + listDeliveryVehiclesCallable() { + return listDeliveryVehiclesCallable; + } + + @Override + public UnaryCallable + listDeliveryVehiclesPagedCallable() { + return listDeliveryVehiclesPagedCallable; + } + + @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-delivery/google-maps-fleetengine-delivery/src/main/resources/META-INF/native-image/google.maps.fleetengine.delivery.v1/reflect-config.json b/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/main/resources/META-INF/native-image/google.maps.fleetengine.delivery.v1/reflect-config.json new file mode 100644 index 000000000000..bd484c6fcb54 --- /dev/null +++ b/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/main/resources/META-INF/native-image/google.maps.fleetengine.delivery.v1/reflect-config.json @@ -0,0 +1,1892 @@ +[ + { + "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.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.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.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$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$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$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.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 + }, + { + "name": "google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.CreateTaskRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.CreateTaskRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.DeliveryRequestHeader", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.DeliveryRequestHeader$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.DeliveryRequestHeader$Platform", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.DeliveryRequestHeader$SdkType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.DeliveryVehicle", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.DeliveryVehicle$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.DeliveryVehicle$DeliveryVehicleType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.GetTaskRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.GetTaskRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.ListTasksRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.ListTasksRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.ListTasksResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.ListTasksResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.LocationInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.LocationInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.SearchTasksRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.SearchTasksRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.SearchTasksResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.SearchTasksResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.Task", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.Task$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.Task$JourneySharingInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.Task$JourneySharingInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.Task$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.Task$TaskOutcome", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.Task$TaskOutcomeLocationSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.Task$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.TaskAttribute", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.TaskAttribute$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.TaskTrackingInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.TaskTrackingInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig$VisibilityOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig$VisibilityOption$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.TimeWindow", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.TimeWindow$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.UpdateTaskRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.UpdateTaskRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.VehicleJourneySegment", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.VehicleJourneySegment$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.VehicleStop", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.VehicleStop$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.VehicleStop$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.VehicleStop$TaskInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "google.maps.fleetengine.delivery.v1.VehicleStop$TaskInfo$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-delivery/google-maps-fleetengine-delivery/src/test/java/com/google/maps/fleetengine/delivery/v1/DeliveryServiceClientHttpJsonTest.java b/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/test/java/com/google/maps/fleetengine/delivery/v1/DeliveryServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..668e0fbb1e1e --- /dev/null +++ b/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/test/java/com/google/maps/fleetengine/delivery/v1/DeliveryServiceClientHttpJsonTest.java @@ -0,0 +1,983 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1; + +import static google.maps.fleetengine.delivery.v1.DeliveryServiceClient.ListDeliveryVehiclesPagedResponse; +import static google.maps.fleetengine.delivery.v1.DeliveryServiceClient.ListTasksPagedResponse; +import static google.maps.fleetengine.delivery.v1.DeliveryServiceClient.SearchTasksPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.common.collect.Lists; +import com.google.protobuf.ByteString; +import com.google.protobuf.Duration; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Int32Value; +import com.google.protobuf.Timestamp; +import com.google.type.LatLng; +import google.maps.fleetengine.delivery.v1.stub.HttpJsonDeliveryServiceStub; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class DeliveryServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static DeliveryServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonDeliveryServiceStub.getMethodDescriptors(), + DeliveryServiceSettings.getDefaultEndpoint()); + DeliveryServiceSettings settings = + DeliveryServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + DeliveryServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DeliveryServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void createDeliveryVehicleTest() throws Exception { + DeliveryVehicle expectedResponse = + DeliveryVehicle.newBuilder() + .setName(DeliveryVehicleName.of("[PROVIDER]", "[VEHICLE]").toString()) + .setLastLocation(DeliveryVehicleLocation.newBuilder().build()) + .setNavigationStatus(DeliveryVehicleNavigationStatus.forNumber(0)) + .setCurrentRouteSegment(ByteString.EMPTY) + .setCurrentRouteSegmentEndPoint(LatLng.newBuilder().build()) + .setRemainingDistanceMeters(Int32Value.newBuilder().build()) + .setRemainingDuration(Duration.newBuilder().build()) + .addAllRemainingVehicleJourneySegments(new ArrayList()) + .addAllAttributes(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "providers/provider-9779"; + DeliveryVehicle deliveryVehicle = DeliveryVehicle.newBuilder().build(); + String deliveryVehicleId = "deliveryVehicleId-861424685"; + + DeliveryVehicle actualResponse = + client.createDeliveryVehicle(parent, deliveryVehicle, deliveryVehicleId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createDeliveryVehicleExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "providers/provider-9779"; + DeliveryVehicle deliveryVehicle = DeliveryVehicle.newBuilder().build(); + String deliveryVehicleId = "deliveryVehicleId-861424685"; + client.createDeliveryVehicle(parent, deliveryVehicle, deliveryVehicleId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDeliveryVehicleTest() throws Exception { + DeliveryVehicle expectedResponse = + DeliveryVehicle.newBuilder() + .setName(DeliveryVehicleName.of("[PROVIDER]", "[VEHICLE]").toString()) + .setLastLocation(DeliveryVehicleLocation.newBuilder().build()) + .setNavigationStatus(DeliveryVehicleNavigationStatus.forNumber(0)) + .setCurrentRouteSegment(ByteString.EMPTY) + .setCurrentRouteSegmentEndPoint(LatLng.newBuilder().build()) + .setRemainingDistanceMeters(Int32Value.newBuilder().build()) + .setRemainingDuration(Duration.newBuilder().build()) + .addAllRemainingVehicleJourneySegments(new ArrayList()) + .addAllAttributes(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + DeliveryVehicleName name = DeliveryVehicleName.of("[PROVIDER]", "[VEHICLE]"); + + DeliveryVehicle actualResponse = client.getDeliveryVehicle(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getDeliveryVehicleExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DeliveryVehicleName name = DeliveryVehicleName.of("[PROVIDER]", "[VEHICLE]"); + client.getDeliveryVehicle(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDeliveryVehicleTest2() throws Exception { + DeliveryVehicle expectedResponse = + DeliveryVehicle.newBuilder() + .setName(DeliveryVehicleName.of("[PROVIDER]", "[VEHICLE]").toString()) + .setLastLocation(DeliveryVehicleLocation.newBuilder().build()) + .setNavigationStatus(DeliveryVehicleNavigationStatus.forNumber(0)) + .setCurrentRouteSegment(ByteString.EMPTY) + .setCurrentRouteSegmentEndPoint(LatLng.newBuilder().build()) + .setRemainingDistanceMeters(Int32Value.newBuilder().build()) + .setRemainingDuration(Duration.newBuilder().build()) + .addAllRemainingVehicleJourneySegments(new ArrayList()) + .addAllAttributes(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "providers/provider-8797/deliveryVehicles/deliveryVehicle-8797"; + + DeliveryVehicle actualResponse = client.getDeliveryVehicle(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getDeliveryVehicleExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "providers/provider-8797/deliveryVehicles/deliveryVehicle-8797"; + client.getDeliveryVehicle(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateDeliveryVehicleTest() throws Exception { + DeliveryVehicle expectedResponse = + DeliveryVehicle.newBuilder() + .setName(DeliveryVehicleName.of("[PROVIDER]", "[VEHICLE]").toString()) + .setLastLocation(DeliveryVehicleLocation.newBuilder().build()) + .setNavigationStatus(DeliveryVehicleNavigationStatus.forNumber(0)) + .setCurrentRouteSegment(ByteString.EMPTY) + .setCurrentRouteSegmentEndPoint(LatLng.newBuilder().build()) + .setRemainingDistanceMeters(Int32Value.newBuilder().build()) + .setRemainingDuration(Duration.newBuilder().build()) + .addAllRemainingVehicleJourneySegments(new ArrayList()) + .addAllAttributes(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + DeliveryVehicle deliveryVehicle = + DeliveryVehicle.newBuilder() + .setName(DeliveryVehicleName.of("[PROVIDER]", "[VEHICLE]").toString()) + .setLastLocation(DeliveryVehicleLocation.newBuilder().build()) + .setNavigationStatus(DeliveryVehicleNavigationStatus.forNumber(0)) + .setCurrentRouteSegment(ByteString.EMPTY) + .setCurrentRouteSegmentEndPoint(LatLng.newBuilder().build()) + .setRemainingDistanceMeters(Int32Value.newBuilder().build()) + .setRemainingDuration(Duration.newBuilder().build()) + .addAllRemainingVehicleJourneySegments(new ArrayList()) + .addAllAttributes(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + DeliveryVehicle actualResponse = client.updateDeliveryVehicle(deliveryVehicle, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateDeliveryVehicleExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DeliveryVehicle deliveryVehicle = + DeliveryVehicle.newBuilder() + .setName(DeliveryVehicleName.of("[PROVIDER]", "[VEHICLE]").toString()) + .setLastLocation(DeliveryVehicleLocation.newBuilder().build()) + .setNavigationStatus(DeliveryVehicleNavigationStatus.forNumber(0)) + .setCurrentRouteSegment(ByteString.EMPTY) + .setCurrentRouteSegmentEndPoint(LatLng.newBuilder().build()) + .setRemainingDistanceMeters(Int32Value.newBuilder().build()) + .setRemainingDuration(Duration.newBuilder().build()) + .addAllRemainingVehicleJourneySegments(new ArrayList()) + .addAllAttributes(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDeliveryVehicle(deliveryVehicle, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchCreateTasksTest() throws Exception { + BatchCreateTasksResponse expectedResponse = + BatchCreateTasksResponse.newBuilder().addAllTasks(new ArrayList()).build(); + mockService.addResponse(expectedResponse); + + BatchCreateTasksRequest request = + BatchCreateTasksRequest.newBuilder() + .setHeader(DeliveryRequestHeader.newBuilder().build()) + .setParent(ProviderName.of("[PROVIDER]").toString()) + .addAllRequests(new ArrayList()) + .build(); + + BatchCreateTasksResponse actualResponse = client.batchCreateTasks(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void batchCreateTasksExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BatchCreateTasksRequest request = + BatchCreateTasksRequest.newBuilder() + .setHeader(DeliveryRequestHeader.newBuilder().build()) + .setParent(ProviderName.of("[PROVIDER]").toString()) + .addAllRequests(new ArrayList()) + .build(); + client.batchCreateTasks(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createTaskTest() throws Exception { + Task expectedResponse = + Task.newBuilder() + .setName(TaskName.of("[PROVIDER]", "[TASK]").toString()) + .setTaskOutcomeTime(Timestamp.newBuilder().build()) + .setTaskOutcomeLocation(LocationInfo.newBuilder().build()) + .setTrackingId("trackingId1168987698") + .setDeliveryVehicleId("deliveryVehicleId-861424685") + .setPlannedLocation(LocationInfo.newBuilder().build()) + .setTaskDuration(Duration.newBuilder().build()) + .setTargetTimeWindow(TimeWindow.newBuilder().build()) + .setJourneySharingInfo(Task.JourneySharingInfo.newBuilder().build()) + .setTaskTrackingViewConfig(TaskTrackingViewConfig.newBuilder().build()) + .addAllAttributes(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "providers/provider-9779"; + Task task = Task.newBuilder().build(); + String taskId = "taskId-880873088"; + + Task actualResponse = client.createTask(parent, task, taskId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createTaskExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "providers/provider-9779"; + Task task = Task.newBuilder().build(); + String taskId = "taskId-880873088"; + client.createTask(parent, task, taskId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getTaskTest() throws Exception { + Task expectedResponse = + Task.newBuilder() + .setName(TaskName.of("[PROVIDER]", "[TASK]").toString()) + .setTaskOutcomeTime(Timestamp.newBuilder().build()) + .setTaskOutcomeLocation(LocationInfo.newBuilder().build()) + .setTrackingId("trackingId1168987698") + .setDeliveryVehicleId("deliveryVehicleId-861424685") + .setPlannedLocation(LocationInfo.newBuilder().build()) + .setTaskDuration(Duration.newBuilder().build()) + .setTargetTimeWindow(TimeWindow.newBuilder().build()) + .setJourneySharingInfo(Task.JourneySharingInfo.newBuilder().build()) + .setTaskTrackingViewConfig(TaskTrackingViewConfig.newBuilder().build()) + .addAllAttributes(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + TaskName name = TaskName.of("[PROVIDER]", "[TASK]"); + + Task actualResponse = client.getTask(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getTaskExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + TaskName name = TaskName.of("[PROVIDER]", "[TASK]"); + client.getTask(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getTaskTest2() throws Exception { + Task expectedResponse = + Task.newBuilder() + .setName(TaskName.of("[PROVIDER]", "[TASK]").toString()) + .setTaskOutcomeTime(Timestamp.newBuilder().build()) + .setTaskOutcomeLocation(LocationInfo.newBuilder().build()) + .setTrackingId("trackingId1168987698") + .setDeliveryVehicleId("deliveryVehicleId-861424685") + .setPlannedLocation(LocationInfo.newBuilder().build()) + .setTaskDuration(Duration.newBuilder().build()) + .setTargetTimeWindow(TimeWindow.newBuilder().build()) + .setJourneySharingInfo(Task.JourneySharingInfo.newBuilder().build()) + .setTaskTrackingViewConfig(TaskTrackingViewConfig.newBuilder().build()) + .addAllAttributes(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "providers/provider-9052/tasks/task-9052"; + + Task actualResponse = client.getTask(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getTaskExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "providers/provider-9052/tasks/task-9052"; + client.getTask(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchTasksTest() throws Exception { + Task responsesElement = Task.newBuilder().build(); + SearchTasksResponse expectedResponse = + SearchTasksResponse.newBuilder() + .setNextPageToken("") + .addAllTasks(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "providers/provider-9779"; + + SearchTasksPagedResponse pagedListResponse = client.searchTasks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTasksList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void searchTasksExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "providers/provider-9779"; + client.searchTasks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateTaskTest() throws Exception { + Task expectedResponse = + Task.newBuilder() + .setName(TaskName.of("[PROVIDER]", "[TASK]").toString()) + .setTaskOutcomeTime(Timestamp.newBuilder().build()) + .setTaskOutcomeLocation(LocationInfo.newBuilder().build()) + .setTrackingId("trackingId1168987698") + .setDeliveryVehicleId("deliveryVehicleId-861424685") + .setPlannedLocation(LocationInfo.newBuilder().build()) + .setTaskDuration(Duration.newBuilder().build()) + .setTargetTimeWindow(TimeWindow.newBuilder().build()) + .setJourneySharingInfo(Task.JourneySharingInfo.newBuilder().build()) + .setTaskTrackingViewConfig(TaskTrackingViewConfig.newBuilder().build()) + .addAllAttributes(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + Task task = + Task.newBuilder() + .setName(TaskName.of("[PROVIDER]", "[TASK]").toString()) + .setTaskOutcomeTime(Timestamp.newBuilder().build()) + .setTaskOutcomeLocation(LocationInfo.newBuilder().build()) + .setTrackingId("trackingId1168987698") + .setDeliveryVehicleId("deliveryVehicleId-861424685") + .setPlannedLocation(LocationInfo.newBuilder().build()) + .setTaskDuration(Duration.newBuilder().build()) + .setTargetTimeWindow(TimeWindow.newBuilder().build()) + .setJourneySharingInfo(Task.JourneySharingInfo.newBuilder().build()) + .setTaskTrackingViewConfig(TaskTrackingViewConfig.newBuilder().build()) + .addAllAttributes(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Task actualResponse = client.updateTask(task, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateTaskExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Task task = + Task.newBuilder() + .setName(TaskName.of("[PROVIDER]", "[TASK]").toString()) + .setTaskOutcomeTime(Timestamp.newBuilder().build()) + .setTaskOutcomeLocation(LocationInfo.newBuilder().build()) + .setTrackingId("trackingId1168987698") + .setDeliveryVehicleId("deliveryVehicleId-861424685") + .setPlannedLocation(LocationInfo.newBuilder().build()) + .setTaskDuration(Duration.newBuilder().build()) + .setTargetTimeWindow(TimeWindow.newBuilder().build()) + .setJourneySharingInfo(Task.JourneySharingInfo.newBuilder().build()) + .setTaskTrackingViewConfig(TaskTrackingViewConfig.newBuilder().build()) + .addAllAttributes(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateTask(task, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listTasksTest() throws Exception { + Task responsesElement = Task.newBuilder().build(); + ListTasksResponse expectedResponse = + ListTasksResponse.newBuilder() + .setNextPageToken("") + .addAllTasks(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ProviderName parent = ProviderName.of("[PROVIDER]"); + + ListTasksPagedResponse pagedListResponse = client.listTasks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTasksList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listTasksExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProviderName parent = ProviderName.of("[PROVIDER]"); + client.listTasks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listTasksTest2() throws Exception { + Task responsesElement = Task.newBuilder().build(); + ListTasksResponse expectedResponse = + ListTasksResponse.newBuilder() + .setNextPageToken("") + .addAllTasks(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "providers/provider-9779"; + + ListTasksPagedResponse pagedListResponse = client.listTasks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTasksList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listTasksExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "providers/provider-9779"; + client.listTasks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getTaskTrackingInfoTest() throws Exception { + TaskTrackingInfo expectedResponse = + TaskTrackingInfo.newBuilder() + .setName(TaskTrackingInfoName.of("[PROVIDER]", "[TRACKING]").toString()) + .setTrackingId("trackingId1168987698") + .setVehicleLocation(DeliveryVehicleLocation.newBuilder().build()) + .addAllRoutePolylinePoints(new ArrayList()) + .setRemainingStopCount(Int32Value.newBuilder().build()) + .setRemainingDrivingDistanceMeters(Int32Value.newBuilder().build()) + .setEstimatedArrivalTime(Timestamp.newBuilder().build()) + .setEstimatedTaskCompletionTime(Timestamp.newBuilder().build()) + .setTaskOutcomeTime(Timestamp.newBuilder().build()) + .setPlannedLocation(LocationInfo.newBuilder().build()) + .setTargetTimeWindow(TimeWindow.newBuilder().build()) + .addAllAttributes(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + TaskTrackingInfoName name = TaskTrackingInfoName.of("[PROVIDER]", "[TRACKING]"); + + TaskTrackingInfo actualResponse = client.getTaskTrackingInfo(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getTaskTrackingInfoExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + TaskTrackingInfoName name = TaskTrackingInfoName.of("[PROVIDER]", "[TRACKING]"); + client.getTaskTrackingInfo(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getTaskTrackingInfoTest2() throws Exception { + TaskTrackingInfo expectedResponse = + TaskTrackingInfo.newBuilder() + .setName(TaskTrackingInfoName.of("[PROVIDER]", "[TRACKING]").toString()) + .setTrackingId("trackingId1168987698") + .setVehicleLocation(DeliveryVehicleLocation.newBuilder().build()) + .addAllRoutePolylinePoints(new ArrayList()) + .setRemainingStopCount(Int32Value.newBuilder().build()) + .setRemainingDrivingDistanceMeters(Int32Value.newBuilder().build()) + .setEstimatedArrivalTime(Timestamp.newBuilder().build()) + .setEstimatedTaskCompletionTime(Timestamp.newBuilder().build()) + .setTaskOutcomeTime(Timestamp.newBuilder().build()) + .setPlannedLocation(LocationInfo.newBuilder().build()) + .setTargetTimeWindow(TimeWindow.newBuilder().build()) + .addAllAttributes(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "providers/provider-8542/taskTrackingInfo/taskTrackingInf-8542"; + + TaskTrackingInfo actualResponse = client.getTaskTrackingInfo(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getTaskTrackingInfoExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "providers/provider-8542/taskTrackingInfo/taskTrackingInf-8542"; + client.getTaskTrackingInfo(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDeliveryVehiclesTest() throws Exception { + DeliveryVehicle responsesElement = DeliveryVehicle.newBuilder().build(); + ListDeliveryVehiclesResponse expectedResponse = + ListDeliveryVehiclesResponse.newBuilder() + .setNextPageToken("") + .addAllDeliveryVehicles(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ProviderName parent = ProviderName.of("[PROVIDER]"); + + ListDeliveryVehiclesPagedResponse pagedListResponse = client.listDeliveryVehicles(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDeliveryVehiclesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listDeliveryVehiclesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProviderName parent = ProviderName.of("[PROVIDER]"); + client.listDeliveryVehicles(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDeliveryVehiclesTest2() throws Exception { + DeliveryVehicle responsesElement = DeliveryVehicle.newBuilder().build(); + ListDeliveryVehiclesResponse expectedResponse = + ListDeliveryVehiclesResponse.newBuilder() + .setNextPageToken("") + .addAllDeliveryVehicles(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "providers/provider-9779"; + + ListDeliveryVehiclesPagedResponse pagedListResponse = client.listDeliveryVehicles(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDeliveryVehiclesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listDeliveryVehiclesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "providers/provider-9779"; + client.listDeliveryVehicles(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/test/java/com/google/maps/fleetengine/delivery/v1/DeliveryServiceClientTest.java b/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/test/java/com/google/maps/fleetengine/delivery/v1/DeliveryServiceClientTest.java new file mode 100644 index 000000000000..bb8f971b54ee --- /dev/null +++ b/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/test/java/com/google/maps/fleetengine/delivery/v1/DeliveryServiceClientTest.java @@ -0,0 +1,854 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1; + +import static google.maps.fleetengine.delivery.v1.DeliveryServiceClient.ListDeliveryVehiclesPagedResponse; +import static google.maps.fleetengine.delivery.v1.DeliveryServiceClient.ListTasksPagedResponse; +import static google.maps.fleetengine.delivery.v1.DeliveryServiceClient.SearchTasksPagedResponse; + +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.ByteString; +import com.google.protobuf.Duration; +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 DeliveryServiceClientTest { + private static MockDeliveryService mockDeliveryService; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private DeliveryServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockDeliveryService = new MockDeliveryService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockDeliveryService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + DeliveryServiceSettings settings = + DeliveryServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DeliveryServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createDeliveryVehicleTest() throws Exception { + DeliveryVehicle expectedResponse = + DeliveryVehicle.newBuilder() + .setName(DeliveryVehicleName.of("[PROVIDER]", "[VEHICLE]").toString()) + .setLastLocation(DeliveryVehicleLocation.newBuilder().build()) + .setNavigationStatus(DeliveryVehicleNavigationStatus.forNumber(0)) + .setCurrentRouteSegment(ByteString.EMPTY) + .setCurrentRouteSegmentEndPoint(LatLng.newBuilder().build()) + .setRemainingDistanceMeters(Int32Value.newBuilder().build()) + .setRemainingDuration(Duration.newBuilder().build()) + .addAllRemainingVehicleJourneySegments(new ArrayList()) + .addAllAttributes(new ArrayList()) + .build(); + mockDeliveryService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + DeliveryVehicle deliveryVehicle = DeliveryVehicle.newBuilder().build(); + String deliveryVehicleId = "deliveryVehicleId-861424685"; + + DeliveryVehicle actualResponse = + client.createDeliveryVehicle(parent, deliveryVehicle, deliveryVehicleId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDeliveryService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDeliveryVehicleRequest actualRequest = + ((CreateDeliveryVehicleRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(deliveryVehicle, actualRequest.getDeliveryVehicle()); + Assert.assertEquals(deliveryVehicleId, actualRequest.getDeliveryVehicleId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDeliveryVehicleExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeliveryService.addException(exception); + + try { + String parent = "parent-995424086"; + DeliveryVehicle deliveryVehicle = DeliveryVehicle.newBuilder().build(); + String deliveryVehicleId = "deliveryVehicleId-861424685"; + client.createDeliveryVehicle(parent, deliveryVehicle, deliveryVehicleId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDeliveryVehicleTest() throws Exception { + DeliveryVehicle expectedResponse = + DeliveryVehicle.newBuilder() + .setName(DeliveryVehicleName.of("[PROVIDER]", "[VEHICLE]").toString()) + .setLastLocation(DeliveryVehicleLocation.newBuilder().build()) + .setNavigationStatus(DeliveryVehicleNavigationStatus.forNumber(0)) + .setCurrentRouteSegment(ByteString.EMPTY) + .setCurrentRouteSegmentEndPoint(LatLng.newBuilder().build()) + .setRemainingDistanceMeters(Int32Value.newBuilder().build()) + .setRemainingDuration(Duration.newBuilder().build()) + .addAllRemainingVehicleJourneySegments(new ArrayList()) + .addAllAttributes(new ArrayList()) + .build(); + mockDeliveryService.addResponse(expectedResponse); + + DeliveryVehicleName name = DeliveryVehicleName.of("[PROVIDER]", "[VEHICLE]"); + + DeliveryVehicle actualResponse = client.getDeliveryVehicle(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDeliveryService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDeliveryVehicleRequest actualRequest = ((GetDeliveryVehicleRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDeliveryVehicleExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeliveryService.addException(exception); + + try { + DeliveryVehicleName name = DeliveryVehicleName.of("[PROVIDER]", "[VEHICLE]"); + client.getDeliveryVehicle(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDeliveryVehicleTest2() throws Exception { + DeliveryVehicle expectedResponse = + DeliveryVehicle.newBuilder() + .setName(DeliveryVehicleName.of("[PROVIDER]", "[VEHICLE]").toString()) + .setLastLocation(DeliveryVehicleLocation.newBuilder().build()) + .setNavigationStatus(DeliveryVehicleNavigationStatus.forNumber(0)) + .setCurrentRouteSegment(ByteString.EMPTY) + .setCurrentRouteSegmentEndPoint(LatLng.newBuilder().build()) + .setRemainingDistanceMeters(Int32Value.newBuilder().build()) + .setRemainingDuration(Duration.newBuilder().build()) + .addAllRemainingVehicleJourneySegments(new ArrayList()) + .addAllAttributes(new ArrayList()) + .build(); + mockDeliveryService.addResponse(expectedResponse); + + String name = "name3373707"; + + DeliveryVehicle actualResponse = client.getDeliveryVehicle(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDeliveryService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDeliveryVehicleRequest actualRequest = ((GetDeliveryVehicleRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDeliveryVehicleExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeliveryService.addException(exception); + + try { + String name = "name3373707"; + client.getDeliveryVehicle(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateDeliveryVehicleTest() throws Exception { + DeliveryVehicle expectedResponse = + DeliveryVehicle.newBuilder() + .setName(DeliveryVehicleName.of("[PROVIDER]", "[VEHICLE]").toString()) + .setLastLocation(DeliveryVehicleLocation.newBuilder().build()) + .setNavigationStatus(DeliveryVehicleNavigationStatus.forNumber(0)) + .setCurrentRouteSegment(ByteString.EMPTY) + .setCurrentRouteSegmentEndPoint(LatLng.newBuilder().build()) + .setRemainingDistanceMeters(Int32Value.newBuilder().build()) + .setRemainingDuration(Duration.newBuilder().build()) + .addAllRemainingVehicleJourneySegments(new ArrayList()) + .addAllAttributes(new ArrayList()) + .build(); + mockDeliveryService.addResponse(expectedResponse); + + DeliveryVehicle deliveryVehicle = DeliveryVehicle.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + DeliveryVehicle actualResponse = client.updateDeliveryVehicle(deliveryVehicle, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDeliveryService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateDeliveryVehicleRequest actualRequest = + ((UpdateDeliveryVehicleRequest) actualRequests.get(0)); + + Assert.assertEquals(deliveryVehicle, actualRequest.getDeliveryVehicle()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateDeliveryVehicleExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeliveryService.addException(exception); + + try { + DeliveryVehicle deliveryVehicle = DeliveryVehicle.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDeliveryVehicle(deliveryVehicle, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchCreateTasksTest() throws Exception { + BatchCreateTasksResponse expectedResponse = + BatchCreateTasksResponse.newBuilder().addAllTasks(new ArrayList()).build(); + mockDeliveryService.addResponse(expectedResponse); + + BatchCreateTasksRequest request = + BatchCreateTasksRequest.newBuilder() + .setHeader(DeliveryRequestHeader.newBuilder().build()) + .setParent(ProviderName.of("[PROVIDER]").toString()) + .addAllRequests(new ArrayList()) + .build(); + + BatchCreateTasksResponse actualResponse = client.batchCreateTasks(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDeliveryService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchCreateTasksRequest actualRequest = ((BatchCreateTasksRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getHeader(), actualRequest.getHeader()); + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getRequestsList(), actualRequest.getRequestsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchCreateTasksExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeliveryService.addException(exception); + + try { + BatchCreateTasksRequest request = + BatchCreateTasksRequest.newBuilder() + .setHeader(DeliveryRequestHeader.newBuilder().build()) + .setParent(ProviderName.of("[PROVIDER]").toString()) + .addAllRequests(new ArrayList()) + .build(); + client.batchCreateTasks(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createTaskTest() throws Exception { + Task expectedResponse = + Task.newBuilder() + .setName(TaskName.of("[PROVIDER]", "[TASK]").toString()) + .setTaskOutcomeTime(Timestamp.newBuilder().build()) + .setTaskOutcomeLocation(LocationInfo.newBuilder().build()) + .setTrackingId("trackingId1168987698") + .setDeliveryVehicleId("deliveryVehicleId-861424685") + .setPlannedLocation(LocationInfo.newBuilder().build()) + .setTaskDuration(Duration.newBuilder().build()) + .setTargetTimeWindow(TimeWindow.newBuilder().build()) + .setJourneySharingInfo(Task.JourneySharingInfo.newBuilder().build()) + .setTaskTrackingViewConfig(TaskTrackingViewConfig.newBuilder().build()) + .addAllAttributes(new ArrayList()) + .build(); + mockDeliveryService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + Task task = Task.newBuilder().build(); + String taskId = "taskId-880873088"; + + Task actualResponse = client.createTask(parent, task, taskId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDeliveryService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateTaskRequest actualRequest = ((CreateTaskRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(task, actualRequest.getTask()); + Assert.assertEquals(taskId, actualRequest.getTaskId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createTaskExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeliveryService.addException(exception); + + try { + String parent = "parent-995424086"; + Task task = Task.newBuilder().build(); + String taskId = "taskId-880873088"; + client.createTask(parent, task, taskId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getTaskTest() throws Exception { + Task expectedResponse = + Task.newBuilder() + .setName(TaskName.of("[PROVIDER]", "[TASK]").toString()) + .setTaskOutcomeTime(Timestamp.newBuilder().build()) + .setTaskOutcomeLocation(LocationInfo.newBuilder().build()) + .setTrackingId("trackingId1168987698") + .setDeliveryVehicleId("deliveryVehicleId-861424685") + .setPlannedLocation(LocationInfo.newBuilder().build()) + .setTaskDuration(Duration.newBuilder().build()) + .setTargetTimeWindow(TimeWindow.newBuilder().build()) + .setJourneySharingInfo(Task.JourneySharingInfo.newBuilder().build()) + .setTaskTrackingViewConfig(TaskTrackingViewConfig.newBuilder().build()) + .addAllAttributes(new ArrayList()) + .build(); + mockDeliveryService.addResponse(expectedResponse); + + TaskName name = TaskName.of("[PROVIDER]", "[TASK]"); + + Task actualResponse = client.getTask(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDeliveryService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetTaskRequest actualRequest = ((GetTaskRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getTaskExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeliveryService.addException(exception); + + try { + TaskName name = TaskName.of("[PROVIDER]", "[TASK]"); + client.getTask(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getTaskTest2() throws Exception { + Task expectedResponse = + Task.newBuilder() + .setName(TaskName.of("[PROVIDER]", "[TASK]").toString()) + .setTaskOutcomeTime(Timestamp.newBuilder().build()) + .setTaskOutcomeLocation(LocationInfo.newBuilder().build()) + .setTrackingId("trackingId1168987698") + .setDeliveryVehicleId("deliveryVehicleId-861424685") + .setPlannedLocation(LocationInfo.newBuilder().build()) + .setTaskDuration(Duration.newBuilder().build()) + .setTargetTimeWindow(TimeWindow.newBuilder().build()) + .setJourneySharingInfo(Task.JourneySharingInfo.newBuilder().build()) + .setTaskTrackingViewConfig(TaskTrackingViewConfig.newBuilder().build()) + .addAllAttributes(new ArrayList()) + .build(); + mockDeliveryService.addResponse(expectedResponse); + + String name = "name3373707"; + + Task actualResponse = client.getTask(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDeliveryService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetTaskRequest actualRequest = ((GetTaskRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getTaskExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeliveryService.addException(exception); + + try { + String name = "name3373707"; + client.getTask(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchTasksTest() throws Exception { + Task responsesElement = Task.newBuilder().build(); + SearchTasksResponse expectedResponse = + SearchTasksResponse.newBuilder() + .setNextPageToken("") + .addAllTasks(Arrays.asList(responsesElement)) + .build(); + mockDeliveryService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + SearchTasksPagedResponse pagedListResponse = client.searchTasks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTasksList().get(0), resources.get(0)); + + List actualRequests = mockDeliveryService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchTasksRequest actualRequest = ((SearchTasksRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchTasksExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeliveryService.addException(exception); + + try { + String parent = "parent-995424086"; + client.searchTasks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateTaskTest() throws Exception { + Task expectedResponse = + Task.newBuilder() + .setName(TaskName.of("[PROVIDER]", "[TASK]").toString()) + .setTaskOutcomeTime(Timestamp.newBuilder().build()) + .setTaskOutcomeLocation(LocationInfo.newBuilder().build()) + .setTrackingId("trackingId1168987698") + .setDeliveryVehicleId("deliveryVehicleId-861424685") + .setPlannedLocation(LocationInfo.newBuilder().build()) + .setTaskDuration(Duration.newBuilder().build()) + .setTargetTimeWindow(TimeWindow.newBuilder().build()) + .setJourneySharingInfo(Task.JourneySharingInfo.newBuilder().build()) + .setTaskTrackingViewConfig(TaskTrackingViewConfig.newBuilder().build()) + .addAllAttributes(new ArrayList()) + .build(); + mockDeliveryService.addResponse(expectedResponse); + + Task task = Task.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Task actualResponse = client.updateTask(task, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDeliveryService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateTaskRequest actualRequest = ((UpdateTaskRequest) actualRequests.get(0)); + + Assert.assertEquals(task, actualRequest.getTask()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateTaskExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeliveryService.addException(exception); + + try { + Task task = Task.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateTask(task, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listTasksTest() throws Exception { + Task responsesElement = Task.newBuilder().build(); + ListTasksResponse expectedResponse = + ListTasksResponse.newBuilder() + .setNextPageToken("") + .addAllTasks(Arrays.asList(responsesElement)) + .build(); + mockDeliveryService.addResponse(expectedResponse); + + ProviderName parent = ProviderName.of("[PROVIDER]"); + + ListTasksPagedResponse pagedListResponse = client.listTasks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTasksList().get(0), resources.get(0)); + + List actualRequests = mockDeliveryService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListTasksRequest actualRequest = ((ListTasksRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listTasksExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeliveryService.addException(exception); + + try { + ProviderName parent = ProviderName.of("[PROVIDER]"); + client.listTasks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listTasksTest2() throws Exception { + Task responsesElement = Task.newBuilder().build(); + ListTasksResponse expectedResponse = + ListTasksResponse.newBuilder() + .setNextPageToken("") + .addAllTasks(Arrays.asList(responsesElement)) + .build(); + mockDeliveryService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListTasksPagedResponse pagedListResponse = client.listTasks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTasksList().get(0), resources.get(0)); + + List actualRequests = mockDeliveryService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListTasksRequest actualRequest = ((ListTasksRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listTasksExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeliveryService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listTasks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getTaskTrackingInfoTest() throws Exception { + TaskTrackingInfo expectedResponse = + TaskTrackingInfo.newBuilder() + .setName(TaskTrackingInfoName.of("[PROVIDER]", "[TRACKING]").toString()) + .setTrackingId("trackingId1168987698") + .setVehicleLocation(DeliveryVehicleLocation.newBuilder().build()) + .addAllRoutePolylinePoints(new ArrayList()) + .setRemainingStopCount(Int32Value.newBuilder().build()) + .setRemainingDrivingDistanceMeters(Int32Value.newBuilder().build()) + .setEstimatedArrivalTime(Timestamp.newBuilder().build()) + .setEstimatedTaskCompletionTime(Timestamp.newBuilder().build()) + .setTaskOutcomeTime(Timestamp.newBuilder().build()) + .setPlannedLocation(LocationInfo.newBuilder().build()) + .setTargetTimeWindow(TimeWindow.newBuilder().build()) + .addAllAttributes(new ArrayList()) + .build(); + mockDeliveryService.addResponse(expectedResponse); + + TaskTrackingInfoName name = TaskTrackingInfoName.of("[PROVIDER]", "[TRACKING]"); + + TaskTrackingInfo actualResponse = client.getTaskTrackingInfo(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDeliveryService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetTaskTrackingInfoRequest actualRequest = ((GetTaskTrackingInfoRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getTaskTrackingInfoExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeliveryService.addException(exception); + + try { + TaskTrackingInfoName name = TaskTrackingInfoName.of("[PROVIDER]", "[TRACKING]"); + client.getTaskTrackingInfo(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getTaskTrackingInfoTest2() throws Exception { + TaskTrackingInfo expectedResponse = + TaskTrackingInfo.newBuilder() + .setName(TaskTrackingInfoName.of("[PROVIDER]", "[TRACKING]").toString()) + .setTrackingId("trackingId1168987698") + .setVehicleLocation(DeliveryVehicleLocation.newBuilder().build()) + .addAllRoutePolylinePoints(new ArrayList()) + .setRemainingStopCount(Int32Value.newBuilder().build()) + .setRemainingDrivingDistanceMeters(Int32Value.newBuilder().build()) + .setEstimatedArrivalTime(Timestamp.newBuilder().build()) + .setEstimatedTaskCompletionTime(Timestamp.newBuilder().build()) + .setTaskOutcomeTime(Timestamp.newBuilder().build()) + .setPlannedLocation(LocationInfo.newBuilder().build()) + .setTargetTimeWindow(TimeWindow.newBuilder().build()) + .addAllAttributes(new ArrayList()) + .build(); + mockDeliveryService.addResponse(expectedResponse); + + String name = "name3373707"; + + TaskTrackingInfo actualResponse = client.getTaskTrackingInfo(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDeliveryService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetTaskTrackingInfoRequest actualRequest = ((GetTaskTrackingInfoRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getTaskTrackingInfoExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeliveryService.addException(exception); + + try { + String name = "name3373707"; + client.getTaskTrackingInfo(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDeliveryVehiclesTest() throws Exception { + DeliveryVehicle responsesElement = DeliveryVehicle.newBuilder().build(); + ListDeliveryVehiclesResponse expectedResponse = + ListDeliveryVehiclesResponse.newBuilder() + .setNextPageToken("") + .addAllDeliveryVehicles(Arrays.asList(responsesElement)) + .build(); + mockDeliveryService.addResponse(expectedResponse); + + ProviderName parent = ProviderName.of("[PROVIDER]"); + + ListDeliveryVehiclesPagedResponse pagedListResponse = client.listDeliveryVehicles(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDeliveryVehiclesList().get(0), resources.get(0)); + + List actualRequests = mockDeliveryService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDeliveryVehiclesRequest actualRequest = + ((ListDeliveryVehiclesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDeliveryVehiclesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeliveryService.addException(exception); + + try { + ProviderName parent = ProviderName.of("[PROVIDER]"); + client.listDeliveryVehicles(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDeliveryVehiclesTest2() throws Exception { + DeliveryVehicle responsesElement = DeliveryVehicle.newBuilder().build(); + ListDeliveryVehiclesResponse expectedResponse = + ListDeliveryVehiclesResponse.newBuilder() + .setNextPageToken("") + .addAllDeliveryVehicles(Arrays.asList(responsesElement)) + .build(); + mockDeliveryService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListDeliveryVehiclesPagedResponse pagedListResponse = client.listDeliveryVehicles(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDeliveryVehiclesList().get(0), resources.get(0)); + + List actualRequests = mockDeliveryService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDeliveryVehiclesRequest actualRequest = + ((ListDeliveryVehiclesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDeliveryVehiclesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeliveryService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listDeliveryVehicles(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/test/java/com/google/maps/fleetengine/delivery/v1/MockDeliveryService.java b/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/test/java/com/google/maps/fleetengine/delivery/v1/MockDeliveryService.java new file mode 100644 index 000000000000..fc5f2913a35a --- /dev/null +++ b/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/test/java/com/google/maps/fleetengine/delivery/v1/MockDeliveryService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.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 MockDeliveryService implements MockGrpcService { + private final MockDeliveryServiceImpl serviceImpl; + + public MockDeliveryService() { + serviceImpl = new MockDeliveryServiceImpl(); + } + + @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-delivery/google-maps-fleetengine-delivery/src/test/java/com/google/maps/fleetengine/delivery/v1/MockDeliveryServiceImpl.java b/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/test/java/com/google/maps/fleetengine/delivery/v1/MockDeliveryServiceImpl.java new file mode 100644 index 000000000000..22c7569322bf --- /dev/null +++ b/java-maps-fleetengine-delivery/google-maps-fleetengine-delivery/src/test/java/com/google/maps/fleetengine/delivery/v1/MockDeliveryServiceImpl.java @@ -0,0 +1,289 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1; + +import com.google.api.core.BetaApi; +import com.google.protobuf.AbstractMessage; +import google.maps.fleetengine.delivery.v1.DeliveryServiceGrpc.DeliveryServiceImplBase; +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 MockDeliveryServiceImpl extends DeliveryServiceImplBase { + private List requests; + private Queue responses; + + public MockDeliveryServiceImpl() { + 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 createDeliveryVehicle( + CreateDeliveryVehicleRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DeliveryVehicle) { + requests.add(request); + responseObserver.onNext(((DeliveryVehicle) 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 CreateDeliveryVehicle, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DeliveryVehicle.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getDeliveryVehicle( + GetDeliveryVehicleRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DeliveryVehicle) { + requests.add(request); + responseObserver.onNext(((DeliveryVehicle) 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 GetDeliveryVehicle, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DeliveryVehicle.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateDeliveryVehicle( + UpdateDeliveryVehicleRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DeliveryVehicle) { + requests.add(request); + responseObserver.onNext(((DeliveryVehicle) 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 UpdateDeliveryVehicle, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DeliveryVehicle.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void batchCreateTasks( + BatchCreateTasksRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof BatchCreateTasksResponse) { + requests.add(request); + responseObserver.onNext(((BatchCreateTasksResponse) 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 BatchCreateTasks, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + BatchCreateTasksResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createTask(CreateTaskRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Task) { + requests.add(request); + responseObserver.onNext(((Task) 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 CreateTask, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Task.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getTask(GetTaskRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Task) { + requests.add(request); + responseObserver.onNext(((Task) 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 GetTask, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Task.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void searchTasks( + SearchTasksRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SearchTasksResponse) { + requests.add(request); + responseObserver.onNext(((SearchTasksResponse) 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 SearchTasks, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SearchTasksResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateTask(UpdateTaskRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Task) { + requests.add(request); + responseObserver.onNext(((Task) 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 UpdateTask, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Task.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listTasks( + ListTasksRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListTasksResponse) { + requests.add(request); + responseObserver.onNext(((ListTasksResponse) 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 ListTasks, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListTasksResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getTaskTrackingInfo( + GetTaskTrackingInfoRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof TaskTrackingInfo) { + requests.add(request); + responseObserver.onNext(((TaskTrackingInfo) 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 GetTaskTrackingInfo, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + TaskTrackingInfo.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listDeliveryVehicles( + ListDeliveryVehiclesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListDeliveryVehiclesResponse) { + requests.add(request); + responseObserver.onNext(((ListDeliveryVehiclesResponse) 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 ListDeliveryVehicles, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListDeliveryVehiclesResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-maps-fleetengine-delivery/grpc-google-maps-fleetengine-delivery-v1/pom.xml b/java-maps-fleetengine-delivery/grpc-google-maps-fleetengine-delivery-v1/pom.xml new file mode 100644 index 000000000000..be19cd4d1af3 --- /dev/null +++ b/java-maps-fleetengine-delivery/grpc-google-maps-fleetengine-delivery-v1/pom.xml @@ -0,0 +1,45 @@ + + 4.0.0 + com.google.maps.api.grpc + grpc-google-maps-fleetengine-delivery-v1 + 0.0.1-SNAPSHOT + grpc-google-maps-fleetengine-delivery-v1 + GRPC library for google-maps-fleetengine-delivery + + com.google.maps + google-maps-fleetengine-delivery-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-delivery-v1 + + + com.google.guava + guava + + + \ No newline at end of file diff --git a/java-maps-fleetengine-delivery/grpc-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryServiceGrpc.java b/java-maps-fleetengine-delivery/grpc-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryServiceGrpc.java new file mode 100644 index 000000000000..464f8c7e5153 --- /dev/null +++ b/java-maps-fleetengine-delivery/grpc-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryServiceGrpc.java @@ -0,0 +1,1611 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * The Last Mile Delivery service.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/maps/fleetengine/delivery/v1/delivery_api.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class DeliveryServiceGrpc { + + private DeliveryServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "maps.fleetengine.delivery.v1.DeliveryService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest, + google.maps.fleetengine.delivery.v1.DeliveryVehicle> + getCreateDeliveryVehicleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateDeliveryVehicle", + requestType = google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest.class, + responseType = google.maps.fleetengine.delivery.v1.DeliveryVehicle.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest, + google.maps.fleetengine.delivery.v1.DeliveryVehicle> + getCreateDeliveryVehicleMethod() { + io.grpc.MethodDescriptor< + google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest, + google.maps.fleetengine.delivery.v1.DeliveryVehicle> + getCreateDeliveryVehicleMethod; + if ((getCreateDeliveryVehicleMethod = DeliveryServiceGrpc.getCreateDeliveryVehicleMethod) + == null) { + synchronized (DeliveryServiceGrpc.class) { + if ((getCreateDeliveryVehicleMethod = DeliveryServiceGrpc.getCreateDeliveryVehicleMethod) + == null) { + DeliveryServiceGrpc.getCreateDeliveryVehicleMethod = + getCreateDeliveryVehicleMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateDeliveryVehicle")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + google.maps.fleetengine.delivery.v1.DeliveryVehicle + .getDefaultInstance())) + .setSchemaDescriptor( + new DeliveryServiceMethodDescriptorSupplier("CreateDeliveryVehicle")) + .build(); + } + } + } + return getCreateDeliveryVehicleMethod; + } + + private static volatile io.grpc.MethodDescriptor< + google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest, + google.maps.fleetengine.delivery.v1.DeliveryVehicle> + getGetDeliveryVehicleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetDeliveryVehicle", + requestType = google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest.class, + responseType = google.maps.fleetengine.delivery.v1.DeliveryVehicle.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest, + google.maps.fleetengine.delivery.v1.DeliveryVehicle> + getGetDeliveryVehicleMethod() { + io.grpc.MethodDescriptor< + google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest, + google.maps.fleetengine.delivery.v1.DeliveryVehicle> + getGetDeliveryVehicleMethod; + if ((getGetDeliveryVehicleMethod = DeliveryServiceGrpc.getGetDeliveryVehicleMethod) == null) { + synchronized (DeliveryServiceGrpc.class) { + if ((getGetDeliveryVehicleMethod = DeliveryServiceGrpc.getGetDeliveryVehicleMethod) + == null) { + DeliveryServiceGrpc.getGetDeliveryVehicleMethod = + getGetDeliveryVehicleMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDeliveryVehicle")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + google.maps.fleetengine.delivery.v1.DeliveryVehicle + .getDefaultInstance())) + .setSchemaDescriptor( + new DeliveryServiceMethodDescriptorSupplier("GetDeliveryVehicle")) + .build(); + } + } + } + return getGetDeliveryVehicleMethod; + } + + private static volatile io.grpc.MethodDescriptor< + google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest, + google.maps.fleetengine.delivery.v1.DeliveryVehicle> + getUpdateDeliveryVehicleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateDeliveryVehicle", + requestType = google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest.class, + responseType = google.maps.fleetengine.delivery.v1.DeliveryVehicle.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest, + google.maps.fleetengine.delivery.v1.DeliveryVehicle> + getUpdateDeliveryVehicleMethod() { + io.grpc.MethodDescriptor< + google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest, + google.maps.fleetengine.delivery.v1.DeliveryVehicle> + getUpdateDeliveryVehicleMethod; + if ((getUpdateDeliveryVehicleMethod = DeliveryServiceGrpc.getUpdateDeliveryVehicleMethod) + == null) { + synchronized (DeliveryServiceGrpc.class) { + if ((getUpdateDeliveryVehicleMethod = DeliveryServiceGrpc.getUpdateDeliveryVehicleMethod) + == null) { + DeliveryServiceGrpc.getUpdateDeliveryVehicleMethod = + getUpdateDeliveryVehicleMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateDeliveryVehicle")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + google.maps.fleetengine.delivery.v1.DeliveryVehicle + .getDefaultInstance())) + .setSchemaDescriptor( + new DeliveryServiceMethodDescriptorSupplier("UpdateDeliveryVehicle")) + .build(); + } + } + } + return getUpdateDeliveryVehicleMethod; + } + + private static volatile io.grpc.MethodDescriptor< + google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest, + google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse> + getBatchCreateTasksMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchCreateTasks", + requestType = google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest.class, + responseType = google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest, + google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse> + getBatchCreateTasksMethod() { + io.grpc.MethodDescriptor< + google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest, + google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse> + getBatchCreateTasksMethod; + if ((getBatchCreateTasksMethod = DeliveryServiceGrpc.getBatchCreateTasksMethod) == null) { + synchronized (DeliveryServiceGrpc.class) { + if ((getBatchCreateTasksMethod = DeliveryServiceGrpc.getBatchCreateTasksMethod) == null) { + DeliveryServiceGrpc.getBatchCreateTasksMethod = + getBatchCreateTasksMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchCreateTasks")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DeliveryServiceMethodDescriptorSupplier("BatchCreateTasks")) + .build(); + } + } + } + return getBatchCreateTasksMethod; + } + + private static volatile io.grpc.MethodDescriptor< + google.maps.fleetengine.delivery.v1.CreateTaskRequest, + google.maps.fleetengine.delivery.v1.Task> + getCreateTaskMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateTask", + requestType = google.maps.fleetengine.delivery.v1.CreateTaskRequest.class, + responseType = google.maps.fleetengine.delivery.v1.Task.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + google.maps.fleetengine.delivery.v1.CreateTaskRequest, + google.maps.fleetengine.delivery.v1.Task> + getCreateTaskMethod() { + io.grpc.MethodDescriptor< + google.maps.fleetengine.delivery.v1.CreateTaskRequest, + google.maps.fleetengine.delivery.v1.Task> + getCreateTaskMethod; + if ((getCreateTaskMethod = DeliveryServiceGrpc.getCreateTaskMethod) == null) { + synchronized (DeliveryServiceGrpc.class) { + if ((getCreateTaskMethod = DeliveryServiceGrpc.getCreateTaskMethod) == null) { + DeliveryServiceGrpc.getCreateTaskMethod = + getCreateTaskMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateTask")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + google.maps.fleetengine.delivery.v1.CreateTaskRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + google.maps.fleetengine.delivery.v1.Task.getDefaultInstance())) + .setSchemaDescriptor( + new DeliveryServiceMethodDescriptorSupplier("CreateTask")) + .build(); + } + } + } + return getCreateTaskMethod; + } + + private static volatile io.grpc.MethodDescriptor< + google.maps.fleetengine.delivery.v1.GetTaskRequest, + google.maps.fleetengine.delivery.v1.Task> + getGetTaskMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetTask", + requestType = google.maps.fleetengine.delivery.v1.GetTaskRequest.class, + responseType = google.maps.fleetengine.delivery.v1.Task.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + google.maps.fleetengine.delivery.v1.GetTaskRequest, + google.maps.fleetengine.delivery.v1.Task> + getGetTaskMethod() { + io.grpc.MethodDescriptor< + google.maps.fleetengine.delivery.v1.GetTaskRequest, + google.maps.fleetengine.delivery.v1.Task> + getGetTaskMethod; + if ((getGetTaskMethod = DeliveryServiceGrpc.getGetTaskMethod) == null) { + synchronized (DeliveryServiceGrpc.class) { + if ((getGetTaskMethod = DeliveryServiceGrpc.getGetTaskMethod) == null) { + DeliveryServiceGrpc.getGetTaskMethod = + getGetTaskMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTask")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + google.maps.fleetengine.delivery.v1.GetTaskRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + google.maps.fleetengine.delivery.v1.Task.getDefaultInstance())) + .setSchemaDescriptor(new DeliveryServiceMethodDescriptorSupplier("GetTask")) + .build(); + } + } + } + return getGetTaskMethod; + } + + private static volatile io.grpc.MethodDescriptor< + google.maps.fleetengine.delivery.v1.SearchTasksRequest, + google.maps.fleetengine.delivery.v1.SearchTasksResponse> + getSearchTasksMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SearchTasks", + requestType = google.maps.fleetengine.delivery.v1.SearchTasksRequest.class, + responseType = google.maps.fleetengine.delivery.v1.SearchTasksResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + google.maps.fleetengine.delivery.v1.SearchTasksRequest, + google.maps.fleetengine.delivery.v1.SearchTasksResponse> + getSearchTasksMethod() { + io.grpc.MethodDescriptor< + google.maps.fleetengine.delivery.v1.SearchTasksRequest, + google.maps.fleetengine.delivery.v1.SearchTasksResponse> + getSearchTasksMethod; + if ((getSearchTasksMethod = DeliveryServiceGrpc.getSearchTasksMethod) == null) { + synchronized (DeliveryServiceGrpc.class) { + if ((getSearchTasksMethod = DeliveryServiceGrpc.getSearchTasksMethod) == null) { + DeliveryServiceGrpc.getSearchTasksMethod = + getSearchTasksMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SearchTasks")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + google.maps.fleetengine.delivery.v1.SearchTasksRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + google.maps.fleetengine.delivery.v1.SearchTasksResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DeliveryServiceMethodDescriptorSupplier("SearchTasks")) + .build(); + } + } + } + return getSearchTasksMethod; + } + + private static volatile io.grpc.MethodDescriptor< + google.maps.fleetengine.delivery.v1.UpdateTaskRequest, + google.maps.fleetengine.delivery.v1.Task> + getUpdateTaskMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateTask", + requestType = google.maps.fleetengine.delivery.v1.UpdateTaskRequest.class, + responseType = google.maps.fleetengine.delivery.v1.Task.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + google.maps.fleetengine.delivery.v1.UpdateTaskRequest, + google.maps.fleetengine.delivery.v1.Task> + getUpdateTaskMethod() { + io.grpc.MethodDescriptor< + google.maps.fleetengine.delivery.v1.UpdateTaskRequest, + google.maps.fleetengine.delivery.v1.Task> + getUpdateTaskMethod; + if ((getUpdateTaskMethod = DeliveryServiceGrpc.getUpdateTaskMethod) == null) { + synchronized (DeliveryServiceGrpc.class) { + if ((getUpdateTaskMethod = DeliveryServiceGrpc.getUpdateTaskMethod) == null) { + DeliveryServiceGrpc.getUpdateTaskMethod = + getUpdateTaskMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateTask")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + google.maps.fleetengine.delivery.v1.UpdateTaskRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + google.maps.fleetengine.delivery.v1.Task.getDefaultInstance())) + .setSchemaDescriptor( + new DeliveryServiceMethodDescriptorSupplier("UpdateTask")) + .build(); + } + } + } + return getUpdateTaskMethod; + } + + private static volatile io.grpc.MethodDescriptor< + google.maps.fleetengine.delivery.v1.ListTasksRequest, + google.maps.fleetengine.delivery.v1.ListTasksResponse> + getListTasksMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListTasks", + requestType = google.maps.fleetengine.delivery.v1.ListTasksRequest.class, + responseType = google.maps.fleetengine.delivery.v1.ListTasksResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + google.maps.fleetengine.delivery.v1.ListTasksRequest, + google.maps.fleetengine.delivery.v1.ListTasksResponse> + getListTasksMethod() { + io.grpc.MethodDescriptor< + google.maps.fleetengine.delivery.v1.ListTasksRequest, + google.maps.fleetengine.delivery.v1.ListTasksResponse> + getListTasksMethod; + if ((getListTasksMethod = DeliveryServiceGrpc.getListTasksMethod) == null) { + synchronized (DeliveryServiceGrpc.class) { + if ((getListTasksMethod = DeliveryServiceGrpc.getListTasksMethod) == null) { + DeliveryServiceGrpc.getListTasksMethod = + getListTasksMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTasks")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + google.maps.fleetengine.delivery.v1.ListTasksRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + google.maps.fleetengine.delivery.v1.ListTasksResponse + .getDefaultInstance())) + .setSchemaDescriptor(new DeliveryServiceMethodDescriptorSupplier("ListTasks")) + .build(); + } + } + } + return getListTasksMethod; + } + + private static volatile io.grpc.MethodDescriptor< + google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest, + google.maps.fleetengine.delivery.v1.TaskTrackingInfo> + getGetTaskTrackingInfoMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetTaskTrackingInfo", + requestType = google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest.class, + responseType = google.maps.fleetengine.delivery.v1.TaskTrackingInfo.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest, + google.maps.fleetengine.delivery.v1.TaskTrackingInfo> + getGetTaskTrackingInfoMethod() { + io.grpc.MethodDescriptor< + google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest, + google.maps.fleetengine.delivery.v1.TaskTrackingInfo> + getGetTaskTrackingInfoMethod; + if ((getGetTaskTrackingInfoMethod = DeliveryServiceGrpc.getGetTaskTrackingInfoMethod) == null) { + synchronized (DeliveryServiceGrpc.class) { + if ((getGetTaskTrackingInfoMethod = DeliveryServiceGrpc.getGetTaskTrackingInfoMethod) + == null) { + DeliveryServiceGrpc.getGetTaskTrackingInfoMethod = + getGetTaskTrackingInfoMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetTaskTrackingInfo")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + google.maps.fleetengine.delivery.v1.TaskTrackingInfo + .getDefaultInstance())) + .setSchemaDescriptor( + new DeliveryServiceMethodDescriptorSupplier("GetTaskTrackingInfo")) + .build(); + } + } + } + return getGetTaskTrackingInfoMethod; + } + + private static volatile io.grpc.MethodDescriptor< + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest, + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse> + getListDeliveryVehiclesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListDeliveryVehicles", + requestType = google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest.class, + responseType = google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest, + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse> + getListDeliveryVehiclesMethod() { + io.grpc.MethodDescriptor< + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest, + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse> + getListDeliveryVehiclesMethod; + if ((getListDeliveryVehiclesMethod = DeliveryServiceGrpc.getListDeliveryVehiclesMethod) + == null) { + synchronized (DeliveryServiceGrpc.class) { + if ((getListDeliveryVehiclesMethod = DeliveryServiceGrpc.getListDeliveryVehiclesMethod) + == null) { + DeliveryServiceGrpc.getListDeliveryVehiclesMethod = + getListDeliveryVehiclesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListDeliveryVehicles")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DeliveryServiceMethodDescriptorSupplier("ListDeliveryVehicles")) + .build(); + } + } + } + return getListDeliveryVehiclesMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static DeliveryServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DeliveryServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DeliveryServiceStub(channel, callOptions); + } + }; + return DeliveryServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static DeliveryServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DeliveryServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DeliveryServiceBlockingStub(channel, callOptions); + } + }; + return DeliveryServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static DeliveryServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DeliveryServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DeliveryServiceFutureStub(channel, callOptions); + } + }; + return DeliveryServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * The Last Mile Delivery service.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Creates and returns a new `DeliveryVehicle`.
+     * 
+ */ + default void createDeliveryVehicle( + google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateDeliveryVehicleMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns the specified `DeliveryVehicle` instance.
+     * 
+ */ + default void getDeliveryVehicle( + google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetDeliveryVehicleMethod(), responseObserver); + } + + /** + * + * + *
+     * Writes updated `DeliveryVehicle` data to Fleet Engine, and assigns
+     * `Tasks` to the `DeliveryVehicle`. You cannot update the name of the
+     * `DeliveryVehicle`. You *can* update `remaining_vehicle_journey_segments`
+     * though, but it must contain all of the `VehicleJourneySegment`s currently
+     * on the `DeliveryVehicle`. The `task_id`s are retrieved from
+     * `remaining_vehicle_journey_segments`, and their corresponding `Tasks` are
+     * assigned to the `DeliveryVehicle` if they have not yet been assigned.
+     * 
+ */ + default void updateDeliveryVehicle( + google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateDeliveryVehicleMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates and returns a batch of new `Task` objects.
+     * 
+ */ + default void batchCreateTasks( + google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getBatchCreateTasksMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates and returns a new `Task` object.
+     * 
+ */ + default void createTask( + google.maps.fleetengine.delivery.v1.CreateTaskRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateTaskMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets information about a `Task`.
+     * 
+ */ + default void getTask( + google.maps.fleetengine.delivery.v1.GetTaskRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTaskMethod(), responseObserver); + } + + /** + * + * + *
+     * Deprecated: Use `GetTaskTrackingInfo` instead.
+     * 
+ */ + @java.lang.Deprecated + default void searchTasks( + google.maps.fleetengine.delivery.v1.SearchTasksRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSearchTasksMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates `Task` data.
+     * 
+ */ + default void updateTask( + google.maps.fleetengine.delivery.v1.UpdateTaskRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateTaskMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets all `Task`s that meet the specified filtering criteria.
+     * 
+ */ + default void listTasks( + google.maps.fleetengine.delivery.v1.ListTasksRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListTasksMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns the specified `TaskTrackingInfo` instance.
+     * 
+ */ + default void getTaskTrackingInfo( + google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetTaskTrackingInfoMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets all `DeliveryVehicle`s that meet the specified filtering criteria.
+     * 
+ */ + default void listDeliveryVehicles( + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest request, + io.grpc.stub.StreamObserver< + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListDeliveryVehiclesMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service DeliveryService. + * + *
+   * The Last Mile Delivery service.
+   * 
+ */ + public abstract static class DeliveryServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return DeliveryServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service DeliveryService. + * + *
+   * The Last Mile Delivery service.
+   * 
+ */ + public static final class DeliveryServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private DeliveryServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DeliveryServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DeliveryServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates and returns a new `DeliveryVehicle`.
+     * 
+ */ + public void createDeliveryVehicle( + google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateDeliveryVehicleMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns the specified `DeliveryVehicle` instance.
+     * 
+ */ + public void getDeliveryVehicle( + google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetDeliveryVehicleMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Writes updated `DeliveryVehicle` data to Fleet Engine, and assigns
+     * `Tasks` to the `DeliveryVehicle`. You cannot update the name of the
+     * `DeliveryVehicle`. You *can* update `remaining_vehicle_journey_segments`
+     * though, but it must contain all of the `VehicleJourneySegment`s currently
+     * on the `DeliveryVehicle`. The `task_id`s are retrieved from
+     * `remaining_vehicle_journey_segments`, and their corresponding `Tasks` are
+     * assigned to the `DeliveryVehicle` if they have not yet been assigned.
+     * 
+ */ + public void updateDeliveryVehicle( + google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateDeliveryVehicleMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates and returns a batch of new `Task` objects.
+     * 
+ */ + public void batchCreateTasks( + google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBatchCreateTasksMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates and returns a new `Task` object.
+     * 
+ */ + public void createTask( + google.maps.fleetengine.delivery.v1.CreateTaskRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateTaskMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Gets information about a `Task`.
+     * 
+ */ + public void getTask( + google.maps.fleetengine.delivery.v1.GetTaskRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetTaskMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Deprecated: Use `GetTaskTrackingInfo` instead.
+     * 
+ */ + @java.lang.Deprecated + public void searchTasks( + google.maps.fleetengine.delivery.v1.SearchTasksRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSearchTasksMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates `Task` data.
+     * 
+ */ + public void updateTask( + google.maps.fleetengine.delivery.v1.UpdateTaskRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateTaskMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Gets all `Task`s that meet the specified filtering criteria.
+     * 
+ */ + public void listTasks( + google.maps.fleetengine.delivery.v1.ListTasksRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListTasksMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Returns the specified `TaskTrackingInfo` instance.
+     * 
+ */ + public void getTaskTrackingInfo( + google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetTaskTrackingInfoMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets all `DeliveryVehicle`s that meet the specified filtering criteria.
+     * 
+ */ + public void listDeliveryVehicles( + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest request, + io.grpc.stub.StreamObserver< + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListDeliveryVehiclesMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service DeliveryService. + * + *
+   * The Last Mile Delivery service.
+   * 
+ */ + public static final class DeliveryServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private DeliveryServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DeliveryServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DeliveryServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates and returns a new `DeliveryVehicle`.
+     * 
+ */ + public google.maps.fleetengine.delivery.v1.DeliveryVehicle createDeliveryVehicle( + google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateDeliveryVehicleMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns the specified `DeliveryVehicle` instance.
+     * 
+ */ + public google.maps.fleetengine.delivery.v1.DeliveryVehicle getDeliveryVehicle( + google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetDeliveryVehicleMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Writes updated `DeliveryVehicle` data to Fleet Engine, and assigns
+     * `Tasks` to the `DeliveryVehicle`. You cannot update the name of the
+     * `DeliveryVehicle`. You *can* update `remaining_vehicle_journey_segments`
+     * though, but it must contain all of the `VehicleJourneySegment`s currently
+     * on the `DeliveryVehicle`. The `task_id`s are retrieved from
+     * `remaining_vehicle_journey_segments`, and their corresponding `Tasks` are
+     * assigned to the `DeliveryVehicle` if they have not yet been assigned.
+     * 
+ */ + public google.maps.fleetengine.delivery.v1.DeliveryVehicle updateDeliveryVehicle( + google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateDeliveryVehicleMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates and returns a batch of new `Task` objects.
+     * 
+ */ + public google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse batchCreateTasks( + google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBatchCreateTasksMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates and returns a new `Task` object.
+     * 
+ */ + public google.maps.fleetengine.delivery.v1.Task createTask( + google.maps.fleetengine.delivery.v1.CreateTaskRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateTaskMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets information about a `Task`.
+     * 
+ */ + public google.maps.fleetengine.delivery.v1.Task getTask( + google.maps.fleetengine.delivery.v1.GetTaskRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetTaskMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deprecated: Use `GetTaskTrackingInfo` instead.
+     * 
+ */ + @java.lang.Deprecated + public google.maps.fleetengine.delivery.v1.SearchTasksResponse searchTasks( + google.maps.fleetengine.delivery.v1.SearchTasksRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSearchTasksMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates `Task` data.
+     * 
+ */ + public google.maps.fleetengine.delivery.v1.Task updateTask( + google.maps.fleetengine.delivery.v1.UpdateTaskRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateTaskMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets all `Task`s that meet the specified filtering criteria.
+     * 
+ */ + public google.maps.fleetengine.delivery.v1.ListTasksResponse listTasks( + google.maps.fleetengine.delivery.v1.ListTasksRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListTasksMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns the specified `TaskTrackingInfo` instance.
+     * 
+ */ + public google.maps.fleetengine.delivery.v1.TaskTrackingInfo getTaskTrackingInfo( + google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetTaskTrackingInfoMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets all `DeliveryVehicle`s that meet the specified filtering criteria.
+     * 
+ */ + public google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse listDeliveryVehicles( + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListDeliveryVehiclesMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service DeliveryService. + * + *
+   * The Last Mile Delivery service.
+   * 
+ */ + public static final class DeliveryServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private DeliveryServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DeliveryServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DeliveryServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates and returns a new `DeliveryVehicle`.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + google.maps.fleetengine.delivery.v1.DeliveryVehicle> + createDeliveryVehicle( + google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateDeliveryVehicleMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns the specified `DeliveryVehicle` instance.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + google.maps.fleetengine.delivery.v1.DeliveryVehicle> + getDeliveryVehicle(google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetDeliveryVehicleMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Writes updated `DeliveryVehicle` data to Fleet Engine, and assigns
+     * `Tasks` to the `DeliveryVehicle`. You cannot update the name of the
+     * `DeliveryVehicle`. You *can* update `remaining_vehicle_journey_segments`
+     * though, but it must contain all of the `VehicleJourneySegment`s currently
+     * on the `DeliveryVehicle`. The `task_id`s are retrieved from
+     * `remaining_vehicle_journey_segments`, and their corresponding `Tasks` are
+     * assigned to the `DeliveryVehicle` if they have not yet been assigned.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + google.maps.fleetengine.delivery.v1.DeliveryVehicle> + updateDeliveryVehicle( + google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateDeliveryVehicleMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates and returns a batch of new `Task` objects.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse> + batchCreateTasks(google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBatchCreateTasksMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates and returns a new `Task` object.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + google.maps.fleetengine.delivery.v1.Task> + createTask(google.maps.fleetengine.delivery.v1.CreateTaskRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateTaskMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets information about a `Task`.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + google.maps.fleetengine.delivery.v1.Task> + getTask(google.maps.fleetengine.delivery.v1.GetTaskRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetTaskMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deprecated: Use `GetTaskTrackingInfo` instead.
+     * 
+ */ + @java.lang.Deprecated + public com.google.common.util.concurrent.ListenableFuture< + google.maps.fleetengine.delivery.v1.SearchTasksResponse> + searchTasks(google.maps.fleetengine.delivery.v1.SearchTasksRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSearchTasksMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates `Task` data.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + google.maps.fleetengine.delivery.v1.Task> + updateTask(google.maps.fleetengine.delivery.v1.UpdateTaskRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateTaskMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets all `Task`s that meet the specified filtering criteria.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + google.maps.fleetengine.delivery.v1.ListTasksResponse> + listTasks(google.maps.fleetengine.delivery.v1.ListTasksRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListTasksMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns the specified `TaskTrackingInfo` instance.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + google.maps.fleetengine.delivery.v1.TaskTrackingInfo> + getTaskTrackingInfo( + google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetTaskTrackingInfoMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets all `DeliveryVehicle`s that meet the specified filtering criteria.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse> + listDeliveryVehicles( + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListDeliveryVehiclesMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_DELIVERY_VEHICLE = 0; + private static final int METHODID_GET_DELIVERY_VEHICLE = 1; + private static final int METHODID_UPDATE_DELIVERY_VEHICLE = 2; + private static final int METHODID_BATCH_CREATE_TASKS = 3; + private static final int METHODID_CREATE_TASK = 4; + private static final int METHODID_GET_TASK = 5; + private static final int METHODID_SEARCH_TASKS = 6; + private static final int METHODID_UPDATE_TASK = 7; + private static final int METHODID_LIST_TASKS = 8; + private static final int METHODID_GET_TASK_TRACKING_INFO = 9; + private static final int METHODID_LIST_DELIVERY_VEHICLES = 10; + + 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_DELIVERY_VEHICLE: + serviceImpl.createDeliveryVehicle( + (google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_DELIVERY_VEHICLE: + serviceImpl.getDeliveryVehicle( + (google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_DELIVERY_VEHICLE: + serviceImpl.updateDeliveryVehicle( + (google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_BATCH_CREATE_TASKS: + serviceImpl.batchCreateTasks( + (google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest) request, + (io.grpc.stub.StreamObserver< + google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse>) + responseObserver); + break; + case METHODID_CREATE_TASK: + serviceImpl.createTask( + (google.maps.fleetengine.delivery.v1.CreateTaskRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_TASK: + serviceImpl.getTask( + (google.maps.fleetengine.delivery.v1.GetTaskRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_SEARCH_TASKS: + serviceImpl.searchTasks( + (google.maps.fleetengine.delivery.v1.SearchTasksRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_TASK: + serviceImpl.updateTask( + (google.maps.fleetengine.delivery.v1.UpdateTaskRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_TASKS: + serviceImpl.listTasks( + (google.maps.fleetengine.delivery.v1.ListTasksRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_TASK_TRACKING_INFO: + serviceImpl.getTaskTrackingInfo( + (google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_DELIVERY_VEHICLES: + serviceImpl.listDeliveryVehicles( + (google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest) request, + (io.grpc.stub.StreamObserver< + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse>) + 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( + getCreateDeliveryVehicleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest, + google.maps.fleetengine.delivery.v1.DeliveryVehicle>( + service, METHODID_CREATE_DELIVERY_VEHICLE))) + .addMethod( + getGetDeliveryVehicleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest, + google.maps.fleetengine.delivery.v1.DeliveryVehicle>( + service, METHODID_GET_DELIVERY_VEHICLE))) + .addMethod( + getUpdateDeliveryVehicleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest, + google.maps.fleetengine.delivery.v1.DeliveryVehicle>( + service, METHODID_UPDATE_DELIVERY_VEHICLE))) + .addMethod( + getBatchCreateTasksMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest, + google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse>( + service, METHODID_BATCH_CREATE_TASKS))) + .addMethod( + getCreateTaskMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + google.maps.fleetengine.delivery.v1.CreateTaskRequest, + google.maps.fleetengine.delivery.v1.Task>(service, METHODID_CREATE_TASK))) + .addMethod( + getGetTaskMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + google.maps.fleetengine.delivery.v1.GetTaskRequest, + google.maps.fleetengine.delivery.v1.Task>(service, METHODID_GET_TASK))) + .addMethod( + getSearchTasksMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + google.maps.fleetengine.delivery.v1.SearchTasksRequest, + google.maps.fleetengine.delivery.v1.SearchTasksResponse>( + service, METHODID_SEARCH_TASKS))) + .addMethod( + getUpdateTaskMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + google.maps.fleetengine.delivery.v1.UpdateTaskRequest, + google.maps.fleetengine.delivery.v1.Task>(service, METHODID_UPDATE_TASK))) + .addMethod( + getListTasksMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + google.maps.fleetengine.delivery.v1.ListTasksRequest, + google.maps.fleetengine.delivery.v1.ListTasksResponse>( + service, METHODID_LIST_TASKS))) + .addMethod( + getGetTaskTrackingInfoMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest, + google.maps.fleetengine.delivery.v1.TaskTrackingInfo>( + service, METHODID_GET_TASK_TRACKING_INFO))) + .addMethod( + getListDeliveryVehiclesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest, + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse>( + service, METHODID_LIST_DELIVERY_VEHICLES))) + .build(); + } + + private abstract static class DeliveryServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + DeliveryServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryApi.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("DeliveryService"); + } + } + + private static final class DeliveryServiceFileDescriptorSupplier + extends DeliveryServiceBaseDescriptorSupplier { + DeliveryServiceFileDescriptorSupplier() {} + } + + private static final class DeliveryServiceMethodDescriptorSupplier + extends DeliveryServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + DeliveryServiceMethodDescriptorSupplier(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 (DeliveryServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new DeliveryServiceFileDescriptorSupplier()) + .addMethod(getCreateDeliveryVehicleMethod()) + .addMethod(getGetDeliveryVehicleMethod()) + .addMethod(getUpdateDeliveryVehicleMethod()) + .addMethod(getBatchCreateTasksMethod()) + .addMethod(getCreateTaskMethod()) + .addMethod(getGetTaskMethod()) + .addMethod(getSearchTasksMethod()) + .addMethod(getUpdateTaskMethod()) + .addMethod(getListTasksMethod()) + .addMethod(getGetTaskTrackingInfoMethod()) + .addMethod(getListDeliveryVehiclesMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-maps-fleetengine-delivery/owlbot.py b/java-maps-fleetengine-delivery/owlbot.py new file mode 100644 index 000000000000..03c0f6686d3f --- /dev/null +++ b/java-maps-fleetengine-delivery/owlbot.py @@ -0,0 +1,36 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import synthtool as s +from synthtool.languages import java + + +for library in s.get_staging_dirs(): + # put any special-case replacements here + s.move(library) + +s.remove_staging_dirs() +java.common_templates(monorepo=True, excludes=[ + ".github/*", + ".kokoro/*", + "samples/*", + "CODE_OF_CONDUCT.md", + "CONTRIBUTING.md", + "LICENSE", + "SECURITY.md", + "java.header", + "license-checks.xml", + "renovate.json", + ".gitignore" +]) \ No newline at end of file diff --git a/java-maps-fleetengine-delivery/pom.xml b/java-maps-fleetengine-delivery/pom.xml new file mode 100644 index 000000000000..03b470771f51 --- /dev/null +++ b/java-maps-fleetengine-delivery/pom.xml @@ -0,0 +1,54 @@ + + + 4.0.0 + com.google.maps + google-maps-fleetengine-delivery-parent + pom + 0.0.1-SNAPSHOT + Google Last Mile Fleet Solution Delivery API Parent + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-jar-parent + 1.24.0-SNAPSHOT + ../google-cloud-jar-parent/pom.xml + + + + UTF-8 + UTF-8 + github + google-maps-fleetengine-delivery-parent + + + + + + com.google.maps + google-maps-fleetengine-delivery + 0.0.1-SNAPSHOT + + + com.google.maps.api.grpc + grpc-google-maps-fleetengine-delivery-v1 + 0.0.1-SNAPSHOT + + + com.google.maps.api.grpc + proto-google-maps-fleetengine-delivery-v1 + 0.0.1-SNAPSHOT + + + + + + google-maps-fleetengine-delivery + grpc-google-maps-fleetengine-delivery-v1 + proto-google-maps-fleetengine-delivery-v1 + google-maps-fleetengine-delivery-bom + + + diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/clirr-ignored-differences.xml b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/clirr-ignored-differences.xml new file mode 100644 index 000000000000..7f939290cbe4 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/clirr-ignored-differences.xml @@ -0,0 +1,19 @@ + + + + + 7012 + google/maps/fleetengine/delivery/v1/*OrBuilder + * get*(*) + + + 7012 + google/maps/fleetengine/delivery/v1/*OrBuilder + boolean contains*(*) + + + 7012 + google/maps/fleetengine/delivery/v1/*OrBuilder + boolean has*(*) + + diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/pom.xml b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/pom.xml new file mode 100644 index 000000000000..f00b9cdce593 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/pom.xml @@ -0,0 +1,37 @@ + + 4.0.0 + com.google.maps.api.grpc + proto-google-maps-fleetengine-delivery-v1 + 0.0.1-SNAPSHOT + proto-google-maps-fleetengine-delivery-v1 + Proto library for google-maps-fleetengine-delivery + + com.google.maps + google-maps-fleetengine-delivery-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-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/BatchCreateTasksRequest.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/BatchCreateTasksRequest.java new file mode 100644 index 000000000000..8fa60ccd9eee --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/BatchCreateTasksRequest.java @@ -0,0 +1,1567 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_api.proto + +package google.maps.fleetengine.delivery.v1; + +/** + * + * + *
+ * The `BatchCreateTask` request message.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.BatchCreateTasksRequest} + */ +public final class BatchCreateTasksRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.delivery.v1.BatchCreateTasksRequest) + BatchCreateTasksRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchCreateTasksRequest.newBuilder() to construct. + private BatchCreateTasksRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchCreateTasksRequest() { + parent_ = ""; + requests_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchCreateTasksRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_BatchCreateTasksRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_BatchCreateTasksRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest.class, + google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest.Builder.class); + } + + public static final int HEADER_FIELD_NUMBER = 1; + private google.maps.fleetengine.delivery.v1.DeliveryRequestHeader header_; + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * Note: If you set this field, then the header field in the
+   * `CreateTaskRequest` messages must either be empty, or it must match this
+   * field.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the header field is set. + */ + @java.lang.Override + public boolean hasHeader() { + return header_ != null; + } + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * Note: If you set this field, then the header field in the
+   * `CreateTaskRequest` messages must either be empty, or it must match this
+   * field.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The header. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader getHeader() { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance() + : header_; + } + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * Note: If you set this field, then the header field in the
+   * `CreateTaskRequest` messages must either be empty, or it must match this
+   * field.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder getHeaderOrBuilder() { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance() + : header_; + } + + public static final int PARENT_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent resource shared by all tasks. This value must be in
+   * the format `providers/{provider}`. The `provider` must be the Google Cloud
+   * Project ID. For example, `sample-cloud-project`. The parent field in the
+   * `CreateTaskRequest` messages must either  be empty, or it must match this
+   * field.
+   * 
+ * + * + * 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. The parent resource shared by all tasks. This value must be in
+   * the format `providers/{provider}`. The `provider` must be the Google Cloud
+   * Project ID. For example, `sample-cloud-project`. The parent field in the
+   * `CreateTaskRequest` messages must either  be empty, or it must match this
+   * field.
+   * 
+ * + * + * 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 REQUESTS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List requests_; + /** + * + * + *
+   * Required. The request message that specifies the resources to create.
+   * Note: You can create a maximum of 500 tasks in a batch.
+   * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.CreateTaskRequest requests = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getRequestsList() { + return requests_; + } + /** + * + * + *
+   * Required. The request message that specifies the resources to create.
+   * Note: You can create a maximum of 500 tasks in a batch.
+   * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.CreateTaskRequest requests = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getRequestsOrBuilderList() { + return requests_; + } + /** + * + * + *
+   * Required. The request message that specifies the resources to create.
+   * Note: You can create a maximum of 500 tasks in a batch.
+   * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.CreateTaskRequest requests = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getRequestsCount() { + return requests_.size(); + } + /** + * + * + *
+   * Required. The request message that specifies the resources to create.
+   * Note: You can create a maximum of 500 tasks in a batch.
+   * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.CreateTaskRequest requests = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.CreateTaskRequest getRequests(int index) { + return requests_.get(index); + } + /** + * + * + *
+   * Required. The request message that specifies the resources to create.
+   * Note: You can create a maximum of 500 tasks in a batch.
+   * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.CreateTaskRequest requests = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.CreateTaskRequestOrBuilder getRequestsOrBuilder( + int index) { + return requests_.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 (header_ != null) { + output.writeMessage(1, getHeader()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, parent_); + } + for (int i = 0; i < requests_.size(); i++) { + output.writeMessage(4, requests_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (header_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getHeader()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, parent_); + } + for (int i = 0; i < requests_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, requests_.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 google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest)) { + return super.equals(obj); + } + google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest other = + (google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest) obj; + + if (hasHeader() != other.hasHeader()) return false; + if (hasHeader()) { + if (!getHeader().equals(other.getHeader())) return false; + } + if (!getParent().equals(other.getParent())) return false; + if (!getRequestsList().equals(other.getRequestsList())) 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 (getRequestsCount() > 0) { + hash = (37 * hash) + REQUESTS_FIELD_NUMBER; + hash = (53 * hash) + getRequestsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest 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 google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest 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 google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest 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( + google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest 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 `BatchCreateTask` request message.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.BatchCreateTasksRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.delivery.v1.BatchCreateTasksRequest) + google.maps.fleetengine.delivery.v1.BatchCreateTasksRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_BatchCreateTasksRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_BatchCreateTasksRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest.class, + google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest.Builder.class); + } + + // Construct using google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + parent_ = ""; + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + } else { + requests_ = null; + requestsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_BatchCreateTasksRequest_descriptor; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest getDefaultInstanceForType() { + return google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest.getDefaultInstance(); + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest build() { + google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest buildPartial() { + google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest result = + new google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest result) { + if (requestsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + requests_ = java.util.Collections.unmodifiableList(requests_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.requests_ = requests_; + } else { + result.requests_ = requestsBuilder_.build(); + } + } + + private void buildPartial0(google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.header_ = headerBuilder_ == null ? header_ : headerBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.parent_ = parent_; + } + } + + @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 google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest) { + return mergeFrom((google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest other) { + if (other == google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest.getDefaultInstance()) + return this; + if (other.hasHeader()) { + mergeHeader(other.getHeader()); + } + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (requestsBuilder_ == null) { + if (!other.requests_.isEmpty()) { + if (requests_.isEmpty()) { + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureRequestsIsMutable(); + requests_.addAll(other.requests_); + } + onChanged(); + } + } else { + if (!other.requests_.isEmpty()) { + if (requestsBuilder_.isEmpty()) { + requestsBuilder_.dispose(); + requestsBuilder_ = null; + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000004); + requestsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRequestsFieldBuilder() + : null; + } else { + requestsBuilder_.addAllMessages(other.requests_); + } + } + } + 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: + { + google.maps.fleetengine.delivery.v1.CreateTaskRequest m = + input.readMessage( + google.maps.fleetengine.delivery.v1.CreateTaskRequest.parser(), + extensionRegistry); + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(m); + } else { + requestsBuilder_.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 google.maps.fleetengine.delivery.v1.DeliveryRequestHeader header_; + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder> + headerBuilder_; + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * Note: If you set this field, then the header field in the
+     * `CreateTaskRequest` messages must either be empty, or it must match this
+     * field.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the header field is set. + */ + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * Note: If you set this field, then the header field in the
+     * `CreateTaskRequest` messages must either be empty, or it must match this
+     * field.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The header. + */ + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader getHeader() { + if (headerBuilder_ == null) { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance() + : header_; + } else { + return headerBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * Note: If you set this field, then the header field in the
+     * `CreateTaskRequest` messages must either be empty, or it must match this
+     * field.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHeader(google.maps.fleetengine.delivery.v1.DeliveryRequestHeader value) { + if (headerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + header_ = value; + } else { + headerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * Note: If you set this field, then the header field in the
+     * `CreateTaskRequest` messages must either be empty, or it must match this
+     * field.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHeader( + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder builderForValue) { + if (headerBuilder_ == null) { + header_ = builderForValue.build(); + } else { + headerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * Note: If you set this field, then the header field in the
+     * `CreateTaskRequest` messages must either be empty, or it must match this
+     * field.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeHeader(google.maps.fleetengine.delivery.v1.DeliveryRequestHeader value) { + if (headerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && header_ != null + && header_ + != google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance()) { + getHeaderBuilder().mergeFrom(value); + } else { + header_ = value; + } + } else { + headerBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * Note: If you set this field, then the header field in the
+     * `CreateTaskRequest` messages must either be empty, or it must match this
+     * field.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearHeader() { + bitField0_ = (bitField0_ & ~0x00000001); + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * Note: If you set this field, then the header field in the
+     * `CreateTaskRequest` messages must either be empty, or it must match this
+     * field.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder getHeaderBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getHeaderFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * Note: If you set this field, then the header field in the
+     * `CreateTaskRequest` messages must either be empty, or it must match this
+     * field.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder getHeaderOrBuilder() { + if (headerBuilder_ != null) { + return headerBuilder_.getMessageOrBuilder(); + } else { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance() + : header_; + } + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * Note: If you set this field, then the header field in the
+     * `CreateTaskRequest` messages must either be empty, or it must match this
+     * field.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder> + getHeaderFieldBuilder() { + if (headerBuilder_ == null) { + headerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder>( + getHeader(), getParentForChildren(), isClean()); + header_ = null; + } + return headerBuilder_; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent resource shared by all tasks. This value must be in
+     * the format `providers/{provider}`. The `provider` must be the Google Cloud
+     * Project ID. For example, `sample-cloud-project`. The parent field in the
+     * `CreateTaskRequest` messages must either  be empty, or it must match this
+     * field.
+     * 
+ * + * + * 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. The parent resource shared by all tasks. This value must be in
+     * the format `providers/{provider}`. The `provider` must be the Google Cloud
+     * Project ID. For example, `sample-cloud-project`. The parent field in the
+     * `CreateTaskRequest` messages must either  be empty, or it must match this
+     * field.
+     * 
+ * + * + * 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. The parent resource shared by all tasks. This value must be in
+     * the format `providers/{provider}`. The `provider` must be the Google Cloud
+     * Project ID. For example, `sample-cloud-project`. The parent field in the
+     * `CreateTaskRequest` messages must either  be empty, or it must match this
+     * field.
+     * 
+ * + * + * 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. The parent resource shared by all tasks. This value must be in
+     * the format `providers/{provider}`. The `provider` must be the Google Cloud
+     * Project ID. For example, `sample-cloud-project`. The parent field in the
+     * `CreateTaskRequest` messages must either  be empty, or it must match this
+     * field.
+     * 
+ * + * + * 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. The parent resource shared by all tasks. This value must be in
+     * the format `providers/{provider}`. The `provider` must be the Google Cloud
+     * Project ID. For example, `sample-cloud-project`. The parent field in the
+     * `CreateTaskRequest` messages must either  be empty, or it must match this
+     * field.
+     * 
+ * + * + * 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.util.List requests_ = + java.util.Collections.emptyList(); + + private void ensureRequestsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + requests_ = + new java.util.ArrayList( + requests_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + google.maps.fleetengine.delivery.v1.CreateTaskRequest, + google.maps.fleetengine.delivery.v1.CreateTaskRequest.Builder, + google.maps.fleetengine.delivery.v1.CreateTaskRequestOrBuilder> + requestsBuilder_; + + /** + * + * + *
+     * Required. The request message that specifies the resources to create.
+     * Note: You can create a maximum of 500 tasks in a batch.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.CreateTaskRequest requests = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getRequestsList() { + if (requestsBuilder_ == null) { + return java.util.Collections.unmodifiableList(requests_); + } else { + return requestsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. The request message that specifies the resources to create.
+     * Note: You can create a maximum of 500 tasks in a batch.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.CreateTaskRequest requests = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getRequestsCount() { + if (requestsBuilder_ == null) { + return requests_.size(); + } else { + return requestsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. The request message that specifies the resources to create.
+     * Note: You can create a maximum of 500 tasks in a batch.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.CreateTaskRequest requests = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public google.maps.fleetengine.delivery.v1.CreateTaskRequest getRequests(int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); + } else { + return requestsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. The request message that specifies the resources to create.
+     * Note: You can create a maximum of 500 tasks in a batch.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.CreateTaskRequest requests = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRequests( + int index, google.maps.fleetengine.delivery.v1.CreateTaskRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.set(index, value); + onChanged(); + } else { + requestsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The request message that specifies the resources to create.
+     * Note: You can create a maximum of 500 tasks in a batch.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.CreateTaskRequest requests = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRequests( + int index, google.maps.fleetengine.delivery.v1.CreateTaskRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.set(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The request message that specifies the resources to create.
+     * Note: You can create a maximum of 500 tasks in a batch.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.CreateTaskRequest requests = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRequests(google.maps.fleetengine.delivery.v1.CreateTaskRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(value); + onChanged(); + } else { + requestsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. The request message that specifies the resources to create.
+     * Note: You can create a maximum of 500 tasks in a batch.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.CreateTaskRequest requests = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRequests( + int index, google.maps.fleetengine.delivery.v1.CreateTaskRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(index, value); + onChanged(); + } else { + requestsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The request message that specifies the resources to create.
+     * Note: You can create a maximum of 500 tasks in a batch.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.CreateTaskRequest requests = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRequests( + google.maps.fleetengine.delivery.v1.CreateTaskRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The request message that specifies the resources to create.
+     * Note: You can create a maximum of 500 tasks in a batch.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.CreateTaskRequest requests = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRequests( + int index, google.maps.fleetengine.delivery.v1.CreateTaskRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The request message that specifies the resources to create.
+     * Note: You can create a maximum of 500 tasks in a batch.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.CreateTaskRequest requests = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllRequests( + java.lang.Iterable + values) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, requests_); + onChanged(); + } else { + requestsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. The request message that specifies the resources to create.
+     * Note: You can create a maximum of 500 tasks in a batch.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.CreateTaskRequest requests = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearRequests() { + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + requestsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. The request message that specifies the resources to create.
+     * Note: You can create a maximum of 500 tasks in a batch.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.CreateTaskRequest requests = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeRequests(int index) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.remove(index); + onChanged(); + } else { + requestsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. The request message that specifies the resources to create.
+     * Note: You can create a maximum of 500 tasks in a batch.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.CreateTaskRequest requests = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public google.maps.fleetengine.delivery.v1.CreateTaskRequest.Builder getRequestsBuilder( + int index) { + return getRequestsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. The request message that specifies the resources to create.
+     * Note: You can create a maximum of 500 tasks in a batch.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.CreateTaskRequest requests = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public google.maps.fleetengine.delivery.v1.CreateTaskRequestOrBuilder getRequestsOrBuilder( + int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); + } else { + return requestsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. The request message that specifies the resources to create.
+     * Note: You can create a maximum of 500 tasks in a batch.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.CreateTaskRequest requests = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getRequestsOrBuilderList() { + if (requestsBuilder_ != null) { + return requestsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(requests_); + } + } + /** + * + * + *
+     * Required. The request message that specifies the resources to create.
+     * Note: You can create a maximum of 500 tasks in a batch.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.CreateTaskRequest requests = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public google.maps.fleetengine.delivery.v1.CreateTaskRequest.Builder addRequestsBuilder() { + return getRequestsFieldBuilder() + .addBuilder(google.maps.fleetengine.delivery.v1.CreateTaskRequest.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The request message that specifies the resources to create.
+     * Note: You can create a maximum of 500 tasks in a batch.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.CreateTaskRequest requests = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public google.maps.fleetengine.delivery.v1.CreateTaskRequest.Builder addRequestsBuilder( + int index) { + return getRequestsFieldBuilder() + .addBuilder( + index, google.maps.fleetengine.delivery.v1.CreateTaskRequest.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The request message that specifies the resources to create.
+     * Note: You can create a maximum of 500 tasks in a batch.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.CreateTaskRequest requests = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getRequestsBuilderList() { + return getRequestsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + google.maps.fleetengine.delivery.v1.CreateTaskRequest, + google.maps.fleetengine.delivery.v1.CreateTaskRequest.Builder, + google.maps.fleetengine.delivery.v1.CreateTaskRequestOrBuilder> + getRequestsFieldBuilder() { + if (requestsBuilder_ == null) { + requestsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + google.maps.fleetengine.delivery.v1.CreateTaskRequest, + google.maps.fleetengine.delivery.v1.CreateTaskRequest.Builder, + google.maps.fleetengine.delivery.v1.CreateTaskRequestOrBuilder>( + requests_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + requests_ = null; + } + return requestsBuilder_; + } + + @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.delivery.v1.BatchCreateTasksRequest) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.delivery.v1.BatchCreateTasksRequest) + private static final google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest(); + } + + public static google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchCreateTasksRequest 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 google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/BatchCreateTasksRequestOrBuilder.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/BatchCreateTasksRequestOrBuilder.java new file mode 100644 index 000000000000..f7130a6e776d --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/BatchCreateTasksRequestOrBuilder.java @@ -0,0 +1,179 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_api.proto + +package google.maps.fleetengine.delivery.v1; + +public interface BatchCreateTasksRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.delivery.v1.BatchCreateTasksRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * Note: If you set this field, then the header field in the
+   * `CreateTaskRequest` messages must either be empty, or it must match this
+   * field.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the header field is set. + */ + boolean hasHeader(); + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * Note: If you set this field, then the header field in the
+   * `CreateTaskRequest` messages must either be empty, or it must match this
+   * field.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The header. + */ + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader getHeader(); + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * Note: If you set this field, then the header field in the
+   * `CreateTaskRequest` messages must either be empty, or it must match this
+   * field.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder getHeaderOrBuilder(); + + /** + * + * + *
+   * Required. The parent resource shared by all tasks. This value must be in
+   * the format `providers/{provider}`. The `provider` must be the Google Cloud
+   * Project ID. For example, `sample-cloud-project`. The parent field in the
+   * `CreateTaskRequest` messages must either  be empty, or it must match this
+   * field.
+   * 
+ * + * + * string parent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent resource shared by all tasks. This value must be in
+   * the format `providers/{provider}`. The `provider` must be the Google Cloud
+   * Project ID. For example, `sample-cloud-project`. The parent field in the
+   * `CreateTaskRequest` messages must either  be empty, or it must match this
+   * field.
+   * 
+ * + * + * string parent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The request message that specifies the resources to create.
+   * Note: You can create a maximum of 500 tasks in a batch.
+   * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.CreateTaskRequest requests = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getRequestsList(); + /** + * + * + *
+   * Required. The request message that specifies the resources to create.
+   * Note: You can create a maximum of 500 tasks in a batch.
+   * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.CreateTaskRequest requests = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + google.maps.fleetengine.delivery.v1.CreateTaskRequest getRequests(int index); + /** + * + * + *
+   * Required. The request message that specifies the resources to create.
+   * Note: You can create a maximum of 500 tasks in a batch.
+   * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.CreateTaskRequest requests = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getRequestsCount(); + /** + * + * + *
+   * Required. The request message that specifies the resources to create.
+   * Note: You can create a maximum of 500 tasks in a batch.
+   * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.CreateTaskRequest requests = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getRequestsOrBuilderList(); + /** + * + * + *
+   * Required. The request message that specifies the resources to create.
+   * Note: You can create a maximum of 500 tasks in a batch.
+   * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.CreateTaskRequest requests = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + google.maps.fleetengine.delivery.v1.CreateTaskRequestOrBuilder getRequestsOrBuilder(int index); +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/BatchCreateTasksResponse.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/BatchCreateTasksResponse.java new file mode 100644 index 000000000000..beb834d23177 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/BatchCreateTasksResponse.java @@ -0,0 +1,939 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_api.proto + +package google.maps.fleetengine.delivery.v1; + +/** + * + * + *
+ * The `BatchCreateTask` response message.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.BatchCreateTasksResponse} + */ +public final class BatchCreateTasksResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.delivery.v1.BatchCreateTasksResponse) + BatchCreateTasksResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchCreateTasksResponse.newBuilder() to construct. + private BatchCreateTasksResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchCreateTasksResponse() { + tasks_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchCreateTasksResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_BatchCreateTasksResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_BatchCreateTasksResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse.class, + google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse.Builder.class); + } + + public static final int TASKS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List tasks_; + /** + * + * + *
+   * The created Tasks.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + @java.lang.Override + public java.util.List getTasksList() { + return tasks_; + } + /** + * + * + *
+   * The created Tasks.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + @java.lang.Override + public java.util.List + getTasksOrBuilderList() { + return tasks_; + } + /** + * + * + *
+   * The created Tasks.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + @java.lang.Override + public int getTasksCount() { + return tasks_.size(); + } + /** + * + * + *
+   * The created Tasks.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.Task getTasks(int index) { + return tasks_.get(index); + } + /** + * + * + *
+   * The created Tasks.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TaskOrBuilder getTasksOrBuilder(int index) { + return tasks_.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 < tasks_.size(); i++) { + output.writeMessage(1, tasks_.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 < tasks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, tasks_.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 google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse)) { + return super.equals(obj); + } + google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse other = + (google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse) obj; + + if (!getTasksList().equals(other.getTasksList())) 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 (getTasksCount() > 0) { + hash = (37 * hash) + TASKS_FIELD_NUMBER; + hash = (53 * hash) + getTasksList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse 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 google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse 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 google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse 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( + google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse 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 `BatchCreateTask` response message.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.BatchCreateTasksResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.delivery.v1.BatchCreateTasksResponse) + google.maps.fleetengine.delivery.v1.BatchCreateTasksResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_BatchCreateTasksResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_BatchCreateTasksResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse.class, + google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse.Builder.class); + } + + // Construct using google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (tasksBuilder_ == null) { + tasks_ = java.util.Collections.emptyList(); + } else { + tasks_ = null; + tasksBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_BatchCreateTasksResponse_descriptor; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse + getDefaultInstanceForType() { + return google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse.getDefaultInstance(); + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse build() { + google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse buildPartial() { + google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse result = + new google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse result) { + if (tasksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + tasks_ = java.util.Collections.unmodifiableList(tasks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tasks_ = tasks_; + } else { + result.tasks_ = tasksBuilder_.build(); + } + } + + private void buildPartial0( + google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse 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 google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse) { + return mergeFrom((google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse other) { + if (other + == google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse.getDefaultInstance()) + return this; + if (tasksBuilder_ == null) { + if (!other.tasks_.isEmpty()) { + if (tasks_.isEmpty()) { + tasks_ = other.tasks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTasksIsMutable(); + tasks_.addAll(other.tasks_); + } + onChanged(); + } + } else { + if (!other.tasks_.isEmpty()) { + if (tasksBuilder_.isEmpty()) { + tasksBuilder_.dispose(); + tasksBuilder_ = null; + tasks_ = other.tasks_; + bitField0_ = (bitField0_ & ~0x00000001); + tasksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTasksFieldBuilder() + : null; + } else { + tasksBuilder_.addAllMessages(other.tasks_); + } + } + } + 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: + { + google.maps.fleetengine.delivery.v1.Task m = + input.readMessage( + google.maps.fleetengine.delivery.v1.Task.parser(), extensionRegistry); + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + tasks_.add(m); + } else { + tasksBuilder_.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 tasks_ = + java.util.Collections.emptyList(); + + private void ensureTasksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + tasks_ = new java.util.ArrayList(tasks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + google.maps.fleetengine.delivery.v1.Task, + google.maps.fleetengine.delivery.v1.Task.Builder, + google.maps.fleetengine.delivery.v1.TaskOrBuilder> + tasksBuilder_; + + /** + * + * + *
+     * The created Tasks.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public java.util.List getTasksList() { + if (tasksBuilder_ == null) { + return java.util.Collections.unmodifiableList(tasks_); + } else { + return tasksBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The created Tasks.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public int getTasksCount() { + if (tasksBuilder_ == null) { + return tasks_.size(); + } else { + return tasksBuilder_.getCount(); + } + } + /** + * + * + *
+     * The created Tasks.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public google.maps.fleetengine.delivery.v1.Task getTasks(int index) { + if (tasksBuilder_ == null) { + return tasks_.get(index); + } else { + return tasksBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The created Tasks.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public Builder setTasks(int index, google.maps.fleetengine.delivery.v1.Task value) { + if (tasksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTasksIsMutable(); + tasks_.set(index, value); + onChanged(); + } else { + tasksBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The created Tasks.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public Builder setTasks( + int index, google.maps.fleetengine.delivery.v1.Task.Builder builderForValue) { + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + tasks_.set(index, builderForValue.build()); + onChanged(); + } else { + tasksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The created Tasks.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public Builder addTasks(google.maps.fleetengine.delivery.v1.Task value) { + if (tasksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTasksIsMutable(); + tasks_.add(value); + onChanged(); + } else { + tasksBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The created Tasks.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public Builder addTasks(int index, google.maps.fleetengine.delivery.v1.Task value) { + if (tasksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTasksIsMutable(); + tasks_.add(index, value); + onChanged(); + } else { + tasksBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The created Tasks.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public Builder addTasks(google.maps.fleetengine.delivery.v1.Task.Builder builderForValue) { + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + tasks_.add(builderForValue.build()); + onChanged(); + } else { + tasksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The created Tasks.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public Builder addTasks( + int index, google.maps.fleetengine.delivery.v1.Task.Builder builderForValue) { + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + tasks_.add(index, builderForValue.build()); + onChanged(); + } else { + tasksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The created Tasks.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public Builder addAllTasks( + java.lang.Iterable values) { + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tasks_); + onChanged(); + } else { + tasksBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The created Tasks.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public Builder clearTasks() { + if (tasksBuilder_ == null) { + tasks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + tasksBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The created Tasks.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public Builder removeTasks(int index) { + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + tasks_.remove(index); + onChanged(); + } else { + tasksBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The created Tasks.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public google.maps.fleetengine.delivery.v1.Task.Builder getTasksBuilder(int index) { + return getTasksFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The created Tasks.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public google.maps.fleetengine.delivery.v1.TaskOrBuilder getTasksOrBuilder(int index) { + if (tasksBuilder_ == null) { + return tasks_.get(index); + } else { + return tasksBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The created Tasks.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public java.util.List + getTasksOrBuilderList() { + if (tasksBuilder_ != null) { + return tasksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tasks_); + } + } + /** + * + * + *
+     * The created Tasks.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public google.maps.fleetengine.delivery.v1.Task.Builder addTasksBuilder() { + return getTasksFieldBuilder() + .addBuilder(google.maps.fleetengine.delivery.v1.Task.getDefaultInstance()); + } + /** + * + * + *
+     * The created Tasks.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public google.maps.fleetengine.delivery.v1.Task.Builder addTasksBuilder(int index) { + return getTasksFieldBuilder() + .addBuilder(index, google.maps.fleetengine.delivery.v1.Task.getDefaultInstance()); + } + /** + * + * + *
+     * The created Tasks.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public java.util.List getTasksBuilderList() { + return getTasksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + google.maps.fleetengine.delivery.v1.Task, + google.maps.fleetengine.delivery.v1.Task.Builder, + google.maps.fleetengine.delivery.v1.TaskOrBuilder> + getTasksFieldBuilder() { + if (tasksBuilder_ == null) { + tasksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + google.maps.fleetengine.delivery.v1.Task, + google.maps.fleetengine.delivery.v1.Task.Builder, + google.maps.fleetengine.delivery.v1.TaskOrBuilder>( + tasks_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + tasks_ = null; + } + return tasksBuilder_; + } + + @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.delivery.v1.BatchCreateTasksResponse) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.delivery.v1.BatchCreateTasksResponse) + private static final google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse(); + } + + public static google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchCreateTasksResponse 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 google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/BatchCreateTasksResponseOrBuilder.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/BatchCreateTasksResponseOrBuilder.java new file mode 100644 index 000000000000..28b423a7e9bf --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/BatchCreateTasksResponseOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_api.proto + +package google.maps.fleetengine.delivery.v1; + +public interface BatchCreateTasksResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.delivery.v1.BatchCreateTasksResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The created Tasks.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + java.util.List getTasksList(); + /** + * + * + *
+   * The created Tasks.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + google.maps.fleetengine.delivery.v1.Task getTasks(int index); + /** + * + * + *
+   * The created Tasks.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + int getTasksCount(); + /** + * + * + *
+   * The created Tasks.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + java.util.List + getTasksOrBuilderList(); + /** + * + * + *
+   * The created Tasks.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + google.maps.fleetengine.delivery.v1.TaskOrBuilder getTasksOrBuilder(int index); +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/Common.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/Common.java new file mode 100644 index 000000000000..c35f93f44a8b --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/Common.java @@ -0,0 +1,212 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/common.proto + +package google.maps.fleetengine.delivery.v1; + +public final class Common { + private Common() {} + + 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_delivery_v1_DeliveryVehicleAttribute_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_delivery_v1_DeliveryVehicleAttribute_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_delivery_v1_DeliveryVehicleLocation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_delivery_v1_DeliveryVehicleLocation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_delivery_v1_TimeWindow_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_delivery_v1_TimeWindow_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_delivery_v1_TaskAttribute_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_delivery_v1_TaskAttribute_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n0google/maps/fleetengine/delivery/v1/co" + + "mmon.proto\022\034maps.fleetengine.delivery.v1" + + "\032\037google/api/field_behavior.proto\032\037googl" + + "e/protobuf/timestamp.proto\032\036google/proto" + + "buf/wrappers.proto\032\030google/type/latlng.p" + + "roto\"\240\001\n\030DeliveryVehicleAttribute\022\013\n\003key" + + "\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\022\026\n\014string_value\030\003 " + + "\001(\tH\000\022\024\n\nbool_value\030\004 \001(\010H\000\022\026\n\014number_va" + + "lue\030\005 \001(\001H\000B\"\n delivery_vehicle_attribut" + + "e_value\"\370\014\n\027DeliveryVehicleLocation\022%\n\010l" + + "ocation\030\001 \001(\0132\023.google.type.LatLng\022=\n\023ho" + + "rizontal_accuracy\030\010 \001(\0132\034.google.protobu" + + "f.DoubleValueB\002\030\001\0225\n\017latlng_accuracy\030\026 \001" + + "(\0132\034.google.protobuf.DoubleValue\022,\n\007head" + + "ing\030\002 \001(\0132\033.google.protobuf.Int32Value\022:" + + "\n\020bearing_accuracy\030\n \001(\0132\034.google.protob" + + "uf.DoubleValueB\002\030\001\0226\n\020heading_accuracy\030\027" + + " \001(\0132\034.google.protobuf.DoubleValue\022.\n\010al" + + "titude\030\005 \001(\0132\034.google.protobuf.DoubleVal" + + "ue\022;\n\021vertical_accuracy\030\t \001(\0132\034.google.p" + + "rotobuf.DoubleValueB\002\030\001\0227\n\021altitude_accu" + + "racy\030\030 \001(\0132\034.google.protobuf.DoubleValue" + + "\0223\n\nspeed_kmph\030\003 \001(\0132\033.google.protobuf.I" + + "nt32ValueB\002\030\001\022+\n\005speed\030\006 \001(\0132\034.google.pr" + + "otobuf.DoubleValue\0224\n\016speed_accuracy\030\007 \001" + + "(\0132\034.google.protobuf.DoubleValue\022/\n\013upda" + + "te_time\030\004 \001(\0132\032.google.protobuf.Timestam" + + "p\0225\n\013server_time\030\r \001(\0132\032.google.protobuf" + + ".TimestampB\004\342A\001\003\022T\n\017location_sensor\030\013 \001(" + + "\0162;.maps.fleetengine.delivery.v1.Deliver" + + "yVehicleLocationSensor\0223\n\017is_road_snappe" + + "d\030\033 \001(\0132\032.google.protobuf.BoolValue\022?\n\025i" + + "s_gps_sensor_enabled\030\014 \001(\0132\032.google.prot" + + "obuf.BoolValueB\004\342A\001\004\022<\n\021time_since_updat" + + "e\030\016 \001(\0132\033.google.protobuf.Int32ValueB\004\342A" + + "\001\004\022>\n\021num_stale_updates\030\017 \001(\0132\033.google.p" + + "rotobuf.Int32ValueB\006\030\001\342A\001\004\022)\n\014raw_locati" + + "on\030\020 \001(\0132\023.google.type.LatLng\0225\n\021raw_loc" + + "ation_time\030\021 \001(\0132\032.google.protobuf.Times" + + "tamp\022X\n\023raw_location_sensor\030\034 \001(\0162;.maps" + + ".fleetengine.delivery.v1.DeliveryVehicle" + + "LocationSensor\022;\n\025raw_location_accuracy\030" + + "\031 \001(\0132\034.google.protobuf.DoubleValue\0222\n\025s" + + "upplemental_location\030\022 \001(\0132\023.google.type" + + ".LatLng\022>\n\032supplemental_location_time\030\023 " + + "\001(\0132\032.google.protobuf.Timestamp\022a\n\034suppl" + + "emental_location_sensor\030\024 \001(\0162;.maps.fle" + + "etengine.delivery.v1.DeliveryVehicleLoca" + + "tionSensor\022D\n\036supplemental_location_accu" + + "racy\030\025 \001(\0132\034.google.protobuf.DoubleValue" + + "\022\030\n\014road_snapped\030\032 \001(\010B\002\030\001\"v\n\nTimeWindow" + + "\0224\n\nstart_time\030\001 \001(\0132\032.google.protobuf.T" + + "imestampB\004\342A\001\002\0222\n\010end_time\030\002 \001(\0132\032.googl" + + "e.protobuf.TimestampB\004\342A\001\002\"z\n\rTaskAttrib" + + "ute\022\013\n\003key\030\001 \001(\t\022\026\n\014string_value\030\002 \001(\tH\000" + + "\022\024\n\nbool_value\030\003 \001(\010H\000\022\026\n\014number_value\030\004" + + " \001(\001H\000B\026\n\024task_attribute_value*\346\001\n\035Deliv" + + "eryVehicleLocationSensor\022\022\n\016UNKNOWN_SENS" + + "OR\020\000\022\007\n\003GPS\020\001\022\013\n\007NETWORK\020\002\022\013\n\007PASSIVE\020\003\022" + + "\"\n\036ROAD_SNAPPED_LOCATION_PROVIDER\020\004\022\036\n\032C" + + "USTOMER_SUPPLIED_LOCATION\020\005\022\031\n\025FLEET_ENG" + + "INE_LOCATION\020\006\022\033\n\027FUSED_LOCATION_PROVIDE" + + "R\020d\022\022\n\rCORE_LOCATION\020\310\001*\230\001\n\037DeliveryVehi" + + "cleNavigationStatus\022\035\n\031UNKNOWN_NAVIGATIO" + + "N_STATUS\020\000\022\017\n\013NO_GUIDANCE\020\001\022\032\n\026ENROUTE_T" + + "O_DESTINATION\020\002\022\r\n\tOFF_ROUTE\020\003\022\032\n\026ARRIVE" + + "D_AT_DESTINATION\020\004B\247\001\n#google.maps.fleet" + + "engine.delivery.v1B\006CommonP\001ZIcloud.goog" + + "le.com/go/maps/fleetengine/delivery/apiv" + + "1/deliverypb;deliverypb\242\002\004CFED\252\002#Google." + + "Maps.FleetEngine.Delivery.V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.protobuf.WrappersProto.getDescriptor(), + com.google.type.LatLngProto.getDescriptor(), + }); + internal_static_maps_fleetengine_delivery_v1_DeliveryVehicleAttribute_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_maps_fleetengine_delivery_v1_DeliveryVehicleAttribute_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_delivery_v1_DeliveryVehicleAttribute_descriptor, + new java.lang.String[] { + "Key", + "Value", + "StringValue", + "BoolValue", + "NumberValue", + "DeliveryVehicleAttributeValue", + }); + internal_static_maps_fleetengine_delivery_v1_DeliveryVehicleLocation_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_maps_fleetengine_delivery_v1_DeliveryVehicleLocation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_delivery_v1_DeliveryVehicleLocation_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", + }); + internal_static_maps_fleetengine_delivery_v1_TimeWindow_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_maps_fleetengine_delivery_v1_TimeWindow_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_delivery_v1_TimeWindow_descriptor, + new java.lang.String[] { + "StartTime", "EndTime", + }); + internal_static_maps_fleetengine_delivery_v1_TaskAttribute_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_maps_fleetengine_delivery_v1_TaskAttribute_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_delivery_v1_TaskAttribute_descriptor, + new java.lang.String[] { + "Key", "StringValue", "BoolValue", "NumberValue", "TaskAttributeValue", + }); + 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.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-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/CreateDeliveryVehicleRequest.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/CreateDeliveryVehicleRequest.java new file mode 100644 index 000000000000..62e3eb7a2948 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/CreateDeliveryVehicleRequest.java @@ -0,0 +1,1544 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_api.proto + +package google.maps.fleetengine.delivery.v1; + +/** + * + * + *
+ * The `CreateDeliveryVehicle` request message.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest} + */ +public final class CreateDeliveryVehicleRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest) + CreateDeliveryVehicleRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateDeliveryVehicleRequest.newBuilder() to construct. + private CreateDeliveryVehicleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateDeliveryVehicleRequest() { + parent_ = ""; + deliveryVehicleId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateDeliveryVehicleRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_CreateDeliveryVehicleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_CreateDeliveryVehicleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest.class, + google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest.Builder.class); + } + + public static final int HEADER_FIELD_NUMBER = 1; + private google.maps.fleetengine.delivery.v1.DeliveryRequestHeader header_; + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the header field is set. + */ + @java.lang.Override + public boolean hasHeader() { + return header_ != null; + } + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The header. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader getHeader() { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance() + : header_; + } + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder getHeaderOrBuilder() { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.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 Google Cloud Project ID. For example, `sample-cloud-project`.
+   * 
+ * + * 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 Google Cloud Project ID. For example, `sample-cloud-project`.
+   * 
+ * + * 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 DELIVERY_VEHICLE_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object deliveryVehicleId_ = ""; + /** + * + * + *
+   * Required. The Delivery Vehicle ID must be unique and 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 delivery_vehicle_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The deliveryVehicleId. + */ + @java.lang.Override + public java.lang.String getDeliveryVehicleId() { + java.lang.Object ref = deliveryVehicleId_; + 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(); + deliveryVehicleId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The Delivery Vehicle ID must be unique and 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 delivery_vehicle_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for deliveryVehicleId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDeliveryVehicleIdBytes() { + java.lang.Object ref = deliveryVehicleId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deliveryVehicleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DELIVERY_VEHICLE_FIELD_NUMBER = 5; + private google.maps.fleetengine.delivery.v1.DeliveryVehicle deliveryVehicle_; + /** + * + * + *
+   * Required. The `DeliveryVehicle` entity to create. When creating a new
+   * delivery vehicle, you may set the following optional fields:
+   *
+   * * last_location
+   * * attributes
+   *
+   * Note: The DeliveryVehicle's `name` field is ignored. All other
+   * DeliveryVehicle fields must not be set; otherwise, an error is returned.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the deliveryVehicle field is set. + */ + @java.lang.Override + public boolean hasDeliveryVehicle() { + return deliveryVehicle_ != null; + } + /** + * + * + *
+   * Required. The `DeliveryVehicle` entity to create. When creating a new
+   * delivery vehicle, you may set the following optional fields:
+   *
+   * * last_location
+   * * attributes
+   *
+   * Note: The DeliveryVehicle's `name` field is ignored. All other
+   * DeliveryVehicle fields must not be set; otherwise, an error is returned.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The deliveryVehicle. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryVehicle getDeliveryVehicle() { + return deliveryVehicle_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryVehicle.getDefaultInstance() + : deliveryVehicle_; + } + /** + * + * + *
+   * Required. The `DeliveryVehicle` entity to create. When creating a new
+   * delivery vehicle, you may set the following optional fields:
+   *
+   * * last_location
+   * * attributes
+   *
+   * Note: The DeliveryVehicle's `name` field is ignored. All other
+   * DeliveryVehicle fields must not be set; otherwise, an error is returned.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryVehicleOrBuilder + getDeliveryVehicleOrBuilder() { + return deliveryVehicle_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryVehicle.getDefaultInstance() + : deliveryVehicle_; + } + + 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 (header_ != null) { + 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(deliveryVehicleId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, deliveryVehicleId_); + } + if (deliveryVehicle_ != null) { + output.writeMessage(5, getDeliveryVehicle()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (header_ != null) { + 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(deliveryVehicleId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, deliveryVehicleId_); + } + if (deliveryVehicle_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDeliveryVehicle()); + } + 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 google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest)) { + return super.equals(obj); + } + google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest other = + (google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest) obj; + + if (hasHeader() != other.hasHeader()) return false; + if (hasHeader()) { + if (!getHeader().equals(other.getHeader())) return false; + } + if (!getParent().equals(other.getParent())) return false; + if (!getDeliveryVehicleId().equals(other.getDeliveryVehicleId())) return false; + if (hasDeliveryVehicle() != other.hasDeliveryVehicle()) return false; + if (hasDeliveryVehicle()) { + if (!getDeliveryVehicle().equals(other.getDeliveryVehicle())) 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) + DELIVERY_VEHICLE_ID_FIELD_NUMBER; + hash = (53 * hash) + getDeliveryVehicleId().hashCode(); + if (hasDeliveryVehicle()) { + hash = (37 * hash) + DELIVERY_VEHICLE_FIELD_NUMBER; + hash = (53 * hash) + getDeliveryVehicle().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest 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 google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest 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 google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest 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( + google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest 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 `CreateDeliveryVehicle` request message.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest) + google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_CreateDeliveryVehicleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_CreateDeliveryVehicleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest.class, + google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest.Builder.class); + } + + // Construct using google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + parent_ = ""; + deliveryVehicleId_ = ""; + deliveryVehicle_ = null; + if (deliveryVehicleBuilder_ != null) { + deliveryVehicleBuilder_.dispose(); + deliveryVehicleBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_CreateDeliveryVehicleRequest_descriptor; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest + getDefaultInstanceForType() { + return google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest.getDefaultInstance(); + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest build() { + google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest buildPartial() { + google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest result = + new google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.header_ = headerBuilder_ == null ? header_ : headerBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.deliveryVehicleId_ = deliveryVehicleId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.deliveryVehicle_ = + deliveryVehicleBuilder_ == null ? deliveryVehicle_ : deliveryVehicleBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest) { + return mergeFrom((google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest other) { + if (other + == google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest.getDefaultInstance()) + return this; + if (other.hasHeader()) { + mergeHeader(other.getHeader()); + } + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDeliveryVehicleId().isEmpty()) { + deliveryVehicleId_ = other.deliveryVehicleId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasDeliveryVehicle()) { + mergeDeliveryVehicle(other.getDeliveryVehicle()); + } + 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: + { + deliveryVehicleId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 34 + case 42: + { + input.readMessage(getDeliveryVehicleFieldBuilder().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 google.maps.fleetengine.delivery.v1.DeliveryRequestHeader header_; + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder> + headerBuilder_; + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the header field is set. + */ + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The header. + */ + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader getHeader() { + if (headerBuilder_ == null) { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance() + : header_; + } else { + return headerBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHeader(google.maps.fleetengine.delivery.v1.DeliveryRequestHeader value) { + if (headerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + header_ = value; + } else { + headerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHeader( + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder builderForValue) { + if (headerBuilder_ == null) { + header_ = builderForValue.build(); + } else { + headerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeHeader(google.maps.fleetengine.delivery.v1.DeliveryRequestHeader value) { + if (headerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && header_ != null + && header_ + != google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance()) { + getHeaderBuilder().mergeFrom(value); + } else { + header_ = value; + } + } else { + headerBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearHeader() { + bitField0_ = (bitField0_ & ~0x00000001); + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder getHeaderBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getHeaderFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder getHeaderOrBuilder() { + if (headerBuilder_ != null) { + return headerBuilder_.getMessageOrBuilder(); + } else { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance() + : header_; + } + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder> + getHeaderFieldBuilder() { + if (headerBuilder_ == null) { + headerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder>( + 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 Google Cloud Project ID. For example, `sample-cloud-project`.
+     * 
+ * + * 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 Google Cloud Project ID. For example, `sample-cloud-project`.
+     * 
+ * + * 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 Google Cloud Project ID. For example, `sample-cloud-project`.
+     * 
+ * + * 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 Google Cloud Project ID. For example, `sample-cloud-project`.
+     * 
+ * + * 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 Google Cloud Project ID. For example, `sample-cloud-project`.
+     * 
+ * + * 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 deliveryVehicleId_ = ""; + /** + * + * + *
+     * Required. The Delivery Vehicle ID must be unique and 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 delivery_vehicle_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The deliveryVehicleId. + */ + public java.lang.String getDeliveryVehicleId() { + java.lang.Object ref = deliveryVehicleId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deliveryVehicleId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The Delivery Vehicle ID must be unique and 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 delivery_vehicle_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for deliveryVehicleId. + */ + public com.google.protobuf.ByteString getDeliveryVehicleIdBytes() { + java.lang.Object ref = deliveryVehicleId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deliveryVehicleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The Delivery Vehicle ID must be unique and 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 delivery_vehicle_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The deliveryVehicleId to set. + * @return This builder for chaining. + */ + public Builder setDeliveryVehicleId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + deliveryVehicleId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Delivery Vehicle ID must be unique and 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 delivery_vehicle_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDeliveryVehicleId() { + deliveryVehicleId_ = getDefaultInstance().getDeliveryVehicleId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Delivery Vehicle ID must be unique and 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 delivery_vehicle_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for deliveryVehicleId to set. + * @return This builder for chaining. + */ + public Builder setDeliveryVehicleIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + deliveryVehicleId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private google.maps.fleetengine.delivery.v1.DeliveryVehicle deliveryVehicle_; + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryVehicle, + google.maps.fleetengine.delivery.v1.DeliveryVehicle.Builder, + google.maps.fleetengine.delivery.v1.DeliveryVehicleOrBuilder> + deliveryVehicleBuilder_; + /** + * + * + *
+     * Required. The `DeliveryVehicle` entity to create. When creating a new
+     * delivery vehicle, you may set the following optional fields:
+     *
+     * * last_location
+     * * attributes
+     *
+     * Note: The DeliveryVehicle's `name` field is ignored. All other
+     * DeliveryVehicle fields must not be set; otherwise, an error is returned.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the deliveryVehicle field is set. + */ + public boolean hasDeliveryVehicle() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Required. The `DeliveryVehicle` entity to create. When creating a new
+     * delivery vehicle, you may set the following optional fields:
+     *
+     * * last_location
+     * * attributes
+     *
+     * Note: The DeliveryVehicle's `name` field is ignored. All other
+     * DeliveryVehicle fields must not be set; otherwise, an error is returned.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The deliveryVehicle. + */ + public google.maps.fleetengine.delivery.v1.DeliveryVehicle getDeliveryVehicle() { + if (deliveryVehicleBuilder_ == null) { + return deliveryVehicle_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryVehicle.getDefaultInstance() + : deliveryVehicle_; + } else { + return deliveryVehicleBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The `DeliveryVehicle` entity to create. When creating a new
+     * delivery vehicle, you may set the following optional fields:
+     *
+     * * last_location
+     * * attributes
+     *
+     * Note: The DeliveryVehicle's `name` field is ignored. All other
+     * DeliveryVehicle fields must not be set; otherwise, an error is returned.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDeliveryVehicle(google.maps.fleetengine.delivery.v1.DeliveryVehicle value) { + if (deliveryVehicleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deliveryVehicle_ = value; + } else { + deliveryVehicleBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The `DeliveryVehicle` entity to create. When creating a new
+     * delivery vehicle, you may set the following optional fields:
+     *
+     * * last_location
+     * * attributes
+     *
+     * Note: The DeliveryVehicle's `name` field is ignored. All other
+     * DeliveryVehicle fields must not be set; otherwise, an error is returned.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDeliveryVehicle( + google.maps.fleetengine.delivery.v1.DeliveryVehicle.Builder builderForValue) { + if (deliveryVehicleBuilder_ == null) { + deliveryVehicle_ = builderForValue.build(); + } else { + deliveryVehicleBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The `DeliveryVehicle` entity to create. When creating a new
+     * delivery vehicle, you may set the following optional fields:
+     *
+     * * last_location
+     * * attributes
+     *
+     * Note: The DeliveryVehicle's `name` field is ignored. All other
+     * DeliveryVehicle fields must not be set; otherwise, an error is returned.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDeliveryVehicle(google.maps.fleetengine.delivery.v1.DeliveryVehicle value) { + if (deliveryVehicleBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && deliveryVehicle_ != null + && deliveryVehicle_ + != google.maps.fleetengine.delivery.v1.DeliveryVehicle.getDefaultInstance()) { + getDeliveryVehicleBuilder().mergeFrom(value); + } else { + deliveryVehicle_ = value; + } + } else { + deliveryVehicleBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The `DeliveryVehicle` entity to create. When creating a new
+     * delivery vehicle, you may set the following optional fields:
+     *
+     * * last_location
+     * * attributes
+     *
+     * Note: The DeliveryVehicle's `name` field is ignored. All other
+     * DeliveryVehicle fields must not be set; otherwise, an error is returned.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDeliveryVehicle() { + bitField0_ = (bitField0_ & ~0x00000008); + deliveryVehicle_ = null; + if (deliveryVehicleBuilder_ != null) { + deliveryVehicleBuilder_.dispose(); + deliveryVehicleBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The `DeliveryVehicle` entity to create. When creating a new
+     * delivery vehicle, you may set the following optional fields:
+     *
+     * * last_location
+     * * attributes
+     *
+     * Note: The DeliveryVehicle's `name` field is ignored. All other
+     * DeliveryVehicle fields must not be set; otherwise, an error is returned.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public google.maps.fleetengine.delivery.v1.DeliveryVehicle.Builder getDeliveryVehicleBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getDeliveryVehicleFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The `DeliveryVehicle` entity to create. When creating a new
+     * delivery vehicle, you may set the following optional fields:
+     *
+     * * last_location
+     * * attributes
+     *
+     * Note: The DeliveryVehicle's `name` field is ignored. All other
+     * DeliveryVehicle fields must not be set; otherwise, an error is returned.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public google.maps.fleetengine.delivery.v1.DeliveryVehicleOrBuilder + getDeliveryVehicleOrBuilder() { + if (deliveryVehicleBuilder_ != null) { + return deliveryVehicleBuilder_.getMessageOrBuilder(); + } else { + return deliveryVehicle_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryVehicle.getDefaultInstance() + : deliveryVehicle_; + } + } + /** + * + * + *
+     * Required. The `DeliveryVehicle` entity to create. When creating a new
+     * delivery vehicle, you may set the following optional fields:
+     *
+     * * last_location
+     * * attributes
+     *
+     * Note: The DeliveryVehicle's `name` field is ignored. All other
+     * DeliveryVehicle fields must not be set; otherwise, an error is returned.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryVehicle, + google.maps.fleetengine.delivery.v1.DeliveryVehicle.Builder, + google.maps.fleetengine.delivery.v1.DeliveryVehicleOrBuilder> + getDeliveryVehicleFieldBuilder() { + if (deliveryVehicleBuilder_ == null) { + deliveryVehicleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryVehicle, + google.maps.fleetengine.delivery.v1.DeliveryVehicle.Builder, + google.maps.fleetengine.delivery.v1.DeliveryVehicleOrBuilder>( + getDeliveryVehicle(), getParentForChildren(), isClean()); + deliveryVehicle_ = null; + } + return deliveryVehicleBuilder_; + } + + @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.delivery.v1.CreateDeliveryVehicleRequest) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest) + private static final google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest(); + } + + public static google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateDeliveryVehicleRequest 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 google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/CreateDeliveryVehicleRequestOrBuilder.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/CreateDeliveryVehicleRequestOrBuilder.java new file mode 100644 index 000000000000..25d0c457eb0f --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/CreateDeliveryVehicleRequestOrBuilder.java @@ -0,0 +1,196 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_api.proto + +package google.maps.fleetengine.delivery.v1; + +public interface CreateDeliveryVehicleRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the header field is set. + */ + boolean hasHeader(); + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The header. + */ + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader getHeader(); + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder getHeaderOrBuilder(); + + /** + * + * + *
+   * Required. Must be in the format `providers/{provider}`. The provider must
+   * be the Google Cloud Project ID. For example, `sample-cloud-project`.
+   * 
+ * + * 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 Google Cloud Project ID. For example, `sample-cloud-project`.
+   * 
+ * + * string parent = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The Delivery Vehicle ID must be unique and 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 delivery_vehicle_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The deliveryVehicleId. + */ + java.lang.String getDeliveryVehicleId(); + /** + * + * + *
+   * Required. The Delivery Vehicle ID must be unique and 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 delivery_vehicle_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for deliveryVehicleId. + */ + com.google.protobuf.ByteString getDeliveryVehicleIdBytes(); + + /** + * + * + *
+   * Required. The `DeliveryVehicle` entity to create. When creating a new
+   * delivery vehicle, you may set the following optional fields:
+   *
+   * * last_location
+   * * attributes
+   *
+   * Note: The DeliveryVehicle's `name` field is ignored. All other
+   * DeliveryVehicle fields must not be set; otherwise, an error is returned.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the deliveryVehicle field is set. + */ + boolean hasDeliveryVehicle(); + /** + * + * + *
+   * Required. The `DeliveryVehicle` entity to create. When creating a new
+   * delivery vehicle, you may set the following optional fields:
+   *
+   * * last_location
+   * * attributes
+   *
+   * Note: The DeliveryVehicle's `name` field is ignored. All other
+   * DeliveryVehicle fields must not be set; otherwise, an error is returned.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The deliveryVehicle. + */ + google.maps.fleetengine.delivery.v1.DeliveryVehicle getDeliveryVehicle(); + /** + * + * + *
+   * Required. The `DeliveryVehicle` entity to create. When creating a new
+   * delivery vehicle, you may set the following optional fields:
+   *
+   * * last_location
+   * * attributes
+   *
+   * Note: The DeliveryVehicle's `name` field is ignored. All other
+   * DeliveryVehicle fields must not be set; otherwise, an error is returned.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + google.maps.fleetengine.delivery.v1.DeliveryVehicleOrBuilder getDeliveryVehicleOrBuilder(); +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/CreateTaskRequest.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/CreateTaskRequest.java new file mode 100644 index 000000000000..3a956b1a1acd --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/CreateTaskRequest.java @@ -0,0 +1,1578 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_api.proto + +package google.maps.fleetengine.delivery.v1; + +/** + * + * + *
+ * The `CreateTask` request message.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.CreateTaskRequest} + */ +public final class CreateTaskRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.delivery.v1.CreateTaskRequest) + CreateTaskRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateTaskRequest.newBuilder() to construct. + private CreateTaskRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateTaskRequest() { + parent_ = ""; + taskId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateTaskRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_CreateTaskRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_CreateTaskRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.CreateTaskRequest.class, + google.maps.fleetengine.delivery.v1.CreateTaskRequest.Builder.class); + } + + public static final int HEADER_FIELD_NUMBER = 1; + private google.maps.fleetengine.delivery.v1.DeliveryRequestHeader header_; + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the header field is set. + */ + @java.lang.Override + public boolean hasHeader() { + return header_ != null; + } + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The header. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader getHeader() { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance() + : header_; + } + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder getHeaderOrBuilder() { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.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 Google Cloud Project ID. For example, `sample-cloud-project`.
+   * 
+ * + * 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 Google Cloud Project ID. For example, `sample-cloud-project`.
+   * 
+ * + * 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 TASK_ID_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object taskId_ = ""; + /** + * + * + *
+   * Required. The Task ID must be unique, but it should be not a shipment
+   * tracking ID. To store a shipment tracking ID, use the `tracking_id` field.
+   * Note that multiple tasks can have the same `tracking_id`. Task IDs are
+   * 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 task_id = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The taskId. + */ + @java.lang.Override + public java.lang.String getTaskId() { + java.lang.Object ref = taskId_; + 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(); + taskId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The Task ID must be unique, but it should be not a shipment
+   * tracking ID. To store a shipment tracking ID, use the `tracking_id` field.
+   * Note that multiple tasks can have the same `tracking_id`. Task IDs are
+   * 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 task_id = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for taskId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTaskIdBytes() { + java.lang.Object ref = taskId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + taskId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TASK_FIELD_NUMBER = 4; + private google.maps.fleetengine.delivery.v1.Task task_; + /** + * + * + *
+   * Required. The Task entity to create.
+   * When creating a Task, the following fields are required:
+   *
+   * * `type`
+   * * `state` (must be set to `OPEN`)
+   * * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP`
+   * tasks, but required for all other task types)
+   * * `planned_location` (optional for `UNAVAILABLE` tasks)
+   * * `task_duration`
+   *
+   * Note: The Task's `name` field is ignored. All other Task fields must not be
+   * set; otherwise, an error is returned.
+   * 
+ * + * .maps.fleetengine.delivery.v1.Task task = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the task field is set. + */ + @java.lang.Override + public boolean hasTask() { + return task_ != null; + } + /** + * + * + *
+   * Required. The Task entity to create.
+   * When creating a Task, the following fields are required:
+   *
+   * * `type`
+   * * `state` (must be set to `OPEN`)
+   * * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP`
+   * tasks, but required for all other task types)
+   * * `planned_location` (optional for `UNAVAILABLE` tasks)
+   * * `task_duration`
+   *
+   * Note: The Task's `name` field is ignored. All other Task fields must not be
+   * set; otherwise, an error is returned.
+   * 
+ * + * .maps.fleetengine.delivery.v1.Task task = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The task. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.Task getTask() { + return task_ == null ? google.maps.fleetengine.delivery.v1.Task.getDefaultInstance() : task_; + } + /** + * + * + *
+   * Required. The Task entity to create.
+   * When creating a Task, the following fields are required:
+   *
+   * * `type`
+   * * `state` (must be set to `OPEN`)
+   * * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP`
+   * tasks, but required for all other task types)
+   * * `planned_location` (optional for `UNAVAILABLE` tasks)
+   * * `task_duration`
+   *
+   * Note: The Task's `name` field is ignored. All other Task fields must not be
+   * set; otherwise, an error is returned.
+   * 
+ * + * .maps.fleetengine.delivery.v1.Task task = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TaskOrBuilder getTaskOrBuilder() { + return task_ == null ? google.maps.fleetengine.delivery.v1.Task.getDefaultInstance() : task_; + } + + 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 (header_ != null) { + output.writeMessage(1, getHeader()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, parent_); + } + if (task_ != null) { + output.writeMessage(4, getTask()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(taskId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, taskId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (header_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getHeader()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, parent_); + } + if (task_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getTask()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(taskId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, taskId_); + } + 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 google.maps.fleetengine.delivery.v1.CreateTaskRequest)) { + return super.equals(obj); + } + google.maps.fleetengine.delivery.v1.CreateTaskRequest other = + (google.maps.fleetengine.delivery.v1.CreateTaskRequest) obj; + + if (hasHeader() != other.hasHeader()) return false; + if (hasHeader()) { + if (!getHeader().equals(other.getHeader())) return false; + } + if (!getParent().equals(other.getParent())) return false; + if (!getTaskId().equals(other.getTaskId())) return false; + if (hasTask() != other.hasTask()) return false; + if (hasTask()) { + if (!getTask().equals(other.getTask())) 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) + TASK_ID_FIELD_NUMBER; + hash = (53 * hash) + getTaskId().hashCode(); + if (hasTask()) { + hash = (37 * hash) + TASK_FIELD_NUMBER; + hash = (53 * hash) + getTask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.maps.fleetengine.delivery.v1.CreateTaskRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.CreateTaskRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.CreateTaskRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.CreateTaskRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.CreateTaskRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.CreateTaskRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.CreateTaskRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.CreateTaskRequest 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 google.maps.fleetengine.delivery.v1.CreateTaskRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.CreateTaskRequest 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 google.maps.fleetengine.delivery.v1.CreateTaskRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.CreateTaskRequest 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( + google.maps.fleetengine.delivery.v1.CreateTaskRequest 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 `CreateTask` request message.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.CreateTaskRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.delivery.v1.CreateTaskRequest) + google.maps.fleetengine.delivery.v1.CreateTaskRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_CreateTaskRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_CreateTaskRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.CreateTaskRequest.class, + google.maps.fleetengine.delivery.v1.CreateTaskRequest.Builder.class); + } + + // Construct using google.maps.fleetengine.delivery.v1.CreateTaskRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + parent_ = ""; + taskId_ = ""; + task_ = null; + if (taskBuilder_ != null) { + taskBuilder_.dispose(); + taskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_CreateTaskRequest_descriptor; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.CreateTaskRequest getDefaultInstanceForType() { + return google.maps.fleetengine.delivery.v1.CreateTaskRequest.getDefaultInstance(); + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.CreateTaskRequest build() { + google.maps.fleetengine.delivery.v1.CreateTaskRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.CreateTaskRequest buildPartial() { + google.maps.fleetengine.delivery.v1.CreateTaskRequest result = + new google.maps.fleetengine.delivery.v1.CreateTaskRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(google.maps.fleetengine.delivery.v1.CreateTaskRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.header_ = headerBuilder_ == null ? header_ : headerBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.taskId_ = taskId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.task_ = taskBuilder_ == null ? task_ : taskBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof google.maps.fleetengine.delivery.v1.CreateTaskRequest) { + return mergeFrom((google.maps.fleetengine.delivery.v1.CreateTaskRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.maps.fleetengine.delivery.v1.CreateTaskRequest other) { + if (other == google.maps.fleetengine.delivery.v1.CreateTaskRequest.getDefaultInstance()) + return this; + if (other.hasHeader()) { + mergeHeader(other.getHeader()); + } + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getTaskId().isEmpty()) { + taskId_ = other.taskId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasTask()) { + mergeTask(other.getTask()); + } + 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(getTaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + taskId_ = 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 google.maps.fleetengine.delivery.v1.DeliveryRequestHeader header_; + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder> + headerBuilder_; + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the header field is set. + */ + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The header. + */ + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader getHeader() { + if (headerBuilder_ == null) { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance() + : header_; + } else { + return headerBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHeader(google.maps.fleetengine.delivery.v1.DeliveryRequestHeader value) { + if (headerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + header_ = value; + } else { + headerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHeader( + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder builderForValue) { + if (headerBuilder_ == null) { + header_ = builderForValue.build(); + } else { + headerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeHeader(google.maps.fleetengine.delivery.v1.DeliveryRequestHeader value) { + if (headerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && header_ != null + && header_ + != google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance()) { + getHeaderBuilder().mergeFrom(value); + } else { + header_ = value; + } + } else { + headerBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearHeader() { + bitField0_ = (bitField0_ & ~0x00000001); + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder getHeaderBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getHeaderFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder getHeaderOrBuilder() { + if (headerBuilder_ != null) { + return headerBuilder_.getMessageOrBuilder(); + } else { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance() + : header_; + } + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder> + getHeaderFieldBuilder() { + if (headerBuilder_ == null) { + headerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder>( + 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 Google Cloud Project ID. For example, `sample-cloud-project`.
+     * 
+ * + * 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 Google Cloud Project ID. For example, `sample-cloud-project`.
+     * 
+ * + * 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 Google Cloud Project ID. For example, `sample-cloud-project`.
+     * 
+ * + * 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 Google Cloud Project ID. For example, `sample-cloud-project`.
+     * 
+ * + * 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 Google Cloud Project ID. For example, `sample-cloud-project`.
+     * 
+ * + * 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 taskId_ = ""; + /** + * + * + *
+     * Required. The Task ID must be unique, but it should be not a shipment
+     * tracking ID. To store a shipment tracking ID, use the `tracking_id` field.
+     * Note that multiple tasks can have the same `tracking_id`. Task IDs are
+     * 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 task_id = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The taskId. + */ + public java.lang.String getTaskId() { + java.lang.Object ref = taskId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + taskId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The Task ID must be unique, but it should be not a shipment
+     * tracking ID. To store a shipment tracking ID, use the `tracking_id` field.
+     * Note that multiple tasks can have the same `tracking_id`. Task IDs are
+     * 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 task_id = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for taskId. + */ + public com.google.protobuf.ByteString getTaskIdBytes() { + java.lang.Object ref = taskId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + taskId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The Task ID must be unique, but it should be not a shipment
+     * tracking ID. To store a shipment tracking ID, use the `tracking_id` field.
+     * Note that multiple tasks can have the same `tracking_id`. Task IDs are
+     * 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 task_id = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The taskId to set. + * @return This builder for chaining. + */ + public Builder setTaskId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + taskId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Task ID must be unique, but it should be not a shipment
+     * tracking ID. To store a shipment tracking ID, use the `tracking_id` field.
+     * Note that multiple tasks can have the same `tracking_id`. Task IDs are
+     * 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 task_id = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTaskId() { + taskId_ = getDefaultInstance().getTaskId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Task ID must be unique, but it should be not a shipment
+     * tracking ID. To store a shipment tracking ID, use the `tracking_id` field.
+     * Note that multiple tasks can have the same `tracking_id`. Task IDs are
+     * 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 task_id = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for taskId to set. + * @return This builder for chaining. + */ + public Builder setTaskIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + taskId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private google.maps.fleetengine.delivery.v1.Task task_; + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.Task, + google.maps.fleetengine.delivery.v1.Task.Builder, + google.maps.fleetengine.delivery.v1.TaskOrBuilder> + taskBuilder_; + /** + * + * + *
+     * Required. The Task entity to create.
+     * When creating a Task, the following fields are required:
+     *
+     * * `type`
+     * * `state` (must be set to `OPEN`)
+     * * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP`
+     * tasks, but required for all other task types)
+     * * `planned_location` (optional for `UNAVAILABLE` tasks)
+     * * `task_duration`
+     *
+     * Note: The Task's `name` field is ignored. All other Task fields must not be
+     * set; otherwise, an error is returned.
+     * 
+ * + * .maps.fleetengine.delivery.v1.Task task = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the task field is set. + */ + public boolean hasTask() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Required. The Task entity to create.
+     * When creating a Task, the following fields are required:
+     *
+     * * `type`
+     * * `state` (must be set to `OPEN`)
+     * * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP`
+     * tasks, but required for all other task types)
+     * * `planned_location` (optional for `UNAVAILABLE` tasks)
+     * * `task_duration`
+     *
+     * Note: The Task's `name` field is ignored. All other Task fields must not be
+     * set; otherwise, an error is returned.
+     * 
+ * + * .maps.fleetengine.delivery.v1.Task task = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The task. + */ + public google.maps.fleetengine.delivery.v1.Task getTask() { + if (taskBuilder_ == null) { + return task_ == null + ? google.maps.fleetengine.delivery.v1.Task.getDefaultInstance() + : task_; + } else { + return taskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The Task entity to create.
+     * When creating a Task, the following fields are required:
+     *
+     * * `type`
+     * * `state` (must be set to `OPEN`)
+     * * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP`
+     * tasks, but required for all other task types)
+     * * `planned_location` (optional for `UNAVAILABLE` tasks)
+     * * `task_duration`
+     *
+     * Note: The Task's `name` field is ignored. All other Task fields must not be
+     * set; otherwise, an error is returned.
+     * 
+ * + * .maps.fleetengine.delivery.v1.Task task = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTask(google.maps.fleetengine.delivery.v1.Task value) { + if (taskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + task_ = value; + } else { + taskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Task entity to create.
+     * When creating a Task, the following fields are required:
+     *
+     * * `type`
+     * * `state` (must be set to `OPEN`)
+     * * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP`
+     * tasks, but required for all other task types)
+     * * `planned_location` (optional for `UNAVAILABLE` tasks)
+     * * `task_duration`
+     *
+     * Note: The Task's `name` field is ignored. All other Task fields must not be
+     * set; otherwise, an error is returned.
+     * 
+ * + * .maps.fleetengine.delivery.v1.Task task = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTask(google.maps.fleetengine.delivery.v1.Task.Builder builderForValue) { + if (taskBuilder_ == null) { + task_ = builderForValue.build(); + } else { + taskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Task entity to create.
+     * When creating a Task, the following fields are required:
+     *
+     * * `type`
+     * * `state` (must be set to `OPEN`)
+     * * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP`
+     * tasks, but required for all other task types)
+     * * `planned_location` (optional for `UNAVAILABLE` tasks)
+     * * `task_duration`
+     *
+     * Note: The Task's `name` field is ignored. All other Task fields must not be
+     * set; otherwise, an error is returned.
+     * 
+ * + * .maps.fleetengine.delivery.v1.Task task = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTask(google.maps.fleetengine.delivery.v1.Task value) { + if (taskBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && task_ != null + && task_ != google.maps.fleetengine.delivery.v1.Task.getDefaultInstance()) { + getTaskBuilder().mergeFrom(value); + } else { + task_ = value; + } + } else { + taskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Task entity to create.
+     * When creating a Task, the following fields are required:
+     *
+     * * `type`
+     * * `state` (must be set to `OPEN`)
+     * * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP`
+     * tasks, but required for all other task types)
+     * * `planned_location` (optional for `UNAVAILABLE` tasks)
+     * * `task_duration`
+     *
+     * Note: The Task's `name` field is ignored. All other Task fields must not be
+     * set; otherwise, an error is returned.
+     * 
+ * + * .maps.fleetengine.delivery.v1.Task task = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTask() { + bitField0_ = (bitField0_ & ~0x00000008); + task_ = null; + if (taskBuilder_ != null) { + taskBuilder_.dispose(); + taskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Task entity to create.
+     * When creating a Task, the following fields are required:
+     *
+     * * `type`
+     * * `state` (must be set to `OPEN`)
+     * * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP`
+     * tasks, but required for all other task types)
+     * * `planned_location` (optional for `UNAVAILABLE` tasks)
+     * * `task_duration`
+     *
+     * Note: The Task's `name` field is ignored. All other Task fields must not be
+     * set; otherwise, an error is returned.
+     * 
+ * + * .maps.fleetengine.delivery.v1.Task task = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public google.maps.fleetengine.delivery.v1.Task.Builder getTaskBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getTaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The Task entity to create.
+     * When creating a Task, the following fields are required:
+     *
+     * * `type`
+     * * `state` (must be set to `OPEN`)
+     * * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP`
+     * tasks, but required for all other task types)
+     * * `planned_location` (optional for `UNAVAILABLE` tasks)
+     * * `task_duration`
+     *
+     * Note: The Task's `name` field is ignored. All other Task fields must not be
+     * set; otherwise, an error is returned.
+     * 
+ * + * .maps.fleetengine.delivery.v1.Task task = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public google.maps.fleetengine.delivery.v1.TaskOrBuilder getTaskOrBuilder() { + if (taskBuilder_ != null) { + return taskBuilder_.getMessageOrBuilder(); + } else { + return task_ == null + ? google.maps.fleetengine.delivery.v1.Task.getDefaultInstance() + : task_; + } + } + /** + * + * + *
+     * Required. The Task entity to create.
+     * When creating a Task, the following fields are required:
+     *
+     * * `type`
+     * * `state` (must be set to `OPEN`)
+     * * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP`
+     * tasks, but required for all other task types)
+     * * `planned_location` (optional for `UNAVAILABLE` tasks)
+     * * `task_duration`
+     *
+     * Note: The Task's `name` field is ignored. All other Task fields must not be
+     * set; otherwise, an error is returned.
+     * 
+ * + * .maps.fleetengine.delivery.v1.Task task = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.Task, + google.maps.fleetengine.delivery.v1.Task.Builder, + google.maps.fleetengine.delivery.v1.TaskOrBuilder> + getTaskFieldBuilder() { + if (taskBuilder_ == null) { + taskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.Task, + google.maps.fleetengine.delivery.v1.Task.Builder, + google.maps.fleetengine.delivery.v1.TaskOrBuilder>( + getTask(), getParentForChildren(), isClean()); + task_ = null; + } + return taskBuilder_; + } + + @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.delivery.v1.CreateTaskRequest) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.delivery.v1.CreateTaskRequest) + private static final google.maps.fleetengine.delivery.v1.CreateTaskRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new google.maps.fleetengine.delivery.v1.CreateTaskRequest(); + } + + public static google.maps.fleetengine.delivery.v1.CreateTaskRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateTaskRequest 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 google.maps.fleetengine.delivery.v1.CreateTaskRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/CreateTaskRequestOrBuilder.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/CreateTaskRequestOrBuilder.java new file mode 100644 index 000000000000..14324ad383f4 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/CreateTaskRequestOrBuilder.java @@ -0,0 +1,209 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_api.proto + +package google.maps.fleetengine.delivery.v1; + +public interface CreateTaskRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.delivery.v1.CreateTaskRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the header field is set. + */ + boolean hasHeader(); + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The header. + */ + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader getHeader(); + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder getHeaderOrBuilder(); + + /** + * + * + *
+   * Required. Must be in the format `providers/{provider}`. The `provider` must
+   * be the Google Cloud Project ID. For example, `sample-cloud-project`.
+   * 
+ * + * 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 Google Cloud Project ID. For example, `sample-cloud-project`.
+   * 
+ * + * string parent = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The Task ID must be unique, but it should be not a shipment
+   * tracking ID. To store a shipment tracking ID, use the `tracking_id` field.
+   * Note that multiple tasks can have the same `tracking_id`. Task IDs are
+   * 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 task_id = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The taskId. + */ + java.lang.String getTaskId(); + /** + * + * + *
+   * Required. The Task ID must be unique, but it should be not a shipment
+   * tracking ID. To store a shipment tracking ID, use the `tracking_id` field.
+   * Note that multiple tasks can have the same `tracking_id`. Task IDs are
+   * 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 task_id = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for taskId. + */ + com.google.protobuf.ByteString getTaskIdBytes(); + + /** + * + * + *
+   * Required. The Task entity to create.
+   * When creating a Task, the following fields are required:
+   *
+   * * `type`
+   * * `state` (must be set to `OPEN`)
+   * * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP`
+   * tasks, but required for all other task types)
+   * * `planned_location` (optional for `UNAVAILABLE` tasks)
+   * * `task_duration`
+   *
+   * Note: The Task's `name` field is ignored. All other Task fields must not be
+   * set; otherwise, an error is returned.
+   * 
+ * + * .maps.fleetengine.delivery.v1.Task task = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the task field is set. + */ + boolean hasTask(); + /** + * + * + *
+   * Required. The Task entity to create.
+   * When creating a Task, the following fields are required:
+   *
+   * * `type`
+   * * `state` (must be set to `OPEN`)
+   * * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP`
+   * tasks, but required for all other task types)
+   * * `planned_location` (optional for `UNAVAILABLE` tasks)
+   * * `task_duration`
+   *
+   * Note: The Task's `name` field is ignored. All other Task fields must not be
+   * set; otherwise, an error is returned.
+   * 
+ * + * .maps.fleetengine.delivery.v1.Task task = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The task. + */ + google.maps.fleetengine.delivery.v1.Task getTask(); + /** + * + * + *
+   * Required. The Task entity to create.
+   * When creating a Task, the following fields are required:
+   *
+   * * `type`
+   * * `state` (must be set to `OPEN`)
+   * * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP`
+   * tasks, but required for all other task types)
+   * * `planned_location` (optional for `UNAVAILABLE` tasks)
+   * * `task_duration`
+   *
+   * Note: The Task's `name` field is ignored. All other Task fields must not be
+   * set; otherwise, an error is returned.
+   * 
+ * + * .maps.fleetengine.delivery.v1.Task task = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + google.maps.fleetengine.delivery.v1.TaskOrBuilder getTaskOrBuilder(); +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryApi.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryApi.java new file mode 100644 index 000000000000..5e78d7880b55 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryApi.java @@ -0,0 +1,418 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_api.proto + +package google.maps.fleetengine.delivery.v1; + +public final class DeliveryApi { + private DeliveryApi() {} + + 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_delivery_v1_CreateDeliveryVehicleRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_delivery_v1_CreateDeliveryVehicleRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_delivery_v1_GetDeliveryVehicleRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_delivery_v1_GetDeliveryVehicleRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_delivery_v1_ListDeliveryVehiclesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_delivery_v1_ListDeliveryVehiclesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_delivery_v1_ListDeliveryVehiclesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_delivery_v1_ListDeliveryVehiclesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_delivery_v1_UpdateDeliveryVehicleRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_delivery_v1_UpdateDeliveryVehicleRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_delivery_v1_BatchCreateTasksRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_delivery_v1_BatchCreateTasksRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_delivery_v1_BatchCreateTasksResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_delivery_v1_BatchCreateTasksResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_delivery_v1_CreateTaskRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_delivery_v1_CreateTaskRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_delivery_v1_GetTaskRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_delivery_v1_GetTaskRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_delivery_v1_SearchTasksRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_delivery_v1_SearchTasksRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_delivery_v1_SearchTasksResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_delivery_v1_SearchTasksResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_delivery_v1_UpdateTaskRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_delivery_v1_UpdateTaskRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_delivery_v1_ListTasksRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_delivery_v1_ListTasksRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_delivery_v1_ListTasksResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_delivery_v1_ListTasksResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_delivery_v1_GetTaskTrackingInfoRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_delivery_v1_GetTaskTrackingInfoRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n6google/maps/fleetengine/delivery/v1/de" + + "livery_api.proto\022\034maps.fleetengine.deliv" + + "ery.v1\032\034google/api/annotations.proto\032\027go" + + "ogle/api/client.proto\032\037google/api/field_" + + "behavior.proto\032\031google/api/resource.prot" + + "o\032\030google/api/routing.proto\032\036google/geo/" + + "type/viewport.proto\032;google/maps/fleeten" + + "gine/delivery/v1/delivery_vehicles.proto" + + "\0320google/maps/fleetengine/delivery/v1/he" + + "ader.proto\032 + * A RequestHeader contains fields common to all Delivery RPC requests. + * + * + * Protobuf type {@code maps.fleetengine.delivery.v1.DeliveryRequestHeader} + */ +public final class DeliveryRequestHeader extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.delivery.v1.DeliveryRequestHeader) + DeliveryRequestHeaderOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeliveryRequestHeader.newBuilder() to construct. + private DeliveryRequestHeader(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeliveryRequestHeader() { + languageCode_ = ""; + regionCode_ = ""; + sdkVersion_ = ""; + osVersion_ = ""; + deviceModel_ = ""; + sdkType_ = 0; + mapsSdkVersion_ = ""; + navSdkVersion_ = ""; + platform_ = 0; + manufacturer_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeliveryRequestHeader(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.Headers + .internal_static_maps_fleetengine_delivery_v1_DeliveryRequestHeader_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.Headers + .internal_static_maps_fleetengine_delivery_v1_DeliveryRequestHeader_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.class, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder.class); + } + + /** + * + * + *
+   * Possible types of SDK.
+   * 
+ * + * Protobuf enum {@code maps.fleetengine.delivery.v1.DeliveryRequestHeader.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 google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.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.delivery.v1.DeliveryRequestHeader.SdkType) + } + + /** + * + * + *
+   * The platform of the calling SDK.
+   * 
+ * + * Protobuf enum {@code maps.fleetengine.delivery.v1.DeliveryRequestHeader.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 google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.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.delivery.v1.DeliveryRequestHeader.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.delivery.v1.DeliveryRequestHeader.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.delivery.v1.DeliveryRequestHeader.SdkType sdk_type = 6; + * + * @return The sdkType. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.SdkType getSdkType() { + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.SdkType result = + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.SdkType.forNumber(sdkType_); + return result == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.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.delivery.v1.DeliveryRequestHeader.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.delivery.v1.DeliveryRequestHeader.Platform platform = 9; + * + * @return The platform. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Platform getPlatform() { + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Platform result = + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Platform.forNumber(platform_); + return result == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.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_; + } + + 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_ + != google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.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_ + != google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.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_); + } + 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_ + != google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.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_ + != google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.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_); + } + 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 google.maps.fleetengine.delivery.v1.DeliveryRequestHeader)) { + return super.equals(obj); + } + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader other = + (google.maps.fleetengine.delivery.v1.DeliveryRequestHeader) 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 (!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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.maps.fleetengine.delivery.v1.DeliveryRequestHeader parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryRequestHeader parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryRequestHeader parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryRequestHeader parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryRequestHeader parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryRequestHeader parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryRequestHeader parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryRequestHeader 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 google.maps.fleetengine.delivery.v1.DeliveryRequestHeader parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryRequestHeader 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 google.maps.fleetengine.delivery.v1.DeliveryRequestHeader parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryRequestHeader 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( + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader 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 Delivery RPC requests.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.DeliveryRequestHeader} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.delivery.v1.DeliveryRequestHeader) + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.Headers + .internal_static_maps_fleetengine_delivery_v1_DeliveryRequestHeader_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.Headers + .internal_static_maps_fleetengine_delivery_v1_DeliveryRequestHeader_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.class, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder.class); + } + + // Construct using google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.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; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return google.maps.fleetengine.delivery.v1.Headers + .internal_static_maps_fleetengine_delivery_v1_DeliveryRequestHeader_descriptor; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader getDefaultInstanceForType() { + return google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance(); + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader build() { + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader buildPartial() { + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader result = + new google.maps.fleetengine.delivery.v1.DeliveryRequestHeader(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(google.maps.fleetengine.delivery.v1.DeliveryRequestHeader 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_; + } + } + + @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 google.maps.fleetengine.delivery.v1.DeliveryRequestHeader) { + return mergeFrom((google.maps.fleetengine.delivery.v1.DeliveryRequestHeader) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.maps.fleetengine.delivery.v1.DeliveryRequestHeader other) { + if (other == google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.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()); + } + 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 + 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.delivery.v1.DeliveryRequestHeader.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.delivery.v1.DeliveryRequestHeader.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.delivery.v1.DeliveryRequestHeader.SdkType sdk_type = 6; + * + * @return The sdkType. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.SdkType getSdkType() { + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.SdkType result = + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.SdkType.forNumber(sdkType_); + return result == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.SdkType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The type of SDK sending the request.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader.SdkType sdk_type = 6; + * + * @param value The sdkType to set. + * @return This builder for chaining. + */ + public Builder setSdkType( + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.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.delivery.v1.DeliveryRequestHeader.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.delivery.v1.DeliveryRequestHeader.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.delivery.v1.DeliveryRequestHeader.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.delivery.v1.DeliveryRequestHeader.Platform platform = 9; + * + * @return The platform. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Platform getPlatform() { + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Platform result = + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Platform.forNumber(platform_); + return result == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Platform.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Platform of the calling SDK.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader.Platform platform = 9; + * + * @param value The platform to set. + * @return This builder for chaining. + */ + public Builder setPlatform( + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Platform value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + platform_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Platform of the calling SDK.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader.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; + } + + @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.delivery.v1.DeliveryRequestHeader) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.delivery.v1.DeliveryRequestHeader) + private static final google.maps.fleetengine.delivery.v1.DeliveryRequestHeader DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new google.maps.fleetengine.delivery.v1.DeliveryRequestHeader(); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryRequestHeader getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeliveryRequestHeader 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 google.maps.fleetengine.delivery.v1.DeliveryRequestHeader getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryRequestHeaderOrBuilder.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryRequestHeaderOrBuilder.java new file mode 100644 index 000000000000..7ae5a98270ea --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryRequestHeaderOrBuilder.java @@ -0,0 +1,311 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/header.proto + +package google.maps.fleetengine.delivery.v1; + +public interface DeliveryRequestHeaderOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.delivery.v1.DeliveryRequestHeader) + 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.delivery.v1.DeliveryRequestHeader.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.delivery.v1.DeliveryRequestHeader.SdkType sdk_type = 6; + * + * @return The sdkType. + */ + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.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.delivery.v1.DeliveryRequestHeader.Platform platform = 9; + * + * @return The enum numeric value on the wire for platform. + */ + int getPlatformValue(); + /** + * + * + *
+   * Platform of the calling SDK.
+   * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader.Platform platform = 9; + * + * @return The platform. + */ + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.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(); +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryVehicle.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryVehicle.java new file mode 100644 index 000000000000..29c33d16f440 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryVehicle.java @@ -0,0 +1,3963 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_vehicles.proto + +package google.maps.fleetengine.delivery.v1; + +/** + * + * + *
+ * The `DeliveryVehicle` message. A delivery vehicle transports shipments from a
+ * depot to a delivery location, and from a pickup location to the depot. In
+ * some cases, delivery vehicles also transport shipments directly from the
+ * pickup location to the delivery location.
+ *
+ * Note: gRPC and REST APIs use different field naming conventions. For example,
+ * the `DeliveryVehicle.current_route_segment` field in the gRPC API and the
+ * `DeliveryVehicle.currentRouteSegment` field in the REST API refer to the same
+ * field.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.DeliveryVehicle} + */ +public final class DeliveryVehicle extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.delivery.v1.DeliveryVehicle) + DeliveryVehicleOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeliveryVehicle.newBuilder() to construct. + private DeliveryVehicle(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeliveryVehicle() { + name_ = ""; + navigationStatus_ = 0; + currentRouteSegment_ = com.google.protobuf.ByteString.EMPTY; + remainingVehicleJourneySegments_ = java.util.Collections.emptyList(); + attributes_ = java.util.Collections.emptyList(); + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeliveryVehicle(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryVehicles + .internal_static_maps_fleetengine_delivery_v1_DeliveryVehicle_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryVehicles + .internal_static_maps_fleetengine_delivery_v1_DeliveryVehicle_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.DeliveryVehicle.class, + google.maps.fleetengine.delivery.v1.DeliveryVehicle.Builder.class); + } + + /** + * + * + *
+   * The type of delivery vehicle.
+   * 
+ * + * Protobuf enum {@code maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType} + */ + public enum DeliveryVehicleType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The value is unused.
+     * 
+ * + * DELIVERY_VEHICLE_TYPE_UNSPECIFIED = 0; + */ + DELIVERY_VEHICLE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * An automobile.
+     * 
+ * + * AUTO = 1; + */ + AUTO(1), + /** + * + * + *
+     * A motorcycle, moped, or other two-wheeled vehicle
+     * 
+ * + * TWO_WHEELER = 2; + */ + TWO_WHEELER(2), + /** + * + * + *
+     * Human-powered transport.
+     * 
+ * + * BICYCLE = 3; + */ + BICYCLE(3), + /** + * + * + *
+     * A human transporter, typically walking or running, traveling along
+     * pedestrian pathways.
+     * 
+ * + * PEDESTRIAN = 4; + */ + PEDESTRIAN(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The value is unused.
+     * 
+ * + * DELIVERY_VEHICLE_TYPE_UNSPECIFIED = 0; + */ + public static final int DELIVERY_VEHICLE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * An automobile.
+     * 
+ * + * AUTO = 1; + */ + public static final int AUTO_VALUE = 1; + /** + * + * + *
+     * A motorcycle, moped, or other two-wheeled vehicle
+     * 
+ * + * TWO_WHEELER = 2; + */ + public static final int TWO_WHEELER_VALUE = 2; + /** + * + * + *
+     * Human-powered transport.
+     * 
+ * + * BICYCLE = 3; + */ + public static final int BICYCLE_VALUE = 3; + /** + * + * + *
+     * A human transporter, typically walking or running, traveling along
+     * pedestrian pathways.
+     * 
+ * + * PEDESTRIAN = 4; + */ + public static final int PEDESTRIAN_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 DeliveryVehicleType 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 DeliveryVehicleType forNumber(int value) { + switch (value) { + case 0: + return DELIVERY_VEHICLE_TYPE_UNSPECIFIED; + case 1: + return AUTO; + case 2: + return TWO_WHEELER; + case 3: + return BICYCLE; + case 4: + 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 DeliveryVehicleType findValueByNumber(int number) { + return DeliveryVehicleType.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 google.maps.fleetengine.delivery.v1.DeliveryVehicle.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final DeliveryVehicleType[] VALUES = values(); + + public static DeliveryVehicleType 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 DeliveryVehicleType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType) + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * The unique name of this Delivery Vehicle.
+   * The format is `providers/{provider}/deliveryVehicles/{vehicle}`.
+   * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+   * The unique name of this Delivery Vehicle.
+   * The format is `providers/{provider}/deliveryVehicles/{vehicle}`.
+   * 
+ * + * string name = 1; + * + * @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 LAST_LOCATION_FIELD_NUMBER = 2; + private google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation lastLocation_; + /** + * + * + *
+   * The last reported location of the Delivery Vehicle.
+   * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; + * + * @return Whether the lastLocation field is set. + */ + @java.lang.Override + public boolean hasLastLocation() { + return lastLocation_ != null; + } + /** + * + * + *
+   * The last reported location of the Delivery Vehicle.
+   * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; + * + * @return The lastLocation. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation getLastLocation() { + return lastLocation_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation.getDefaultInstance() + : lastLocation_; + } + /** + * + * + *
+   * The last reported location of the Delivery Vehicle.
+   * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationOrBuilder + getLastLocationOrBuilder() { + return lastLocation_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation.getDefaultInstance() + : lastLocation_; + } + + public static final int NAVIGATION_STATUS_FIELD_NUMBER = 3; + private int navigationStatus_ = 0; + /** + * + * + *
+   * The Delivery Vehicle's navigation status.
+   * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus navigation_status = 3; + * + * + * @return The enum numeric value on the wire for navigationStatus. + */ + @java.lang.Override + public int getNavigationStatusValue() { + return navigationStatus_; + } + /** + * + * + *
+   * The Delivery Vehicle's navigation status.
+   * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus navigation_status = 3; + * + * + * @return The navigationStatus. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus getNavigationStatus() { + google.maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus result = + google.maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus.forNumber( + navigationStatus_); + return result == null + ? google.maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus.UNRECOGNIZED + : result; + } + + public static final int CURRENT_ROUTE_SEGMENT_FIELD_NUMBER = 4; + private com.google.protobuf.ByteString currentRouteSegment_ = + com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+   * The encoded polyline specifying the route that the navigation recommends
+   * taking to the next waypoint. Your driver app updates this when a
+   * stop is reached or passed, and when the navigation reroutes. These
+   * `LatLng`s are returned in
+   * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+   * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+   * (REST) for all active Tasks assigned to the Vehicle.
+   *
+   * There are a few cases where this field might not be used to populate
+   * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+   * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+   * (REST):
+   *
+   * * The endpoint of the `current_route_segment` does not match
+   * `DeliveryVehicle.remaining_vehicle_journey_segments[0].stop` (gRPC) or
+   * `DeliveryVehicle.remainingVehicleJourneySegments[0].stop` (REST).
+   *
+   * * The driver app has not updated its location recently, so the last
+   * updated value for this field might be stale.
+   *
+   * * The driver app has recently updated its location, but the
+   * `current_route_segment` is stale, and points to a previous vehicle stop.
+   *
+   * In these cases, Fleet Engine populates this field with a route from the
+   * most recently passed VehicleStop to the upcoming VehicleStop to ensure that
+   * the consumer of this field has the best available information on the
+   * current path of the Delivery Vehicle.
+   * 
+ * + * bytes current_route_segment = 4; + * + * @return The currentRouteSegment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCurrentRouteSegment() { + return currentRouteSegment_; + } + + public static final int CURRENT_ROUTE_SEGMENT_END_POINT_FIELD_NUMBER = 5; + private com.google.type.LatLng currentRouteSegmentEndPoint_; + /** + * + * + *
+   * The location where the `current_route_segment` ends. This is not currently
+   * populated by the driver app, but you can supply it on
+   * `UpdateDeliveryVehicle` calls. It is either the `LatLng` from the upcoming
+   * vehicle stop, or the last `LatLng` of the `current_route_segment`. Fleet
+   * Engine will then do its best to interpolate to an actual `VehicleStop`.
+   *
+   * This field is ignored in `UpdateDeliveryVehicle` calls if the
+   * `current_route_segment` field is empty.
+   * 
+ * + * .google.type.LatLng current_route_segment_end_point = 5; + * + * @return Whether the currentRouteSegmentEndPoint field is set. + */ + @java.lang.Override + public boolean hasCurrentRouteSegmentEndPoint() { + return currentRouteSegmentEndPoint_ != null; + } + /** + * + * + *
+   * The location where the `current_route_segment` ends. This is not currently
+   * populated by the driver app, but you can supply it on
+   * `UpdateDeliveryVehicle` calls. It is either the `LatLng` from the upcoming
+   * vehicle stop, or the last `LatLng` of the `current_route_segment`. Fleet
+   * Engine will then do its best to interpolate to an actual `VehicleStop`.
+   *
+   * This field is ignored in `UpdateDeliveryVehicle` calls if the
+   * `current_route_segment` field is empty.
+   * 
+ * + * .google.type.LatLng current_route_segment_end_point = 5; + * + * @return The currentRouteSegmentEndPoint. + */ + @java.lang.Override + public com.google.type.LatLng getCurrentRouteSegmentEndPoint() { + return currentRouteSegmentEndPoint_ == null + ? com.google.type.LatLng.getDefaultInstance() + : currentRouteSegmentEndPoint_; + } + /** + * + * + *
+   * The location where the `current_route_segment` ends. This is not currently
+   * populated by the driver app, but you can supply it on
+   * `UpdateDeliveryVehicle` calls. It is either the `LatLng` from the upcoming
+   * vehicle stop, or the last `LatLng` of the `current_route_segment`. Fleet
+   * Engine will then do its best to interpolate to an actual `VehicleStop`.
+   *
+   * This field is ignored in `UpdateDeliveryVehicle` calls if the
+   * `current_route_segment` field is empty.
+   * 
+ * + * .google.type.LatLng current_route_segment_end_point = 5; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getCurrentRouteSegmentEndPointOrBuilder() { + return currentRouteSegmentEndPoint_ == null + ? com.google.type.LatLng.getDefaultInstance() + : currentRouteSegmentEndPoint_; + } + + public static final int REMAINING_DISTANCE_METERS_FIELD_NUMBER = 6; + private com.google.protobuf.Int32Value remainingDistanceMeters_; + /** + * + * + *
+   * The remaining driving distance for the `current_route_segment`.
+   * The Driver app typically provides this field, but there are some
+   * circumstances in which Fleet Engine will override the value sent by the
+   * app. For more information, see
+   * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+   * This field is returned in
+   * `Task.remaining_vehicle_journey_segments[0].driving_distance_meters` (gRPC)
+   * or `Task.remainingVehicleJourneySegments[0].drivingDistanceMeters` (REST)
+   * for all active `Task`s assigned to the Delivery Vehicle.
+   *
+   * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the
+   * `current_route_segment` field is empty.
+   * 
+ * + * .google.protobuf.Int32Value remaining_distance_meters = 6; + * + * @return Whether the remainingDistanceMeters field is set. + */ + @java.lang.Override + public boolean hasRemainingDistanceMeters() { + return remainingDistanceMeters_ != null; + } + /** + * + * + *
+   * The remaining driving distance for the `current_route_segment`.
+   * The Driver app typically provides this field, but there are some
+   * circumstances in which Fleet Engine will override the value sent by the
+   * app. For more information, see
+   * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+   * This field is returned in
+   * `Task.remaining_vehicle_journey_segments[0].driving_distance_meters` (gRPC)
+   * or `Task.remainingVehicleJourneySegments[0].drivingDistanceMeters` (REST)
+   * for all active `Task`s assigned to the Delivery Vehicle.
+   *
+   * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the
+   * `current_route_segment` field is empty.
+   * 
+ * + * .google.protobuf.Int32Value remaining_distance_meters = 6; + * + * @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`.
+   * The Driver app typically provides this field, but there are some
+   * circumstances in which Fleet Engine will override the value sent by the
+   * app. For more information, see
+   * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+   * This field is returned in
+   * `Task.remaining_vehicle_journey_segments[0].driving_distance_meters` (gRPC)
+   * or `Task.remainingVehicleJourneySegments[0].drivingDistanceMeters` (REST)
+   * for all active `Task`s assigned to the Delivery Vehicle.
+   *
+   * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the
+   * `current_route_segment` field is empty.
+   * 
+ * + * .google.protobuf.Int32Value remaining_distance_meters = 6; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getRemainingDistanceMetersOrBuilder() { + return remainingDistanceMeters_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : remainingDistanceMeters_; + } + + public static final int REMAINING_DURATION_FIELD_NUMBER = 7; + private com.google.protobuf.Duration remainingDuration_; + /** + * + * + *
+   * The remaining driving time for the `current_route_segment`.
+   * The Driver app typically provides this field, but there are some
+   * circumstances in which Fleet Engine will override the value sent by the
+   * app.  For more information, see
+   * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+   * This field is returned in
+   * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or
+   * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST) for all
+   * active tasks assigned to the Delivery Vehicle.
+   *
+   * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the
+   * `current_route_segment` field is empty.
+   * 
+ * + * .google.protobuf.Duration remaining_duration = 7; + * + * @return Whether the remainingDuration field is set. + */ + @java.lang.Override + public boolean hasRemainingDuration() { + return remainingDuration_ != null; + } + /** + * + * + *
+   * The remaining driving time for the `current_route_segment`.
+   * The Driver app typically provides this field, but there are some
+   * circumstances in which Fleet Engine will override the value sent by the
+   * app.  For more information, see
+   * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+   * This field is returned in
+   * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or
+   * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST) for all
+   * active tasks assigned to the Delivery Vehicle.
+   *
+   * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the
+   * `current_route_segment` field is empty.
+   * 
+ * + * .google.protobuf.Duration remaining_duration = 7; + * + * @return The remainingDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getRemainingDuration() { + return remainingDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : remainingDuration_; + } + /** + * + * + *
+   * The remaining driving time for the `current_route_segment`.
+   * The Driver app typically provides this field, but there are some
+   * circumstances in which Fleet Engine will override the value sent by the
+   * app.  For more information, see
+   * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+   * This field is returned in
+   * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or
+   * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST) for all
+   * active tasks assigned to the Delivery Vehicle.
+   *
+   * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the
+   * `current_route_segment` field is empty.
+   * 
+ * + * .google.protobuf.Duration remaining_duration = 7; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getRemainingDurationOrBuilder() { + return remainingDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : remainingDuration_; + } + + public static final int REMAINING_VEHICLE_JOURNEY_SEGMENTS_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private java.util.List + remainingVehicleJourneySegments_; + /** + * + * + *
+   * The journey segments assigned to this Delivery Vehicle, starting from the
+   * Vehicle's most recently reported location. This field won't be populated
+   * in the response of `ListDeliveryVehicles`.
+   * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 8; + * + */ + @java.lang.Override + public java.util.List + getRemainingVehicleJourneySegmentsList() { + return remainingVehicleJourneySegments_; + } + /** + * + * + *
+   * The journey segments assigned to this Delivery Vehicle, starting from the
+   * Vehicle's most recently reported location. This field won't be populated
+   * in the response of `ListDeliveryVehicles`.
+   * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 8; + * + */ + @java.lang.Override + public java.util.List< + ? extends google.maps.fleetengine.delivery.v1.VehicleJourneySegmentOrBuilder> + getRemainingVehicleJourneySegmentsOrBuilderList() { + return remainingVehicleJourneySegments_; + } + /** + * + * + *
+   * The journey segments assigned to this Delivery Vehicle, starting from the
+   * Vehicle's most recently reported location. This field won't be populated
+   * in the response of `ListDeliveryVehicles`.
+   * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 8; + * + */ + @java.lang.Override + public int getRemainingVehicleJourneySegmentsCount() { + return remainingVehicleJourneySegments_.size(); + } + /** + * + * + *
+   * The journey segments assigned to this Delivery Vehicle, starting from the
+   * Vehicle's most recently reported location. This field won't be populated
+   * in the response of `ListDeliveryVehicles`.
+   * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 8; + * + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.VehicleJourneySegment + getRemainingVehicleJourneySegments(int index) { + return remainingVehicleJourneySegments_.get(index); + } + /** + * + * + *
+   * The journey segments assigned to this Delivery Vehicle, starting from the
+   * Vehicle's most recently reported location. This field won't be populated
+   * in the response of `ListDeliveryVehicles`.
+   * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 8; + * + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.VehicleJourneySegmentOrBuilder + getRemainingVehicleJourneySegmentsOrBuilder(int index) { + return remainingVehicleJourneySegments_.get(index); + } + + public static final int ATTRIBUTES_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private java.util.List attributes_; + /** + * + * + *
+   * A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have
+   * at most 100 attributes, and each attribute must have a unique key.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicleAttribute attributes = 9; + */ + @java.lang.Override + public java.util.List + getAttributesList() { + return attributes_; + } + /** + * + * + *
+   * A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have
+   * at most 100 attributes, and each attribute must have a unique key.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicleAttribute attributes = 9; + */ + @java.lang.Override + public java.util.List< + ? extends google.maps.fleetengine.delivery.v1.DeliveryVehicleAttributeOrBuilder> + getAttributesOrBuilderList() { + return attributes_; + } + /** + * + * + *
+   * A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have
+   * at most 100 attributes, and each attribute must have a unique key.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicleAttribute attributes = 9; + */ + @java.lang.Override + public int getAttributesCount() { + return attributes_.size(); + } + /** + * + * + *
+   * A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have
+   * at most 100 attributes, and each attribute must have a unique key.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicleAttribute attributes = 9; + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute getAttributes(int index) { + return attributes_.get(index); + } + /** + * + * + *
+   * A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have
+   * at most 100 attributes, and each attribute must have a unique key.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicleAttribute attributes = 9; + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryVehicleAttributeOrBuilder + getAttributesOrBuilder(int index) { + return attributes_.get(index); + } + + public static final int TYPE_FIELD_NUMBER = 10; + private int type_ = 0; + /** + * + * + *
+   * The type of this delivery vehicle. If unset, this will default to `AUTO`.
+   * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType type = 10; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * The type of this delivery vehicle. If unset, this will default to `AUTO`.
+   * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType type = 10; + * + * @return The type. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType getType() { + google.maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType result = + google.maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType.forNumber(type_); + return result == null + ? google.maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType.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 (lastLocation_ != null) { + output.writeMessage(2, getLastLocation()); + } + if (navigationStatus_ + != google.maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus + .UNKNOWN_NAVIGATION_STATUS + .getNumber()) { + output.writeEnum(3, navigationStatus_); + } + if (!currentRouteSegment_.isEmpty()) { + output.writeBytes(4, currentRouteSegment_); + } + if (currentRouteSegmentEndPoint_ != null) { + output.writeMessage(5, getCurrentRouteSegmentEndPoint()); + } + if (remainingDistanceMeters_ != null) { + output.writeMessage(6, getRemainingDistanceMeters()); + } + if (remainingDuration_ != null) { + output.writeMessage(7, getRemainingDuration()); + } + for (int i = 0; i < remainingVehicleJourneySegments_.size(); i++) { + output.writeMessage(8, remainingVehicleJourneySegments_.get(i)); + } + for (int i = 0; i < attributes_.size(); i++) { + output.writeMessage(9, attributes_.get(i)); + } + if (type_ + != google.maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType + .DELIVERY_VEHICLE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(10, type_); + } + 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 (lastLocation_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getLastLocation()); + } + if (navigationStatus_ + != google.maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus + .UNKNOWN_NAVIGATION_STATUS + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, navigationStatus_); + } + if (!currentRouteSegment_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(4, currentRouteSegment_); + } + if (currentRouteSegmentEndPoint_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, getCurrentRouteSegmentEndPoint()); + } + if (remainingDistanceMeters_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(6, getRemainingDistanceMeters()); + } + if (remainingDuration_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getRemainingDuration()); + } + for (int i = 0; i < remainingVehicleJourneySegments_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, remainingVehicleJourneySegments_.get(i)); + } + for (int i = 0; i < attributes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, attributes_.get(i)); + } + if (type_ + != google.maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType + .DELIVERY_VEHICLE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, type_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof google.maps.fleetengine.delivery.v1.DeliveryVehicle)) { + return super.equals(obj); + } + google.maps.fleetengine.delivery.v1.DeliveryVehicle other = + (google.maps.fleetengine.delivery.v1.DeliveryVehicle) obj; + + if (!getName().equals(other.getName())) return false; + if (hasLastLocation() != other.hasLastLocation()) return false; + if (hasLastLocation()) { + if (!getLastLocation().equals(other.getLastLocation())) return false; + } + if (navigationStatus_ != other.navigationStatus_) return false; + if (!getCurrentRouteSegment().equals(other.getCurrentRouteSegment())) 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 (hasRemainingDuration() != other.hasRemainingDuration()) return false; + if (hasRemainingDuration()) { + if (!getRemainingDuration().equals(other.getRemainingDuration())) return false; + } + if (!getRemainingVehicleJourneySegmentsList() + .equals(other.getRemainingVehicleJourneySegmentsList())) return false; + if (!getAttributesList().equals(other.getAttributesList())) return false; + if (type_ != other.type_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasLastLocation()) { + hash = (37 * hash) + LAST_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLastLocation().hashCode(); + } + hash = (37 * hash) + NAVIGATION_STATUS_FIELD_NUMBER; + hash = (53 * hash) + navigationStatus_; + hash = (37 * hash) + CURRENT_ROUTE_SEGMENT_FIELD_NUMBER; + hash = (53 * hash) + getCurrentRouteSegment().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 (hasRemainingDuration()) { + hash = (37 * hash) + REMAINING_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getRemainingDuration().hashCode(); + } + if (getRemainingVehicleJourneySegmentsCount() > 0) { + hash = (37 * hash) + REMAINING_VEHICLE_JOURNEY_SEGMENTS_FIELD_NUMBER; + hash = (53 * hash) + getRemainingVehicleJourneySegmentsList().hashCode(); + } + if (getAttributesCount() > 0) { + hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getAttributesList().hashCode(); + } + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.maps.fleetengine.delivery.v1.DeliveryVehicle parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryVehicle parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryVehicle parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryVehicle parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryVehicle parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryVehicle parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryVehicle parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryVehicle 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 google.maps.fleetengine.delivery.v1.DeliveryVehicle parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryVehicle 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 google.maps.fleetengine.delivery.v1.DeliveryVehicle parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryVehicle 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(google.maps.fleetengine.delivery.v1.DeliveryVehicle 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 `DeliveryVehicle` message. A delivery vehicle transports shipments from a
+   * depot to a delivery location, and from a pickup location to the depot. In
+   * some cases, delivery vehicles also transport shipments directly from the
+   * pickup location to the delivery location.
+   *
+   * Note: gRPC and REST APIs use different field naming conventions. For example,
+   * the `DeliveryVehicle.current_route_segment` field in the gRPC API and the
+   * `DeliveryVehicle.currentRouteSegment` field in the REST API refer to the same
+   * field.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.DeliveryVehicle} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.delivery.v1.DeliveryVehicle) + google.maps.fleetengine.delivery.v1.DeliveryVehicleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryVehicles + .internal_static_maps_fleetengine_delivery_v1_DeliveryVehicle_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryVehicles + .internal_static_maps_fleetengine_delivery_v1_DeliveryVehicle_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.DeliveryVehicle.class, + google.maps.fleetengine.delivery.v1.DeliveryVehicle.Builder.class); + } + + // Construct using google.maps.fleetengine.delivery.v1.DeliveryVehicle.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + lastLocation_ = null; + if (lastLocationBuilder_ != null) { + lastLocationBuilder_.dispose(); + lastLocationBuilder_ = null; + } + navigationStatus_ = 0; + currentRouteSegment_ = com.google.protobuf.ByteString.EMPTY; + currentRouteSegmentEndPoint_ = null; + if (currentRouteSegmentEndPointBuilder_ != null) { + currentRouteSegmentEndPointBuilder_.dispose(); + currentRouteSegmentEndPointBuilder_ = null; + } + remainingDistanceMeters_ = null; + if (remainingDistanceMetersBuilder_ != null) { + remainingDistanceMetersBuilder_.dispose(); + remainingDistanceMetersBuilder_ = null; + } + remainingDuration_ = null; + if (remainingDurationBuilder_ != null) { + remainingDurationBuilder_.dispose(); + remainingDurationBuilder_ = null; + } + if (remainingVehicleJourneySegmentsBuilder_ == null) { + remainingVehicleJourneySegments_ = java.util.Collections.emptyList(); + } else { + remainingVehicleJourneySegments_ = null; + remainingVehicleJourneySegmentsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + if (attributesBuilder_ == null) { + attributes_ = java.util.Collections.emptyList(); + } else { + attributes_ = null; + attributesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000100); + type_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return google.maps.fleetengine.delivery.v1.DeliveryVehicles + .internal_static_maps_fleetengine_delivery_v1_DeliveryVehicle_descriptor; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryVehicle getDefaultInstanceForType() { + return google.maps.fleetengine.delivery.v1.DeliveryVehicle.getDefaultInstance(); + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryVehicle build() { + google.maps.fleetengine.delivery.v1.DeliveryVehicle result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryVehicle buildPartial() { + google.maps.fleetengine.delivery.v1.DeliveryVehicle result = + new google.maps.fleetengine.delivery.v1.DeliveryVehicle(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + google.maps.fleetengine.delivery.v1.DeliveryVehicle result) { + if (remainingVehicleJourneySegmentsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0)) { + remainingVehicleJourneySegments_ = + java.util.Collections.unmodifiableList(remainingVehicleJourneySegments_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.remainingVehicleJourneySegments_ = remainingVehicleJourneySegments_; + } else { + result.remainingVehicleJourneySegments_ = remainingVehicleJourneySegmentsBuilder_.build(); + } + if (attributesBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0)) { + attributes_ = java.util.Collections.unmodifiableList(attributes_); + bitField0_ = (bitField0_ & ~0x00000100); + } + result.attributes_ = attributes_; + } else { + result.attributes_ = attributesBuilder_.build(); + } + } + + private void buildPartial0(google.maps.fleetengine.delivery.v1.DeliveryVehicle result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.lastLocation_ = + lastLocationBuilder_ == null ? lastLocation_ : lastLocationBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.navigationStatus_ = navigationStatus_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.currentRouteSegment_ = currentRouteSegment_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.currentRouteSegmentEndPoint_ = + currentRouteSegmentEndPointBuilder_ == null + ? currentRouteSegmentEndPoint_ + : currentRouteSegmentEndPointBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.remainingDistanceMeters_ = + remainingDistanceMetersBuilder_ == null + ? remainingDistanceMeters_ + : remainingDistanceMetersBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.remainingDuration_ = + remainingDurationBuilder_ == null + ? remainingDuration_ + : remainingDurationBuilder_.build(); + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.type_ = type_; + } + } + + @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 google.maps.fleetengine.delivery.v1.DeliveryVehicle) { + return mergeFrom((google.maps.fleetengine.delivery.v1.DeliveryVehicle) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.maps.fleetengine.delivery.v1.DeliveryVehicle other) { + if (other == google.maps.fleetengine.delivery.v1.DeliveryVehicle.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasLastLocation()) { + mergeLastLocation(other.getLastLocation()); + } + if (other.navigationStatus_ != 0) { + setNavigationStatusValue(other.getNavigationStatusValue()); + } + if (other.getCurrentRouteSegment() != com.google.protobuf.ByteString.EMPTY) { + setCurrentRouteSegment(other.getCurrentRouteSegment()); + } + if (other.hasCurrentRouteSegmentEndPoint()) { + mergeCurrentRouteSegmentEndPoint(other.getCurrentRouteSegmentEndPoint()); + } + if (other.hasRemainingDistanceMeters()) { + mergeRemainingDistanceMeters(other.getRemainingDistanceMeters()); + } + if (other.hasRemainingDuration()) { + mergeRemainingDuration(other.getRemainingDuration()); + } + if (remainingVehicleJourneySegmentsBuilder_ == null) { + if (!other.remainingVehicleJourneySegments_.isEmpty()) { + if (remainingVehicleJourneySegments_.isEmpty()) { + remainingVehicleJourneySegments_ = other.remainingVehicleJourneySegments_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureRemainingVehicleJourneySegmentsIsMutable(); + remainingVehicleJourneySegments_.addAll(other.remainingVehicleJourneySegments_); + } + onChanged(); + } + } else { + if (!other.remainingVehicleJourneySegments_.isEmpty()) { + if (remainingVehicleJourneySegmentsBuilder_.isEmpty()) { + remainingVehicleJourneySegmentsBuilder_.dispose(); + remainingVehicleJourneySegmentsBuilder_ = null; + remainingVehicleJourneySegments_ = other.remainingVehicleJourneySegments_; + bitField0_ = (bitField0_ & ~0x00000080); + remainingVehicleJourneySegmentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRemainingVehicleJourneySegmentsFieldBuilder() + : null; + } else { + remainingVehicleJourneySegmentsBuilder_.addAllMessages( + other.remainingVehicleJourneySegments_); + } + } + } + if (attributesBuilder_ == null) { + if (!other.attributes_.isEmpty()) { + if (attributes_.isEmpty()) { + attributes_ = other.attributes_; + bitField0_ = (bitField0_ & ~0x00000100); + } else { + ensureAttributesIsMutable(); + attributes_.addAll(other.attributes_); + } + onChanged(); + } + } else { + if (!other.attributes_.isEmpty()) { + if (attributesBuilder_.isEmpty()) { + attributesBuilder_.dispose(); + attributesBuilder_ = null; + attributes_ = other.attributes_; + bitField0_ = (bitField0_ & ~0x00000100); + attributesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAttributesFieldBuilder() + : null; + } else { + attributesBuilder_.addAllMessages(other.attributes_); + } + } + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getLastLocationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + navigationStatus_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + currentRouteSegment_ = input.readBytes(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage( + getCurrentRouteSegmentEndPointFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage( + getRemainingDistanceMetersFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage( + getRemainingDurationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + google.maps.fleetengine.delivery.v1.VehicleJourneySegment m = + input.readMessage( + google.maps.fleetengine.delivery.v1.VehicleJourneySegment.parser(), + extensionRegistry); + if (remainingVehicleJourneySegmentsBuilder_ == null) { + ensureRemainingVehicleJourneySegmentsIsMutable(); + remainingVehicleJourneySegments_.add(m); + } else { + remainingVehicleJourneySegmentsBuilder_.addMessage(m); + } + break; + } // case 66 + case 74: + { + google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute m = + input.readMessage( + google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute.parser(), + extensionRegistry); + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.add(m); + } else { + attributesBuilder_.addMessage(m); + } + break; + } // case 74 + case 80: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 80 + 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_ = ""; + /** + * + * + *
+     * The unique name of this Delivery Vehicle.
+     * The format is `providers/{provider}/deliveryVehicles/{vehicle}`.
+     * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+     * The unique name of this Delivery Vehicle.
+     * The format is `providers/{provider}/deliveryVehicles/{vehicle}`.
+     * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+     * The unique name of this Delivery Vehicle.
+     * The format is `providers/{provider}/deliveryVehicles/{vehicle}`.
+     * 
+ * + * string name = 1; + * + * @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; + } + /** + * + * + *
+     * The unique name of this Delivery Vehicle.
+     * The format is `providers/{provider}/deliveryVehicles/{vehicle}`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The unique name of this Delivery Vehicle.
+     * The format is `providers/{provider}/deliveryVehicles/{vehicle}`.
+     * 
+ * + * string name = 1; + * + * @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 google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation lastLocation_; + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation, + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation.Builder, + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationOrBuilder> + lastLocationBuilder_; + /** + * + * + *
+     * The last reported location of the Delivery Vehicle.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; + * + * @return Whether the lastLocation field is set. + */ + public boolean hasLastLocation() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The last reported location of the Delivery Vehicle.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; + * + * @return The lastLocation. + */ + public google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation getLastLocation() { + if (lastLocationBuilder_ == null) { + return lastLocation_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation.getDefaultInstance() + : lastLocation_; + } else { + return lastLocationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The last reported location of the Delivery Vehicle.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; + */ + public Builder setLastLocation( + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation value) { + if (lastLocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastLocation_ = value; + } else { + lastLocationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The last reported location of the Delivery Vehicle.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; + */ + public Builder setLastLocation( + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation.Builder builderForValue) { + if (lastLocationBuilder_ == null) { + lastLocation_ = builderForValue.build(); + } else { + lastLocationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The last reported location of the Delivery Vehicle.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; + */ + public Builder mergeLastLocation( + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation value) { + if (lastLocationBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && lastLocation_ != null + && lastLocation_ + != google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation + .getDefaultInstance()) { + getLastLocationBuilder().mergeFrom(value); + } else { + lastLocation_ = value; + } + } else { + lastLocationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The last reported location of the Delivery Vehicle.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; + */ + public Builder clearLastLocation() { + bitField0_ = (bitField0_ & ~0x00000002); + lastLocation_ = null; + if (lastLocationBuilder_ != null) { + lastLocationBuilder_.dispose(); + lastLocationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The last reported location of the Delivery Vehicle.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; + */ + public google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation.Builder + getLastLocationBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getLastLocationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The last reported location of the Delivery Vehicle.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; + */ + public google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationOrBuilder + getLastLocationOrBuilder() { + if (lastLocationBuilder_ != null) { + return lastLocationBuilder_.getMessageOrBuilder(); + } else { + return lastLocation_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation.getDefaultInstance() + : lastLocation_; + } + } + /** + * + * + *
+     * The last reported location of the Delivery Vehicle.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation, + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation.Builder, + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationOrBuilder> + getLastLocationFieldBuilder() { + if (lastLocationBuilder_ == null) { + lastLocationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation, + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation.Builder, + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationOrBuilder>( + getLastLocation(), getParentForChildren(), isClean()); + lastLocation_ = null; + } + return lastLocationBuilder_; + } + + private int navigationStatus_ = 0; + /** + * + * + *
+     * The Delivery Vehicle's navigation status.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus navigation_status = 3; + * + * + * @return The enum numeric value on the wire for navigationStatus. + */ + @java.lang.Override + public int getNavigationStatusValue() { + return navigationStatus_; + } + /** + * + * + *
+     * The Delivery Vehicle's navigation status.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus navigation_status = 3; + * + * + * @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_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The Delivery Vehicle's navigation status.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus navigation_status = 3; + * + * + * @return The navigationStatus. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus + getNavigationStatus() { + google.maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus result = + google.maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus.forNumber( + navigationStatus_); + return result == null + ? google.maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The Delivery Vehicle's navigation status.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus navigation_status = 3; + * + * + * @param value The navigationStatus to set. + * @return This builder for chaining. + */ + public Builder setNavigationStatus( + google.maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + navigationStatus_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The Delivery Vehicle's navigation status.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus navigation_status = 3; + * + * + * @return This builder for chaining. + */ + public Builder clearNavigationStatus() { + bitField0_ = (bitField0_ & ~0x00000004); + navigationStatus_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString currentRouteSegment_ = + com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+     * The encoded polyline specifying the route that the navigation recommends
+     * taking to the next waypoint. Your driver app updates this when a
+     * stop is reached or passed, and when the navigation reroutes. These
+     * `LatLng`s are returned in
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+     * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+     * (REST) for all active Tasks assigned to the Vehicle.
+     *
+     * There are a few cases where this field might not be used to populate
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+     * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+     * (REST):
+     *
+     * * The endpoint of the `current_route_segment` does not match
+     * `DeliveryVehicle.remaining_vehicle_journey_segments[0].stop` (gRPC) or
+     * `DeliveryVehicle.remainingVehicleJourneySegments[0].stop` (REST).
+     *
+     * * The driver app has not updated its location recently, so the last
+     * updated value for this field might be stale.
+     *
+     * * The driver app has recently updated its location, but the
+     * `current_route_segment` is stale, and points to a previous vehicle stop.
+     *
+     * In these cases, Fleet Engine populates this field with a route from the
+     * most recently passed VehicleStop to the upcoming VehicleStop to ensure that
+     * the consumer of this field has the best available information on the
+     * current path of the Delivery Vehicle.
+     * 
+ * + * bytes current_route_segment = 4; + * + * @return The currentRouteSegment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCurrentRouteSegment() { + return currentRouteSegment_; + } + /** + * + * + *
+     * The encoded polyline specifying the route that the navigation recommends
+     * taking to the next waypoint. Your driver app updates this when a
+     * stop is reached or passed, and when the navigation reroutes. These
+     * `LatLng`s are returned in
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+     * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+     * (REST) for all active Tasks assigned to the Vehicle.
+     *
+     * There are a few cases where this field might not be used to populate
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+     * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+     * (REST):
+     *
+     * * The endpoint of the `current_route_segment` does not match
+     * `DeliveryVehicle.remaining_vehicle_journey_segments[0].stop` (gRPC) or
+     * `DeliveryVehicle.remainingVehicleJourneySegments[0].stop` (REST).
+     *
+     * * The driver app has not updated its location recently, so the last
+     * updated value for this field might be stale.
+     *
+     * * The driver app has recently updated its location, but the
+     * `current_route_segment` is stale, and points to a previous vehicle stop.
+     *
+     * In these cases, Fleet Engine populates this field with a route from the
+     * most recently passed VehicleStop to the upcoming VehicleStop to ensure that
+     * the consumer of this field has the best available information on the
+     * current path of the Delivery Vehicle.
+     * 
+ * + * bytes current_route_segment = 4; + * + * @param value The currentRouteSegment to set. + * @return This builder for chaining. + */ + public Builder setCurrentRouteSegment(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + currentRouteSegment_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The encoded polyline specifying the route that the navigation recommends
+     * taking to the next waypoint. Your driver app updates this when a
+     * stop is reached or passed, and when the navigation reroutes. These
+     * `LatLng`s are returned in
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+     * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+     * (REST) for all active Tasks assigned to the Vehicle.
+     *
+     * There are a few cases where this field might not be used to populate
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+     * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+     * (REST):
+     *
+     * * The endpoint of the `current_route_segment` does not match
+     * `DeliveryVehicle.remaining_vehicle_journey_segments[0].stop` (gRPC) or
+     * `DeliveryVehicle.remainingVehicleJourneySegments[0].stop` (REST).
+     *
+     * * The driver app has not updated its location recently, so the last
+     * updated value for this field might be stale.
+     *
+     * * The driver app has recently updated its location, but the
+     * `current_route_segment` is stale, and points to a previous vehicle stop.
+     *
+     * In these cases, Fleet Engine populates this field with a route from the
+     * most recently passed VehicleStop to the upcoming VehicleStop to ensure that
+     * the consumer of this field has the best available information on the
+     * current path of the Delivery Vehicle.
+     * 
+ * + * bytes current_route_segment = 4; + * + * @return This builder for chaining. + */ + public Builder clearCurrentRouteSegment() { + bitField0_ = (bitField0_ & ~0x00000008); + currentRouteSegment_ = getDefaultInstance().getCurrentRouteSegment(); + onChanged(); + return this; + } + + private com.google.type.LatLng currentRouteSegmentEndPoint_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + currentRouteSegmentEndPointBuilder_; + /** + * + * + *
+     * The location where the `current_route_segment` ends. This is not currently
+     * populated by the driver app, but you can supply it on
+     * `UpdateDeliveryVehicle` calls. It is either the `LatLng` from the upcoming
+     * vehicle stop, or the last `LatLng` of the `current_route_segment`. Fleet
+     * Engine will then do its best to interpolate to an actual `VehicleStop`.
+     *
+     * This field is ignored in `UpdateDeliveryVehicle` calls if the
+     * `current_route_segment` field is empty.
+     * 
+ * + * .google.type.LatLng current_route_segment_end_point = 5; + * + * @return Whether the currentRouteSegmentEndPoint field is set. + */ + public boolean hasCurrentRouteSegmentEndPoint() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * The location where the `current_route_segment` ends. This is not currently
+     * populated by the driver app, but you can supply it on
+     * `UpdateDeliveryVehicle` calls. It is either the `LatLng` from the upcoming
+     * vehicle stop, or the last `LatLng` of the `current_route_segment`. Fleet
+     * Engine will then do its best to interpolate to an actual `VehicleStop`.
+     *
+     * This field is ignored in `UpdateDeliveryVehicle` calls if the
+     * `current_route_segment` field is empty.
+     * 
+ * + * .google.type.LatLng current_route_segment_end_point = 5; + * + * @return The currentRouteSegmentEndPoint. + */ + public com.google.type.LatLng getCurrentRouteSegmentEndPoint() { + if (currentRouteSegmentEndPointBuilder_ == null) { + return currentRouteSegmentEndPoint_ == null + ? com.google.type.LatLng.getDefaultInstance() + : currentRouteSegmentEndPoint_; + } else { + return currentRouteSegmentEndPointBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The location where the `current_route_segment` ends. This is not currently
+     * populated by the driver app, but you can supply it on
+     * `UpdateDeliveryVehicle` calls. It is either the `LatLng` from the upcoming
+     * vehicle stop, or the last `LatLng` of the `current_route_segment`. Fleet
+     * Engine will then do its best to interpolate to an actual `VehicleStop`.
+     *
+     * This field is ignored in `UpdateDeliveryVehicle` calls if the
+     * `current_route_segment` field is empty.
+     * 
+ * + * .google.type.LatLng current_route_segment_end_point = 5; + */ + public Builder setCurrentRouteSegmentEndPoint(com.google.type.LatLng value) { + if (currentRouteSegmentEndPointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + currentRouteSegmentEndPoint_ = value; + } else { + currentRouteSegmentEndPointBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The location where the `current_route_segment` ends. This is not currently
+     * populated by the driver app, but you can supply it on
+     * `UpdateDeliveryVehicle` calls. It is either the `LatLng` from the upcoming
+     * vehicle stop, or the last `LatLng` of the `current_route_segment`. Fleet
+     * Engine will then do its best to interpolate to an actual `VehicleStop`.
+     *
+     * This field is ignored in `UpdateDeliveryVehicle` calls if the
+     * `current_route_segment` field is empty.
+     * 
+ * + * .google.type.LatLng current_route_segment_end_point = 5; + */ + public Builder setCurrentRouteSegmentEndPoint(com.google.type.LatLng.Builder builderForValue) { + if (currentRouteSegmentEndPointBuilder_ == null) { + currentRouteSegmentEndPoint_ = builderForValue.build(); + } else { + currentRouteSegmentEndPointBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The location where the `current_route_segment` ends. This is not currently
+     * populated by the driver app, but you can supply it on
+     * `UpdateDeliveryVehicle` calls. It is either the `LatLng` from the upcoming
+     * vehicle stop, or the last `LatLng` of the `current_route_segment`. Fleet
+     * Engine will then do its best to interpolate to an actual `VehicleStop`.
+     *
+     * This field is ignored in `UpdateDeliveryVehicle` calls if the
+     * `current_route_segment` field is empty.
+     * 
+ * + * .google.type.LatLng current_route_segment_end_point = 5; + */ + public Builder mergeCurrentRouteSegmentEndPoint(com.google.type.LatLng value) { + if (currentRouteSegmentEndPointBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && currentRouteSegmentEndPoint_ != null + && currentRouteSegmentEndPoint_ != com.google.type.LatLng.getDefaultInstance()) { + getCurrentRouteSegmentEndPointBuilder().mergeFrom(value); + } else { + currentRouteSegmentEndPoint_ = value; + } + } else { + currentRouteSegmentEndPointBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The location where the `current_route_segment` ends. This is not currently
+     * populated by the driver app, but you can supply it on
+     * `UpdateDeliveryVehicle` calls. It is either the `LatLng` from the upcoming
+     * vehicle stop, or the last `LatLng` of the `current_route_segment`. Fleet
+     * Engine will then do its best to interpolate to an actual `VehicleStop`.
+     *
+     * This field is ignored in `UpdateDeliveryVehicle` calls if the
+     * `current_route_segment` field is empty.
+     * 
+ * + * .google.type.LatLng current_route_segment_end_point = 5; + */ + public Builder clearCurrentRouteSegmentEndPoint() { + bitField0_ = (bitField0_ & ~0x00000010); + currentRouteSegmentEndPoint_ = null; + if (currentRouteSegmentEndPointBuilder_ != null) { + currentRouteSegmentEndPointBuilder_.dispose(); + currentRouteSegmentEndPointBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The location where the `current_route_segment` ends. This is not currently
+     * populated by the driver app, but you can supply it on
+     * `UpdateDeliveryVehicle` calls. It is either the `LatLng` from the upcoming
+     * vehicle stop, or the last `LatLng` of the `current_route_segment`. Fleet
+     * Engine will then do its best to interpolate to an actual `VehicleStop`.
+     *
+     * This field is ignored in `UpdateDeliveryVehicle` calls if the
+     * `current_route_segment` field is empty.
+     * 
+ * + * .google.type.LatLng current_route_segment_end_point = 5; + */ + public com.google.type.LatLng.Builder getCurrentRouteSegmentEndPointBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getCurrentRouteSegmentEndPointFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The location where the `current_route_segment` ends. This is not currently
+     * populated by the driver app, but you can supply it on
+     * `UpdateDeliveryVehicle` calls. It is either the `LatLng` from the upcoming
+     * vehicle stop, or the last `LatLng` of the `current_route_segment`. Fleet
+     * Engine will then do its best to interpolate to an actual `VehicleStop`.
+     *
+     * This field is ignored in `UpdateDeliveryVehicle` calls if the
+     * `current_route_segment` field is empty.
+     * 
+ * + * .google.type.LatLng current_route_segment_end_point = 5; + */ + public com.google.type.LatLngOrBuilder getCurrentRouteSegmentEndPointOrBuilder() { + if (currentRouteSegmentEndPointBuilder_ != null) { + return currentRouteSegmentEndPointBuilder_.getMessageOrBuilder(); + } else { + return currentRouteSegmentEndPoint_ == null + ? com.google.type.LatLng.getDefaultInstance() + : currentRouteSegmentEndPoint_; + } + } + /** + * + * + *
+     * The location where the `current_route_segment` ends. This is not currently
+     * populated by the driver app, but you can supply it on
+     * `UpdateDeliveryVehicle` calls. It is either the `LatLng` from the upcoming
+     * vehicle stop, or the last `LatLng` of the `current_route_segment`. Fleet
+     * Engine will then do its best to interpolate to an actual `VehicleStop`.
+     *
+     * This field is ignored in `UpdateDeliveryVehicle` calls if the
+     * `current_route_segment` field is empty.
+     * 
+ * + * .google.type.LatLng current_route_segment_end_point = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + getCurrentRouteSegmentEndPointFieldBuilder() { + if (currentRouteSegmentEndPointBuilder_ == null) { + currentRouteSegmentEndPointBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, + com.google.type.LatLng.Builder, + com.google.type.LatLngOrBuilder>( + 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`.
+     * The Driver app typically provides this field, but there are some
+     * circumstances in which Fleet Engine will override the value sent by the
+     * app. For more information, see
+     * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+     * This field is returned in
+     * `Task.remaining_vehicle_journey_segments[0].driving_distance_meters` (gRPC)
+     * or `Task.remainingVehicleJourneySegments[0].drivingDistanceMeters` (REST)
+     * for all active `Task`s assigned to the Delivery Vehicle.
+     *
+     * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the
+     * `current_route_segment` field is empty.
+     * 
+ * + * .google.protobuf.Int32Value remaining_distance_meters = 6; + * + * @return Whether the remainingDistanceMeters field is set. + */ + public boolean hasRemainingDistanceMeters() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * The remaining driving distance for the `current_route_segment`.
+     * The Driver app typically provides this field, but there are some
+     * circumstances in which Fleet Engine will override the value sent by the
+     * app. For more information, see
+     * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+     * This field is returned in
+     * `Task.remaining_vehicle_journey_segments[0].driving_distance_meters` (gRPC)
+     * or `Task.remainingVehicleJourneySegments[0].drivingDistanceMeters` (REST)
+     * for all active `Task`s assigned to the Delivery Vehicle.
+     *
+     * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the
+     * `current_route_segment` field is empty.
+     * 
+ * + * .google.protobuf.Int32Value remaining_distance_meters = 6; + * + * @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`.
+     * The Driver app typically provides this field, but there are some
+     * circumstances in which Fleet Engine will override the value sent by the
+     * app. For more information, see
+     * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+     * This field is returned in
+     * `Task.remaining_vehicle_journey_segments[0].driving_distance_meters` (gRPC)
+     * or `Task.remainingVehicleJourneySegments[0].drivingDistanceMeters` (REST)
+     * for all active `Task`s assigned to the Delivery Vehicle.
+     *
+     * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the
+     * `current_route_segment` field is empty.
+     * 
+ * + * .google.protobuf.Int32Value remaining_distance_meters = 6; + */ + public Builder setRemainingDistanceMeters(com.google.protobuf.Int32Value value) { + if (remainingDistanceMetersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + remainingDistanceMeters_ = value; + } else { + remainingDistanceMetersBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The remaining driving distance for the `current_route_segment`.
+     * The Driver app typically provides this field, but there are some
+     * circumstances in which Fleet Engine will override the value sent by the
+     * app. For more information, see
+     * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+     * This field is returned in
+     * `Task.remaining_vehicle_journey_segments[0].driving_distance_meters` (gRPC)
+     * or `Task.remainingVehicleJourneySegments[0].drivingDistanceMeters` (REST)
+     * for all active `Task`s assigned to the Delivery Vehicle.
+     *
+     * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the
+     * `current_route_segment` field is empty.
+     * 
+ * + * .google.protobuf.Int32Value remaining_distance_meters = 6; + */ + public Builder setRemainingDistanceMeters( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (remainingDistanceMetersBuilder_ == null) { + remainingDistanceMeters_ = builderForValue.build(); + } else { + remainingDistanceMetersBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The remaining driving distance for the `current_route_segment`.
+     * The Driver app typically provides this field, but there are some
+     * circumstances in which Fleet Engine will override the value sent by the
+     * app. For more information, see
+     * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+     * This field is returned in
+     * `Task.remaining_vehicle_journey_segments[0].driving_distance_meters` (gRPC)
+     * or `Task.remainingVehicleJourneySegments[0].drivingDistanceMeters` (REST)
+     * for all active `Task`s assigned to the Delivery Vehicle.
+     *
+     * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the
+     * `current_route_segment` field is empty.
+     * 
+ * + * .google.protobuf.Int32Value remaining_distance_meters = 6; + */ + public Builder mergeRemainingDistanceMeters(com.google.protobuf.Int32Value value) { + if (remainingDistanceMetersBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && remainingDistanceMeters_ != null + && remainingDistanceMeters_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getRemainingDistanceMetersBuilder().mergeFrom(value); + } else { + remainingDistanceMeters_ = value; + } + } else { + remainingDistanceMetersBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The remaining driving distance for the `current_route_segment`.
+     * The Driver app typically provides this field, but there are some
+     * circumstances in which Fleet Engine will override the value sent by the
+     * app. For more information, see
+     * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+     * This field is returned in
+     * `Task.remaining_vehicle_journey_segments[0].driving_distance_meters` (gRPC)
+     * or `Task.remainingVehicleJourneySegments[0].drivingDistanceMeters` (REST)
+     * for all active `Task`s assigned to the Delivery Vehicle.
+     *
+     * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the
+     * `current_route_segment` field is empty.
+     * 
+ * + * .google.protobuf.Int32Value remaining_distance_meters = 6; + */ + public Builder clearRemainingDistanceMeters() { + bitField0_ = (bitField0_ & ~0x00000020); + remainingDistanceMeters_ = null; + if (remainingDistanceMetersBuilder_ != null) { + remainingDistanceMetersBuilder_.dispose(); + remainingDistanceMetersBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The remaining driving distance for the `current_route_segment`.
+     * The Driver app typically provides this field, but there are some
+     * circumstances in which Fleet Engine will override the value sent by the
+     * app. For more information, see
+     * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+     * This field is returned in
+     * `Task.remaining_vehicle_journey_segments[0].driving_distance_meters` (gRPC)
+     * or `Task.remainingVehicleJourneySegments[0].drivingDistanceMeters` (REST)
+     * for all active `Task`s assigned to the Delivery Vehicle.
+     *
+     * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the
+     * `current_route_segment` field is empty.
+     * 
+ * + * .google.protobuf.Int32Value remaining_distance_meters = 6; + */ + public com.google.protobuf.Int32Value.Builder getRemainingDistanceMetersBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getRemainingDistanceMetersFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The remaining driving distance for the `current_route_segment`.
+     * The Driver app typically provides this field, but there are some
+     * circumstances in which Fleet Engine will override the value sent by the
+     * app. For more information, see
+     * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+     * This field is returned in
+     * `Task.remaining_vehicle_journey_segments[0].driving_distance_meters` (gRPC)
+     * or `Task.remainingVehicleJourneySegments[0].drivingDistanceMeters` (REST)
+     * for all active `Task`s assigned to the Delivery Vehicle.
+     *
+     * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the
+     * `current_route_segment` field is empty.
+     * 
+ * + * .google.protobuf.Int32Value remaining_distance_meters = 6; + */ + 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`.
+     * The Driver app typically provides this field, but there are some
+     * circumstances in which Fleet Engine will override the value sent by the
+     * app. For more information, see
+     * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+     * This field is returned in
+     * `Task.remaining_vehicle_journey_segments[0].driving_distance_meters` (gRPC)
+     * or `Task.remainingVehicleJourneySegments[0].drivingDistanceMeters` (REST)
+     * for all active `Task`s assigned to the Delivery Vehicle.
+     *
+     * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the
+     * `current_route_segment` field is empty.
+     * 
+ * + * .google.protobuf.Int32Value remaining_distance_meters = 6; + */ + 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.Duration remainingDuration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + remainingDurationBuilder_; + /** + * + * + *
+     * The remaining driving time for the `current_route_segment`.
+     * The Driver app typically provides this field, but there are some
+     * circumstances in which Fleet Engine will override the value sent by the
+     * app.  For more information, see
+     * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+     * This field is returned in
+     * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or
+     * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST) for all
+     * active tasks assigned to the Delivery Vehicle.
+     *
+     * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the
+     * `current_route_segment` field is empty.
+     * 
+ * + * .google.protobuf.Duration remaining_duration = 7; + * + * @return Whether the remainingDuration field is set. + */ + public boolean hasRemainingDuration() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * The remaining driving time for the `current_route_segment`.
+     * The Driver app typically provides this field, but there are some
+     * circumstances in which Fleet Engine will override the value sent by the
+     * app.  For more information, see
+     * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+     * This field is returned in
+     * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or
+     * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST) for all
+     * active tasks assigned to the Delivery Vehicle.
+     *
+     * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the
+     * `current_route_segment` field is empty.
+     * 
+ * + * .google.protobuf.Duration remaining_duration = 7; + * + * @return The remainingDuration. + */ + public com.google.protobuf.Duration getRemainingDuration() { + if (remainingDurationBuilder_ == null) { + return remainingDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : remainingDuration_; + } else { + return remainingDurationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The remaining driving time for the `current_route_segment`.
+     * The Driver app typically provides this field, but there are some
+     * circumstances in which Fleet Engine will override the value sent by the
+     * app.  For more information, see
+     * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+     * This field is returned in
+     * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or
+     * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST) for all
+     * active tasks assigned to the Delivery Vehicle.
+     *
+     * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the
+     * `current_route_segment` field is empty.
+     * 
+ * + * .google.protobuf.Duration remaining_duration = 7; + */ + public Builder setRemainingDuration(com.google.protobuf.Duration value) { + if (remainingDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + remainingDuration_ = value; + } else { + remainingDurationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * The remaining driving time for the `current_route_segment`.
+     * The Driver app typically provides this field, but there are some
+     * circumstances in which Fleet Engine will override the value sent by the
+     * app.  For more information, see
+     * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+     * This field is returned in
+     * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or
+     * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST) for all
+     * active tasks assigned to the Delivery Vehicle.
+     *
+     * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the
+     * `current_route_segment` field is empty.
+     * 
+ * + * .google.protobuf.Duration remaining_duration = 7; + */ + public Builder setRemainingDuration(com.google.protobuf.Duration.Builder builderForValue) { + if (remainingDurationBuilder_ == null) { + remainingDuration_ = builderForValue.build(); + } else { + remainingDurationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * The remaining driving time for the `current_route_segment`.
+     * The Driver app typically provides this field, but there are some
+     * circumstances in which Fleet Engine will override the value sent by the
+     * app.  For more information, see
+     * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+     * This field is returned in
+     * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or
+     * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST) for all
+     * active tasks assigned to the Delivery Vehicle.
+     *
+     * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the
+     * `current_route_segment` field is empty.
+     * 
+ * + * .google.protobuf.Duration remaining_duration = 7; + */ + public Builder mergeRemainingDuration(com.google.protobuf.Duration value) { + if (remainingDurationBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && remainingDuration_ != null + && remainingDuration_ != com.google.protobuf.Duration.getDefaultInstance()) { + getRemainingDurationBuilder().mergeFrom(value); + } else { + remainingDuration_ = value; + } + } else { + remainingDurationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * The remaining driving time for the `current_route_segment`.
+     * The Driver app typically provides this field, but there are some
+     * circumstances in which Fleet Engine will override the value sent by the
+     * app.  For more information, see
+     * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+     * This field is returned in
+     * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or
+     * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST) for all
+     * active tasks assigned to the Delivery Vehicle.
+     *
+     * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the
+     * `current_route_segment` field is empty.
+     * 
+ * + * .google.protobuf.Duration remaining_duration = 7; + */ + public Builder clearRemainingDuration() { + bitField0_ = (bitField0_ & ~0x00000040); + remainingDuration_ = null; + if (remainingDurationBuilder_ != null) { + remainingDurationBuilder_.dispose(); + remainingDurationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The remaining driving time for the `current_route_segment`.
+     * The Driver app typically provides this field, but there are some
+     * circumstances in which Fleet Engine will override the value sent by the
+     * app.  For more information, see
+     * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+     * This field is returned in
+     * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or
+     * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST) for all
+     * active tasks assigned to the Delivery Vehicle.
+     *
+     * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the
+     * `current_route_segment` field is empty.
+     * 
+ * + * .google.protobuf.Duration remaining_duration = 7; + */ + public com.google.protobuf.Duration.Builder getRemainingDurationBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getRemainingDurationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The remaining driving time for the `current_route_segment`.
+     * The Driver app typically provides this field, but there are some
+     * circumstances in which Fleet Engine will override the value sent by the
+     * app.  For more information, see
+     * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+     * This field is returned in
+     * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or
+     * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST) for all
+     * active tasks assigned to the Delivery Vehicle.
+     *
+     * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the
+     * `current_route_segment` field is empty.
+     * 
+ * + * .google.protobuf.Duration remaining_duration = 7; + */ + public com.google.protobuf.DurationOrBuilder getRemainingDurationOrBuilder() { + if (remainingDurationBuilder_ != null) { + return remainingDurationBuilder_.getMessageOrBuilder(); + } else { + return remainingDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : remainingDuration_; + } + } + /** + * + * + *
+     * The remaining driving time for the `current_route_segment`.
+     * The Driver app typically provides this field, but there are some
+     * circumstances in which Fleet Engine will override the value sent by the
+     * app.  For more information, see
+     * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+     * This field is returned in
+     * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or
+     * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST) for all
+     * active tasks assigned to the Delivery Vehicle.
+     *
+     * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the
+     * `current_route_segment` field is empty.
+     * 
+ * + * .google.protobuf.Duration remaining_duration = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getRemainingDurationFieldBuilder() { + if (remainingDurationBuilder_ == null) { + remainingDurationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getRemainingDuration(), getParentForChildren(), isClean()); + remainingDuration_ = null; + } + return remainingDurationBuilder_; + } + + private java.util.List + remainingVehicleJourneySegments_ = java.util.Collections.emptyList(); + + private void ensureRemainingVehicleJourneySegmentsIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + remainingVehicleJourneySegments_ = + new java.util.ArrayList( + remainingVehicleJourneySegments_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + google.maps.fleetengine.delivery.v1.VehicleJourneySegment, + google.maps.fleetengine.delivery.v1.VehicleJourneySegment.Builder, + google.maps.fleetengine.delivery.v1.VehicleJourneySegmentOrBuilder> + remainingVehicleJourneySegmentsBuilder_; + + /** + * + * + *
+     * The journey segments assigned to this Delivery Vehicle, starting from the
+     * Vehicle's most recently reported location. This field won't be populated
+     * in the response of `ListDeliveryVehicles`.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 8; + * + */ + public java.util.List + getRemainingVehicleJourneySegmentsList() { + if (remainingVehicleJourneySegmentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(remainingVehicleJourneySegments_); + } else { + return remainingVehicleJourneySegmentsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The journey segments assigned to this Delivery Vehicle, starting from the
+     * Vehicle's most recently reported location. This field won't be populated
+     * in the response of `ListDeliveryVehicles`.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 8; + * + */ + public int getRemainingVehicleJourneySegmentsCount() { + if (remainingVehicleJourneySegmentsBuilder_ == null) { + return remainingVehicleJourneySegments_.size(); + } else { + return remainingVehicleJourneySegmentsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The journey segments assigned to this Delivery Vehicle, starting from the
+     * Vehicle's most recently reported location. This field won't be populated
+     * in the response of `ListDeliveryVehicles`.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 8; + * + */ + public google.maps.fleetengine.delivery.v1.VehicleJourneySegment + getRemainingVehicleJourneySegments(int index) { + if (remainingVehicleJourneySegmentsBuilder_ == null) { + return remainingVehicleJourneySegments_.get(index); + } else { + return remainingVehicleJourneySegmentsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The journey segments assigned to this Delivery Vehicle, starting from the
+     * Vehicle's most recently reported location. This field won't be populated
+     * in the response of `ListDeliveryVehicles`.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 8; + * + */ + public Builder setRemainingVehicleJourneySegments( + int index, google.maps.fleetengine.delivery.v1.VehicleJourneySegment value) { + if (remainingVehicleJourneySegmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRemainingVehicleJourneySegmentsIsMutable(); + remainingVehicleJourneySegments_.set(index, value); + onChanged(); + } else { + remainingVehicleJourneySegmentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The journey segments assigned to this Delivery Vehicle, starting from the
+     * Vehicle's most recently reported location. This field won't be populated
+     * in the response of `ListDeliveryVehicles`.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 8; + * + */ + public Builder setRemainingVehicleJourneySegments( + int index, + google.maps.fleetengine.delivery.v1.VehicleJourneySegment.Builder builderForValue) { + if (remainingVehicleJourneySegmentsBuilder_ == null) { + ensureRemainingVehicleJourneySegmentsIsMutable(); + remainingVehicleJourneySegments_.set(index, builderForValue.build()); + onChanged(); + } else { + remainingVehicleJourneySegmentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The journey segments assigned to this Delivery Vehicle, starting from the
+     * Vehicle's most recently reported location. This field won't be populated
+     * in the response of `ListDeliveryVehicles`.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 8; + * + */ + public Builder addRemainingVehicleJourneySegments( + google.maps.fleetengine.delivery.v1.VehicleJourneySegment value) { + if (remainingVehicleJourneySegmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRemainingVehicleJourneySegmentsIsMutable(); + remainingVehicleJourneySegments_.add(value); + onChanged(); + } else { + remainingVehicleJourneySegmentsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The journey segments assigned to this Delivery Vehicle, starting from the
+     * Vehicle's most recently reported location. This field won't be populated
+     * in the response of `ListDeliveryVehicles`.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 8; + * + */ + public Builder addRemainingVehicleJourneySegments( + int index, google.maps.fleetengine.delivery.v1.VehicleJourneySegment value) { + if (remainingVehicleJourneySegmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRemainingVehicleJourneySegmentsIsMutable(); + remainingVehicleJourneySegments_.add(index, value); + onChanged(); + } else { + remainingVehicleJourneySegmentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The journey segments assigned to this Delivery Vehicle, starting from the
+     * Vehicle's most recently reported location. This field won't be populated
+     * in the response of `ListDeliveryVehicles`.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 8; + * + */ + public Builder addRemainingVehicleJourneySegments( + google.maps.fleetengine.delivery.v1.VehicleJourneySegment.Builder builderForValue) { + if (remainingVehicleJourneySegmentsBuilder_ == null) { + ensureRemainingVehicleJourneySegmentsIsMutable(); + remainingVehicleJourneySegments_.add(builderForValue.build()); + onChanged(); + } else { + remainingVehicleJourneySegmentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The journey segments assigned to this Delivery Vehicle, starting from the
+     * Vehicle's most recently reported location. This field won't be populated
+     * in the response of `ListDeliveryVehicles`.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 8; + * + */ + public Builder addRemainingVehicleJourneySegments( + int index, + google.maps.fleetengine.delivery.v1.VehicleJourneySegment.Builder builderForValue) { + if (remainingVehicleJourneySegmentsBuilder_ == null) { + ensureRemainingVehicleJourneySegmentsIsMutable(); + remainingVehicleJourneySegments_.add(index, builderForValue.build()); + onChanged(); + } else { + remainingVehicleJourneySegmentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The journey segments assigned to this Delivery Vehicle, starting from the
+     * Vehicle's most recently reported location. This field won't be populated
+     * in the response of `ListDeliveryVehicles`.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 8; + * + */ + public Builder addAllRemainingVehicleJourneySegments( + java.lang.Iterable + values) { + if (remainingVehicleJourneySegmentsBuilder_ == null) { + ensureRemainingVehicleJourneySegmentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, remainingVehicleJourneySegments_); + onChanged(); + } else { + remainingVehicleJourneySegmentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The journey segments assigned to this Delivery Vehicle, starting from the
+     * Vehicle's most recently reported location. This field won't be populated
+     * in the response of `ListDeliveryVehicles`.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 8; + * + */ + public Builder clearRemainingVehicleJourneySegments() { + if (remainingVehicleJourneySegmentsBuilder_ == null) { + remainingVehicleJourneySegments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + remainingVehicleJourneySegmentsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The journey segments assigned to this Delivery Vehicle, starting from the
+     * Vehicle's most recently reported location. This field won't be populated
+     * in the response of `ListDeliveryVehicles`.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 8; + * + */ + public Builder removeRemainingVehicleJourneySegments(int index) { + if (remainingVehicleJourneySegmentsBuilder_ == null) { + ensureRemainingVehicleJourneySegmentsIsMutable(); + remainingVehicleJourneySegments_.remove(index); + onChanged(); + } else { + remainingVehicleJourneySegmentsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The journey segments assigned to this Delivery Vehicle, starting from the
+     * Vehicle's most recently reported location. This field won't be populated
+     * in the response of `ListDeliveryVehicles`.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 8; + * + */ + public google.maps.fleetengine.delivery.v1.VehicleJourneySegment.Builder + getRemainingVehicleJourneySegmentsBuilder(int index) { + return getRemainingVehicleJourneySegmentsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The journey segments assigned to this Delivery Vehicle, starting from the
+     * Vehicle's most recently reported location. This field won't be populated
+     * in the response of `ListDeliveryVehicles`.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 8; + * + */ + public google.maps.fleetengine.delivery.v1.VehicleJourneySegmentOrBuilder + getRemainingVehicleJourneySegmentsOrBuilder(int index) { + if (remainingVehicleJourneySegmentsBuilder_ == null) { + return remainingVehicleJourneySegments_.get(index); + } else { + return remainingVehicleJourneySegmentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The journey segments assigned to this Delivery Vehicle, starting from the
+     * Vehicle's most recently reported location. This field won't be populated
+     * in the response of `ListDeliveryVehicles`.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 8; + * + */ + public java.util.List< + ? extends google.maps.fleetengine.delivery.v1.VehicleJourneySegmentOrBuilder> + getRemainingVehicleJourneySegmentsOrBuilderList() { + if (remainingVehicleJourneySegmentsBuilder_ != null) { + return remainingVehicleJourneySegmentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(remainingVehicleJourneySegments_); + } + } + /** + * + * + *
+     * The journey segments assigned to this Delivery Vehicle, starting from the
+     * Vehicle's most recently reported location. This field won't be populated
+     * in the response of `ListDeliveryVehicles`.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 8; + * + */ + public google.maps.fleetengine.delivery.v1.VehicleJourneySegment.Builder + addRemainingVehicleJourneySegmentsBuilder() { + return getRemainingVehicleJourneySegmentsFieldBuilder() + .addBuilder( + google.maps.fleetengine.delivery.v1.VehicleJourneySegment.getDefaultInstance()); + } + /** + * + * + *
+     * The journey segments assigned to this Delivery Vehicle, starting from the
+     * Vehicle's most recently reported location. This field won't be populated
+     * in the response of `ListDeliveryVehicles`.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 8; + * + */ + public google.maps.fleetengine.delivery.v1.VehicleJourneySegment.Builder + addRemainingVehicleJourneySegmentsBuilder(int index) { + return getRemainingVehicleJourneySegmentsFieldBuilder() + .addBuilder( + index, + google.maps.fleetengine.delivery.v1.VehicleJourneySegment.getDefaultInstance()); + } + /** + * + * + *
+     * The journey segments assigned to this Delivery Vehicle, starting from the
+     * Vehicle's most recently reported location. This field won't be populated
+     * in the response of `ListDeliveryVehicles`.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 8; + * + */ + public java.util.List + getRemainingVehicleJourneySegmentsBuilderList() { + return getRemainingVehicleJourneySegmentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + google.maps.fleetengine.delivery.v1.VehicleJourneySegment, + google.maps.fleetengine.delivery.v1.VehicleJourneySegment.Builder, + google.maps.fleetengine.delivery.v1.VehicleJourneySegmentOrBuilder> + getRemainingVehicleJourneySegmentsFieldBuilder() { + if (remainingVehicleJourneySegmentsBuilder_ == null) { + remainingVehicleJourneySegmentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + google.maps.fleetengine.delivery.v1.VehicleJourneySegment, + google.maps.fleetengine.delivery.v1.VehicleJourneySegment.Builder, + google.maps.fleetengine.delivery.v1.VehicleJourneySegmentOrBuilder>( + remainingVehicleJourneySegments_, + ((bitField0_ & 0x00000080) != 0), + getParentForChildren(), + isClean()); + remainingVehicleJourneySegments_ = null; + } + return remainingVehicleJourneySegmentsBuilder_; + } + + private java.util.List + attributes_ = java.util.Collections.emptyList(); + + private void ensureAttributesIsMutable() { + if (!((bitField0_ & 0x00000100) != 0)) { + attributes_ = + new java.util.ArrayList( + attributes_); + bitField0_ |= 0x00000100; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute, + google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute.Builder, + google.maps.fleetengine.delivery.v1.DeliveryVehicleAttributeOrBuilder> + attributesBuilder_; + + /** + * + * + *
+     * A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have
+     * at most 100 attributes, and each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicleAttribute attributes = 9; + */ + public java.util.List + getAttributesList() { + if (attributesBuilder_ == null) { + return java.util.Collections.unmodifiableList(attributes_); + } else { + return attributesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have
+     * at most 100 attributes, and each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicleAttribute attributes = 9; + */ + public int getAttributesCount() { + if (attributesBuilder_ == null) { + return attributes_.size(); + } else { + return attributesBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have
+     * at most 100 attributes, and each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicleAttribute attributes = 9; + */ + public google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute getAttributes(int index) { + if (attributesBuilder_ == null) { + return attributes_.get(index); + } else { + return attributesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have
+     * at most 100 attributes, and each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicleAttribute attributes = 9; + */ + public Builder setAttributes( + int index, google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute 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 custom Delivery Vehicle attributes. A Delivery Vehicle can have
+     * at most 100 attributes, and each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicleAttribute attributes = 9; + */ + public Builder setAttributes( + int index, + google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute.Builder builderForValue) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.set(index, builderForValue.build()); + onChanged(); + } else { + attributesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have
+     * at most 100 attributes, and each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicleAttribute attributes = 9; + */ + public Builder addAttributes( + google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute value) { + if (attributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributesIsMutable(); + attributes_.add(value); + onChanged(); + } else { + attributesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have
+     * at most 100 attributes, and each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicleAttribute attributes = 9; + */ + public Builder addAttributes( + int index, google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute 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 custom Delivery Vehicle attributes. A Delivery Vehicle can have
+     * at most 100 attributes, and each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicleAttribute attributes = 9; + */ + public Builder addAttributes( + google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute.Builder builderForValue) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.add(builderForValue.build()); + onChanged(); + } else { + attributesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have
+     * at most 100 attributes, and each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicleAttribute attributes = 9; + */ + public Builder addAttributes( + int index, + google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute.Builder builderForValue) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.add(index, builderForValue.build()); + onChanged(); + } else { + attributesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have
+     * at most 100 attributes, and each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicleAttribute attributes = 9; + */ + 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 custom Delivery Vehicle attributes. A Delivery Vehicle can have
+     * at most 100 attributes, and each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicleAttribute attributes = 9; + */ + public Builder clearAttributes() { + if (attributesBuilder_ == null) { + attributes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + } else { + attributesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have
+     * at most 100 attributes, and each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicleAttribute attributes = 9; + */ + public Builder removeAttributes(int index) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.remove(index); + onChanged(); + } else { + attributesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have
+     * at most 100 attributes, and each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicleAttribute attributes = 9; + */ + public google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute.Builder + getAttributesBuilder(int index) { + return getAttributesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have
+     * at most 100 attributes, and each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicleAttribute attributes = 9; + */ + public google.maps.fleetengine.delivery.v1.DeliveryVehicleAttributeOrBuilder + getAttributesOrBuilder(int index) { + if (attributesBuilder_ == null) { + return attributes_.get(index); + } else { + return attributesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have
+     * at most 100 attributes, and each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicleAttribute attributes = 9; + */ + public java.util.List< + ? extends google.maps.fleetengine.delivery.v1.DeliveryVehicleAttributeOrBuilder> + getAttributesOrBuilderList() { + if (attributesBuilder_ != null) { + return attributesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(attributes_); + } + } + /** + * + * + *
+     * A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have
+     * at most 100 attributes, and each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicleAttribute attributes = 9; + */ + public google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute.Builder + addAttributesBuilder() { + return getAttributesFieldBuilder() + .addBuilder( + google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute.getDefaultInstance()); + } + /** + * + * + *
+     * A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have
+     * at most 100 attributes, and each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicleAttribute attributes = 9; + */ + public google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute.Builder + addAttributesBuilder(int index) { + return getAttributesFieldBuilder() + .addBuilder( + index, + google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute.getDefaultInstance()); + } + /** + * + * + *
+     * A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have
+     * at most 100 attributes, and each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicleAttribute attributes = 9; + */ + public java.util.List + getAttributesBuilderList() { + return getAttributesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute, + google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute.Builder, + google.maps.fleetengine.delivery.v1.DeliveryVehicleAttributeOrBuilder> + getAttributesFieldBuilder() { + if (attributesBuilder_ == null) { + attributesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute, + google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute.Builder, + google.maps.fleetengine.delivery.v1.DeliveryVehicleAttributeOrBuilder>( + attributes_, ((bitField0_ & 0x00000100) != 0), getParentForChildren(), isClean()); + attributes_ = null; + } + return attributesBuilder_; + } + + private int type_ = 0; + /** + * + * + *
+     * The type of this delivery vehicle. If unset, this will default to `AUTO`.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType type = 10; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * The type of this delivery vehicle. If unset, this will default to `AUTO`.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType type = 10; + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of this delivery vehicle. If unset, this will default to `AUTO`.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType type = 10; + * + * @return The type. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType getType() { + google.maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType result = + google.maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType.forNumber(type_); + return result == null + ? google.maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The type of this delivery vehicle. If unset, this will default to `AUTO`.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType type = 10; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + google.maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of this delivery vehicle. If unset, this will default to `AUTO`.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType type = 10; + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000200); + type_ = 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.delivery.v1.DeliveryVehicle) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.delivery.v1.DeliveryVehicle) + private static final google.maps.fleetengine.delivery.v1.DeliveryVehicle DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new google.maps.fleetengine.delivery.v1.DeliveryVehicle(); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryVehicle getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeliveryVehicle 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 google.maps.fleetengine.delivery.v1.DeliveryVehicle getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryVehicleAttribute.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryVehicleAttribute.java new file mode 100644 index 000000000000..96d71676f678 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryVehicleAttribute.java @@ -0,0 +1,1457 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/common.proto + +package google.maps.fleetengine.delivery.v1; + +/** + * + * + *
+ * Describes a vehicle attribute as a key-value pair. The "key:value" string
+ * length cannot exceed 256 characters.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.DeliveryVehicleAttribute} + */ +public final class DeliveryVehicleAttribute extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.delivery.v1.DeliveryVehicleAttribute) + DeliveryVehicleAttributeOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeliveryVehicleAttribute.newBuilder() to construct. + private DeliveryVehicleAttribute(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeliveryVehicleAttribute() { + key_ = ""; + value_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeliveryVehicleAttribute(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.Common + .internal_static_maps_fleetengine_delivery_v1_DeliveryVehicleAttribute_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.Common + .internal_static_maps_fleetengine_delivery_v1_DeliveryVehicleAttribute_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute.class, + google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute.Builder.class); + } + + private int deliveryVehicleAttributeValueCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object deliveryVehicleAttributeValue_; + + public enum DeliveryVehicleAttributeValueCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + STRING_VALUE(3), + BOOL_VALUE(4), + NUMBER_VALUE(5), + DELIVERYVEHICLEATTRIBUTEVALUE_NOT_SET(0); + private final int value; + + private DeliveryVehicleAttributeValueCase(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 DeliveryVehicleAttributeValueCase valueOf(int value) { + return forNumber(value); + } + + public static DeliveryVehicleAttributeValueCase forNumber(int value) { + switch (value) { + case 3: + return STRING_VALUE; + case 4: + return BOOL_VALUE; + case 5: + return NUMBER_VALUE; + case 0: + return DELIVERYVEHICLEATTRIBUTEVALUE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DeliveryVehicleAttributeValueCase getDeliveryVehicleAttributeValueCase() { + return DeliveryVehicleAttributeValueCase.forNumber(deliveryVehicleAttributeValueCase_); + } + + public static final int KEY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object key_ = ""; + /** + * + * + *
+   * The attribute's key.
+   * 
+ * + * 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.
+   * 
+ * + * 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 deliveryVehicleAttributeValueCase_ == 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 (deliveryVehicleAttributeValueCase_ == 3) { + ref = deliveryVehicleAttributeValue_; + } + 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 (deliveryVehicleAttributeValueCase_ == 3) { + deliveryVehicleAttributeValue_ = 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 (deliveryVehicleAttributeValueCase_ == 3) { + ref = deliveryVehicleAttributeValue_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (deliveryVehicleAttributeValueCase_ == 3) { + deliveryVehicleAttributeValue_ = 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 deliveryVehicleAttributeValueCase_ == 4; + } + /** + * + * + *
+   * Boolean typed attribute value.
+   * 
+ * + * bool bool_value = 4; + * + * @return The boolValue. + */ + @java.lang.Override + public boolean getBoolValue() { + if (deliveryVehicleAttributeValueCase_ == 4) { + return (java.lang.Boolean) deliveryVehicleAttributeValue_; + } + 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 deliveryVehicleAttributeValueCase_ == 5; + } + /** + * + * + *
+   * Double typed attribute value.
+   * 
+ * + * double number_value = 5; + * + * @return The numberValue. + */ + @java.lang.Override + public double getNumberValue() { + if (deliveryVehicleAttributeValueCase_ == 5) { + return (java.lang.Double) deliveryVehicleAttributeValue_; + } + 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 (deliveryVehicleAttributeValueCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, deliveryVehicleAttributeValue_); + } + if (deliveryVehicleAttributeValueCase_ == 4) { + output.writeBool(4, (boolean) ((java.lang.Boolean) deliveryVehicleAttributeValue_)); + } + if (deliveryVehicleAttributeValueCase_ == 5) { + output.writeDouble(5, (double) ((java.lang.Double) deliveryVehicleAttributeValue_)); + } + 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 (deliveryVehicleAttributeValueCase_ == 3) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize( + 3, deliveryVehicleAttributeValue_); + } + if (deliveryVehicleAttributeValueCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 4, (boolean) ((java.lang.Boolean) deliveryVehicleAttributeValue_)); + } + if (deliveryVehicleAttributeValueCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize( + 5, (double) ((java.lang.Double) deliveryVehicleAttributeValue_)); + } + 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 google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute)) { + return super.equals(obj); + } + google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute other = + (google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute) obj; + + if (!getKey().equals(other.getKey())) return false; + if (!getValue().equals(other.getValue())) return false; + if (!getDeliveryVehicleAttributeValueCase() + .equals(other.getDeliveryVehicleAttributeValueCase())) return false; + switch (deliveryVehicleAttributeValueCase_) { + 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 (deliveryVehicleAttributeValueCase_) { + 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 google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute 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 google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute 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 google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute 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( + google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute 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.delivery.v1.DeliveryVehicleAttribute} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.delivery.v1.DeliveryVehicleAttribute) + google.maps.fleetengine.delivery.v1.DeliveryVehicleAttributeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.Common + .internal_static_maps_fleetengine_delivery_v1_DeliveryVehicleAttribute_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.Common + .internal_static_maps_fleetengine_delivery_v1_DeliveryVehicleAttribute_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute.class, + google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute.Builder.class); + } + + // Construct using google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute.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_ = ""; + deliveryVehicleAttributeValueCase_ = 0; + deliveryVehicleAttributeValue_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return google.maps.fleetengine.delivery.v1.Common + .internal_static_maps_fleetengine_delivery_v1_DeliveryVehicleAttribute_descriptor; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute + getDefaultInstanceForType() { + return google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute.getDefaultInstance(); + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute build() { + google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute buildPartial() { + google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute result = + new google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.key_ = key_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.value_ = value_; + } + } + + private void buildPartialOneofs( + google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute result) { + result.deliveryVehicleAttributeValueCase_ = deliveryVehicleAttributeValueCase_; + result.deliveryVehicleAttributeValue_ = this.deliveryVehicleAttributeValue_; + } + + @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 google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute) { + return mergeFrom((google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute other) { + if (other + == google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute.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.getDeliveryVehicleAttributeValueCase()) { + case STRING_VALUE: + { + deliveryVehicleAttributeValueCase_ = 3; + deliveryVehicleAttributeValue_ = other.deliveryVehicleAttributeValue_; + onChanged(); + break; + } + case BOOL_VALUE: + { + setBoolValue(other.getBoolValue()); + break; + } + case NUMBER_VALUE: + { + setNumberValue(other.getNumberValue()); + break; + } + case DELIVERYVEHICLEATTRIBUTEVALUE_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(); + deliveryVehicleAttributeValueCase_ = 3; + deliveryVehicleAttributeValue_ = s; + break; + } // case 26 + case 32: + { + deliveryVehicleAttributeValue_ = input.readBool(); + deliveryVehicleAttributeValueCase_ = 4; + break; + } // case 32 + case 41: + { + deliveryVehicleAttributeValue_ = input.readDouble(); + deliveryVehicleAttributeValueCase_ = 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 deliveryVehicleAttributeValueCase_ = 0; + private java.lang.Object deliveryVehicleAttributeValue_; + + public DeliveryVehicleAttributeValueCase getDeliveryVehicleAttributeValueCase() { + return DeliveryVehicleAttributeValueCase.forNumber(deliveryVehicleAttributeValueCase_); + } + + public Builder clearDeliveryVehicleAttributeValue() { + deliveryVehicleAttributeValueCase_ = 0; + deliveryVehicleAttributeValue_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object key_ = ""; + /** + * + * + *
+     * The attribute's key.
+     * 
+ * + * 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.
+     * 
+ * + * 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.
+     * 
+ * + * 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.
+     * 
+ * + * string key = 1; + * + * @return This builder for chaining. + */ + public Builder clearKey() { + key_ = getDefaultInstance().getKey(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The attribute's key.
+     * 
+ * + * 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 deliveryVehicleAttributeValueCase_ == 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 (deliveryVehicleAttributeValueCase_ == 3) { + ref = deliveryVehicleAttributeValue_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (deliveryVehicleAttributeValueCase_ == 3) { + deliveryVehicleAttributeValue_ = 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 (deliveryVehicleAttributeValueCase_ == 3) { + ref = deliveryVehicleAttributeValue_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (deliveryVehicleAttributeValueCase_ == 3) { + deliveryVehicleAttributeValue_ = 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(); + } + deliveryVehicleAttributeValueCase_ = 3; + deliveryVehicleAttributeValue_ = 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 (deliveryVehicleAttributeValueCase_ == 3) { + deliveryVehicleAttributeValueCase_ = 0; + deliveryVehicleAttributeValue_ = 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); + deliveryVehicleAttributeValueCase_ = 3; + deliveryVehicleAttributeValue_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Boolean typed attribute value.
+     * 
+ * + * bool bool_value = 4; + * + * @return Whether the boolValue field is set. + */ + public boolean hasBoolValue() { + return deliveryVehicleAttributeValueCase_ == 4; + } + /** + * + * + *
+     * Boolean typed attribute value.
+     * 
+ * + * bool bool_value = 4; + * + * @return The boolValue. + */ + public boolean getBoolValue() { + if (deliveryVehicleAttributeValueCase_ == 4) { + return (java.lang.Boolean) deliveryVehicleAttributeValue_; + } + 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) { + + deliveryVehicleAttributeValueCase_ = 4; + deliveryVehicleAttributeValue_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Boolean typed attribute value.
+     * 
+ * + * bool bool_value = 4; + * + * @return This builder for chaining. + */ + public Builder clearBoolValue() { + if (deliveryVehicleAttributeValueCase_ == 4) { + deliveryVehicleAttributeValueCase_ = 0; + deliveryVehicleAttributeValue_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Double typed attribute value.
+     * 
+ * + * double number_value = 5; + * + * @return Whether the numberValue field is set. + */ + public boolean hasNumberValue() { + return deliveryVehicleAttributeValueCase_ == 5; + } + /** + * + * + *
+     * Double typed attribute value.
+     * 
+ * + * double number_value = 5; + * + * @return The numberValue. + */ + public double getNumberValue() { + if (deliveryVehicleAttributeValueCase_ == 5) { + return (java.lang.Double) deliveryVehicleAttributeValue_; + } + 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) { + + deliveryVehicleAttributeValueCase_ = 5; + deliveryVehicleAttributeValue_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Double typed attribute value.
+     * 
+ * + * double number_value = 5; + * + * @return This builder for chaining. + */ + public Builder clearNumberValue() { + if (deliveryVehicleAttributeValueCase_ == 5) { + deliveryVehicleAttributeValueCase_ = 0; + deliveryVehicleAttributeValue_ = 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.delivery.v1.DeliveryVehicleAttribute) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.delivery.v1.DeliveryVehicleAttribute) + private static final google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute(); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeliveryVehicleAttribute 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 google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryVehicleAttributeOrBuilder.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryVehicleAttributeOrBuilder.java new file mode 100644 index 000000000000..ed39d2409d58 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryVehicleAttributeOrBuilder.java @@ -0,0 +1,183 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/common.proto + +package google.maps.fleetengine.delivery.v1; + +public interface DeliveryVehicleAttributeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.delivery.v1.DeliveryVehicleAttribute) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The attribute's key.
+   * 
+ * + * string key = 1; + * + * @return The key. + */ + java.lang.String getKey(); + /** + * + * + *
+   * The attribute's key.
+   * 
+ * + * 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(); + + google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute.DeliveryVehicleAttributeValueCase + getDeliveryVehicleAttributeValueCase(); +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryVehicleLocation.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryVehicleLocation.java new file mode 100644 index 000000000000..4f12704987f7 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryVehicleLocation.java @@ -0,0 +1,7700 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/common.proto + +package google.maps.fleetengine.delivery.v1; + +/** + * + * + *
+ * The location, speed, and heading of a vehicle at a point in time.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.DeliveryVehicleLocation} + */ +public final class DeliveryVehicleLocation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.delivery.v1.DeliveryVehicleLocation) + DeliveryVehicleLocationOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeliveryVehicleLocation.newBuilder() to construct. + private DeliveryVehicleLocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeliveryVehicleLocation() { + locationSensor_ = 0; + rawLocationSensor_ = 0; + supplementalLocationSensor_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeliveryVehicleLocation(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.Common + .internal_static_maps_fleetengine_delivery_v1_DeliveryVehicleLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.Common + .internal_static_maps_fleetengine_delivery_v1_DeliveryVehicleLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation.class, + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation.Builder.class); + } + + 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 location_ != null; + } + /** + * + * + *
+   * 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.delivery.v1.DeliveryVehicleLocation.horizontal_accuracy is + * deprecated. See google/maps/fleetengine/delivery/v1/common.proto;l=68 + * @return Whether the horizontalAccuracy field is set. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean hasHorizontalAccuracy() { + return horizontalAccuracy_ != null; + } + /** + * + * + *
+   * Deprecated: Use `latlng_accuracy` instead.
+   * 
+ * + * .google.protobuf.DoubleValue horizontal_accuracy = 8 [deprecated = true]; + * + * @deprecated maps.fleetengine.delivery.v1.DeliveryVehicleLocation.horizontal_accuracy is + * deprecated. See google/maps/fleetengine/delivery/v1/common.proto;l=68 + * @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 latlngAccuracy_ != null; + } + /** + * + * + *
+   * 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 heading_ != null; + } + /** + * + * + *
+   * 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.delivery.v1.DeliveryVehicleLocation.bearing_accuracy is + * deprecated. See google/maps/fleetengine/delivery/v1/common.proto;l=78 + * @return Whether the bearingAccuracy field is set. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean hasBearingAccuracy() { + return bearingAccuracy_ != null; + } + /** + * + * + *
+   * Deprecated: Use `heading_accuracy` instead.
+   * 
+ * + * .google.protobuf.DoubleValue bearing_accuracy = 10 [deprecated = true]; + * + * @deprecated maps.fleetengine.delivery.v1.DeliveryVehicleLocation.bearing_accuracy is + * deprecated. See google/maps/fleetengine/delivery/v1/common.proto;l=78 + * @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 headingAccuracy_ != null; + } + /** + * + * + *
+   * 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 altitude_ != null; + } + /** + * + * + *
+   * 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.delivery.v1.DeliveryVehicleLocation.vertical_accuracy is + * deprecated. See google/maps/fleetengine/delivery/v1/common.proto;l=87 + * @return Whether the verticalAccuracy field is set. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean hasVerticalAccuracy() { + return verticalAccuracy_ != null; + } + /** + * + * + *
+   * Deprecated: Use `altitude_accuracy` instead.
+   * 
+ * + * .google.protobuf.DoubleValue vertical_accuracy = 9 [deprecated = true]; + * + * @deprecated maps.fleetengine.delivery.v1.DeliveryVehicleLocation.vertical_accuracy is + * deprecated. See google/maps/fleetengine/delivery/v1/common.proto;l=87 + * @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 altitudeAccuracy_ != null; + } + /** + * + * + *
+   * 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.delivery.v1.DeliveryVehicleLocation.speed_kmph is deprecated. See + * google/maps/fleetengine/delivery/v1/common.proto;l=94 + * @return Whether the speedKmph field is set. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean hasSpeedKmph() { + return speedKmph_ != null; + } + /** + * + * + *
+   * Speed of the vehicle in kilometers per hour.
+   * Deprecated: Use `speed` instead.
+   * 
+ * + * .google.protobuf.Int32Value speed_kmph = 3 [deprecated = true]; + * + * @deprecated maps.fleetengine.delivery.v1.DeliveryVehicleLocation.speed_kmph is deprecated. See + * google/maps/fleetengine/delivery/v1/common.proto;l=94 + * @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 speed_ != null; + } + /** + * + * + *
+   * 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 speedAccuracy_ != null; + } + /** + * + * + *
+   * 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 updateTime_ != null; + } + /** + * + * + *
+   * 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 serverTime_ != null; + } + /** + * + * + *
+   * 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.delivery.v1.DeliveryVehicleLocationSensor 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.delivery.v1.DeliveryVehicleLocationSensor location_sensor = 11; + * + * @return The locationSensor. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor getLocationSensor() { + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor result = + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor.forNumber( + locationSensor_); + return result == null + ? google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor.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 isRoadSnapped_ != null; + } + /** + * + * + *
+   * 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 isGpsSensorEnabled_ != null; + } + /** + * + * + *
+   * 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 timeSinceUpdate_ != null; + } + /** + * + * + *
+   * 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.delivery.v1.DeliveryVehicleLocation.num_stale_updates is + * deprecated. See google/maps/fleetengine/delivery/v1/common.proto;l=129 + * @return Whether the numStaleUpdates field is set. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean hasNumStaleUpdates() { + return numStaleUpdates_ != null; + } + /** + * + * + *
+   * 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.delivery.v1.DeliveryVehicleLocation.num_stale_updates is + * deprecated. See google/maps/fleetengine/delivery/v1/common.proto;l=129 + * @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 rawLocation_ != null; + } + /** + * + * + *
+   * 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 rawLocationTime_ != null; + } + /** + * + * + *
+   * 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.delivery.v1.DeliveryVehicleLocationSensor 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.delivery.v1.DeliveryVehicleLocationSensor raw_location_sensor = 28; + * + * + * @return The rawLocationSensor. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor getRawLocationSensor() { + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor result = + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor.forNumber( + rawLocationSensor_); + return result == null + ? google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor.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 rawLocationAccuracy_ != null; + } + /** + * + * + *
+   * 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 supplementalLocation_ != null; + } + /** + * + * + *
+   * 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 supplementalLocationTime_ != null; + } + /** + * + * + *
+   * 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.delivery.v1.DeliveryVehicleLocationSensor 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.delivery.v1.DeliveryVehicleLocationSensor supplemental_location_sensor = 20; + * + * + * @return The supplementalLocationSensor. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor + getSupplementalLocationSensor() { + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor result = + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor.forNumber( + supplementalLocationSensor_); + return result == null + ? google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor.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 supplementalLocationAccuracy_ != null; + } + /** + * + * + *
+   * 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.delivery.v1.DeliveryVehicleLocation.road_snapped is deprecated. + * See google/maps/fleetengine/delivery/v1/common.proto;l=158 + * @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 (location_ != null) { + output.writeMessage(1, getLocation()); + } + if (heading_ != null) { + output.writeMessage(2, getHeading()); + } + if (speedKmph_ != null) { + output.writeMessage(3, getSpeedKmph()); + } + if (updateTime_ != null) { + output.writeMessage(4, getUpdateTime()); + } + if (altitude_ != null) { + output.writeMessage(5, getAltitude()); + } + if (speed_ != null) { + output.writeMessage(6, getSpeed()); + } + if (speedAccuracy_ != null) { + output.writeMessage(7, getSpeedAccuracy()); + } + if (horizontalAccuracy_ != null) { + output.writeMessage(8, getHorizontalAccuracy()); + } + if (verticalAccuracy_ != null) { + output.writeMessage(9, getVerticalAccuracy()); + } + if (bearingAccuracy_ != null) { + output.writeMessage(10, getBearingAccuracy()); + } + if (locationSensor_ + != google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor.UNKNOWN_SENSOR + .getNumber()) { + output.writeEnum(11, locationSensor_); + } + if (isGpsSensorEnabled_ != null) { + output.writeMessage(12, getIsGpsSensorEnabled()); + } + if (serverTime_ != null) { + output.writeMessage(13, getServerTime()); + } + if (timeSinceUpdate_ != null) { + output.writeMessage(14, getTimeSinceUpdate()); + } + if (numStaleUpdates_ != null) { + output.writeMessage(15, getNumStaleUpdates()); + } + if (rawLocation_ != null) { + output.writeMessage(16, getRawLocation()); + } + if (rawLocationTime_ != null) { + output.writeMessage(17, getRawLocationTime()); + } + if (supplementalLocation_ != null) { + output.writeMessage(18, getSupplementalLocation()); + } + if (supplementalLocationTime_ != null) { + output.writeMessage(19, getSupplementalLocationTime()); + } + if (supplementalLocationSensor_ + != google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor.UNKNOWN_SENSOR + .getNumber()) { + output.writeEnum(20, supplementalLocationSensor_); + } + if (supplementalLocationAccuracy_ != null) { + output.writeMessage(21, getSupplementalLocationAccuracy()); + } + if (latlngAccuracy_ != null) { + output.writeMessage(22, getLatlngAccuracy()); + } + if (headingAccuracy_ != null) { + output.writeMessage(23, getHeadingAccuracy()); + } + if (altitudeAccuracy_ != null) { + output.writeMessage(24, getAltitudeAccuracy()); + } + if (rawLocationAccuracy_ != null) { + output.writeMessage(25, getRawLocationAccuracy()); + } + if (roadSnapped_ != false) { + output.writeBool(26, roadSnapped_); + } + if (isRoadSnapped_ != null) { + output.writeMessage(27, getIsRoadSnapped()); + } + if (rawLocationSensor_ + != google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor.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 (location_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getLocation()); + } + if (heading_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getHeading()); + } + if (speedKmph_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSpeedKmph()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime()); + } + if (altitude_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getAltitude()); + } + if (speed_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getSpeed()); + } + if (speedAccuracy_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getSpeedAccuracy()); + } + if (horizontalAccuracy_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getHorizontalAccuracy()); + } + if (verticalAccuracy_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getVerticalAccuracy()); + } + if (bearingAccuracy_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getBearingAccuracy()); + } + if (locationSensor_ + != google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor.UNKNOWN_SENSOR + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, locationSensor_); + } + if (isGpsSensorEnabled_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getIsGpsSensorEnabled()); + } + if (serverTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getServerTime()); + } + if (timeSinceUpdate_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getTimeSinceUpdate()); + } + if (numStaleUpdates_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getNumStaleUpdates()); + } + if (rawLocation_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, getRawLocation()); + } + if (rawLocationTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, getRawLocationTime()); + } + if (supplementalLocation_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(18, getSupplementalLocation()); + } + if (supplementalLocationTime_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 19, getSupplementalLocationTime()); + } + if (supplementalLocationSensor_ + != google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor.UNKNOWN_SENSOR + .getNumber()) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize(20, supplementalLocationSensor_); + } + if (supplementalLocationAccuracy_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 21, getSupplementalLocationAccuracy()); + } + if (latlngAccuracy_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(22, getLatlngAccuracy()); + } + if (headingAccuracy_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(23, getHeadingAccuracy()); + } + if (altitudeAccuracy_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(24, getAltitudeAccuracy()); + } + if (rawLocationAccuracy_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(25, getRawLocationAccuracy()); + } + if (roadSnapped_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(26, roadSnapped_); + } + if (isRoadSnapped_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(27, getIsRoadSnapped()); + } + if (rawLocationSensor_ + != google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor.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 google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation)) { + return super.equals(obj); + } + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation other = + (google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation) 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 google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation 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 google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation 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 google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation 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( + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation 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.delivery.v1.DeliveryVehicleLocation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.delivery.v1.DeliveryVehicleLocation) + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.Common + .internal_static_maps_fleetengine_delivery_v1_DeliveryVehicleLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.Common + .internal_static_maps_fleetengine_delivery_v1_DeliveryVehicleLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation.class, + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation.Builder.class); + } + + // Construct using google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @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 google.maps.fleetengine.delivery.v1.Common + .internal_static_maps_fleetengine_delivery_v1_DeliveryVehicleLocation_descriptor; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation getDefaultInstanceForType() { + return google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation.getDefaultInstance(); + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation build() { + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation buildPartial() { + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation result = + new google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.location_ = locationBuilder_ == null ? location_ : locationBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.horizontalAccuracy_ = + horizontalAccuracyBuilder_ == null + ? horizontalAccuracy_ + : horizontalAccuracyBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.latlngAccuracy_ = + latlngAccuracyBuilder_ == null ? latlngAccuracy_ : latlngAccuracyBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.heading_ = headingBuilder_ == null ? heading_ : headingBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.bearingAccuracy_ = + bearingAccuracyBuilder_ == null ? bearingAccuracy_ : bearingAccuracyBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.headingAccuracy_ = + headingAccuracyBuilder_ == null ? headingAccuracy_ : headingAccuracyBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.altitude_ = altitudeBuilder_ == null ? altitude_ : altitudeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.verticalAccuracy_ = + verticalAccuracyBuilder_ == null ? verticalAccuracy_ : verticalAccuracyBuilder_.build(); + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.altitudeAccuracy_ = + altitudeAccuracyBuilder_ == null ? altitudeAccuracy_ : altitudeAccuracyBuilder_.build(); + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.speedKmph_ = speedKmphBuilder_ == null ? speedKmph_ : speedKmphBuilder_.build(); + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.speed_ = speedBuilder_ == null ? speed_ : speedBuilder_.build(); + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.speedAccuracy_ = + speedAccuracyBuilder_ == null ? speedAccuracy_ : speedAccuracyBuilder_.build(); + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.serverTime_ = serverTimeBuilder_ == null ? serverTime_ : serverTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.locationSensor_ = locationSensor_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.isRoadSnapped_ = + isRoadSnappedBuilder_ == null ? isRoadSnapped_ : isRoadSnappedBuilder_.build(); + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.isGpsSensorEnabled_ = + isGpsSensorEnabledBuilder_ == null + ? isGpsSensorEnabled_ + : isGpsSensorEnabledBuilder_.build(); + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.timeSinceUpdate_ = + timeSinceUpdateBuilder_ == null ? timeSinceUpdate_ : timeSinceUpdateBuilder_.build(); + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.numStaleUpdates_ = + numStaleUpdatesBuilder_ == null ? numStaleUpdates_ : numStaleUpdatesBuilder_.build(); + } + if (((from_bitField0_ & 0x00080000) != 0)) { + result.rawLocation_ = + rawLocationBuilder_ == null ? rawLocation_ : rawLocationBuilder_.build(); + } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.rawLocationTime_ = + rawLocationTimeBuilder_ == null ? rawLocationTime_ : rawLocationTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00200000) != 0)) { + result.rawLocationSensor_ = rawLocationSensor_; + } + if (((from_bitField0_ & 0x00400000) != 0)) { + result.rawLocationAccuracy_ = + rawLocationAccuracyBuilder_ == null + ? rawLocationAccuracy_ + : rawLocationAccuracyBuilder_.build(); + } + if (((from_bitField0_ & 0x00800000) != 0)) { + result.supplementalLocation_ = + supplementalLocationBuilder_ == null + ? supplementalLocation_ + : supplementalLocationBuilder_.build(); + } + if (((from_bitField0_ & 0x01000000) != 0)) { + result.supplementalLocationTime_ = + supplementalLocationTimeBuilder_ == null + ? supplementalLocationTime_ + : supplementalLocationTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x02000000) != 0)) { + result.supplementalLocationSensor_ = supplementalLocationSensor_; + } + if (((from_bitField0_ & 0x04000000) != 0)) { + result.supplementalLocationAccuracy_ = + supplementalLocationAccuracyBuilder_ == null + ? supplementalLocationAccuracy_ + : supplementalLocationAccuracyBuilder_.build(); + } + if (((from_bitField0_ & 0x08000000) != 0)) { + result.roadSnapped_ = roadSnapped_; + } + } + + @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 google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation) { + return mergeFrom((google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation other) { + if (other == google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation.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); + } + 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.delivery.v1.DeliveryVehicleLocation.horizontal_accuracy is + * deprecated. See google/maps/fleetengine/delivery/v1/common.proto;l=68 + * @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.delivery.v1.DeliveryVehicleLocation.horizontal_accuracy is + * deprecated. See google/maps/fleetengine/delivery/v1/common.proto;l=68 + * @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); + } + 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); + } + 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); + } + 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.delivery.v1.DeliveryVehicleLocation.bearing_accuracy is + * deprecated. See google/maps/fleetengine/delivery/v1/common.proto;l=78 + * @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.delivery.v1.DeliveryVehicleLocation.bearing_accuracy is + * deprecated. See google/maps/fleetengine/delivery/v1/common.proto;l=78 + * @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); + } + 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); + } + 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); + } + 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.delivery.v1.DeliveryVehicleLocation.vertical_accuracy is + * deprecated. See google/maps/fleetengine/delivery/v1/common.proto;l=87 + * @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.delivery.v1.DeliveryVehicleLocation.vertical_accuracy is + * deprecated. See google/maps/fleetengine/delivery/v1/common.proto;l=87 + * @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); + } + 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); + } + 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.delivery.v1.DeliveryVehicleLocation.speed_kmph is deprecated. + * See google/maps/fleetengine/delivery/v1/common.proto;l=94 + * @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.delivery.v1.DeliveryVehicleLocation.speed_kmph is deprecated. + * See google/maps/fleetengine/delivery/v1/common.proto;l=94 + * @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); + } + 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); + } + 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); + } + 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); + } + 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); + } + 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.delivery.v1.DeliveryVehicleLocationSensor 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.delivery.v1.DeliveryVehicleLocationSensor 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.delivery.v1.DeliveryVehicleLocationSensor location_sensor = 11; + * + * + * @return The locationSensor. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor getLocationSensor() { + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor result = + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor.forNumber( + locationSensor_); + return result == null + ? google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Provider of location data (for example, `GPS`).
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor location_sensor = 11; + * + * + * @param value The locationSensor to set. + * @return This builder for chaining. + */ + public Builder setLocationSensor( + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00004000; + locationSensor_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Provider of location data (for example, `GPS`).
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor 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); + } + 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); + } + 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); + } + 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.delivery.v1.DeliveryVehicleLocation.num_stale_updates is + * deprecated. See google/maps/fleetengine/delivery/v1/common.proto;l=129 + * @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.delivery.v1.DeliveryVehicleLocation.num_stale_updates is + * deprecated. See google/maps/fleetengine/delivery/v1/common.proto;l=129 + * @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); + } + 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); + } + 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); + } + 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.delivery.v1.DeliveryVehicleLocationSensor 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.delivery.v1.DeliveryVehicleLocationSensor 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.delivery.v1.DeliveryVehicleLocationSensor raw_location_sensor = 28; + * + * + * @return The rawLocationSensor. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor + getRawLocationSensor() { + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor result = + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor.forNumber( + rawLocationSensor_); + return result == null + ? google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Source of the raw location. Defaults to `GPS`.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor raw_location_sensor = 28; + * + * + * @param value The rawLocationSensor to set. + * @return This builder for chaining. + */ + public Builder setRawLocationSensor( + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor 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.delivery.v1.DeliveryVehicleLocationSensor 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); + } + 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); + } + 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); + } + 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.delivery.v1.DeliveryVehicleLocationSensor 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.delivery.v1.DeliveryVehicleLocationSensor 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.delivery.v1.DeliveryVehicleLocationSensor supplemental_location_sensor = 20; + * + * + * @return The supplementalLocationSensor. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor + getSupplementalLocationSensor() { + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor result = + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor.forNumber( + supplementalLocationSensor_); + return result == null + ? google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Source of the supplemental location. Defaults to
+     * `CUSTOMER_SUPPLIED_LOCATION`.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor supplemental_location_sensor = 20; + * + * + * @param value The supplementalLocationSensor to set. + * @return This builder for chaining. + */ + public Builder setSupplementalLocationSensor( + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor 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.delivery.v1.DeliveryVehicleLocationSensor 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); + } + 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.delivery.v1.DeliveryVehicleLocation.road_snapped is deprecated. + * See google/maps/fleetengine/delivery/v1/common.proto;l=158 + * @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.delivery.v1.DeliveryVehicleLocation.road_snapped is deprecated. + * See google/maps/fleetengine/delivery/v1/common.proto;l=158 + * @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.delivery.v1.DeliveryVehicleLocation.road_snapped is deprecated. + * See google/maps/fleetengine/delivery/v1/common.proto;l=158 + * @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.delivery.v1.DeliveryVehicleLocation) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.delivery.v1.DeliveryVehicleLocation) + private static final google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation(); + } + + public static google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeliveryVehicleLocation 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 google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryVehicleLocationOrBuilder.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryVehicleLocationOrBuilder.java new file mode 100644 index 000000000000..d0777423a430 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryVehicleLocationOrBuilder.java @@ -0,0 +1,1053 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/common.proto + +package google.maps.fleetengine.delivery.v1; + +public interface DeliveryVehicleLocationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.delivery.v1.DeliveryVehicleLocation) + 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.delivery.v1.DeliveryVehicleLocation.horizontal_accuracy is + * deprecated. See google/maps/fleetengine/delivery/v1/common.proto;l=68 + * @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.delivery.v1.DeliveryVehicleLocation.horizontal_accuracy is + * deprecated. See google/maps/fleetengine/delivery/v1/common.proto;l=68 + * @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.delivery.v1.DeliveryVehicleLocation.bearing_accuracy is + * deprecated. See google/maps/fleetengine/delivery/v1/common.proto;l=78 + * @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.delivery.v1.DeliveryVehicleLocation.bearing_accuracy is + * deprecated. See google/maps/fleetengine/delivery/v1/common.proto;l=78 + * @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.delivery.v1.DeliveryVehicleLocation.vertical_accuracy is + * deprecated. See google/maps/fleetengine/delivery/v1/common.proto;l=87 + * @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.delivery.v1.DeliveryVehicleLocation.vertical_accuracy is + * deprecated. See google/maps/fleetengine/delivery/v1/common.proto;l=87 + * @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.delivery.v1.DeliveryVehicleLocation.speed_kmph is deprecated. See + * google/maps/fleetengine/delivery/v1/common.proto;l=94 + * @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.delivery.v1.DeliveryVehicleLocation.speed_kmph is deprecated. See + * google/maps/fleetengine/delivery/v1/common.proto;l=94 + * @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.delivery.v1.DeliveryVehicleLocationSensor location_sensor = 11; + * + * @return The enum numeric value on the wire for locationSensor. + */ + int getLocationSensorValue(); + /** + * + * + *
+   * Provider of location data (for example, `GPS`).
+   * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor location_sensor = 11; + * + * @return The locationSensor. + */ + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor 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.delivery.v1.DeliveryVehicleLocation.num_stale_updates is + * deprecated. See google/maps/fleetengine/delivery/v1/common.proto;l=129 + * @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.delivery.v1.DeliveryVehicleLocation.num_stale_updates is + * deprecated. See google/maps/fleetengine/delivery/v1/common.proto;l=129 + * @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.delivery.v1.DeliveryVehicleLocationSensor 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.delivery.v1.DeliveryVehicleLocationSensor raw_location_sensor = 28; + * + * + * @return The rawLocationSensor. + */ + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor 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.delivery.v1.DeliveryVehicleLocationSensor 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.delivery.v1.DeliveryVehicleLocationSensor supplemental_location_sensor = 20; + * + * + * @return The supplementalLocationSensor. + */ + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor 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.delivery.v1.DeliveryVehicleLocation.road_snapped is deprecated. + * See google/maps/fleetengine/delivery/v1/common.proto;l=158 + * @return The roadSnapped. + */ + @java.lang.Deprecated + boolean getRoadSnapped(); +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryVehicleLocationSensor.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryVehicleLocationSensor.java new file mode 100644 index 000000000000..6b46fc5dc0cc --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryVehicleLocationSensor.java @@ -0,0 +1,325 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/common.proto + +package google.maps.fleetengine.delivery.v1; + +/** + * + * + *
+ * The sensor or methodology used to determine the location.
+ * 
+ * + * Protobuf enum {@code maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor} + */ +public enum DeliveryVehicleLocationSensor 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 DeliveryVehicle'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 DeliveryVehicle'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 DeliveryVehicleLocationSensor 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 DeliveryVehicleLocationSensor 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 DeliveryVehicleLocationSensor findValueByNumber(int number) { + return DeliveryVehicleLocationSensor.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 google.maps.fleetengine.delivery.v1.Common.getDescriptor().getEnumTypes().get(0); + } + + private static final DeliveryVehicleLocationSensor[] VALUES = values(); + + public static DeliveryVehicleLocationSensor 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 DeliveryVehicleLocationSensor(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor) +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryVehicleName.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryVehicleName.java new file mode 100644 index 000000000000..fa6a8c18e056 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryVehicleName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.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 DeliveryVehicleName implements ResourceName { + private static final PathTemplate PROVIDER_VEHICLE = + PathTemplate.createWithoutUrlEncoding("providers/{provider}/deliveryVehicles/{vehicle}"); + private volatile Map fieldValuesMap; + private final String provider; + private final String vehicle; + + @Deprecated + protected DeliveryVehicleName() { + provider = null; + vehicle = null; + } + + private DeliveryVehicleName(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 DeliveryVehicleName 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 DeliveryVehicleName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROVIDER_VEHICLE.validatedMatch( + formattedString, "DeliveryVehicleName.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 (DeliveryVehicleName 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()) { + DeliveryVehicleName that = ((DeliveryVehicleName) 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}/deliveryVehicles/{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(DeliveryVehicleName deliveryVehicleName) { + this.provider = deliveryVehicleName.provider; + this.vehicle = deliveryVehicleName.vehicle; + } + + public DeliveryVehicleName build() { + return new DeliveryVehicleName(this); + } + } +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryVehicleNavigationStatus.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryVehicleNavigationStatus.java new file mode 100644 index 000000000000..b808a007c4c7 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryVehicleNavigationStatus.java @@ -0,0 +1,225 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/common.proto + +package google.maps.fleetengine.delivery.v1; + +/** + * + * + *
+ * The vehicle's navigation status.
+ * 
+ * + * Protobuf enum {@code maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus} + */ +public enum DeliveryVehicleNavigationStatus 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 DeliveryVehicleNavigationStatus 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 DeliveryVehicleNavigationStatus 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 DeliveryVehicleNavigationStatus findValueByNumber(int number) { + return DeliveryVehicleNavigationStatus.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 google.maps.fleetengine.delivery.v1.Common.getDescriptor().getEnumTypes().get(1); + } + + private static final DeliveryVehicleNavigationStatus[] VALUES = values(); + + public static DeliveryVehicleNavigationStatus 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 DeliveryVehicleNavigationStatus(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus) +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryVehicleOrBuilder.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryVehicleOrBuilder.java new file mode 100644 index 000000000000..bc7c275c668e --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryVehicleOrBuilder.java @@ -0,0 +1,503 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_vehicles.proto + +package google.maps.fleetengine.delivery.v1; + +public interface DeliveryVehicleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.delivery.v1.DeliveryVehicle) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The unique name of this Delivery Vehicle.
+   * The format is `providers/{provider}/deliveryVehicles/{vehicle}`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The unique name of this Delivery Vehicle.
+   * The format is `providers/{provider}/deliveryVehicles/{vehicle}`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The last reported location of the Delivery Vehicle.
+   * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; + * + * @return Whether the lastLocation field is set. + */ + boolean hasLastLocation(); + /** + * + * + *
+   * The last reported location of the Delivery Vehicle.
+   * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; + * + * @return The lastLocation. + */ + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation getLastLocation(); + /** + * + * + *
+   * The last reported location of the Delivery Vehicle.
+   * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; + */ + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationOrBuilder getLastLocationOrBuilder(); + + /** + * + * + *
+   * The Delivery Vehicle's navigation status.
+   * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus navigation_status = 3; + * + * + * @return The enum numeric value on the wire for navigationStatus. + */ + int getNavigationStatusValue(); + /** + * + * + *
+   * The Delivery Vehicle's navigation status.
+   * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus navigation_status = 3; + * + * + * @return The navigationStatus. + */ + google.maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus getNavigationStatus(); + + /** + * + * + *
+   * The encoded polyline specifying the route that the navigation recommends
+   * taking to the next waypoint. Your driver app updates this when a
+   * stop is reached or passed, and when the navigation reroutes. These
+   * `LatLng`s are returned in
+   * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+   * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+   * (REST) for all active Tasks assigned to the Vehicle.
+   *
+   * There are a few cases where this field might not be used to populate
+   * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+   * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+   * (REST):
+   *
+   * * The endpoint of the `current_route_segment` does not match
+   * `DeliveryVehicle.remaining_vehicle_journey_segments[0].stop` (gRPC) or
+   * `DeliveryVehicle.remainingVehicleJourneySegments[0].stop` (REST).
+   *
+   * * The driver app has not updated its location recently, so the last
+   * updated value for this field might be stale.
+   *
+   * * The driver app has recently updated its location, but the
+   * `current_route_segment` is stale, and points to a previous vehicle stop.
+   *
+   * In these cases, Fleet Engine populates this field with a route from the
+   * most recently passed VehicleStop to the upcoming VehicleStop to ensure that
+   * the consumer of this field has the best available information on the
+   * current path of the Delivery Vehicle.
+   * 
+ * + * bytes current_route_segment = 4; + * + * @return The currentRouteSegment. + */ + com.google.protobuf.ByteString getCurrentRouteSegment(); + + /** + * + * + *
+   * The location where the `current_route_segment` ends. This is not currently
+   * populated by the driver app, but you can supply it on
+   * `UpdateDeliveryVehicle` calls. It is either the `LatLng` from the upcoming
+   * vehicle stop, or the last `LatLng` of the `current_route_segment`. Fleet
+   * Engine will then do its best to interpolate to an actual `VehicleStop`.
+   *
+   * This field is ignored in `UpdateDeliveryVehicle` calls if the
+   * `current_route_segment` field is empty.
+   * 
+ * + * .google.type.LatLng current_route_segment_end_point = 5; + * + * @return Whether the currentRouteSegmentEndPoint field is set. + */ + boolean hasCurrentRouteSegmentEndPoint(); + /** + * + * + *
+   * The location where the `current_route_segment` ends. This is not currently
+   * populated by the driver app, but you can supply it on
+   * `UpdateDeliveryVehicle` calls. It is either the `LatLng` from the upcoming
+   * vehicle stop, or the last `LatLng` of the `current_route_segment`. Fleet
+   * Engine will then do its best to interpolate to an actual `VehicleStop`.
+   *
+   * This field is ignored in `UpdateDeliveryVehicle` calls if the
+   * `current_route_segment` field is empty.
+   * 
+ * + * .google.type.LatLng current_route_segment_end_point = 5; + * + * @return The currentRouteSegmentEndPoint. + */ + com.google.type.LatLng getCurrentRouteSegmentEndPoint(); + /** + * + * + *
+   * The location where the `current_route_segment` ends. This is not currently
+   * populated by the driver app, but you can supply it on
+   * `UpdateDeliveryVehicle` calls. It is either the `LatLng` from the upcoming
+   * vehicle stop, or the last `LatLng` of the `current_route_segment`. Fleet
+   * Engine will then do its best to interpolate to an actual `VehicleStop`.
+   *
+   * This field is ignored in `UpdateDeliveryVehicle` calls if the
+   * `current_route_segment` field is empty.
+   * 
+ * + * .google.type.LatLng current_route_segment_end_point = 5; + */ + com.google.type.LatLngOrBuilder getCurrentRouteSegmentEndPointOrBuilder(); + + /** + * + * + *
+   * The remaining driving distance for the `current_route_segment`.
+   * The Driver app typically provides this field, but there are some
+   * circumstances in which Fleet Engine will override the value sent by the
+   * app. For more information, see
+   * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+   * This field is returned in
+   * `Task.remaining_vehicle_journey_segments[0].driving_distance_meters` (gRPC)
+   * or `Task.remainingVehicleJourneySegments[0].drivingDistanceMeters` (REST)
+   * for all active `Task`s assigned to the Delivery Vehicle.
+   *
+   * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the
+   * `current_route_segment` field is empty.
+   * 
+ * + * .google.protobuf.Int32Value remaining_distance_meters = 6; + * + * @return Whether the remainingDistanceMeters field is set. + */ + boolean hasRemainingDistanceMeters(); + /** + * + * + *
+   * The remaining driving distance for the `current_route_segment`.
+   * The Driver app typically provides this field, but there are some
+   * circumstances in which Fleet Engine will override the value sent by the
+   * app. For more information, see
+   * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+   * This field is returned in
+   * `Task.remaining_vehicle_journey_segments[0].driving_distance_meters` (gRPC)
+   * or `Task.remainingVehicleJourneySegments[0].drivingDistanceMeters` (REST)
+   * for all active `Task`s assigned to the Delivery Vehicle.
+   *
+   * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the
+   * `current_route_segment` field is empty.
+   * 
+ * + * .google.protobuf.Int32Value remaining_distance_meters = 6; + * + * @return The remainingDistanceMeters. + */ + com.google.protobuf.Int32Value getRemainingDistanceMeters(); + /** + * + * + *
+   * The remaining driving distance for the `current_route_segment`.
+   * The Driver app typically provides this field, but there are some
+   * circumstances in which Fleet Engine will override the value sent by the
+   * app. For more information, see
+   * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+   * This field is returned in
+   * `Task.remaining_vehicle_journey_segments[0].driving_distance_meters` (gRPC)
+   * or `Task.remainingVehicleJourneySegments[0].drivingDistanceMeters` (REST)
+   * for all active `Task`s assigned to the Delivery Vehicle.
+   *
+   * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the
+   * `current_route_segment` field is empty.
+   * 
+ * + * .google.protobuf.Int32Value remaining_distance_meters = 6; + */ + com.google.protobuf.Int32ValueOrBuilder getRemainingDistanceMetersOrBuilder(); + + /** + * + * + *
+   * The remaining driving time for the `current_route_segment`.
+   * The Driver app typically provides this field, but there are some
+   * circumstances in which Fleet Engine will override the value sent by the
+   * app.  For more information, see
+   * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+   * This field is returned in
+   * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or
+   * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST) for all
+   * active tasks assigned to the Delivery Vehicle.
+   *
+   * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the
+   * `current_route_segment` field is empty.
+   * 
+ * + * .google.protobuf.Duration remaining_duration = 7; + * + * @return Whether the remainingDuration field is set. + */ + boolean hasRemainingDuration(); + /** + * + * + *
+   * The remaining driving time for the `current_route_segment`.
+   * The Driver app typically provides this field, but there are some
+   * circumstances in which Fleet Engine will override the value sent by the
+   * app.  For more information, see
+   * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+   * This field is returned in
+   * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or
+   * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST) for all
+   * active tasks assigned to the Delivery Vehicle.
+   *
+   * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the
+   * `current_route_segment` field is empty.
+   * 
+ * + * .google.protobuf.Duration remaining_duration = 7; + * + * @return The remainingDuration. + */ + com.google.protobuf.Duration getRemainingDuration(); + /** + * + * + *
+   * The remaining driving time for the `current_route_segment`.
+   * The Driver app typically provides this field, but there are some
+   * circumstances in which Fleet Engine will override the value sent by the
+   * app.  For more information, see
+   * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+   * This field is returned in
+   * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or
+   * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST) for all
+   * active tasks assigned to the Delivery Vehicle.
+   *
+   * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the
+   * `current_route_segment` field is empty.
+   * 
+ * + * .google.protobuf.Duration remaining_duration = 7; + */ + com.google.protobuf.DurationOrBuilder getRemainingDurationOrBuilder(); + + /** + * + * + *
+   * The journey segments assigned to this Delivery Vehicle, starting from the
+   * Vehicle's most recently reported location. This field won't be populated
+   * in the response of `ListDeliveryVehicles`.
+   * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 8; + * + */ + java.util.List + getRemainingVehicleJourneySegmentsList(); + /** + * + * + *
+   * The journey segments assigned to this Delivery Vehicle, starting from the
+   * Vehicle's most recently reported location. This field won't be populated
+   * in the response of `ListDeliveryVehicles`.
+   * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 8; + * + */ + google.maps.fleetengine.delivery.v1.VehicleJourneySegment getRemainingVehicleJourneySegments( + int index); + /** + * + * + *
+   * The journey segments assigned to this Delivery Vehicle, starting from the
+   * Vehicle's most recently reported location. This field won't be populated
+   * in the response of `ListDeliveryVehicles`.
+   * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 8; + * + */ + int getRemainingVehicleJourneySegmentsCount(); + /** + * + * + *
+   * The journey segments assigned to this Delivery Vehicle, starting from the
+   * Vehicle's most recently reported location. This field won't be populated
+   * in the response of `ListDeliveryVehicles`.
+   * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 8; + * + */ + java.util.List + getRemainingVehicleJourneySegmentsOrBuilderList(); + /** + * + * + *
+   * The journey segments assigned to this Delivery Vehicle, starting from the
+   * Vehicle's most recently reported location. This field won't be populated
+   * in the response of `ListDeliveryVehicles`.
+   * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 8; + * + */ + google.maps.fleetengine.delivery.v1.VehicleJourneySegmentOrBuilder + getRemainingVehicleJourneySegmentsOrBuilder(int index); + + /** + * + * + *
+   * A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have
+   * at most 100 attributes, and each attribute must have a unique key.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicleAttribute attributes = 9; + */ + java.util.List getAttributesList(); + /** + * + * + *
+   * A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have
+   * at most 100 attributes, and each attribute must have a unique key.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicleAttribute attributes = 9; + */ + google.maps.fleetengine.delivery.v1.DeliveryVehicleAttribute getAttributes(int index); + /** + * + * + *
+   * A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have
+   * at most 100 attributes, and each attribute must have a unique key.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicleAttribute attributes = 9; + */ + int getAttributesCount(); + /** + * + * + *
+   * A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have
+   * at most 100 attributes, and each attribute must have a unique key.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicleAttribute attributes = 9; + */ + java.util.List + getAttributesOrBuilderList(); + /** + * + * + *
+   * A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have
+   * at most 100 attributes, and each attribute must have a unique key.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicleAttribute attributes = 9; + */ + google.maps.fleetengine.delivery.v1.DeliveryVehicleAttributeOrBuilder getAttributesOrBuilder( + int index); + + /** + * + * + *
+   * The type of this delivery vehicle. If unset, this will default to `AUTO`.
+   * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType type = 10; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * The type of this delivery vehicle. If unset, this will default to `AUTO`.
+   * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType type = 10; + * + * @return The type. + */ + google.maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType getType(); +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryVehicles.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryVehicles.java new file mode 100644 index 000000000000..43fa3f973428 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/DeliveryVehicles.java @@ -0,0 +1,188 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_vehicles.proto + +package google.maps.fleetengine.delivery.v1; + +public final class DeliveryVehicles { + private DeliveryVehicles() {} + + 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_delivery_v1_DeliveryVehicle_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_delivery_v1_DeliveryVehicle_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_delivery_v1_LocationInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_delivery_v1_LocationInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_delivery_v1_VehicleJourneySegment_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_delivery_v1_VehicleJourneySegment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_delivery_v1_VehicleStop_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_delivery_v1_VehicleStop_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_delivery_v1_VehicleStop_TaskInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_delivery_v1_VehicleStop_TaskInfo_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/delivery/v1/de" + + "livery_vehicles.proto\022\034maps.fleetengine." + + "delivery.v1\032\037google/api/field_behavior.p" + + "roto\032\031google/api/resource.proto\0320google/" + + "maps/fleetengine/delivery/v1/common.prot" + + "o\032\036google/protobuf/duration.proto\032\036googl" + + "e/protobuf/wrappers.proto\032\030google/type/l" + + "atlng.proto\"\361\006\n\017DeliveryVehicle\022\014\n\004name\030" + + "\001 \001(\t\022L\n\rlast_location\030\002 \001(\01325.maps.flee" + + "tengine.delivery.v1.DeliveryVehicleLocat" + + "ion\022X\n\021navigation_status\030\003 \001(\0162=.maps.fl" + + "eetengine.delivery.v1.DeliveryVehicleNav" + + "igationStatus\022\035\n\025current_route_segment\030\004" + + " \001(\014\022<\n\037current_route_segment_end_point\030" + + "\005 \001(\0132\023.google.type.LatLng\022>\n\031remaining_" + + "distance_meters\030\006 \001(\0132\033.google.protobuf." + + "Int32Value\0225\n\022remaining_duration\030\007 \001(\0132\031" + + ".google.protobuf.Duration\022_\n\"remaining_v" + + "ehicle_journey_segments\030\010 \003(\01323.maps.fle" + + "etengine.delivery.v1.VehicleJourneySegme" + + "nt\022J\n\nattributes\030\t \003(\01326.maps.fleetengin" + + "e.delivery.v1.DeliveryVehicleAttribute\022O" + + "\n\004type\030\n \001(\0162A.maps.fleetengine.delivery" + + ".v1.DeliveryVehicle.DeliveryVehicleType\"" + + "t\n\023DeliveryVehicleType\022%\n!DELIVERY_VEHIC" + + "LE_TYPE_UNSPECIFIED\020\000\022\010\n\004AUTO\020\001\022\017\n\013TWO_W" + + "HEELER\020\002\022\013\n\007BICYCLE\020\003\022\016\n\nPEDESTRIAN\020\004:`\352" + + "A]\n*fleetengine.googleapis.com/DeliveryV" + + "ehicle\022/providers/{provider}/deliveryVeh" + + "icles/{vehicle}\"2\n\014LocationInfo\022\"\n\005point" + + "\030\001 \001(\0132\023.google.type.LatLng\"\370\001\n\025VehicleJ" + + "ourneySegment\0227\n\004stop\030\001 \001(\0132).maps.fleet" + + "engine.delivery.v1.VehicleStop\022B\n\027drivin" + + "g_distance_meters\030\002 \001(\0132\033.google.protobu" + + "f.Int32ValueB\004\342A\001\003\0229\n\020driving_duration\030\003" + + " \001(\0132\031.google.protobuf.DurationB\004\342A\001\003\022\'\n" + + "\004path\030\005 \003(\0132\023.google.type.LatLngB\004\342A\001\003\"\301" + + "\003\n\013VehicleStop\022J\n\020planned_location\030\001 \001(\013" + + "2*.maps.fleetengine.delivery.v1.Location" + + "InfoB\004\342A\001\002\022A\n\005tasks\030\002 \003(\01322.maps.fleeten" + + "gine.delivery.v1.VehicleStop.TaskInfo\022>\n" + + "\005state\030\003 \001(\0162/.maps.fleetengine.delivery" + + ".v1.VehicleStop.State\032\237\001\n\010TaskInfo\022\017\n\007ta" + + "sk_id\030\001 \001(\t\0226\n\rtask_duration\030\002 \001(\0132\031.goo" + + "gle.protobuf.DurationB\004\342A\001\003\022J\n\022target_ti" + + "me_window\030\003 \001(\0132(.maps.fleetengine.deliv" + + "ery.v1.TimeWindowB\004\342A\001\003\"A\n\005State\022\025\n\021STAT" + + "E_UNSPECIFIED\020\000\022\007\n\003NEW\020\001\022\013\n\007ENROUTE\020\002\022\013\n" + + "\007ARRIVED\020\003B\261\001\n#google.maps.fleetengine.d" + + "elivery.v1B\020DeliveryVehiclesP\001ZIcloud.go" + + "ogle.com/go/maps/fleetengine/delivery/ap" + + "iv1/deliverypb;deliverypb\242\002\004CFED\252\002#Googl" + + "e.Maps.FleetEngine.Delivery.V1b\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(), + google.maps.fleetengine.delivery.v1.Common.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.WrappersProto.getDescriptor(), + com.google.type.LatLngProto.getDescriptor(), + }); + internal_static_maps_fleetengine_delivery_v1_DeliveryVehicle_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_maps_fleetengine_delivery_v1_DeliveryVehicle_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_delivery_v1_DeliveryVehicle_descriptor, + new java.lang.String[] { + "Name", + "LastLocation", + "NavigationStatus", + "CurrentRouteSegment", + "CurrentRouteSegmentEndPoint", + "RemainingDistanceMeters", + "RemainingDuration", + "RemainingVehicleJourneySegments", + "Attributes", + "Type", + }); + internal_static_maps_fleetengine_delivery_v1_LocationInfo_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_maps_fleetengine_delivery_v1_LocationInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_delivery_v1_LocationInfo_descriptor, + new java.lang.String[] { + "Point", + }); + internal_static_maps_fleetengine_delivery_v1_VehicleJourneySegment_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_maps_fleetengine_delivery_v1_VehicleJourneySegment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_delivery_v1_VehicleJourneySegment_descriptor, + new java.lang.String[] { + "Stop", "DrivingDistanceMeters", "DrivingDuration", "Path", + }); + internal_static_maps_fleetengine_delivery_v1_VehicleStop_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_maps_fleetengine_delivery_v1_VehicleStop_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_delivery_v1_VehicleStop_descriptor, + new java.lang.String[] { + "PlannedLocation", "Tasks", "State", + }); + internal_static_maps_fleetengine_delivery_v1_VehicleStop_TaskInfo_descriptor = + internal_static_maps_fleetengine_delivery_v1_VehicleStop_descriptor.getNestedTypes().get(0); + internal_static_maps_fleetengine_delivery_v1_VehicleStop_TaskInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_delivery_v1_VehicleStop_TaskInfo_descriptor, + new java.lang.String[] { + "TaskId", "TaskDuration", "TargetTimeWindow", + }); + 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(); + google.maps.fleetengine.delivery.v1.Common.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.WrappersProto.getDescriptor(); + com.google.type.LatLngProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/GetDeliveryVehicleRequest.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/GetDeliveryVehicleRequest.java new file mode 100644 index 000000000000..85557a1a1b9c --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/GetDeliveryVehicleRequest.java @@ -0,0 +1,954 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_api.proto + +package google.maps.fleetengine.delivery.v1; + +/** + * + * + *
+ * The `GetDeliveryVehicle` request message.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest} + */ +public final class GetDeliveryVehicleRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest) + GetDeliveryVehicleRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetDeliveryVehicleRequest.newBuilder() to construct. + private GetDeliveryVehicleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetDeliveryVehicleRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetDeliveryVehicleRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_GetDeliveryVehicleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_GetDeliveryVehicleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest.class, + google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest.Builder.class); + } + + public static final int HEADER_FIELD_NUMBER = 1; + private google.maps.fleetengine.delivery.v1.DeliveryRequestHeader header_; + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the header field is set. + */ + @java.lang.Override + public boolean hasHeader() { + return header_ != null; + } + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The header. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader getHeader() { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance() + : header_; + } + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder getHeaderOrBuilder() { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.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}/deliveryVehicles/{delivery_vehicle}`.
+   * The `provider` must be the Google Cloud Project ID. For example,
+   * `sample-cloud-project`.
+   * 
+ * + * + * 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}/deliveryVehicles/{delivery_vehicle}`.
+   * The `provider` must be the Google Cloud Project ID. For example,
+   * `sample-cloud-project`.
+   * 
+ * + * + * 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; + } + } + + 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 (header_ != null) { + output.writeMessage(1, getHeader()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (header_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getHeader()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest)) { + return super.equals(obj); + } + google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest other = + (google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest) obj; + + if (hasHeader() != other.hasHeader()) return false; + if (hasHeader()) { + if (!getHeader().equals(other.getHeader())) return false; + } + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + 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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest 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 google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest 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 google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest 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( + google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest 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 `GetDeliveryVehicle` request message.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest) + google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_GetDeliveryVehicleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_GetDeliveryVehicleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest.class, + google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest.Builder.class); + } + + // Construct using google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_GetDeliveryVehicleRequest_descriptor; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest + getDefaultInstanceForType() { + return google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest.getDefaultInstance(); + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest build() { + google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest buildPartial() { + google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest result = + new google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.header_ = headerBuilder_ == null ? header_ : headerBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + } + + @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 google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest) { + return mergeFrom((google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest other) { + if (other + == google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest.getDefaultInstance()) + return this; + if (other.hasHeader()) { + mergeHeader(other.getHeader()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + 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: + { + input.readMessage(getHeaderFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + 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 google.maps.fleetengine.delivery.v1.DeliveryRequestHeader header_; + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder> + headerBuilder_; + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the header field is set. + */ + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The header. + */ + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader getHeader() { + if (headerBuilder_ == null) { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance() + : header_; + } else { + return headerBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHeader(google.maps.fleetengine.delivery.v1.DeliveryRequestHeader value) { + if (headerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + header_ = value; + } else { + headerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHeader( + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder builderForValue) { + if (headerBuilder_ == null) { + header_ = builderForValue.build(); + } else { + headerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeHeader(google.maps.fleetengine.delivery.v1.DeliveryRequestHeader value) { + if (headerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && header_ != null + && header_ + != google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance()) { + getHeaderBuilder().mergeFrom(value); + } else { + header_ = value; + } + } else { + headerBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearHeader() { + bitField0_ = (bitField0_ & ~0x00000001); + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder getHeaderBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getHeaderFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder getHeaderOrBuilder() { + if (headerBuilder_ != null) { + return headerBuilder_.getMessageOrBuilder(); + } else { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance() + : header_; + } + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder> + getHeaderFieldBuilder() { + if (headerBuilder_ == null) { + headerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder>( + getHeader(), getParentForChildren(), isClean()); + header_ = null; + } + return headerBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Must be in the format
+     * `providers/{provider}/deliveryVehicles/{delivery_vehicle}`.
+     * The `provider` must be the Google Cloud Project ID. For example,
+     * `sample-cloud-project`.
+     * 
+ * + * + * 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}/deliveryVehicles/{delivery_vehicle}`.
+     * The `provider` must be the Google Cloud Project ID. For example,
+     * `sample-cloud-project`.
+     * 
+ * + * + * 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}/deliveryVehicles/{delivery_vehicle}`.
+     * The `provider` must be the Google Cloud Project ID. For example,
+     * `sample-cloud-project`.
+     * 
+ * + * + * 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}/deliveryVehicles/{delivery_vehicle}`.
+     * The `provider` must be the Google Cloud Project ID. For example,
+     * `sample-cloud-project`.
+     * 
+ * + * + * 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}/deliveryVehicles/{delivery_vehicle}`.
+     * The `provider` must be the Google Cloud Project ID. For example,
+     * `sample-cloud-project`.
+     * 
+ * + * + * 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; + } + + @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.delivery.v1.GetDeliveryVehicleRequest) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest) + private static final google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest(); + } + + public static google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetDeliveryVehicleRequest 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 google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/GetDeliveryVehicleRequestOrBuilder.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/GetDeliveryVehicleRequestOrBuilder.java new file mode 100644 index 000000000000..20a86f4c8e6c --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/GetDeliveryVehicleRequestOrBuilder.java @@ -0,0 +1,101 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_api.proto + +package google.maps.fleetengine.delivery.v1; + +public interface GetDeliveryVehicleRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the header field is set. + */ + boolean hasHeader(); + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The header. + */ + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader getHeader(); + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder getHeaderOrBuilder(); + + /** + * + * + *
+   * Required. Must be in the format
+   * `providers/{provider}/deliveryVehicles/{delivery_vehicle}`.
+   * The `provider` must be the Google Cloud Project ID. For example,
+   * `sample-cloud-project`.
+   * 
+ * + * + * 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}/deliveryVehicles/{delivery_vehicle}`.
+   * The `provider` must be the Google Cloud Project ID. For example,
+   * `sample-cloud-project`.
+   * 
+ * + * + * string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/GetTaskRequest.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/GetTaskRequest.java new file mode 100644 index 000000000000..7bcbc9071e60 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/GetTaskRequest.java @@ -0,0 +1,942 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_api.proto + +package google.maps.fleetengine.delivery.v1; + +/** + * + * + *
+ * The `GetTask` request message.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.GetTaskRequest} + */ +public final class GetTaskRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.delivery.v1.GetTaskRequest) + GetTaskRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetTaskRequest.newBuilder() to construct. + private GetTaskRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetTaskRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetTaskRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_GetTaskRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_GetTaskRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.GetTaskRequest.class, + google.maps.fleetengine.delivery.v1.GetTaskRequest.Builder.class); + } + + public static final int HEADER_FIELD_NUMBER = 1; + private google.maps.fleetengine.delivery.v1.DeliveryRequestHeader header_; + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the header field is set. + */ + @java.lang.Override + public boolean hasHeader() { + return header_ != null; + } + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The header. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader getHeader() { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance() + : header_; + } + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder getHeaderOrBuilder() { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.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}/tasks/{task}`. The
+   * `provider` must be the Google Cloud Project ID. For example,
+   * `sample-cloud-project`.
+   * 
+ * + * + * 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}/tasks/{task}`. The
+   * `provider` must be the Google Cloud Project ID. For example,
+   * `sample-cloud-project`.
+   * 
+ * + * + * 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; + } + } + + 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 (header_ != null) { + output.writeMessage(1, getHeader()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (header_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getHeader()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof google.maps.fleetengine.delivery.v1.GetTaskRequest)) { + return super.equals(obj); + } + google.maps.fleetengine.delivery.v1.GetTaskRequest other = + (google.maps.fleetengine.delivery.v1.GetTaskRequest) obj; + + if (hasHeader() != other.hasHeader()) return false; + if (hasHeader()) { + if (!getHeader().equals(other.getHeader())) return false; + } + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + 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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.maps.fleetengine.delivery.v1.GetTaskRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.GetTaskRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.GetTaskRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.GetTaskRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.GetTaskRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.GetTaskRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.GetTaskRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.GetTaskRequest 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 google.maps.fleetengine.delivery.v1.GetTaskRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.GetTaskRequest 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 google.maps.fleetengine.delivery.v1.GetTaskRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.GetTaskRequest 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(google.maps.fleetengine.delivery.v1.GetTaskRequest 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 `GetTask` request message.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.GetTaskRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.delivery.v1.GetTaskRequest) + google.maps.fleetengine.delivery.v1.GetTaskRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_GetTaskRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_GetTaskRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.GetTaskRequest.class, + google.maps.fleetengine.delivery.v1.GetTaskRequest.Builder.class); + } + + // Construct using google.maps.fleetengine.delivery.v1.GetTaskRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_GetTaskRequest_descriptor; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.GetTaskRequest getDefaultInstanceForType() { + return google.maps.fleetengine.delivery.v1.GetTaskRequest.getDefaultInstance(); + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.GetTaskRequest build() { + google.maps.fleetengine.delivery.v1.GetTaskRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.GetTaskRequest buildPartial() { + google.maps.fleetengine.delivery.v1.GetTaskRequest result = + new google.maps.fleetengine.delivery.v1.GetTaskRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(google.maps.fleetengine.delivery.v1.GetTaskRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.header_ = headerBuilder_ == null ? header_ : headerBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + } + + @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 google.maps.fleetengine.delivery.v1.GetTaskRequest) { + return mergeFrom((google.maps.fleetengine.delivery.v1.GetTaskRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.maps.fleetengine.delivery.v1.GetTaskRequest other) { + if (other == google.maps.fleetengine.delivery.v1.GetTaskRequest.getDefaultInstance()) + return this; + if (other.hasHeader()) { + mergeHeader(other.getHeader()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + 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: + { + input.readMessage(getHeaderFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + 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 google.maps.fleetengine.delivery.v1.DeliveryRequestHeader header_; + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder> + headerBuilder_; + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the header field is set. + */ + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The header. + */ + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader getHeader() { + if (headerBuilder_ == null) { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance() + : header_; + } else { + return headerBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHeader(google.maps.fleetengine.delivery.v1.DeliveryRequestHeader value) { + if (headerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + header_ = value; + } else { + headerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHeader( + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder builderForValue) { + if (headerBuilder_ == null) { + header_ = builderForValue.build(); + } else { + headerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeHeader(google.maps.fleetengine.delivery.v1.DeliveryRequestHeader value) { + if (headerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && header_ != null + && header_ + != google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance()) { + getHeaderBuilder().mergeFrom(value); + } else { + header_ = value; + } + } else { + headerBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearHeader() { + bitField0_ = (bitField0_ & ~0x00000001); + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder getHeaderBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getHeaderFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder getHeaderOrBuilder() { + if (headerBuilder_ != null) { + return headerBuilder_.getMessageOrBuilder(); + } else { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance() + : header_; + } + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder> + getHeaderFieldBuilder() { + if (headerBuilder_ == null) { + headerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder>( + getHeader(), getParentForChildren(), isClean()); + header_ = null; + } + return headerBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Must be in the format `providers/{provider}/tasks/{task}`. The
+     * `provider` must be the Google Cloud Project ID. For example,
+     * `sample-cloud-project`.
+     * 
+ * + * + * 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}/tasks/{task}`. The
+     * `provider` must be the Google Cloud Project ID. For example,
+     * `sample-cloud-project`.
+     * 
+ * + * + * 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}/tasks/{task}`. The
+     * `provider` must be the Google Cloud Project ID. For example,
+     * `sample-cloud-project`.
+     * 
+ * + * + * 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}/tasks/{task}`. The
+     * `provider` must be the Google Cloud Project ID. For example,
+     * `sample-cloud-project`.
+     * 
+ * + * + * 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}/tasks/{task}`. The
+     * `provider` must be the Google Cloud Project ID. For example,
+     * `sample-cloud-project`.
+     * 
+ * + * + * 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; + } + + @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.delivery.v1.GetTaskRequest) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.delivery.v1.GetTaskRequest) + private static final google.maps.fleetengine.delivery.v1.GetTaskRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new google.maps.fleetengine.delivery.v1.GetTaskRequest(); + } + + public static google.maps.fleetengine.delivery.v1.GetTaskRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetTaskRequest 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 google.maps.fleetengine.delivery.v1.GetTaskRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/GetTaskRequestOrBuilder.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/GetTaskRequestOrBuilder.java new file mode 100644 index 000000000000..3bb08e2175b2 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/GetTaskRequestOrBuilder.java @@ -0,0 +1,99 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_api.proto + +package google.maps.fleetengine.delivery.v1; + +public interface GetTaskRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.delivery.v1.GetTaskRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the header field is set. + */ + boolean hasHeader(); + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The header. + */ + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader getHeader(); + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder getHeaderOrBuilder(); + + /** + * + * + *
+   * Required. Must be in the format `providers/{provider}/tasks/{task}`. The
+   * `provider` must be the Google Cloud Project ID. For example,
+   * `sample-cloud-project`.
+   * 
+ * + * + * 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}/tasks/{task}`. The
+   * `provider` must be the Google Cloud Project ID. For example,
+   * `sample-cloud-project`.
+   * 
+ * + * + * string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/GetTaskTrackingInfoRequest.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/GetTaskTrackingInfoRequest.java new file mode 100644 index 000000000000..a75fd5a1bf84 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/GetTaskTrackingInfoRequest.java @@ -0,0 +1,963 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_api.proto + +package google.maps.fleetengine.delivery.v1; + +/** + * + * + *
+ * The `GetTaskTrackingInfoRequest` request message.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest} + */ +public final class GetTaskTrackingInfoRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest) + GetTaskTrackingInfoRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetTaskTrackingInfoRequest.newBuilder() to construct. + private GetTaskTrackingInfoRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetTaskTrackingInfoRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetTaskTrackingInfoRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_GetTaskTrackingInfoRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_GetTaskTrackingInfoRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest.class, + google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest.Builder.class); + } + + public static final int HEADER_FIELD_NUMBER = 1; + private google.maps.fleetengine.delivery.v1.DeliveryRequestHeader header_; + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the header field is set. + */ + @java.lang.Override + public boolean hasHeader() { + return header_ != null; + } + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The header. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader getHeader() { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance() + : header_; + } + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder getHeaderOrBuilder() { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.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}/taskTrackingInfo/{tracking_id}`. The `provider`
+   * must be the Google Cloud Project ID, and the `tracking_id` must be the
+   * tracking ID associated with the task. An example name can be
+   * `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`.
+   * 
+ * + * + * 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}/taskTrackingInfo/{tracking_id}`. The `provider`
+   * must be the Google Cloud Project ID, and the `tracking_id` must be the
+   * tracking ID associated with the task. An example name can be
+   * `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`.
+   * 
+ * + * + * 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; + } + } + + 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 (header_ != null) { + output.writeMessage(1, getHeader()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (header_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getHeader()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest)) { + return super.equals(obj); + } + google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest other = + (google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest) obj; + + if (hasHeader() != other.hasHeader()) return false; + if (hasHeader()) { + if (!getHeader().equals(other.getHeader())) return false; + } + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + 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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest 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 google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest 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 google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest 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( + google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest 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 `GetTaskTrackingInfoRequest` request message.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest) + google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_GetTaskTrackingInfoRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_GetTaskTrackingInfoRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest.class, + google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest.Builder.class); + } + + // Construct using google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_GetTaskTrackingInfoRequest_descriptor; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest + getDefaultInstanceForType() { + return google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest.getDefaultInstance(); + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest build() { + google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest buildPartial() { + google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest result = + new google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.header_ = headerBuilder_ == null ? header_ : headerBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + } + + @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 google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest) { + return mergeFrom((google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest other) { + if (other + == google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest.getDefaultInstance()) + return this; + if (other.hasHeader()) { + mergeHeader(other.getHeader()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + 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: + { + input.readMessage(getHeaderFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + 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 google.maps.fleetengine.delivery.v1.DeliveryRequestHeader header_; + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder> + headerBuilder_; + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the header field is set. + */ + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The header. + */ + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader getHeader() { + if (headerBuilder_ == null) { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance() + : header_; + } else { + return headerBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHeader(google.maps.fleetengine.delivery.v1.DeliveryRequestHeader value) { + if (headerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + header_ = value; + } else { + headerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHeader( + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder builderForValue) { + if (headerBuilder_ == null) { + header_ = builderForValue.build(); + } else { + headerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeHeader(google.maps.fleetengine.delivery.v1.DeliveryRequestHeader value) { + if (headerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && header_ != null + && header_ + != google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance()) { + getHeaderBuilder().mergeFrom(value); + } else { + header_ = value; + } + } else { + headerBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearHeader() { + bitField0_ = (bitField0_ & ~0x00000001); + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder getHeaderBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getHeaderFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder getHeaderOrBuilder() { + if (headerBuilder_ != null) { + return headerBuilder_.getMessageOrBuilder(); + } else { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance() + : header_; + } + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder> + getHeaderFieldBuilder() { + if (headerBuilder_ == null) { + headerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder>( + getHeader(), getParentForChildren(), isClean()); + header_ = null; + } + return headerBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Must be in the format
+     * `providers/{provider}/taskTrackingInfo/{tracking_id}`. The `provider`
+     * must be the Google Cloud Project ID, and the `tracking_id` must be the
+     * tracking ID associated with the task. An example name can be
+     * `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`.
+     * 
+ * + * + * 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}/taskTrackingInfo/{tracking_id}`. The `provider`
+     * must be the Google Cloud Project ID, and the `tracking_id` must be the
+     * tracking ID associated with the task. An example name can be
+     * `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`.
+     * 
+ * + * + * 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}/taskTrackingInfo/{tracking_id}`. The `provider`
+     * must be the Google Cloud Project ID, and the `tracking_id` must be the
+     * tracking ID associated with the task. An example name can be
+     * `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`.
+     * 
+ * + * + * 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}/taskTrackingInfo/{tracking_id}`. The `provider`
+     * must be the Google Cloud Project ID, and the `tracking_id` must be the
+     * tracking ID associated with the task. An example name can be
+     * `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`.
+     * 
+ * + * + * 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}/taskTrackingInfo/{tracking_id}`. The `provider`
+     * must be the Google Cloud Project ID, and the `tracking_id` must be the
+     * tracking ID associated with the task. An example name can be
+     * `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`.
+     * 
+ * + * + * 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; + } + + @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.delivery.v1.GetTaskTrackingInfoRequest) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest) + private static final google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest(); + } + + public static google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetTaskTrackingInfoRequest 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 google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/GetTaskTrackingInfoRequestOrBuilder.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/GetTaskTrackingInfoRequestOrBuilder.java new file mode 100644 index 000000000000..08fda04cc77e --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/GetTaskTrackingInfoRequestOrBuilder.java @@ -0,0 +1,103 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_api.proto + +package google.maps.fleetengine.delivery.v1; + +public interface GetTaskTrackingInfoRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the header field is set. + */ + boolean hasHeader(); + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The header. + */ + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader getHeader(); + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder getHeaderOrBuilder(); + + /** + * + * + *
+   * Required. Must be in the format
+   * `providers/{provider}/taskTrackingInfo/{tracking_id}`. The `provider`
+   * must be the Google Cloud Project ID, and the `tracking_id` must be the
+   * tracking ID associated with the task. An example name can be
+   * `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`.
+   * 
+ * + * + * 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}/taskTrackingInfo/{tracking_id}`. The `provider`
+   * must be the Google Cloud Project ID, and the `tracking_id` must be the
+   * tracking ID associated with the task. An example name can be
+   * `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`.
+   * 
+ * + * + * string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/Headers.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/Headers.java new file mode 100644 index 000000000000..ce8d32803d62 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/Headers.java @@ -0,0 +1,98 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/header.proto + +package google.maps.fleetengine.delivery.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_delivery_v1_DeliveryRequestHeader_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_delivery_v1_DeliveryRequestHeader_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n0google/maps/fleetengine/delivery/v1/he" + + "ader.proto\022\034maps.fleetengine.delivery.v1" + + "\032\037google/api/field_behavior.proto\"\237\004\n\025De" + + "liveryRequestHeader\022\025\n\rlanguage_code\030\001 \001" + + "(\t\022\031\n\013region_code\030\002 \001(\tB\004\342A\001\002\022\023\n\013sdk_ver" + + "sion\030\003 \001(\t\022\022\n\nos_version\030\004 \001(\t\022\024\n\014device" + + "_model\030\005 \001(\t\022M\n\010sdk_type\030\006 \001(\0162;.maps.fl" + + "eetengine.delivery.v1.DeliveryRequestHea" + + "der.SdkType\022\030\n\020maps_sdk_version\030\007 \001(\t\022\027\n" + + "\017nav_sdk_version\030\010 \001(\t\022N\n\010platform\030\t \001(\016" + + "2<.maps.fleetengine.delivery.v1.Delivery" + + "RequestHeader.Platform\022\024\n\014manufacturer\030\n" + + " \001(\t\022\031\n\021android_api_level\030\013 \001(\005\"M\n\007SdkTy" + + "pe\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\010Platfo" + + "rm\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\250\001\n#google.maps.flee" + + "tengine.delivery.v1B\007HeadersP\001ZIcloud.go" + + "ogle.com/go/maps/fleetengine/delivery/ap" + + "iv1/deliverypb;deliverypb\242\002\004CFED\252\002#Googl" + + "e.Maps.FleetEngine.Delivery.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_delivery_v1_DeliveryRequestHeader_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_maps_fleetengine_delivery_v1_DeliveryRequestHeader_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_delivery_v1_DeliveryRequestHeader_descriptor, + new java.lang.String[] { + "LanguageCode", + "RegionCode", + "SdkVersion", + "OsVersion", + "DeviceModel", + "SdkType", + "MapsSdkVersion", + "NavSdkVersion", + "Platform", + "Manufacturer", + "AndroidApiLevel", + }); + 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-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/ListDeliveryVehiclesRequest.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/ListDeliveryVehiclesRequest.java new file mode 100644 index 000000000000..b826d71a5359 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/ListDeliveryVehiclesRequest.java @@ -0,0 +1,1839 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_api.proto + +package google.maps.fleetengine.delivery.v1; + +/** + * + * + *
+ * The `ListDeliveryVehicles` request message.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest} + */ +public final class ListDeliveryVehiclesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest) + ListDeliveryVehiclesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDeliveryVehiclesRequest.newBuilder() to construct. + private ListDeliveryVehiclesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDeliveryVehiclesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListDeliveryVehiclesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_ListDeliveryVehiclesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_ListDeliveryVehiclesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest.class, + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest.Builder.class); + } + + public static final int HEADER_FIELD_NUMBER = 1; + private google.maps.fleetengine.delivery.v1.DeliveryRequestHeader header_; + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the header field is set. + */ + @java.lang.Override + public boolean hasHeader() { + return header_ != null; + } + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The header. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader getHeader() { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance() + : header_; + } + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder getHeaderOrBuilder() { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.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 Google Cloud Project ID.
+   * For example, `sample-cloud-project`.
+   * 
+ * + * + * 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 Google Cloud Project ID.
+   * For example, `sample-cloud-project`.
+   * 
+ * + * + * 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 PAGE_SIZE_FIELD_NUMBER = 4; + private int pageSize_ = 0; + /** + * + * + *
+   * Optional. The maximum number of vehicles to return. The service may return
+   * fewer than this number. If you don't specify this number, then the server
+   * determines the number of results to return.
+   * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * Optional. A page token, received from a previous `ListDeliveryVehicles`
+   * call. You must provide this in order to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListDeliveryVehicles`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+   * Optional. A page token, received from a previous `ListDeliveryVehicles`
+   * call. You must provide this in order to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListDeliveryVehicles`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 FILTER_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Optional. A filter query to apply when listing delivery vehicles. See
+   * http://aip.dev/160 for examples of the filter syntax. If you don't specify
+   * a value, or if you specify an empty string for the filter, then all
+   * delivery vehicles are returned.
+   *
+   * Note that the only queries supported for `ListDeliveryVehicles` are
+   * on vehicle attributes (for example, `attributes.<key> = <value>` or
+   * `attributes.<key1> = <value1> AND attributes.<key2> = <value2>`). 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"`).
+   *
+   * The maximum number of restrictions allowed in a filter query is 50. A
+   * restriction is a part of the query of the form
+   * `attribute.<KEY> <COMPARATOR> <VALUE>`, for example `attributes.foo = bar`
+   * is 1 restriction.
+   * 
+ * + * string filter = 6 [(.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 delivery vehicles. See
+   * http://aip.dev/160 for examples of the filter syntax. If you don't specify
+   * a value, or if you specify an empty string for the filter, then all
+   * delivery vehicles are returned.
+   *
+   * Note that the only queries supported for `ListDeliveryVehicles` are
+   * on vehicle attributes (for example, `attributes.<key> = <value>` or
+   * `attributes.<key1> = <value1> AND attributes.<key2> = <value2>`). 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"`).
+   *
+   * The maximum number of restrictions allowed in a filter query is 50. A
+   * restriction is a part of the query of the form
+   * `attribute.<KEY> <COMPARATOR> <VALUE>`, for example `attributes.foo = bar`
+   * is 1 restriction.
+   * 
+ * + * string filter = 6 [(.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 = 7; + 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 = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the viewport field is set. + */ + @java.lang.Override + public boolean hasViewport() { + return viewport_ != null; + } + /** + * + * + *
+   * 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 = 7 [(.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 = 7 [(.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 { + if (header_ != null) { + output.writeMessage(1, getHeader()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(4, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, filter_); + } + if (viewport_ != null) { + output.writeMessage(7, getViewport()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (header_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getHeader()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, filter_); + } + if (viewport_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, 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 google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest)) { + return super.equals(obj); + } + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest other = + (google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest) 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 (!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(); + 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 google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest 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 google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest 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 google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest 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( + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest 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 `ListDeliveryVehicles` request message.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest) + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_ListDeliveryVehiclesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_ListDeliveryVehiclesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest.class, + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest.Builder.class); + } + + // Construct using google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + viewport_ = null; + if (viewportBuilder_ != null) { + viewportBuilder_.dispose(); + viewportBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_ListDeliveryVehiclesRequest_descriptor; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest + getDefaultInstanceForType() { + return google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest.getDefaultInstance(); + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest build() { + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest buildPartial() { + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest result = + new google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.header_ = headerBuilder_ == null ? header_ : headerBuilder_.build(); + } + 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.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.viewport_ = viewportBuilder_ == null ? viewport_ : viewportBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest) { + return mergeFrom((google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest other) { + if (other + == google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest.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.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000010; + 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: + { + input.readMessage(getHeaderFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 32: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 32 + case 42: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 42 + case 50: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 50 + case 58: + { + input.readMessage(getViewportFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private google.maps.fleetengine.delivery.v1.DeliveryRequestHeader header_; + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder> + headerBuilder_; + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the header field is set. + */ + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The header. + */ + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader getHeader() { + if (headerBuilder_ == null) { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance() + : header_; + } else { + return headerBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHeader(google.maps.fleetengine.delivery.v1.DeliveryRequestHeader value) { + if (headerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + header_ = value; + } else { + headerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHeader( + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder builderForValue) { + if (headerBuilder_ == null) { + header_ = builderForValue.build(); + } else { + headerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeHeader(google.maps.fleetengine.delivery.v1.DeliveryRequestHeader value) { + if (headerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && header_ != null + && header_ + != google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance()) { + getHeaderBuilder().mergeFrom(value); + } else { + header_ = value; + } + } else { + headerBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearHeader() { + bitField0_ = (bitField0_ & ~0x00000001); + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder getHeaderBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getHeaderFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder getHeaderOrBuilder() { + if (headerBuilder_ != null) { + return headerBuilder_.getMessageOrBuilder(); + } else { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance() + : header_; + } + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder> + getHeaderFieldBuilder() { + if (headerBuilder_ == null) { + headerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder>( + 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 Google Cloud Project ID.
+     * For example, `sample-cloud-project`.
+     * 
+ * + * + * 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 Google Cloud Project ID.
+     * For example, `sample-cloud-project`.
+     * 
+ * + * + * 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 Google Cloud Project ID.
+     * For example, `sample-cloud-project`.
+     * 
+ * + * + * 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 Google Cloud Project ID.
+     * For example, `sample-cloud-project`.
+     * 
+ * + * + * 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 Google Cloud Project ID.
+     * For example, `sample-cloud-project`.
+     * 
+ * + * + * 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 int pageSize_; + /** + * + * + *
+     * Optional. The maximum number of vehicles to return. The service may return
+     * fewer than this number. If you don't specify this number, then the server
+     * determines the number of results to return.
+     * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. The maximum number of vehicles to return. The service may return
+     * fewer than this number. If you don't specify this number, then the server
+     * determines the number of results to return.
+     * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The maximum number of vehicles to return. The service may return
+     * fewer than this number. If you don't specify this number, then the server
+     * determines the number of results to return.
+     * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000004); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. A page token, received from a previous `ListDeliveryVehicles`
+     * call. You must provide this in order to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListDeliveryVehicles`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+     * Optional. A page token, received from a previous `ListDeliveryVehicles`
+     * call. You must provide this in order to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListDeliveryVehicles`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+     * Optional. A page token, received from a previous `ListDeliveryVehicles`
+     * call. You must provide this in order to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListDeliveryVehicles`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + /** + * + * + *
+     * Optional. A page token, received from a previous `ListDeliveryVehicles`
+     * call. You must provide this in order to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListDeliveryVehicles`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A page token, received from a previous `ListDeliveryVehicles`
+     * call. You must provide this in order to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListDeliveryVehicles`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. A filter query to apply when listing delivery vehicles. See
+     * http://aip.dev/160 for examples of the filter syntax. If you don't specify
+     * a value, or if you specify an empty string for the filter, then all
+     * delivery vehicles are returned.
+     *
+     * Note that the only queries supported for `ListDeliveryVehicles` are
+     * on vehicle attributes (for example, `attributes.<key> = <value>` or
+     * `attributes.<key1> = <value1> AND attributes.<key2> = <value2>`). 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"`).
+     *
+     * The maximum number of restrictions allowed in a filter query is 50. A
+     * restriction is a part of the query of the form
+     * `attribute.<KEY> <COMPARATOR> <VALUE>`, for example `attributes.foo = bar`
+     * is 1 restriction.
+     * 
+ * + * string filter = 6 [(.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 delivery vehicles. See
+     * http://aip.dev/160 for examples of the filter syntax. If you don't specify
+     * a value, or if you specify an empty string for the filter, then all
+     * delivery vehicles are returned.
+     *
+     * Note that the only queries supported for `ListDeliveryVehicles` are
+     * on vehicle attributes (for example, `attributes.<key> = <value>` or
+     * `attributes.<key1> = <value1> AND attributes.<key2> = <value2>`). 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"`).
+     *
+     * The maximum number of restrictions allowed in a filter query is 50. A
+     * restriction is a part of the query of the form
+     * `attribute.<KEY> <COMPARATOR> <VALUE>`, for example `attributes.foo = bar`
+     * is 1 restriction.
+     * 
+ * + * string filter = 6 [(.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 delivery vehicles. See
+     * http://aip.dev/160 for examples of the filter syntax. If you don't specify
+     * a value, or if you specify an empty string for the filter, then all
+     * delivery vehicles are returned.
+     *
+     * Note that the only queries supported for `ListDeliveryVehicles` are
+     * on vehicle attributes (for example, `attributes.<key> = <value>` or
+     * `attributes.<key1> = <value1> AND attributes.<key2> = <value2>`). 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"`).
+     *
+     * The maximum number of restrictions allowed in a filter query is 50. A
+     * restriction is a part of the query of the form
+     * `attribute.<KEY> <COMPARATOR> <VALUE>`, for example `attributes.foo = bar`
+     * is 1 restriction.
+     * 
+ * + * string filter = 6 [(.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_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A filter query to apply when listing delivery vehicles. See
+     * http://aip.dev/160 for examples of the filter syntax. If you don't specify
+     * a value, or if you specify an empty string for the filter, then all
+     * delivery vehicles are returned.
+     *
+     * Note that the only queries supported for `ListDeliveryVehicles` are
+     * on vehicle attributes (for example, `attributes.<key> = <value>` or
+     * `attributes.<key1> = <value1> AND attributes.<key2> = <value2>`). 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"`).
+     *
+     * The maximum number of restrictions allowed in a filter query is 50. A
+     * restriction is a part of the query of the form
+     * `attribute.<KEY> <COMPARATOR> <VALUE>`, for example `attributes.foo = bar`
+     * is 1 restriction.
+     * 
+ * + * string filter = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A filter query to apply when listing delivery vehicles. See
+     * http://aip.dev/160 for examples of the filter syntax. If you don't specify
+     * a value, or if you specify an empty string for the filter, then all
+     * delivery vehicles are returned.
+     *
+     * Note that the only queries supported for `ListDeliveryVehicles` are
+     * on vehicle attributes (for example, `attributes.<key> = <value>` or
+     * `attributes.<key1> = <value1> AND attributes.<key2> = <value2>`). 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"`).
+     *
+     * The maximum number of restrictions allowed in a filter query is 50. A
+     * restriction is a part of the query of the form
+     * `attribute.<KEY> <COMPARATOR> <VALUE>`, for example `attributes.foo = bar`
+     * is 1 restriction.
+     * 
+ * + * string filter = 6 [(.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_ |= 0x00000010; + 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 = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the viewport field is set. + */ + public boolean hasViewport() { + return ((bitField0_ & 0x00000020) != 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 = 7 [(.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 = 7 [(.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_ |= 0x00000020; + 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 = 7 [(.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_ |= 0x00000020; + 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 = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeViewport(com.google.geo.type.Viewport value) { + if (viewportBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && viewport_ != null + && viewport_ != com.google.geo.type.Viewport.getDefaultInstance()) { + getViewportBuilder().mergeFrom(value); + } else { + viewport_ = value; + } + } else { + viewportBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + 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 = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearViewport() { + bitField0_ = (bitField0_ & ~0x00000020); + 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 = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.geo.type.Viewport.Builder getViewportBuilder() { + bitField0_ |= 0x00000020; + 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 = 7 [(.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 = 7 [(.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.delivery.v1.ListDeliveryVehiclesRequest) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest) + private static final google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest(); + } + + public static google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDeliveryVehiclesRequest 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 google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/ListDeliveryVehiclesRequestOrBuilder.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/ListDeliveryVehiclesRequestOrBuilder.java new file mode 100644 index 000000000000..af525b63d8ab --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/ListDeliveryVehiclesRequestOrBuilder.java @@ -0,0 +1,244 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_api.proto + +package google.maps.fleetengine.delivery.v1; + +public interface ListDeliveryVehiclesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the header field is set. + */ + boolean hasHeader(); + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The header. + */ + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader getHeader(); + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder getHeaderOrBuilder(); + + /** + * + * + *
+   * Required. Must be in the format `providers/{provider}`.
+   * The `provider` must be the Google Cloud Project ID.
+   * For example, `sample-cloud-project`.
+   * 
+ * + * + * 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 Google Cloud Project ID.
+   * For example, `sample-cloud-project`.
+   * 
+ * + * + * string parent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of vehicles to return. The service may return
+   * fewer than this number. If you don't specify this number, then the server
+   * determines the number of results to return.
+   * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListDeliveryVehicles`
+   * call. You must provide this in order to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListDeliveryVehicles`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. A page token, received from a previous `ListDeliveryVehicles`
+   * call. You must provide this in order to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListDeliveryVehicles`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. A filter query to apply when listing delivery vehicles. See
+   * http://aip.dev/160 for examples of the filter syntax. If you don't specify
+   * a value, or if you specify an empty string for the filter, then all
+   * delivery vehicles are returned.
+   *
+   * Note that the only queries supported for `ListDeliveryVehicles` are
+   * on vehicle attributes (for example, `attributes.<key> = <value>` or
+   * `attributes.<key1> = <value1> AND attributes.<key2> = <value2>`). 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"`).
+   *
+   * The maximum number of restrictions allowed in a filter query is 50. A
+   * restriction is a part of the query of the form
+   * `attribute.<KEY> <COMPARATOR> <VALUE>`, for example `attributes.foo = bar`
+   * is 1 restriction.
+   * 
+ * + * string filter = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. A filter query to apply when listing delivery vehicles. See
+   * http://aip.dev/160 for examples of the filter syntax. If you don't specify
+   * a value, or if you specify an empty string for the filter, then all
+   * delivery vehicles are returned.
+   *
+   * Note that the only queries supported for `ListDeliveryVehicles` are
+   * on vehicle attributes (for example, `attributes.<key> = <value>` or
+   * `attributes.<key1> = <value1> AND attributes.<key2> = <value2>`). 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"`).
+   *
+   * The maximum number of restrictions allowed in a filter query is 50. A
+   * restriction is a part of the query of the form
+   * `attribute.<KEY> <COMPARATOR> <VALUE>`, for example `attributes.foo = bar`
+   * is 1 restriction.
+   * 
+ * + * string filter = 6 [(.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 = 7 [(.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 = 7 [(.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 = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.geo.type.ViewportOrBuilder getViewportOrBuilder(); +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/ListDeliveryVehiclesResponse.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/ListDeliveryVehiclesResponse.java new file mode 100644 index 000000000000..1801d77ffece --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/ListDeliveryVehiclesResponse.java @@ -0,0 +1,1322 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_api.proto + +package google.maps.fleetengine.delivery.v1; + +/** + * + * + *
+ * The `ListDeliveryVehicles` response message.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse} + */ +public final class ListDeliveryVehiclesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse) + ListDeliveryVehiclesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDeliveryVehiclesResponse.newBuilder() to construct. + private ListDeliveryVehiclesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDeliveryVehiclesResponse() { + deliveryVehicles_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListDeliveryVehiclesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_ListDeliveryVehiclesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_ListDeliveryVehiclesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse.class, + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse.Builder.class); + } + + public static final int DELIVERY_VEHICLES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List deliveryVehicles_; + /** + * + * + *
+   * The set of delivery vehicles that meet the requested filtering criteria.
+   * When no filter is specified, the request returns all delivery vehicles. A
+   * successful response can also be empty. An empty response indicates that no
+   * delivery vehicles were found meeting the requested filter criteria.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicles = 1; + */ + @java.lang.Override + public java.util.List + getDeliveryVehiclesList() { + return deliveryVehicles_; + } + /** + * + * + *
+   * The set of delivery vehicles that meet the requested filtering criteria.
+   * When no filter is specified, the request returns all delivery vehicles. A
+   * successful response can also be empty. An empty response indicates that no
+   * delivery vehicles were found meeting the requested filter criteria.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicles = 1; + */ + @java.lang.Override + public java.util.List + getDeliveryVehiclesOrBuilderList() { + return deliveryVehicles_; + } + /** + * + * + *
+   * The set of delivery vehicles that meet the requested filtering criteria.
+   * When no filter is specified, the request returns all delivery vehicles. A
+   * successful response can also be empty. An empty response indicates that no
+   * delivery vehicles were found meeting the requested filter criteria.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicles = 1; + */ + @java.lang.Override + public int getDeliveryVehiclesCount() { + return deliveryVehicles_.size(); + } + /** + * + * + *
+   * The set of delivery vehicles that meet the requested filtering criteria.
+   * When no filter is specified, the request returns all delivery vehicles. A
+   * successful response can also be empty. An empty response indicates that no
+   * delivery vehicles were found meeting the requested filter criteria.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicles = 1; + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryVehicle getDeliveryVehicles(int index) { + return deliveryVehicles_.get(index); + } + /** + * + * + *
+   * The set of delivery vehicles that meet the requested filtering criteria.
+   * When no filter is specified, the request returns all delivery vehicles. A
+   * successful response can also be empty. An empty response indicates that no
+   * delivery vehicles were found meeting the requested filter criteria.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicles = 1; + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryVehicleOrBuilder getDeliveryVehiclesOrBuilder( + int index) { + return deliveryVehicles_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * You can pass this token in the `ListDeliveryVehiclesRequest` to continue to
+   * list results. When all of the results are returned, this field won't be in
+   * the response, or it will be an empty string.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * You can pass this token in the `ListDeliveryVehiclesRequest` to continue to
+   * list results. When all of the results are returned, this field won't be in
+   * the response, or it will be an empty string.
+   * 
+ * + * 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; + /** + * + * + *
+   * The total number of delivery vehicles that match the request criteria,
+   * across all pages.
+   * 
+ * + * int64 total_size = 3; + * + * @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 < deliveryVehicles_.size(); i++) { + output.writeMessage(1, deliveryVehicles_.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 < deliveryVehicles_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, deliveryVehicles_.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 google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse)) { + return super.equals(obj); + } + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse other = + (google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse) obj; + + if (!getDeliveryVehiclesList().equals(other.getDeliveryVehiclesList())) 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 (getDeliveryVehiclesCount() > 0) { + hash = (37 * hash) + DELIVERY_VEHICLES_FIELD_NUMBER; + hash = (53 * hash) + getDeliveryVehiclesList().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 google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse 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 google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse 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 google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse 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( + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse 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 `ListDeliveryVehicles` response message.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse) + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_ListDeliveryVehiclesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_ListDeliveryVehiclesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse.class, + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse.Builder.class); + } + + // Construct using google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (deliveryVehiclesBuilder_ == null) { + deliveryVehicles_ = java.util.Collections.emptyList(); + } else { + deliveryVehicles_ = null; + deliveryVehiclesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + totalSize_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_ListDeliveryVehiclesResponse_descriptor; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse + getDefaultInstanceForType() { + return google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse.getDefaultInstance(); + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse build() { + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse buildPartial() { + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse result = + new google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse result) { + if (deliveryVehiclesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + deliveryVehicles_ = java.util.Collections.unmodifiableList(deliveryVehicles_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.deliveryVehicles_ = deliveryVehicles_; + } else { + result.deliveryVehicles_ = deliveryVehiclesBuilder_.build(); + } + } + + private void buildPartial0( + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse 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 google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse) { + return mergeFrom((google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse other) { + if (other + == google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse.getDefaultInstance()) + return this; + if (deliveryVehiclesBuilder_ == null) { + if (!other.deliveryVehicles_.isEmpty()) { + if (deliveryVehicles_.isEmpty()) { + deliveryVehicles_ = other.deliveryVehicles_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDeliveryVehiclesIsMutable(); + deliveryVehicles_.addAll(other.deliveryVehicles_); + } + onChanged(); + } + } else { + if (!other.deliveryVehicles_.isEmpty()) { + if (deliveryVehiclesBuilder_.isEmpty()) { + deliveryVehiclesBuilder_.dispose(); + deliveryVehiclesBuilder_ = null; + deliveryVehicles_ = other.deliveryVehicles_; + bitField0_ = (bitField0_ & ~0x00000001); + deliveryVehiclesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDeliveryVehiclesFieldBuilder() + : null; + } else { + deliveryVehiclesBuilder_.addAllMessages(other.deliveryVehicles_); + } + } + } + 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: + { + google.maps.fleetengine.delivery.v1.DeliveryVehicle m = + input.readMessage( + google.maps.fleetengine.delivery.v1.DeliveryVehicle.parser(), + extensionRegistry); + if (deliveryVehiclesBuilder_ == null) { + ensureDeliveryVehiclesIsMutable(); + deliveryVehicles_.add(m); + } else { + deliveryVehiclesBuilder_.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 deliveryVehicles_ = + java.util.Collections.emptyList(); + + private void ensureDeliveryVehiclesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + deliveryVehicles_ = + new java.util.ArrayList( + deliveryVehicles_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryVehicle, + google.maps.fleetengine.delivery.v1.DeliveryVehicle.Builder, + google.maps.fleetengine.delivery.v1.DeliveryVehicleOrBuilder> + deliveryVehiclesBuilder_; + + /** + * + * + *
+     * The set of delivery vehicles that meet the requested filtering criteria.
+     * When no filter is specified, the request returns all delivery vehicles. A
+     * successful response can also be empty. An empty response indicates that no
+     * delivery vehicles were found meeting the requested filter criteria.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicles = 1; + */ + public java.util.List + getDeliveryVehiclesList() { + if (deliveryVehiclesBuilder_ == null) { + return java.util.Collections.unmodifiableList(deliveryVehicles_); + } else { + return deliveryVehiclesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The set of delivery vehicles that meet the requested filtering criteria.
+     * When no filter is specified, the request returns all delivery vehicles. A
+     * successful response can also be empty. An empty response indicates that no
+     * delivery vehicles were found meeting the requested filter criteria.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicles = 1; + */ + public int getDeliveryVehiclesCount() { + if (deliveryVehiclesBuilder_ == null) { + return deliveryVehicles_.size(); + } else { + return deliveryVehiclesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The set of delivery vehicles that meet the requested filtering criteria.
+     * When no filter is specified, the request returns all delivery vehicles. A
+     * successful response can also be empty. An empty response indicates that no
+     * delivery vehicles were found meeting the requested filter criteria.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicles = 1; + */ + public google.maps.fleetengine.delivery.v1.DeliveryVehicle getDeliveryVehicles(int index) { + if (deliveryVehiclesBuilder_ == null) { + return deliveryVehicles_.get(index); + } else { + return deliveryVehiclesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The set of delivery vehicles that meet the requested filtering criteria.
+     * When no filter is specified, the request returns all delivery vehicles. A
+     * successful response can also be empty. An empty response indicates that no
+     * delivery vehicles were found meeting the requested filter criteria.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicles = 1; + */ + public Builder setDeliveryVehicles( + int index, google.maps.fleetengine.delivery.v1.DeliveryVehicle value) { + if (deliveryVehiclesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeliveryVehiclesIsMutable(); + deliveryVehicles_.set(index, value); + onChanged(); + } else { + deliveryVehiclesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The set of delivery vehicles that meet the requested filtering criteria.
+     * When no filter is specified, the request returns all delivery vehicles. A
+     * successful response can also be empty. An empty response indicates that no
+     * delivery vehicles were found meeting the requested filter criteria.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicles = 1; + */ + public Builder setDeliveryVehicles( + int index, google.maps.fleetengine.delivery.v1.DeliveryVehicle.Builder builderForValue) { + if (deliveryVehiclesBuilder_ == null) { + ensureDeliveryVehiclesIsMutable(); + deliveryVehicles_.set(index, builderForValue.build()); + onChanged(); + } else { + deliveryVehiclesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The set of delivery vehicles that meet the requested filtering criteria.
+     * When no filter is specified, the request returns all delivery vehicles. A
+     * successful response can also be empty. An empty response indicates that no
+     * delivery vehicles were found meeting the requested filter criteria.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicles = 1; + */ + public Builder addDeliveryVehicles(google.maps.fleetengine.delivery.v1.DeliveryVehicle value) { + if (deliveryVehiclesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeliveryVehiclesIsMutable(); + deliveryVehicles_.add(value); + onChanged(); + } else { + deliveryVehiclesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The set of delivery vehicles that meet the requested filtering criteria.
+     * When no filter is specified, the request returns all delivery vehicles. A
+     * successful response can also be empty. An empty response indicates that no
+     * delivery vehicles were found meeting the requested filter criteria.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicles = 1; + */ + public Builder addDeliveryVehicles( + int index, google.maps.fleetengine.delivery.v1.DeliveryVehicle value) { + if (deliveryVehiclesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeliveryVehiclesIsMutable(); + deliveryVehicles_.add(index, value); + onChanged(); + } else { + deliveryVehiclesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The set of delivery vehicles that meet the requested filtering criteria.
+     * When no filter is specified, the request returns all delivery vehicles. A
+     * successful response can also be empty. An empty response indicates that no
+     * delivery vehicles were found meeting the requested filter criteria.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicles = 1; + */ + public Builder addDeliveryVehicles( + google.maps.fleetengine.delivery.v1.DeliveryVehicle.Builder builderForValue) { + if (deliveryVehiclesBuilder_ == null) { + ensureDeliveryVehiclesIsMutable(); + deliveryVehicles_.add(builderForValue.build()); + onChanged(); + } else { + deliveryVehiclesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The set of delivery vehicles that meet the requested filtering criteria.
+     * When no filter is specified, the request returns all delivery vehicles. A
+     * successful response can also be empty. An empty response indicates that no
+     * delivery vehicles were found meeting the requested filter criteria.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicles = 1; + */ + public Builder addDeliveryVehicles( + int index, google.maps.fleetengine.delivery.v1.DeliveryVehicle.Builder builderForValue) { + if (deliveryVehiclesBuilder_ == null) { + ensureDeliveryVehiclesIsMutable(); + deliveryVehicles_.add(index, builderForValue.build()); + onChanged(); + } else { + deliveryVehiclesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The set of delivery vehicles that meet the requested filtering criteria.
+     * When no filter is specified, the request returns all delivery vehicles. A
+     * successful response can also be empty. An empty response indicates that no
+     * delivery vehicles were found meeting the requested filter criteria.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicles = 1; + */ + public Builder addAllDeliveryVehicles( + java.lang.Iterable values) { + if (deliveryVehiclesBuilder_ == null) { + ensureDeliveryVehiclesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deliveryVehicles_); + onChanged(); + } else { + deliveryVehiclesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The set of delivery vehicles that meet the requested filtering criteria.
+     * When no filter is specified, the request returns all delivery vehicles. A
+     * successful response can also be empty. An empty response indicates that no
+     * delivery vehicles were found meeting the requested filter criteria.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicles = 1; + */ + public Builder clearDeliveryVehicles() { + if (deliveryVehiclesBuilder_ == null) { + deliveryVehicles_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + deliveryVehiclesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The set of delivery vehicles that meet the requested filtering criteria.
+     * When no filter is specified, the request returns all delivery vehicles. A
+     * successful response can also be empty. An empty response indicates that no
+     * delivery vehicles were found meeting the requested filter criteria.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicles = 1; + */ + public Builder removeDeliveryVehicles(int index) { + if (deliveryVehiclesBuilder_ == null) { + ensureDeliveryVehiclesIsMutable(); + deliveryVehicles_.remove(index); + onChanged(); + } else { + deliveryVehiclesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The set of delivery vehicles that meet the requested filtering criteria.
+     * When no filter is specified, the request returns all delivery vehicles. A
+     * successful response can also be empty. An empty response indicates that no
+     * delivery vehicles were found meeting the requested filter criteria.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicles = 1; + */ + public google.maps.fleetengine.delivery.v1.DeliveryVehicle.Builder getDeliveryVehiclesBuilder( + int index) { + return getDeliveryVehiclesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The set of delivery vehicles that meet the requested filtering criteria.
+     * When no filter is specified, the request returns all delivery vehicles. A
+     * successful response can also be empty. An empty response indicates that no
+     * delivery vehicles were found meeting the requested filter criteria.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicles = 1; + */ + public google.maps.fleetengine.delivery.v1.DeliveryVehicleOrBuilder + getDeliveryVehiclesOrBuilder(int index) { + if (deliveryVehiclesBuilder_ == null) { + return deliveryVehicles_.get(index); + } else { + return deliveryVehiclesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The set of delivery vehicles that meet the requested filtering criteria.
+     * When no filter is specified, the request returns all delivery vehicles. A
+     * successful response can also be empty. An empty response indicates that no
+     * delivery vehicles were found meeting the requested filter criteria.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicles = 1; + */ + public java.util.List + getDeliveryVehiclesOrBuilderList() { + if (deliveryVehiclesBuilder_ != null) { + return deliveryVehiclesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(deliveryVehicles_); + } + } + /** + * + * + *
+     * The set of delivery vehicles that meet the requested filtering criteria.
+     * When no filter is specified, the request returns all delivery vehicles. A
+     * successful response can also be empty. An empty response indicates that no
+     * delivery vehicles were found meeting the requested filter criteria.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicles = 1; + */ + public google.maps.fleetengine.delivery.v1.DeliveryVehicle.Builder + addDeliveryVehiclesBuilder() { + return getDeliveryVehiclesFieldBuilder() + .addBuilder(google.maps.fleetengine.delivery.v1.DeliveryVehicle.getDefaultInstance()); + } + /** + * + * + *
+     * The set of delivery vehicles that meet the requested filtering criteria.
+     * When no filter is specified, the request returns all delivery vehicles. A
+     * successful response can also be empty. An empty response indicates that no
+     * delivery vehicles were found meeting the requested filter criteria.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicles = 1; + */ + public google.maps.fleetengine.delivery.v1.DeliveryVehicle.Builder addDeliveryVehiclesBuilder( + int index) { + return getDeliveryVehiclesFieldBuilder() + .addBuilder( + index, google.maps.fleetengine.delivery.v1.DeliveryVehicle.getDefaultInstance()); + } + /** + * + * + *
+     * The set of delivery vehicles that meet the requested filtering criteria.
+     * When no filter is specified, the request returns all delivery vehicles. A
+     * successful response can also be empty. An empty response indicates that no
+     * delivery vehicles were found meeting the requested filter criteria.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicles = 1; + */ + public java.util.List + getDeliveryVehiclesBuilderList() { + return getDeliveryVehiclesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryVehicle, + google.maps.fleetengine.delivery.v1.DeliveryVehicle.Builder, + google.maps.fleetengine.delivery.v1.DeliveryVehicleOrBuilder> + getDeliveryVehiclesFieldBuilder() { + if (deliveryVehiclesBuilder_ == null) { + deliveryVehiclesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryVehicle, + google.maps.fleetengine.delivery.v1.DeliveryVehicle.Builder, + google.maps.fleetengine.delivery.v1.DeliveryVehicleOrBuilder>( + deliveryVehicles_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + deliveryVehicles_ = null; + } + return deliveryVehiclesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * You can pass this token in the `ListDeliveryVehiclesRequest` to continue to
+     * list results. When all of the results are returned, this field won't be in
+     * the response, or it will be an empty string.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * You can pass this token in the `ListDeliveryVehiclesRequest` to continue to
+     * list results. When all of the results are returned, this field won't be in
+     * the response, or it will be an empty string.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * You can pass this token in the `ListDeliveryVehiclesRequest` to continue to
+     * list results. When all of the results are returned, this field won't be in
+     * the response, or it will be an empty string.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * You can pass this token in the `ListDeliveryVehiclesRequest` to continue to
+     * list results. When all of the results are returned, this field won't be in
+     * the response, or it will be an empty string.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * You can pass this token in the `ListDeliveryVehiclesRequest` to continue to
+     * list results. When all of the results are returned, this field won't be in
+     * the response, or it will be an empty string.
+     * 
+ * + * 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_; + /** + * + * + *
+     * The total number of delivery vehicles that match the request criteria,
+     * across all pages.
+     * 
+ * + * int64 total_size = 3; + * + * @return The totalSize. + */ + @java.lang.Override + public long getTotalSize() { + return totalSize_; + } + /** + * + * + *
+     * The total number of delivery vehicles that match the request criteria,
+     * across all pages.
+     * 
+ * + * int64 total_size = 3; + * + * @param value The totalSize to set. + * @return This builder for chaining. + */ + public Builder setTotalSize(long value) { + + totalSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The total number of delivery vehicles that match the request criteria,
+     * across all pages.
+     * 
+ * + * int64 total_size = 3; + * + * @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.delivery.v1.ListDeliveryVehiclesResponse) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse) + private static final google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse(); + } + + public static google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDeliveryVehiclesResponse 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 google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/ListDeliveryVehiclesResponseOrBuilder.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/ListDeliveryVehiclesResponseOrBuilder.java new file mode 100644 index 000000000000..0e8511ee2521 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/ListDeliveryVehiclesResponseOrBuilder.java @@ -0,0 +1,136 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_api.proto + +package google.maps.fleetengine.delivery.v1; + +public interface ListDeliveryVehiclesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The set of delivery vehicles that meet the requested filtering criteria.
+   * When no filter is specified, the request returns all delivery vehicles. A
+   * successful response can also be empty. An empty response indicates that no
+   * delivery vehicles were found meeting the requested filter criteria.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicles = 1; + */ + java.util.List getDeliveryVehiclesList(); + /** + * + * + *
+   * The set of delivery vehicles that meet the requested filtering criteria.
+   * When no filter is specified, the request returns all delivery vehicles. A
+   * successful response can also be empty. An empty response indicates that no
+   * delivery vehicles were found meeting the requested filter criteria.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicles = 1; + */ + google.maps.fleetengine.delivery.v1.DeliveryVehicle getDeliveryVehicles(int index); + /** + * + * + *
+   * The set of delivery vehicles that meet the requested filtering criteria.
+   * When no filter is specified, the request returns all delivery vehicles. A
+   * successful response can also be empty. An empty response indicates that no
+   * delivery vehicles were found meeting the requested filter criteria.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicles = 1; + */ + int getDeliveryVehiclesCount(); + /** + * + * + *
+   * The set of delivery vehicles that meet the requested filtering criteria.
+   * When no filter is specified, the request returns all delivery vehicles. A
+   * successful response can also be empty. An empty response indicates that no
+   * delivery vehicles were found meeting the requested filter criteria.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicles = 1; + */ + java.util.List + getDeliveryVehiclesOrBuilderList(); + /** + * + * + *
+   * The set of delivery vehicles that meet the requested filtering criteria.
+   * When no filter is specified, the request returns all delivery vehicles. A
+   * successful response can also be empty. An empty response indicates that no
+   * delivery vehicles were found meeting the requested filter criteria.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicles = 1; + */ + google.maps.fleetengine.delivery.v1.DeliveryVehicleOrBuilder getDeliveryVehiclesOrBuilder( + int index); + + /** + * + * + *
+   * You can pass this token in the `ListDeliveryVehiclesRequest` to continue to
+   * list results. When all of the results are returned, this field won't be in
+   * the response, or it will be an empty string.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * You can pass this token in the `ListDeliveryVehiclesRequest` to continue to
+   * list results. When all of the results are returned, this field won't be in
+   * the response, or it will be an empty string.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * The total number of delivery vehicles that match the request criteria,
+   * across all pages.
+   * 
+ * + * int64 total_size = 3; + * + * @return The totalSize. + */ + long getTotalSize(); +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/ListTasksRequest.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/ListTasksRequest.java new file mode 100644 index 000000000000..93bc22dd6c5d --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/ListTasksRequest.java @@ -0,0 +1,1463 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_api.proto + +package google.maps.fleetengine.delivery.v1; + +/** + * + * + *
+ * The `ListTasks` request message.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.ListTasksRequest} + */ +public final class ListTasksRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.delivery.v1.ListTasksRequest) + ListTasksRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListTasksRequest.newBuilder() to construct. + private ListTasksRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListTasksRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListTasksRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_ListTasksRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_ListTasksRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.ListTasksRequest.class, + google.maps.fleetengine.delivery.v1.ListTasksRequest.Builder.class); + } + + public static final int HEADER_FIELD_NUMBER = 1; + private google.maps.fleetengine.delivery.v1.DeliveryRequestHeader header_; + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the header field is set. + */ + @java.lang.Override + public boolean hasHeader() { + return header_ != null; + } + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The header. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader getHeader() { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance() + : header_; + } + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder getHeaderOrBuilder() { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.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 Google Cloud Project ID. For example,
+   * `sample-cloud-project`.
+   * 
+ * + * + * 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 Google Cloud Project ID. For example,
+   * `sample-cloud-project`.
+   * 
+ * + * + * 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 PAGE_SIZE_FIELD_NUMBER = 4; + private int pageSize_ = 0; + /** + * + * + *
+   * Optional. The maximum number of Tasks to return. The service may return
+   * fewer than this value. If you don't specify this value, then the server
+   * determines the number of results to return.
+   * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * Optional. A page token received from a previous `ListTasks` call.
+   * You can provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListTasks` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+   * Optional. A page token received from a previous `ListTasks` call.
+   * You can provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListTasks` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 FILTER_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Optional. A filter query to apply when listing Tasks. See
+   * http://aip.dev/160 for examples of filter syntax. If you don't specify a
+   * value, or if you filter on an empty string, then all Tasks are returned.
+   * For information about the Task properties that you can filter on, see [Task
+   * list](/maps/documentation/transportation-logistics/last-mile-fleet-solution/fleet-performance/fleet-engine/deliveries_api#list_tasks).
+   * 
+ * + * string filter = 6 [(.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 Tasks. See
+   * http://aip.dev/160 for examples of filter syntax. If you don't specify a
+   * value, or if you filter on an empty string, then all Tasks are returned.
+   * For information about the Task properties that you can filter on, see [Task
+   * list](/maps/documentation/transportation-logistics/last-mile-fleet-solution/fleet-performance/fleet-engine/deliveries_api#list_tasks).
+   * 
+ * + * string filter = 6 [(.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 { + if (header_ != null) { + output.writeMessage(1, getHeader()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(4, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, filter_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (header_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getHeader()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, 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 google.maps.fleetengine.delivery.v1.ListTasksRequest)) { + return super.equals(obj); + } + google.maps.fleetengine.delivery.v1.ListTasksRequest other = + (google.maps.fleetengine.delivery.v1.ListTasksRequest) 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 (!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(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.maps.fleetengine.delivery.v1.ListTasksRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.ListTasksRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.ListTasksRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.ListTasksRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.ListTasksRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.ListTasksRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.ListTasksRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.ListTasksRequest 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 google.maps.fleetengine.delivery.v1.ListTasksRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.ListTasksRequest 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 google.maps.fleetengine.delivery.v1.ListTasksRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.ListTasksRequest 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(google.maps.fleetengine.delivery.v1.ListTasksRequest 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 `ListTasks` request message.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.ListTasksRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.delivery.v1.ListTasksRequest) + google.maps.fleetengine.delivery.v1.ListTasksRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_ListTasksRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_ListTasksRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.ListTasksRequest.class, + google.maps.fleetengine.delivery.v1.ListTasksRequest.Builder.class); + } + + // Construct using google.maps.fleetengine.delivery.v1.ListTasksRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_ListTasksRequest_descriptor; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.ListTasksRequest getDefaultInstanceForType() { + return google.maps.fleetengine.delivery.v1.ListTasksRequest.getDefaultInstance(); + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.ListTasksRequest build() { + google.maps.fleetengine.delivery.v1.ListTasksRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.ListTasksRequest buildPartial() { + google.maps.fleetengine.delivery.v1.ListTasksRequest result = + new google.maps.fleetengine.delivery.v1.ListTasksRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(google.maps.fleetengine.delivery.v1.ListTasksRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.header_ = headerBuilder_ == null ? header_ : headerBuilder_.build(); + } + 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.filter_ = filter_; + } + } + + @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 google.maps.fleetengine.delivery.v1.ListTasksRequest) { + return mergeFrom((google.maps.fleetengine.delivery.v1.ListTasksRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.maps.fleetengine.delivery.v1.ListTasksRequest other) { + if (other == google.maps.fleetengine.delivery.v1.ListTasksRequest.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.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000010; + 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 32: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 32 + case 42: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 42 + case 50: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private google.maps.fleetengine.delivery.v1.DeliveryRequestHeader header_; + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder> + headerBuilder_; + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the header field is set. + */ + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The header. + */ + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader getHeader() { + if (headerBuilder_ == null) { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance() + : header_; + } else { + return headerBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHeader(google.maps.fleetengine.delivery.v1.DeliveryRequestHeader value) { + if (headerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + header_ = value; + } else { + headerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHeader( + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder builderForValue) { + if (headerBuilder_ == null) { + header_ = builderForValue.build(); + } else { + headerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeHeader(google.maps.fleetengine.delivery.v1.DeliveryRequestHeader value) { + if (headerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && header_ != null + && header_ + != google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance()) { + getHeaderBuilder().mergeFrom(value); + } else { + header_ = value; + } + } else { + headerBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearHeader() { + bitField0_ = (bitField0_ & ~0x00000001); + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder getHeaderBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getHeaderFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder getHeaderOrBuilder() { + if (headerBuilder_ != null) { + return headerBuilder_.getMessageOrBuilder(); + } else { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance() + : header_; + } + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder> + getHeaderFieldBuilder() { + if (headerBuilder_ == null) { + headerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder>( + 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 Google Cloud Project ID. For example,
+     * `sample-cloud-project`.
+     * 
+ * + * + * 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 Google Cloud Project ID. For example,
+     * `sample-cloud-project`.
+     * 
+ * + * + * 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 Google Cloud Project ID. For example,
+     * `sample-cloud-project`.
+     * 
+ * + * + * 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 Google Cloud Project ID. For example,
+     * `sample-cloud-project`.
+     * 
+ * + * + * 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 Google Cloud Project ID. For example,
+     * `sample-cloud-project`.
+     * 
+ * + * + * 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 int pageSize_; + /** + * + * + *
+     * Optional. The maximum number of Tasks to return. The service may return
+     * fewer than this value. If you don't specify this value, then the server
+     * determines the number of results to return.
+     * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. The maximum number of Tasks to return. The service may return
+     * fewer than this value. If you don't specify this value, then the server
+     * determines the number of results to return.
+     * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The maximum number of Tasks to return. The service may return
+     * fewer than this value. If you don't specify this value, then the server
+     * determines the number of results to return.
+     * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000004); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. A page token received from a previous `ListTasks` call.
+     * You can provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListTasks` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+     * Optional. A page token received from a previous `ListTasks` call.
+     * You can provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListTasks` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+     * Optional. A page token received from a previous `ListTasks` call.
+     * You can provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListTasks` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + /** + * + * + *
+     * Optional. A page token received from a previous `ListTasks` call.
+     * You can provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListTasks` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A page token received from a previous `ListTasks` call.
+     * You can provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListTasks` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. A filter query to apply when listing Tasks. See
+     * http://aip.dev/160 for examples of filter syntax. If you don't specify a
+     * value, or if you filter on an empty string, then all Tasks are returned.
+     * For information about the Task properties that you can filter on, see [Task
+     * list](/maps/documentation/transportation-logistics/last-mile-fleet-solution/fleet-performance/fleet-engine/deliveries_api#list_tasks).
+     * 
+ * + * string filter = 6 [(.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 Tasks. See
+     * http://aip.dev/160 for examples of filter syntax. If you don't specify a
+     * value, or if you filter on an empty string, then all Tasks are returned.
+     * For information about the Task properties that you can filter on, see [Task
+     * list](/maps/documentation/transportation-logistics/last-mile-fleet-solution/fleet-performance/fleet-engine/deliveries_api#list_tasks).
+     * 
+ * + * string filter = 6 [(.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 Tasks. See
+     * http://aip.dev/160 for examples of filter syntax. If you don't specify a
+     * value, or if you filter on an empty string, then all Tasks are returned.
+     * For information about the Task properties that you can filter on, see [Task
+     * list](/maps/documentation/transportation-logistics/last-mile-fleet-solution/fleet-performance/fleet-engine/deliveries_api#list_tasks).
+     * 
+ * + * string filter = 6 [(.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_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A filter query to apply when listing Tasks. See
+     * http://aip.dev/160 for examples of filter syntax. If you don't specify a
+     * value, or if you filter on an empty string, then all Tasks are returned.
+     * For information about the Task properties that you can filter on, see [Task
+     * list](/maps/documentation/transportation-logistics/last-mile-fleet-solution/fleet-performance/fleet-engine/deliveries_api#list_tasks).
+     * 
+ * + * string filter = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A filter query to apply when listing Tasks. See
+     * http://aip.dev/160 for examples of filter syntax. If you don't specify a
+     * value, or if you filter on an empty string, then all Tasks are returned.
+     * For information about the Task properties that you can filter on, see [Task
+     * list](/maps/documentation/transportation-logistics/last-mile-fleet-solution/fleet-performance/fleet-engine/deliveries_api#list_tasks).
+     * 
+ * + * string filter = 6 [(.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_ |= 0x00000010; + 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.delivery.v1.ListTasksRequest) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.delivery.v1.ListTasksRequest) + private static final google.maps.fleetengine.delivery.v1.ListTasksRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new google.maps.fleetengine.delivery.v1.ListTasksRequest(); + } + + public static google.maps.fleetengine.delivery.v1.ListTasksRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTasksRequest 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 google.maps.fleetengine.delivery.v1.ListTasksRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/ListTasksRequestOrBuilder.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/ListTasksRequestOrBuilder.java new file mode 100644 index 000000000000..e6f7f10cc0c4 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/ListTasksRequestOrBuilder.java @@ -0,0 +1,180 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_api.proto + +package google.maps.fleetengine.delivery.v1; + +public interface ListTasksRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.delivery.v1.ListTasksRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the header field is set. + */ + boolean hasHeader(); + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The header. + */ + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader getHeader(); + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder getHeaderOrBuilder(); + + /** + * + * + *
+   * Required. Must be in the format `providers/{provider}`.
+   * The `provider` must be the Google Cloud Project ID. For example,
+   * `sample-cloud-project`.
+   * 
+ * + * + * 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 Google Cloud Project ID. For example,
+   * `sample-cloud-project`.
+   * 
+ * + * + * string parent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of Tasks to return. The service may return
+   * fewer than this value. If you don't specify this value, then the server
+   * determines the number of results to return.
+   * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token received from a previous `ListTasks` call.
+   * You can provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListTasks` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. A page token received from a previous `ListTasks` call.
+   * You can provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListTasks` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. A filter query to apply when listing Tasks. See
+   * http://aip.dev/160 for examples of filter syntax. If you don't specify a
+   * value, or if you filter on an empty string, then all Tasks are returned.
+   * For information about the Task properties that you can filter on, see [Task
+   * list](/maps/documentation/transportation-logistics/last-mile-fleet-solution/fleet-performance/fleet-engine/deliveries_api#list_tasks).
+   * 
+ * + * string filter = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. A filter query to apply when listing Tasks. See
+   * http://aip.dev/160 for examples of filter syntax. If you don't specify a
+   * value, or if you filter on an empty string, then all Tasks are returned.
+   * For information about the Task properties that you can filter on, see [Task
+   * list](/maps/documentation/transportation-logistics/last-mile-fleet-solution/fleet-performance/fleet-engine/deliveries_api#list_tasks).
+   * 
+ * + * string filter = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/ListTasksResponse.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/ListTasksResponse.java new file mode 100644 index 000000000000..114dbab32501 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/ListTasksResponse.java @@ -0,0 +1,1299 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_api.proto + +package google.maps.fleetengine.delivery.v1; + +/** + * + * + *
+ * The `ListTasks` response that contains the set of Tasks that meet the filter
+ * criteria in the `ListTasksRequest`.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.ListTasksResponse} + */ +public final class ListTasksResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.delivery.v1.ListTasksResponse) + ListTasksResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListTasksResponse.newBuilder() to construct. + private ListTasksResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListTasksResponse() { + tasks_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListTasksResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_ListTasksResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_ListTasksResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.ListTasksResponse.class, + google.maps.fleetengine.delivery.v1.ListTasksResponse.Builder.class); + } + + public static final int TASKS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List tasks_; + /** + * + * + *
+   * The set of Tasks that meet the requested filtering criteria. When no filter
+   * is specified, the request returns all tasks. A successful response can also
+   * be empty. An empty response indicates that no Tasks were found meeting the
+   * requested filter criteria.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + @java.lang.Override + public java.util.List getTasksList() { + return tasks_; + } + /** + * + * + *
+   * The set of Tasks that meet the requested filtering criteria. When no filter
+   * is specified, the request returns all tasks. A successful response can also
+   * be empty. An empty response indicates that no Tasks were found meeting the
+   * requested filter criteria.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + @java.lang.Override + public java.util.List + getTasksOrBuilderList() { + return tasks_; + } + /** + * + * + *
+   * The set of Tasks that meet the requested filtering criteria. When no filter
+   * is specified, the request returns all tasks. A successful response can also
+   * be empty. An empty response indicates that no Tasks were found meeting the
+   * requested filter criteria.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + @java.lang.Override + public int getTasksCount() { + return tasks_.size(); + } + /** + * + * + *
+   * The set of Tasks that meet the requested filtering criteria. When no filter
+   * is specified, the request returns all tasks. A successful response can also
+   * be empty. An empty response indicates that no Tasks were found meeting the
+   * requested filter criteria.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.Task getTasks(int index) { + return tasks_.get(index); + } + /** + * + * + *
+   * The set of Tasks that meet the requested filtering criteria. When no filter
+   * is specified, the request returns all tasks. A successful response can also
+   * be empty. An empty response indicates that no Tasks were found meeting the
+   * requested filter criteria.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TaskOrBuilder getTasksOrBuilder(int index) { + return tasks_.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 `ListTasksRequest` to continue to list results.
+   * If all results have been returned, then this field is either an empty
+   * string, or it doesn't appear in the response.
+   * 
+ * + * 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 `ListTasksRequest` to continue to list results.
+   * If all results have been returned, then this field is either an empty
+   * string, or it doesn't appear in the response.
+   * 
+ * + * 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; + /** + * + * + *
+   * The total number of Tasks that match the request criteria, across all
+   * pages.
+   * 
+ * + * int64 total_size = 3; + * + * @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 < tasks_.size(); i++) { + output.writeMessage(1, tasks_.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 < tasks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, tasks_.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 google.maps.fleetengine.delivery.v1.ListTasksResponse)) { + return super.equals(obj); + } + google.maps.fleetengine.delivery.v1.ListTasksResponse other = + (google.maps.fleetengine.delivery.v1.ListTasksResponse) obj; + + if (!getTasksList().equals(other.getTasksList())) 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 (getTasksCount() > 0) { + hash = (37 * hash) + TASKS_FIELD_NUMBER; + hash = (53 * hash) + getTasksList().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 google.maps.fleetengine.delivery.v1.ListTasksResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.ListTasksResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.ListTasksResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.ListTasksResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.ListTasksResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.ListTasksResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.ListTasksResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.ListTasksResponse 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 google.maps.fleetengine.delivery.v1.ListTasksResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.ListTasksResponse 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 google.maps.fleetengine.delivery.v1.ListTasksResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.ListTasksResponse 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( + google.maps.fleetengine.delivery.v1.ListTasksResponse 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 `ListTasks` response that contains the set of Tasks that meet the filter
+   * criteria in the `ListTasksRequest`.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.ListTasksResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.delivery.v1.ListTasksResponse) + google.maps.fleetengine.delivery.v1.ListTasksResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_ListTasksResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_ListTasksResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.ListTasksResponse.class, + google.maps.fleetengine.delivery.v1.ListTasksResponse.Builder.class); + } + + // Construct using google.maps.fleetengine.delivery.v1.ListTasksResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (tasksBuilder_ == null) { + tasks_ = java.util.Collections.emptyList(); + } else { + tasks_ = null; + tasksBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + totalSize_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_ListTasksResponse_descriptor; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.ListTasksResponse getDefaultInstanceForType() { + return google.maps.fleetengine.delivery.v1.ListTasksResponse.getDefaultInstance(); + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.ListTasksResponse build() { + google.maps.fleetengine.delivery.v1.ListTasksResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.ListTasksResponse buildPartial() { + google.maps.fleetengine.delivery.v1.ListTasksResponse result = + new google.maps.fleetengine.delivery.v1.ListTasksResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + google.maps.fleetengine.delivery.v1.ListTasksResponse result) { + if (tasksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + tasks_ = java.util.Collections.unmodifiableList(tasks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tasks_ = tasks_; + } else { + result.tasks_ = tasksBuilder_.build(); + } + } + + private void buildPartial0(google.maps.fleetengine.delivery.v1.ListTasksResponse 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 google.maps.fleetengine.delivery.v1.ListTasksResponse) { + return mergeFrom((google.maps.fleetengine.delivery.v1.ListTasksResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.maps.fleetengine.delivery.v1.ListTasksResponse other) { + if (other == google.maps.fleetengine.delivery.v1.ListTasksResponse.getDefaultInstance()) + return this; + if (tasksBuilder_ == null) { + if (!other.tasks_.isEmpty()) { + if (tasks_.isEmpty()) { + tasks_ = other.tasks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTasksIsMutable(); + tasks_.addAll(other.tasks_); + } + onChanged(); + } + } else { + if (!other.tasks_.isEmpty()) { + if (tasksBuilder_.isEmpty()) { + tasksBuilder_.dispose(); + tasksBuilder_ = null; + tasks_ = other.tasks_; + bitField0_ = (bitField0_ & ~0x00000001); + tasksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTasksFieldBuilder() + : null; + } else { + tasksBuilder_.addAllMessages(other.tasks_); + } + } + } + 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: + { + google.maps.fleetengine.delivery.v1.Task m = + input.readMessage( + google.maps.fleetengine.delivery.v1.Task.parser(), extensionRegistry); + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + tasks_.add(m); + } else { + tasksBuilder_.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 tasks_ = + java.util.Collections.emptyList(); + + private void ensureTasksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + tasks_ = new java.util.ArrayList(tasks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + google.maps.fleetengine.delivery.v1.Task, + google.maps.fleetengine.delivery.v1.Task.Builder, + google.maps.fleetengine.delivery.v1.TaskOrBuilder> + tasksBuilder_; + + /** + * + * + *
+     * The set of Tasks that meet the requested filtering criteria. When no filter
+     * is specified, the request returns all tasks. A successful response can also
+     * be empty. An empty response indicates that no Tasks were found meeting the
+     * requested filter criteria.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public java.util.List getTasksList() { + if (tasksBuilder_ == null) { + return java.util.Collections.unmodifiableList(tasks_); + } else { + return tasksBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The set of Tasks that meet the requested filtering criteria. When no filter
+     * is specified, the request returns all tasks. A successful response can also
+     * be empty. An empty response indicates that no Tasks were found meeting the
+     * requested filter criteria.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public int getTasksCount() { + if (tasksBuilder_ == null) { + return tasks_.size(); + } else { + return tasksBuilder_.getCount(); + } + } + /** + * + * + *
+     * The set of Tasks that meet the requested filtering criteria. When no filter
+     * is specified, the request returns all tasks. A successful response can also
+     * be empty. An empty response indicates that no Tasks were found meeting the
+     * requested filter criteria.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public google.maps.fleetengine.delivery.v1.Task getTasks(int index) { + if (tasksBuilder_ == null) { + return tasks_.get(index); + } else { + return tasksBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The set of Tasks that meet the requested filtering criteria. When no filter
+     * is specified, the request returns all tasks. A successful response can also
+     * be empty. An empty response indicates that no Tasks were found meeting the
+     * requested filter criteria.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public Builder setTasks(int index, google.maps.fleetengine.delivery.v1.Task value) { + if (tasksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTasksIsMutable(); + tasks_.set(index, value); + onChanged(); + } else { + tasksBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The set of Tasks that meet the requested filtering criteria. When no filter
+     * is specified, the request returns all tasks. A successful response can also
+     * be empty. An empty response indicates that no Tasks were found meeting the
+     * requested filter criteria.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public Builder setTasks( + int index, google.maps.fleetengine.delivery.v1.Task.Builder builderForValue) { + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + tasks_.set(index, builderForValue.build()); + onChanged(); + } else { + tasksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The set of Tasks that meet the requested filtering criteria. When no filter
+     * is specified, the request returns all tasks. A successful response can also
+     * be empty. An empty response indicates that no Tasks were found meeting the
+     * requested filter criteria.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public Builder addTasks(google.maps.fleetengine.delivery.v1.Task value) { + if (tasksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTasksIsMutable(); + tasks_.add(value); + onChanged(); + } else { + tasksBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The set of Tasks that meet the requested filtering criteria. When no filter
+     * is specified, the request returns all tasks. A successful response can also
+     * be empty. An empty response indicates that no Tasks were found meeting the
+     * requested filter criteria.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public Builder addTasks(int index, google.maps.fleetengine.delivery.v1.Task value) { + if (tasksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTasksIsMutable(); + tasks_.add(index, value); + onChanged(); + } else { + tasksBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The set of Tasks that meet the requested filtering criteria. When no filter
+     * is specified, the request returns all tasks. A successful response can also
+     * be empty. An empty response indicates that no Tasks were found meeting the
+     * requested filter criteria.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public Builder addTasks(google.maps.fleetengine.delivery.v1.Task.Builder builderForValue) { + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + tasks_.add(builderForValue.build()); + onChanged(); + } else { + tasksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The set of Tasks that meet the requested filtering criteria. When no filter
+     * is specified, the request returns all tasks. A successful response can also
+     * be empty. An empty response indicates that no Tasks were found meeting the
+     * requested filter criteria.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public Builder addTasks( + int index, google.maps.fleetengine.delivery.v1.Task.Builder builderForValue) { + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + tasks_.add(index, builderForValue.build()); + onChanged(); + } else { + tasksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The set of Tasks that meet the requested filtering criteria. When no filter
+     * is specified, the request returns all tasks. A successful response can also
+     * be empty. An empty response indicates that no Tasks were found meeting the
+     * requested filter criteria.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public Builder addAllTasks( + java.lang.Iterable values) { + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tasks_); + onChanged(); + } else { + tasksBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The set of Tasks that meet the requested filtering criteria. When no filter
+     * is specified, the request returns all tasks. A successful response can also
+     * be empty. An empty response indicates that no Tasks were found meeting the
+     * requested filter criteria.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public Builder clearTasks() { + if (tasksBuilder_ == null) { + tasks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + tasksBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The set of Tasks that meet the requested filtering criteria. When no filter
+     * is specified, the request returns all tasks. A successful response can also
+     * be empty. An empty response indicates that no Tasks were found meeting the
+     * requested filter criteria.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public Builder removeTasks(int index) { + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + tasks_.remove(index); + onChanged(); + } else { + tasksBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The set of Tasks that meet the requested filtering criteria. When no filter
+     * is specified, the request returns all tasks. A successful response can also
+     * be empty. An empty response indicates that no Tasks were found meeting the
+     * requested filter criteria.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public google.maps.fleetengine.delivery.v1.Task.Builder getTasksBuilder(int index) { + return getTasksFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The set of Tasks that meet the requested filtering criteria. When no filter
+     * is specified, the request returns all tasks. A successful response can also
+     * be empty. An empty response indicates that no Tasks were found meeting the
+     * requested filter criteria.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public google.maps.fleetengine.delivery.v1.TaskOrBuilder getTasksOrBuilder(int index) { + if (tasksBuilder_ == null) { + return tasks_.get(index); + } else { + return tasksBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The set of Tasks that meet the requested filtering criteria. When no filter
+     * is specified, the request returns all tasks. A successful response can also
+     * be empty. An empty response indicates that no Tasks were found meeting the
+     * requested filter criteria.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public java.util.List + getTasksOrBuilderList() { + if (tasksBuilder_ != null) { + return tasksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tasks_); + } + } + /** + * + * + *
+     * The set of Tasks that meet the requested filtering criteria. When no filter
+     * is specified, the request returns all tasks. A successful response can also
+     * be empty. An empty response indicates that no Tasks were found meeting the
+     * requested filter criteria.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public google.maps.fleetengine.delivery.v1.Task.Builder addTasksBuilder() { + return getTasksFieldBuilder() + .addBuilder(google.maps.fleetengine.delivery.v1.Task.getDefaultInstance()); + } + /** + * + * + *
+     * The set of Tasks that meet the requested filtering criteria. When no filter
+     * is specified, the request returns all tasks. A successful response can also
+     * be empty. An empty response indicates that no Tasks were found meeting the
+     * requested filter criteria.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public google.maps.fleetengine.delivery.v1.Task.Builder addTasksBuilder(int index) { + return getTasksFieldBuilder() + .addBuilder(index, google.maps.fleetengine.delivery.v1.Task.getDefaultInstance()); + } + /** + * + * + *
+     * The set of Tasks that meet the requested filtering criteria. When no filter
+     * is specified, the request returns all tasks. A successful response can also
+     * be empty. An empty response indicates that no Tasks were found meeting the
+     * requested filter criteria.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public java.util.List getTasksBuilderList() { + return getTasksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + google.maps.fleetengine.delivery.v1.Task, + google.maps.fleetengine.delivery.v1.Task.Builder, + google.maps.fleetengine.delivery.v1.TaskOrBuilder> + getTasksFieldBuilder() { + if (tasksBuilder_ == null) { + tasksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + google.maps.fleetengine.delivery.v1.Task, + google.maps.fleetengine.delivery.v1.Task.Builder, + google.maps.fleetengine.delivery.v1.TaskOrBuilder>( + tasks_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + tasks_ = null; + } + return tasksBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Pass this token in the `ListTasksRequest` to continue to list results.
+     * If all results have been returned, then this field is either an empty
+     * string, or it doesn't appear in the response.
+     * 
+ * + * 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 `ListTasksRequest` to continue to list results.
+     * If all results have been returned, then this field is either an empty
+     * string, or it doesn't appear in the response.
+     * 
+ * + * 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 `ListTasksRequest` to continue to list results.
+     * If all results have been returned, then this field is either an empty
+     * string, or it doesn't appear in the response.
+     * 
+ * + * 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 `ListTasksRequest` to continue to list results.
+     * If all results have been returned, then this field is either an empty
+     * string, or it doesn't appear in the response.
+     * 
+ * + * 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 `ListTasksRequest` to continue to list results.
+     * If all results have been returned, then this field is either an empty
+     * string, or it doesn't appear in the response.
+     * 
+ * + * 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_; + /** + * + * + *
+     * The total number of Tasks that match the request criteria, across all
+     * pages.
+     * 
+ * + * int64 total_size = 3; + * + * @return The totalSize. + */ + @java.lang.Override + public long getTotalSize() { + return totalSize_; + } + /** + * + * + *
+     * The total number of Tasks that match the request criteria, across all
+     * pages.
+     * 
+ * + * int64 total_size = 3; + * + * @param value The totalSize to set. + * @return This builder for chaining. + */ + public Builder setTotalSize(long value) { + + totalSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The total number of Tasks that match the request criteria, across all
+     * pages.
+     * 
+ * + * int64 total_size = 3; + * + * @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.delivery.v1.ListTasksResponse) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.delivery.v1.ListTasksResponse) + private static final google.maps.fleetengine.delivery.v1.ListTasksResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new google.maps.fleetengine.delivery.v1.ListTasksResponse(); + } + + public static google.maps.fleetengine.delivery.v1.ListTasksResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTasksResponse 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 google.maps.fleetengine.delivery.v1.ListTasksResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/ListTasksResponseOrBuilder.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/ListTasksResponseOrBuilder.java new file mode 100644 index 000000000000..01d072046b30 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/ListTasksResponseOrBuilder.java @@ -0,0 +1,135 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_api.proto + +package google.maps.fleetengine.delivery.v1; + +public interface ListTasksResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.delivery.v1.ListTasksResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The set of Tasks that meet the requested filtering criteria. When no filter
+   * is specified, the request returns all tasks. A successful response can also
+   * be empty. An empty response indicates that no Tasks were found meeting the
+   * requested filter criteria.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + java.util.List getTasksList(); + /** + * + * + *
+   * The set of Tasks that meet the requested filtering criteria. When no filter
+   * is specified, the request returns all tasks. A successful response can also
+   * be empty. An empty response indicates that no Tasks were found meeting the
+   * requested filter criteria.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + google.maps.fleetengine.delivery.v1.Task getTasks(int index); + /** + * + * + *
+   * The set of Tasks that meet the requested filtering criteria. When no filter
+   * is specified, the request returns all tasks. A successful response can also
+   * be empty. An empty response indicates that no Tasks were found meeting the
+   * requested filter criteria.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + int getTasksCount(); + /** + * + * + *
+   * The set of Tasks that meet the requested filtering criteria. When no filter
+   * is specified, the request returns all tasks. A successful response can also
+   * be empty. An empty response indicates that no Tasks were found meeting the
+   * requested filter criteria.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + java.util.List + getTasksOrBuilderList(); + /** + * + * + *
+   * The set of Tasks that meet the requested filtering criteria. When no filter
+   * is specified, the request returns all tasks. A successful response can also
+   * be empty. An empty response indicates that no Tasks were found meeting the
+   * requested filter criteria.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + google.maps.fleetengine.delivery.v1.TaskOrBuilder getTasksOrBuilder(int index); + + /** + * + * + *
+   * Pass this token in the `ListTasksRequest` to continue to list results.
+   * If all results have been returned, then this field is either an empty
+   * string, or it doesn't appear in the response.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Pass this token in the `ListTasksRequest` to continue to list results.
+   * If all results have been returned, then this field is either an empty
+   * string, or it doesn't appear in the response.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * The total number of Tasks that match the request criteria, across all
+   * pages.
+   * 
+ * + * int64 total_size = 3; + * + * @return The totalSize. + */ + long getTotalSize(); +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/LocationInfo.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/LocationInfo.java new file mode 100644 index 000000000000..6abba845fa29 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/LocationInfo.java @@ -0,0 +1,692 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_vehicles.proto + +package google.maps.fleetengine.delivery.v1; + +/** + * + * + *
+ * A location with any additional identifiers.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.LocationInfo} + */ +public final class LocationInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.delivery.v1.LocationInfo) + LocationInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use LocationInfo.newBuilder() to construct. + private LocationInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LocationInfo() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LocationInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryVehicles + .internal_static_maps_fleetengine_delivery_v1_LocationInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryVehicles + .internal_static_maps_fleetengine_delivery_v1_LocationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.LocationInfo.class, + google.maps.fleetengine.delivery.v1.LocationInfo.Builder.class); + } + + public static final int POINT_FIELD_NUMBER = 1; + private com.google.type.LatLng point_; + /** + * + * + *
+   * The location's coordinates.
+   * 
+ * + * .google.type.LatLng point = 1; + * + * @return Whether the point field is set. + */ + @java.lang.Override + public boolean hasPoint() { + return point_ != null; + } + /** + * + * + *
+   * The location's coordinates.
+   * 
+ * + * .google.type.LatLng point = 1; + * + * @return The point. + */ + @java.lang.Override + public com.google.type.LatLng getPoint() { + return point_ == null ? com.google.type.LatLng.getDefaultInstance() : point_; + } + /** + * + * + *
+   * The location's coordinates.
+   * 
+ * + * .google.type.LatLng point = 1; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getPointOrBuilder() { + return point_ == null ? com.google.type.LatLng.getDefaultInstance() : point_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (point_ != null) { + output.writeMessage(1, getPoint()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (point_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPoint()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof google.maps.fleetengine.delivery.v1.LocationInfo)) { + return super.equals(obj); + } + google.maps.fleetengine.delivery.v1.LocationInfo other = + (google.maps.fleetengine.delivery.v1.LocationInfo) obj; + + if (hasPoint() != other.hasPoint()) return false; + if (hasPoint()) { + if (!getPoint().equals(other.getPoint())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPoint()) { + hash = (37 * hash) + POINT_FIELD_NUMBER; + hash = (53 * hash) + getPoint().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.maps.fleetengine.delivery.v1.LocationInfo parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.LocationInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.LocationInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.LocationInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.LocationInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.LocationInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.LocationInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.LocationInfo 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 google.maps.fleetengine.delivery.v1.LocationInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.LocationInfo 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 google.maps.fleetengine.delivery.v1.LocationInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.LocationInfo 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(google.maps.fleetengine.delivery.v1.LocationInfo 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 location with any additional identifiers.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.LocationInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.delivery.v1.LocationInfo) + google.maps.fleetengine.delivery.v1.LocationInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryVehicles + .internal_static_maps_fleetengine_delivery_v1_LocationInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryVehicles + .internal_static_maps_fleetengine_delivery_v1_LocationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.LocationInfo.class, + google.maps.fleetengine.delivery.v1.LocationInfo.Builder.class); + } + + // Construct using google.maps.fleetengine.delivery.v1.LocationInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + point_ = null; + if (pointBuilder_ != null) { + pointBuilder_.dispose(); + pointBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return google.maps.fleetengine.delivery.v1.DeliveryVehicles + .internal_static_maps_fleetengine_delivery_v1_LocationInfo_descriptor; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.LocationInfo getDefaultInstanceForType() { + return google.maps.fleetengine.delivery.v1.LocationInfo.getDefaultInstance(); + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.LocationInfo build() { + google.maps.fleetengine.delivery.v1.LocationInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.LocationInfo buildPartial() { + google.maps.fleetengine.delivery.v1.LocationInfo result = + new google.maps.fleetengine.delivery.v1.LocationInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(google.maps.fleetengine.delivery.v1.LocationInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.point_ = pointBuilder_ == null ? point_ : pointBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof google.maps.fleetengine.delivery.v1.LocationInfo) { + return mergeFrom((google.maps.fleetengine.delivery.v1.LocationInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.maps.fleetengine.delivery.v1.LocationInfo other) { + if (other == google.maps.fleetengine.delivery.v1.LocationInfo.getDefaultInstance()) + return this; + if (other.hasPoint()) { + mergePoint(other.getPoint()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getPointFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.type.LatLng point_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + pointBuilder_; + /** + * + * + *
+     * The location's coordinates.
+     * 
+ * + * .google.type.LatLng point = 1; + * + * @return Whether the point field is set. + */ + public boolean hasPoint() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The location's coordinates.
+     * 
+ * + * .google.type.LatLng point = 1; + * + * @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(); + } + } + /** + * + * + *
+     * The location's coordinates.
+     * 
+ * + * .google.type.LatLng point = 1; + */ + 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; + } + /** + * + * + *
+     * The location's coordinates.
+     * 
+ * + * .google.type.LatLng point = 1; + */ + 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; + } + /** + * + * + *
+     * The location's coordinates.
+     * 
+ * + * .google.type.LatLng point = 1; + */ + 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); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The location's coordinates.
+     * 
+ * + * .google.type.LatLng point = 1; + */ + public Builder clearPoint() { + bitField0_ = (bitField0_ & ~0x00000001); + point_ = null; + if (pointBuilder_ != null) { + pointBuilder_.dispose(); + pointBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The location's coordinates.
+     * 
+ * + * .google.type.LatLng point = 1; + */ + public com.google.type.LatLng.Builder getPointBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getPointFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The location's coordinates.
+     * 
+ * + * .google.type.LatLng point = 1; + */ + public com.google.type.LatLngOrBuilder getPointOrBuilder() { + if (pointBuilder_ != null) { + return pointBuilder_.getMessageOrBuilder(); + } else { + return point_ == null ? com.google.type.LatLng.getDefaultInstance() : point_; + } + } + /** + * + * + *
+     * The location's coordinates.
+     * 
+ * + * .google.type.LatLng point = 1; + */ + 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_; + } + + @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.delivery.v1.LocationInfo) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.delivery.v1.LocationInfo) + private static final google.maps.fleetengine.delivery.v1.LocationInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new google.maps.fleetengine.delivery.v1.LocationInfo(); + } + + public static google.maps.fleetengine.delivery.v1.LocationInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LocationInfo 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 google.maps.fleetengine.delivery.v1.LocationInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/LocationInfoOrBuilder.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/LocationInfoOrBuilder.java new file mode 100644 index 000000000000..c62dea8caf8b --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/LocationInfoOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_vehicles.proto + +package google.maps.fleetengine.delivery.v1; + +public interface LocationInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.delivery.v1.LocationInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The location's coordinates.
+   * 
+ * + * .google.type.LatLng point = 1; + * + * @return Whether the point field is set. + */ + boolean hasPoint(); + /** + * + * + *
+   * The location's coordinates.
+   * 
+ * + * .google.type.LatLng point = 1; + * + * @return The point. + */ + com.google.type.LatLng getPoint(); + /** + * + * + *
+   * The location's coordinates.
+   * 
+ * + * .google.type.LatLng point = 1; + */ + com.google.type.LatLngOrBuilder getPointOrBuilder(); +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/ProviderName.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/ProviderName.java new file mode 100644 index 000000000000..22cfd7828891 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/ProviderName.java @@ -0,0 +1,168 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.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 ProviderName implements ResourceName { + private static final PathTemplate PROVIDER = + PathTemplate.createWithoutUrlEncoding("providers/{provider}"); + private volatile Map fieldValuesMap; + private final String provider; + + @Deprecated + protected ProviderName() { + provider = null; + } + + private ProviderName(Builder builder) { + provider = Preconditions.checkNotNull(builder.getProvider()); + } + + public String getProvider() { + return provider; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ProviderName of(String provider) { + return newBuilder().setProvider(provider).build(); + } + + public static String format(String provider) { + return newBuilder().setProvider(provider).build().toString(); + } + + public static ProviderName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROVIDER.validatedMatch( + formattedString, "ProviderName.parse: formattedString not in valid format"); + return of(matchMap.get("provider")); + } + + 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 (ProviderName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROVIDER.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); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROVIDER.instantiate("provider", provider); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + ProviderName that = ((ProviderName) o); + return Objects.equals(this.provider, that.provider); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(provider); + return h; + } + + /** Builder for providers/{provider}. */ + public static class Builder { + private String provider; + + protected Builder() {} + + public String getProvider() { + return provider; + } + + public Builder setProvider(String provider) { + this.provider = provider; + return this; + } + + private Builder(ProviderName providerName) { + this.provider = providerName.provider; + } + + public ProviderName build() { + return new ProviderName(this); + } + } +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/SearchTasksRequest.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/SearchTasksRequest.java new file mode 100644 index 000000000000..d3ba49d7bd19 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/SearchTasksRequest.java @@ -0,0 +1,1481 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_api.proto + +package google.maps.fleetengine.delivery.v1; + +/** + * + * + *
+ * Deprecated: Issue `GetTaskTrackingInfoRequest`s to `GetTaskTrackingInfo`
+ * instead.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.SearchTasksRequest} + */ +@java.lang.Deprecated +public final class SearchTasksRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.delivery.v1.SearchTasksRequest) + SearchTasksRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchTasksRequest.newBuilder() to construct. + private SearchTasksRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchTasksRequest() { + parent_ = ""; + trackingId_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchTasksRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_SearchTasksRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_SearchTasksRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.SearchTasksRequest.class, + google.maps.fleetengine.delivery.v1.SearchTasksRequest.Builder.class); + } + + public static final int HEADER_FIELD_NUMBER = 1; + private google.maps.fleetengine.delivery.v1.DeliveryRequestHeader header_; + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the header field is set. + */ + @java.lang.Override + public boolean hasHeader() { + return header_ != null; + } + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The header. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader getHeader() { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance() + : header_; + } + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder getHeaderOrBuilder() { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.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 Google Cloud Project ID. For example,
+   * `sample-cloud-project`.
+   * 
+ * + * 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 Google Cloud Project ID. For example,
+   * `sample-cloud-project`.
+   * 
+ * + * 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 TRACKING_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object trackingId_ = ""; + /** + * + * + *
+   * Required. The identifier of the set of related Tasks being requested.
+   * Tracking IDs are 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 tracking_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The trackingId. + */ + @java.lang.Override + public java.lang.String getTrackingId() { + java.lang.Object ref = trackingId_; + 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(); + trackingId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The identifier of the set of related Tasks being requested.
+   * Tracking IDs are 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 tracking_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for trackingId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTrackingIdBytes() { + java.lang.Object ref = trackingId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + trackingId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 5; + private int pageSize_ = 0; + /** + * + * + *
+   * Optional. The maximum number of Tasks to return. The service may return
+   * fewer than this value. If you don't specify this value, then the server
+   * determines the number of results to return.
+   * 
+ * + * int32 page_size = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * Optional. A page token, received from a previous `SearchTasks` call. You
+   * must provide this value to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `SearchTasks` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+   * Optional. A page token, received from a previous `SearchTasks` call. You
+   * must provide this value to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `SearchTasks` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + 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 (header_ != null) { + 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(trackingId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, trackingId_); + } + if (pageSize_ != 0) { + output.writeInt32(5, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (header_ != null) { + 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(trackingId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, trackingId_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, pageToken_); + } + 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 google.maps.fleetengine.delivery.v1.SearchTasksRequest)) { + return super.equals(obj); + } + google.maps.fleetengine.delivery.v1.SearchTasksRequest other = + (google.maps.fleetengine.delivery.v1.SearchTasksRequest) obj; + + if (hasHeader() != other.hasHeader()) return false; + if (hasHeader()) { + if (!getHeader().equals(other.getHeader())) return false; + } + if (!getParent().equals(other.getParent())) return false; + if (!getTrackingId().equals(other.getTrackingId())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) 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) + TRACKING_ID_FIELD_NUMBER; + hash = (53 * hash) + getTrackingId().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.maps.fleetengine.delivery.v1.SearchTasksRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.SearchTasksRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.SearchTasksRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.SearchTasksRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.SearchTasksRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.SearchTasksRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.SearchTasksRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.SearchTasksRequest 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 google.maps.fleetengine.delivery.v1.SearchTasksRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.SearchTasksRequest 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 google.maps.fleetengine.delivery.v1.SearchTasksRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.SearchTasksRequest 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( + google.maps.fleetengine.delivery.v1.SearchTasksRequest 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: Issue `GetTaskTrackingInfoRequest`s to `GetTaskTrackingInfo`
+   * instead.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.SearchTasksRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.delivery.v1.SearchTasksRequest) + google.maps.fleetengine.delivery.v1.SearchTasksRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_SearchTasksRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_SearchTasksRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.SearchTasksRequest.class, + google.maps.fleetengine.delivery.v1.SearchTasksRequest.Builder.class); + } + + // Construct using google.maps.fleetengine.delivery.v1.SearchTasksRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + parent_ = ""; + trackingId_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_SearchTasksRequest_descriptor; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.SearchTasksRequest getDefaultInstanceForType() { + return google.maps.fleetengine.delivery.v1.SearchTasksRequest.getDefaultInstance(); + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.SearchTasksRequest build() { + google.maps.fleetengine.delivery.v1.SearchTasksRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.SearchTasksRequest buildPartial() { + google.maps.fleetengine.delivery.v1.SearchTasksRequest result = + new google.maps.fleetengine.delivery.v1.SearchTasksRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(google.maps.fleetengine.delivery.v1.SearchTasksRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.header_ = headerBuilder_ == null ? header_ : headerBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.trackingId_ = trackingId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @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 google.maps.fleetengine.delivery.v1.SearchTasksRequest) { + return mergeFrom((google.maps.fleetengine.delivery.v1.SearchTasksRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.maps.fleetengine.delivery.v1.SearchTasksRequest other) { + if (other == google.maps.fleetengine.delivery.v1.SearchTasksRequest.getDefaultInstance()) + return this; + if (other.hasHeader()) { + mergeHeader(other.getHeader()); + } + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getTrackingId().isEmpty()) { + trackingId_ = other.trackingId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000010; + 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: + { + trackingId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 34 + case 40: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 40 + case 50: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private google.maps.fleetengine.delivery.v1.DeliveryRequestHeader header_; + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder> + headerBuilder_; + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the header field is set. + */ + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The header. + */ + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader getHeader() { + if (headerBuilder_ == null) { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance() + : header_; + } else { + return headerBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHeader(google.maps.fleetengine.delivery.v1.DeliveryRequestHeader value) { + if (headerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + header_ = value; + } else { + headerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHeader( + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder builderForValue) { + if (headerBuilder_ == null) { + header_ = builderForValue.build(); + } else { + headerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeHeader(google.maps.fleetengine.delivery.v1.DeliveryRequestHeader value) { + if (headerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && header_ != null + && header_ + != google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance()) { + getHeaderBuilder().mergeFrom(value); + } else { + header_ = value; + } + } else { + headerBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearHeader() { + bitField0_ = (bitField0_ & ~0x00000001); + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder getHeaderBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getHeaderFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder getHeaderOrBuilder() { + if (headerBuilder_ != null) { + return headerBuilder_.getMessageOrBuilder(); + } else { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance() + : header_; + } + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder> + getHeaderFieldBuilder() { + if (headerBuilder_ == null) { + headerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder>( + 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 Google Cloud Project ID. For example,
+     * `sample-cloud-project`.
+     * 
+ * + * 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 Google Cloud Project ID. For example,
+     * `sample-cloud-project`.
+     * 
+ * + * 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 Google Cloud Project ID. For example,
+     * `sample-cloud-project`.
+     * 
+ * + * 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 Google Cloud Project ID. For example,
+     * `sample-cloud-project`.
+     * 
+ * + * 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 Google Cloud Project ID. For example,
+     * `sample-cloud-project`.
+     * 
+ * + * 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 trackingId_ = ""; + /** + * + * + *
+     * Required. The identifier of the set of related Tasks being requested.
+     * Tracking IDs are 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 tracking_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The trackingId. + */ + public java.lang.String getTrackingId() { + java.lang.Object ref = trackingId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + trackingId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The identifier of the set of related Tasks being requested.
+     * Tracking IDs are 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 tracking_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for trackingId. + */ + public com.google.protobuf.ByteString getTrackingIdBytes() { + java.lang.Object ref = trackingId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + trackingId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The identifier of the set of related Tasks being requested.
+     * Tracking IDs are 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 tracking_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The trackingId to set. + * @return This builder for chaining. + */ + public Builder setTrackingId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + trackingId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The identifier of the set of related Tasks being requested.
+     * Tracking IDs are 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 tracking_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTrackingId() { + trackingId_ = getDefaultInstance().getTrackingId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The identifier of the set of related Tasks being requested.
+     * Tracking IDs are 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 tracking_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for trackingId to set. + * @return This builder for chaining. + */ + public Builder setTrackingIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + trackingId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. The maximum number of Tasks to return. The service may return
+     * fewer than this value. If you don't specify this value, then the server
+     * determines the number of results to return.
+     * 
+ * + * int32 page_size = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. The maximum number of Tasks to return. The service may return
+     * fewer than this value. If you don't specify this value, then the server
+     * determines the number of results to return.
+     * 
+ * + * int32 page_size = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The maximum number of Tasks to return. The service may return
+     * fewer than this value. If you don't specify this value, then the server
+     * determines the number of results to return.
+     * 
+ * + * int32 page_size = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000008); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. A page token, received from a previous `SearchTasks` call. You
+     * must provide this value to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `SearchTasks` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+     * Optional. A page token, received from a previous `SearchTasks` call. You
+     * must provide this value to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `SearchTasks` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+     * Optional. A page token, received from a previous `SearchTasks` call. You
+     * must provide this value to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `SearchTasks` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A page token, received from a previous `SearchTasks` call. You
+     * must provide this value to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `SearchTasks` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A page token, received from a previous `SearchTasks` call. You
+     * must provide this value to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `SearchTasks` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ |= 0x00000010; + 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.delivery.v1.SearchTasksRequest) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.delivery.v1.SearchTasksRequest) + private static final google.maps.fleetengine.delivery.v1.SearchTasksRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new google.maps.fleetengine.delivery.v1.SearchTasksRequest(); + } + + public static google.maps.fleetengine.delivery.v1.SearchTasksRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchTasksRequest 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 google.maps.fleetengine.delivery.v1.SearchTasksRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/SearchTasksRequestOrBuilder.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/SearchTasksRequestOrBuilder.java new file mode 100644 index 000000000000..6e1145a82c09 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/SearchTasksRequestOrBuilder.java @@ -0,0 +1,185 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_api.proto + +package google.maps.fleetengine.delivery.v1; + +@java.lang.Deprecated +public interface SearchTasksRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.delivery.v1.SearchTasksRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the header field is set. + */ + boolean hasHeader(); + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The header. + */ + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader getHeader(); + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder getHeaderOrBuilder(); + + /** + * + * + *
+   * Required. Must be in the format `providers/{provider}`.
+   * The provider must be the Google Cloud Project ID. For example,
+   * `sample-cloud-project`.
+   * 
+ * + * 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 Google Cloud Project ID. For example,
+   * `sample-cloud-project`.
+   * 
+ * + * string parent = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The identifier of the set of related Tasks being requested.
+   * Tracking IDs are 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 tracking_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The trackingId. + */ + java.lang.String getTrackingId(); + /** + * + * + *
+   * Required. The identifier of the set of related Tasks being requested.
+   * Tracking IDs are 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 tracking_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for trackingId. + */ + com.google.protobuf.ByteString getTrackingIdBytes(); + + /** + * + * + *
+   * Optional. The maximum number of Tasks to return. The service may return
+   * fewer than this value. If you don't specify this value, then the server
+   * determines the number of results to return.
+   * 
+ * + * int32 page_size = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `SearchTasks` call. You
+   * must provide this value to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `SearchTasks` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. A page token, received from a previous `SearchTasks` call. You
+   * must provide this value to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `SearchTasks` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/SearchTasksResponse.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/SearchTasksResponse.java new file mode 100644 index 000000000000..e84480d469c0 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/SearchTasksResponse.java @@ -0,0 +1,1180 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_api.proto + +package google.maps.fleetengine.delivery.v1; + +/** + * + * + *
+ * The `SearchTasks` response. It contains the set of Tasks that meet the search
+ * criteria in the `SearchTasksRequest`.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.SearchTasksResponse} + */ +@java.lang.Deprecated +public final class SearchTasksResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.delivery.v1.SearchTasksResponse) + SearchTasksResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchTasksResponse.newBuilder() to construct. + private SearchTasksResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchTasksResponse() { + tasks_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchTasksResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_SearchTasksResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_SearchTasksResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.SearchTasksResponse.class, + google.maps.fleetengine.delivery.v1.SearchTasksResponse.Builder.class); + } + + public static final int TASKS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List tasks_; + /** + * + * + *
+   * The set of Tasks for the requested `tracking_id`. A successful response can
+   * also be empty. An empty response indicates that no Tasks are associated
+   * with the supplied `tracking_id`.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + @java.lang.Override + public java.util.List getTasksList() { + return tasks_; + } + /** + * + * + *
+   * The set of Tasks for the requested `tracking_id`. A successful response can
+   * also be empty. An empty response indicates that no Tasks are associated
+   * with the supplied `tracking_id`.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + @java.lang.Override + public java.util.List + getTasksOrBuilderList() { + return tasks_; + } + /** + * + * + *
+   * The set of Tasks for the requested `tracking_id`. A successful response can
+   * also be empty. An empty response indicates that no Tasks are associated
+   * with the supplied `tracking_id`.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + @java.lang.Override + public int getTasksCount() { + return tasks_.size(); + } + /** + * + * + *
+   * The set of Tasks for the requested `tracking_id`. A successful response can
+   * also be empty. An empty response indicates that no Tasks are associated
+   * with the supplied `tracking_id`.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.Task getTasks(int index) { + return tasks_.get(index); + } + /** + * + * + *
+   * The set of Tasks for the requested `tracking_id`. A successful response can
+   * also be empty. An empty response indicates that no Tasks are associated
+   * with the supplied `tracking_id`.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TaskOrBuilder getTasksOrBuilder(int index) { + return tasks_.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 `SearchTasksRequest` to continue to
+   * list results. If all results have been returned, then this field is either
+   * an empty string, or it doesn't appear in the response.
+   * 
+ * + * 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 `SearchTasksRequest` to continue to
+   * list results. If all results have been returned, then this field is either
+   * an empty string, or it doesn't appear in the response.
+   * 
+ * + * 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 < tasks_.size(); i++) { + output.writeMessage(1, tasks_.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 < tasks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, tasks_.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 google.maps.fleetengine.delivery.v1.SearchTasksResponse)) { + return super.equals(obj); + } + google.maps.fleetengine.delivery.v1.SearchTasksResponse other = + (google.maps.fleetengine.delivery.v1.SearchTasksResponse) obj; + + if (!getTasksList().equals(other.getTasksList())) 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 (getTasksCount() > 0) { + hash = (37 * hash) + TASKS_FIELD_NUMBER; + hash = (53 * hash) + getTasksList().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 google.maps.fleetengine.delivery.v1.SearchTasksResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.SearchTasksResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.SearchTasksResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.SearchTasksResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.SearchTasksResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.SearchTasksResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.SearchTasksResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.SearchTasksResponse 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 google.maps.fleetengine.delivery.v1.SearchTasksResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.SearchTasksResponse 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 google.maps.fleetengine.delivery.v1.SearchTasksResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.SearchTasksResponse 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( + google.maps.fleetengine.delivery.v1.SearchTasksResponse 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 `SearchTasks` response. It contains the set of Tasks that meet the search
+   * criteria in the `SearchTasksRequest`.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.SearchTasksResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.delivery.v1.SearchTasksResponse) + google.maps.fleetengine.delivery.v1.SearchTasksResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_SearchTasksResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_SearchTasksResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.SearchTasksResponse.class, + google.maps.fleetengine.delivery.v1.SearchTasksResponse.Builder.class); + } + + // Construct using google.maps.fleetengine.delivery.v1.SearchTasksResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (tasksBuilder_ == null) { + tasks_ = java.util.Collections.emptyList(); + } else { + tasks_ = null; + tasksBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_SearchTasksResponse_descriptor; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.SearchTasksResponse getDefaultInstanceForType() { + return google.maps.fleetengine.delivery.v1.SearchTasksResponse.getDefaultInstance(); + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.SearchTasksResponse build() { + google.maps.fleetengine.delivery.v1.SearchTasksResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.SearchTasksResponse buildPartial() { + google.maps.fleetengine.delivery.v1.SearchTasksResponse result = + new google.maps.fleetengine.delivery.v1.SearchTasksResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + google.maps.fleetengine.delivery.v1.SearchTasksResponse result) { + if (tasksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + tasks_ = java.util.Collections.unmodifiableList(tasks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tasks_ = tasks_; + } else { + result.tasks_ = tasksBuilder_.build(); + } + } + + private void buildPartial0(google.maps.fleetengine.delivery.v1.SearchTasksResponse 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 google.maps.fleetengine.delivery.v1.SearchTasksResponse) { + return mergeFrom((google.maps.fleetengine.delivery.v1.SearchTasksResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.maps.fleetengine.delivery.v1.SearchTasksResponse other) { + if (other == google.maps.fleetengine.delivery.v1.SearchTasksResponse.getDefaultInstance()) + return this; + if (tasksBuilder_ == null) { + if (!other.tasks_.isEmpty()) { + if (tasks_.isEmpty()) { + tasks_ = other.tasks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTasksIsMutable(); + tasks_.addAll(other.tasks_); + } + onChanged(); + } + } else { + if (!other.tasks_.isEmpty()) { + if (tasksBuilder_.isEmpty()) { + tasksBuilder_.dispose(); + tasksBuilder_ = null; + tasks_ = other.tasks_; + bitField0_ = (bitField0_ & ~0x00000001); + tasksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTasksFieldBuilder() + : null; + } else { + tasksBuilder_.addAllMessages(other.tasks_); + } + } + } + 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: + { + google.maps.fleetengine.delivery.v1.Task m = + input.readMessage( + google.maps.fleetengine.delivery.v1.Task.parser(), extensionRegistry); + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + tasks_.add(m); + } else { + tasksBuilder_.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 tasks_ = + java.util.Collections.emptyList(); + + private void ensureTasksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + tasks_ = new java.util.ArrayList(tasks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + google.maps.fleetengine.delivery.v1.Task, + google.maps.fleetengine.delivery.v1.Task.Builder, + google.maps.fleetengine.delivery.v1.TaskOrBuilder> + tasksBuilder_; + + /** + * + * + *
+     * The set of Tasks for the requested `tracking_id`. A successful response can
+     * also be empty. An empty response indicates that no Tasks are associated
+     * with the supplied `tracking_id`.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public java.util.List getTasksList() { + if (tasksBuilder_ == null) { + return java.util.Collections.unmodifiableList(tasks_); + } else { + return tasksBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The set of Tasks for the requested `tracking_id`. A successful response can
+     * also be empty. An empty response indicates that no Tasks are associated
+     * with the supplied `tracking_id`.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public int getTasksCount() { + if (tasksBuilder_ == null) { + return tasks_.size(); + } else { + return tasksBuilder_.getCount(); + } + } + /** + * + * + *
+     * The set of Tasks for the requested `tracking_id`. A successful response can
+     * also be empty. An empty response indicates that no Tasks are associated
+     * with the supplied `tracking_id`.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public google.maps.fleetengine.delivery.v1.Task getTasks(int index) { + if (tasksBuilder_ == null) { + return tasks_.get(index); + } else { + return tasksBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The set of Tasks for the requested `tracking_id`. A successful response can
+     * also be empty. An empty response indicates that no Tasks are associated
+     * with the supplied `tracking_id`.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public Builder setTasks(int index, google.maps.fleetengine.delivery.v1.Task value) { + if (tasksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTasksIsMutable(); + tasks_.set(index, value); + onChanged(); + } else { + tasksBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The set of Tasks for the requested `tracking_id`. A successful response can
+     * also be empty. An empty response indicates that no Tasks are associated
+     * with the supplied `tracking_id`.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public Builder setTasks( + int index, google.maps.fleetengine.delivery.v1.Task.Builder builderForValue) { + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + tasks_.set(index, builderForValue.build()); + onChanged(); + } else { + tasksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The set of Tasks for the requested `tracking_id`. A successful response can
+     * also be empty. An empty response indicates that no Tasks are associated
+     * with the supplied `tracking_id`.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public Builder addTasks(google.maps.fleetengine.delivery.v1.Task value) { + if (tasksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTasksIsMutable(); + tasks_.add(value); + onChanged(); + } else { + tasksBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The set of Tasks for the requested `tracking_id`. A successful response can
+     * also be empty. An empty response indicates that no Tasks are associated
+     * with the supplied `tracking_id`.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public Builder addTasks(int index, google.maps.fleetengine.delivery.v1.Task value) { + if (tasksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTasksIsMutable(); + tasks_.add(index, value); + onChanged(); + } else { + tasksBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The set of Tasks for the requested `tracking_id`. A successful response can
+     * also be empty. An empty response indicates that no Tasks are associated
+     * with the supplied `tracking_id`.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public Builder addTasks(google.maps.fleetengine.delivery.v1.Task.Builder builderForValue) { + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + tasks_.add(builderForValue.build()); + onChanged(); + } else { + tasksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The set of Tasks for the requested `tracking_id`. A successful response can
+     * also be empty. An empty response indicates that no Tasks are associated
+     * with the supplied `tracking_id`.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public Builder addTasks( + int index, google.maps.fleetengine.delivery.v1.Task.Builder builderForValue) { + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + tasks_.add(index, builderForValue.build()); + onChanged(); + } else { + tasksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The set of Tasks for the requested `tracking_id`. A successful response can
+     * also be empty. An empty response indicates that no Tasks are associated
+     * with the supplied `tracking_id`.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public Builder addAllTasks( + java.lang.Iterable values) { + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tasks_); + onChanged(); + } else { + tasksBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The set of Tasks for the requested `tracking_id`. A successful response can
+     * also be empty. An empty response indicates that no Tasks are associated
+     * with the supplied `tracking_id`.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public Builder clearTasks() { + if (tasksBuilder_ == null) { + tasks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + tasksBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The set of Tasks for the requested `tracking_id`. A successful response can
+     * also be empty. An empty response indicates that no Tasks are associated
+     * with the supplied `tracking_id`.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public Builder removeTasks(int index) { + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + tasks_.remove(index); + onChanged(); + } else { + tasksBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The set of Tasks for the requested `tracking_id`. A successful response can
+     * also be empty. An empty response indicates that no Tasks are associated
+     * with the supplied `tracking_id`.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public google.maps.fleetengine.delivery.v1.Task.Builder getTasksBuilder(int index) { + return getTasksFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The set of Tasks for the requested `tracking_id`. A successful response can
+     * also be empty. An empty response indicates that no Tasks are associated
+     * with the supplied `tracking_id`.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public google.maps.fleetengine.delivery.v1.TaskOrBuilder getTasksOrBuilder(int index) { + if (tasksBuilder_ == null) { + return tasks_.get(index); + } else { + return tasksBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The set of Tasks for the requested `tracking_id`. A successful response can
+     * also be empty. An empty response indicates that no Tasks are associated
+     * with the supplied `tracking_id`.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public java.util.List + getTasksOrBuilderList() { + if (tasksBuilder_ != null) { + return tasksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tasks_); + } + } + /** + * + * + *
+     * The set of Tasks for the requested `tracking_id`. A successful response can
+     * also be empty. An empty response indicates that no Tasks are associated
+     * with the supplied `tracking_id`.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public google.maps.fleetengine.delivery.v1.Task.Builder addTasksBuilder() { + return getTasksFieldBuilder() + .addBuilder(google.maps.fleetengine.delivery.v1.Task.getDefaultInstance()); + } + /** + * + * + *
+     * The set of Tasks for the requested `tracking_id`. A successful response can
+     * also be empty. An empty response indicates that no Tasks are associated
+     * with the supplied `tracking_id`.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public google.maps.fleetengine.delivery.v1.Task.Builder addTasksBuilder(int index) { + return getTasksFieldBuilder() + .addBuilder(index, google.maps.fleetengine.delivery.v1.Task.getDefaultInstance()); + } + /** + * + * + *
+     * The set of Tasks for the requested `tracking_id`. A successful response can
+     * also be empty. An empty response indicates that no Tasks are associated
+     * with the supplied `tracking_id`.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + public java.util.List getTasksBuilderList() { + return getTasksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + google.maps.fleetengine.delivery.v1.Task, + google.maps.fleetengine.delivery.v1.Task.Builder, + google.maps.fleetengine.delivery.v1.TaskOrBuilder> + getTasksFieldBuilder() { + if (tasksBuilder_ == null) { + tasksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + google.maps.fleetengine.delivery.v1.Task, + google.maps.fleetengine.delivery.v1.Task.Builder, + google.maps.fleetengine.delivery.v1.TaskOrBuilder>( + tasks_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + tasks_ = null; + } + return tasksBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Pass this token in the `SearchTasksRequest` to continue to
+     * list results. If all results have been returned, then this field is either
+     * an empty string, or it doesn't appear in the response.
+     * 
+ * + * 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 `SearchTasksRequest` to continue to
+     * list results. If all results have been returned, then this field is either
+     * an empty string, or it doesn't appear in the response.
+     * 
+ * + * 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 `SearchTasksRequest` to continue to
+     * list results. If all results have been returned, then this field is either
+     * an empty string, or it doesn't appear in the response.
+     * 
+ * + * 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 `SearchTasksRequest` to continue to
+     * list results. If all results have been returned, then this field is either
+     * an empty string, or it doesn't appear in the response.
+     * 
+ * + * 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 `SearchTasksRequest` to continue to
+     * list results. If all results have been returned, then this field is either
+     * an empty string, or it doesn't appear in the response.
+     * 
+ * + * 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.delivery.v1.SearchTasksResponse) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.delivery.v1.SearchTasksResponse) + private static final google.maps.fleetengine.delivery.v1.SearchTasksResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new google.maps.fleetengine.delivery.v1.SearchTasksResponse(); + } + + public static google.maps.fleetengine.delivery.v1.SearchTasksResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchTasksResponse 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 google.maps.fleetengine.delivery.v1.SearchTasksResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/SearchTasksResponseOrBuilder.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/SearchTasksResponseOrBuilder.java new file mode 100644 index 000000000000..02062735d61e --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/SearchTasksResponseOrBuilder.java @@ -0,0 +1,117 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_api.proto + +package google.maps.fleetengine.delivery.v1; + +@java.lang.Deprecated +public interface SearchTasksResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.delivery.v1.SearchTasksResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The set of Tasks for the requested `tracking_id`. A successful response can
+   * also be empty. An empty response indicates that no Tasks are associated
+   * with the supplied `tracking_id`.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + java.util.List getTasksList(); + /** + * + * + *
+   * The set of Tasks for the requested `tracking_id`. A successful response can
+   * also be empty. An empty response indicates that no Tasks are associated
+   * with the supplied `tracking_id`.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + google.maps.fleetengine.delivery.v1.Task getTasks(int index); + /** + * + * + *
+   * The set of Tasks for the requested `tracking_id`. A successful response can
+   * also be empty. An empty response indicates that no Tasks are associated
+   * with the supplied `tracking_id`.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + int getTasksCount(); + /** + * + * + *
+   * The set of Tasks for the requested `tracking_id`. A successful response can
+   * also be empty. An empty response indicates that no Tasks are associated
+   * with the supplied `tracking_id`.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + java.util.List + getTasksOrBuilderList(); + /** + * + * + *
+   * The set of Tasks for the requested `tracking_id`. A successful response can
+   * also be empty. An empty response indicates that no Tasks are associated
+   * with the supplied `tracking_id`.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + google.maps.fleetengine.delivery.v1.TaskOrBuilder getTasksOrBuilder(int index); + + /** + * + * + *
+   * Pass this token in the `SearchTasksRequest` to continue to
+   * list results. If all results have been returned, then this field is either
+   * an empty string, or it doesn't appear in the response.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Pass this token in the `SearchTasksRequest` to continue to
+   * list results. If all results have been returned, then this field is either
+   * an empty string, or it doesn't appear in the response.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/Task.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/Task.java new file mode 100644 index 000000000000..ea0324e1286f --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/Task.java @@ -0,0 +1,6987 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/tasks.proto + +package google.maps.fleetengine.delivery.v1; + +/** + * + * + *
+ * A Task in the Delivery API represents a single action to track. In general,
+ * there is a distinction between shipment-related Tasks and break Tasks. A
+ * shipment can have multiple Tasks associated with it. For example, there could
+ * be one Task for the pickup, and one for the drop-off or transfer. Also,
+ * different Tasks for a given shipment can be handled by different vehicles.
+ * For example, one vehicle could handle the pickup, driving the shipment to the
+ * hub, while another vehicle drives the same shipment from the hub to the
+ * drop-off location.
+ *
+ * Note: gRPC and REST APIs use different field naming conventions. For example,
+ * the `Task.journey_sharing_info` field in the gRPC API and the
+ * `DeliveryVehicle.journeySharingInfo` field in the REST API refer to the same
+ * field.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.Task} + */ +public final class Task extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.delivery.v1.Task) + TaskOrBuilder { + private static final long serialVersionUID = 0L; + // Use Task.newBuilder() to construct. + private Task(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Task() { + name_ = ""; + type_ = 0; + state_ = 0; + taskOutcome_ = 0; + taskOutcomeLocationSource_ = 0; + trackingId_ = ""; + deliveryVehicleId_ = ""; + attributes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Task(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.Tasks + .internal_static_maps_fleetengine_delivery_v1_Task_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.Tasks + .internal_static_maps_fleetengine_delivery_v1_Task_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.Task.class, + google.maps.fleetengine.delivery.v1.Task.Builder.class); + } + + /** + * + * + *
+   * The type of Task.
+   * 
+ * + * Protobuf enum {@code maps.fleetengine.delivery.v1.Task.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default, the Task type is unknown.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * A pickup Task is the action taken for picking up a shipment from a
+     * customer. Depot or feeder vehicle pickups should use the `SCHEDULED_STOP`
+     * type.
+     * 
+ * + * PICKUP = 1; + */ + PICKUP(1), + /** + * + * + *
+     * A delivery Task is the action taken for delivering a shipment to an end
+     * customer. Depot or feeder vehicle dropoffs should use the
+     * `SCHEDULED_STOP` type.
+     * 
+ * + * DELIVERY = 2; + */ + DELIVERY(2), + /** + * + * + *
+     * A scheduled stop Task is used for planning purposes. For example, it
+     * could represent picking up or dropping off shipments from feeder vehicles
+     * or depots. It shouldn't be used for any shipments that are picked up or
+     * dropped off from an end customer.
+     * 
+ * + * SCHEDULED_STOP = 3; + */ + SCHEDULED_STOP(3), + /** + * + * + *
+     * A Task that means the Vehicle is not available for service. For example,
+     * this can happen when the driver takes a break, or when the vehicle
+     * is being refueled.
+     * 
+ * + * UNAVAILABLE = 4; + */ + UNAVAILABLE(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default, the Task type is unknown.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * A pickup Task is the action taken for picking up a shipment from a
+     * customer. Depot or feeder vehicle pickups should use the `SCHEDULED_STOP`
+     * type.
+     * 
+ * + * PICKUP = 1; + */ + public static final int PICKUP_VALUE = 1; + /** + * + * + *
+     * A delivery Task is the action taken for delivering a shipment to an end
+     * customer. Depot or feeder vehicle dropoffs should use the
+     * `SCHEDULED_STOP` type.
+     * 
+ * + * DELIVERY = 2; + */ + public static final int DELIVERY_VALUE = 2; + /** + * + * + *
+     * A scheduled stop Task is used for planning purposes. For example, it
+     * could represent picking up or dropping off shipments from feeder vehicles
+     * or depots. It shouldn't be used for any shipments that are picked up or
+     * dropped off from an end customer.
+     * 
+ * + * SCHEDULED_STOP = 3; + */ + public static final int SCHEDULED_STOP_VALUE = 3; + /** + * + * + *
+     * A Task that means the Vehicle is not available for service. For example,
+     * this can happen when the driver takes a break, or when the vehicle
+     * is being refueled.
+     * 
+ * + * UNAVAILABLE = 4; + */ + public static final int UNAVAILABLE_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 Type 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 Type forNumber(int value) { + switch (value) { + case 0: + return TYPE_UNSPECIFIED; + case 1: + return PICKUP; + case 2: + return DELIVERY; + case 3: + return SCHEDULED_STOP; + case 4: + return UNAVAILABLE; + 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 Type findValueByNumber(int number) { + return Type.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 google.maps.fleetengine.delivery.v1.Task.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type 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 Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:maps.fleetengine.delivery.v1.Task.Type) + } + + /** + * + * + *
+   * The state of a Task. This indicates the Tasks's progress.
+   * 
+ * + * Protobuf enum {@code maps.fleetengine.delivery.v1.Task.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default. Used for an unspecified or unrecognized Task state.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * Either the Task has not yet been assigned to a delivery vehicle, or the
+     * delivery vehicle has not yet passed the `Task`'s assigned vehicle stop.
+     * 
+ * + * OPEN = 1; + */ + OPEN(1), + /** + * + * + *
+     * When the vehicle passes the vehicle stop for this Task.
+     * 
+ * + * CLOSED = 2; + */ + CLOSED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default. Used for an unspecified or unrecognized Task state.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Either the Task has not yet been assigned to a delivery vehicle, or the
+     * delivery vehicle has not yet passed the `Task`'s assigned vehicle stop.
+     * 
+ * + * OPEN = 1; + */ + public static final int OPEN_VALUE = 1; + /** + * + * + *
+     * When the vehicle passes the vehicle stop for this Task.
+     * 
+ * + * CLOSED = 2; + */ + public static final int CLOSED_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 State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return OPEN; + case 2: + return CLOSED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.Task.getDescriptor().getEnumTypes().get(1); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:maps.fleetengine.delivery.v1.Task.State) + } + + /** + * + * + *
+   * The outcome of attempting to execute a Task. When `TaskState` is closed,
+   * `TaskOutcome` indicates whether it was completed successfully.
+   * 
+ * + * Protobuf enum {@code maps.fleetengine.delivery.v1.Task.TaskOutcome} + */ + public enum TaskOutcome implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The Task outcome before its value is set.
+     * 
+ * + * TASK_OUTCOME_UNSPECIFIED = 0; + */ + TASK_OUTCOME_UNSPECIFIED(0), + /** + * + * + *
+     * The Task completed successfully.
+     * 
+ * + * SUCCEEDED = 1; + */ + SUCCEEDED(1), + /** + * + * + *
+     * Either the Task couldn't be completed, or it was cancelled.
+     * 
+ * + * FAILED = 2; + */ + FAILED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The Task outcome before its value is set.
+     * 
+ * + * TASK_OUTCOME_UNSPECIFIED = 0; + */ + public static final int TASK_OUTCOME_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The Task completed successfully.
+     * 
+ * + * SUCCEEDED = 1; + */ + public static final int SUCCEEDED_VALUE = 1; + /** + * + * + *
+     * Either the Task couldn't be completed, or it was cancelled.
+     * 
+ * + * FAILED = 2; + */ + public static final int FAILED_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 TaskOutcome 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 TaskOutcome forNumber(int value) { + switch (value) { + case 0: + return TASK_OUTCOME_UNSPECIFIED; + case 1: + return SUCCEEDED; + case 2: + return FAILED; + 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 TaskOutcome findValueByNumber(int number) { + return TaskOutcome.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 google.maps.fleetengine.delivery.v1.Task.getDescriptor().getEnumTypes().get(2); + } + + private static final TaskOutcome[] VALUES = values(); + + public static TaskOutcome 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 TaskOutcome(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:maps.fleetengine.delivery.v1.Task.TaskOutcome) + } + + /** + * + * + *
+   * The identity of the source that populated the `task_outcome_location`.
+   * 
+ * + * Protobuf enum {@code maps.fleetengine.delivery.v1.Task.TaskOutcomeLocationSource} + */ + public enum TaskOutcomeLocationSource implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The task outcome before it is set.
+     * 
+ * + * TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED = 0; + */ + TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED(0), + /** + * + * + *
+     * The provider-specified the `task_outcome_location`.
+     * 
+ * + * PROVIDER = 2; + */ + PROVIDER(2), + /** + * + * + *
+     * The provider didn't specify the `task_outcome_location`, so Fleet Engine
+     * used the last known vehicle location.
+     * 
+ * + * LAST_VEHICLE_LOCATION = 3; + */ + LAST_VEHICLE_LOCATION(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The task outcome before it is set.
+     * 
+ * + * TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED = 0; + */ + public static final int TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The provider-specified the `task_outcome_location`.
+     * 
+ * + * PROVIDER = 2; + */ + public static final int PROVIDER_VALUE = 2; + /** + * + * + *
+     * The provider didn't specify the `task_outcome_location`, so Fleet Engine
+     * used the last known vehicle location.
+     * 
+ * + * LAST_VEHICLE_LOCATION = 3; + */ + public static final int LAST_VEHICLE_LOCATION_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 TaskOutcomeLocationSource 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 TaskOutcomeLocationSource forNumber(int value) { + switch (value) { + case 0: + return TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED; + case 2: + return PROVIDER; + case 3: + return LAST_VEHICLE_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 TaskOutcomeLocationSource findValueByNumber(int number) { + return TaskOutcomeLocationSource.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 google.maps.fleetengine.delivery.v1.Task.getDescriptor().getEnumTypes().get(3); + } + + private static final TaskOutcomeLocationSource[] VALUES = values(); + + public static TaskOutcomeLocationSource 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 TaskOutcomeLocationSource(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:maps.fleetengine.delivery.v1.Task.TaskOutcomeLocationSource) + } + + public interface JourneySharingInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.delivery.v1.Task.JourneySharingInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Tracking information for the stops that the assigned vehicle will make
+     * before it completes this Task. Note that this list can contain stops
+     * from other tasks.
+     *
+     * The first segment,
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
+     * or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
+     * contains route information from the driver's last known location to the
+     * upcoming `VehicleStop`. Current route information usually comes from the
+     * driver app, except for some cases noted in the documentation for
+     * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+     * The other segments in
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
+     * `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
+     * populated by Fleet Engine. They provide route information between the
+     * remaining `VehicleStops`.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 1; + * + */ + java.util.List + getRemainingVehicleJourneySegmentsList(); + /** + * + * + *
+     * Tracking information for the stops that the assigned vehicle will make
+     * before it completes this Task. Note that this list can contain stops
+     * from other tasks.
+     *
+     * The first segment,
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
+     * or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
+     * contains route information from the driver's last known location to the
+     * upcoming `VehicleStop`. Current route information usually comes from the
+     * driver app, except for some cases noted in the documentation for
+     * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+     * The other segments in
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
+     * `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
+     * populated by Fleet Engine. They provide route information between the
+     * remaining `VehicleStops`.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 1; + * + */ + google.maps.fleetengine.delivery.v1.VehicleJourneySegment getRemainingVehicleJourneySegments( + int index); + /** + * + * + *
+     * Tracking information for the stops that the assigned vehicle will make
+     * before it completes this Task. Note that this list can contain stops
+     * from other tasks.
+     *
+     * The first segment,
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
+     * or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
+     * contains route information from the driver's last known location to the
+     * upcoming `VehicleStop`. Current route information usually comes from the
+     * driver app, except for some cases noted in the documentation for
+     * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+     * The other segments in
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
+     * `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
+     * populated by Fleet Engine. They provide route information between the
+     * remaining `VehicleStops`.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 1; + * + */ + int getRemainingVehicleJourneySegmentsCount(); + /** + * + * + *
+     * Tracking information for the stops that the assigned vehicle will make
+     * before it completes this Task. Note that this list can contain stops
+     * from other tasks.
+     *
+     * The first segment,
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
+     * or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
+     * contains route information from the driver's last known location to the
+     * upcoming `VehicleStop`. Current route information usually comes from the
+     * driver app, except for some cases noted in the documentation for
+     * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+     * The other segments in
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
+     * `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
+     * populated by Fleet Engine. They provide route information between the
+     * remaining `VehicleStops`.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 1; + * + */ + java.util.List + getRemainingVehicleJourneySegmentsOrBuilderList(); + /** + * + * + *
+     * Tracking information for the stops that the assigned vehicle will make
+     * before it completes this Task. Note that this list can contain stops
+     * from other tasks.
+     *
+     * The first segment,
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
+     * or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
+     * contains route information from the driver's last known location to the
+     * upcoming `VehicleStop`. Current route information usually comes from the
+     * driver app, except for some cases noted in the documentation for
+     * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+     * The other segments in
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
+     * `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
+     * populated by Fleet Engine. They provide route information between the
+     * remaining `VehicleStops`.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 1; + * + */ + google.maps.fleetengine.delivery.v1.VehicleJourneySegmentOrBuilder + getRemainingVehicleJourneySegmentsOrBuilder(int index); + + /** + * + * + *
+     * Indicates the vehicle's last reported location of the assigned vehicle.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; + * + * @return Whether the lastLocation field is set. + */ + boolean hasLastLocation(); + /** + * + * + *
+     * Indicates the vehicle's last reported location of the assigned vehicle.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; + * + * @return The lastLocation. + */ + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation getLastLocation(); + /** + * + * + *
+     * Indicates the vehicle's last reported location of the assigned vehicle.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; + */ + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationOrBuilder getLastLocationOrBuilder(); + + /** + * + * + *
+     * Indicates whether the vehicle's lastLocation can be snapped to
+     * the `current_route_segment`. This value is False if either
+     * `last_location` or `current_route_segment` don't exist. This value is
+     * computed by Fleet Engine. Updates from clients are ignored.
+     * 
+ * + * bool last_location_snappable = 3; + * + * @return The lastLocationSnappable. + */ + boolean getLastLocationSnappable(); + } + /** + * + * + *
+   * Journey sharing specific fields.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.Task.JourneySharingInfo} + */ + public static final class JourneySharingInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.delivery.v1.Task.JourneySharingInfo) + JourneySharingInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use JourneySharingInfo.newBuilder() to construct. + private JourneySharingInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private JourneySharingInfo() { + remainingVehicleJourneySegments_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new JourneySharingInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.Tasks + .internal_static_maps_fleetengine_delivery_v1_Task_JourneySharingInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.Tasks + .internal_static_maps_fleetengine_delivery_v1_Task_JourneySharingInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo.class, + google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo.Builder.class); + } + + public static final int REMAINING_VEHICLE_JOURNEY_SEGMENTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + remainingVehicleJourneySegments_; + /** + * + * + *
+     * Tracking information for the stops that the assigned vehicle will make
+     * before it completes this Task. Note that this list can contain stops
+     * from other tasks.
+     *
+     * The first segment,
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
+     * or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
+     * contains route information from the driver's last known location to the
+     * upcoming `VehicleStop`. Current route information usually comes from the
+     * driver app, except for some cases noted in the documentation for
+     * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+     * The other segments in
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
+     * `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
+     * populated by Fleet Engine. They provide route information between the
+     * remaining `VehicleStops`.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 1; + * + */ + @java.lang.Override + public java.util.List + getRemainingVehicleJourneySegmentsList() { + return remainingVehicleJourneySegments_; + } + /** + * + * + *
+     * Tracking information for the stops that the assigned vehicle will make
+     * before it completes this Task. Note that this list can contain stops
+     * from other tasks.
+     *
+     * The first segment,
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
+     * or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
+     * contains route information from the driver's last known location to the
+     * upcoming `VehicleStop`. Current route information usually comes from the
+     * driver app, except for some cases noted in the documentation for
+     * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+     * The other segments in
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
+     * `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
+     * populated by Fleet Engine. They provide route information between the
+     * remaining `VehicleStops`.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends google.maps.fleetengine.delivery.v1.VehicleJourneySegmentOrBuilder> + getRemainingVehicleJourneySegmentsOrBuilderList() { + return remainingVehicleJourneySegments_; + } + /** + * + * + *
+     * Tracking information for the stops that the assigned vehicle will make
+     * before it completes this Task. Note that this list can contain stops
+     * from other tasks.
+     *
+     * The first segment,
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
+     * or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
+     * contains route information from the driver's last known location to the
+     * upcoming `VehicleStop`. Current route information usually comes from the
+     * driver app, except for some cases noted in the documentation for
+     * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+     * The other segments in
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
+     * `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
+     * populated by Fleet Engine. They provide route information between the
+     * remaining `VehicleStops`.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 1; + * + */ + @java.lang.Override + public int getRemainingVehicleJourneySegmentsCount() { + return remainingVehicleJourneySegments_.size(); + } + /** + * + * + *
+     * Tracking information for the stops that the assigned vehicle will make
+     * before it completes this Task. Note that this list can contain stops
+     * from other tasks.
+     *
+     * The first segment,
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
+     * or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
+     * contains route information from the driver's last known location to the
+     * upcoming `VehicleStop`. Current route information usually comes from the
+     * driver app, except for some cases noted in the documentation for
+     * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+     * The other segments in
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
+     * `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
+     * populated by Fleet Engine. They provide route information between the
+     * remaining `VehicleStops`.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 1; + * + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.VehicleJourneySegment + getRemainingVehicleJourneySegments(int index) { + return remainingVehicleJourneySegments_.get(index); + } + /** + * + * + *
+     * Tracking information for the stops that the assigned vehicle will make
+     * before it completes this Task. Note that this list can contain stops
+     * from other tasks.
+     *
+     * The first segment,
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
+     * or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
+     * contains route information from the driver's last known location to the
+     * upcoming `VehicleStop`. Current route information usually comes from the
+     * driver app, except for some cases noted in the documentation for
+     * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+     * The other segments in
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
+     * `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
+     * populated by Fleet Engine. They provide route information between the
+     * remaining `VehicleStops`.
+     * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 1; + * + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.VehicleJourneySegmentOrBuilder + getRemainingVehicleJourneySegmentsOrBuilder(int index) { + return remainingVehicleJourneySegments_.get(index); + } + + public static final int LAST_LOCATION_FIELD_NUMBER = 2; + private google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation lastLocation_; + /** + * + * + *
+     * Indicates the vehicle's last reported location of the assigned vehicle.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; + * + * @return Whether the lastLocation field is set. + */ + @java.lang.Override + public boolean hasLastLocation() { + return lastLocation_ != null; + } + /** + * + * + *
+     * Indicates the vehicle's last reported location of the assigned vehicle.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; + * + * @return The lastLocation. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation getLastLocation() { + return lastLocation_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation.getDefaultInstance() + : lastLocation_; + } + /** + * + * + *
+     * Indicates the vehicle's last reported location of the assigned vehicle.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationOrBuilder + getLastLocationOrBuilder() { + return lastLocation_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation.getDefaultInstance() + : lastLocation_; + } + + public static final int LAST_LOCATION_SNAPPABLE_FIELD_NUMBER = 3; + private boolean lastLocationSnappable_ = false; + /** + * + * + *
+     * Indicates whether the vehicle's lastLocation can be snapped to
+     * the `current_route_segment`. This value is False if either
+     * `last_location` or `current_route_segment` don't exist. This value is
+     * computed by Fleet Engine. Updates from clients are ignored.
+     * 
+ * + * bool last_location_snappable = 3; + * + * @return The lastLocationSnappable. + */ + @java.lang.Override + public boolean getLastLocationSnappable() { + return lastLocationSnappable_; + } + + 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 < remainingVehicleJourneySegments_.size(); i++) { + output.writeMessage(1, remainingVehicleJourneySegments_.get(i)); + } + if (lastLocation_ != null) { + output.writeMessage(2, getLastLocation()); + } + if (lastLocationSnappable_ != false) { + output.writeBool(3, lastLocationSnappable_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < remainingVehicleJourneySegments_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, remainingVehicleJourneySegments_.get(i)); + } + if (lastLocation_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getLastLocation()); + } + if (lastLocationSnappable_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, lastLocationSnappable_); + } + 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 google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo)) { + return super.equals(obj); + } + google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo other = + (google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo) obj; + + if (!getRemainingVehicleJourneySegmentsList() + .equals(other.getRemainingVehicleJourneySegmentsList())) return false; + if (hasLastLocation() != other.hasLastLocation()) return false; + if (hasLastLocation()) { + if (!getLastLocation().equals(other.getLastLocation())) return false; + } + if (getLastLocationSnappable() != other.getLastLocationSnappable()) 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 (getRemainingVehicleJourneySegmentsCount() > 0) { + hash = (37 * hash) + REMAINING_VEHICLE_JOURNEY_SEGMENTS_FIELD_NUMBER; + hash = (53 * hash) + getRemainingVehicleJourneySegmentsList().hashCode(); + } + 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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo 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 google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo 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 google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo 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( + google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo 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; + } + /** + * + * + *
+     * Journey sharing specific fields.
+     * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.Task.JourneySharingInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.delivery.v1.Task.JourneySharingInfo) + google.maps.fleetengine.delivery.v1.Task.JourneySharingInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.Tasks + .internal_static_maps_fleetengine_delivery_v1_Task_JourneySharingInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.Tasks + .internal_static_maps_fleetengine_delivery_v1_Task_JourneySharingInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo.class, + google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo.Builder.class); + } + + // Construct using google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (remainingVehicleJourneySegmentsBuilder_ == null) { + remainingVehicleJourneySegments_ = java.util.Collections.emptyList(); + } else { + remainingVehicleJourneySegments_ = null; + remainingVehicleJourneySegmentsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + lastLocation_ = null; + if (lastLocationBuilder_ != null) { + lastLocationBuilder_.dispose(); + lastLocationBuilder_ = null; + } + lastLocationSnappable_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return google.maps.fleetengine.delivery.v1.Tasks + .internal_static_maps_fleetengine_delivery_v1_Task_JourneySharingInfo_descriptor; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo + getDefaultInstanceForType() { + return google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo.getDefaultInstance(); + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo build() { + google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo buildPartial() { + google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo result = + new google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo result) { + if (remainingVehicleJourneySegmentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + remainingVehicleJourneySegments_ = + java.util.Collections.unmodifiableList(remainingVehicleJourneySegments_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.remainingVehicleJourneySegments_ = remainingVehicleJourneySegments_; + } else { + result.remainingVehicleJourneySegments_ = remainingVehicleJourneySegmentsBuilder_.build(); + } + } + + private void buildPartial0( + google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.lastLocation_ = + lastLocationBuilder_ == null ? lastLocation_ : lastLocationBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.lastLocationSnappable_ = lastLocationSnappable_; + } + } + + @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 google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo) { + return mergeFrom((google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo other) { + if (other + == google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo.getDefaultInstance()) + return this; + if (remainingVehicleJourneySegmentsBuilder_ == null) { + if (!other.remainingVehicleJourneySegments_.isEmpty()) { + if (remainingVehicleJourneySegments_.isEmpty()) { + remainingVehicleJourneySegments_ = other.remainingVehicleJourneySegments_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRemainingVehicleJourneySegmentsIsMutable(); + remainingVehicleJourneySegments_.addAll(other.remainingVehicleJourneySegments_); + } + onChanged(); + } + } else { + if (!other.remainingVehicleJourneySegments_.isEmpty()) { + if (remainingVehicleJourneySegmentsBuilder_.isEmpty()) { + remainingVehicleJourneySegmentsBuilder_.dispose(); + remainingVehicleJourneySegmentsBuilder_ = null; + remainingVehicleJourneySegments_ = other.remainingVehicleJourneySegments_; + bitField0_ = (bitField0_ & ~0x00000001); + remainingVehicleJourneySegmentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRemainingVehicleJourneySegmentsFieldBuilder() + : null; + } else { + remainingVehicleJourneySegmentsBuilder_.addAllMessages( + other.remainingVehicleJourneySegments_); + } + } + } + if (other.hasLastLocation()) { + mergeLastLocation(other.getLastLocation()); + } + if (other.getLastLocationSnappable() != false) { + setLastLocationSnappable(other.getLastLocationSnappable()); + } + 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: + { + google.maps.fleetengine.delivery.v1.VehicleJourneySegment m = + input.readMessage( + google.maps.fleetengine.delivery.v1.VehicleJourneySegment.parser(), + extensionRegistry); + if (remainingVehicleJourneySegmentsBuilder_ == null) { + ensureRemainingVehicleJourneySegmentsIsMutable(); + remainingVehicleJourneySegments_.add(m); + } else { + remainingVehicleJourneySegmentsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + input.readMessage(getLastLocationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + lastLocationSnappable_ = input.readBool(); + 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 + remainingVehicleJourneySegments_ = java.util.Collections.emptyList(); + + private void ensureRemainingVehicleJourneySegmentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + remainingVehicleJourneySegments_ = + new java.util.ArrayList( + remainingVehicleJourneySegments_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + google.maps.fleetengine.delivery.v1.VehicleJourneySegment, + google.maps.fleetengine.delivery.v1.VehicleJourneySegment.Builder, + google.maps.fleetengine.delivery.v1.VehicleJourneySegmentOrBuilder> + remainingVehicleJourneySegmentsBuilder_; + + /** + * + * + *
+       * Tracking information for the stops that the assigned vehicle will make
+       * before it completes this Task. Note that this list can contain stops
+       * from other tasks.
+       *
+       * The first segment,
+       * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
+       * or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
+       * contains route information from the driver's last known location to the
+       * upcoming `VehicleStop`. Current route information usually comes from the
+       * driver app, except for some cases noted in the documentation for
+       * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+       * The other segments in
+       * `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
+       * `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
+       * populated by Fleet Engine. They provide route information between the
+       * remaining `VehicleStops`.
+       * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 1; + * + */ + public java.util.List + getRemainingVehicleJourneySegmentsList() { + if (remainingVehicleJourneySegmentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(remainingVehicleJourneySegments_); + } else { + return remainingVehicleJourneySegmentsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Tracking information for the stops that the assigned vehicle will make
+       * before it completes this Task. Note that this list can contain stops
+       * from other tasks.
+       *
+       * The first segment,
+       * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
+       * or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
+       * contains route information from the driver's last known location to the
+       * upcoming `VehicleStop`. Current route information usually comes from the
+       * driver app, except for some cases noted in the documentation for
+       * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+       * The other segments in
+       * `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
+       * `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
+       * populated by Fleet Engine. They provide route information between the
+       * remaining `VehicleStops`.
+       * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 1; + * + */ + public int getRemainingVehicleJourneySegmentsCount() { + if (remainingVehicleJourneySegmentsBuilder_ == null) { + return remainingVehicleJourneySegments_.size(); + } else { + return remainingVehicleJourneySegmentsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Tracking information for the stops that the assigned vehicle will make
+       * before it completes this Task. Note that this list can contain stops
+       * from other tasks.
+       *
+       * The first segment,
+       * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
+       * or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
+       * contains route information from the driver's last known location to the
+       * upcoming `VehicleStop`. Current route information usually comes from the
+       * driver app, except for some cases noted in the documentation for
+       * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+       * The other segments in
+       * `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
+       * `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
+       * populated by Fleet Engine. They provide route information between the
+       * remaining `VehicleStops`.
+       * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 1; + * + */ + public google.maps.fleetengine.delivery.v1.VehicleJourneySegment + getRemainingVehicleJourneySegments(int index) { + if (remainingVehicleJourneySegmentsBuilder_ == null) { + return remainingVehicleJourneySegments_.get(index); + } else { + return remainingVehicleJourneySegmentsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Tracking information for the stops that the assigned vehicle will make
+       * before it completes this Task. Note that this list can contain stops
+       * from other tasks.
+       *
+       * The first segment,
+       * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
+       * or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
+       * contains route information from the driver's last known location to the
+       * upcoming `VehicleStop`. Current route information usually comes from the
+       * driver app, except for some cases noted in the documentation for
+       * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+       * The other segments in
+       * `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
+       * `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
+       * populated by Fleet Engine. They provide route information between the
+       * remaining `VehicleStops`.
+       * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 1; + * + */ + public Builder setRemainingVehicleJourneySegments( + int index, google.maps.fleetengine.delivery.v1.VehicleJourneySegment value) { + if (remainingVehicleJourneySegmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRemainingVehicleJourneySegmentsIsMutable(); + remainingVehicleJourneySegments_.set(index, value); + onChanged(); + } else { + remainingVehicleJourneySegmentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Tracking information for the stops that the assigned vehicle will make
+       * before it completes this Task. Note that this list can contain stops
+       * from other tasks.
+       *
+       * The first segment,
+       * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
+       * or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
+       * contains route information from the driver's last known location to the
+       * upcoming `VehicleStop`. Current route information usually comes from the
+       * driver app, except for some cases noted in the documentation for
+       * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+       * The other segments in
+       * `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
+       * `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
+       * populated by Fleet Engine. They provide route information between the
+       * remaining `VehicleStops`.
+       * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 1; + * + */ + public Builder setRemainingVehicleJourneySegments( + int index, + google.maps.fleetengine.delivery.v1.VehicleJourneySegment.Builder builderForValue) { + if (remainingVehicleJourneySegmentsBuilder_ == null) { + ensureRemainingVehicleJourneySegmentsIsMutable(); + remainingVehicleJourneySegments_.set(index, builderForValue.build()); + onChanged(); + } else { + remainingVehicleJourneySegmentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Tracking information for the stops that the assigned vehicle will make
+       * before it completes this Task. Note that this list can contain stops
+       * from other tasks.
+       *
+       * The first segment,
+       * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
+       * or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
+       * contains route information from the driver's last known location to the
+       * upcoming `VehicleStop`. Current route information usually comes from the
+       * driver app, except for some cases noted in the documentation for
+       * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+       * The other segments in
+       * `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
+       * `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
+       * populated by Fleet Engine. They provide route information between the
+       * remaining `VehicleStops`.
+       * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 1; + * + */ + public Builder addRemainingVehicleJourneySegments( + google.maps.fleetengine.delivery.v1.VehicleJourneySegment value) { + if (remainingVehicleJourneySegmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRemainingVehicleJourneySegmentsIsMutable(); + remainingVehicleJourneySegments_.add(value); + onChanged(); + } else { + remainingVehicleJourneySegmentsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Tracking information for the stops that the assigned vehicle will make
+       * before it completes this Task. Note that this list can contain stops
+       * from other tasks.
+       *
+       * The first segment,
+       * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
+       * or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
+       * contains route information from the driver's last known location to the
+       * upcoming `VehicleStop`. Current route information usually comes from the
+       * driver app, except for some cases noted in the documentation for
+       * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+       * The other segments in
+       * `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
+       * `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
+       * populated by Fleet Engine. They provide route information between the
+       * remaining `VehicleStops`.
+       * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 1; + * + */ + public Builder addRemainingVehicleJourneySegments( + int index, google.maps.fleetengine.delivery.v1.VehicleJourneySegment value) { + if (remainingVehicleJourneySegmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRemainingVehicleJourneySegmentsIsMutable(); + remainingVehicleJourneySegments_.add(index, value); + onChanged(); + } else { + remainingVehicleJourneySegmentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Tracking information for the stops that the assigned vehicle will make
+       * before it completes this Task. Note that this list can contain stops
+       * from other tasks.
+       *
+       * The first segment,
+       * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
+       * or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
+       * contains route information from the driver's last known location to the
+       * upcoming `VehicleStop`. Current route information usually comes from the
+       * driver app, except for some cases noted in the documentation for
+       * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+       * The other segments in
+       * `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
+       * `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
+       * populated by Fleet Engine. They provide route information between the
+       * remaining `VehicleStops`.
+       * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 1; + * + */ + public Builder addRemainingVehicleJourneySegments( + google.maps.fleetengine.delivery.v1.VehicleJourneySegment.Builder builderForValue) { + if (remainingVehicleJourneySegmentsBuilder_ == null) { + ensureRemainingVehicleJourneySegmentsIsMutable(); + remainingVehicleJourneySegments_.add(builderForValue.build()); + onChanged(); + } else { + remainingVehicleJourneySegmentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Tracking information for the stops that the assigned vehicle will make
+       * before it completes this Task. Note that this list can contain stops
+       * from other tasks.
+       *
+       * The first segment,
+       * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
+       * or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
+       * contains route information from the driver's last known location to the
+       * upcoming `VehicleStop`. Current route information usually comes from the
+       * driver app, except for some cases noted in the documentation for
+       * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+       * The other segments in
+       * `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
+       * `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
+       * populated by Fleet Engine. They provide route information between the
+       * remaining `VehicleStops`.
+       * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 1; + * + */ + public Builder addRemainingVehicleJourneySegments( + int index, + google.maps.fleetengine.delivery.v1.VehicleJourneySegment.Builder builderForValue) { + if (remainingVehicleJourneySegmentsBuilder_ == null) { + ensureRemainingVehicleJourneySegmentsIsMutable(); + remainingVehicleJourneySegments_.add(index, builderForValue.build()); + onChanged(); + } else { + remainingVehicleJourneySegmentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Tracking information for the stops that the assigned vehicle will make
+       * before it completes this Task. Note that this list can contain stops
+       * from other tasks.
+       *
+       * The first segment,
+       * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
+       * or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
+       * contains route information from the driver's last known location to the
+       * upcoming `VehicleStop`. Current route information usually comes from the
+       * driver app, except for some cases noted in the documentation for
+       * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+       * The other segments in
+       * `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
+       * `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
+       * populated by Fleet Engine. They provide route information between the
+       * remaining `VehicleStops`.
+       * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 1; + * + */ + public Builder addAllRemainingVehicleJourneySegments( + java.lang.Iterable + values) { + if (remainingVehicleJourneySegmentsBuilder_ == null) { + ensureRemainingVehicleJourneySegmentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, remainingVehicleJourneySegments_); + onChanged(); + } else { + remainingVehicleJourneySegmentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Tracking information for the stops that the assigned vehicle will make
+       * before it completes this Task. Note that this list can contain stops
+       * from other tasks.
+       *
+       * The first segment,
+       * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
+       * or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
+       * contains route information from the driver's last known location to the
+       * upcoming `VehicleStop`. Current route information usually comes from the
+       * driver app, except for some cases noted in the documentation for
+       * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+       * The other segments in
+       * `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
+       * `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
+       * populated by Fleet Engine. They provide route information between the
+       * remaining `VehicleStops`.
+       * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 1; + * + */ + public Builder clearRemainingVehicleJourneySegments() { + if (remainingVehicleJourneySegmentsBuilder_ == null) { + remainingVehicleJourneySegments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + remainingVehicleJourneySegmentsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Tracking information for the stops that the assigned vehicle will make
+       * before it completes this Task. Note that this list can contain stops
+       * from other tasks.
+       *
+       * The first segment,
+       * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
+       * or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
+       * contains route information from the driver's last known location to the
+       * upcoming `VehicleStop`. Current route information usually comes from the
+       * driver app, except for some cases noted in the documentation for
+       * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+       * The other segments in
+       * `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
+       * `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
+       * populated by Fleet Engine. They provide route information between the
+       * remaining `VehicleStops`.
+       * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 1; + * + */ + public Builder removeRemainingVehicleJourneySegments(int index) { + if (remainingVehicleJourneySegmentsBuilder_ == null) { + ensureRemainingVehicleJourneySegmentsIsMutable(); + remainingVehicleJourneySegments_.remove(index); + onChanged(); + } else { + remainingVehicleJourneySegmentsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Tracking information for the stops that the assigned vehicle will make
+       * before it completes this Task. Note that this list can contain stops
+       * from other tasks.
+       *
+       * The first segment,
+       * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
+       * or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
+       * contains route information from the driver's last known location to the
+       * upcoming `VehicleStop`. Current route information usually comes from the
+       * driver app, except for some cases noted in the documentation for
+       * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+       * The other segments in
+       * `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
+       * `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
+       * populated by Fleet Engine. They provide route information between the
+       * remaining `VehicleStops`.
+       * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 1; + * + */ + public google.maps.fleetengine.delivery.v1.VehicleJourneySegment.Builder + getRemainingVehicleJourneySegmentsBuilder(int index) { + return getRemainingVehicleJourneySegmentsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Tracking information for the stops that the assigned vehicle will make
+       * before it completes this Task. Note that this list can contain stops
+       * from other tasks.
+       *
+       * The first segment,
+       * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
+       * or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
+       * contains route information from the driver's last known location to the
+       * upcoming `VehicleStop`. Current route information usually comes from the
+       * driver app, except for some cases noted in the documentation for
+       * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+       * The other segments in
+       * `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
+       * `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
+       * populated by Fleet Engine. They provide route information between the
+       * remaining `VehicleStops`.
+       * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 1; + * + */ + public google.maps.fleetengine.delivery.v1.VehicleJourneySegmentOrBuilder + getRemainingVehicleJourneySegmentsOrBuilder(int index) { + if (remainingVehicleJourneySegmentsBuilder_ == null) { + return remainingVehicleJourneySegments_.get(index); + } else { + return remainingVehicleJourneySegmentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Tracking information for the stops that the assigned vehicle will make
+       * before it completes this Task. Note that this list can contain stops
+       * from other tasks.
+       *
+       * The first segment,
+       * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
+       * or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
+       * contains route information from the driver's last known location to the
+       * upcoming `VehicleStop`. Current route information usually comes from the
+       * driver app, except for some cases noted in the documentation for
+       * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+       * The other segments in
+       * `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
+       * `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
+       * populated by Fleet Engine. They provide route information between the
+       * remaining `VehicleStops`.
+       * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 1; + * + */ + public java.util.List< + ? extends google.maps.fleetengine.delivery.v1.VehicleJourneySegmentOrBuilder> + getRemainingVehicleJourneySegmentsOrBuilderList() { + if (remainingVehicleJourneySegmentsBuilder_ != null) { + return remainingVehicleJourneySegmentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(remainingVehicleJourneySegments_); + } + } + /** + * + * + *
+       * Tracking information for the stops that the assigned vehicle will make
+       * before it completes this Task. Note that this list can contain stops
+       * from other tasks.
+       *
+       * The first segment,
+       * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
+       * or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
+       * contains route information from the driver's last known location to the
+       * upcoming `VehicleStop`. Current route information usually comes from the
+       * driver app, except for some cases noted in the documentation for
+       * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+       * The other segments in
+       * `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
+       * `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
+       * populated by Fleet Engine. They provide route information between the
+       * remaining `VehicleStops`.
+       * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 1; + * + */ + public google.maps.fleetengine.delivery.v1.VehicleJourneySegment.Builder + addRemainingVehicleJourneySegmentsBuilder() { + return getRemainingVehicleJourneySegmentsFieldBuilder() + .addBuilder( + google.maps.fleetengine.delivery.v1.VehicleJourneySegment.getDefaultInstance()); + } + /** + * + * + *
+       * Tracking information for the stops that the assigned vehicle will make
+       * before it completes this Task. Note that this list can contain stops
+       * from other tasks.
+       *
+       * The first segment,
+       * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
+       * or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
+       * contains route information from the driver's last known location to the
+       * upcoming `VehicleStop`. Current route information usually comes from the
+       * driver app, except for some cases noted in the documentation for
+       * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+       * The other segments in
+       * `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
+       * `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
+       * populated by Fleet Engine. They provide route information between the
+       * remaining `VehicleStops`.
+       * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 1; + * + */ + public google.maps.fleetengine.delivery.v1.VehicleJourneySegment.Builder + addRemainingVehicleJourneySegmentsBuilder(int index) { + return getRemainingVehicleJourneySegmentsFieldBuilder() + .addBuilder( + index, + google.maps.fleetengine.delivery.v1.VehicleJourneySegment.getDefaultInstance()); + } + /** + * + * + *
+       * Tracking information for the stops that the assigned vehicle will make
+       * before it completes this Task. Note that this list can contain stops
+       * from other tasks.
+       *
+       * The first segment,
+       * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
+       * or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
+       * contains route information from the driver's last known location to the
+       * upcoming `VehicleStop`. Current route information usually comes from the
+       * driver app, except for some cases noted in the documentation for
+       * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment].
+       * The other segments in
+       * `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
+       * `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
+       * populated by Fleet Engine. They provide route information between the
+       * remaining `VehicleStops`.
+       * 
+ * + * + * repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 1; + * + */ + public java.util.List + getRemainingVehicleJourneySegmentsBuilderList() { + return getRemainingVehicleJourneySegmentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + google.maps.fleetengine.delivery.v1.VehicleJourneySegment, + google.maps.fleetengine.delivery.v1.VehicleJourneySegment.Builder, + google.maps.fleetengine.delivery.v1.VehicleJourneySegmentOrBuilder> + getRemainingVehicleJourneySegmentsFieldBuilder() { + if (remainingVehicleJourneySegmentsBuilder_ == null) { + remainingVehicleJourneySegmentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + google.maps.fleetengine.delivery.v1.VehicleJourneySegment, + google.maps.fleetengine.delivery.v1.VehicleJourneySegment.Builder, + google.maps.fleetengine.delivery.v1.VehicleJourneySegmentOrBuilder>( + remainingVehicleJourneySegments_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + remainingVehicleJourneySegments_ = null; + } + return remainingVehicleJourneySegmentsBuilder_; + } + + private google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation lastLocation_; + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation, + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation.Builder, + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationOrBuilder> + lastLocationBuilder_; + /** + * + * + *
+       * Indicates the vehicle's last reported location of the assigned vehicle.
+       * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; + * + * @return Whether the lastLocation field is set. + */ + public boolean hasLastLocation() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * Indicates the vehicle's last reported location of the assigned vehicle.
+       * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; + * + * @return The lastLocation. + */ + public google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation getLastLocation() { + if (lastLocationBuilder_ == null) { + return lastLocation_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation.getDefaultInstance() + : lastLocation_; + } else { + return lastLocationBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Indicates the vehicle's last reported location of the assigned vehicle.
+       * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; + */ + public Builder setLastLocation( + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation value) { + if (lastLocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastLocation_ = value; + } else { + lastLocationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Indicates the vehicle's last reported location of the assigned vehicle.
+       * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; + */ + public Builder setLastLocation( + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation.Builder builderForValue) { + if (lastLocationBuilder_ == null) { + lastLocation_ = builderForValue.build(); + } else { + lastLocationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Indicates the vehicle's last reported location of the assigned vehicle.
+       * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; + */ + public Builder mergeLastLocation( + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation value) { + if (lastLocationBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && lastLocation_ != null + && lastLocation_ + != google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation + .getDefaultInstance()) { + getLastLocationBuilder().mergeFrom(value); + } else { + lastLocation_ = value; + } + } else { + lastLocationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Indicates the vehicle's last reported location of the assigned vehicle.
+       * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; + */ + public Builder clearLastLocation() { + bitField0_ = (bitField0_ & ~0x00000002); + lastLocation_ = null; + if (lastLocationBuilder_ != null) { + lastLocationBuilder_.dispose(); + lastLocationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Indicates the vehicle's last reported location of the assigned vehicle.
+       * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; + */ + public google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation.Builder + getLastLocationBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getLastLocationFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Indicates the vehicle's last reported location of the assigned vehicle.
+       * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; + */ + public google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationOrBuilder + getLastLocationOrBuilder() { + if (lastLocationBuilder_ != null) { + return lastLocationBuilder_.getMessageOrBuilder(); + } else { + return lastLocation_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation.getDefaultInstance() + : lastLocation_; + } + } + /** + * + * + *
+       * Indicates the vehicle's last reported location of the assigned vehicle.
+       * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation, + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation.Builder, + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationOrBuilder> + getLastLocationFieldBuilder() { + if (lastLocationBuilder_ == null) { + lastLocationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation, + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation.Builder, + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationOrBuilder>( + getLastLocation(), getParentForChildren(), isClean()); + lastLocation_ = null; + } + return lastLocationBuilder_; + } + + private boolean lastLocationSnappable_; + /** + * + * + *
+       * Indicates whether the vehicle's lastLocation can be snapped to
+       * the `current_route_segment`. This value is False if either
+       * `last_location` or `current_route_segment` don't exist. This value is
+       * computed by Fleet Engine. Updates from clients are ignored.
+       * 
+ * + * bool last_location_snappable = 3; + * + * @return The lastLocationSnappable. + */ + @java.lang.Override + public boolean getLastLocationSnappable() { + return lastLocationSnappable_; + } + /** + * + * + *
+       * Indicates whether the vehicle's lastLocation can be snapped to
+       * the `current_route_segment`. This value is False if either
+       * `last_location` or `current_route_segment` don't exist. This value is
+       * computed by Fleet Engine. Updates from clients are ignored.
+       * 
+ * + * bool last_location_snappable = 3; + * + * @param value The lastLocationSnappable to set. + * @return This builder for chaining. + */ + public Builder setLastLocationSnappable(boolean value) { + + lastLocationSnappable_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Indicates whether the vehicle's lastLocation can be snapped to
+       * the `current_route_segment`. This value is False if either
+       * `last_location` or `current_route_segment` don't exist. This value is
+       * computed by Fleet Engine. Updates from clients are ignored.
+       * 
+ * + * bool last_location_snappable = 3; + * + * @return This builder for chaining. + */ + public Builder clearLastLocationSnappable() { + bitField0_ = (bitField0_ & ~0x00000004); + lastLocationSnappable_ = 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.delivery.v1.Task.JourneySharingInfo) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.delivery.v1.Task.JourneySharingInfo) + private static final google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo(); + } + + public static google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public JourneySharingInfo 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 google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Must be in the format `providers/{provider}/tasks/{task}`.
+   * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+   * Must be in the format `providers/{provider}/tasks/{task}`.
+   * 
+ * + * string name = 1; + * + * @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 TYPE_FIELD_NUMBER = 2; + private int type_ = 0; + /** + * + * + *
+   * Required. Immutable. Defines the type of the Task. For example, a break or
+   * shipment.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * Required. Immutable. Defines the type of the Task. For example, a break or
+   * shipment.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The type. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.Task.Type getType() { + google.maps.fleetengine.delivery.v1.Task.Type result = + google.maps.fleetengine.delivery.v1.Task.Type.forNumber(type_); + return result == null ? google.maps.fleetengine.delivery.v1.Task.Type.UNRECOGNIZED : result; + } + + public static final int STATE_FIELD_NUMBER = 3; + private int state_ = 0; + /** + * + * + *
+   * Required. The current execution state of the Task.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.State state = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Required. The current execution state of the Task.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.State state = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The state. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.Task.State getState() { + google.maps.fleetengine.delivery.v1.Task.State result = + google.maps.fleetengine.delivery.v1.Task.State.forNumber(state_); + return result == null ? google.maps.fleetengine.delivery.v1.Task.State.UNRECOGNIZED : result; + } + + public static final int TASK_OUTCOME_FIELD_NUMBER = 9; + private int taskOutcome_ = 0; + /** + * + * + *
+   * The outcome of the Task.
+   * 
+ * + * .maps.fleetengine.delivery.v1.Task.TaskOutcome task_outcome = 9; + * + * @return The enum numeric value on the wire for taskOutcome. + */ + @java.lang.Override + public int getTaskOutcomeValue() { + return taskOutcome_; + } + /** + * + * + *
+   * The outcome of the Task.
+   * 
+ * + * .maps.fleetengine.delivery.v1.Task.TaskOutcome task_outcome = 9; + * + * @return The taskOutcome. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.Task.TaskOutcome getTaskOutcome() { + google.maps.fleetengine.delivery.v1.Task.TaskOutcome result = + google.maps.fleetengine.delivery.v1.Task.TaskOutcome.forNumber(taskOutcome_); + return result == null + ? google.maps.fleetengine.delivery.v1.Task.TaskOutcome.UNRECOGNIZED + : result; + } + + public static final int TASK_OUTCOME_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp taskOutcomeTime_; + /** + * + * + *
+   * The timestamp that indicates when the `Task`'s outcome was set by the
+   * provider.
+   * 
+ * + * .google.protobuf.Timestamp task_outcome_time = 10; + * + * @return Whether the taskOutcomeTime field is set. + */ + @java.lang.Override + public boolean hasTaskOutcomeTime() { + return taskOutcomeTime_ != null; + } + /** + * + * + *
+   * The timestamp that indicates when the `Task`'s outcome was set by the
+   * provider.
+   * 
+ * + * .google.protobuf.Timestamp task_outcome_time = 10; + * + * @return The taskOutcomeTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTaskOutcomeTime() { + return taskOutcomeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : taskOutcomeTime_; + } + /** + * + * + *
+   * The timestamp that indicates when the `Task`'s outcome was set by the
+   * provider.
+   * 
+ * + * .google.protobuf.Timestamp task_outcome_time = 10; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getTaskOutcomeTimeOrBuilder() { + return taskOutcomeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : taskOutcomeTime_; + } + + public static final int TASK_OUTCOME_LOCATION_FIELD_NUMBER = 11; + private google.maps.fleetengine.delivery.v1.LocationInfo taskOutcomeLocation_; + /** + * + * + *
+   * The location where the `Task`'s outcome was set. This value is updated as
+   * part of `UpdateTask`. If this value isn't explicitly updated by the
+   * provider, then Fleet Engine populates it by default with the last known
+   * vehicle location (the *raw* location).
+   * 
+ * + * .maps.fleetengine.delivery.v1.LocationInfo task_outcome_location = 11; + * + * @return Whether the taskOutcomeLocation field is set. + */ + @java.lang.Override + public boolean hasTaskOutcomeLocation() { + return taskOutcomeLocation_ != null; + } + /** + * + * + *
+   * The location where the `Task`'s outcome was set. This value is updated as
+   * part of `UpdateTask`. If this value isn't explicitly updated by the
+   * provider, then Fleet Engine populates it by default with the last known
+   * vehicle location (the *raw* location).
+   * 
+ * + * .maps.fleetengine.delivery.v1.LocationInfo task_outcome_location = 11; + * + * @return The taskOutcomeLocation. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.LocationInfo getTaskOutcomeLocation() { + return taskOutcomeLocation_ == null + ? google.maps.fleetengine.delivery.v1.LocationInfo.getDefaultInstance() + : taskOutcomeLocation_; + } + /** + * + * + *
+   * The location where the `Task`'s outcome was set. This value is updated as
+   * part of `UpdateTask`. If this value isn't explicitly updated by the
+   * provider, then Fleet Engine populates it by default with the last known
+   * vehicle location (the *raw* location).
+   * 
+ * + * .maps.fleetengine.delivery.v1.LocationInfo task_outcome_location = 11; + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.LocationInfoOrBuilder + getTaskOutcomeLocationOrBuilder() { + return taskOutcomeLocation_ == null + ? google.maps.fleetengine.delivery.v1.LocationInfo.getDefaultInstance() + : taskOutcomeLocation_; + } + + public static final int TASK_OUTCOME_LOCATION_SOURCE_FIELD_NUMBER = 12; + private int taskOutcomeLocationSource_ = 0; + /** + * + * + *
+   * Indicates where the value of the `task_outcome_location` came from.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.TaskOutcomeLocationSource task_outcome_location_source = 12; + * + * + * @return The enum numeric value on the wire for taskOutcomeLocationSource. + */ + @java.lang.Override + public int getTaskOutcomeLocationSourceValue() { + return taskOutcomeLocationSource_; + } + /** + * + * + *
+   * Indicates where the value of the `task_outcome_location` came from.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.TaskOutcomeLocationSource task_outcome_location_source = 12; + * + * + * @return The taskOutcomeLocationSource. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.Task.TaskOutcomeLocationSource + getTaskOutcomeLocationSource() { + google.maps.fleetengine.delivery.v1.Task.TaskOutcomeLocationSource result = + google.maps.fleetengine.delivery.v1.Task.TaskOutcomeLocationSource.forNumber( + taskOutcomeLocationSource_); + return result == null + ? google.maps.fleetengine.delivery.v1.Task.TaskOutcomeLocationSource.UNRECOGNIZED + : result; + } + + public static final int TRACKING_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object trackingId_ = ""; + /** + * + * + *
+   * Immutable. This field facilitates the storing of an ID so you can avoid
+   * using a complicated mapping. You cannot set `tracking_id` for Tasks of type
+   * `UNAVAILABLE` and `SCHEDULED_STOP`. These IDs are 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 tracking_id = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The trackingId. + */ + @java.lang.Override + public java.lang.String getTrackingId() { + java.lang.Object ref = trackingId_; + 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(); + trackingId_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. This field facilitates the storing of an ID so you can avoid
+   * using a complicated mapping. You cannot set `tracking_id` for Tasks of type
+   * `UNAVAILABLE` and `SCHEDULED_STOP`. These IDs are 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 tracking_id = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for trackingId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTrackingIdBytes() { + java.lang.Object ref = trackingId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + trackingId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DELIVERY_VEHICLE_ID_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object deliveryVehicleId_ = ""; + /** + * + * + *
+   * Output only. The ID of the vehicle that is executing this Task. Delivery
+   * Vehicle IDs are 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 delivery_vehicle_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The deliveryVehicleId. + */ + @java.lang.Override + public java.lang.String getDeliveryVehicleId() { + java.lang.Object ref = deliveryVehicleId_; + 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(); + deliveryVehicleId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The ID of the vehicle that is executing this Task. Delivery
+   * Vehicle IDs are 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 delivery_vehicle_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for deliveryVehicleId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDeliveryVehicleIdBytes() { + java.lang.Object ref = deliveryVehicleId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deliveryVehicleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PLANNED_LOCATION_FIELD_NUMBER = 6; + private google.maps.fleetengine.delivery.v1.LocationInfo plannedLocation_; + /** + * + * + *
+   * Immutable. The location where the Task will be completed.
+   * Optional for `UNAVAILABLE` Tasks, but required for all other Tasks.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the plannedLocation field is set. + */ + @java.lang.Override + public boolean hasPlannedLocation() { + return plannedLocation_ != null; + } + /** + * + * + *
+   * Immutable. The location where the Task will be completed.
+   * Optional for `UNAVAILABLE` Tasks, but required for all other Tasks.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The plannedLocation. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.LocationInfo getPlannedLocation() { + return plannedLocation_ == null + ? google.maps.fleetengine.delivery.v1.LocationInfo.getDefaultInstance() + : plannedLocation_; + } + /** + * + * + *
+   * Immutable. The location where the Task will be completed.
+   * Optional for `UNAVAILABLE` Tasks, but required for all other Tasks.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.LocationInfoOrBuilder getPlannedLocationOrBuilder() { + return plannedLocation_ == null + ? google.maps.fleetengine.delivery.v1.LocationInfo.getDefaultInstance() + : plannedLocation_; + } + + public static final int TASK_DURATION_FIELD_NUMBER = 7; + private com.google.protobuf.Duration taskDuration_; + /** + * + * + *
+   * Required. Immutable. The time needed to execute a Task at this location.
+   * 
+ * + * + * .google.protobuf.Duration task_duration = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the taskDuration field is set. + */ + @java.lang.Override + public boolean hasTaskDuration() { + return taskDuration_ != null; + } + /** + * + * + *
+   * Required. Immutable. The time needed to execute a Task at this location.
+   * 
+ * + * + * .google.protobuf.Duration task_duration = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The taskDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getTaskDuration() { + return taskDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : taskDuration_; + } + /** + * + * + *
+   * Required. Immutable. The time needed to execute a Task at this location.
+   * 
+ * + * + * .google.protobuf.Duration task_duration = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTaskDurationOrBuilder() { + return taskDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : taskDuration_; + } + + public static final int TARGET_TIME_WINDOW_FIELD_NUMBER = 14; + private google.maps.fleetengine.delivery.v1.TimeWindow targetTimeWindow_; + /** + * + * + *
+   * The time window during which the task should be completed.
+   * 
+ * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 14; + * + * @return Whether the targetTimeWindow field is set. + */ + @java.lang.Override + public boolean hasTargetTimeWindow() { + return targetTimeWindow_ != null; + } + /** + * + * + *
+   * The time window during which the task should be completed.
+   * 
+ * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 14; + * + * @return The targetTimeWindow. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TimeWindow getTargetTimeWindow() { + return targetTimeWindow_ == null + ? google.maps.fleetengine.delivery.v1.TimeWindow.getDefaultInstance() + : targetTimeWindow_; + } + /** + * + * + *
+   * The time window during which the task should be completed.
+   * 
+ * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 14; + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TimeWindowOrBuilder getTargetTimeWindowOrBuilder() { + return targetTimeWindow_ == null + ? google.maps.fleetengine.delivery.v1.TimeWindow.getDefaultInstance() + : targetTimeWindow_; + } + + public static final int JOURNEY_SHARING_INFO_FIELD_NUMBER = 8; + private google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo journeySharingInfo_; + /** + * + * + *
+   * Output only. Journey sharing-specific fields. Not populated when state is
+   * `CLOSED`.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.JourneySharingInfo journey_sharing_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the journeySharingInfo field is set. + */ + @java.lang.Override + public boolean hasJourneySharingInfo() { + return journeySharingInfo_ != null; + } + /** + * + * + *
+   * Output only. Journey sharing-specific fields. Not populated when state is
+   * `CLOSED`.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.JourneySharingInfo journey_sharing_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The journeySharingInfo. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo getJourneySharingInfo() { + return journeySharingInfo_ == null + ? google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo.getDefaultInstance() + : journeySharingInfo_; + } + /** + * + * + *
+   * Output only. Journey sharing-specific fields. Not populated when state is
+   * `CLOSED`.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.JourneySharingInfo journey_sharing_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.Task.JourneySharingInfoOrBuilder + getJourneySharingInfoOrBuilder() { + return journeySharingInfo_ == null + ? google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo.getDefaultInstance() + : journeySharingInfo_; + } + + public static final int TASK_TRACKING_VIEW_CONFIG_FIELD_NUMBER = 13; + private google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig taskTrackingViewConfig_; + /** + * + * + *
+   * The configuration for task tracking that specifies which data elements are
+   * visible to the end users under what circumstances.
+   * 
+ * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig task_tracking_view_config = 13; + * + * + * @return Whether the taskTrackingViewConfig field is set. + */ + @java.lang.Override + public boolean hasTaskTrackingViewConfig() { + return taskTrackingViewConfig_ != null; + } + /** + * + * + *
+   * The configuration for task tracking that specifies which data elements are
+   * visible to the end users under what circumstances.
+   * 
+ * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig task_tracking_view_config = 13; + * + * + * @return The taskTrackingViewConfig. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig getTaskTrackingViewConfig() { + return taskTrackingViewConfig_ == null + ? google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.getDefaultInstance() + : taskTrackingViewConfig_; + } + /** + * + * + *
+   * The configuration for task tracking that specifies which data elements are
+   * visible to the end users under what circumstances.
+   * 
+ * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig task_tracking_view_config = 13; + * + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfigOrBuilder + getTaskTrackingViewConfigOrBuilder() { + return taskTrackingViewConfig_ == null + ? google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.getDefaultInstance() + : taskTrackingViewConfig_; + } + + public static final int ATTRIBUTES_FIELD_NUMBER = 15; + + @SuppressWarnings("serial") + private java.util.List attributes_; + /** + * + * + *
+   * A list of custom Task attributes. Each attribute must have a unique key.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 15; + */ + @java.lang.Override + public java.util.List getAttributesList() { + return attributes_; + } + /** + * + * + *
+   * A list of custom Task attributes. Each attribute must have a unique key.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 15; + */ + @java.lang.Override + public java.util.List + getAttributesOrBuilderList() { + return attributes_; + } + /** + * + * + *
+   * A list of custom Task attributes. Each attribute must have a unique key.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 15; + */ + @java.lang.Override + public int getAttributesCount() { + return attributes_.size(); + } + /** + * + * + *
+   * A list of custom Task attributes. Each attribute must have a unique key.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 15; + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TaskAttribute getAttributes(int index) { + return attributes_.get(index); + } + /** + * + * + *
+   * A list of custom Task attributes. Each attribute must have a unique key.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 15; + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TaskAttributeOrBuilder 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (type_ != google.maps.fleetengine.delivery.v1.Task.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, type_); + } + if (state_ != google.maps.fleetengine.delivery.v1.Task.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(trackingId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, trackingId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deliveryVehicleId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, deliveryVehicleId_); + } + if (plannedLocation_ != null) { + output.writeMessage(6, getPlannedLocation()); + } + if (taskDuration_ != null) { + output.writeMessage(7, getTaskDuration()); + } + if (journeySharingInfo_ != null) { + output.writeMessage(8, getJourneySharingInfo()); + } + if (taskOutcome_ + != google.maps.fleetengine.delivery.v1.Task.TaskOutcome.TASK_OUTCOME_UNSPECIFIED + .getNumber()) { + output.writeEnum(9, taskOutcome_); + } + if (taskOutcomeTime_ != null) { + output.writeMessage(10, getTaskOutcomeTime()); + } + if (taskOutcomeLocation_ != null) { + output.writeMessage(11, getTaskOutcomeLocation()); + } + if (taskOutcomeLocationSource_ + != google.maps.fleetengine.delivery.v1.Task.TaskOutcomeLocationSource + .TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED + .getNumber()) { + output.writeEnum(12, taskOutcomeLocationSource_); + } + if (taskTrackingViewConfig_ != null) { + output.writeMessage(13, getTaskTrackingViewConfig()); + } + if (targetTimeWindow_ != null) { + output.writeMessage(14, getTargetTimeWindow()); + } + for (int i = 0; i < attributes_.size(); i++) { + output.writeMessage(15, attributes_.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 (type_ != google.maps.fleetengine.delivery.v1.Task.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, type_); + } + if (state_ != google.maps.fleetengine.delivery.v1.Task.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(trackingId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, trackingId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deliveryVehicleId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, deliveryVehicleId_); + } + if (plannedLocation_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getPlannedLocation()); + } + if (taskDuration_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getTaskDuration()); + } + if (journeySharingInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getJourneySharingInfo()); + } + if (taskOutcome_ + != google.maps.fleetengine.delivery.v1.Task.TaskOutcome.TASK_OUTCOME_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, taskOutcome_); + } + if (taskOutcomeTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getTaskOutcomeTime()); + } + if (taskOutcomeLocation_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(11, getTaskOutcomeLocation()); + } + if (taskOutcomeLocationSource_ + != google.maps.fleetengine.delivery.v1.Task.TaskOutcomeLocationSource + .TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, taskOutcomeLocationSource_); + } + if (taskTrackingViewConfig_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(13, getTaskTrackingViewConfig()); + } + if (targetTimeWindow_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getTargetTimeWindow()); + } + for (int i = 0; i < attributes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, 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 google.maps.fleetengine.delivery.v1.Task)) { + return super.equals(obj); + } + google.maps.fleetengine.delivery.v1.Task other = (google.maps.fleetengine.delivery.v1.Task) obj; + + if (!getName().equals(other.getName())) return false; + if (type_ != other.type_) return false; + if (state_ != other.state_) return false; + if (taskOutcome_ != other.taskOutcome_) return false; + if (hasTaskOutcomeTime() != other.hasTaskOutcomeTime()) return false; + if (hasTaskOutcomeTime()) { + if (!getTaskOutcomeTime().equals(other.getTaskOutcomeTime())) return false; + } + if (hasTaskOutcomeLocation() != other.hasTaskOutcomeLocation()) return false; + if (hasTaskOutcomeLocation()) { + if (!getTaskOutcomeLocation().equals(other.getTaskOutcomeLocation())) return false; + } + if (taskOutcomeLocationSource_ != other.taskOutcomeLocationSource_) return false; + if (!getTrackingId().equals(other.getTrackingId())) return false; + if (!getDeliveryVehicleId().equals(other.getDeliveryVehicleId())) return false; + if (hasPlannedLocation() != other.hasPlannedLocation()) return false; + if (hasPlannedLocation()) { + if (!getPlannedLocation().equals(other.getPlannedLocation())) return false; + } + if (hasTaskDuration() != other.hasTaskDuration()) return false; + if (hasTaskDuration()) { + if (!getTaskDuration().equals(other.getTaskDuration())) return false; + } + if (hasTargetTimeWindow() != other.hasTargetTimeWindow()) return false; + if (hasTargetTimeWindow()) { + if (!getTargetTimeWindow().equals(other.getTargetTimeWindow())) return false; + } + if (hasJourneySharingInfo() != other.hasJourneySharingInfo()) return false; + if (hasJourneySharingInfo()) { + if (!getJourneySharingInfo().equals(other.getJourneySharingInfo())) return false; + } + if (hasTaskTrackingViewConfig() != other.hasTaskTrackingViewConfig()) return false; + if (hasTaskTrackingViewConfig()) { + if (!getTaskTrackingViewConfig().equals(other.getTaskTrackingViewConfig())) 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(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + TASK_OUTCOME_FIELD_NUMBER; + hash = (53 * hash) + taskOutcome_; + if (hasTaskOutcomeTime()) { + hash = (37 * hash) + TASK_OUTCOME_TIME_FIELD_NUMBER; + hash = (53 * hash) + getTaskOutcomeTime().hashCode(); + } + if (hasTaskOutcomeLocation()) { + hash = (37 * hash) + TASK_OUTCOME_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getTaskOutcomeLocation().hashCode(); + } + hash = (37 * hash) + TASK_OUTCOME_LOCATION_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + taskOutcomeLocationSource_; + hash = (37 * hash) + TRACKING_ID_FIELD_NUMBER; + hash = (53 * hash) + getTrackingId().hashCode(); + hash = (37 * hash) + DELIVERY_VEHICLE_ID_FIELD_NUMBER; + hash = (53 * hash) + getDeliveryVehicleId().hashCode(); + if (hasPlannedLocation()) { + hash = (37 * hash) + PLANNED_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getPlannedLocation().hashCode(); + } + if (hasTaskDuration()) { + hash = (37 * hash) + TASK_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getTaskDuration().hashCode(); + } + if (hasTargetTimeWindow()) { + hash = (37 * hash) + TARGET_TIME_WINDOW_FIELD_NUMBER; + hash = (53 * hash) + getTargetTimeWindow().hashCode(); + } + if (hasJourneySharingInfo()) { + hash = (37 * hash) + JOURNEY_SHARING_INFO_FIELD_NUMBER; + hash = (53 * hash) + getJourneySharingInfo().hashCode(); + } + if (hasTaskTrackingViewConfig()) { + hash = (37 * hash) + TASK_TRACKING_VIEW_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getTaskTrackingViewConfig().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 google.maps.fleetengine.delivery.v1.Task parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.Task parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.Task parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.Task parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.Task parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.Task parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.Task parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.Task 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 google.maps.fleetengine.delivery.v1.Task parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.Task 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 google.maps.fleetengine.delivery.v1.Task parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.Task 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(google.maps.fleetengine.delivery.v1.Task 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 Task in the Delivery API represents a single action to track. In general,
+   * there is a distinction between shipment-related Tasks and break Tasks. A
+   * shipment can have multiple Tasks associated with it. For example, there could
+   * be one Task for the pickup, and one for the drop-off or transfer. Also,
+   * different Tasks for a given shipment can be handled by different vehicles.
+   * For example, one vehicle could handle the pickup, driving the shipment to the
+   * hub, while another vehicle drives the same shipment from the hub to the
+   * drop-off location.
+   *
+   * Note: gRPC and REST APIs use different field naming conventions. For example,
+   * the `Task.journey_sharing_info` field in the gRPC API and the
+   * `DeliveryVehicle.journeySharingInfo` field in the REST API refer to the same
+   * field.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.Task} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.delivery.v1.Task) + google.maps.fleetengine.delivery.v1.TaskOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.Tasks + .internal_static_maps_fleetengine_delivery_v1_Task_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.Tasks + .internal_static_maps_fleetengine_delivery_v1_Task_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.Task.class, + google.maps.fleetengine.delivery.v1.Task.Builder.class); + } + + // Construct using google.maps.fleetengine.delivery.v1.Task.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + type_ = 0; + state_ = 0; + taskOutcome_ = 0; + taskOutcomeTime_ = null; + if (taskOutcomeTimeBuilder_ != null) { + taskOutcomeTimeBuilder_.dispose(); + taskOutcomeTimeBuilder_ = null; + } + taskOutcomeLocation_ = null; + if (taskOutcomeLocationBuilder_ != null) { + taskOutcomeLocationBuilder_.dispose(); + taskOutcomeLocationBuilder_ = null; + } + taskOutcomeLocationSource_ = 0; + trackingId_ = ""; + deliveryVehicleId_ = ""; + plannedLocation_ = null; + if (plannedLocationBuilder_ != null) { + plannedLocationBuilder_.dispose(); + plannedLocationBuilder_ = null; + } + taskDuration_ = null; + if (taskDurationBuilder_ != null) { + taskDurationBuilder_.dispose(); + taskDurationBuilder_ = null; + } + targetTimeWindow_ = null; + if (targetTimeWindowBuilder_ != null) { + targetTimeWindowBuilder_.dispose(); + targetTimeWindowBuilder_ = null; + } + journeySharingInfo_ = null; + if (journeySharingInfoBuilder_ != null) { + journeySharingInfoBuilder_.dispose(); + journeySharingInfoBuilder_ = null; + } + taskTrackingViewConfig_ = null; + if (taskTrackingViewConfigBuilder_ != null) { + taskTrackingViewConfigBuilder_.dispose(); + taskTrackingViewConfigBuilder_ = null; + } + if (attributesBuilder_ == null) { + attributes_ = java.util.Collections.emptyList(); + } else { + attributes_ = null; + attributesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00004000); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return google.maps.fleetengine.delivery.v1.Tasks + .internal_static_maps_fleetengine_delivery_v1_Task_descriptor; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.Task getDefaultInstanceForType() { + return google.maps.fleetengine.delivery.v1.Task.getDefaultInstance(); + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.Task build() { + google.maps.fleetengine.delivery.v1.Task result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.Task buildPartial() { + google.maps.fleetengine.delivery.v1.Task result = + new google.maps.fleetengine.delivery.v1.Task(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(google.maps.fleetengine.delivery.v1.Task result) { + if (attributesBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0)) { + attributes_ = java.util.Collections.unmodifiableList(attributes_); + bitField0_ = (bitField0_ & ~0x00004000); + } + result.attributes_ = attributes_; + } else { + result.attributes_ = attributesBuilder_.build(); + } + } + + private void buildPartial0(google.maps.fleetengine.delivery.v1.Task result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.taskOutcome_ = taskOutcome_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.taskOutcomeTime_ = + taskOutcomeTimeBuilder_ == null ? taskOutcomeTime_ : taskOutcomeTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.taskOutcomeLocation_ = + taskOutcomeLocationBuilder_ == null + ? taskOutcomeLocation_ + : taskOutcomeLocationBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.taskOutcomeLocationSource_ = taskOutcomeLocationSource_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.trackingId_ = trackingId_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.deliveryVehicleId_ = deliveryVehicleId_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.plannedLocation_ = + plannedLocationBuilder_ == null ? plannedLocation_ : plannedLocationBuilder_.build(); + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.taskDuration_ = + taskDurationBuilder_ == null ? taskDuration_ : taskDurationBuilder_.build(); + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.targetTimeWindow_ = + targetTimeWindowBuilder_ == null ? targetTimeWindow_ : targetTimeWindowBuilder_.build(); + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.journeySharingInfo_ = + journeySharingInfoBuilder_ == null + ? journeySharingInfo_ + : journeySharingInfoBuilder_.build(); + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.taskTrackingViewConfig_ = + taskTrackingViewConfigBuilder_ == null + ? taskTrackingViewConfig_ + : taskTrackingViewConfigBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof google.maps.fleetengine.delivery.v1.Task) { + return mergeFrom((google.maps.fleetengine.delivery.v1.Task) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.maps.fleetengine.delivery.v1.Task other) { + if (other == google.maps.fleetengine.delivery.v1.Task.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.taskOutcome_ != 0) { + setTaskOutcomeValue(other.getTaskOutcomeValue()); + } + if (other.hasTaskOutcomeTime()) { + mergeTaskOutcomeTime(other.getTaskOutcomeTime()); + } + if (other.hasTaskOutcomeLocation()) { + mergeTaskOutcomeLocation(other.getTaskOutcomeLocation()); + } + if (other.taskOutcomeLocationSource_ != 0) { + setTaskOutcomeLocationSourceValue(other.getTaskOutcomeLocationSourceValue()); + } + if (!other.getTrackingId().isEmpty()) { + trackingId_ = other.trackingId_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.getDeliveryVehicleId().isEmpty()) { + deliveryVehicleId_ = other.deliveryVehicleId_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (other.hasPlannedLocation()) { + mergePlannedLocation(other.getPlannedLocation()); + } + if (other.hasTaskDuration()) { + mergeTaskDuration(other.getTaskDuration()); + } + if (other.hasTargetTimeWindow()) { + mergeTargetTimeWindow(other.getTargetTimeWindow()); + } + if (other.hasJourneySharingInfo()) { + mergeJourneySharingInfo(other.getJourneySharingInfo()); + } + if (other.hasTaskTrackingViewConfig()) { + mergeTaskTrackingViewConfig(other.getTaskTrackingViewConfig()); + } + if (attributesBuilder_ == null) { + if (!other.attributes_.isEmpty()) { + if (attributes_.isEmpty()) { + attributes_ = other.attributes_; + bitField0_ = (bitField0_ & ~0x00004000); + } else { + ensureAttributesIsMutable(); + attributes_.addAll(other.attributes_); + } + onChanged(); + } + } else { + if (!other.attributes_.isEmpty()) { + if (attributesBuilder_.isEmpty()) { + attributesBuilder_.dispose(); + attributesBuilder_ = null; + attributes_ = other.attributes_; + bitField0_ = (bitField0_ & ~0x00004000); + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + trackingId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 34 + case 42: + { + deliveryVehicleId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 42 + case 50: + { + input.readMessage(getPlannedLocationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 50 + case 58: + { + input.readMessage(getTaskDurationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 58 + case 66: + { + input.readMessage( + getJourneySharingInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 66 + case 72: + { + taskOutcome_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 72 + case 82: + { + input.readMessage(getTaskOutcomeTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 82 + case 90: + { + input.readMessage( + getTaskOutcomeLocationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 90 + case 96: + { + taskOutcomeLocationSource_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 96 + case 106: + { + input.readMessage( + getTaskTrackingViewConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 106 + case 114: + { + input.readMessage( + getTargetTimeWindowFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 114 + case 122: + { + google.maps.fleetengine.delivery.v1.TaskAttribute m = + input.readMessage( + google.maps.fleetengine.delivery.v1.TaskAttribute.parser(), + extensionRegistry); + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.add(m); + } else { + attributesBuilder_.addMessage(m); + } + break; + } // case 122 + 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_ = ""; + /** + * + * + *
+     * Must be in the format `providers/{provider}/tasks/{task}`.
+     * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+     * Must be in the format `providers/{provider}/tasks/{task}`.
+     * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+     * Must be in the format `providers/{provider}/tasks/{task}`.
+     * 
+ * + * string name = 1; + * + * @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; + } + /** + * + * + *
+     * Must be in the format `providers/{provider}/tasks/{task}`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Must be in the format `providers/{provider}/tasks/{task}`.
+     * 
+ * + * string name = 1; + * + * @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 type_ = 0; + /** + * + * + *
+     * Required. Immutable. Defines the type of the Task. For example, a break or
+     * shipment.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Required. Immutable. Defines the type of the Task. For example, a break or
+     * shipment.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Immutable. Defines the type of the Task. For example, a break or
+     * shipment.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The type. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.Task.Type getType() { + google.maps.fleetengine.delivery.v1.Task.Type result = + google.maps.fleetengine.delivery.v1.Task.Type.forNumber(type_); + return result == null ? google.maps.fleetengine.delivery.v1.Task.Type.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Required. Immutable. Defines the type of the Task. For example, a break or
+     * shipment.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(google.maps.fleetengine.delivery.v1.Task.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Immutable. Defines the type of the Task. For example, a break or
+     * shipment.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000002); + type_ = 0; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Required. The current execution state of the Task.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.State state = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Required. The current execution state of the Task.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.State state = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The current execution state of the Task.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.State state = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The state. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.Task.State getState() { + google.maps.fleetengine.delivery.v1.Task.State result = + google.maps.fleetengine.delivery.v1.Task.State.forNumber(state_); + return result == null ? google.maps.fleetengine.delivery.v1.Task.State.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Required. The current execution state of the Task.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.State state = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(google.maps.fleetengine.delivery.v1.Task.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The current execution state of the Task.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.State state = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000004); + state_ = 0; + onChanged(); + return this; + } + + private int taskOutcome_ = 0; + /** + * + * + *
+     * The outcome of the Task.
+     * 
+ * + * .maps.fleetengine.delivery.v1.Task.TaskOutcome task_outcome = 9; + * + * @return The enum numeric value on the wire for taskOutcome. + */ + @java.lang.Override + public int getTaskOutcomeValue() { + return taskOutcome_; + } + /** + * + * + *
+     * The outcome of the Task.
+     * 
+ * + * .maps.fleetengine.delivery.v1.Task.TaskOutcome task_outcome = 9; + * + * @param value The enum numeric value on the wire for taskOutcome to set. + * @return This builder for chaining. + */ + public Builder setTaskOutcomeValue(int value) { + taskOutcome_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The outcome of the Task.
+     * 
+ * + * .maps.fleetengine.delivery.v1.Task.TaskOutcome task_outcome = 9; + * + * @return The taskOutcome. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.Task.TaskOutcome getTaskOutcome() { + google.maps.fleetengine.delivery.v1.Task.TaskOutcome result = + google.maps.fleetengine.delivery.v1.Task.TaskOutcome.forNumber(taskOutcome_); + return result == null + ? google.maps.fleetengine.delivery.v1.Task.TaskOutcome.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The outcome of the Task.
+     * 
+ * + * .maps.fleetengine.delivery.v1.Task.TaskOutcome task_outcome = 9; + * + * @param value The taskOutcome to set. + * @return This builder for chaining. + */ + public Builder setTaskOutcome(google.maps.fleetengine.delivery.v1.Task.TaskOutcome value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + taskOutcome_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The outcome of the Task.
+     * 
+ * + * .maps.fleetengine.delivery.v1.Task.TaskOutcome task_outcome = 9; + * + * @return This builder for chaining. + */ + public Builder clearTaskOutcome() { + bitField0_ = (bitField0_ & ~0x00000008); + taskOutcome_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp taskOutcomeTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + taskOutcomeTimeBuilder_; + /** + * + * + *
+     * The timestamp that indicates when the `Task`'s outcome was set by the
+     * provider.
+     * 
+ * + * .google.protobuf.Timestamp task_outcome_time = 10; + * + * @return Whether the taskOutcomeTime field is set. + */ + public boolean hasTaskOutcomeTime() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * The timestamp that indicates when the `Task`'s outcome was set by the
+     * provider.
+     * 
+ * + * .google.protobuf.Timestamp task_outcome_time = 10; + * + * @return The taskOutcomeTime. + */ + public com.google.protobuf.Timestamp getTaskOutcomeTime() { + if (taskOutcomeTimeBuilder_ == null) { + return taskOutcomeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : taskOutcomeTime_; + } else { + return taskOutcomeTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The timestamp that indicates when the `Task`'s outcome was set by the
+     * provider.
+     * 
+ * + * .google.protobuf.Timestamp task_outcome_time = 10; + */ + public Builder setTaskOutcomeTime(com.google.protobuf.Timestamp value) { + if (taskOutcomeTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + taskOutcomeTime_ = value; + } else { + taskOutcomeTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The timestamp that indicates when the `Task`'s outcome was set by the
+     * provider.
+     * 
+ * + * .google.protobuf.Timestamp task_outcome_time = 10; + */ + public Builder setTaskOutcomeTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (taskOutcomeTimeBuilder_ == null) { + taskOutcomeTime_ = builderForValue.build(); + } else { + taskOutcomeTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The timestamp that indicates when the `Task`'s outcome was set by the
+     * provider.
+     * 
+ * + * .google.protobuf.Timestamp task_outcome_time = 10; + */ + public Builder mergeTaskOutcomeTime(com.google.protobuf.Timestamp value) { + if (taskOutcomeTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && taskOutcomeTime_ != null + && taskOutcomeTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getTaskOutcomeTimeBuilder().mergeFrom(value); + } else { + taskOutcomeTime_ = value; + } + } else { + taskOutcomeTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The timestamp that indicates when the `Task`'s outcome was set by the
+     * provider.
+     * 
+ * + * .google.protobuf.Timestamp task_outcome_time = 10; + */ + public Builder clearTaskOutcomeTime() { + bitField0_ = (bitField0_ & ~0x00000010); + taskOutcomeTime_ = null; + if (taskOutcomeTimeBuilder_ != null) { + taskOutcomeTimeBuilder_.dispose(); + taskOutcomeTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The timestamp that indicates when the `Task`'s outcome was set by the
+     * provider.
+     * 
+ * + * .google.protobuf.Timestamp task_outcome_time = 10; + */ + public com.google.protobuf.Timestamp.Builder getTaskOutcomeTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getTaskOutcomeTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The timestamp that indicates when the `Task`'s outcome was set by the
+     * provider.
+     * 
+ * + * .google.protobuf.Timestamp task_outcome_time = 10; + */ + public com.google.protobuf.TimestampOrBuilder getTaskOutcomeTimeOrBuilder() { + if (taskOutcomeTimeBuilder_ != null) { + return taskOutcomeTimeBuilder_.getMessageOrBuilder(); + } else { + return taskOutcomeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : taskOutcomeTime_; + } + } + /** + * + * + *
+     * The timestamp that indicates when the `Task`'s outcome was set by the
+     * provider.
+     * 
+ * + * .google.protobuf.Timestamp task_outcome_time = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getTaskOutcomeTimeFieldBuilder() { + if (taskOutcomeTimeBuilder_ == null) { + taskOutcomeTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getTaskOutcomeTime(), getParentForChildren(), isClean()); + taskOutcomeTime_ = null; + } + return taskOutcomeTimeBuilder_; + } + + private google.maps.fleetengine.delivery.v1.LocationInfo taskOutcomeLocation_; + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.LocationInfo, + google.maps.fleetengine.delivery.v1.LocationInfo.Builder, + google.maps.fleetengine.delivery.v1.LocationInfoOrBuilder> + taskOutcomeLocationBuilder_; + /** + * + * + *
+     * The location where the `Task`'s outcome was set. This value is updated as
+     * part of `UpdateTask`. If this value isn't explicitly updated by the
+     * provider, then Fleet Engine populates it by default with the last known
+     * vehicle location (the *raw* location).
+     * 
+ * + * .maps.fleetengine.delivery.v1.LocationInfo task_outcome_location = 11; + * + * @return Whether the taskOutcomeLocation field is set. + */ + public boolean hasTaskOutcomeLocation() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * The location where the `Task`'s outcome was set. This value is updated as
+     * part of `UpdateTask`. If this value isn't explicitly updated by the
+     * provider, then Fleet Engine populates it by default with the last known
+     * vehicle location (the *raw* location).
+     * 
+ * + * .maps.fleetengine.delivery.v1.LocationInfo task_outcome_location = 11; + * + * @return The taskOutcomeLocation. + */ + public google.maps.fleetengine.delivery.v1.LocationInfo getTaskOutcomeLocation() { + if (taskOutcomeLocationBuilder_ == null) { + return taskOutcomeLocation_ == null + ? google.maps.fleetengine.delivery.v1.LocationInfo.getDefaultInstance() + : taskOutcomeLocation_; + } else { + return taskOutcomeLocationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The location where the `Task`'s outcome was set. This value is updated as
+     * part of `UpdateTask`. If this value isn't explicitly updated by the
+     * provider, then Fleet Engine populates it by default with the last known
+     * vehicle location (the *raw* location).
+     * 
+ * + * .maps.fleetengine.delivery.v1.LocationInfo task_outcome_location = 11; + */ + public Builder setTaskOutcomeLocation(google.maps.fleetengine.delivery.v1.LocationInfo value) { + if (taskOutcomeLocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + taskOutcomeLocation_ = value; + } else { + taskOutcomeLocationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The location where the `Task`'s outcome was set. This value is updated as
+     * part of `UpdateTask`. If this value isn't explicitly updated by the
+     * provider, then Fleet Engine populates it by default with the last known
+     * vehicle location (the *raw* location).
+     * 
+ * + * .maps.fleetengine.delivery.v1.LocationInfo task_outcome_location = 11; + */ + public Builder setTaskOutcomeLocation( + google.maps.fleetengine.delivery.v1.LocationInfo.Builder builderForValue) { + if (taskOutcomeLocationBuilder_ == null) { + taskOutcomeLocation_ = builderForValue.build(); + } else { + taskOutcomeLocationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The location where the `Task`'s outcome was set. This value is updated as
+     * part of `UpdateTask`. If this value isn't explicitly updated by the
+     * provider, then Fleet Engine populates it by default with the last known
+     * vehicle location (the *raw* location).
+     * 
+ * + * .maps.fleetengine.delivery.v1.LocationInfo task_outcome_location = 11; + */ + public Builder mergeTaskOutcomeLocation( + google.maps.fleetengine.delivery.v1.LocationInfo value) { + if (taskOutcomeLocationBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && taskOutcomeLocation_ != null + && taskOutcomeLocation_ + != google.maps.fleetengine.delivery.v1.LocationInfo.getDefaultInstance()) { + getTaskOutcomeLocationBuilder().mergeFrom(value); + } else { + taskOutcomeLocation_ = value; + } + } else { + taskOutcomeLocationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The location where the `Task`'s outcome was set. This value is updated as
+     * part of `UpdateTask`. If this value isn't explicitly updated by the
+     * provider, then Fleet Engine populates it by default with the last known
+     * vehicle location (the *raw* location).
+     * 
+ * + * .maps.fleetengine.delivery.v1.LocationInfo task_outcome_location = 11; + */ + public Builder clearTaskOutcomeLocation() { + bitField0_ = (bitField0_ & ~0x00000020); + taskOutcomeLocation_ = null; + if (taskOutcomeLocationBuilder_ != null) { + taskOutcomeLocationBuilder_.dispose(); + taskOutcomeLocationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The location where the `Task`'s outcome was set. This value is updated as
+     * part of `UpdateTask`. If this value isn't explicitly updated by the
+     * provider, then Fleet Engine populates it by default with the last known
+     * vehicle location (the *raw* location).
+     * 
+ * + * .maps.fleetengine.delivery.v1.LocationInfo task_outcome_location = 11; + */ + public google.maps.fleetengine.delivery.v1.LocationInfo.Builder + getTaskOutcomeLocationBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getTaskOutcomeLocationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The location where the `Task`'s outcome was set. This value is updated as
+     * part of `UpdateTask`. If this value isn't explicitly updated by the
+     * provider, then Fleet Engine populates it by default with the last known
+     * vehicle location (the *raw* location).
+     * 
+ * + * .maps.fleetengine.delivery.v1.LocationInfo task_outcome_location = 11; + */ + public google.maps.fleetengine.delivery.v1.LocationInfoOrBuilder + getTaskOutcomeLocationOrBuilder() { + if (taskOutcomeLocationBuilder_ != null) { + return taskOutcomeLocationBuilder_.getMessageOrBuilder(); + } else { + return taskOutcomeLocation_ == null + ? google.maps.fleetengine.delivery.v1.LocationInfo.getDefaultInstance() + : taskOutcomeLocation_; + } + } + /** + * + * + *
+     * The location where the `Task`'s outcome was set. This value is updated as
+     * part of `UpdateTask`. If this value isn't explicitly updated by the
+     * provider, then Fleet Engine populates it by default with the last known
+     * vehicle location (the *raw* location).
+     * 
+ * + * .maps.fleetengine.delivery.v1.LocationInfo task_outcome_location = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.LocationInfo, + google.maps.fleetengine.delivery.v1.LocationInfo.Builder, + google.maps.fleetengine.delivery.v1.LocationInfoOrBuilder> + getTaskOutcomeLocationFieldBuilder() { + if (taskOutcomeLocationBuilder_ == null) { + taskOutcomeLocationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.LocationInfo, + google.maps.fleetengine.delivery.v1.LocationInfo.Builder, + google.maps.fleetengine.delivery.v1.LocationInfoOrBuilder>( + getTaskOutcomeLocation(), getParentForChildren(), isClean()); + taskOutcomeLocation_ = null; + } + return taskOutcomeLocationBuilder_; + } + + private int taskOutcomeLocationSource_ = 0; + /** + * + * + *
+     * Indicates where the value of the `task_outcome_location` came from.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.TaskOutcomeLocationSource task_outcome_location_source = 12; + * + * + * @return The enum numeric value on the wire for taskOutcomeLocationSource. + */ + @java.lang.Override + public int getTaskOutcomeLocationSourceValue() { + return taskOutcomeLocationSource_; + } + /** + * + * + *
+     * Indicates where the value of the `task_outcome_location` came from.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.TaskOutcomeLocationSource task_outcome_location_source = 12; + * + * + * @param value The enum numeric value on the wire for taskOutcomeLocationSource to set. + * @return This builder for chaining. + */ + public Builder setTaskOutcomeLocationSourceValue(int value) { + taskOutcomeLocationSource_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates where the value of the `task_outcome_location` came from.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.TaskOutcomeLocationSource task_outcome_location_source = 12; + * + * + * @return The taskOutcomeLocationSource. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.Task.TaskOutcomeLocationSource + getTaskOutcomeLocationSource() { + google.maps.fleetengine.delivery.v1.Task.TaskOutcomeLocationSource result = + google.maps.fleetengine.delivery.v1.Task.TaskOutcomeLocationSource.forNumber( + taskOutcomeLocationSource_); + return result == null + ? google.maps.fleetengine.delivery.v1.Task.TaskOutcomeLocationSource.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Indicates where the value of the `task_outcome_location` came from.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.TaskOutcomeLocationSource task_outcome_location_source = 12; + * + * + * @param value The taskOutcomeLocationSource to set. + * @return This builder for chaining. + */ + public Builder setTaskOutcomeLocationSource( + google.maps.fleetengine.delivery.v1.Task.TaskOutcomeLocationSource value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + taskOutcomeLocationSource_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates where the value of the `task_outcome_location` came from.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.TaskOutcomeLocationSource task_outcome_location_source = 12; + * + * + * @return This builder for chaining. + */ + public Builder clearTaskOutcomeLocationSource() { + bitField0_ = (bitField0_ & ~0x00000040); + taskOutcomeLocationSource_ = 0; + onChanged(); + return this; + } + + private java.lang.Object trackingId_ = ""; + /** + * + * + *
+     * Immutable. This field facilitates the storing of an ID so you can avoid
+     * using a complicated mapping. You cannot set `tracking_id` for Tasks of type
+     * `UNAVAILABLE` and `SCHEDULED_STOP`. These IDs are 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 tracking_id = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The trackingId. + */ + public java.lang.String getTrackingId() { + java.lang.Object ref = trackingId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + trackingId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. This field facilitates the storing of an ID so you can avoid
+     * using a complicated mapping. You cannot set `tracking_id` for Tasks of type
+     * `UNAVAILABLE` and `SCHEDULED_STOP`. These IDs are 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 tracking_id = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for trackingId. + */ + public com.google.protobuf.ByteString getTrackingIdBytes() { + java.lang.Object ref = trackingId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + trackingId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. This field facilitates the storing of an ID so you can avoid
+     * using a complicated mapping. You cannot set `tracking_id` for Tasks of type
+     * `UNAVAILABLE` and `SCHEDULED_STOP`. These IDs are 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 tracking_id = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The trackingId to set. + * @return This builder for chaining. + */ + public Builder setTrackingId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + trackingId_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. This field facilitates the storing of an ID so you can avoid
+     * using a complicated mapping. You cannot set `tracking_id` for Tasks of type
+     * `UNAVAILABLE` and `SCHEDULED_STOP`. These IDs are 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 tracking_id = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearTrackingId() { + trackingId_ = getDefaultInstance().getTrackingId(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. This field facilitates the storing of an ID so you can avoid
+     * using a complicated mapping. You cannot set `tracking_id` for Tasks of type
+     * `UNAVAILABLE` and `SCHEDULED_STOP`. These IDs are 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 tracking_id = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for trackingId to set. + * @return This builder for chaining. + */ + public Builder setTrackingIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + trackingId_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object deliveryVehicleId_ = ""; + /** + * + * + *
+     * Output only. The ID of the vehicle that is executing this Task. Delivery
+     * Vehicle IDs are 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 delivery_vehicle_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The deliveryVehicleId. + */ + public java.lang.String getDeliveryVehicleId() { + java.lang.Object ref = deliveryVehicleId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deliveryVehicleId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The ID of the vehicle that is executing this Task. Delivery
+     * Vehicle IDs are 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 delivery_vehicle_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for deliveryVehicleId. + */ + public com.google.protobuf.ByteString getDeliveryVehicleIdBytes() { + java.lang.Object ref = deliveryVehicleId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deliveryVehicleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The ID of the vehicle that is executing this Task. Delivery
+     * Vehicle IDs are 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 delivery_vehicle_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The deliveryVehicleId to set. + * @return This builder for chaining. + */ + public Builder setDeliveryVehicleId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + deliveryVehicleId_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The ID of the vehicle that is executing this Task. Delivery
+     * Vehicle IDs are 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 delivery_vehicle_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDeliveryVehicleId() { + deliveryVehicleId_ = getDefaultInstance().getDeliveryVehicleId(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The ID of the vehicle that is executing this Task. Delivery
+     * Vehicle IDs are 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 delivery_vehicle_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for deliveryVehicleId to set. + * @return This builder for chaining. + */ + public Builder setDeliveryVehicleIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + deliveryVehicleId_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private google.maps.fleetengine.delivery.v1.LocationInfo plannedLocation_; + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.LocationInfo, + google.maps.fleetengine.delivery.v1.LocationInfo.Builder, + google.maps.fleetengine.delivery.v1.LocationInfoOrBuilder> + plannedLocationBuilder_; + /** + * + * + *
+     * Immutable. The location where the Task will be completed.
+     * Optional for `UNAVAILABLE` Tasks, but required for all other Tasks.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the plannedLocation field is set. + */ + public boolean hasPlannedLocation() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * + * + *
+     * Immutable. The location where the Task will be completed.
+     * Optional for `UNAVAILABLE` Tasks, but required for all other Tasks.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The plannedLocation. + */ + public google.maps.fleetengine.delivery.v1.LocationInfo getPlannedLocation() { + if (plannedLocationBuilder_ == null) { + return plannedLocation_ == null + ? google.maps.fleetengine.delivery.v1.LocationInfo.getDefaultInstance() + : plannedLocation_; + } else { + return plannedLocationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Immutable. The location where the Task will be completed.
+     * Optional for `UNAVAILABLE` Tasks, but required for all other Tasks.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setPlannedLocation(google.maps.fleetengine.delivery.v1.LocationInfo value) { + if (plannedLocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + plannedLocation_ = value; + } else { + plannedLocationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The location where the Task will be completed.
+     * Optional for `UNAVAILABLE` Tasks, but required for all other Tasks.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setPlannedLocation( + google.maps.fleetengine.delivery.v1.LocationInfo.Builder builderForValue) { + if (plannedLocationBuilder_ == null) { + plannedLocation_ = builderForValue.build(); + } else { + plannedLocationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The location where the Task will be completed.
+     * Optional for `UNAVAILABLE` Tasks, but required for all other Tasks.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder mergePlannedLocation(google.maps.fleetengine.delivery.v1.LocationInfo value) { + if (plannedLocationBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && plannedLocation_ != null + && plannedLocation_ + != google.maps.fleetengine.delivery.v1.LocationInfo.getDefaultInstance()) { + getPlannedLocationBuilder().mergeFrom(value); + } else { + plannedLocation_ = value; + } + } else { + plannedLocationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The location where the Task will be completed.
+     * Optional for `UNAVAILABLE` Tasks, but required for all other Tasks.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder clearPlannedLocation() { + bitField0_ = (bitField0_ & ~0x00000200); + plannedLocation_ = null; + if (plannedLocationBuilder_ != null) { + plannedLocationBuilder_.dispose(); + plannedLocationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The location where the Task will be completed.
+     * Optional for `UNAVAILABLE` Tasks, but required for all other Tasks.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public google.maps.fleetengine.delivery.v1.LocationInfo.Builder getPlannedLocationBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getPlannedLocationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Immutable. The location where the Task will be completed.
+     * Optional for `UNAVAILABLE` Tasks, but required for all other Tasks.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public google.maps.fleetengine.delivery.v1.LocationInfoOrBuilder getPlannedLocationOrBuilder() { + if (plannedLocationBuilder_ != null) { + return plannedLocationBuilder_.getMessageOrBuilder(); + } else { + return plannedLocation_ == null + ? google.maps.fleetengine.delivery.v1.LocationInfo.getDefaultInstance() + : plannedLocation_; + } + } + /** + * + * + *
+     * Immutable. The location where the Task will be completed.
+     * Optional for `UNAVAILABLE` Tasks, but required for all other Tasks.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.LocationInfo, + google.maps.fleetengine.delivery.v1.LocationInfo.Builder, + google.maps.fleetengine.delivery.v1.LocationInfoOrBuilder> + getPlannedLocationFieldBuilder() { + if (plannedLocationBuilder_ == null) { + plannedLocationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.LocationInfo, + google.maps.fleetengine.delivery.v1.LocationInfo.Builder, + google.maps.fleetengine.delivery.v1.LocationInfoOrBuilder>( + getPlannedLocation(), getParentForChildren(), isClean()); + plannedLocation_ = null; + } + return plannedLocationBuilder_; + } + + private com.google.protobuf.Duration taskDuration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + taskDurationBuilder_; + /** + * + * + *
+     * Required. Immutable. The time needed to execute a Task at this location.
+     * 
+ * + * + * .google.protobuf.Duration task_duration = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the taskDuration field is set. + */ + public boolean hasTaskDuration() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * + * + *
+     * Required. Immutable. The time needed to execute a Task at this location.
+     * 
+ * + * + * .google.protobuf.Duration task_duration = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The taskDuration. + */ + public com.google.protobuf.Duration getTaskDuration() { + if (taskDurationBuilder_ == null) { + return taskDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : taskDuration_; + } else { + return taskDurationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Immutable. The time needed to execute a Task at this location.
+     * 
+ * + * + * .google.protobuf.Duration task_duration = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setTaskDuration(com.google.protobuf.Duration value) { + if (taskDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + taskDuration_ = value; + } else { + taskDurationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Immutable. The time needed to execute a Task at this location.
+     * 
+ * + * + * .google.protobuf.Duration task_duration = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setTaskDuration(com.google.protobuf.Duration.Builder builderForValue) { + if (taskDurationBuilder_ == null) { + taskDuration_ = builderForValue.build(); + } else { + taskDurationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Immutable. The time needed to execute a Task at this location.
+     * 
+ * + * + * .google.protobuf.Duration task_duration = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder mergeTaskDuration(com.google.protobuf.Duration value) { + if (taskDurationBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && taskDuration_ != null + && taskDuration_ != com.google.protobuf.Duration.getDefaultInstance()) { + getTaskDurationBuilder().mergeFrom(value); + } else { + taskDuration_ = value; + } + } else { + taskDurationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Immutable. The time needed to execute a Task at this location.
+     * 
+ * + * + * .google.protobuf.Duration task_duration = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder clearTaskDuration() { + bitField0_ = (bitField0_ & ~0x00000400); + taskDuration_ = null; + if (taskDurationBuilder_ != null) { + taskDurationBuilder_.dispose(); + taskDurationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Immutable. The time needed to execute a Task at this location.
+     * 
+ * + * + * .google.protobuf.Duration task_duration = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.protobuf.Duration.Builder getTaskDurationBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return getTaskDurationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Immutable. The time needed to execute a Task at this location.
+     * 
+ * + * + * .google.protobuf.Duration task_duration = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.protobuf.DurationOrBuilder getTaskDurationOrBuilder() { + if (taskDurationBuilder_ != null) { + return taskDurationBuilder_.getMessageOrBuilder(); + } else { + return taskDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : taskDuration_; + } + } + /** + * + * + *
+     * Required. Immutable. The time needed to execute a Task at this location.
+     * 
+ * + * + * .google.protobuf.Duration task_duration = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTaskDurationFieldBuilder() { + if (taskDurationBuilder_ == null) { + taskDurationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getTaskDuration(), getParentForChildren(), isClean()); + taskDuration_ = null; + } + return taskDurationBuilder_; + } + + private google.maps.fleetengine.delivery.v1.TimeWindow targetTimeWindow_; + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.TimeWindow, + google.maps.fleetengine.delivery.v1.TimeWindow.Builder, + google.maps.fleetengine.delivery.v1.TimeWindowOrBuilder> + targetTimeWindowBuilder_; + /** + * + * + *
+     * The time window during which the task should be completed.
+     * 
+ * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 14; + * + * @return Whether the targetTimeWindow field is set. + */ + public boolean hasTargetTimeWindow() { + return ((bitField0_ & 0x00000800) != 0); + } + /** + * + * + *
+     * The time window during which the task should be completed.
+     * 
+ * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 14; + * + * @return The targetTimeWindow. + */ + public google.maps.fleetengine.delivery.v1.TimeWindow getTargetTimeWindow() { + if (targetTimeWindowBuilder_ == null) { + return targetTimeWindow_ == null + ? google.maps.fleetengine.delivery.v1.TimeWindow.getDefaultInstance() + : targetTimeWindow_; + } else { + return targetTimeWindowBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time window during which the task should be completed.
+     * 
+ * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 14; + */ + public Builder setTargetTimeWindow(google.maps.fleetengine.delivery.v1.TimeWindow value) { + if (targetTimeWindowBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + targetTimeWindow_ = value; + } else { + targetTimeWindowBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * The time window during which the task should be completed.
+     * 
+ * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 14; + */ + public Builder setTargetTimeWindow( + google.maps.fleetengine.delivery.v1.TimeWindow.Builder builderForValue) { + if (targetTimeWindowBuilder_ == null) { + targetTimeWindow_ = builderForValue.build(); + } else { + targetTimeWindowBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * The time window during which the task should be completed.
+     * 
+ * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 14; + */ + public Builder mergeTargetTimeWindow(google.maps.fleetengine.delivery.v1.TimeWindow value) { + if (targetTimeWindowBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) + && targetTimeWindow_ != null + && targetTimeWindow_ + != google.maps.fleetengine.delivery.v1.TimeWindow.getDefaultInstance()) { + getTargetTimeWindowBuilder().mergeFrom(value); + } else { + targetTimeWindow_ = value; + } + } else { + targetTimeWindowBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * The time window during which the task should be completed.
+     * 
+ * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 14; + */ + public Builder clearTargetTimeWindow() { + bitField0_ = (bitField0_ & ~0x00000800); + targetTimeWindow_ = null; + if (targetTimeWindowBuilder_ != null) { + targetTimeWindowBuilder_.dispose(); + targetTimeWindowBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The time window during which the task should be completed.
+     * 
+ * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 14; + */ + public google.maps.fleetengine.delivery.v1.TimeWindow.Builder getTargetTimeWindowBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return getTargetTimeWindowFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time window during which the task should be completed.
+     * 
+ * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 14; + */ + public google.maps.fleetengine.delivery.v1.TimeWindowOrBuilder getTargetTimeWindowOrBuilder() { + if (targetTimeWindowBuilder_ != null) { + return targetTimeWindowBuilder_.getMessageOrBuilder(); + } else { + return targetTimeWindow_ == null + ? google.maps.fleetengine.delivery.v1.TimeWindow.getDefaultInstance() + : targetTimeWindow_; + } + } + /** + * + * + *
+     * The time window during which the task should be completed.
+     * 
+ * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 14; + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.TimeWindow, + google.maps.fleetengine.delivery.v1.TimeWindow.Builder, + google.maps.fleetengine.delivery.v1.TimeWindowOrBuilder> + getTargetTimeWindowFieldBuilder() { + if (targetTimeWindowBuilder_ == null) { + targetTimeWindowBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.TimeWindow, + google.maps.fleetengine.delivery.v1.TimeWindow.Builder, + google.maps.fleetengine.delivery.v1.TimeWindowOrBuilder>( + getTargetTimeWindow(), getParentForChildren(), isClean()); + targetTimeWindow_ = null; + } + return targetTimeWindowBuilder_; + } + + private google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo journeySharingInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo, + google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo.Builder, + google.maps.fleetengine.delivery.v1.Task.JourneySharingInfoOrBuilder> + journeySharingInfoBuilder_; + /** + * + * + *
+     * Output only. Journey sharing-specific fields. Not populated when state is
+     * `CLOSED`.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.JourneySharingInfo journey_sharing_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the journeySharingInfo field is set. + */ + public boolean hasJourneySharingInfo() { + return ((bitField0_ & 0x00001000) != 0); + } + /** + * + * + *
+     * Output only. Journey sharing-specific fields. Not populated when state is
+     * `CLOSED`.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.JourneySharingInfo journey_sharing_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The journeySharingInfo. + */ + public google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo getJourneySharingInfo() { + if (journeySharingInfoBuilder_ == null) { + return journeySharingInfo_ == null + ? google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo.getDefaultInstance() + : journeySharingInfo_; + } else { + return journeySharingInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Journey sharing-specific fields. Not populated when state is
+     * `CLOSED`.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.JourneySharingInfo journey_sharing_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setJourneySharingInfo( + google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo value) { + if (journeySharingInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + journeySharingInfo_ = value; + } else { + journeySharingInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Journey sharing-specific fields. Not populated when state is
+     * `CLOSED`.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.JourneySharingInfo journey_sharing_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setJourneySharingInfo( + google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo.Builder builderForValue) { + if (journeySharingInfoBuilder_ == null) { + journeySharingInfo_ = builderForValue.build(); + } else { + journeySharingInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Journey sharing-specific fields. Not populated when state is
+     * `CLOSED`.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.JourneySharingInfo journey_sharing_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeJourneySharingInfo( + google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo value) { + if (journeySharingInfoBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) + && journeySharingInfo_ != null + && journeySharingInfo_ + != google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo + .getDefaultInstance()) { + getJourneySharingInfoBuilder().mergeFrom(value); + } else { + journeySharingInfo_ = value; + } + } else { + journeySharingInfoBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Journey sharing-specific fields. Not populated when state is
+     * `CLOSED`.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.JourneySharingInfo journey_sharing_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearJourneySharingInfo() { + bitField0_ = (bitField0_ & ~0x00001000); + journeySharingInfo_ = null; + if (journeySharingInfoBuilder_ != null) { + journeySharingInfoBuilder_.dispose(); + journeySharingInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Journey sharing-specific fields. Not populated when state is
+     * `CLOSED`.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.JourneySharingInfo journey_sharing_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo.Builder + getJourneySharingInfoBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return getJourneySharingInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Journey sharing-specific fields. Not populated when state is
+     * `CLOSED`.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.JourneySharingInfo journey_sharing_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public google.maps.fleetengine.delivery.v1.Task.JourneySharingInfoOrBuilder + getJourneySharingInfoOrBuilder() { + if (journeySharingInfoBuilder_ != null) { + return journeySharingInfoBuilder_.getMessageOrBuilder(); + } else { + return journeySharingInfo_ == null + ? google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo.getDefaultInstance() + : journeySharingInfo_; + } + } + /** + * + * + *
+     * Output only. Journey sharing-specific fields. Not populated when state is
+     * `CLOSED`.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.JourneySharingInfo journey_sharing_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo, + google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo.Builder, + google.maps.fleetengine.delivery.v1.Task.JourneySharingInfoOrBuilder> + getJourneySharingInfoFieldBuilder() { + if (journeySharingInfoBuilder_ == null) { + journeySharingInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo, + google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo.Builder, + google.maps.fleetengine.delivery.v1.Task.JourneySharingInfoOrBuilder>( + getJourneySharingInfo(), getParentForChildren(), isClean()); + journeySharingInfo_ = null; + } + return journeySharingInfoBuilder_; + } + + private google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig taskTrackingViewConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.Builder, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfigOrBuilder> + taskTrackingViewConfigBuilder_; + /** + * + * + *
+     * The configuration for task tracking that specifies which data elements are
+     * visible to the end users under what circumstances.
+     * 
+ * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig task_tracking_view_config = 13; + * + * + * @return Whether the taskTrackingViewConfig field is set. + */ + public boolean hasTaskTrackingViewConfig() { + return ((bitField0_ & 0x00002000) != 0); + } + /** + * + * + *
+     * The configuration for task tracking that specifies which data elements are
+     * visible to the end users under what circumstances.
+     * 
+ * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig task_tracking_view_config = 13; + * + * + * @return The taskTrackingViewConfig. + */ + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig getTaskTrackingViewConfig() { + if (taskTrackingViewConfigBuilder_ == null) { + return taskTrackingViewConfig_ == null + ? google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.getDefaultInstance() + : taskTrackingViewConfig_; + } else { + return taskTrackingViewConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The configuration for task tracking that specifies which data elements are
+     * visible to the end users under what circumstances.
+     * 
+ * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig task_tracking_view_config = 13; + * + */ + public Builder setTaskTrackingViewConfig( + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig value) { + if (taskTrackingViewConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + taskTrackingViewConfig_ = value; + } else { + taskTrackingViewConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * The configuration for task tracking that specifies which data elements are
+     * visible to the end users under what circumstances.
+     * 
+ * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig task_tracking_view_config = 13; + * + */ + public Builder setTaskTrackingViewConfig( + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.Builder builderForValue) { + if (taskTrackingViewConfigBuilder_ == null) { + taskTrackingViewConfig_ = builderForValue.build(); + } else { + taskTrackingViewConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * The configuration for task tracking that specifies which data elements are
+     * visible to the end users under what circumstances.
+     * 
+ * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig task_tracking_view_config = 13; + * + */ + public Builder mergeTaskTrackingViewConfig( + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig value) { + if (taskTrackingViewConfigBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0) + && taskTrackingViewConfig_ != null + && taskTrackingViewConfig_ + != google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig + .getDefaultInstance()) { + getTaskTrackingViewConfigBuilder().mergeFrom(value); + } else { + taskTrackingViewConfig_ = value; + } + } else { + taskTrackingViewConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * The configuration for task tracking that specifies which data elements are
+     * visible to the end users under what circumstances.
+     * 
+ * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig task_tracking_view_config = 13; + * + */ + public Builder clearTaskTrackingViewConfig() { + bitField0_ = (bitField0_ & ~0x00002000); + taskTrackingViewConfig_ = null; + if (taskTrackingViewConfigBuilder_ != null) { + taskTrackingViewConfigBuilder_.dispose(); + taskTrackingViewConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The configuration for task tracking that specifies which data elements are
+     * visible to the end users under what circumstances.
+     * 
+ * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig task_tracking_view_config = 13; + * + */ + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.Builder + getTaskTrackingViewConfigBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return getTaskTrackingViewConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The configuration for task tracking that specifies which data elements are
+     * visible to the end users under what circumstances.
+     * 
+ * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig task_tracking_view_config = 13; + * + */ + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfigOrBuilder + getTaskTrackingViewConfigOrBuilder() { + if (taskTrackingViewConfigBuilder_ != null) { + return taskTrackingViewConfigBuilder_.getMessageOrBuilder(); + } else { + return taskTrackingViewConfig_ == null + ? google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.getDefaultInstance() + : taskTrackingViewConfig_; + } + } + /** + * + * + *
+     * The configuration for task tracking that specifies which data elements are
+     * visible to the end users under what circumstances.
+     * 
+ * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig task_tracking_view_config = 13; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.Builder, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfigOrBuilder> + getTaskTrackingViewConfigFieldBuilder() { + if (taskTrackingViewConfigBuilder_ == null) { + taskTrackingViewConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.Builder, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfigOrBuilder>( + getTaskTrackingViewConfig(), getParentForChildren(), isClean()); + taskTrackingViewConfig_ = null; + } + return taskTrackingViewConfigBuilder_; + } + + private java.util.List attributes_ = + java.util.Collections.emptyList(); + + private void ensureAttributesIsMutable() { + if (!((bitField0_ & 0x00004000) != 0)) { + attributes_ = + new java.util.ArrayList(attributes_); + bitField0_ |= 0x00004000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + google.maps.fleetengine.delivery.v1.TaskAttribute, + google.maps.fleetengine.delivery.v1.TaskAttribute.Builder, + google.maps.fleetengine.delivery.v1.TaskAttributeOrBuilder> + attributesBuilder_; + + /** + * + * + *
+     * A list of custom Task attributes. Each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 15; + */ + public java.util.List getAttributesList() { + if (attributesBuilder_ == null) { + return java.util.Collections.unmodifiableList(attributes_); + } else { + return attributesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of custom Task attributes. Each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 15; + */ + public int getAttributesCount() { + if (attributesBuilder_ == null) { + return attributes_.size(); + } else { + return attributesBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of custom Task attributes. Each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 15; + */ + public google.maps.fleetengine.delivery.v1.TaskAttribute getAttributes(int index) { + if (attributesBuilder_ == null) { + return attributes_.get(index); + } else { + return attributesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of custom Task attributes. Each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 15; + */ + public Builder setAttributes( + int index, google.maps.fleetengine.delivery.v1.TaskAttribute 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 custom Task attributes. Each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 15; + */ + public Builder setAttributes( + int index, google.maps.fleetengine.delivery.v1.TaskAttribute.Builder builderForValue) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.set(index, builderForValue.build()); + onChanged(); + } else { + attributesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of custom Task attributes. Each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 15; + */ + public Builder addAttributes(google.maps.fleetengine.delivery.v1.TaskAttribute value) { + if (attributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributesIsMutable(); + attributes_.add(value); + onChanged(); + } else { + attributesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of custom Task attributes. Each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 15; + */ + public Builder addAttributes( + int index, google.maps.fleetengine.delivery.v1.TaskAttribute 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 custom Task attributes. Each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 15; + */ + public Builder addAttributes( + google.maps.fleetengine.delivery.v1.TaskAttribute.Builder builderForValue) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.add(builderForValue.build()); + onChanged(); + } else { + attributesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of custom Task attributes. Each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 15; + */ + public Builder addAttributes( + int index, google.maps.fleetengine.delivery.v1.TaskAttribute.Builder builderForValue) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.add(index, builderForValue.build()); + onChanged(); + } else { + attributesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of custom Task attributes. Each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 15; + */ + 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 custom Task attributes. Each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 15; + */ + public Builder clearAttributes() { + if (attributesBuilder_ == null) { + attributes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00004000); + onChanged(); + } else { + attributesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of custom Task attributes. Each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 15; + */ + public Builder removeAttributes(int index) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.remove(index); + onChanged(); + } else { + attributesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of custom Task attributes. Each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 15; + */ + public google.maps.fleetengine.delivery.v1.TaskAttribute.Builder getAttributesBuilder( + int index) { + return getAttributesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of custom Task attributes. Each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 15; + */ + public google.maps.fleetengine.delivery.v1.TaskAttributeOrBuilder getAttributesOrBuilder( + int index) { + if (attributesBuilder_ == null) { + return attributes_.get(index); + } else { + return attributesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of custom Task attributes. Each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 15; + */ + public java.util.List + getAttributesOrBuilderList() { + if (attributesBuilder_ != null) { + return attributesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(attributes_); + } + } + /** + * + * + *
+     * A list of custom Task attributes. Each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 15; + */ + public google.maps.fleetengine.delivery.v1.TaskAttribute.Builder addAttributesBuilder() { + return getAttributesFieldBuilder() + .addBuilder(google.maps.fleetengine.delivery.v1.TaskAttribute.getDefaultInstance()); + } + /** + * + * + *
+     * A list of custom Task attributes. Each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 15; + */ + public google.maps.fleetengine.delivery.v1.TaskAttribute.Builder addAttributesBuilder( + int index) { + return getAttributesFieldBuilder() + .addBuilder( + index, google.maps.fleetengine.delivery.v1.TaskAttribute.getDefaultInstance()); + } + /** + * + * + *
+     * A list of custom Task attributes. Each attribute must have a unique key.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 15; + */ + public java.util.List + getAttributesBuilderList() { + return getAttributesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + google.maps.fleetengine.delivery.v1.TaskAttribute, + google.maps.fleetengine.delivery.v1.TaskAttribute.Builder, + google.maps.fleetengine.delivery.v1.TaskAttributeOrBuilder> + getAttributesFieldBuilder() { + if (attributesBuilder_ == null) { + attributesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + google.maps.fleetengine.delivery.v1.TaskAttribute, + google.maps.fleetengine.delivery.v1.TaskAttribute.Builder, + google.maps.fleetengine.delivery.v1.TaskAttributeOrBuilder>( + attributes_, ((bitField0_ & 0x00004000) != 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.delivery.v1.Task) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.delivery.v1.Task) + private static final google.maps.fleetengine.delivery.v1.Task DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new google.maps.fleetengine.delivery.v1.Task(); + } + + public static google.maps.fleetengine.delivery.v1.Task getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Task 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 google.maps.fleetengine.delivery.v1.Task getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/TaskAttribute.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/TaskAttribute.java new file mode 100644 index 000000000000..8a33937c5630 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/TaskAttribute.java @@ -0,0 +1,1212 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/common.proto + +package google.maps.fleetengine.delivery.v1; + +/** + * + * + *
+ * Describes a task attribute as a key-value pair. The "key:value" string length
+ * cannot exceed 256 characters.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.TaskAttribute} + */ +public final class TaskAttribute extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.delivery.v1.TaskAttribute) + TaskAttributeOrBuilder { + private static final long serialVersionUID = 0L; + // Use TaskAttribute.newBuilder() to construct. + private TaskAttribute(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TaskAttribute() { + key_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TaskAttribute(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.Common + .internal_static_maps_fleetengine_delivery_v1_TaskAttribute_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.Common + .internal_static_maps_fleetengine_delivery_v1_TaskAttribute_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.TaskAttribute.class, + google.maps.fleetengine.delivery.v1.TaskAttribute.Builder.class); + } + + private int taskAttributeValueCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object taskAttributeValue_; + + public enum TaskAttributeValueCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + STRING_VALUE(2), + BOOL_VALUE(3), + NUMBER_VALUE(4), + TASKATTRIBUTEVALUE_NOT_SET(0); + private final int value; + + private TaskAttributeValueCase(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 TaskAttributeValueCase valueOf(int value) { + return forNumber(value); + } + + public static TaskAttributeValueCase forNumber(int value) { + switch (value) { + case 2: + return STRING_VALUE; + case 3: + return BOOL_VALUE; + case 4: + return NUMBER_VALUE; + case 0: + return TASKATTRIBUTEVALUE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TaskAttributeValueCase getTaskAttributeValueCase() { + return TaskAttributeValueCase.forNumber(taskAttributeValueCase_); + } + + 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 STRING_VALUE_FIELD_NUMBER = 2; + /** + * + * + *
+   * String typed attribute value.
+   * 
+ * + * string string_value = 2; + * + * @return Whether the stringValue field is set. + */ + public boolean hasStringValue() { + return taskAttributeValueCase_ == 2; + } + /** + * + * + *
+   * String typed attribute value.
+   * 
+ * + * string string_value = 2; + * + * @return The stringValue. + */ + public java.lang.String getStringValue() { + java.lang.Object ref = ""; + if (taskAttributeValueCase_ == 2) { + ref = taskAttributeValue_; + } + 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 (taskAttributeValueCase_ == 2) { + taskAttributeValue_ = s; + } + return s; + } + } + /** + * + * + *
+   * String typed attribute value.
+   * 
+ * + * string string_value = 2; + * + * @return The bytes for stringValue. + */ + public com.google.protobuf.ByteString getStringValueBytes() { + java.lang.Object ref = ""; + if (taskAttributeValueCase_ == 2) { + ref = taskAttributeValue_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (taskAttributeValueCase_ == 2) { + taskAttributeValue_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BOOL_VALUE_FIELD_NUMBER = 3; + /** + * + * + *
+   * Boolean typed attribute value.
+   * 
+ * + * bool bool_value = 3; + * + * @return Whether the boolValue field is set. + */ + @java.lang.Override + public boolean hasBoolValue() { + return taskAttributeValueCase_ == 3; + } + /** + * + * + *
+   * Boolean typed attribute value.
+   * 
+ * + * bool bool_value = 3; + * + * @return The boolValue. + */ + @java.lang.Override + public boolean getBoolValue() { + if (taskAttributeValueCase_ == 3) { + return (java.lang.Boolean) taskAttributeValue_; + } + return false; + } + + public static final int NUMBER_VALUE_FIELD_NUMBER = 4; + /** + * + * + *
+   * Double typed attribute value.
+   * 
+ * + * double number_value = 4; + * + * @return Whether the numberValue field is set. + */ + @java.lang.Override + public boolean hasNumberValue() { + return taskAttributeValueCase_ == 4; + } + /** + * + * + *
+   * Double typed attribute value.
+   * 
+ * + * double number_value = 4; + * + * @return The numberValue. + */ + @java.lang.Override + public double getNumberValue() { + if (taskAttributeValueCase_ == 4) { + return (java.lang.Double) taskAttributeValue_; + } + 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 (taskAttributeValueCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, taskAttributeValue_); + } + if (taskAttributeValueCase_ == 3) { + output.writeBool(3, (boolean) ((java.lang.Boolean) taskAttributeValue_)); + } + if (taskAttributeValueCase_ == 4) { + output.writeDouble(4, (double) ((java.lang.Double) taskAttributeValue_)); + } + 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 (taskAttributeValueCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, taskAttributeValue_); + } + if (taskAttributeValueCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 3, (boolean) ((java.lang.Boolean) taskAttributeValue_)); + } + if (taskAttributeValueCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize( + 4, (double) ((java.lang.Double) taskAttributeValue_)); + } + 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 google.maps.fleetengine.delivery.v1.TaskAttribute)) { + return super.equals(obj); + } + google.maps.fleetengine.delivery.v1.TaskAttribute other = + (google.maps.fleetengine.delivery.v1.TaskAttribute) obj; + + if (!getKey().equals(other.getKey())) return false; + if (!getTaskAttributeValueCase().equals(other.getTaskAttributeValueCase())) return false; + switch (taskAttributeValueCase_) { + case 2: + if (!getStringValue().equals(other.getStringValue())) return false; + break; + case 3: + if (getBoolValue() != other.getBoolValue()) return false; + break; + case 4: + 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(); + switch (taskAttributeValueCase_) { + case 2: + hash = (37 * hash) + STRING_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getStringValue().hashCode(); + break; + case 3: + hash = (37 * hash) + BOOL_VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBoolValue()); + break; + case 4: + 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 google.maps.fleetengine.delivery.v1.TaskAttribute parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.TaskAttribute parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.TaskAttribute parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.TaskAttribute parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.TaskAttribute parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.TaskAttribute parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.TaskAttribute parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.TaskAttribute 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 google.maps.fleetengine.delivery.v1.TaskAttribute parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.TaskAttribute 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 google.maps.fleetengine.delivery.v1.TaskAttribute parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.TaskAttribute 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(google.maps.fleetengine.delivery.v1.TaskAttribute 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 task attribute as a key-value pair. The "key:value" string length
+   * cannot exceed 256 characters.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.TaskAttribute} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.delivery.v1.TaskAttribute) + google.maps.fleetengine.delivery.v1.TaskAttributeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.Common + .internal_static_maps_fleetengine_delivery_v1_TaskAttribute_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.Common + .internal_static_maps_fleetengine_delivery_v1_TaskAttribute_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.TaskAttribute.class, + google.maps.fleetengine.delivery.v1.TaskAttribute.Builder.class); + } + + // Construct using google.maps.fleetengine.delivery.v1.TaskAttribute.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + key_ = ""; + taskAttributeValueCase_ = 0; + taskAttributeValue_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return google.maps.fleetengine.delivery.v1.Common + .internal_static_maps_fleetengine_delivery_v1_TaskAttribute_descriptor; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TaskAttribute getDefaultInstanceForType() { + return google.maps.fleetengine.delivery.v1.TaskAttribute.getDefaultInstance(); + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TaskAttribute build() { + google.maps.fleetengine.delivery.v1.TaskAttribute result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TaskAttribute buildPartial() { + google.maps.fleetengine.delivery.v1.TaskAttribute result = + new google.maps.fleetengine.delivery.v1.TaskAttribute(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(google.maps.fleetengine.delivery.v1.TaskAttribute result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.key_ = key_; + } + } + + private void buildPartialOneofs(google.maps.fleetengine.delivery.v1.TaskAttribute result) { + result.taskAttributeValueCase_ = taskAttributeValueCase_; + result.taskAttributeValue_ = this.taskAttributeValue_; + } + + @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 google.maps.fleetengine.delivery.v1.TaskAttribute) { + return mergeFrom((google.maps.fleetengine.delivery.v1.TaskAttribute) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.maps.fleetengine.delivery.v1.TaskAttribute other) { + if (other == google.maps.fleetengine.delivery.v1.TaskAttribute.getDefaultInstance()) + return this; + if (!other.getKey().isEmpty()) { + key_ = other.key_; + bitField0_ |= 0x00000001; + onChanged(); + } + switch (other.getTaskAttributeValueCase()) { + case STRING_VALUE: + { + taskAttributeValueCase_ = 2; + taskAttributeValue_ = other.taskAttributeValue_; + onChanged(); + break; + } + case BOOL_VALUE: + { + setBoolValue(other.getBoolValue()); + break; + } + case NUMBER_VALUE: + { + setNumberValue(other.getNumberValue()); + break; + } + case TASKATTRIBUTEVALUE_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: + { + java.lang.String s = input.readStringRequireUtf8(); + taskAttributeValueCase_ = 2; + taskAttributeValue_ = s; + break; + } // case 18 + case 24: + { + taskAttributeValue_ = input.readBool(); + taskAttributeValueCase_ = 3; + break; + } // case 24 + case 33: + { + taskAttributeValue_ = input.readDouble(); + taskAttributeValueCase_ = 4; + break; + } // case 33 + 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 taskAttributeValueCase_ = 0; + private java.lang.Object taskAttributeValue_; + + public TaskAttributeValueCase getTaskAttributeValueCase() { + return TaskAttributeValueCase.forNumber(taskAttributeValueCase_); + } + + public Builder clearTaskAttributeValue() { + taskAttributeValueCase_ = 0; + taskAttributeValue_ = 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; + } + + /** + * + * + *
+     * String typed attribute value.
+     * 
+ * + * string string_value = 2; + * + * @return Whether the stringValue field is set. + */ + @java.lang.Override + public boolean hasStringValue() { + return taskAttributeValueCase_ == 2; + } + /** + * + * + *
+     * String typed attribute value.
+     * 
+ * + * string string_value = 2; + * + * @return The stringValue. + */ + @java.lang.Override + public java.lang.String getStringValue() { + java.lang.Object ref = ""; + if (taskAttributeValueCase_ == 2) { + ref = taskAttributeValue_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (taskAttributeValueCase_ == 2) { + taskAttributeValue_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * String typed attribute value.
+     * 
+ * + * string string_value = 2; + * + * @return The bytes for stringValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStringValueBytes() { + java.lang.Object ref = ""; + if (taskAttributeValueCase_ == 2) { + ref = taskAttributeValue_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (taskAttributeValueCase_ == 2) { + taskAttributeValue_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * String typed attribute value.
+     * 
+ * + * string string_value = 2; + * + * @param value The stringValue to set. + * @return This builder for chaining. + */ + public Builder setStringValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + taskAttributeValueCase_ = 2; + taskAttributeValue_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * String typed attribute value.
+     * 
+ * + * string string_value = 2; + * + * @return This builder for chaining. + */ + public Builder clearStringValue() { + if (taskAttributeValueCase_ == 2) { + taskAttributeValueCase_ = 0; + taskAttributeValue_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * String typed attribute value.
+     * 
+ * + * string string_value = 2; + * + * @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); + taskAttributeValueCase_ = 2; + taskAttributeValue_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Boolean typed attribute value.
+     * 
+ * + * bool bool_value = 3; + * + * @return Whether the boolValue field is set. + */ + public boolean hasBoolValue() { + return taskAttributeValueCase_ == 3; + } + /** + * + * + *
+     * Boolean typed attribute value.
+     * 
+ * + * bool bool_value = 3; + * + * @return The boolValue. + */ + public boolean getBoolValue() { + if (taskAttributeValueCase_ == 3) { + return (java.lang.Boolean) taskAttributeValue_; + } + return false; + } + /** + * + * + *
+     * Boolean typed attribute value.
+     * 
+ * + * bool bool_value = 3; + * + * @param value The boolValue to set. + * @return This builder for chaining. + */ + public Builder setBoolValue(boolean value) { + + taskAttributeValueCase_ = 3; + taskAttributeValue_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Boolean typed attribute value.
+     * 
+ * + * bool bool_value = 3; + * + * @return This builder for chaining. + */ + public Builder clearBoolValue() { + if (taskAttributeValueCase_ == 3) { + taskAttributeValueCase_ = 0; + taskAttributeValue_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Double typed attribute value.
+     * 
+ * + * double number_value = 4; + * + * @return Whether the numberValue field is set. + */ + public boolean hasNumberValue() { + return taskAttributeValueCase_ == 4; + } + /** + * + * + *
+     * Double typed attribute value.
+     * 
+ * + * double number_value = 4; + * + * @return The numberValue. + */ + public double getNumberValue() { + if (taskAttributeValueCase_ == 4) { + return (java.lang.Double) taskAttributeValue_; + } + return 0D; + } + /** + * + * + *
+     * Double typed attribute value.
+     * 
+ * + * double number_value = 4; + * + * @param value The numberValue to set. + * @return This builder for chaining. + */ + public Builder setNumberValue(double value) { + + taskAttributeValueCase_ = 4; + taskAttributeValue_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Double typed attribute value.
+     * 
+ * + * double number_value = 4; + * + * @return This builder for chaining. + */ + public Builder clearNumberValue() { + if (taskAttributeValueCase_ == 4) { + taskAttributeValueCase_ = 0; + taskAttributeValue_ = 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.delivery.v1.TaskAttribute) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.delivery.v1.TaskAttribute) + private static final google.maps.fleetengine.delivery.v1.TaskAttribute DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new google.maps.fleetengine.delivery.v1.TaskAttribute(); + } + + public static google.maps.fleetengine.delivery.v1.TaskAttribute getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TaskAttribute 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 google.maps.fleetengine.delivery.v1.TaskAttribute getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/TaskAttributeOrBuilder.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/TaskAttributeOrBuilder.java new file mode 100644 index 000000000000..678682feffab --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/TaskAttributeOrBuilder.java @@ -0,0 +1,140 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/common.proto + +package google.maps.fleetengine.delivery.v1; + +public interface TaskAttributeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.delivery.v1.TaskAttribute) + 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(); + + /** + * + * + *
+   * String typed attribute value.
+   * 
+ * + * string string_value = 2; + * + * @return Whether the stringValue field is set. + */ + boolean hasStringValue(); + /** + * + * + *
+   * String typed attribute value.
+   * 
+ * + * string string_value = 2; + * + * @return The stringValue. + */ + java.lang.String getStringValue(); + /** + * + * + *
+   * String typed attribute value.
+   * 
+ * + * string string_value = 2; + * + * @return The bytes for stringValue. + */ + com.google.protobuf.ByteString getStringValueBytes(); + + /** + * + * + *
+   * Boolean typed attribute value.
+   * 
+ * + * bool bool_value = 3; + * + * @return Whether the boolValue field is set. + */ + boolean hasBoolValue(); + /** + * + * + *
+   * Boolean typed attribute value.
+   * 
+ * + * bool bool_value = 3; + * + * @return The boolValue. + */ + boolean getBoolValue(); + + /** + * + * + *
+   * Double typed attribute value.
+   * 
+ * + * double number_value = 4; + * + * @return Whether the numberValue field is set. + */ + boolean hasNumberValue(); + /** + * + * + *
+   * Double typed attribute value.
+   * 
+ * + * double number_value = 4; + * + * @return The numberValue. + */ + double getNumberValue(); + + google.maps.fleetengine.delivery.v1.TaskAttribute.TaskAttributeValueCase + getTaskAttributeValueCase(); +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/TaskName.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/TaskName.java new file mode 100644 index 000000000000..3819fae80c83 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/TaskName.java @@ -0,0 +1,191 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.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 TaskName implements ResourceName { + private static final PathTemplate PROVIDER_TASK = + PathTemplate.createWithoutUrlEncoding("providers/{provider}/tasks/{task}"); + private volatile Map fieldValuesMap; + private final String provider; + private final String task; + + @Deprecated + protected TaskName() { + provider = null; + task = null; + } + + private TaskName(Builder builder) { + provider = Preconditions.checkNotNull(builder.getProvider()); + task = Preconditions.checkNotNull(builder.getTask()); + } + + public String getProvider() { + return provider; + } + + public String getTask() { + return task; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static TaskName of(String provider, String task) { + return newBuilder().setProvider(provider).setTask(task).build(); + } + + public static String format(String provider, String task) { + return newBuilder().setProvider(provider).setTask(task).build().toString(); + } + + public static TaskName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROVIDER_TASK.validatedMatch( + formattedString, "TaskName.parse: formattedString not in valid format"); + return of(matchMap.get("provider"), matchMap.get("task")); + } + + 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 (TaskName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROVIDER_TASK.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 (task != null) { + fieldMapBuilder.put("task", task); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROVIDER_TASK.instantiate("provider", provider, "task", task); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + TaskName that = ((TaskName) o); + return Objects.equals(this.provider, that.provider) && Objects.equals(this.task, that.task); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(provider); + h *= 1000003; + h ^= Objects.hashCode(task); + return h; + } + + /** Builder for providers/{provider}/tasks/{task}. */ + public static class Builder { + private String provider; + private String task; + + protected Builder() {} + + public String getProvider() { + return provider; + } + + public String getTask() { + return task; + } + + public Builder setProvider(String provider) { + this.provider = provider; + return this; + } + + public Builder setTask(String task) { + this.task = task; + return this; + } + + private Builder(TaskName taskName) { + this.provider = taskName.provider; + this.task = taskName.task; + } + + public TaskName build() { + return new TaskName(this); + } + } +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/TaskOrBuilder.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/TaskOrBuilder.java new file mode 100644 index 000000000000..fc136e568899 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/TaskOrBuilder.java @@ -0,0 +1,591 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/tasks.proto + +package google.maps.fleetengine.delivery.v1; + +public interface TaskOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.delivery.v1.Task) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Must be in the format `providers/{provider}/tasks/{task}`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Must be in the format `providers/{provider}/tasks/{task}`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Immutable. Defines the type of the Task. For example, a break or
+   * shipment.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * Required. Immutable. Defines the type of the Task. For example, a break or
+   * shipment.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The type. + */ + google.maps.fleetengine.delivery.v1.Task.Type getType(); + + /** + * + * + *
+   * Required. The current execution state of the Task.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.State state = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Required. The current execution state of the Task.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.State state = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The state. + */ + google.maps.fleetengine.delivery.v1.Task.State getState(); + + /** + * + * + *
+   * The outcome of the Task.
+   * 
+ * + * .maps.fleetengine.delivery.v1.Task.TaskOutcome task_outcome = 9; + * + * @return The enum numeric value on the wire for taskOutcome. + */ + int getTaskOutcomeValue(); + /** + * + * + *
+   * The outcome of the Task.
+   * 
+ * + * .maps.fleetengine.delivery.v1.Task.TaskOutcome task_outcome = 9; + * + * @return The taskOutcome. + */ + google.maps.fleetengine.delivery.v1.Task.TaskOutcome getTaskOutcome(); + + /** + * + * + *
+   * The timestamp that indicates when the `Task`'s outcome was set by the
+   * provider.
+   * 
+ * + * .google.protobuf.Timestamp task_outcome_time = 10; + * + * @return Whether the taskOutcomeTime field is set. + */ + boolean hasTaskOutcomeTime(); + /** + * + * + *
+   * The timestamp that indicates when the `Task`'s outcome was set by the
+   * provider.
+   * 
+ * + * .google.protobuf.Timestamp task_outcome_time = 10; + * + * @return The taskOutcomeTime. + */ + com.google.protobuf.Timestamp getTaskOutcomeTime(); + /** + * + * + *
+   * The timestamp that indicates when the `Task`'s outcome was set by the
+   * provider.
+   * 
+ * + * .google.protobuf.Timestamp task_outcome_time = 10; + */ + com.google.protobuf.TimestampOrBuilder getTaskOutcomeTimeOrBuilder(); + + /** + * + * + *
+   * The location where the `Task`'s outcome was set. This value is updated as
+   * part of `UpdateTask`. If this value isn't explicitly updated by the
+   * provider, then Fleet Engine populates it by default with the last known
+   * vehicle location (the *raw* location).
+   * 
+ * + * .maps.fleetengine.delivery.v1.LocationInfo task_outcome_location = 11; + * + * @return Whether the taskOutcomeLocation field is set. + */ + boolean hasTaskOutcomeLocation(); + /** + * + * + *
+   * The location where the `Task`'s outcome was set. This value is updated as
+   * part of `UpdateTask`. If this value isn't explicitly updated by the
+   * provider, then Fleet Engine populates it by default with the last known
+   * vehicle location (the *raw* location).
+   * 
+ * + * .maps.fleetengine.delivery.v1.LocationInfo task_outcome_location = 11; + * + * @return The taskOutcomeLocation. + */ + google.maps.fleetengine.delivery.v1.LocationInfo getTaskOutcomeLocation(); + /** + * + * + *
+   * The location where the `Task`'s outcome was set. This value is updated as
+   * part of `UpdateTask`. If this value isn't explicitly updated by the
+   * provider, then Fleet Engine populates it by default with the last known
+   * vehicle location (the *raw* location).
+   * 
+ * + * .maps.fleetengine.delivery.v1.LocationInfo task_outcome_location = 11; + */ + google.maps.fleetengine.delivery.v1.LocationInfoOrBuilder getTaskOutcomeLocationOrBuilder(); + + /** + * + * + *
+   * Indicates where the value of the `task_outcome_location` came from.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.TaskOutcomeLocationSource task_outcome_location_source = 12; + * + * + * @return The enum numeric value on the wire for taskOutcomeLocationSource. + */ + int getTaskOutcomeLocationSourceValue(); + /** + * + * + *
+   * Indicates where the value of the `task_outcome_location` came from.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.TaskOutcomeLocationSource task_outcome_location_source = 12; + * + * + * @return The taskOutcomeLocationSource. + */ + google.maps.fleetengine.delivery.v1.Task.TaskOutcomeLocationSource getTaskOutcomeLocationSource(); + + /** + * + * + *
+   * Immutable. This field facilitates the storing of an ID so you can avoid
+   * using a complicated mapping. You cannot set `tracking_id` for Tasks of type
+   * `UNAVAILABLE` and `SCHEDULED_STOP`. These IDs are 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 tracking_id = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The trackingId. + */ + java.lang.String getTrackingId(); + /** + * + * + *
+   * Immutable. This field facilitates the storing of an ID so you can avoid
+   * using a complicated mapping. You cannot set `tracking_id` for Tasks of type
+   * `UNAVAILABLE` and `SCHEDULED_STOP`. These IDs are 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 tracking_id = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for trackingId. + */ + com.google.protobuf.ByteString getTrackingIdBytes(); + + /** + * + * + *
+   * Output only. The ID of the vehicle that is executing this Task. Delivery
+   * Vehicle IDs are 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 delivery_vehicle_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The deliveryVehicleId. + */ + java.lang.String getDeliveryVehicleId(); + /** + * + * + *
+   * Output only. The ID of the vehicle that is executing this Task. Delivery
+   * Vehicle IDs are 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 delivery_vehicle_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for deliveryVehicleId. + */ + com.google.protobuf.ByteString getDeliveryVehicleIdBytes(); + + /** + * + * + *
+   * Immutable. The location where the Task will be completed.
+   * Optional for `UNAVAILABLE` Tasks, but required for all other Tasks.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the plannedLocation field is set. + */ + boolean hasPlannedLocation(); + /** + * + * + *
+   * Immutable. The location where the Task will be completed.
+   * Optional for `UNAVAILABLE` Tasks, but required for all other Tasks.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The plannedLocation. + */ + google.maps.fleetengine.delivery.v1.LocationInfo getPlannedLocation(); + /** + * + * + *
+   * Immutable. The location where the Task will be completed.
+   * Optional for `UNAVAILABLE` Tasks, but required for all other Tasks.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + google.maps.fleetengine.delivery.v1.LocationInfoOrBuilder getPlannedLocationOrBuilder(); + + /** + * + * + *
+   * Required. Immutable. The time needed to execute a Task at this location.
+   * 
+ * + * + * .google.protobuf.Duration task_duration = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the taskDuration field is set. + */ + boolean hasTaskDuration(); + /** + * + * + *
+   * Required. Immutable. The time needed to execute a Task at this location.
+   * 
+ * + * + * .google.protobuf.Duration task_duration = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The taskDuration. + */ + com.google.protobuf.Duration getTaskDuration(); + /** + * + * + *
+   * Required. Immutable. The time needed to execute a Task at this location.
+   * 
+ * + * + * .google.protobuf.Duration task_duration = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.protobuf.DurationOrBuilder getTaskDurationOrBuilder(); + + /** + * + * + *
+   * The time window during which the task should be completed.
+   * 
+ * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 14; + * + * @return Whether the targetTimeWindow field is set. + */ + boolean hasTargetTimeWindow(); + /** + * + * + *
+   * The time window during which the task should be completed.
+   * 
+ * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 14; + * + * @return The targetTimeWindow. + */ + google.maps.fleetengine.delivery.v1.TimeWindow getTargetTimeWindow(); + /** + * + * + *
+   * The time window during which the task should be completed.
+   * 
+ * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 14; + */ + google.maps.fleetengine.delivery.v1.TimeWindowOrBuilder getTargetTimeWindowOrBuilder(); + + /** + * + * + *
+   * Output only. Journey sharing-specific fields. Not populated when state is
+   * `CLOSED`.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.JourneySharingInfo journey_sharing_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the journeySharingInfo field is set. + */ + boolean hasJourneySharingInfo(); + /** + * + * + *
+   * Output only. Journey sharing-specific fields. Not populated when state is
+   * `CLOSED`.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.JourneySharingInfo journey_sharing_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The journeySharingInfo. + */ + google.maps.fleetengine.delivery.v1.Task.JourneySharingInfo getJourneySharingInfo(); + /** + * + * + *
+   * Output only. Journey sharing-specific fields. Not populated when state is
+   * `CLOSED`.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.Task.JourneySharingInfo journey_sharing_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + google.maps.fleetengine.delivery.v1.Task.JourneySharingInfoOrBuilder + getJourneySharingInfoOrBuilder(); + + /** + * + * + *
+   * The configuration for task tracking that specifies which data elements are
+   * visible to the end users under what circumstances.
+   * 
+ * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig task_tracking_view_config = 13; + * + * + * @return Whether the taskTrackingViewConfig field is set. + */ + boolean hasTaskTrackingViewConfig(); + /** + * + * + *
+   * The configuration for task tracking that specifies which data elements are
+   * visible to the end users under what circumstances.
+   * 
+ * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig task_tracking_view_config = 13; + * + * + * @return The taskTrackingViewConfig. + */ + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig getTaskTrackingViewConfig(); + /** + * + * + *
+   * The configuration for task tracking that specifies which data elements are
+   * visible to the end users under what circumstances.
+   * 
+ * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig task_tracking_view_config = 13; + * + */ + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfigOrBuilder + getTaskTrackingViewConfigOrBuilder(); + + /** + * + * + *
+   * A list of custom Task attributes. Each attribute must have a unique key.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 15; + */ + java.util.List getAttributesList(); + /** + * + * + *
+   * A list of custom Task attributes. Each attribute must have a unique key.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 15; + */ + google.maps.fleetengine.delivery.v1.TaskAttribute getAttributes(int index); + /** + * + * + *
+   * A list of custom Task attributes. Each attribute must have a unique key.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 15; + */ + int getAttributesCount(); + /** + * + * + *
+   * A list of custom Task attributes. Each attribute must have a unique key.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 15; + */ + java.util.List + getAttributesOrBuilderList(); + /** + * + * + *
+   * A list of custom Task attributes. Each attribute must have a unique key.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 15; + */ + google.maps.fleetengine.delivery.v1.TaskAttributeOrBuilder getAttributesOrBuilder(int index); +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/TaskTrackingInfo.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/TaskTrackingInfo.java new file mode 100644 index 000000000000..30781184ebef --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/TaskTrackingInfo.java @@ -0,0 +1,4407 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/task_tracking_info.proto + +package google.maps.fleetengine.delivery.v1; + +/** + * + * + *
+ * The `TaskTrackingInfo` message. The message contains task tracking
+ * information which will be used for display. If a tracking ID is associated
+ * with multiple Tasks, Fleet Engine uses a heuristic to decide which Task's
+ * TaskTrackingInfo to select.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.TaskTrackingInfo} + */ +public final class TaskTrackingInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.delivery.v1.TaskTrackingInfo) + TaskTrackingInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use TaskTrackingInfo.newBuilder() to construct. + private TaskTrackingInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TaskTrackingInfo() { + name_ = ""; + trackingId_ = ""; + routePolylinePoints_ = java.util.Collections.emptyList(); + state_ = 0; + taskOutcome_ = 0; + attributes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TaskTrackingInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.TaskTrackingInfoProto + .internal_static_maps_fleetengine_delivery_v1_TaskTrackingInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.TaskTrackingInfoProto + .internal_static_maps_fleetengine_delivery_v1_TaskTrackingInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.TaskTrackingInfo.class, + google.maps.fleetengine.delivery.v1.TaskTrackingInfo.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Must be in the format `providers/{provider}/taskTrackingInfo/{tracking}`,
+   * where `tracking` represents the tracking ID.
+   * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+   * Must be in the format `providers/{provider}/taskTrackingInfo/{tracking}`,
+   * where `tracking` represents the tracking ID.
+   * 
+ * + * string name = 1; + * + * @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 TRACKING_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object trackingId_ = ""; + /** + * + * + *
+   * Immutable. The tracking ID of a Task.
+   * * 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 tracking_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The trackingId. + */ + @java.lang.Override + public java.lang.String getTrackingId() { + java.lang.Object ref = trackingId_; + 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(); + trackingId_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. The tracking ID of a Task.
+   * * 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 tracking_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for trackingId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTrackingIdBytes() { + java.lang.Object ref = trackingId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + trackingId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VEHICLE_LOCATION_FIELD_NUMBER = 3; + private google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation vehicleLocation_; + /** + * + * + *
+   * The vehicle's last location.
+   * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation vehicle_location = 3; + * + * @return Whether the vehicleLocation field is set. + */ + @java.lang.Override + public boolean hasVehicleLocation() { + return vehicleLocation_ != null; + } + /** + * + * + *
+   * The vehicle's last location.
+   * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation vehicle_location = 3; + * + * @return The vehicleLocation. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation getVehicleLocation() { + return vehicleLocation_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation.getDefaultInstance() + : vehicleLocation_; + } + /** + * + * + *
+   * The vehicle's last location.
+   * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation vehicle_location = 3; + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationOrBuilder + getVehicleLocationOrBuilder() { + return vehicleLocation_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation.getDefaultInstance() + : vehicleLocation_; + } + + public static final int ROUTE_POLYLINE_POINTS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List routePolylinePoints_; + /** + * + * + *
+   * A list of points which when connected forms a polyline of the vehicle's
+   * expected route to the location of this task.
+   * 
+ * + * repeated .google.type.LatLng route_polyline_points = 4; + */ + @java.lang.Override + public java.util.List getRoutePolylinePointsList() { + return routePolylinePoints_; + } + /** + * + * + *
+   * A list of points which when connected forms a polyline of the vehicle's
+   * expected route to the location of this task.
+   * 
+ * + * repeated .google.type.LatLng route_polyline_points = 4; + */ + @java.lang.Override + public java.util.List + getRoutePolylinePointsOrBuilderList() { + return routePolylinePoints_; + } + /** + * + * + *
+   * A list of points which when connected forms a polyline of the vehicle's
+   * expected route to the location of this task.
+   * 
+ * + * repeated .google.type.LatLng route_polyline_points = 4; + */ + @java.lang.Override + public int getRoutePolylinePointsCount() { + return routePolylinePoints_.size(); + } + /** + * + * + *
+   * A list of points which when connected forms a polyline of the vehicle's
+   * expected route to the location of this task.
+   * 
+ * + * repeated .google.type.LatLng route_polyline_points = 4; + */ + @java.lang.Override + public com.google.type.LatLng getRoutePolylinePoints(int index) { + return routePolylinePoints_.get(index); + } + /** + * + * + *
+   * A list of points which when connected forms a polyline of the vehicle's
+   * expected route to the location of this task.
+   * 
+ * + * repeated .google.type.LatLng route_polyline_points = 4; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getRoutePolylinePointsOrBuilder(int index) { + return routePolylinePoints_.get(index); + } + + public static final int REMAINING_STOP_COUNT_FIELD_NUMBER = 5; + private com.google.protobuf.Int32Value remainingStopCount_; + /** + * + * + *
+   * Indicates the number of stops the vehicle remaining until the task stop is
+   * reached, including the task stop. For example, if the vehicle's next stop
+   * is the task stop, the value will be 1.
+   * 
+ * + * .google.protobuf.Int32Value remaining_stop_count = 5; + * + * @return Whether the remainingStopCount field is set. + */ + @java.lang.Override + public boolean hasRemainingStopCount() { + return remainingStopCount_ != null; + } + /** + * + * + *
+   * Indicates the number of stops the vehicle remaining until the task stop is
+   * reached, including the task stop. For example, if the vehicle's next stop
+   * is the task stop, the value will be 1.
+   * 
+ * + * .google.protobuf.Int32Value remaining_stop_count = 5; + * + * @return The remainingStopCount. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getRemainingStopCount() { + return remainingStopCount_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : remainingStopCount_; + } + /** + * + * + *
+   * Indicates the number of stops the vehicle remaining until the task stop is
+   * reached, including the task stop. For example, if the vehicle's next stop
+   * is the task stop, the value will be 1.
+   * 
+ * + * .google.protobuf.Int32Value remaining_stop_count = 5; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getRemainingStopCountOrBuilder() { + return remainingStopCount_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : remainingStopCount_; + } + + public static final int REMAINING_DRIVING_DISTANCE_METERS_FIELD_NUMBER = 6; + private com.google.protobuf.Int32Value remainingDrivingDistanceMeters_; + /** + * + * + *
+   * The total remaining distance in meters to the `VehicleStop` of interest.
+   * 
+ * + * .google.protobuf.Int32Value remaining_driving_distance_meters = 6; + * + * @return Whether the remainingDrivingDistanceMeters field is set. + */ + @java.lang.Override + public boolean hasRemainingDrivingDistanceMeters() { + return remainingDrivingDistanceMeters_ != null; + } + /** + * + * + *
+   * The total remaining distance in meters to the `VehicleStop` of interest.
+   * 
+ * + * .google.protobuf.Int32Value remaining_driving_distance_meters = 6; + * + * @return The remainingDrivingDistanceMeters. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getRemainingDrivingDistanceMeters() { + return remainingDrivingDistanceMeters_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : remainingDrivingDistanceMeters_; + } + /** + * + * + *
+   * The total remaining distance in meters to the `VehicleStop` of interest.
+   * 
+ * + * .google.protobuf.Int32Value remaining_driving_distance_meters = 6; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getRemainingDrivingDistanceMetersOrBuilder() { + return remainingDrivingDistanceMeters_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : remainingDrivingDistanceMeters_; + } + + public static final int ESTIMATED_ARRIVAL_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp estimatedArrivalTime_; + /** + * + * + *
+   * The timestamp that indicates the estimated arrival time to the stop
+   * location.
+   * 
+ * + * .google.protobuf.Timestamp estimated_arrival_time = 7; + * + * @return Whether the estimatedArrivalTime field is set. + */ + @java.lang.Override + public boolean hasEstimatedArrivalTime() { + return estimatedArrivalTime_ != null; + } + /** + * + * + *
+   * The timestamp that indicates the estimated arrival time to the stop
+   * location.
+   * 
+ * + * .google.protobuf.Timestamp estimated_arrival_time = 7; + * + * @return The estimatedArrivalTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEstimatedArrivalTime() { + return estimatedArrivalTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : estimatedArrivalTime_; + } + /** + * + * + *
+   * The timestamp that indicates the estimated arrival time to the stop
+   * location.
+   * 
+ * + * .google.protobuf.Timestamp estimated_arrival_time = 7; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEstimatedArrivalTimeOrBuilder() { + return estimatedArrivalTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : estimatedArrivalTime_; + } + + public static final int ESTIMATED_TASK_COMPLETION_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp estimatedTaskCompletionTime_; + /** + * + * + *
+   * The timestamp that indicates the estimated completion time of a Task.
+   * 
+ * + * .google.protobuf.Timestamp estimated_task_completion_time = 8; + * + * @return Whether the estimatedTaskCompletionTime field is set. + */ + @java.lang.Override + public boolean hasEstimatedTaskCompletionTime() { + return estimatedTaskCompletionTime_ != null; + } + /** + * + * + *
+   * The timestamp that indicates the estimated completion time of a Task.
+   * 
+ * + * .google.protobuf.Timestamp estimated_task_completion_time = 8; + * + * @return The estimatedTaskCompletionTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEstimatedTaskCompletionTime() { + return estimatedTaskCompletionTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : estimatedTaskCompletionTime_; + } + /** + * + * + *
+   * The timestamp that indicates the estimated completion time of a Task.
+   * 
+ * + * .google.protobuf.Timestamp estimated_task_completion_time = 8; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEstimatedTaskCompletionTimeOrBuilder() { + return estimatedTaskCompletionTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : estimatedTaskCompletionTime_; + } + + public static final int STATE_FIELD_NUMBER = 11; + private int state_ = 0; + /** + * + * + *
+   * The current execution state of the Task.
+   * 
+ * + * .maps.fleetengine.delivery.v1.Task.State state = 11; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * The current execution state of the Task.
+   * 
+ * + * .maps.fleetengine.delivery.v1.Task.State state = 11; + * + * @return The state. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.Task.State getState() { + google.maps.fleetengine.delivery.v1.Task.State result = + google.maps.fleetengine.delivery.v1.Task.State.forNumber(state_); + return result == null ? google.maps.fleetengine.delivery.v1.Task.State.UNRECOGNIZED : result; + } + + public static final int TASK_OUTCOME_FIELD_NUMBER = 9; + private int taskOutcome_ = 0; + /** + * + * + *
+   * The outcome of attempting to execute a Task.
+   * 
+ * + * .maps.fleetengine.delivery.v1.Task.TaskOutcome task_outcome = 9; + * + * @return The enum numeric value on the wire for taskOutcome. + */ + @java.lang.Override + public int getTaskOutcomeValue() { + return taskOutcome_; + } + /** + * + * + *
+   * The outcome of attempting to execute a Task.
+   * 
+ * + * .maps.fleetengine.delivery.v1.Task.TaskOutcome task_outcome = 9; + * + * @return The taskOutcome. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.Task.TaskOutcome getTaskOutcome() { + google.maps.fleetengine.delivery.v1.Task.TaskOutcome result = + google.maps.fleetengine.delivery.v1.Task.TaskOutcome.forNumber(taskOutcome_); + return result == null + ? google.maps.fleetengine.delivery.v1.Task.TaskOutcome.UNRECOGNIZED + : result; + } + + public static final int TASK_OUTCOME_TIME_FIELD_NUMBER = 12; + private com.google.protobuf.Timestamp taskOutcomeTime_; + /** + * + * + *
+   * The timestamp that indicates when the Task's outcome was set by the
+   * provider.
+   * 
+ * + * .google.protobuf.Timestamp task_outcome_time = 12; + * + * @return Whether the taskOutcomeTime field is set. + */ + @java.lang.Override + public boolean hasTaskOutcomeTime() { + return taskOutcomeTime_ != null; + } + /** + * + * + *
+   * The timestamp that indicates when the Task's outcome was set by the
+   * provider.
+   * 
+ * + * .google.protobuf.Timestamp task_outcome_time = 12; + * + * @return The taskOutcomeTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTaskOutcomeTime() { + return taskOutcomeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : taskOutcomeTime_; + } + /** + * + * + *
+   * The timestamp that indicates when the Task's outcome was set by the
+   * provider.
+   * 
+ * + * .google.protobuf.Timestamp task_outcome_time = 12; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getTaskOutcomeTimeOrBuilder() { + return taskOutcomeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : taskOutcomeTime_; + } + + public static final int PLANNED_LOCATION_FIELD_NUMBER = 10; + private google.maps.fleetengine.delivery.v1.LocationInfo plannedLocation_; + /** + * + * + *
+   * Immutable. The location where the Task will be completed.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the plannedLocation field is set. + */ + @java.lang.Override + public boolean hasPlannedLocation() { + return plannedLocation_ != null; + } + /** + * + * + *
+   * Immutable. The location where the Task will be completed.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The plannedLocation. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.LocationInfo getPlannedLocation() { + return plannedLocation_ == null + ? google.maps.fleetengine.delivery.v1.LocationInfo.getDefaultInstance() + : plannedLocation_; + } + /** + * + * + *
+   * Immutable. The location where the Task will be completed.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.LocationInfoOrBuilder getPlannedLocationOrBuilder() { + return plannedLocation_ == null + ? google.maps.fleetengine.delivery.v1.LocationInfo.getDefaultInstance() + : plannedLocation_; + } + + public static final int TARGET_TIME_WINDOW_FIELD_NUMBER = 13; + private google.maps.fleetengine.delivery.v1.TimeWindow targetTimeWindow_; + /** + * + * + *
+   * The time window during which the task should be completed.
+   * 
+ * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 13; + * + * @return Whether the targetTimeWindow field is set. + */ + @java.lang.Override + public boolean hasTargetTimeWindow() { + return targetTimeWindow_ != null; + } + /** + * + * + *
+   * The time window during which the task should be completed.
+   * 
+ * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 13; + * + * @return The targetTimeWindow. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TimeWindow getTargetTimeWindow() { + return targetTimeWindow_ == null + ? google.maps.fleetengine.delivery.v1.TimeWindow.getDefaultInstance() + : targetTimeWindow_; + } + /** + * + * + *
+   * The time window during which the task should be completed.
+   * 
+ * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 13; + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TimeWindowOrBuilder getTargetTimeWindowOrBuilder() { + return targetTimeWindow_ == null + ? google.maps.fleetengine.delivery.v1.TimeWindow.getDefaultInstance() + : targetTimeWindow_; + } + + public static final int ATTRIBUTES_FIELD_NUMBER = 14; + + @SuppressWarnings("serial") + private java.util.List attributes_; + /** + * + * + *
+   * The custom attributes set on the task.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 14; + */ + @java.lang.Override + public java.util.List getAttributesList() { + return attributes_; + } + /** + * + * + *
+   * The custom attributes set on the task.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 14; + */ + @java.lang.Override + public java.util.List + getAttributesOrBuilderList() { + return attributes_; + } + /** + * + * + *
+   * The custom attributes set on the task.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 14; + */ + @java.lang.Override + public int getAttributesCount() { + return attributes_.size(); + } + /** + * + * + *
+   * The custom attributes set on the task.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 14; + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TaskAttribute getAttributes(int index) { + return attributes_.get(index); + } + /** + * + * + *
+   * The custom attributes set on the task.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 14; + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TaskAttributeOrBuilder 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(trackingId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, trackingId_); + } + if (vehicleLocation_ != null) { + output.writeMessage(3, getVehicleLocation()); + } + for (int i = 0; i < routePolylinePoints_.size(); i++) { + output.writeMessage(4, routePolylinePoints_.get(i)); + } + if (remainingStopCount_ != null) { + output.writeMessage(5, getRemainingStopCount()); + } + if (remainingDrivingDistanceMeters_ != null) { + output.writeMessage(6, getRemainingDrivingDistanceMeters()); + } + if (estimatedArrivalTime_ != null) { + output.writeMessage(7, getEstimatedArrivalTime()); + } + if (estimatedTaskCompletionTime_ != null) { + output.writeMessage(8, getEstimatedTaskCompletionTime()); + } + if (taskOutcome_ + != google.maps.fleetengine.delivery.v1.Task.TaskOutcome.TASK_OUTCOME_UNSPECIFIED + .getNumber()) { + output.writeEnum(9, taskOutcome_); + } + if (plannedLocation_ != null) { + output.writeMessage(10, getPlannedLocation()); + } + if (state_ != google.maps.fleetengine.delivery.v1.Task.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(11, state_); + } + if (taskOutcomeTime_ != null) { + output.writeMessage(12, getTaskOutcomeTime()); + } + if (targetTimeWindow_ != null) { + output.writeMessage(13, getTargetTimeWindow()); + } + for (int i = 0; i < attributes_.size(); i++) { + output.writeMessage(14, attributes_.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(trackingId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, trackingId_); + } + if (vehicleLocation_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getVehicleLocation()); + } + for (int i = 0; i < routePolylinePoints_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, routePolylinePoints_.get(i)); + } + if (remainingStopCount_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getRemainingStopCount()); + } + if (remainingDrivingDistanceMeters_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, getRemainingDrivingDistanceMeters()); + } + if (estimatedArrivalTime_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(7, getEstimatedArrivalTime()); + } + if (estimatedTaskCompletionTime_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, getEstimatedTaskCompletionTime()); + } + if (taskOutcome_ + != google.maps.fleetengine.delivery.v1.Task.TaskOutcome.TASK_OUTCOME_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, taskOutcome_); + } + if (plannedLocation_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getPlannedLocation()); + } + if (state_ != google.maps.fleetengine.delivery.v1.Task.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, state_); + } + if (taskOutcomeTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getTaskOutcomeTime()); + } + if (targetTimeWindow_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getTargetTimeWindow()); + } + for (int i = 0; i < attributes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, 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 google.maps.fleetengine.delivery.v1.TaskTrackingInfo)) { + return super.equals(obj); + } + google.maps.fleetengine.delivery.v1.TaskTrackingInfo other = + (google.maps.fleetengine.delivery.v1.TaskTrackingInfo) obj; + + if (!getName().equals(other.getName())) return false; + if (!getTrackingId().equals(other.getTrackingId())) return false; + if (hasVehicleLocation() != other.hasVehicleLocation()) return false; + if (hasVehicleLocation()) { + if (!getVehicleLocation().equals(other.getVehicleLocation())) return false; + } + if (!getRoutePolylinePointsList().equals(other.getRoutePolylinePointsList())) return false; + if (hasRemainingStopCount() != other.hasRemainingStopCount()) return false; + if (hasRemainingStopCount()) { + if (!getRemainingStopCount().equals(other.getRemainingStopCount())) return false; + } + if (hasRemainingDrivingDistanceMeters() != other.hasRemainingDrivingDistanceMeters()) + return false; + if (hasRemainingDrivingDistanceMeters()) { + if (!getRemainingDrivingDistanceMeters().equals(other.getRemainingDrivingDistanceMeters())) + return false; + } + if (hasEstimatedArrivalTime() != other.hasEstimatedArrivalTime()) return false; + if (hasEstimatedArrivalTime()) { + if (!getEstimatedArrivalTime().equals(other.getEstimatedArrivalTime())) return false; + } + if (hasEstimatedTaskCompletionTime() != other.hasEstimatedTaskCompletionTime()) return false; + if (hasEstimatedTaskCompletionTime()) { + if (!getEstimatedTaskCompletionTime().equals(other.getEstimatedTaskCompletionTime())) + return false; + } + if (state_ != other.state_) return false; + if (taskOutcome_ != other.taskOutcome_) return false; + if (hasTaskOutcomeTime() != other.hasTaskOutcomeTime()) return false; + if (hasTaskOutcomeTime()) { + if (!getTaskOutcomeTime().equals(other.getTaskOutcomeTime())) return false; + } + if (hasPlannedLocation() != other.hasPlannedLocation()) return false; + if (hasPlannedLocation()) { + if (!getPlannedLocation().equals(other.getPlannedLocation())) return false; + } + if (hasTargetTimeWindow() != other.hasTargetTimeWindow()) return false; + if (hasTargetTimeWindow()) { + if (!getTargetTimeWindow().equals(other.getTargetTimeWindow())) 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(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + TRACKING_ID_FIELD_NUMBER; + hash = (53 * hash) + getTrackingId().hashCode(); + if (hasVehicleLocation()) { + hash = (37 * hash) + VEHICLE_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getVehicleLocation().hashCode(); + } + if (getRoutePolylinePointsCount() > 0) { + hash = (37 * hash) + ROUTE_POLYLINE_POINTS_FIELD_NUMBER; + hash = (53 * hash) + getRoutePolylinePointsList().hashCode(); + } + if (hasRemainingStopCount()) { + hash = (37 * hash) + REMAINING_STOP_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getRemainingStopCount().hashCode(); + } + if (hasRemainingDrivingDistanceMeters()) { + hash = (37 * hash) + REMAINING_DRIVING_DISTANCE_METERS_FIELD_NUMBER; + hash = (53 * hash) + getRemainingDrivingDistanceMeters().hashCode(); + } + if (hasEstimatedArrivalTime()) { + hash = (37 * hash) + ESTIMATED_ARRIVAL_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEstimatedArrivalTime().hashCode(); + } + if (hasEstimatedTaskCompletionTime()) { + hash = (37 * hash) + ESTIMATED_TASK_COMPLETION_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEstimatedTaskCompletionTime().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + TASK_OUTCOME_FIELD_NUMBER; + hash = (53 * hash) + taskOutcome_; + if (hasTaskOutcomeTime()) { + hash = (37 * hash) + TASK_OUTCOME_TIME_FIELD_NUMBER; + hash = (53 * hash) + getTaskOutcomeTime().hashCode(); + } + if (hasPlannedLocation()) { + hash = (37 * hash) + PLANNED_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getPlannedLocation().hashCode(); + } + if (hasTargetTimeWindow()) { + hash = (37 * hash) + TARGET_TIME_WINDOW_FIELD_NUMBER; + hash = (53 * hash) + getTargetTimeWindow().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 google.maps.fleetengine.delivery.v1.TaskTrackingInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.TaskTrackingInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.TaskTrackingInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.TaskTrackingInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.TaskTrackingInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.TaskTrackingInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.TaskTrackingInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.TaskTrackingInfo 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 google.maps.fleetengine.delivery.v1.TaskTrackingInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.TaskTrackingInfo 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 google.maps.fleetengine.delivery.v1.TaskTrackingInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.TaskTrackingInfo 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(google.maps.fleetengine.delivery.v1.TaskTrackingInfo 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 `TaskTrackingInfo` message. The message contains task tracking
+   * information which will be used for display. If a tracking ID is associated
+   * with multiple Tasks, Fleet Engine uses a heuristic to decide which Task's
+   * TaskTrackingInfo to select.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.TaskTrackingInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.delivery.v1.TaskTrackingInfo) + google.maps.fleetengine.delivery.v1.TaskTrackingInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.TaskTrackingInfoProto + .internal_static_maps_fleetengine_delivery_v1_TaskTrackingInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.TaskTrackingInfoProto + .internal_static_maps_fleetengine_delivery_v1_TaskTrackingInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.TaskTrackingInfo.class, + google.maps.fleetengine.delivery.v1.TaskTrackingInfo.Builder.class); + } + + // Construct using google.maps.fleetengine.delivery.v1.TaskTrackingInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + trackingId_ = ""; + vehicleLocation_ = null; + if (vehicleLocationBuilder_ != null) { + vehicleLocationBuilder_.dispose(); + vehicleLocationBuilder_ = null; + } + if (routePolylinePointsBuilder_ == null) { + routePolylinePoints_ = java.util.Collections.emptyList(); + } else { + routePolylinePoints_ = null; + routePolylinePointsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + remainingStopCount_ = null; + if (remainingStopCountBuilder_ != null) { + remainingStopCountBuilder_.dispose(); + remainingStopCountBuilder_ = null; + } + remainingDrivingDistanceMeters_ = null; + if (remainingDrivingDistanceMetersBuilder_ != null) { + remainingDrivingDistanceMetersBuilder_.dispose(); + remainingDrivingDistanceMetersBuilder_ = null; + } + estimatedArrivalTime_ = null; + if (estimatedArrivalTimeBuilder_ != null) { + estimatedArrivalTimeBuilder_.dispose(); + estimatedArrivalTimeBuilder_ = null; + } + estimatedTaskCompletionTime_ = null; + if (estimatedTaskCompletionTimeBuilder_ != null) { + estimatedTaskCompletionTimeBuilder_.dispose(); + estimatedTaskCompletionTimeBuilder_ = null; + } + state_ = 0; + taskOutcome_ = 0; + taskOutcomeTime_ = null; + if (taskOutcomeTimeBuilder_ != null) { + taskOutcomeTimeBuilder_.dispose(); + taskOutcomeTimeBuilder_ = null; + } + plannedLocation_ = null; + if (plannedLocationBuilder_ != null) { + plannedLocationBuilder_.dispose(); + plannedLocationBuilder_ = null; + } + targetTimeWindow_ = null; + if (targetTimeWindowBuilder_ != null) { + targetTimeWindowBuilder_.dispose(); + targetTimeWindowBuilder_ = null; + } + if (attributesBuilder_ == null) { + attributes_ = java.util.Collections.emptyList(); + } else { + attributes_ = null; + attributesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00002000); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return google.maps.fleetengine.delivery.v1.TaskTrackingInfoProto + .internal_static_maps_fleetengine_delivery_v1_TaskTrackingInfo_descriptor; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TaskTrackingInfo getDefaultInstanceForType() { + return google.maps.fleetengine.delivery.v1.TaskTrackingInfo.getDefaultInstance(); + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TaskTrackingInfo build() { + google.maps.fleetengine.delivery.v1.TaskTrackingInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TaskTrackingInfo buildPartial() { + google.maps.fleetengine.delivery.v1.TaskTrackingInfo result = + new google.maps.fleetengine.delivery.v1.TaskTrackingInfo(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + google.maps.fleetengine.delivery.v1.TaskTrackingInfo result) { + if (routePolylinePointsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + routePolylinePoints_ = java.util.Collections.unmodifiableList(routePolylinePoints_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.routePolylinePoints_ = routePolylinePoints_; + } else { + result.routePolylinePoints_ = routePolylinePointsBuilder_.build(); + } + if (attributesBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0)) { + attributes_ = java.util.Collections.unmodifiableList(attributes_); + bitField0_ = (bitField0_ & ~0x00002000); + } + result.attributes_ = attributes_; + } else { + result.attributes_ = attributesBuilder_.build(); + } + } + + private void buildPartial0(google.maps.fleetengine.delivery.v1.TaskTrackingInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.trackingId_ = trackingId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.vehicleLocation_ = + vehicleLocationBuilder_ == null ? vehicleLocation_ : vehicleLocationBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.remainingStopCount_ = + remainingStopCountBuilder_ == null + ? remainingStopCount_ + : remainingStopCountBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.remainingDrivingDistanceMeters_ = + remainingDrivingDistanceMetersBuilder_ == null + ? remainingDrivingDistanceMeters_ + : remainingDrivingDistanceMetersBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.estimatedArrivalTime_ = + estimatedArrivalTimeBuilder_ == null + ? estimatedArrivalTime_ + : estimatedArrivalTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.estimatedTaskCompletionTime_ = + estimatedTaskCompletionTimeBuilder_ == null + ? estimatedTaskCompletionTime_ + : estimatedTaskCompletionTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.taskOutcome_ = taskOutcome_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.taskOutcomeTime_ = + taskOutcomeTimeBuilder_ == null ? taskOutcomeTime_ : taskOutcomeTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.plannedLocation_ = + plannedLocationBuilder_ == null ? plannedLocation_ : plannedLocationBuilder_.build(); + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.targetTimeWindow_ = + targetTimeWindowBuilder_ == null ? targetTimeWindow_ : targetTimeWindowBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof google.maps.fleetengine.delivery.v1.TaskTrackingInfo) { + return mergeFrom((google.maps.fleetengine.delivery.v1.TaskTrackingInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.maps.fleetengine.delivery.v1.TaskTrackingInfo other) { + if (other == google.maps.fleetengine.delivery.v1.TaskTrackingInfo.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getTrackingId().isEmpty()) { + trackingId_ = other.trackingId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasVehicleLocation()) { + mergeVehicleLocation(other.getVehicleLocation()); + } + if (routePolylinePointsBuilder_ == null) { + if (!other.routePolylinePoints_.isEmpty()) { + if (routePolylinePoints_.isEmpty()) { + routePolylinePoints_ = other.routePolylinePoints_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureRoutePolylinePointsIsMutable(); + routePolylinePoints_.addAll(other.routePolylinePoints_); + } + onChanged(); + } + } else { + if (!other.routePolylinePoints_.isEmpty()) { + if (routePolylinePointsBuilder_.isEmpty()) { + routePolylinePointsBuilder_.dispose(); + routePolylinePointsBuilder_ = null; + routePolylinePoints_ = other.routePolylinePoints_; + bitField0_ = (bitField0_ & ~0x00000008); + routePolylinePointsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRoutePolylinePointsFieldBuilder() + : null; + } else { + routePolylinePointsBuilder_.addAllMessages(other.routePolylinePoints_); + } + } + } + if (other.hasRemainingStopCount()) { + mergeRemainingStopCount(other.getRemainingStopCount()); + } + if (other.hasRemainingDrivingDistanceMeters()) { + mergeRemainingDrivingDistanceMeters(other.getRemainingDrivingDistanceMeters()); + } + if (other.hasEstimatedArrivalTime()) { + mergeEstimatedArrivalTime(other.getEstimatedArrivalTime()); + } + if (other.hasEstimatedTaskCompletionTime()) { + mergeEstimatedTaskCompletionTime(other.getEstimatedTaskCompletionTime()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.taskOutcome_ != 0) { + setTaskOutcomeValue(other.getTaskOutcomeValue()); + } + if (other.hasTaskOutcomeTime()) { + mergeTaskOutcomeTime(other.getTaskOutcomeTime()); + } + if (other.hasPlannedLocation()) { + mergePlannedLocation(other.getPlannedLocation()); + } + if (other.hasTargetTimeWindow()) { + mergeTargetTimeWindow(other.getTargetTimeWindow()); + } + if (attributesBuilder_ == null) { + if (!other.attributes_.isEmpty()) { + if (attributes_.isEmpty()) { + attributes_ = other.attributes_; + bitField0_ = (bitField0_ & ~0x00002000); + } else { + ensureAttributesIsMutable(); + attributes_.addAll(other.attributes_); + } + onChanged(); + } + } else { + if (!other.attributes_.isEmpty()) { + if (attributesBuilder_.isEmpty()) { + attributesBuilder_.dispose(); + attributesBuilder_ = null; + attributes_ = other.attributes_; + bitField0_ = (bitField0_ & ~0x00002000); + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + trackingId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getVehicleLocationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.type.LatLng m = + input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); + if (routePolylinePointsBuilder_ == null) { + ensureRoutePolylinePointsIsMutable(); + routePolylinePoints_.add(m); + } else { + routePolylinePointsBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + input.readMessage( + getRemainingStopCountFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage( + getRemainingDrivingDistanceMetersFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage( + getEstimatedArrivalTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + input.readMessage( + getEstimatedTaskCompletionTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 72: + { + taskOutcome_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 72 + case 82: + { + input.readMessage(getPlannedLocationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 82 + case 88: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000100; + break; + } // case 88 + case 98: + { + input.readMessage(getTaskOutcomeTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 98 + case 106: + { + input.readMessage( + getTargetTimeWindowFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 106 + case 114: + { + google.maps.fleetengine.delivery.v1.TaskAttribute m = + input.readMessage( + google.maps.fleetengine.delivery.v1.TaskAttribute.parser(), + extensionRegistry); + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.add(m); + } else { + attributesBuilder_.addMessage(m); + } + break; + } // case 114 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Must be in the format `providers/{provider}/taskTrackingInfo/{tracking}`,
+     * where `tracking` represents the tracking ID.
+     * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+     * Must be in the format `providers/{provider}/taskTrackingInfo/{tracking}`,
+     * where `tracking` represents the tracking ID.
+     * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+     * Must be in the format `providers/{provider}/taskTrackingInfo/{tracking}`,
+     * where `tracking` represents the tracking ID.
+     * 
+ * + * string name = 1; + * + * @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; + } + /** + * + * + *
+     * Must be in the format `providers/{provider}/taskTrackingInfo/{tracking}`,
+     * where `tracking` represents the tracking ID.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Must be in the format `providers/{provider}/taskTrackingInfo/{tracking}`,
+     * where `tracking` represents the tracking ID.
+     * 
+ * + * string name = 1; + * + * @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 trackingId_ = ""; + /** + * + * + *
+     * Immutable. The tracking ID of a Task.
+     * * 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 tracking_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The trackingId. + */ + public java.lang.String getTrackingId() { + java.lang.Object ref = trackingId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + trackingId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. The tracking ID of a Task.
+     * * 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 tracking_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for trackingId. + */ + public com.google.protobuf.ByteString getTrackingIdBytes() { + java.lang.Object ref = trackingId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + trackingId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. The tracking ID of a Task.
+     * * 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 tracking_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The trackingId to set. + * @return This builder for chaining. + */ + public Builder setTrackingId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + trackingId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The tracking ID of a Task.
+     * * 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 tracking_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearTrackingId() { + trackingId_ = getDefaultInstance().getTrackingId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The tracking ID of a Task.
+     * * 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 tracking_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for trackingId to set. + * @return This builder for chaining. + */ + public Builder setTrackingIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + trackingId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation vehicleLocation_; + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation, + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation.Builder, + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationOrBuilder> + vehicleLocationBuilder_; + /** + * + * + *
+     * The vehicle's last location.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation vehicle_location = 3; + * + * @return Whether the vehicleLocation field is set. + */ + public boolean hasVehicleLocation() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * The vehicle's last location.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation vehicle_location = 3; + * + * @return The vehicleLocation. + */ + public google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation getVehicleLocation() { + if (vehicleLocationBuilder_ == null) { + return vehicleLocation_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation.getDefaultInstance() + : vehicleLocation_; + } else { + return vehicleLocationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The vehicle's last location.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation vehicle_location = 3; + */ + public Builder setVehicleLocation( + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation value) { + if (vehicleLocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + vehicleLocation_ = value; + } else { + vehicleLocationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The vehicle's last location.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation vehicle_location = 3; + */ + public Builder setVehicleLocation( + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation.Builder builderForValue) { + if (vehicleLocationBuilder_ == null) { + vehicleLocation_ = builderForValue.build(); + } else { + vehicleLocationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The vehicle's last location.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation vehicle_location = 3; + */ + public Builder mergeVehicleLocation( + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation value) { + if (vehicleLocationBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && vehicleLocation_ != null + && vehicleLocation_ + != google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation + .getDefaultInstance()) { + getVehicleLocationBuilder().mergeFrom(value); + } else { + vehicleLocation_ = value; + } + } else { + vehicleLocationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The vehicle's last location.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation vehicle_location = 3; + */ + public Builder clearVehicleLocation() { + bitField0_ = (bitField0_ & ~0x00000004); + vehicleLocation_ = null; + if (vehicleLocationBuilder_ != null) { + vehicleLocationBuilder_.dispose(); + vehicleLocationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The vehicle's last location.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation vehicle_location = 3; + */ + public google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation.Builder + getVehicleLocationBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getVehicleLocationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The vehicle's last location.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation vehicle_location = 3; + */ + public google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationOrBuilder + getVehicleLocationOrBuilder() { + if (vehicleLocationBuilder_ != null) { + return vehicleLocationBuilder_.getMessageOrBuilder(); + } else { + return vehicleLocation_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation.getDefaultInstance() + : vehicleLocation_; + } + } + /** + * + * + *
+     * The vehicle's last location.
+     * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation vehicle_location = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation, + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation.Builder, + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationOrBuilder> + getVehicleLocationFieldBuilder() { + if (vehicleLocationBuilder_ == null) { + vehicleLocationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation, + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation.Builder, + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationOrBuilder>( + getVehicleLocation(), getParentForChildren(), isClean()); + vehicleLocation_ = null; + } + return vehicleLocationBuilder_; + } + + private java.util.List routePolylinePoints_ = + java.util.Collections.emptyList(); + + private void ensureRoutePolylinePointsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + routePolylinePoints_ = + new java.util.ArrayList(routePolylinePoints_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + routePolylinePointsBuilder_; + + /** + * + * + *
+     * A list of points which when connected forms a polyline of the vehicle's
+     * expected route to the location of this task.
+     * 
+ * + * repeated .google.type.LatLng route_polyline_points = 4; + */ + public java.util.List getRoutePolylinePointsList() { + if (routePolylinePointsBuilder_ == null) { + return java.util.Collections.unmodifiableList(routePolylinePoints_); + } else { + return routePolylinePointsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of points which when connected forms a polyline of the vehicle's
+     * expected route to the location of this task.
+     * 
+ * + * repeated .google.type.LatLng route_polyline_points = 4; + */ + public int getRoutePolylinePointsCount() { + if (routePolylinePointsBuilder_ == null) { + return routePolylinePoints_.size(); + } else { + return routePolylinePointsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of points which when connected forms a polyline of the vehicle's
+     * expected route to the location of this task.
+     * 
+ * + * repeated .google.type.LatLng route_polyline_points = 4; + */ + public com.google.type.LatLng getRoutePolylinePoints(int index) { + if (routePolylinePointsBuilder_ == null) { + return routePolylinePoints_.get(index); + } else { + return routePolylinePointsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of points which when connected forms a polyline of the vehicle's
+     * expected route to the location of this task.
+     * 
+ * + * repeated .google.type.LatLng route_polyline_points = 4; + */ + public Builder setRoutePolylinePoints(int index, com.google.type.LatLng value) { + if (routePolylinePointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRoutePolylinePointsIsMutable(); + routePolylinePoints_.set(index, value); + onChanged(); + } else { + routePolylinePointsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of points which when connected forms a polyline of the vehicle's
+     * expected route to the location of this task.
+     * 
+ * + * repeated .google.type.LatLng route_polyline_points = 4; + */ + public Builder setRoutePolylinePoints( + int index, com.google.type.LatLng.Builder builderForValue) { + if (routePolylinePointsBuilder_ == null) { + ensureRoutePolylinePointsIsMutable(); + routePolylinePoints_.set(index, builderForValue.build()); + onChanged(); + } else { + routePolylinePointsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of points which when connected forms a polyline of the vehicle's
+     * expected route to the location of this task.
+     * 
+ * + * repeated .google.type.LatLng route_polyline_points = 4; + */ + public Builder addRoutePolylinePoints(com.google.type.LatLng value) { + if (routePolylinePointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRoutePolylinePointsIsMutable(); + routePolylinePoints_.add(value); + onChanged(); + } else { + routePolylinePointsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of points which when connected forms a polyline of the vehicle's
+     * expected route to the location of this task.
+     * 
+ * + * repeated .google.type.LatLng route_polyline_points = 4; + */ + public Builder addRoutePolylinePoints(int index, com.google.type.LatLng value) { + if (routePolylinePointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRoutePolylinePointsIsMutable(); + routePolylinePoints_.add(index, value); + onChanged(); + } else { + routePolylinePointsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of points which when connected forms a polyline of the vehicle's
+     * expected route to the location of this task.
+     * 
+ * + * repeated .google.type.LatLng route_polyline_points = 4; + */ + public Builder addRoutePolylinePoints(com.google.type.LatLng.Builder builderForValue) { + if (routePolylinePointsBuilder_ == null) { + ensureRoutePolylinePointsIsMutable(); + routePolylinePoints_.add(builderForValue.build()); + onChanged(); + } else { + routePolylinePointsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of points which when connected forms a polyline of the vehicle's
+     * expected route to the location of this task.
+     * 
+ * + * repeated .google.type.LatLng route_polyline_points = 4; + */ + public Builder addRoutePolylinePoints( + int index, com.google.type.LatLng.Builder builderForValue) { + if (routePolylinePointsBuilder_ == null) { + ensureRoutePolylinePointsIsMutable(); + routePolylinePoints_.add(index, builderForValue.build()); + onChanged(); + } else { + routePolylinePointsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of points which when connected forms a polyline of the vehicle's
+     * expected route to the location of this task.
+     * 
+ * + * repeated .google.type.LatLng route_polyline_points = 4; + */ + public Builder addAllRoutePolylinePoints( + java.lang.Iterable values) { + if (routePolylinePointsBuilder_ == null) { + ensureRoutePolylinePointsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, routePolylinePoints_); + onChanged(); + } else { + routePolylinePointsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of points which when connected forms a polyline of the vehicle's
+     * expected route to the location of this task.
+     * 
+ * + * repeated .google.type.LatLng route_polyline_points = 4; + */ + public Builder clearRoutePolylinePoints() { + if (routePolylinePointsBuilder_ == null) { + routePolylinePoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + routePolylinePointsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of points which when connected forms a polyline of the vehicle's
+     * expected route to the location of this task.
+     * 
+ * + * repeated .google.type.LatLng route_polyline_points = 4; + */ + public Builder removeRoutePolylinePoints(int index) { + if (routePolylinePointsBuilder_ == null) { + ensureRoutePolylinePointsIsMutable(); + routePolylinePoints_.remove(index); + onChanged(); + } else { + routePolylinePointsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of points which when connected forms a polyline of the vehicle's
+     * expected route to the location of this task.
+     * 
+ * + * repeated .google.type.LatLng route_polyline_points = 4; + */ + public com.google.type.LatLng.Builder getRoutePolylinePointsBuilder(int index) { + return getRoutePolylinePointsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of points which when connected forms a polyline of the vehicle's
+     * expected route to the location of this task.
+     * 
+ * + * repeated .google.type.LatLng route_polyline_points = 4; + */ + public com.google.type.LatLngOrBuilder getRoutePolylinePointsOrBuilder(int index) { + if (routePolylinePointsBuilder_ == null) { + return routePolylinePoints_.get(index); + } else { + return routePolylinePointsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of points which when connected forms a polyline of the vehicle's
+     * expected route to the location of this task.
+     * 
+ * + * repeated .google.type.LatLng route_polyline_points = 4; + */ + public java.util.List + getRoutePolylinePointsOrBuilderList() { + if (routePolylinePointsBuilder_ != null) { + return routePolylinePointsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(routePolylinePoints_); + } + } + /** + * + * + *
+     * A list of points which when connected forms a polyline of the vehicle's
+     * expected route to the location of this task.
+     * 
+ * + * repeated .google.type.LatLng route_polyline_points = 4; + */ + public com.google.type.LatLng.Builder addRoutePolylinePointsBuilder() { + return getRoutePolylinePointsFieldBuilder() + .addBuilder(com.google.type.LatLng.getDefaultInstance()); + } + /** + * + * + *
+     * A list of points which when connected forms a polyline of the vehicle's
+     * expected route to the location of this task.
+     * 
+ * + * repeated .google.type.LatLng route_polyline_points = 4; + */ + public com.google.type.LatLng.Builder addRoutePolylinePointsBuilder(int index) { + return getRoutePolylinePointsFieldBuilder() + .addBuilder(index, com.google.type.LatLng.getDefaultInstance()); + } + /** + * + * + *
+     * A list of points which when connected forms a polyline of the vehicle's
+     * expected route to the location of this task.
+     * 
+ * + * repeated .google.type.LatLng route_polyline_points = 4; + */ + public java.util.List getRoutePolylinePointsBuilderList() { + return getRoutePolylinePointsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + getRoutePolylinePointsFieldBuilder() { + if (routePolylinePointsBuilder_ == null) { + routePolylinePointsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.type.LatLng, + com.google.type.LatLng.Builder, + com.google.type.LatLngOrBuilder>( + routePolylinePoints_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + routePolylinePoints_ = null; + } + return routePolylinePointsBuilder_; + } + + private com.google.protobuf.Int32Value remainingStopCount_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + remainingStopCountBuilder_; + /** + * + * + *
+     * Indicates the number of stops the vehicle remaining until the task stop is
+     * reached, including the task stop. For example, if the vehicle's next stop
+     * is the task stop, the value will be 1.
+     * 
+ * + * .google.protobuf.Int32Value remaining_stop_count = 5; + * + * @return Whether the remainingStopCount field is set. + */ + public boolean hasRemainingStopCount() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Indicates the number of stops the vehicle remaining until the task stop is
+     * reached, including the task stop. For example, if the vehicle's next stop
+     * is the task stop, the value will be 1.
+     * 
+ * + * .google.protobuf.Int32Value remaining_stop_count = 5; + * + * @return The remainingStopCount. + */ + public com.google.protobuf.Int32Value getRemainingStopCount() { + if (remainingStopCountBuilder_ == null) { + return remainingStopCount_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : remainingStopCount_; + } else { + return remainingStopCountBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Indicates the number of stops the vehicle remaining until the task stop is
+     * reached, including the task stop. For example, if the vehicle's next stop
+     * is the task stop, the value will be 1.
+     * 
+ * + * .google.protobuf.Int32Value remaining_stop_count = 5; + */ + public Builder setRemainingStopCount(com.google.protobuf.Int32Value value) { + if (remainingStopCountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + remainingStopCount_ = value; + } else { + remainingStopCountBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates the number of stops the vehicle remaining until the task stop is
+     * reached, including the task stop. For example, if the vehicle's next stop
+     * is the task stop, the value will be 1.
+     * 
+ * + * .google.protobuf.Int32Value remaining_stop_count = 5; + */ + public Builder setRemainingStopCount(com.google.protobuf.Int32Value.Builder builderForValue) { + if (remainingStopCountBuilder_ == null) { + remainingStopCount_ = builderForValue.build(); + } else { + remainingStopCountBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates the number of stops the vehicle remaining until the task stop is
+     * reached, including the task stop. For example, if the vehicle's next stop
+     * is the task stop, the value will be 1.
+     * 
+ * + * .google.protobuf.Int32Value remaining_stop_count = 5; + */ + public Builder mergeRemainingStopCount(com.google.protobuf.Int32Value value) { + if (remainingStopCountBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && remainingStopCount_ != null + && remainingStopCount_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getRemainingStopCountBuilder().mergeFrom(value); + } else { + remainingStopCount_ = value; + } + } else { + remainingStopCountBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates the number of stops the vehicle remaining until the task stop is
+     * reached, including the task stop. For example, if the vehicle's next stop
+     * is the task stop, the value will be 1.
+     * 
+ * + * .google.protobuf.Int32Value remaining_stop_count = 5; + */ + public Builder clearRemainingStopCount() { + bitField0_ = (bitField0_ & ~0x00000010); + remainingStopCount_ = null; + if (remainingStopCountBuilder_ != null) { + remainingStopCountBuilder_.dispose(); + remainingStopCountBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates the number of stops the vehicle remaining until the task stop is
+     * reached, including the task stop. For example, if the vehicle's next stop
+     * is the task stop, the value will be 1.
+     * 
+ * + * .google.protobuf.Int32Value remaining_stop_count = 5; + */ + public com.google.protobuf.Int32Value.Builder getRemainingStopCountBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getRemainingStopCountFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Indicates the number of stops the vehicle remaining until the task stop is
+     * reached, including the task stop. For example, if the vehicle's next stop
+     * is the task stop, the value will be 1.
+     * 
+ * + * .google.protobuf.Int32Value remaining_stop_count = 5; + */ + public com.google.protobuf.Int32ValueOrBuilder getRemainingStopCountOrBuilder() { + if (remainingStopCountBuilder_ != null) { + return remainingStopCountBuilder_.getMessageOrBuilder(); + } else { + return remainingStopCount_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : remainingStopCount_; + } + } + /** + * + * + *
+     * Indicates the number of stops the vehicle remaining until the task stop is
+     * reached, including the task stop. For example, if the vehicle's next stop
+     * is the task stop, the value will be 1.
+     * 
+ * + * .google.protobuf.Int32Value remaining_stop_count = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + getRemainingStopCountFieldBuilder() { + if (remainingStopCountBuilder_ == null) { + remainingStopCountBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder>( + getRemainingStopCount(), getParentForChildren(), isClean()); + remainingStopCount_ = null; + } + return remainingStopCountBuilder_; + } + + private com.google.protobuf.Int32Value remainingDrivingDistanceMeters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + remainingDrivingDistanceMetersBuilder_; + /** + * + * + *
+     * The total remaining distance in meters to the `VehicleStop` of interest.
+     * 
+ * + * .google.protobuf.Int32Value remaining_driving_distance_meters = 6; + * + * @return Whether the remainingDrivingDistanceMeters field is set. + */ + public boolean hasRemainingDrivingDistanceMeters() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * The total remaining distance in meters to the `VehicleStop` of interest.
+     * 
+ * + * .google.protobuf.Int32Value remaining_driving_distance_meters = 6; + * + * @return The remainingDrivingDistanceMeters. + */ + public com.google.protobuf.Int32Value getRemainingDrivingDistanceMeters() { + if (remainingDrivingDistanceMetersBuilder_ == null) { + return remainingDrivingDistanceMeters_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : remainingDrivingDistanceMeters_; + } else { + return remainingDrivingDistanceMetersBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The total remaining distance in meters to the `VehicleStop` of interest.
+     * 
+ * + * .google.protobuf.Int32Value remaining_driving_distance_meters = 6; + */ + public Builder setRemainingDrivingDistanceMeters(com.google.protobuf.Int32Value value) { + if (remainingDrivingDistanceMetersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + remainingDrivingDistanceMeters_ = value; + } else { + remainingDrivingDistanceMetersBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The total remaining distance in meters to the `VehicleStop` of interest.
+     * 
+ * + * .google.protobuf.Int32Value remaining_driving_distance_meters = 6; + */ + public Builder setRemainingDrivingDistanceMeters( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (remainingDrivingDistanceMetersBuilder_ == null) { + remainingDrivingDistanceMeters_ = builderForValue.build(); + } else { + remainingDrivingDistanceMetersBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The total remaining distance in meters to the `VehicleStop` of interest.
+     * 
+ * + * .google.protobuf.Int32Value remaining_driving_distance_meters = 6; + */ + public Builder mergeRemainingDrivingDistanceMeters(com.google.protobuf.Int32Value value) { + if (remainingDrivingDistanceMetersBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && remainingDrivingDistanceMeters_ != null + && remainingDrivingDistanceMeters_ + != com.google.protobuf.Int32Value.getDefaultInstance()) { + getRemainingDrivingDistanceMetersBuilder().mergeFrom(value); + } else { + remainingDrivingDistanceMeters_ = value; + } + } else { + remainingDrivingDistanceMetersBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The total remaining distance in meters to the `VehicleStop` of interest.
+     * 
+ * + * .google.protobuf.Int32Value remaining_driving_distance_meters = 6; + */ + public Builder clearRemainingDrivingDistanceMeters() { + bitField0_ = (bitField0_ & ~0x00000020); + remainingDrivingDistanceMeters_ = null; + if (remainingDrivingDistanceMetersBuilder_ != null) { + remainingDrivingDistanceMetersBuilder_.dispose(); + remainingDrivingDistanceMetersBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The total remaining distance in meters to the `VehicleStop` of interest.
+     * 
+ * + * .google.protobuf.Int32Value remaining_driving_distance_meters = 6; + */ + public com.google.protobuf.Int32Value.Builder getRemainingDrivingDistanceMetersBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getRemainingDrivingDistanceMetersFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The total remaining distance in meters to the `VehicleStop` of interest.
+     * 
+ * + * .google.protobuf.Int32Value remaining_driving_distance_meters = 6; + */ + public com.google.protobuf.Int32ValueOrBuilder getRemainingDrivingDistanceMetersOrBuilder() { + if (remainingDrivingDistanceMetersBuilder_ != null) { + return remainingDrivingDistanceMetersBuilder_.getMessageOrBuilder(); + } else { + return remainingDrivingDistanceMeters_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : remainingDrivingDistanceMeters_; + } + } + /** + * + * + *
+     * The total remaining distance in meters to the `VehicleStop` of interest.
+     * 
+ * + * .google.protobuf.Int32Value remaining_driving_distance_meters = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + getRemainingDrivingDistanceMetersFieldBuilder() { + if (remainingDrivingDistanceMetersBuilder_ == null) { + remainingDrivingDistanceMetersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder>( + getRemainingDrivingDistanceMeters(), getParentForChildren(), isClean()); + remainingDrivingDistanceMeters_ = null; + } + return remainingDrivingDistanceMetersBuilder_; + } + + private com.google.protobuf.Timestamp estimatedArrivalTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + estimatedArrivalTimeBuilder_; + /** + * + * + *
+     * The timestamp that indicates the estimated arrival time to the stop
+     * location.
+     * 
+ * + * .google.protobuf.Timestamp estimated_arrival_time = 7; + * + * @return Whether the estimatedArrivalTime field is set. + */ + public boolean hasEstimatedArrivalTime() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * The timestamp that indicates the estimated arrival time to the stop
+     * location.
+     * 
+ * + * .google.protobuf.Timestamp estimated_arrival_time = 7; + * + * @return The estimatedArrivalTime. + */ + public com.google.protobuf.Timestamp getEstimatedArrivalTime() { + if (estimatedArrivalTimeBuilder_ == null) { + return estimatedArrivalTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : estimatedArrivalTime_; + } else { + return estimatedArrivalTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The timestamp that indicates the estimated arrival time to the stop
+     * location.
+     * 
+ * + * .google.protobuf.Timestamp estimated_arrival_time = 7; + */ + public Builder setEstimatedArrivalTime(com.google.protobuf.Timestamp value) { + if (estimatedArrivalTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + estimatedArrivalTime_ = value; + } else { + estimatedArrivalTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * The timestamp that indicates the estimated arrival time to the stop
+     * location.
+     * 
+ * + * .google.protobuf.Timestamp estimated_arrival_time = 7; + */ + public Builder setEstimatedArrivalTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (estimatedArrivalTimeBuilder_ == null) { + estimatedArrivalTime_ = builderForValue.build(); + } else { + estimatedArrivalTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * The timestamp that indicates the estimated arrival time to the stop
+     * location.
+     * 
+ * + * .google.protobuf.Timestamp estimated_arrival_time = 7; + */ + public Builder mergeEstimatedArrivalTime(com.google.protobuf.Timestamp value) { + if (estimatedArrivalTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && estimatedArrivalTime_ != null + && estimatedArrivalTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEstimatedArrivalTimeBuilder().mergeFrom(value); + } else { + estimatedArrivalTime_ = value; + } + } else { + estimatedArrivalTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * The timestamp that indicates the estimated arrival time to the stop
+     * location.
+     * 
+ * + * .google.protobuf.Timestamp estimated_arrival_time = 7; + */ + public Builder clearEstimatedArrivalTime() { + bitField0_ = (bitField0_ & ~0x00000040); + estimatedArrivalTime_ = null; + if (estimatedArrivalTimeBuilder_ != null) { + estimatedArrivalTimeBuilder_.dispose(); + estimatedArrivalTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The timestamp that indicates the estimated arrival time to the stop
+     * location.
+     * 
+ * + * .google.protobuf.Timestamp estimated_arrival_time = 7; + */ + public com.google.protobuf.Timestamp.Builder getEstimatedArrivalTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getEstimatedArrivalTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The timestamp that indicates the estimated arrival time to the stop
+     * location.
+     * 
+ * + * .google.protobuf.Timestamp estimated_arrival_time = 7; + */ + public com.google.protobuf.TimestampOrBuilder getEstimatedArrivalTimeOrBuilder() { + if (estimatedArrivalTimeBuilder_ != null) { + return estimatedArrivalTimeBuilder_.getMessageOrBuilder(); + } else { + return estimatedArrivalTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : estimatedArrivalTime_; + } + } + /** + * + * + *
+     * The timestamp that indicates the estimated arrival time to the stop
+     * location.
+     * 
+ * + * .google.protobuf.Timestamp estimated_arrival_time = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEstimatedArrivalTimeFieldBuilder() { + if (estimatedArrivalTimeBuilder_ == null) { + estimatedArrivalTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEstimatedArrivalTime(), getParentForChildren(), isClean()); + estimatedArrivalTime_ = null; + } + return estimatedArrivalTimeBuilder_; + } + + private com.google.protobuf.Timestamp estimatedTaskCompletionTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + estimatedTaskCompletionTimeBuilder_; + /** + * + * + *
+     * The timestamp that indicates the estimated completion time of a Task.
+     * 
+ * + * .google.protobuf.Timestamp estimated_task_completion_time = 8; + * + * @return Whether the estimatedTaskCompletionTime field is set. + */ + public boolean hasEstimatedTaskCompletionTime() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * The timestamp that indicates the estimated completion time of a Task.
+     * 
+ * + * .google.protobuf.Timestamp estimated_task_completion_time = 8; + * + * @return The estimatedTaskCompletionTime. + */ + public com.google.protobuf.Timestamp getEstimatedTaskCompletionTime() { + if (estimatedTaskCompletionTimeBuilder_ == null) { + return estimatedTaskCompletionTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : estimatedTaskCompletionTime_; + } else { + return estimatedTaskCompletionTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The timestamp that indicates the estimated completion time of a Task.
+     * 
+ * + * .google.protobuf.Timestamp estimated_task_completion_time = 8; + */ + public Builder setEstimatedTaskCompletionTime(com.google.protobuf.Timestamp value) { + if (estimatedTaskCompletionTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + estimatedTaskCompletionTime_ = value; + } else { + estimatedTaskCompletionTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * The timestamp that indicates the estimated completion time of a Task.
+     * 
+ * + * .google.protobuf.Timestamp estimated_task_completion_time = 8; + */ + public Builder setEstimatedTaskCompletionTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (estimatedTaskCompletionTimeBuilder_ == null) { + estimatedTaskCompletionTime_ = builderForValue.build(); + } else { + estimatedTaskCompletionTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * The timestamp that indicates the estimated completion time of a Task.
+     * 
+ * + * .google.protobuf.Timestamp estimated_task_completion_time = 8; + */ + public Builder mergeEstimatedTaskCompletionTime(com.google.protobuf.Timestamp value) { + if (estimatedTaskCompletionTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && estimatedTaskCompletionTime_ != null + && estimatedTaskCompletionTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEstimatedTaskCompletionTimeBuilder().mergeFrom(value); + } else { + estimatedTaskCompletionTime_ = value; + } + } else { + estimatedTaskCompletionTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * The timestamp that indicates the estimated completion time of a Task.
+     * 
+ * + * .google.protobuf.Timestamp estimated_task_completion_time = 8; + */ + public Builder clearEstimatedTaskCompletionTime() { + bitField0_ = (bitField0_ & ~0x00000080); + estimatedTaskCompletionTime_ = null; + if (estimatedTaskCompletionTimeBuilder_ != null) { + estimatedTaskCompletionTimeBuilder_.dispose(); + estimatedTaskCompletionTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The timestamp that indicates the estimated completion time of a Task.
+     * 
+ * + * .google.protobuf.Timestamp estimated_task_completion_time = 8; + */ + public com.google.protobuf.Timestamp.Builder getEstimatedTaskCompletionTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getEstimatedTaskCompletionTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The timestamp that indicates the estimated completion time of a Task.
+     * 
+ * + * .google.protobuf.Timestamp estimated_task_completion_time = 8; + */ + public com.google.protobuf.TimestampOrBuilder getEstimatedTaskCompletionTimeOrBuilder() { + if (estimatedTaskCompletionTimeBuilder_ != null) { + return estimatedTaskCompletionTimeBuilder_.getMessageOrBuilder(); + } else { + return estimatedTaskCompletionTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : estimatedTaskCompletionTime_; + } + } + /** + * + * + *
+     * The timestamp that indicates the estimated completion time of a Task.
+     * 
+ * + * .google.protobuf.Timestamp estimated_task_completion_time = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEstimatedTaskCompletionTimeFieldBuilder() { + if (estimatedTaskCompletionTimeBuilder_ == null) { + estimatedTaskCompletionTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEstimatedTaskCompletionTime(), getParentForChildren(), isClean()); + estimatedTaskCompletionTime_ = null; + } + return estimatedTaskCompletionTimeBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * The current execution state of the Task.
+     * 
+ * + * .maps.fleetengine.delivery.v1.Task.State state = 11; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * The current execution state of the Task.
+     * 
+ * + * .maps.fleetengine.delivery.v1.Task.State state = 11; + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * The current execution state of the Task.
+     * 
+ * + * .maps.fleetengine.delivery.v1.Task.State state = 11; + * + * @return The state. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.Task.State getState() { + google.maps.fleetengine.delivery.v1.Task.State result = + google.maps.fleetengine.delivery.v1.Task.State.forNumber(state_); + return result == null ? google.maps.fleetengine.delivery.v1.Task.State.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The current execution state of the Task.
+     * 
+ * + * .maps.fleetengine.delivery.v1.Task.State state = 11; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(google.maps.fleetengine.delivery.v1.Task.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The current execution state of the Task.
+     * 
+ * + * .maps.fleetengine.delivery.v1.Task.State state = 11; + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000100); + state_ = 0; + onChanged(); + return this; + } + + private int taskOutcome_ = 0; + /** + * + * + *
+     * The outcome of attempting to execute a Task.
+     * 
+ * + * .maps.fleetengine.delivery.v1.Task.TaskOutcome task_outcome = 9; + * + * @return The enum numeric value on the wire for taskOutcome. + */ + @java.lang.Override + public int getTaskOutcomeValue() { + return taskOutcome_; + } + /** + * + * + *
+     * The outcome of attempting to execute a Task.
+     * 
+ * + * .maps.fleetengine.delivery.v1.Task.TaskOutcome task_outcome = 9; + * + * @param value The enum numeric value on the wire for taskOutcome to set. + * @return This builder for chaining. + */ + public Builder setTaskOutcomeValue(int value) { + taskOutcome_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * The outcome of attempting to execute a Task.
+     * 
+ * + * .maps.fleetengine.delivery.v1.Task.TaskOutcome task_outcome = 9; + * + * @return The taskOutcome. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.Task.TaskOutcome getTaskOutcome() { + google.maps.fleetengine.delivery.v1.Task.TaskOutcome result = + google.maps.fleetengine.delivery.v1.Task.TaskOutcome.forNumber(taskOutcome_); + return result == null + ? google.maps.fleetengine.delivery.v1.Task.TaskOutcome.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The outcome of attempting to execute a Task.
+     * 
+ * + * .maps.fleetengine.delivery.v1.Task.TaskOutcome task_outcome = 9; + * + * @param value The taskOutcome to set. + * @return This builder for chaining. + */ + public Builder setTaskOutcome(google.maps.fleetengine.delivery.v1.Task.TaskOutcome value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + taskOutcome_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The outcome of attempting to execute a Task.
+     * 
+ * + * .maps.fleetengine.delivery.v1.Task.TaskOutcome task_outcome = 9; + * + * @return This builder for chaining. + */ + public Builder clearTaskOutcome() { + bitField0_ = (bitField0_ & ~0x00000200); + taskOutcome_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp taskOutcomeTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + taskOutcomeTimeBuilder_; + /** + * + * + *
+     * The timestamp that indicates when the Task's outcome was set by the
+     * provider.
+     * 
+ * + * .google.protobuf.Timestamp task_outcome_time = 12; + * + * @return Whether the taskOutcomeTime field is set. + */ + public boolean hasTaskOutcomeTime() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * + * + *
+     * The timestamp that indicates when the Task's outcome was set by the
+     * provider.
+     * 
+ * + * .google.protobuf.Timestamp task_outcome_time = 12; + * + * @return The taskOutcomeTime. + */ + public com.google.protobuf.Timestamp getTaskOutcomeTime() { + if (taskOutcomeTimeBuilder_ == null) { + return taskOutcomeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : taskOutcomeTime_; + } else { + return taskOutcomeTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The timestamp that indicates when the Task's outcome was set by the
+     * provider.
+     * 
+ * + * .google.protobuf.Timestamp task_outcome_time = 12; + */ + public Builder setTaskOutcomeTime(com.google.protobuf.Timestamp value) { + if (taskOutcomeTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + taskOutcomeTime_ = value; + } else { + taskOutcomeTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * The timestamp that indicates when the Task's outcome was set by the
+     * provider.
+     * 
+ * + * .google.protobuf.Timestamp task_outcome_time = 12; + */ + public Builder setTaskOutcomeTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (taskOutcomeTimeBuilder_ == null) { + taskOutcomeTime_ = builderForValue.build(); + } else { + taskOutcomeTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * The timestamp that indicates when the Task's outcome was set by the
+     * provider.
+     * 
+ * + * .google.protobuf.Timestamp task_outcome_time = 12; + */ + public Builder mergeTaskOutcomeTime(com.google.protobuf.Timestamp value) { + if (taskOutcomeTimeBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && taskOutcomeTime_ != null + && taskOutcomeTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getTaskOutcomeTimeBuilder().mergeFrom(value); + } else { + taskOutcomeTime_ = value; + } + } else { + taskOutcomeTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * The timestamp that indicates when the Task's outcome was set by the
+     * provider.
+     * 
+ * + * .google.protobuf.Timestamp task_outcome_time = 12; + */ + public Builder clearTaskOutcomeTime() { + bitField0_ = (bitField0_ & ~0x00000400); + taskOutcomeTime_ = null; + if (taskOutcomeTimeBuilder_ != null) { + taskOutcomeTimeBuilder_.dispose(); + taskOutcomeTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The timestamp that indicates when the Task's outcome was set by the
+     * provider.
+     * 
+ * + * .google.protobuf.Timestamp task_outcome_time = 12; + */ + public com.google.protobuf.Timestamp.Builder getTaskOutcomeTimeBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return getTaskOutcomeTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The timestamp that indicates when the Task's outcome was set by the
+     * provider.
+     * 
+ * + * .google.protobuf.Timestamp task_outcome_time = 12; + */ + public com.google.protobuf.TimestampOrBuilder getTaskOutcomeTimeOrBuilder() { + if (taskOutcomeTimeBuilder_ != null) { + return taskOutcomeTimeBuilder_.getMessageOrBuilder(); + } else { + return taskOutcomeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : taskOutcomeTime_; + } + } + /** + * + * + *
+     * The timestamp that indicates when the Task's outcome was set by the
+     * provider.
+     * 
+ * + * .google.protobuf.Timestamp task_outcome_time = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getTaskOutcomeTimeFieldBuilder() { + if (taskOutcomeTimeBuilder_ == null) { + taskOutcomeTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getTaskOutcomeTime(), getParentForChildren(), isClean()); + taskOutcomeTime_ = null; + } + return taskOutcomeTimeBuilder_; + } + + private google.maps.fleetengine.delivery.v1.LocationInfo plannedLocation_; + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.LocationInfo, + google.maps.fleetengine.delivery.v1.LocationInfo.Builder, + google.maps.fleetengine.delivery.v1.LocationInfoOrBuilder> + plannedLocationBuilder_; + /** + * + * + *
+     * Immutable. The location where the Task will be completed.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the plannedLocation field is set. + */ + public boolean hasPlannedLocation() { + return ((bitField0_ & 0x00000800) != 0); + } + /** + * + * + *
+     * Immutable. The location where the Task will be completed.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The plannedLocation. + */ + public google.maps.fleetengine.delivery.v1.LocationInfo getPlannedLocation() { + if (plannedLocationBuilder_ == null) { + return plannedLocation_ == null + ? google.maps.fleetengine.delivery.v1.LocationInfo.getDefaultInstance() + : plannedLocation_; + } else { + return plannedLocationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Immutable. The location where the Task will be completed.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setPlannedLocation(google.maps.fleetengine.delivery.v1.LocationInfo value) { + if (plannedLocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + plannedLocation_ = value; + } else { + plannedLocationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The location where the Task will be completed.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setPlannedLocation( + google.maps.fleetengine.delivery.v1.LocationInfo.Builder builderForValue) { + if (plannedLocationBuilder_ == null) { + plannedLocation_ = builderForValue.build(); + } else { + plannedLocationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The location where the Task will be completed.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder mergePlannedLocation(google.maps.fleetengine.delivery.v1.LocationInfo value) { + if (plannedLocationBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) + && plannedLocation_ != null + && plannedLocation_ + != google.maps.fleetengine.delivery.v1.LocationInfo.getDefaultInstance()) { + getPlannedLocationBuilder().mergeFrom(value); + } else { + plannedLocation_ = value; + } + } else { + plannedLocationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The location where the Task will be completed.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder clearPlannedLocation() { + bitField0_ = (bitField0_ & ~0x00000800); + plannedLocation_ = null; + if (plannedLocationBuilder_ != null) { + plannedLocationBuilder_.dispose(); + plannedLocationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The location where the Task will be completed.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public google.maps.fleetengine.delivery.v1.LocationInfo.Builder getPlannedLocationBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return getPlannedLocationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Immutable. The location where the Task will be completed.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public google.maps.fleetengine.delivery.v1.LocationInfoOrBuilder getPlannedLocationOrBuilder() { + if (plannedLocationBuilder_ != null) { + return plannedLocationBuilder_.getMessageOrBuilder(); + } else { + return plannedLocation_ == null + ? google.maps.fleetengine.delivery.v1.LocationInfo.getDefaultInstance() + : plannedLocation_; + } + } + /** + * + * + *
+     * Immutable. The location where the Task will be completed.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.LocationInfo, + google.maps.fleetengine.delivery.v1.LocationInfo.Builder, + google.maps.fleetengine.delivery.v1.LocationInfoOrBuilder> + getPlannedLocationFieldBuilder() { + if (plannedLocationBuilder_ == null) { + plannedLocationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.LocationInfo, + google.maps.fleetengine.delivery.v1.LocationInfo.Builder, + google.maps.fleetengine.delivery.v1.LocationInfoOrBuilder>( + getPlannedLocation(), getParentForChildren(), isClean()); + plannedLocation_ = null; + } + return plannedLocationBuilder_; + } + + private google.maps.fleetengine.delivery.v1.TimeWindow targetTimeWindow_; + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.TimeWindow, + google.maps.fleetengine.delivery.v1.TimeWindow.Builder, + google.maps.fleetengine.delivery.v1.TimeWindowOrBuilder> + targetTimeWindowBuilder_; + /** + * + * + *
+     * The time window during which the task should be completed.
+     * 
+ * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 13; + * + * @return Whether the targetTimeWindow field is set. + */ + public boolean hasTargetTimeWindow() { + return ((bitField0_ & 0x00001000) != 0); + } + /** + * + * + *
+     * The time window during which the task should be completed.
+     * 
+ * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 13; + * + * @return The targetTimeWindow. + */ + public google.maps.fleetengine.delivery.v1.TimeWindow getTargetTimeWindow() { + if (targetTimeWindowBuilder_ == null) { + return targetTimeWindow_ == null + ? google.maps.fleetengine.delivery.v1.TimeWindow.getDefaultInstance() + : targetTimeWindow_; + } else { + return targetTimeWindowBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time window during which the task should be completed.
+     * 
+ * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 13; + */ + public Builder setTargetTimeWindow(google.maps.fleetengine.delivery.v1.TimeWindow value) { + if (targetTimeWindowBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + targetTimeWindow_ = value; + } else { + targetTimeWindowBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * The time window during which the task should be completed.
+     * 
+ * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 13; + */ + public Builder setTargetTimeWindow( + google.maps.fleetengine.delivery.v1.TimeWindow.Builder builderForValue) { + if (targetTimeWindowBuilder_ == null) { + targetTimeWindow_ = builderForValue.build(); + } else { + targetTimeWindowBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * The time window during which the task should be completed.
+     * 
+ * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 13; + */ + public Builder mergeTargetTimeWindow(google.maps.fleetengine.delivery.v1.TimeWindow value) { + if (targetTimeWindowBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) + && targetTimeWindow_ != null + && targetTimeWindow_ + != google.maps.fleetengine.delivery.v1.TimeWindow.getDefaultInstance()) { + getTargetTimeWindowBuilder().mergeFrom(value); + } else { + targetTimeWindow_ = value; + } + } else { + targetTimeWindowBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * The time window during which the task should be completed.
+     * 
+ * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 13; + */ + public Builder clearTargetTimeWindow() { + bitField0_ = (bitField0_ & ~0x00001000); + targetTimeWindow_ = null; + if (targetTimeWindowBuilder_ != null) { + targetTimeWindowBuilder_.dispose(); + targetTimeWindowBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The time window during which the task should be completed.
+     * 
+ * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 13; + */ + public google.maps.fleetengine.delivery.v1.TimeWindow.Builder getTargetTimeWindowBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return getTargetTimeWindowFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time window during which the task should be completed.
+     * 
+ * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 13; + */ + public google.maps.fleetengine.delivery.v1.TimeWindowOrBuilder getTargetTimeWindowOrBuilder() { + if (targetTimeWindowBuilder_ != null) { + return targetTimeWindowBuilder_.getMessageOrBuilder(); + } else { + return targetTimeWindow_ == null + ? google.maps.fleetengine.delivery.v1.TimeWindow.getDefaultInstance() + : targetTimeWindow_; + } + } + /** + * + * + *
+     * The time window during which the task should be completed.
+     * 
+ * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.TimeWindow, + google.maps.fleetengine.delivery.v1.TimeWindow.Builder, + google.maps.fleetengine.delivery.v1.TimeWindowOrBuilder> + getTargetTimeWindowFieldBuilder() { + if (targetTimeWindowBuilder_ == null) { + targetTimeWindowBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.TimeWindow, + google.maps.fleetengine.delivery.v1.TimeWindow.Builder, + google.maps.fleetengine.delivery.v1.TimeWindowOrBuilder>( + getTargetTimeWindow(), getParentForChildren(), isClean()); + targetTimeWindow_ = null; + } + return targetTimeWindowBuilder_; + } + + private java.util.List attributes_ = + java.util.Collections.emptyList(); + + private void ensureAttributesIsMutable() { + if (!((bitField0_ & 0x00002000) != 0)) { + attributes_ = + new java.util.ArrayList(attributes_); + bitField0_ |= 0x00002000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + google.maps.fleetengine.delivery.v1.TaskAttribute, + google.maps.fleetengine.delivery.v1.TaskAttribute.Builder, + google.maps.fleetengine.delivery.v1.TaskAttributeOrBuilder> + attributesBuilder_; + + /** + * + * + *
+     * The custom attributes set on the task.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 14; + */ + public java.util.List getAttributesList() { + if (attributesBuilder_ == null) { + return java.util.Collections.unmodifiableList(attributes_); + } else { + return attributesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The custom attributes set on the task.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 14; + */ + public int getAttributesCount() { + if (attributesBuilder_ == null) { + return attributes_.size(); + } else { + return attributesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The custom attributes set on the task.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 14; + */ + public google.maps.fleetengine.delivery.v1.TaskAttribute getAttributes(int index) { + if (attributesBuilder_ == null) { + return attributes_.get(index); + } else { + return attributesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The custom attributes set on the task.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 14; + */ + public Builder setAttributes( + int index, google.maps.fleetengine.delivery.v1.TaskAttribute value) { + if (attributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributesIsMutable(); + attributes_.set(index, value); + onChanged(); + } else { + attributesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The custom attributes set on the task.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 14; + */ + public Builder setAttributes( + int index, google.maps.fleetengine.delivery.v1.TaskAttribute.Builder builderForValue) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.set(index, builderForValue.build()); + onChanged(); + } else { + attributesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The custom attributes set on the task.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 14; + */ + public Builder addAttributes(google.maps.fleetengine.delivery.v1.TaskAttribute value) { + if (attributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributesIsMutable(); + attributes_.add(value); + onChanged(); + } else { + attributesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The custom attributes set on the task.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 14; + */ + public Builder addAttributes( + int index, google.maps.fleetengine.delivery.v1.TaskAttribute value) { + if (attributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributesIsMutable(); + attributes_.add(index, value); + onChanged(); + } else { + attributesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The custom attributes set on the task.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 14; + */ + public Builder addAttributes( + google.maps.fleetengine.delivery.v1.TaskAttribute.Builder builderForValue) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.add(builderForValue.build()); + onChanged(); + } else { + attributesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The custom attributes set on the task.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 14; + */ + public Builder addAttributes( + int index, google.maps.fleetengine.delivery.v1.TaskAttribute.Builder builderForValue) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.add(index, builderForValue.build()); + onChanged(); + } else { + attributesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The custom attributes set on the task.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 14; + */ + 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; + } + /** + * + * + *
+     * The custom attributes set on the task.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 14; + */ + public Builder clearAttributes() { + if (attributesBuilder_ == null) { + attributes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + } else { + attributesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The custom attributes set on the task.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 14; + */ + public Builder removeAttributes(int index) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.remove(index); + onChanged(); + } else { + attributesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The custom attributes set on the task.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 14; + */ + public google.maps.fleetengine.delivery.v1.TaskAttribute.Builder getAttributesBuilder( + int index) { + return getAttributesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The custom attributes set on the task.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 14; + */ + public google.maps.fleetengine.delivery.v1.TaskAttributeOrBuilder getAttributesOrBuilder( + int index) { + if (attributesBuilder_ == null) { + return attributes_.get(index); + } else { + return attributesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The custom attributes set on the task.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 14; + */ + public java.util.List + getAttributesOrBuilderList() { + if (attributesBuilder_ != null) { + return attributesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(attributes_); + } + } + /** + * + * + *
+     * The custom attributes set on the task.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 14; + */ + public google.maps.fleetengine.delivery.v1.TaskAttribute.Builder addAttributesBuilder() { + return getAttributesFieldBuilder() + .addBuilder(google.maps.fleetengine.delivery.v1.TaskAttribute.getDefaultInstance()); + } + /** + * + * + *
+     * The custom attributes set on the task.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 14; + */ + public google.maps.fleetengine.delivery.v1.TaskAttribute.Builder addAttributesBuilder( + int index) { + return getAttributesFieldBuilder() + .addBuilder( + index, google.maps.fleetengine.delivery.v1.TaskAttribute.getDefaultInstance()); + } + /** + * + * + *
+     * The custom attributes set on the task.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 14; + */ + public java.util.List + getAttributesBuilderList() { + return getAttributesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + google.maps.fleetengine.delivery.v1.TaskAttribute, + google.maps.fleetengine.delivery.v1.TaskAttribute.Builder, + google.maps.fleetengine.delivery.v1.TaskAttributeOrBuilder> + getAttributesFieldBuilder() { + if (attributesBuilder_ == null) { + attributesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + google.maps.fleetengine.delivery.v1.TaskAttribute, + google.maps.fleetengine.delivery.v1.TaskAttribute.Builder, + google.maps.fleetengine.delivery.v1.TaskAttributeOrBuilder>( + attributes_, ((bitField0_ & 0x00002000) != 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.delivery.v1.TaskTrackingInfo) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.delivery.v1.TaskTrackingInfo) + private static final google.maps.fleetengine.delivery.v1.TaskTrackingInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new google.maps.fleetengine.delivery.v1.TaskTrackingInfo(); + } + + public static google.maps.fleetengine.delivery.v1.TaskTrackingInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TaskTrackingInfo 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 google.maps.fleetengine.delivery.v1.TaskTrackingInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/TaskTrackingInfoName.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/TaskTrackingInfoName.java new file mode 100644 index 000000000000..90a71667069a --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/TaskTrackingInfoName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.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 TaskTrackingInfoName implements ResourceName { + private static final PathTemplate PROVIDER_TRACKING = + PathTemplate.createWithoutUrlEncoding("providers/{provider}/taskTrackingInfo/{tracking}"); + private volatile Map fieldValuesMap; + private final String provider; + private final String tracking; + + @Deprecated + protected TaskTrackingInfoName() { + provider = null; + tracking = null; + } + + private TaskTrackingInfoName(Builder builder) { + provider = Preconditions.checkNotNull(builder.getProvider()); + tracking = Preconditions.checkNotNull(builder.getTracking()); + } + + public String getProvider() { + return provider; + } + + public String getTracking() { + return tracking; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static TaskTrackingInfoName of(String provider, String tracking) { + return newBuilder().setProvider(provider).setTracking(tracking).build(); + } + + public static String format(String provider, String tracking) { + return newBuilder().setProvider(provider).setTracking(tracking).build().toString(); + } + + public static TaskTrackingInfoName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROVIDER_TRACKING.validatedMatch( + formattedString, "TaskTrackingInfoName.parse: formattedString not in valid format"); + return of(matchMap.get("provider"), matchMap.get("tracking")); + } + + 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 (TaskTrackingInfoName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROVIDER_TRACKING.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 (tracking != null) { + fieldMapBuilder.put("tracking", tracking); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROVIDER_TRACKING.instantiate("provider", provider, "tracking", tracking); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + TaskTrackingInfoName that = ((TaskTrackingInfoName) o); + return Objects.equals(this.provider, that.provider) + && Objects.equals(this.tracking, that.tracking); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(provider); + h *= 1000003; + h ^= Objects.hashCode(tracking); + return h; + } + + /** Builder for providers/{provider}/taskTrackingInfo/{tracking}. */ + public static class Builder { + private String provider; + private String tracking; + + protected Builder() {} + + public String getProvider() { + return provider; + } + + public String getTracking() { + return tracking; + } + + public Builder setProvider(String provider) { + this.provider = provider; + return this; + } + + public Builder setTracking(String tracking) { + this.tracking = tracking; + return this; + } + + private Builder(TaskTrackingInfoName taskTrackingInfoName) { + this.provider = taskTrackingInfoName.provider; + this.tracking = taskTrackingInfoName.tracking; + } + + public TaskTrackingInfoName build() { + return new TaskTrackingInfoName(this); + } + } +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/TaskTrackingInfoOrBuilder.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/TaskTrackingInfoOrBuilder.java new file mode 100644 index 000000000000..33e1f6a146ed --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/TaskTrackingInfoOrBuilder.java @@ -0,0 +1,546 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/task_tracking_info.proto + +package google.maps.fleetengine.delivery.v1; + +public interface TaskTrackingInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.delivery.v1.TaskTrackingInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Must be in the format `providers/{provider}/taskTrackingInfo/{tracking}`,
+   * where `tracking` represents the tracking ID.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Must be in the format `providers/{provider}/taskTrackingInfo/{tracking}`,
+   * where `tracking` represents the tracking ID.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Immutable. The tracking ID of a Task.
+   * * 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 tracking_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The trackingId. + */ + java.lang.String getTrackingId(); + /** + * + * + *
+   * Immutable. The tracking ID of a Task.
+   * * 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 tracking_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for trackingId. + */ + com.google.protobuf.ByteString getTrackingIdBytes(); + + /** + * + * + *
+   * The vehicle's last location.
+   * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation vehicle_location = 3; + * + * @return Whether the vehicleLocation field is set. + */ + boolean hasVehicleLocation(); + /** + * + * + *
+   * The vehicle's last location.
+   * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation vehicle_location = 3; + * + * @return The vehicleLocation. + */ + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocation getVehicleLocation(); + /** + * + * + *
+   * The vehicle's last location.
+   * 
+ * + * .maps.fleetengine.delivery.v1.DeliveryVehicleLocation vehicle_location = 3; + */ + google.maps.fleetengine.delivery.v1.DeliveryVehicleLocationOrBuilder + getVehicleLocationOrBuilder(); + + /** + * + * + *
+   * A list of points which when connected forms a polyline of the vehicle's
+   * expected route to the location of this task.
+   * 
+ * + * repeated .google.type.LatLng route_polyline_points = 4; + */ + java.util.List getRoutePolylinePointsList(); + /** + * + * + *
+   * A list of points which when connected forms a polyline of the vehicle's
+   * expected route to the location of this task.
+   * 
+ * + * repeated .google.type.LatLng route_polyline_points = 4; + */ + com.google.type.LatLng getRoutePolylinePoints(int index); + /** + * + * + *
+   * A list of points which when connected forms a polyline of the vehicle's
+   * expected route to the location of this task.
+   * 
+ * + * repeated .google.type.LatLng route_polyline_points = 4; + */ + int getRoutePolylinePointsCount(); + /** + * + * + *
+   * A list of points which when connected forms a polyline of the vehicle's
+   * expected route to the location of this task.
+   * 
+ * + * repeated .google.type.LatLng route_polyline_points = 4; + */ + java.util.List getRoutePolylinePointsOrBuilderList(); + /** + * + * + *
+   * A list of points which when connected forms a polyline of the vehicle's
+   * expected route to the location of this task.
+   * 
+ * + * repeated .google.type.LatLng route_polyline_points = 4; + */ + com.google.type.LatLngOrBuilder getRoutePolylinePointsOrBuilder(int index); + + /** + * + * + *
+   * Indicates the number of stops the vehicle remaining until the task stop is
+   * reached, including the task stop. For example, if the vehicle's next stop
+   * is the task stop, the value will be 1.
+   * 
+ * + * .google.protobuf.Int32Value remaining_stop_count = 5; + * + * @return Whether the remainingStopCount field is set. + */ + boolean hasRemainingStopCount(); + /** + * + * + *
+   * Indicates the number of stops the vehicle remaining until the task stop is
+   * reached, including the task stop. For example, if the vehicle's next stop
+   * is the task stop, the value will be 1.
+   * 
+ * + * .google.protobuf.Int32Value remaining_stop_count = 5; + * + * @return The remainingStopCount. + */ + com.google.protobuf.Int32Value getRemainingStopCount(); + /** + * + * + *
+   * Indicates the number of stops the vehicle remaining until the task stop is
+   * reached, including the task stop. For example, if the vehicle's next stop
+   * is the task stop, the value will be 1.
+   * 
+ * + * .google.protobuf.Int32Value remaining_stop_count = 5; + */ + com.google.protobuf.Int32ValueOrBuilder getRemainingStopCountOrBuilder(); + + /** + * + * + *
+   * The total remaining distance in meters to the `VehicleStop` of interest.
+   * 
+ * + * .google.protobuf.Int32Value remaining_driving_distance_meters = 6; + * + * @return Whether the remainingDrivingDistanceMeters field is set. + */ + boolean hasRemainingDrivingDistanceMeters(); + /** + * + * + *
+   * The total remaining distance in meters to the `VehicleStop` of interest.
+   * 
+ * + * .google.protobuf.Int32Value remaining_driving_distance_meters = 6; + * + * @return The remainingDrivingDistanceMeters. + */ + com.google.protobuf.Int32Value getRemainingDrivingDistanceMeters(); + /** + * + * + *
+   * The total remaining distance in meters to the `VehicleStop` of interest.
+   * 
+ * + * .google.protobuf.Int32Value remaining_driving_distance_meters = 6; + */ + com.google.protobuf.Int32ValueOrBuilder getRemainingDrivingDistanceMetersOrBuilder(); + + /** + * + * + *
+   * The timestamp that indicates the estimated arrival time to the stop
+   * location.
+   * 
+ * + * .google.protobuf.Timestamp estimated_arrival_time = 7; + * + * @return Whether the estimatedArrivalTime field is set. + */ + boolean hasEstimatedArrivalTime(); + /** + * + * + *
+   * The timestamp that indicates the estimated arrival time to the stop
+   * location.
+   * 
+ * + * .google.protobuf.Timestamp estimated_arrival_time = 7; + * + * @return The estimatedArrivalTime. + */ + com.google.protobuf.Timestamp getEstimatedArrivalTime(); + /** + * + * + *
+   * The timestamp that indicates the estimated arrival time to the stop
+   * location.
+   * 
+ * + * .google.protobuf.Timestamp estimated_arrival_time = 7; + */ + com.google.protobuf.TimestampOrBuilder getEstimatedArrivalTimeOrBuilder(); + + /** + * + * + *
+   * The timestamp that indicates the estimated completion time of a Task.
+   * 
+ * + * .google.protobuf.Timestamp estimated_task_completion_time = 8; + * + * @return Whether the estimatedTaskCompletionTime field is set. + */ + boolean hasEstimatedTaskCompletionTime(); + /** + * + * + *
+   * The timestamp that indicates the estimated completion time of a Task.
+   * 
+ * + * .google.protobuf.Timestamp estimated_task_completion_time = 8; + * + * @return The estimatedTaskCompletionTime. + */ + com.google.protobuf.Timestamp getEstimatedTaskCompletionTime(); + /** + * + * + *
+   * The timestamp that indicates the estimated completion time of a Task.
+   * 
+ * + * .google.protobuf.Timestamp estimated_task_completion_time = 8; + */ + com.google.protobuf.TimestampOrBuilder getEstimatedTaskCompletionTimeOrBuilder(); + + /** + * + * + *
+   * The current execution state of the Task.
+   * 
+ * + * .maps.fleetengine.delivery.v1.Task.State state = 11; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * The current execution state of the Task.
+   * 
+ * + * .maps.fleetengine.delivery.v1.Task.State state = 11; + * + * @return The state. + */ + google.maps.fleetengine.delivery.v1.Task.State getState(); + + /** + * + * + *
+   * The outcome of attempting to execute a Task.
+   * 
+ * + * .maps.fleetengine.delivery.v1.Task.TaskOutcome task_outcome = 9; + * + * @return The enum numeric value on the wire for taskOutcome. + */ + int getTaskOutcomeValue(); + /** + * + * + *
+   * The outcome of attempting to execute a Task.
+   * 
+ * + * .maps.fleetengine.delivery.v1.Task.TaskOutcome task_outcome = 9; + * + * @return The taskOutcome. + */ + google.maps.fleetengine.delivery.v1.Task.TaskOutcome getTaskOutcome(); + + /** + * + * + *
+   * The timestamp that indicates when the Task's outcome was set by the
+   * provider.
+   * 
+ * + * .google.protobuf.Timestamp task_outcome_time = 12; + * + * @return Whether the taskOutcomeTime field is set. + */ + boolean hasTaskOutcomeTime(); + /** + * + * + *
+   * The timestamp that indicates when the Task's outcome was set by the
+   * provider.
+   * 
+ * + * .google.protobuf.Timestamp task_outcome_time = 12; + * + * @return The taskOutcomeTime. + */ + com.google.protobuf.Timestamp getTaskOutcomeTime(); + /** + * + * + *
+   * The timestamp that indicates when the Task's outcome was set by the
+   * provider.
+   * 
+ * + * .google.protobuf.Timestamp task_outcome_time = 12; + */ + com.google.protobuf.TimestampOrBuilder getTaskOutcomeTimeOrBuilder(); + + /** + * + * + *
+   * Immutable. The location where the Task will be completed.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the plannedLocation field is set. + */ + boolean hasPlannedLocation(); + /** + * + * + *
+   * Immutable. The location where the Task will be completed.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The plannedLocation. + */ + google.maps.fleetengine.delivery.v1.LocationInfo getPlannedLocation(); + /** + * + * + *
+   * Immutable. The location where the Task will be completed.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + google.maps.fleetengine.delivery.v1.LocationInfoOrBuilder getPlannedLocationOrBuilder(); + + /** + * + * + *
+   * The time window during which the task should be completed.
+   * 
+ * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 13; + * + * @return Whether the targetTimeWindow field is set. + */ + boolean hasTargetTimeWindow(); + /** + * + * + *
+   * The time window during which the task should be completed.
+   * 
+ * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 13; + * + * @return The targetTimeWindow. + */ + google.maps.fleetengine.delivery.v1.TimeWindow getTargetTimeWindow(); + /** + * + * + *
+   * The time window during which the task should be completed.
+   * 
+ * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 13; + */ + google.maps.fleetengine.delivery.v1.TimeWindowOrBuilder getTargetTimeWindowOrBuilder(); + + /** + * + * + *
+   * The custom attributes set on the task.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 14; + */ + java.util.List getAttributesList(); + /** + * + * + *
+   * The custom attributes set on the task.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 14; + */ + google.maps.fleetengine.delivery.v1.TaskAttribute getAttributes(int index); + /** + * + * + *
+   * The custom attributes set on the task.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 14; + */ + int getAttributesCount(); + /** + * + * + *
+   * The custom attributes set on the task.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 14; + */ + java.util.List + getAttributesOrBuilderList(); + /** + * + * + *
+   * The custom attributes set on the task.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 14; + */ + google.maps.fleetengine.delivery.v1.TaskAttributeOrBuilder getAttributesOrBuilder(int index); +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/TaskTrackingInfoProto.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/TaskTrackingInfoProto.java new file mode 100644 index 000000000000..f756c1fd4530 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/TaskTrackingInfoProto.java @@ -0,0 +1,134 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/task_tracking_info.proto + +package google.maps.fleetengine.delivery.v1; + +public final class TaskTrackingInfoProto { + private TaskTrackingInfoProto() {} + + 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_delivery_v1_TaskTrackingInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_delivery_v1_TaskTrackingInfo_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 + * The configuration message that defines when a data element of a Task should + * be visible to the end users. + * + * + * Protobuf type {@code maps.fleetengine.delivery.v1.TaskTrackingViewConfig} + */ +public final class TaskTrackingViewConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.delivery.v1.TaskTrackingViewConfig) + TaskTrackingViewConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use TaskTrackingViewConfig.newBuilder() to construct. + private TaskTrackingViewConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TaskTrackingViewConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TaskTrackingViewConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.Tasks + .internal_static_maps_fleetengine_delivery_v1_TaskTrackingViewConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.Tasks + .internal_static_maps_fleetengine_delivery_v1_TaskTrackingViewConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.class, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.Builder.class); + } + + public interface VisibilityOptionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * This data element is visible to the end users if the remaining stop
+     * count <= remaining_stop_count_threshold.
+     * 
+ * + * int32 remaining_stop_count_threshold = 1; + * + * @return Whether the remainingStopCountThreshold field is set. + */ + boolean hasRemainingStopCountThreshold(); + /** + * + * + *
+     * This data element is visible to the end users if the remaining stop
+     * count <= remaining_stop_count_threshold.
+     * 
+ * + * int32 remaining_stop_count_threshold = 1; + * + * @return The remainingStopCountThreshold. + */ + int getRemainingStopCountThreshold(); + + /** + * + * + *
+     * This data element is visible to the end users if the ETA to the stop
+     * <= duration_until_estimated_arrival_time_threshold.
+     * 
+ * + * .google.protobuf.Duration duration_until_estimated_arrival_time_threshold = 2; + * + * @return Whether the durationUntilEstimatedArrivalTimeThreshold field is set. + */ + boolean hasDurationUntilEstimatedArrivalTimeThreshold(); + /** + * + * + *
+     * This data element is visible to the end users if the ETA to the stop
+     * <= duration_until_estimated_arrival_time_threshold.
+     * 
+ * + * .google.protobuf.Duration duration_until_estimated_arrival_time_threshold = 2; + * + * @return The durationUntilEstimatedArrivalTimeThreshold. + */ + com.google.protobuf.Duration getDurationUntilEstimatedArrivalTimeThreshold(); + /** + * + * + *
+     * This data element is visible to the end users if the ETA to the stop
+     * <= duration_until_estimated_arrival_time_threshold.
+     * 
+ * + * .google.protobuf.Duration duration_until_estimated_arrival_time_threshold = 2; + */ + com.google.protobuf.DurationOrBuilder getDurationUntilEstimatedArrivalTimeThresholdOrBuilder(); + + /** + * + * + *
+     * This data element is visible to the end users if the remaining
+     * driving distance in meters <=
+     * remaining_driving_distance_meters_threshold.
+     * 
+ * + * int32 remaining_driving_distance_meters_threshold = 3; + * + * @return Whether the remainingDrivingDistanceMetersThreshold field is set. + */ + boolean hasRemainingDrivingDistanceMetersThreshold(); + /** + * + * + *
+     * This data element is visible to the end users if the remaining
+     * driving distance in meters <=
+     * remaining_driving_distance_meters_threshold.
+     * 
+ * + * int32 remaining_driving_distance_meters_threshold = 3; + * + * @return The remainingDrivingDistanceMetersThreshold. + */ + int getRemainingDrivingDistanceMetersThreshold(); + + /** + * + * + *
+     * If set to true, this data element is always visible to the end users
+     * with no thresholds. This field cannot be set to false.
+     * 
+ * + * bool always = 4; + * + * @return Whether the always field is set. + */ + boolean hasAlways(); + /** + * + * + *
+     * If set to true, this data element is always visible to the end users
+     * with no thresholds. This field cannot be set to false.
+     * 
+ * + * bool always = 4; + * + * @return The always. + */ + boolean getAlways(); + + /** + * + * + *
+     * If set to true, this data element is always hidden from the end users
+     * with no thresholds. This field cannot be set to false.
+     * 
+ * + * bool never = 5; + * + * @return Whether the never field is set. + */ + boolean hasNever(); + /** + * + * + *
+     * If set to true, this data element is always hidden from the end users
+     * with no thresholds. This field cannot be set to false.
+     * 
+ * + * bool never = 5; + * + * @return The never. + */ + boolean getNever(); + + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption.VisibilityOptionCase + getVisibilityOptionCase(); + } + /** + * + * + *
+   * The option message that defines when a data element should be visible to
+   * the end users.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption} + */ + public static final class VisibilityOption extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption) + VisibilityOptionOrBuilder { + private static final long serialVersionUID = 0L; + // Use VisibilityOption.newBuilder() to construct. + private VisibilityOption(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VisibilityOption() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VisibilityOption(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.Tasks + .internal_static_maps_fleetengine_delivery_v1_TaskTrackingViewConfig_VisibilityOption_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.Tasks + .internal_static_maps_fleetengine_delivery_v1_TaskTrackingViewConfig_VisibilityOption_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption.class, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption.Builder + .class); + } + + private int visibilityOptionCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object visibilityOption_; + + public enum VisibilityOptionCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + REMAINING_STOP_COUNT_THRESHOLD(1), + DURATION_UNTIL_ESTIMATED_ARRIVAL_TIME_THRESHOLD(2), + REMAINING_DRIVING_DISTANCE_METERS_THRESHOLD(3), + ALWAYS(4), + NEVER(5), + VISIBILITYOPTION_NOT_SET(0); + private final int value; + + private VisibilityOptionCase(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 VisibilityOptionCase valueOf(int value) { + return forNumber(value); + } + + public static VisibilityOptionCase forNumber(int value) { + switch (value) { + case 1: + return REMAINING_STOP_COUNT_THRESHOLD; + case 2: + return DURATION_UNTIL_ESTIMATED_ARRIVAL_TIME_THRESHOLD; + case 3: + return REMAINING_DRIVING_DISTANCE_METERS_THRESHOLD; + case 4: + return ALWAYS; + case 5: + return NEVER; + case 0: + return VISIBILITYOPTION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public VisibilityOptionCase getVisibilityOptionCase() { + return VisibilityOptionCase.forNumber(visibilityOptionCase_); + } + + public static final int REMAINING_STOP_COUNT_THRESHOLD_FIELD_NUMBER = 1; + /** + * + * + *
+     * This data element is visible to the end users if the remaining stop
+     * count <= remaining_stop_count_threshold.
+     * 
+ * + * int32 remaining_stop_count_threshold = 1; + * + * @return Whether the remainingStopCountThreshold field is set. + */ + @java.lang.Override + public boolean hasRemainingStopCountThreshold() { + return visibilityOptionCase_ == 1; + } + /** + * + * + *
+     * This data element is visible to the end users if the remaining stop
+     * count <= remaining_stop_count_threshold.
+     * 
+ * + * int32 remaining_stop_count_threshold = 1; + * + * @return The remainingStopCountThreshold. + */ + @java.lang.Override + public int getRemainingStopCountThreshold() { + if (visibilityOptionCase_ == 1) { + return (java.lang.Integer) visibilityOption_; + } + return 0; + } + + public static final int DURATION_UNTIL_ESTIMATED_ARRIVAL_TIME_THRESHOLD_FIELD_NUMBER = 2; + /** + * + * + *
+     * This data element is visible to the end users if the ETA to the stop
+     * <= duration_until_estimated_arrival_time_threshold.
+     * 
+ * + * .google.protobuf.Duration duration_until_estimated_arrival_time_threshold = 2; + * + * @return Whether the durationUntilEstimatedArrivalTimeThreshold field is set. + */ + @java.lang.Override + public boolean hasDurationUntilEstimatedArrivalTimeThreshold() { + return visibilityOptionCase_ == 2; + } + /** + * + * + *
+     * This data element is visible to the end users if the ETA to the stop
+     * <= duration_until_estimated_arrival_time_threshold.
+     * 
+ * + * .google.protobuf.Duration duration_until_estimated_arrival_time_threshold = 2; + * + * @return The durationUntilEstimatedArrivalTimeThreshold. + */ + @java.lang.Override + public com.google.protobuf.Duration getDurationUntilEstimatedArrivalTimeThreshold() { + if (visibilityOptionCase_ == 2) { + return (com.google.protobuf.Duration) visibilityOption_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + /** + * + * + *
+     * This data element is visible to the end users if the ETA to the stop
+     * <= duration_until_estimated_arrival_time_threshold.
+     * 
+ * + * .google.protobuf.Duration duration_until_estimated_arrival_time_threshold = 2; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder + getDurationUntilEstimatedArrivalTimeThresholdOrBuilder() { + if (visibilityOptionCase_ == 2) { + return (com.google.protobuf.Duration) visibilityOption_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + + public static final int REMAINING_DRIVING_DISTANCE_METERS_THRESHOLD_FIELD_NUMBER = 3; + /** + * + * + *
+     * This data element is visible to the end users if the remaining
+     * driving distance in meters <=
+     * remaining_driving_distance_meters_threshold.
+     * 
+ * + * int32 remaining_driving_distance_meters_threshold = 3; + * + * @return Whether the remainingDrivingDistanceMetersThreshold field is set. + */ + @java.lang.Override + public boolean hasRemainingDrivingDistanceMetersThreshold() { + return visibilityOptionCase_ == 3; + } + /** + * + * + *
+     * This data element is visible to the end users if the remaining
+     * driving distance in meters <=
+     * remaining_driving_distance_meters_threshold.
+     * 
+ * + * int32 remaining_driving_distance_meters_threshold = 3; + * + * @return The remainingDrivingDistanceMetersThreshold. + */ + @java.lang.Override + public int getRemainingDrivingDistanceMetersThreshold() { + if (visibilityOptionCase_ == 3) { + return (java.lang.Integer) visibilityOption_; + } + return 0; + } + + public static final int ALWAYS_FIELD_NUMBER = 4; + /** + * + * + *
+     * If set to true, this data element is always visible to the end users
+     * with no thresholds. This field cannot be set to false.
+     * 
+ * + * bool always = 4; + * + * @return Whether the always field is set. + */ + @java.lang.Override + public boolean hasAlways() { + return visibilityOptionCase_ == 4; + } + /** + * + * + *
+     * If set to true, this data element is always visible to the end users
+     * with no thresholds. This field cannot be set to false.
+     * 
+ * + * bool always = 4; + * + * @return The always. + */ + @java.lang.Override + public boolean getAlways() { + if (visibilityOptionCase_ == 4) { + return (java.lang.Boolean) visibilityOption_; + } + return false; + } + + public static final int NEVER_FIELD_NUMBER = 5; + /** + * + * + *
+     * If set to true, this data element is always hidden from the end users
+     * with no thresholds. This field cannot be set to false.
+     * 
+ * + * bool never = 5; + * + * @return Whether the never field is set. + */ + @java.lang.Override + public boolean hasNever() { + return visibilityOptionCase_ == 5; + } + /** + * + * + *
+     * If set to true, this data element is always hidden from the end users
+     * with no thresholds. This field cannot be set to false.
+     * 
+ * + * bool never = 5; + * + * @return The never. + */ + @java.lang.Override + public boolean getNever() { + if (visibilityOptionCase_ == 5) { + return (java.lang.Boolean) visibilityOption_; + } + return false; + } + + 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 (visibilityOptionCase_ == 1) { + output.writeInt32(1, (int) ((java.lang.Integer) visibilityOption_)); + } + if (visibilityOptionCase_ == 2) { + output.writeMessage(2, (com.google.protobuf.Duration) visibilityOption_); + } + if (visibilityOptionCase_ == 3) { + output.writeInt32(3, (int) ((java.lang.Integer) visibilityOption_)); + } + if (visibilityOptionCase_ == 4) { + output.writeBool(4, (boolean) ((java.lang.Boolean) visibilityOption_)); + } + if (visibilityOptionCase_ == 5) { + output.writeBool(5, (boolean) ((java.lang.Boolean) visibilityOption_)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (visibilityOptionCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size( + 1, (int) ((java.lang.Integer) visibilityOption_)); + } + if (visibilityOptionCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.protobuf.Duration) visibilityOption_); + } + if (visibilityOptionCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size( + 3, (int) ((java.lang.Integer) visibilityOption_)); + } + if (visibilityOptionCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 4, (boolean) ((java.lang.Boolean) visibilityOption_)); + } + if (visibilityOptionCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 5, (boolean) ((java.lang.Boolean) visibilityOption_)); + } + 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 google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption)) { + return super.equals(obj); + } + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption other = + (google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption) obj; + + if (!getVisibilityOptionCase().equals(other.getVisibilityOptionCase())) return false; + switch (visibilityOptionCase_) { + case 1: + if (getRemainingStopCountThreshold() != other.getRemainingStopCountThreshold()) + return false; + break; + case 2: + if (!getDurationUntilEstimatedArrivalTimeThreshold() + .equals(other.getDurationUntilEstimatedArrivalTimeThreshold())) return false; + break; + case 3: + if (getRemainingDrivingDistanceMetersThreshold() + != other.getRemainingDrivingDistanceMetersThreshold()) return false; + break; + case 4: + if (getAlways() != other.getAlways()) return false; + break; + case 5: + if (getNever() != other.getNever()) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (visibilityOptionCase_) { + case 1: + hash = (37 * hash) + REMAINING_STOP_COUNT_THRESHOLD_FIELD_NUMBER; + hash = (53 * hash) + getRemainingStopCountThreshold(); + break; + case 2: + hash = (37 * hash) + DURATION_UNTIL_ESTIMATED_ARRIVAL_TIME_THRESHOLD_FIELD_NUMBER; + hash = (53 * hash) + getDurationUntilEstimatedArrivalTimeThreshold().hashCode(); + break; + case 3: + hash = (37 * hash) + REMAINING_DRIVING_DISTANCE_METERS_THRESHOLD_FIELD_NUMBER; + hash = (53 * hash) + getRemainingDrivingDistanceMetersThreshold(); + break; + case 4: + hash = (37 * hash) + ALWAYS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAlways()); + break; + case 5: + hash = (37 * hash) + NEVER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getNever()); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + 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 google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + 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 google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + 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( + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption 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 option message that defines when a data element should be visible to
+     * the end users.
+     * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption) + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOptionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.Tasks + .internal_static_maps_fleetengine_delivery_v1_TaskTrackingViewConfig_VisibilityOption_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.Tasks + .internal_static_maps_fleetengine_delivery_v1_TaskTrackingViewConfig_VisibilityOption_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption.class, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption.Builder + .class); + } + + // Construct using + // google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (durationUntilEstimatedArrivalTimeThresholdBuilder_ != null) { + durationUntilEstimatedArrivalTimeThresholdBuilder_.clear(); + } + visibilityOptionCase_ = 0; + visibilityOption_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return google.maps.fleetengine.delivery.v1.Tasks + .internal_static_maps_fleetengine_delivery_v1_TaskTrackingViewConfig_VisibilityOption_descriptor; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + getDefaultInstanceForType() { + return google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + .getDefaultInstance(); + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption build() { + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + buildPartial() { + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption result = + new google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption result) { + result.visibilityOptionCase_ = visibilityOptionCase_; + result.visibilityOption_ = this.visibilityOption_; + if (visibilityOptionCase_ == 2 + && durationUntilEstimatedArrivalTimeThresholdBuilder_ != null) { + result.visibilityOption_ = durationUntilEstimatedArrivalTimeThresholdBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption) { + return mergeFrom( + (google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption other) { + if (other + == google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + .getDefaultInstance()) return this; + switch (other.getVisibilityOptionCase()) { + case REMAINING_STOP_COUNT_THRESHOLD: + { + setRemainingStopCountThreshold(other.getRemainingStopCountThreshold()); + break; + } + case DURATION_UNTIL_ESTIMATED_ARRIVAL_TIME_THRESHOLD: + { + mergeDurationUntilEstimatedArrivalTimeThreshold( + other.getDurationUntilEstimatedArrivalTimeThreshold()); + break; + } + case REMAINING_DRIVING_DISTANCE_METERS_THRESHOLD: + { + setRemainingDrivingDistanceMetersThreshold( + other.getRemainingDrivingDistanceMetersThreshold()); + break; + } + case ALWAYS: + { + setAlways(other.getAlways()); + break; + } + case NEVER: + { + setNever(other.getNever()); + break; + } + case VISIBILITYOPTION_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 8: + { + visibilityOption_ = input.readInt32(); + visibilityOptionCase_ = 1; + break; + } // case 8 + case 18: + { + input.readMessage( + getDurationUntilEstimatedArrivalTimeThresholdFieldBuilder().getBuilder(), + extensionRegistry); + visibilityOptionCase_ = 2; + break; + } // case 18 + case 24: + { + visibilityOption_ = input.readInt32(); + visibilityOptionCase_ = 3; + break; + } // case 24 + case 32: + { + visibilityOption_ = input.readBool(); + visibilityOptionCase_ = 4; + break; + } // case 32 + case 40: + { + visibilityOption_ = input.readBool(); + visibilityOptionCase_ = 5; + 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 visibilityOptionCase_ = 0; + private java.lang.Object visibilityOption_; + + public VisibilityOptionCase getVisibilityOptionCase() { + return VisibilityOptionCase.forNumber(visibilityOptionCase_); + } + + public Builder clearVisibilityOption() { + visibilityOptionCase_ = 0; + visibilityOption_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+       * This data element is visible to the end users if the remaining stop
+       * count <= remaining_stop_count_threshold.
+       * 
+ * + * int32 remaining_stop_count_threshold = 1; + * + * @return Whether the remainingStopCountThreshold field is set. + */ + public boolean hasRemainingStopCountThreshold() { + return visibilityOptionCase_ == 1; + } + /** + * + * + *
+       * This data element is visible to the end users if the remaining stop
+       * count <= remaining_stop_count_threshold.
+       * 
+ * + * int32 remaining_stop_count_threshold = 1; + * + * @return The remainingStopCountThreshold. + */ + public int getRemainingStopCountThreshold() { + if (visibilityOptionCase_ == 1) { + return (java.lang.Integer) visibilityOption_; + } + return 0; + } + /** + * + * + *
+       * This data element is visible to the end users if the remaining stop
+       * count <= remaining_stop_count_threshold.
+       * 
+ * + * int32 remaining_stop_count_threshold = 1; + * + * @param value The remainingStopCountThreshold to set. + * @return This builder for chaining. + */ + public Builder setRemainingStopCountThreshold(int value) { + + visibilityOptionCase_ = 1; + visibilityOption_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * This data element is visible to the end users if the remaining stop
+       * count <= remaining_stop_count_threshold.
+       * 
+ * + * int32 remaining_stop_count_threshold = 1; + * + * @return This builder for chaining. + */ + public Builder clearRemainingStopCountThreshold() { + if (visibilityOptionCase_ == 1) { + visibilityOptionCase_ = 0; + visibilityOption_ = null; + onChanged(); + } + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + durationUntilEstimatedArrivalTimeThresholdBuilder_; + /** + * + * + *
+       * This data element is visible to the end users if the ETA to the stop
+       * <= duration_until_estimated_arrival_time_threshold.
+       * 
+ * + * .google.protobuf.Duration duration_until_estimated_arrival_time_threshold = 2; + * + * @return Whether the durationUntilEstimatedArrivalTimeThreshold field is set. + */ + @java.lang.Override + public boolean hasDurationUntilEstimatedArrivalTimeThreshold() { + return visibilityOptionCase_ == 2; + } + /** + * + * + *
+       * This data element is visible to the end users if the ETA to the stop
+       * <= duration_until_estimated_arrival_time_threshold.
+       * 
+ * + * .google.protobuf.Duration duration_until_estimated_arrival_time_threshold = 2; + * + * @return The durationUntilEstimatedArrivalTimeThreshold. + */ + @java.lang.Override + public com.google.protobuf.Duration getDurationUntilEstimatedArrivalTimeThreshold() { + if (durationUntilEstimatedArrivalTimeThresholdBuilder_ == null) { + if (visibilityOptionCase_ == 2) { + return (com.google.protobuf.Duration) visibilityOption_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } else { + if (visibilityOptionCase_ == 2) { + return durationUntilEstimatedArrivalTimeThresholdBuilder_.getMessage(); + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + } + /** + * + * + *
+       * This data element is visible to the end users if the ETA to the stop
+       * <= duration_until_estimated_arrival_time_threshold.
+       * 
+ * + * .google.protobuf.Duration duration_until_estimated_arrival_time_threshold = 2; + */ + public Builder setDurationUntilEstimatedArrivalTimeThreshold( + com.google.protobuf.Duration value) { + if (durationUntilEstimatedArrivalTimeThresholdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + visibilityOption_ = value; + onChanged(); + } else { + durationUntilEstimatedArrivalTimeThresholdBuilder_.setMessage(value); + } + visibilityOptionCase_ = 2; + return this; + } + /** + * + * + *
+       * This data element is visible to the end users if the ETA to the stop
+       * <= duration_until_estimated_arrival_time_threshold.
+       * 
+ * + * .google.protobuf.Duration duration_until_estimated_arrival_time_threshold = 2; + */ + public Builder setDurationUntilEstimatedArrivalTimeThreshold( + com.google.protobuf.Duration.Builder builderForValue) { + if (durationUntilEstimatedArrivalTimeThresholdBuilder_ == null) { + visibilityOption_ = builderForValue.build(); + onChanged(); + } else { + durationUntilEstimatedArrivalTimeThresholdBuilder_.setMessage(builderForValue.build()); + } + visibilityOptionCase_ = 2; + return this; + } + /** + * + * + *
+       * This data element is visible to the end users if the ETA to the stop
+       * <= duration_until_estimated_arrival_time_threshold.
+       * 
+ * + * .google.protobuf.Duration duration_until_estimated_arrival_time_threshold = 2; + */ + public Builder mergeDurationUntilEstimatedArrivalTimeThreshold( + com.google.protobuf.Duration value) { + if (durationUntilEstimatedArrivalTimeThresholdBuilder_ == null) { + if (visibilityOptionCase_ == 2 + && visibilityOption_ != com.google.protobuf.Duration.getDefaultInstance()) { + visibilityOption_ = + com.google.protobuf.Duration.newBuilder( + (com.google.protobuf.Duration) visibilityOption_) + .mergeFrom(value) + .buildPartial(); + } else { + visibilityOption_ = value; + } + onChanged(); + } else { + if (visibilityOptionCase_ == 2) { + durationUntilEstimatedArrivalTimeThresholdBuilder_.mergeFrom(value); + } else { + durationUntilEstimatedArrivalTimeThresholdBuilder_.setMessage(value); + } + } + visibilityOptionCase_ = 2; + return this; + } + /** + * + * + *
+       * This data element is visible to the end users if the ETA to the stop
+       * <= duration_until_estimated_arrival_time_threshold.
+       * 
+ * + * .google.protobuf.Duration duration_until_estimated_arrival_time_threshold = 2; + */ + public Builder clearDurationUntilEstimatedArrivalTimeThreshold() { + if (durationUntilEstimatedArrivalTimeThresholdBuilder_ == null) { + if (visibilityOptionCase_ == 2) { + visibilityOptionCase_ = 0; + visibilityOption_ = null; + onChanged(); + } + } else { + if (visibilityOptionCase_ == 2) { + visibilityOptionCase_ = 0; + visibilityOption_ = null; + } + durationUntilEstimatedArrivalTimeThresholdBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * This data element is visible to the end users if the ETA to the stop
+       * <= duration_until_estimated_arrival_time_threshold.
+       * 
+ * + * .google.protobuf.Duration duration_until_estimated_arrival_time_threshold = 2; + */ + public com.google.protobuf.Duration.Builder + getDurationUntilEstimatedArrivalTimeThresholdBuilder() { + return getDurationUntilEstimatedArrivalTimeThresholdFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * This data element is visible to the end users if the ETA to the stop
+       * <= duration_until_estimated_arrival_time_threshold.
+       * 
+ * + * .google.protobuf.Duration duration_until_estimated_arrival_time_threshold = 2; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder + getDurationUntilEstimatedArrivalTimeThresholdOrBuilder() { + if ((visibilityOptionCase_ == 2) + && (durationUntilEstimatedArrivalTimeThresholdBuilder_ != null)) { + return durationUntilEstimatedArrivalTimeThresholdBuilder_.getMessageOrBuilder(); + } else { + if (visibilityOptionCase_ == 2) { + return (com.google.protobuf.Duration) visibilityOption_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + } + /** + * + * + *
+       * This data element is visible to the end users if the ETA to the stop
+       * <= duration_until_estimated_arrival_time_threshold.
+       * 
+ * + * .google.protobuf.Duration duration_until_estimated_arrival_time_threshold = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getDurationUntilEstimatedArrivalTimeThresholdFieldBuilder() { + if (durationUntilEstimatedArrivalTimeThresholdBuilder_ == null) { + if (!(visibilityOptionCase_ == 2)) { + visibilityOption_ = com.google.protobuf.Duration.getDefaultInstance(); + } + durationUntilEstimatedArrivalTimeThresholdBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + (com.google.protobuf.Duration) visibilityOption_, + getParentForChildren(), + isClean()); + visibilityOption_ = null; + } + visibilityOptionCase_ = 2; + onChanged(); + return durationUntilEstimatedArrivalTimeThresholdBuilder_; + } + + /** + * + * + *
+       * This data element is visible to the end users if the remaining
+       * driving distance in meters <=
+       * remaining_driving_distance_meters_threshold.
+       * 
+ * + * int32 remaining_driving_distance_meters_threshold = 3; + * + * @return Whether the remainingDrivingDistanceMetersThreshold field is set. + */ + public boolean hasRemainingDrivingDistanceMetersThreshold() { + return visibilityOptionCase_ == 3; + } + /** + * + * + *
+       * This data element is visible to the end users if the remaining
+       * driving distance in meters <=
+       * remaining_driving_distance_meters_threshold.
+       * 
+ * + * int32 remaining_driving_distance_meters_threshold = 3; + * + * @return The remainingDrivingDistanceMetersThreshold. + */ + public int getRemainingDrivingDistanceMetersThreshold() { + if (visibilityOptionCase_ == 3) { + return (java.lang.Integer) visibilityOption_; + } + return 0; + } + /** + * + * + *
+       * This data element is visible to the end users if the remaining
+       * driving distance in meters <=
+       * remaining_driving_distance_meters_threshold.
+       * 
+ * + * int32 remaining_driving_distance_meters_threshold = 3; + * + * @param value The remainingDrivingDistanceMetersThreshold to set. + * @return This builder for chaining. + */ + public Builder setRemainingDrivingDistanceMetersThreshold(int value) { + + visibilityOptionCase_ = 3; + visibilityOption_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * This data element is visible to the end users if the remaining
+       * driving distance in meters <=
+       * remaining_driving_distance_meters_threshold.
+       * 
+ * + * int32 remaining_driving_distance_meters_threshold = 3; + * + * @return This builder for chaining. + */ + public Builder clearRemainingDrivingDistanceMetersThreshold() { + if (visibilityOptionCase_ == 3) { + visibilityOptionCase_ = 0; + visibilityOption_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * If set to true, this data element is always visible to the end users
+       * with no thresholds. This field cannot be set to false.
+       * 
+ * + * bool always = 4; + * + * @return Whether the always field is set. + */ + public boolean hasAlways() { + return visibilityOptionCase_ == 4; + } + /** + * + * + *
+       * If set to true, this data element is always visible to the end users
+       * with no thresholds. This field cannot be set to false.
+       * 
+ * + * bool always = 4; + * + * @return The always. + */ + public boolean getAlways() { + if (visibilityOptionCase_ == 4) { + return (java.lang.Boolean) visibilityOption_; + } + return false; + } + /** + * + * + *
+       * If set to true, this data element is always visible to the end users
+       * with no thresholds. This field cannot be set to false.
+       * 
+ * + * bool always = 4; + * + * @param value The always to set. + * @return This builder for chaining. + */ + public Builder setAlways(boolean value) { + + visibilityOptionCase_ = 4; + visibilityOption_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * If set to true, this data element is always visible to the end users
+       * with no thresholds. This field cannot be set to false.
+       * 
+ * + * bool always = 4; + * + * @return This builder for chaining. + */ + public Builder clearAlways() { + if (visibilityOptionCase_ == 4) { + visibilityOptionCase_ = 0; + visibilityOption_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * If set to true, this data element is always hidden from the end users
+       * with no thresholds. This field cannot be set to false.
+       * 
+ * + * bool never = 5; + * + * @return Whether the never field is set. + */ + public boolean hasNever() { + return visibilityOptionCase_ == 5; + } + /** + * + * + *
+       * If set to true, this data element is always hidden from the end users
+       * with no thresholds. This field cannot be set to false.
+       * 
+ * + * bool never = 5; + * + * @return The never. + */ + public boolean getNever() { + if (visibilityOptionCase_ == 5) { + return (java.lang.Boolean) visibilityOption_; + } + return false; + } + /** + * + * + *
+       * If set to true, this data element is always hidden from the end users
+       * with no thresholds. This field cannot be set to false.
+       * 
+ * + * bool never = 5; + * + * @param value The never to set. + * @return This builder for chaining. + */ + public Builder setNever(boolean value) { + + visibilityOptionCase_ = 5; + visibilityOption_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * If set to true, this data element is always hidden from the end users
+       * with no thresholds. This field cannot be set to false.
+       * 
+ * + * bool never = 5; + * + * @return This builder for chaining. + */ + public Builder clearNever() { + if (visibilityOptionCase_ == 5) { + visibilityOptionCase_ = 0; + visibilityOption_ = 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.delivery.v1.TaskTrackingViewConfig.VisibilityOption) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption) + private static final google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption(); + } + + public static google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VisibilityOption 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 google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int ROUTE_POLYLINE_POINTS_VISIBILITY_FIELD_NUMBER = 1; + private google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + routePolylinePointsVisibility_; + /** + * + * + *
+   * The field that specifies when route polyline points can be visible. If this
+   * field is not specified, the project level default visibility configuration
+   * for this data will be used.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption route_polyline_points_visibility = 1; + * + * + * @return Whether the routePolylinePointsVisibility field is set. + */ + @java.lang.Override + public boolean hasRoutePolylinePointsVisibility() { + return routePolylinePointsVisibility_ != null; + } + /** + * + * + *
+   * The field that specifies when route polyline points can be visible. If this
+   * field is not specified, the project level default visibility configuration
+   * for this data will be used.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption route_polyline_points_visibility = 1; + * + * + * @return The routePolylinePointsVisibility. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + getRoutePolylinePointsVisibility() { + return routePolylinePointsVisibility_ == null + ? google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + .getDefaultInstance() + : routePolylinePointsVisibility_; + } + /** + * + * + *
+   * The field that specifies when route polyline points can be visible. If this
+   * field is not specified, the project level default visibility configuration
+   * for this data will be used.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption route_polyline_points_visibility = 1; + * + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOptionOrBuilder + getRoutePolylinePointsVisibilityOrBuilder() { + return routePolylinePointsVisibility_ == null + ? google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + .getDefaultInstance() + : routePolylinePointsVisibility_; + } + + public static final int ESTIMATED_ARRIVAL_TIME_VISIBILITY_FIELD_NUMBER = 2; + private google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + estimatedArrivalTimeVisibility_; + /** + * + * + *
+   * The field that specifies when estimated arrival time can be visible. If
+   * this field is not specified, the project level default visibility
+   * configuration for this data will be used.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_arrival_time_visibility = 2; + * + * + * @return Whether the estimatedArrivalTimeVisibility field is set. + */ + @java.lang.Override + public boolean hasEstimatedArrivalTimeVisibility() { + return estimatedArrivalTimeVisibility_ != null; + } + /** + * + * + *
+   * The field that specifies when estimated arrival time can be visible. If
+   * this field is not specified, the project level default visibility
+   * configuration for this data will be used.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_arrival_time_visibility = 2; + * + * + * @return The estimatedArrivalTimeVisibility. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + getEstimatedArrivalTimeVisibility() { + return estimatedArrivalTimeVisibility_ == null + ? google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + .getDefaultInstance() + : estimatedArrivalTimeVisibility_; + } + /** + * + * + *
+   * The field that specifies when estimated arrival time can be visible. If
+   * this field is not specified, the project level default visibility
+   * configuration for this data will be used.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_arrival_time_visibility = 2; + * + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOptionOrBuilder + getEstimatedArrivalTimeVisibilityOrBuilder() { + return estimatedArrivalTimeVisibility_ == null + ? google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + .getDefaultInstance() + : estimatedArrivalTimeVisibility_; + } + + public static final int ESTIMATED_TASK_COMPLETION_TIME_VISIBILITY_FIELD_NUMBER = 3; + private google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + estimatedTaskCompletionTimeVisibility_; + /** + * + * + *
+   * The field that specifies when estimated task completion time can be
+   * visible. If this field is not specified, the project level default
+   * visibility configuration for this data will be used.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_task_completion_time_visibility = 3; + * + * + * @return Whether the estimatedTaskCompletionTimeVisibility field is set. + */ + @java.lang.Override + public boolean hasEstimatedTaskCompletionTimeVisibility() { + return estimatedTaskCompletionTimeVisibility_ != null; + } + /** + * + * + *
+   * The field that specifies when estimated task completion time can be
+   * visible. If this field is not specified, the project level default
+   * visibility configuration for this data will be used.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_task_completion_time_visibility = 3; + * + * + * @return The estimatedTaskCompletionTimeVisibility. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + getEstimatedTaskCompletionTimeVisibility() { + return estimatedTaskCompletionTimeVisibility_ == null + ? google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + .getDefaultInstance() + : estimatedTaskCompletionTimeVisibility_; + } + /** + * + * + *
+   * The field that specifies when estimated task completion time can be
+   * visible. If this field is not specified, the project level default
+   * visibility configuration for this data will be used.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_task_completion_time_visibility = 3; + * + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOptionOrBuilder + getEstimatedTaskCompletionTimeVisibilityOrBuilder() { + return estimatedTaskCompletionTimeVisibility_ == null + ? google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + .getDefaultInstance() + : estimatedTaskCompletionTimeVisibility_; + } + + public static final int REMAINING_DRIVING_DISTANCE_VISIBILITY_FIELD_NUMBER = 4; + private google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + remainingDrivingDistanceVisibility_; + /** + * + * + *
+   * The field that specifies when remaining driving distance can be visible. If
+   * this field is not specified, the project level default visibility
+   * configuration for this data will be used.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_driving_distance_visibility = 4; + * + * + * @return Whether the remainingDrivingDistanceVisibility field is set. + */ + @java.lang.Override + public boolean hasRemainingDrivingDistanceVisibility() { + return remainingDrivingDistanceVisibility_ != null; + } + /** + * + * + *
+   * The field that specifies when remaining driving distance can be visible. If
+   * this field is not specified, the project level default visibility
+   * configuration for this data will be used.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_driving_distance_visibility = 4; + * + * + * @return The remainingDrivingDistanceVisibility. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + getRemainingDrivingDistanceVisibility() { + return remainingDrivingDistanceVisibility_ == null + ? google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + .getDefaultInstance() + : remainingDrivingDistanceVisibility_; + } + /** + * + * + *
+   * The field that specifies when remaining driving distance can be visible. If
+   * this field is not specified, the project level default visibility
+   * configuration for this data will be used.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_driving_distance_visibility = 4; + * + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOptionOrBuilder + getRemainingDrivingDistanceVisibilityOrBuilder() { + return remainingDrivingDistanceVisibility_ == null + ? google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + .getDefaultInstance() + : remainingDrivingDistanceVisibility_; + } + + public static final int REMAINING_STOP_COUNT_VISIBILITY_FIELD_NUMBER = 5; + private google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + remainingStopCountVisibility_; + /** + * + * + *
+   * The field that specifies when remaining stop count can be visible. If this
+   * field is not specified, the project level default visibility configuration
+   * for this data will be used.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_stop_count_visibility = 5; + * + * + * @return Whether the remainingStopCountVisibility field is set. + */ + @java.lang.Override + public boolean hasRemainingStopCountVisibility() { + return remainingStopCountVisibility_ != null; + } + /** + * + * + *
+   * The field that specifies when remaining stop count can be visible. If this
+   * field is not specified, the project level default visibility configuration
+   * for this data will be used.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_stop_count_visibility = 5; + * + * + * @return The remainingStopCountVisibility. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + getRemainingStopCountVisibility() { + return remainingStopCountVisibility_ == null + ? google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + .getDefaultInstance() + : remainingStopCountVisibility_; + } + /** + * + * + *
+   * The field that specifies when remaining stop count can be visible. If this
+   * field is not specified, the project level default visibility configuration
+   * for this data will be used.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_stop_count_visibility = 5; + * + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOptionOrBuilder + getRemainingStopCountVisibilityOrBuilder() { + return remainingStopCountVisibility_ == null + ? google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + .getDefaultInstance() + : remainingStopCountVisibility_; + } + + public static final int VEHICLE_LOCATION_VISIBILITY_FIELD_NUMBER = 6; + private google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + vehicleLocationVisibility_; + /** + * + * + *
+   * The field that specifies when vehicle location can be visible. If this
+   * field is not specified, the project level default visibility configuration
+   * for this data will be used.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption vehicle_location_visibility = 6; + * + * + * @return Whether the vehicleLocationVisibility field is set. + */ + @java.lang.Override + public boolean hasVehicleLocationVisibility() { + return vehicleLocationVisibility_ != null; + } + /** + * + * + *
+   * The field that specifies when vehicle location can be visible. If this
+   * field is not specified, the project level default visibility configuration
+   * for this data will be used.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption vehicle_location_visibility = 6; + * + * + * @return The vehicleLocationVisibility. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + getVehicleLocationVisibility() { + return vehicleLocationVisibility_ == null + ? google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + .getDefaultInstance() + : vehicleLocationVisibility_; + } + /** + * + * + *
+   * The field that specifies when vehicle location can be visible. If this
+   * field is not specified, the project level default visibility configuration
+   * for this data will be used.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption vehicle_location_visibility = 6; + * + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOptionOrBuilder + getVehicleLocationVisibilityOrBuilder() { + return vehicleLocationVisibility_ == null + ? google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + .getDefaultInstance() + : vehicleLocationVisibility_; + } + + 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 (routePolylinePointsVisibility_ != null) { + output.writeMessage(1, getRoutePolylinePointsVisibility()); + } + if (estimatedArrivalTimeVisibility_ != null) { + output.writeMessage(2, getEstimatedArrivalTimeVisibility()); + } + if (estimatedTaskCompletionTimeVisibility_ != null) { + output.writeMessage(3, getEstimatedTaskCompletionTimeVisibility()); + } + if (remainingDrivingDistanceVisibility_ != null) { + output.writeMessage(4, getRemainingDrivingDistanceVisibility()); + } + if (remainingStopCountVisibility_ != null) { + output.writeMessage(5, getRemainingStopCountVisibility()); + } + if (vehicleLocationVisibility_ != null) { + output.writeMessage(6, getVehicleLocationVisibility()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (routePolylinePointsVisibility_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, getRoutePolylinePointsVisibility()); + } + if (estimatedArrivalTimeVisibility_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, getEstimatedArrivalTimeVisibility()); + } + if (estimatedTaskCompletionTimeVisibility_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, getEstimatedTaskCompletionTimeVisibility()); + } + if (remainingDrivingDistanceVisibility_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, getRemainingDrivingDistanceVisibility()); + } + if (remainingStopCountVisibility_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, getRemainingStopCountVisibility()); + } + if (vehicleLocationVisibility_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, getVehicleLocationVisibility()); + } + 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 google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig)) { + return super.equals(obj); + } + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig other = + (google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig) obj; + + if (hasRoutePolylinePointsVisibility() != other.hasRoutePolylinePointsVisibility()) + return false; + if (hasRoutePolylinePointsVisibility()) { + if (!getRoutePolylinePointsVisibility().equals(other.getRoutePolylinePointsVisibility())) + return false; + } + if (hasEstimatedArrivalTimeVisibility() != other.hasEstimatedArrivalTimeVisibility()) + return false; + if (hasEstimatedArrivalTimeVisibility()) { + if (!getEstimatedArrivalTimeVisibility().equals(other.getEstimatedArrivalTimeVisibility())) + return false; + } + if (hasEstimatedTaskCompletionTimeVisibility() + != other.hasEstimatedTaskCompletionTimeVisibility()) return false; + if (hasEstimatedTaskCompletionTimeVisibility()) { + if (!getEstimatedTaskCompletionTimeVisibility() + .equals(other.getEstimatedTaskCompletionTimeVisibility())) return false; + } + if (hasRemainingDrivingDistanceVisibility() != other.hasRemainingDrivingDistanceVisibility()) + return false; + if (hasRemainingDrivingDistanceVisibility()) { + if (!getRemainingDrivingDistanceVisibility() + .equals(other.getRemainingDrivingDistanceVisibility())) return false; + } + if (hasRemainingStopCountVisibility() != other.hasRemainingStopCountVisibility()) return false; + if (hasRemainingStopCountVisibility()) { + if (!getRemainingStopCountVisibility().equals(other.getRemainingStopCountVisibility())) + return false; + } + if (hasVehicleLocationVisibility() != other.hasVehicleLocationVisibility()) return false; + if (hasVehicleLocationVisibility()) { + if (!getVehicleLocationVisibility().equals(other.getVehicleLocationVisibility())) + 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 (hasRoutePolylinePointsVisibility()) { + hash = (37 * hash) + ROUTE_POLYLINE_POINTS_VISIBILITY_FIELD_NUMBER; + hash = (53 * hash) + getRoutePolylinePointsVisibility().hashCode(); + } + if (hasEstimatedArrivalTimeVisibility()) { + hash = (37 * hash) + ESTIMATED_ARRIVAL_TIME_VISIBILITY_FIELD_NUMBER; + hash = (53 * hash) + getEstimatedArrivalTimeVisibility().hashCode(); + } + if (hasEstimatedTaskCompletionTimeVisibility()) { + hash = (37 * hash) + ESTIMATED_TASK_COMPLETION_TIME_VISIBILITY_FIELD_NUMBER; + hash = (53 * hash) + getEstimatedTaskCompletionTimeVisibility().hashCode(); + } + if (hasRemainingDrivingDistanceVisibility()) { + hash = (37 * hash) + REMAINING_DRIVING_DISTANCE_VISIBILITY_FIELD_NUMBER; + hash = (53 * hash) + getRemainingDrivingDistanceVisibility().hashCode(); + } + if (hasRemainingStopCountVisibility()) { + hash = (37 * hash) + REMAINING_STOP_COUNT_VISIBILITY_FIELD_NUMBER; + hash = (53 * hash) + getRemainingStopCountVisibility().hashCode(); + } + if (hasVehicleLocationVisibility()) { + hash = (37 * hash) + VEHICLE_LOCATION_VISIBILITY_FIELD_NUMBER; + hash = (53 * hash) + getVehicleLocationVisibility().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig 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 google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig 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 google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig 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( + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig 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 configuration message that defines when a data element of a Task should
+   * be visible to the end users.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.TaskTrackingViewConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.delivery.v1.TaskTrackingViewConfig) + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.Tasks + .internal_static_maps_fleetengine_delivery_v1_TaskTrackingViewConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.Tasks + .internal_static_maps_fleetengine_delivery_v1_TaskTrackingViewConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.class, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.Builder.class); + } + + // Construct using google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + routePolylinePointsVisibility_ = null; + if (routePolylinePointsVisibilityBuilder_ != null) { + routePolylinePointsVisibilityBuilder_.dispose(); + routePolylinePointsVisibilityBuilder_ = null; + } + estimatedArrivalTimeVisibility_ = null; + if (estimatedArrivalTimeVisibilityBuilder_ != null) { + estimatedArrivalTimeVisibilityBuilder_.dispose(); + estimatedArrivalTimeVisibilityBuilder_ = null; + } + estimatedTaskCompletionTimeVisibility_ = null; + if (estimatedTaskCompletionTimeVisibilityBuilder_ != null) { + estimatedTaskCompletionTimeVisibilityBuilder_.dispose(); + estimatedTaskCompletionTimeVisibilityBuilder_ = null; + } + remainingDrivingDistanceVisibility_ = null; + if (remainingDrivingDistanceVisibilityBuilder_ != null) { + remainingDrivingDistanceVisibilityBuilder_.dispose(); + remainingDrivingDistanceVisibilityBuilder_ = null; + } + remainingStopCountVisibility_ = null; + if (remainingStopCountVisibilityBuilder_ != null) { + remainingStopCountVisibilityBuilder_.dispose(); + remainingStopCountVisibilityBuilder_ = null; + } + vehicleLocationVisibility_ = null; + if (vehicleLocationVisibilityBuilder_ != null) { + vehicleLocationVisibilityBuilder_.dispose(); + vehicleLocationVisibilityBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return google.maps.fleetengine.delivery.v1.Tasks + .internal_static_maps_fleetengine_delivery_v1_TaskTrackingViewConfig_descriptor; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig getDefaultInstanceForType() { + return google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.getDefaultInstance(); + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig build() { + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig buildPartial() { + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig result = + new google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.routePolylinePointsVisibility_ = + routePolylinePointsVisibilityBuilder_ == null + ? routePolylinePointsVisibility_ + : routePolylinePointsVisibilityBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.estimatedArrivalTimeVisibility_ = + estimatedArrivalTimeVisibilityBuilder_ == null + ? estimatedArrivalTimeVisibility_ + : estimatedArrivalTimeVisibilityBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.estimatedTaskCompletionTimeVisibility_ = + estimatedTaskCompletionTimeVisibilityBuilder_ == null + ? estimatedTaskCompletionTimeVisibility_ + : estimatedTaskCompletionTimeVisibilityBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.remainingDrivingDistanceVisibility_ = + remainingDrivingDistanceVisibilityBuilder_ == null + ? remainingDrivingDistanceVisibility_ + : remainingDrivingDistanceVisibilityBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.remainingStopCountVisibility_ = + remainingStopCountVisibilityBuilder_ == null + ? remainingStopCountVisibility_ + : remainingStopCountVisibilityBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.vehicleLocationVisibility_ = + vehicleLocationVisibilityBuilder_ == null + ? vehicleLocationVisibility_ + : vehicleLocationVisibilityBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig) { + return mergeFrom((google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig other) { + if (other == google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.getDefaultInstance()) + return this; + if (other.hasRoutePolylinePointsVisibility()) { + mergeRoutePolylinePointsVisibility(other.getRoutePolylinePointsVisibility()); + } + if (other.hasEstimatedArrivalTimeVisibility()) { + mergeEstimatedArrivalTimeVisibility(other.getEstimatedArrivalTimeVisibility()); + } + if (other.hasEstimatedTaskCompletionTimeVisibility()) { + mergeEstimatedTaskCompletionTimeVisibility( + other.getEstimatedTaskCompletionTimeVisibility()); + } + if (other.hasRemainingDrivingDistanceVisibility()) { + mergeRemainingDrivingDistanceVisibility(other.getRemainingDrivingDistanceVisibility()); + } + if (other.hasRemainingStopCountVisibility()) { + mergeRemainingStopCountVisibility(other.getRemainingStopCountVisibility()); + } + if (other.hasVehicleLocationVisibility()) { + mergeVehicleLocationVisibility(other.getVehicleLocationVisibility()); + } + 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( + getRoutePolylinePointsVisibilityFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + getEstimatedArrivalTimeVisibilityFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + getEstimatedTaskCompletionTimeVisibilityFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + getRemainingDrivingDistanceVisibilityFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage( + getRemainingStopCountVisibilityFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage( + getVehicleLocationVisibilityFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + routePolylinePointsVisibility_; + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption.Builder, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOptionOrBuilder> + routePolylinePointsVisibilityBuilder_; + /** + * + * + *
+     * The field that specifies when route polyline points can be visible. If this
+     * field is not specified, the project level default visibility configuration
+     * for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption route_polyline_points_visibility = 1; + * + * + * @return Whether the routePolylinePointsVisibility field is set. + */ + public boolean hasRoutePolylinePointsVisibility() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The field that specifies when route polyline points can be visible. If this
+     * field is not specified, the project level default visibility configuration
+     * for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption route_polyline_points_visibility = 1; + * + * + * @return The routePolylinePointsVisibility. + */ + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + getRoutePolylinePointsVisibility() { + if (routePolylinePointsVisibilityBuilder_ == null) { + return routePolylinePointsVisibility_ == null + ? google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + .getDefaultInstance() + : routePolylinePointsVisibility_; + } else { + return routePolylinePointsVisibilityBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The field that specifies when route polyline points can be visible. If this
+     * field is not specified, the project level default visibility configuration
+     * for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption route_polyline_points_visibility = 1; + * + */ + public Builder setRoutePolylinePointsVisibility( + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption value) { + if (routePolylinePointsVisibilityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + routePolylinePointsVisibility_ = value; + } else { + routePolylinePointsVisibilityBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The field that specifies when route polyline points can be visible. If this
+     * field is not specified, the project level default visibility configuration
+     * for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption route_polyline_points_visibility = 1; + * + */ + public Builder setRoutePolylinePointsVisibility( + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption.Builder + builderForValue) { + if (routePolylinePointsVisibilityBuilder_ == null) { + routePolylinePointsVisibility_ = builderForValue.build(); + } else { + routePolylinePointsVisibilityBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The field that specifies when route polyline points can be visible. If this
+     * field is not specified, the project level default visibility configuration
+     * for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption route_polyline_points_visibility = 1; + * + */ + public Builder mergeRoutePolylinePointsVisibility( + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption value) { + if (routePolylinePointsVisibilityBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && routePolylinePointsVisibility_ != null + && routePolylinePointsVisibility_ + != google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + .getDefaultInstance()) { + getRoutePolylinePointsVisibilityBuilder().mergeFrom(value); + } else { + routePolylinePointsVisibility_ = value; + } + } else { + routePolylinePointsVisibilityBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The field that specifies when route polyline points can be visible. If this
+     * field is not specified, the project level default visibility configuration
+     * for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption route_polyline_points_visibility = 1; + * + */ + public Builder clearRoutePolylinePointsVisibility() { + bitField0_ = (bitField0_ & ~0x00000001); + routePolylinePointsVisibility_ = null; + if (routePolylinePointsVisibilityBuilder_ != null) { + routePolylinePointsVisibilityBuilder_.dispose(); + routePolylinePointsVisibilityBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The field that specifies when route polyline points can be visible. If this
+     * field is not specified, the project level default visibility configuration
+     * for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption route_polyline_points_visibility = 1; + * + */ + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption.Builder + getRoutePolylinePointsVisibilityBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getRoutePolylinePointsVisibilityFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The field that specifies when route polyline points can be visible. If this
+     * field is not specified, the project level default visibility configuration
+     * for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption route_polyline_points_visibility = 1; + * + */ + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOptionOrBuilder + getRoutePolylinePointsVisibilityOrBuilder() { + if (routePolylinePointsVisibilityBuilder_ != null) { + return routePolylinePointsVisibilityBuilder_.getMessageOrBuilder(); + } else { + return routePolylinePointsVisibility_ == null + ? google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + .getDefaultInstance() + : routePolylinePointsVisibility_; + } + } + /** + * + * + *
+     * The field that specifies when route polyline points can be visible. If this
+     * field is not specified, the project level default visibility configuration
+     * for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption route_polyline_points_visibility = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption.Builder, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOptionOrBuilder> + getRoutePolylinePointsVisibilityFieldBuilder() { + if (routePolylinePointsVisibilityBuilder_ == null) { + routePolylinePointsVisibilityBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption.Builder, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig + .VisibilityOptionOrBuilder>( + getRoutePolylinePointsVisibility(), getParentForChildren(), isClean()); + routePolylinePointsVisibility_ = null; + } + return routePolylinePointsVisibilityBuilder_; + } + + private google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + estimatedArrivalTimeVisibility_; + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption.Builder, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOptionOrBuilder> + estimatedArrivalTimeVisibilityBuilder_; + /** + * + * + *
+     * The field that specifies when estimated arrival time can be visible. If
+     * this field is not specified, the project level default visibility
+     * configuration for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_arrival_time_visibility = 2; + * + * + * @return Whether the estimatedArrivalTimeVisibility field is set. + */ + public boolean hasEstimatedArrivalTimeVisibility() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The field that specifies when estimated arrival time can be visible. If
+     * this field is not specified, the project level default visibility
+     * configuration for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_arrival_time_visibility = 2; + * + * + * @return The estimatedArrivalTimeVisibility. + */ + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + getEstimatedArrivalTimeVisibility() { + if (estimatedArrivalTimeVisibilityBuilder_ == null) { + return estimatedArrivalTimeVisibility_ == null + ? google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + .getDefaultInstance() + : estimatedArrivalTimeVisibility_; + } else { + return estimatedArrivalTimeVisibilityBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The field that specifies when estimated arrival time can be visible. If
+     * this field is not specified, the project level default visibility
+     * configuration for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_arrival_time_visibility = 2; + * + */ + public Builder setEstimatedArrivalTimeVisibility( + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption value) { + if (estimatedArrivalTimeVisibilityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + estimatedArrivalTimeVisibility_ = value; + } else { + estimatedArrivalTimeVisibilityBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The field that specifies when estimated arrival time can be visible. If
+     * this field is not specified, the project level default visibility
+     * configuration for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_arrival_time_visibility = 2; + * + */ + public Builder setEstimatedArrivalTimeVisibility( + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption.Builder + builderForValue) { + if (estimatedArrivalTimeVisibilityBuilder_ == null) { + estimatedArrivalTimeVisibility_ = builderForValue.build(); + } else { + estimatedArrivalTimeVisibilityBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The field that specifies when estimated arrival time can be visible. If
+     * this field is not specified, the project level default visibility
+     * configuration for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_arrival_time_visibility = 2; + * + */ + public Builder mergeEstimatedArrivalTimeVisibility( + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption value) { + if (estimatedArrivalTimeVisibilityBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && estimatedArrivalTimeVisibility_ != null + && estimatedArrivalTimeVisibility_ + != google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + .getDefaultInstance()) { + getEstimatedArrivalTimeVisibilityBuilder().mergeFrom(value); + } else { + estimatedArrivalTimeVisibility_ = value; + } + } else { + estimatedArrivalTimeVisibilityBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The field that specifies when estimated arrival time can be visible. If
+     * this field is not specified, the project level default visibility
+     * configuration for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_arrival_time_visibility = 2; + * + */ + public Builder clearEstimatedArrivalTimeVisibility() { + bitField0_ = (bitField0_ & ~0x00000002); + estimatedArrivalTimeVisibility_ = null; + if (estimatedArrivalTimeVisibilityBuilder_ != null) { + estimatedArrivalTimeVisibilityBuilder_.dispose(); + estimatedArrivalTimeVisibilityBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The field that specifies when estimated arrival time can be visible. If
+     * this field is not specified, the project level default visibility
+     * configuration for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_arrival_time_visibility = 2; + * + */ + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption.Builder + getEstimatedArrivalTimeVisibilityBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getEstimatedArrivalTimeVisibilityFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The field that specifies when estimated arrival time can be visible. If
+     * this field is not specified, the project level default visibility
+     * configuration for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_arrival_time_visibility = 2; + * + */ + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOptionOrBuilder + getEstimatedArrivalTimeVisibilityOrBuilder() { + if (estimatedArrivalTimeVisibilityBuilder_ != null) { + return estimatedArrivalTimeVisibilityBuilder_.getMessageOrBuilder(); + } else { + return estimatedArrivalTimeVisibility_ == null + ? google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + .getDefaultInstance() + : estimatedArrivalTimeVisibility_; + } + } + /** + * + * + *
+     * The field that specifies when estimated arrival time can be visible. If
+     * this field is not specified, the project level default visibility
+     * configuration for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_arrival_time_visibility = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption.Builder, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOptionOrBuilder> + getEstimatedArrivalTimeVisibilityFieldBuilder() { + if (estimatedArrivalTimeVisibilityBuilder_ == null) { + estimatedArrivalTimeVisibilityBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption.Builder, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig + .VisibilityOptionOrBuilder>( + getEstimatedArrivalTimeVisibility(), getParentForChildren(), isClean()); + estimatedArrivalTimeVisibility_ = null; + } + return estimatedArrivalTimeVisibilityBuilder_; + } + + private google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + estimatedTaskCompletionTimeVisibility_; + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption.Builder, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOptionOrBuilder> + estimatedTaskCompletionTimeVisibilityBuilder_; + /** + * + * + *
+     * The field that specifies when estimated task completion time can be
+     * visible. If this field is not specified, the project level default
+     * visibility configuration for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_task_completion_time_visibility = 3; + * + * + * @return Whether the estimatedTaskCompletionTimeVisibility field is set. + */ + public boolean hasEstimatedTaskCompletionTimeVisibility() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * The field that specifies when estimated task completion time can be
+     * visible. If this field is not specified, the project level default
+     * visibility configuration for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_task_completion_time_visibility = 3; + * + * + * @return The estimatedTaskCompletionTimeVisibility. + */ + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + getEstimatedTaskCompletionTimeVisibility() { + if (estimatedTaskCompletionTimeVisibilityBuilder_ == null) { + return estimatedTaskCompletionTimeVisibility_ == null + ? google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + .getDefaultInstance() + : estimatedTaskCompletionTimeVisibility_; + } else { + return estimatedTaskCompletionTimeVisibilityBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The field that specifies when estimated task completion time can be
+     * visible. If this field is not specified, the project level default
+     * visibility configuration for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_task_completion_time_visibility = 3; + * + */ + public Builder setEstimatedTaskCompletionTimeVisibility( + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption value) { + if (estimatedTaskCompletionTimeVisibilityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + estimatedTaskCompletionTimeVisibility_ = value; + } else { + estimatedTaskCompletionTimeVisibilityBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The field that specifies when estimated task completion time can be
+     * visible. If this field is not specified, the project level default
+     * visibility configuration for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_task_completion_time_visibility = 3; + * + */ + public Builder setEstimatedTaskCompletionTimeVisibility( + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption.Builder + builderForValue) { + if (estimatedTaskCompletionTimeVisibilityBuilder_ == null) { + estimatedTaskCompletionTimeVisibility_ = builderForValue.build(); + } else { + estimatedTaskCompletionTimeVisibilityBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The field that specifies when estimated task completion time can be
+     * visible. If this field is not specified, the project level default
+     * visibility configuration for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_task_completion_time_visibility = 3; + * + */ + public Builder mergeEstimatedTaskCompletionTimeVisibility( + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption value) { + if (estimatedTaskCompletionTimeVisibilityBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && estimatedTaskCompletionTimeVisibility_ != null + && estimatedTaskCompletionTimeVisibility_ + != google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + .getDefaultInstance()) { + getEstimatedTaskCompletionTimeVisibilityBuilder().mergeFrom(value); + } else { + estimatedTaskCompletionTimeVisibility_ = value; + } + } else { + estimatedTaskCompletionTimeVisibilityBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The field that specifies when estimated task completion time can be
+     * visible. If this field is not specified, the project level default
+     * visibility configuration for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_task_completion_time_visibility = 3; + * + */ + public Builder clearEstimatedTaskCompletionTimeVisibility() { + bitField0_ = (bitField0_ & ~0x00000004); + estimatedTaskCompletionTimeVisibility_ = null; + if (estimatedTaskCompletionTimeVisibilityBuilder_ != null) { + estimatedTaskCompletionTimeVisibilityBuilder_.dispose(); + estimatedTaskCompletionTimeVisibilityBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The field that specifies when estimated task completion time can be
+     * visible. If this field is not specified, the project level default
+     * visibility configuration for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_task_completion_time_visibility = 3; + * + */ + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption.Builder + getEstimatedTaskCompletionTimeVisibilityBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getEstimatedTaskCompletionTimeVisibilityFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The field that specifies when estimated task completion time can be
+     * visible. If this field is not specified, the project level default
+     * visibility configuration for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_task_completion_time_visibility = 3; + * + */ + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOptionOrBuilder + getEstimatedTaskCompletionTimeVisibilityOrBuilder() { + if (estimatedTaskCompletionTimeVisibilityBuilder_ != null) { + return estimatedTaskCompletionTimeVisibilityBuilder_.getMessageOrBuilder(); + } else { + return estimatedTaskCompletionTimeVisibility_ == null + ? google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + .getDefaultInstance() + : estimatedTaskCompletionTimeVisibility_; + } + } + /** + * + * + *
+     * The field that specifies when estimated task completion time can be
+     * visible. If this field is not specified, the project level default
+     * visibility configuration for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_task_completion_time_visibility = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption.Builder, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOptionOrBuilder> + getEstimatedTaskCompletionTimeVisibilityFieldBuilder() { + if (estimatedTaskCompletionTimeVisibilityBuilder_ == null) { + estimatedTaskCompletionTimeVisibilityBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption.Builder, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig + .VisibilityOptionOrBuilder>( + getEstimatedTaskCompletionTimeVisibility(), getParentForChildren(), isClean()); + estimatedTaskCompletionTimeVisibility_ = null; + } + return estimatedTaskCompletionTimeVisibilityBuilder_; + } + + private google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + remainingDrivingDistanceVisibility_; + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption.Builder, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOptionOrBuilder> + remainingDrivingDistanceVisibilityBuilder_; + /** + * + * + *
+     * The field that specifies when remaining driving distance can be visible. If
+     * this field is not specified, the project level default visibility
+     * configuration for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_driving_distance_visibility = 4; + * + * + * @return Whether the remainingDrivingDistanceVisibility field is set. + */ + public boolean hasRemainingDrivingDistanceVisibility() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * The field that specifies when remaining driving distance can be visible. If
+     * this field is not specified, the project level default visibility
+     * configuration for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_driving_distance_visibility = 4; + * + * + * @return The remainingDrivingDistanceVisibility. + */ + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + getRemainingDrivingDistanceVisibility() { + if (remainingDrivingDistanceVisibilityBuilder_ == null) { + return remainingDrivingDistanceVisibility_ == null + ? google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + .getDefaultInstance() + : remainingDrivingDistanceVisibility_; + } else { + return remainingDrivingDistanceVisibilityBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The field that specifies when remaining driving distance can be visible. If
+     * this field is not specified, the project level default visibility
+     * configuration for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_driving_distance_visibility = 4; + * + */ + public Builder setRemainingDrivingDistanceVisibility( + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption value) { + if (remainingDrivingDistanceVisibilityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + remainingDrivingDistanceVisibility_ = value; + } else { + remainingDrivingDistanceVisibilityBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The field that specifies when remaining driving distance can be visible. If
+     * this field is not specified, the project level default visibility
+     * configuration for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_driving_distance_visibility = 4; + * + */ + public Builder setRemainingDrivingDistanceVisibility( + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption.Builder + builderForValue) { + if (remainingDrivingDistanceVisibilityBuilder_ == null) { + remainingDrivingDistanceVisibility_ = builderForValue.build(); + } else { + remainingDrivingDistanceVisibilityBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The field that specifies when remaining driving distance can be visible. If
+     * this field is not specified, the project level default visibility
+     * configuration for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_driving_distance_visibility = 4; + * + */ + public Builder mergeRemainingDrivingDistanceVisibility( + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption value) { + if (remainingDrivingDistanceVisibilityBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && remainingDrivingDistanceVisibility_ != null + && remainingDrivingDistanceVisibility_ + != google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + .getDefaultInstance()) { + getRemainingDrivingDistanceVisibilityBuilder().mergeFrom(value); + } else { + remainingDrivingDistanceVisibility_ = value; + } + } else { + remainingDrivingDistanceVisibilityBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The field that specifies when remaining driving distance can be visible. If
+     * this field is not specified, the project level default visibility
+     * configuration for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_driving_distance_visibility = 4; + * + */ + public Builder clearRemainingDrivingDistanceVisibility() { + bitField0_ = (bitField0_ & ~0x00000008); + remainingDrivingDistanceVisibility_ = null; + if (remainingDrivingDistanceVisibilityBuilder_ != null) { + remainingDrivingDistanceVisibilityBuilder_.dispose(); + remainingDrivingDistanceVisibilityBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The field that specifies when remaining driving distance can be visible. If
+     * this field is not specified, the project level default visibility
+     * configuration for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_driving_distance_visibility = 4; + * + */ + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption.Builder + getRemainingDrivingDistanceVisibilityBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getRemainingDrivingDistanceVisibilityFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The field that specifies when remaining driving distance can be visible. If
+     * this field is not specified, the project level default visibility
+     * configuration for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_driving_distance_visibility = 4; + * + */ + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOptionOrBuilder + getRemainingDrivingDistanceVisibilityOrBuilder() { + if (remainingDrivingDistanceVisibilityBuilder_ != null) { + return remainingDrivingDistanceVisibilityBuilder_.getMessageOrBuilder(); + } else { + return remainingDrivingDistanceVisibility_ == null + ? google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + .getDefaultInstance() + : remainingDrivingDistanceVisibility_; + } + } + /** + * + * + *
+     * The field that specifies when remaining driving distance can be visible. If
+     * this field is not specified, the project level default visibility
+     * configuration for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_driving_distance_visibility = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption.Builder, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOptionOrBuilder> + getRemainingDrivingDistanceVisibilityFieldBuilder() { + if (remainingDrivingDistanceVisibilityBuilder_ == null) { + remainingDrivingDistanceVisibilityBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption.Builder, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig + .VisibilityOptionOrBuilder>( + getRemainingDrivingDistanceVisibility(), getParentForChildren(), isClean()); + remainingDrivingDistanceVisibility_ = null; + } + return remainingDrivingDistanceVisibilityBuilder_; + } + + private google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + remainingStopCountVisibility_; + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption.Builder, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOptionOrBuilder> + remainingStopCountVisibilityBuilder_; + /** + * + * + *
+     * The field that specifies when remaining stop count can be visible. If this
+     * field is not specified, the project level default visibility configuration
+     * for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_stop_count_visibility = 5; + * + * + * @return Whether the remainingStopCountVisibility field is set. + */ + public boolean hasRemainingStopCountVisibility() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * The field that specifies when remaining stop count can be visible. If this
+     * field is not specified, the project level default visibility configuration
+     * for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_stop_count_visibility = 5; + * + * + * @return The remainingStopCountVisibility. + */ + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + getRemainingStopCountVisibility() { + if (remainingStopCountVisibilityBuilder_ == null) { + return remainingStopCountVisibility_ == null + ? google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + .getDefaultInstance() + : remainingStopCountVisibility_; + } else { + return remainingStopCountVisibilityBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The field that specifies when remaining stop count can be visible. If this
+     * field is not specified, the project level default visibility configuration
+     * for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_stop_count_visibility = 5; + * + */ + public Builder setRemainingStopCountVisibility( + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption value) { + if (remainingStopCountVisibilityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + remainingStopCountVisibility_ = value; + } else { + remainingStopCountVisibilityBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The field that specifies when remaining stop count can be visible. If this
+     * field is not specified, the project level default visibility configuration
+     * for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_stop_count_visibility = 5; + * + */ + public Builder setRemainingStopCountVisibility( + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption.Builder + builderForValue) { + if (remainingStopCountVisibilityBuilder_ == null) { + remainingStopCountVisibility_ = builderForValue.build(); + } else { + remainingStopCountVisibilityBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The field that specifies when remaining stop count can be visible. If this
+     * field is not specified, the project level default visibility configuration
+     * for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_stop_count_visibility = 5; + * + */ + public Builder mergeRemainingStopCountVisibility( + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption value) { + if (remainingStopCountVisibilityBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && remainingStopCountVisibility_ != null + && remainingStopCountVisibility_ + != google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + .getDefaultInstance()) { + getRemainingStopCountVisibilityBuilder().mergeFrom(value); + } else { + remainingStopCountVisibility_ = value; + } + } else { + remainingStopCountVisibilityBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The field that specifies when remaining stop count can be visible. If this
+     * field is not specified, the project level default visibility configuration
+     * for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_stop_count_visibility = 5; + * + */ + public Builder clearRemainingStopCountVisibility() { + bitField0_ = (bitField0_ & ~0x00000010); + remainingStopCountVisibility_ = null; + if (remainingStopCountVisibilityBuilder_ != null) { + remainingStopCountVisibilityBuilder_.dispose(); + remainingStopCountVisibilityBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The field that specifies when remaining stop count can be visible. If this
+     * field is not specified, the project level default visibility configuration
+     * for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_stop_count_visibility = 5; + * + */ + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption.Builder + getRemainingStopCountVisibilityBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getRemainingStopCountVisibilityFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The field that specifies when remaining stop count can be visible. If this
+     * field is not specified, the project level default visibility configuration
+     * for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_stop_count_visibility = 5; + * + */ + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOptionOrBuilder + getRemainingStopCountVisibilityOrBuilder() { + if (remainingStopCountVisibilityBuilder_ != null) { + return remainingStopCountVisibilityBuilder_.getMessageOrBuilder(); + } else { + return remainingStopCountVisibility_ == null + ? google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + .getDefaultInstance() + : remainingStopCountVisibility_; + } + } + /** + * + * + *
+     * The field that specifies when remaining stop count can be visible. If this
+     * field is not specified, the project level default visibility configuration
+     * for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_stop_count_visibility = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption.Builder, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOptionOrBuilder> + getRemainingStopCountVisibilityFieldBuilder() { + if (remainingStopCountVisibilityBuilder_ == null) { + remainingStopCountVisibilityBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption.Builder, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig + .VisibilityOptionOrBuilder>( + getRemainingStopCountVisibility(), getParentForChildren(), isClean()); + remainingStopCountVisibility_ = null; + } + return remainingStopCountVisibilityBuilder_; + } + + private google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + vehicleLocationVisibility_; + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption.Builder, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOptionOrBuilder> + vehicleLocationVisibilityBuilder_; + /** + * + * + *
+     * The field that specifies when vehicle location can be visible. If this
+     * field is not specified, the project level default visibility configuration
+     * for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption vehicle_location_visibility = 6; + * + * + * @return Whether the vehicleLocationVisibility field is set. + */ + public boolean hasVehicleLocationVisibility() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * The field that specifies when vehicle location can be visible. If this
+     * field is not specified, the project level default visibility configuration
+     * for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption vehicle_location_visibility = 6; + * + * + * @return The vehicleLocationVisibility. + */ + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + getVehicleLocationVisibility() { + if (vehicleLocationVisibilityBuilder_ == null) { + return vehicleLocationVisibility_ == null + ? google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + .getDefaultInstance() + : vehicleLocationVisibility_; + } else { + return vehicleLocationVisibilityBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The field that specifies when vehicle location can be visible. If this
+     * field is not specified, the project level default visibility configuration
+     * for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption vehicle_location_visibility = 6; + * + */ + public Builder setVehicleLocationVisibility( + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption value) { + if (vehicleLocationVisibilityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + vehicleLocationVisibility_ = value; + } else { + vehicleLocationVisibilityBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The field that specifies when vehicle location can be visible. If this
+     * field is not specified, the project level default visibility configuration
+     * for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption vehicle_location_visibility = 6; + * + */ + public Builder setVehicleLocationVisibility( + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption.Builder + builderForValue) { + if (vehicleLocationVisibilityBuilder_ == null) { + vehicleLocationVisibility_ = builderForValue.build(); + } else { + vehicleLocationVisibilityBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The field that specifies when vehicle location can be visible. If this
+     * field is not specified, the project level default visibility configuration
+     * for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption vehicle_location_visibility = 6; + * + */ + public Builder mergeVehicleLocationVisibility( + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption value) { + if (vehicleLocationVisibilityBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && vehicleLocationVisibility_ != null + && vehicleLocationVisibility_ + != google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + .getDefaultInstance()) { + getVehicleLocationVisibilityBuilder().mergeFrom(value); + } else { + vehicleLocationVisibility_ = value; + } + } else { + vehicleLocationVisibilityBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The field that specifies when vehicle location can be visible. If this
+     * field is not specified, the project level default visibility configuration
+     * for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption vehicle_location_visibility = 6; + * + */ + public Builder clearVehicleLocationVisibility() { + bitField0_ = (bitField0_ & ~0x00000020); + vehicleLocationVisibility_ = null; + if (vehicleLocationVisibilityBuilder_ != null) { + vehicleLocationVisibilityBuilder_.dispose(); + vehicleLocationVisibilityBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The field that specifies when vehicle location can be visible. If this
+     * field is not specified, the project level default visibility configuration
+     * for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption vehicle_location_visibility = 6; + * + */ + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption.Builder + getVehicleLocationVisibilityBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getVehicleLocationVisibilityFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The field that specifies when vehicle location can be visible. If this
+     * field is not specified, the project level default visibility configuration
+     * for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption vehicle_location_visibility = 6; + * + */ + public google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOptionOrBuilder + getVehicleLocationVisibilityOrBuilder() { + if (vehicleLocationVisibilityBuilder_ != null) { + return vehicleLocationVisibilityBuilder_.getMessageOrBuilder(); + } else { + return vehicleLocationVisibility_ == null + ? google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + .getDefaultInstance() + : vehicleLocationVisibility_; + } + } + /** + * + * + *
+     * The field that specifies when vehicle location can be visible. If this
+     * field is not specified, the project level default visibility configuration
+     * for this data will be used.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption vehicle_location_visibility = 6; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption.Builder, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOptionOrBuilder> + getVehicleLocationVisibilityFieldBuilder() { + if (vehicleLocationVisibilityBuilder_ == null) { + vehicleLocationVisibilityBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption.Builder, + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig + .VisibilityOptionOrBuilder>( + getVehicleLocationVisibility(), getParentForChildren(), isClean()); + vehicleLocationVisibility_ = null; + } + return vehicleLocationVisibilityBuilder_; + } + + @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.delivery.v1.TaskTrackingViewConfig) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.delivery.v1.TaskTrackingViewConfig) + private static final google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig(); + } + + public static google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TaskTrackingViewConfig 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 google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/TaskTrackingViewConfigOrBuilder.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/TaskTrackingViewConfigOrBuilder.java new file mode 100644 index 000000000000..c515930e0770 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/TaskTrackingViewConfigOrBuilder.java @@ -0,0 +1,319 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/tasks.proto + +package google.maps.fleetengine.delivery.v1; + +public interface TaskTrackingViewConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.delivery.v1.TaskTrackingViewConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The field that specifies when route polyline points can be visible. If this
+   * field is not specified, the project level default visibility configuration
+   * for this data will be used.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption route_polyline_points_visibility = 1; + * + * + * @return Whether the routePolylinePointsVisibility field is set. + */ + boolean hasRoutePolylinePointsVisibility(); + /** + * + * + *
+   * The field that specifies when route polyline points can be visible. If this
+   * field is not specified, the project level default visibility configuration
+   * for this data will be used.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption route_polyline_points_visibility = 1; + * + * + * @return The routePolylinePointsVisibility. + */ + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + getRoutePolylinePointsVisibility(); + /** + * + * + *
+   * The field that specifies when route polyline points can be visible. If this
+   * field is not specified, the project level default visibility configuration
+   * for this data will be used.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption route_polyline_points_visibility = 1; + * + */ + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOptionOrBuilder + getRoutePolylinePointsVisibilityOrBuilder(); + + /** + * + * + *
+   * The field that specifies when estimated arrival time can be visible. If
+   * this field is not specified, the project level default visibility
+   * configuration for this data will be used.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_arrival_time_visibility = 2; + * + * + * @return Whether the estimatedArrivalTimeVisibility field is set. + */ + boolean hasEstimatedArrivalTimeVisibility(); + /** + * + * + *
+   * The field that specifies when estimated arrival time can be visible. If
+   * this field is not specified, the project level default visibility
+   * configuration for this data will be used.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_arrival_time_visibility = 2; + * + * + * @return The estimatedArrivalTimeVisibility. + */ + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + getEstimatedArrivalTimeVisibility(); + /** + * + * + *
+   * The field that specifies when estimated arrival time can be visible. If
+   * this field is not specified, the project level default visibility
+   * configuration for this data will be used.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_arrival_time_visibility = 2; + * + */ + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOptionOrBuilder + getEstimatedArrivalTimeVisibilityOrBuilder(); + + /** + * + * + *
+   * The field that specifies when estimated task completion time can be
+   * visible. If this field is not specified, the project level default
+   * visibility configuration for this data will be used.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_task_completion_time_visibility = 3; + * + * + * @return Whether the estimatedTaskCompletionTimeVisibility field is set. + */ + boolean hasEstimatedTaskCompletionTimeVisibility(); + /** + * + * + *
+   * The field that specifies when estimated task completion time can be
+   * visible. If this field is not specified, the project level default
+   * visibility configuration for this data will be used.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_task_completion_time_visibility = 3; + * + * + * @return The estimatedTaskCompletionTimeVisibility. + */ + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + getEstimatedTaskCompletionTimeVisibility(); + /** + * + * + *
+   * The field that specifies when estimated task completion time can be
+   * visible. If this field is not specified, the project level default
+   * visibility configuration for this data will be used.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_task_completion_time_visibility = 3; + * + */ + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOptionOrBuilder + getEstimatedTaskCompletionTimeVisibilityOrBuilder(); + + /** + * + * + *
+   * The field that specifies when remaining driving distance can be visible. If
+   * this field is not specified, the project level default visibility
+   * configuration for this data will be used.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_driving_distance_visibility = 4; + * + * + * @return Whether the remainingDrivingDistanceVisibility field is set. + */ + boolean hasRemainingDrivingDistanceVisibility(); + /** + * + * + *
+   * The field that specifies when remaining driving distance can be visible. If
+   * this field is not specified, the project level default visibility
+   * configuration for this data will be used.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_driving_distance_visibility = 4; + * + * + * @return The remainingDrivingDistanceVisibility. + */ + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + getRemainingDrivingDistanceVisibility(); + /** + * + * + *
+   * The field that specifies when remaining driving distance can be visible. If
+   * this field is not specified, the project level default visibility
+   * configuration for this data will be used.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_driving_distance_visibility = 4; + * + */ + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOptionOrBuilder + getRemainingDrivingDistanceVisibilityOrBuilder(); + + /** + * + * + *
+   * The field that specifies when remaining stop count can be visible. If this
+   * field is not specified, the project level default visibility configuration
+   * for this data will be used.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_stop_count_visibility = 5; + * + * + * @return Whether the remainingStopCountVisibility field is set. + */ + boolean hasRemainingStopCountVisibility(); + /** + * + * + *
+   * The field that specifies when remaining stop count can be visible. If this
+   * field is not specified, the project level default visibility configuration
+   * for this data will be used.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_stop_count_visibility = 5; + * + * + * @return The remainingStopCountVisibility. + */ + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + getRemainingStopCountVisibility(); + /** + * + * + *
+   * The field that specifies when remaining stop count can be visible. If this
+   * field is not specified, the project level default visibility configuration
+   * for this data will be used.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_stop_count_visibility = 5; + * + */ + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOptionOrBuilder + getRemainingStopCountVisibilityOrBuilder(); + + /** + * + * + *
+   * The field that specifies when vehicle location can be visible. If this
+   * field is not specified, the project level default visibility configuration
+   * for this data will be used.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption vehicle_location_visibility = 6; + * + * + * @return Whether the vehicleLocationVisibility field is set. + */ + boolean hasVehicleLocationVisibility(); + /** + * + * + *
+   * The field that specifies when vehicle location can be visible. If this
+   * field is not specified, the project level default visibility configuration
+   * for this data will be used.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption vehicle_location_visibility = 6; + * + * + * @return The vehicleLocationVisibility. + */ + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + getVehicleLocationVisibility(); + /** + * + * + *
+   * The field that specifies when vehicle location can be visible. If this
+   * field is not specified, the project level default visibility configuration
+   * for this data will be used.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption vehicle_location_visibility = 6; + * + */ + google.maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOptionOrBuilder + getVehicleLocationVisibilityOrBuilder(); +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/Tasks.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/Tasks.java new file mode 100644 index 000000000000..9df9e9e1578b --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/Tasks.java @@ -0,0 +1,217 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/tasks.proto + +package google.maps.fleetengine.delivery.v1; + +public final class Tasks { + private Tasks() {} + + 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_delivery_v1_Task_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_delivery_v1_Task_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_delivery_v1_Task_JourneySharingInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_delivery_v1_Task_JourneySharingInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_delivery_v1_TaskTrackingViewConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_delivery_v1_TaskTrackingViewConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_maps_fleetengine_delivery_v1_TaskTrackingViewConfig_VisibilityOption_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_maps_fleetengine_delivery_v1_TaskTrackingViewConfig_VisibilityOption_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/delivery/v1/ta" + + "sks.proto\022\034maps.fleetengine.delivery.v1\032" + + "\037google/api/field_behavior.proto\032\031google" + + "/api/resource.proto\0320google/maps/fleeten" + + "gine/delivery/v1/common.proto\032;google/ma" + + "ps/fleetengine/delivery/v1/delivery_vehi" + + "cles.proto\032\036google/protobuf/duration.pro" + + "to\032\037google/protobuf/timestamp.proto\"\272\014\n\004" + + "Task\022\014\n\004name\030\001 \001(\t\022<\n\004type\030\002 \001(\0162\'.maps." + + "fleetengine.delivery.v1.Task.TypeB\005\342A\002\002\005" + + "\022=\n\005state\030\003 \001(\0162(.maps.fleetengine.deliv" + + "ery.v1.Task.StateB\004\342A\001\002\022D\n\014task_outcome\030" + + "\t \001(\0162..maps.fleetengine.delivery.v1.Tas" + + "k.TaskOutcome\0225\n\021task_outcome_time\030\n \001(\013" + + "2\032.google.protobuf.Timestamp\022I\n\025task_out" + + "come_location\030\013 \001(\0132*.maps.fleetengine.d" + + "elivery.v1.LocationInfo\022b\n\034task_outcome_" + + "location_source\030\014 \001(\0162<.maps.fleetengine" + + ".delivery.v1.Task.TaskOutcomeLocationSou" + + "rce\022\031\n\013tracking_id\030\004 \001(\tB\004\342A\001\005\022!\n\023delive" + + "ry_vehicle_id\030\005 \001(\tB\004\342A\001\003\022J\n\020planned_loc" + + "ation\030\006 \001(\0132*.maps.fleetengine.delivery." + + "v1.LocationInfoB\004\342A\001\005\0227\n\rtask_duration\030\007" + + " \001(\0132\031.google.protobuf.DurationB\005\342A\002\002\005\022D" + + "\n\022target_time_window\030\016 \001(\0132(.maps.fleete" + + "ngine.delivery.v1.TimeWindow\022Y\n\024journey_" + + "sharing_info\030\010 \001(\01325.maps.fleetengine.de" + + "livery.v1.Task.JourneySharingInfoB\004\342A\001\003\022" + + "W\n\031task_tracking_view_config\030\r \001(\01324.map" + + "s.fleetengine.delivery.v1.TaskTrackingVi" + + "ewConfig\022?\n\nattributes\030\017 \003(\0132+.maps.flee" + + "tengine.delivery.v1.TaskAttribute\032\344\001\n\022Jo" + + "urneySharingInfo\022_\n\"remaining_vehicle_jo" + + "urney_segments\030\001 \003(\01323.maps.fleetengine." + + "delivery.v1.VehicleJourneySegment\022L\n\rlas" + + "t_location\030\002 \001(\01325.maps.fleetengine.deli" + + "very.v1.DeliveryVehicleLocation\022\037\n\027last_" + + "location_snappable\030\003 \001(\010\"[\n\004Type\022\024\n\020TYPE" + + "_UNSPECIFIED\020\000\022\n\n\006PICKUP\020\001\022\014\n\010DELIVERY\020\002" + + "\022\022\n\016SCHEDULED_STOP\020\003\022\017\n\013UNAVAILABLE\020\004\"4\n" + + "\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\010\n\004OPEN\020\001\022" + + "\n\n\006CLOSED\020\002\"F\n\013TaskOutcome\022\034\n\030TASK_OUTCO" + + "ME_UNSPECIFIED\020\000\022\r\n\tSUCCEEDED\020\001\022\n\n\006FAILE" + + "D\020\002\"r\n\031TaskOutcomeLocationSource\022,\n(TASK" + + "_OUTCOME_LOCATION_SOURCE_UNSPECIFIED\020\000\022\014" + + "\n\010PROVIDER\020\002\022\031\n\025LAST_VEHICLE_LOCATION\020\003:" + + "G\352AD\n\037fleetengine.googleapis.com/Task\022!p" + + "roviders/{provider}/tasks/{task}\"\313\007\n\026Tas" + + "kTrackingViewConfig\022o\n route_polyline_po" + + "ints_visibility\030\001 \001(\0132E.maps.fleetengine" + + ".delivery.v1.TaskTrackingViewConfig.Visi" + + "bilityOption\022p\n!estimated_arrival_time_v" + + "isibility\030\002 \001(\0132E.maps.fleetengine.deliv" + + "ery.v1.TaskTrackingViewConfig.Visibility" + + "Option\022x\n)estimated_task_completion_time" + + "_visibility\030\003 \001(\0132E.maps.fleetengine.del" + + "ivery.v1.TaskTrackingViewConfig.Visibili" + + "tyOption\022t\n%remaining_driving_distance_v" + + "isibility\030\004 \001(\0132E.maps.fleetengine.deliv" + + "ery.v1.TaskTrackingViewConfig.Visibility" + + "Option\022n\n\037remaining_stop_count_visibilit" + + "y\030\005 \001(\0132E.maps.fleetengine.delivery.v1.T" + + "askTrackingViewConfig.VisibilityOption\022j" + + "\n\033vehicle_location_visibility\030\006 \001(\0132E.ma" + + "ps.fleetengine.delivery.v1.TaskTrackingV" + + "iewConfig.VisibilityOption\032\201\002\n\020Visibilit" + + "yOption\022(\n\036remaining_stop_count_threshol" + + "d\030\001 \001(\005H\000\022T\n/duration_until_estimated_ar" + + "rival_time_threshold\030\002 \001(\0132\031.google.prot" + + "obuf.DurationH\000\0225\n+remaining_driving_dis" + + "tance_meters_threshold\030\003 \001(\005H\000\022\020\n\006always" + + "\030\004 \001(\010H\000\022\017\n\005never\030\005 \001(\010H\000B\023\n\021visibility_" + + "optionB\246\001\n#google.maps.fleetengine.deliv" + + "ery.v1B\005TasksP\001ZIcloud.google.com/go/map" + + "s/fleetengine/delivery/apiv1/deliverypb;" + + "deliverypb\242\002\004CFED\252\002#Google.Maps.FleetEng" + + "ine.Delivery.V1b\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(), + google.maps.fleetengine.delivery.v1.Common.getDescriptor(), + google.maps.fleetengine.delivery.v1.DeliveryVehicles.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_maps_fleetengine_delivery_v1_Task_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_maps_fleetengine_delivery_v1_Task_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_delivery_v1_Task_descriptor, + new java.lang.String[] { + "Name", + "Type", + "State", + "TaskOutcome", + "TaskOutcomeTime", + "TaskOutcomeLocation", + "TaskOutcomeLocationSource", + "TrackingId", + "DeliveryVehicleId", + "PlannedLocation", + "TaskDuration", + "TargetTimeWindow", + "JourneySharingInfo", + "TaskTrackingViewConfig", + "Attributes", + }); + internal_static_maps_fleetengine_delivery_v1_Task_JourneySharingInfo_descriptor = + internal_static_maps_fleetengine_delivery_v1_Task_descriptor.getNestedTypes().get(0); + internal_static_maps_fleetengine_delivery_v1_Task_JourneySharingInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_delivery_v1_Task_JourneySharingInfo_descriptor, + new java.lang.String[] { + "RemainingVehicleJourneySegments", "LastLocation", "LastLocationSnappable", + }); + internal_static_maps_fleetengine_delivery_v1_TaskTrackingViewConfig_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_maps_fleetengine_delivery_v1_TaskTrackingViewConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_delivery_v1_TaskTrackingViewConfig_descriptor, + new java.lang.String[] { + "RoutePolylinePointsVisibility", + "EstimatedArrivalTimeVisibility", + "EstimatedTaskCompletionTimeVisibility", + "RemainingDrivingDistanceVisibility", + "RemainingStopCountVisibility", + "VehicleLocationVisibility", + }); + internal_static_maps_fleetengine_delivery_v1_TaskTrackingViewConfig_VisibilityOption_descriptor = + internal_static_maps_fleetengine_delivery_v1_TaskTrackingViewConfig_descriptor + .getNestedTypes() + .get(0); + internal_static_maps_fleetengine_delivery_v1_TaskTrackingViewConfig_VisibilityOption_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_maps_fleetengine_delivery_v1_TaskTrackingViewConfig_VisibilityOption_descriptor, + new java.lang.String[] { + "RemainingStopCountThreshold", + "DurationUntilEstimatedArrivalTimeThreshold", + "RemainingDrivingDistanceMetersThreshold", + "Always", + "Never", + "VisibilityOption", + }); + 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(); + google.maps.fleetengine.delivery.v1.Common.getDescriptor(); + google.maps.fleetengine.delivery.v1.DeliveryVehicles.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/TimeWindow.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/TimeWindow.java new file mode 100644 index 000000000000..e6c2f98d96f4 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/TimeWindow.java @@ -0,0 +1,973 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/common.proto + +package google.maps.fleetengine.delivery.v1; + +/** + * + * + *
+ * A time range.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.TimeWindow} + */ +public final class TimeWindow extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.delivery.v1.TimeWindow) + TimeWindowOrBuilder { + private static final long serialVersionUID = 0L; + // Use TimeWindow.newBuilder() to construct. + private TimeWindow(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TimeWindow() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TimeWindow(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.Common + .internal_static_maps_fleetengine_delivery_v1_TimeWindow_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.Common + .internal_static_maps_fleetengine_delivery_v1_TimeWindow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.TimeWindow.class, + google.maps.fleetengine.delivery.v1.TimeWindow.Builder.class); + } + + public static final int START_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * Required. The start time of the time window (inclusive).
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
+   * Required. The start time of the time window (inclusive).
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * Required. The start time of the time window (inclusive).
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * Required. The end time of the time window (inclusive).
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * Required. The end time of the time window (inclusive).
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * Required. The end time of the time window (inclusive).
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + 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 (startTime_ != null) { + output.writeMessage(1, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(2, getEndTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + 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 google.maps.fleetengine.delivery.v1.TimeWindow)) { + return super.equals(obj); + } + google.maps.fleetengine.delivery.v1.TimeWindow other = + (google.maps.fleetengine.delivery.v1.TimeWindow) obj; + + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) 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 (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.maps.fleetengine.delivery.v1.TimeWindow parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.TimeWindow parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.TimeWindow parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.TimeWindow parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.TimeWindow parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.TimeWindow parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.TimeWindow parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.TimeWindow 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 google.maps.fleetengine.delivery.v1.TimeWindow parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.TimeWindow 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 google.maps.fleetengine.delivery.v1.TimeWindow parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.TimeWindow 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(google.maps.fleetengine.delivery.v1.TimeWindow 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 time range.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.TimeWindow} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.delivery.v1.TimeWindow) + google.maps.fleetengine.delivery.v1.TimeWindowOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.Common + .internal_static_maps_fleetengine_delivery_v1_TimeWindow_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.Common + .internal_static_maps_fleetengine_delivery_v1_TimeWindow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.TimeWindow.class, + google.maps.fleetengine.delivery.v1.TimeWindow.Builder.class); + } + + // Construct using google.maps.fleetengine.delivery.v1.TimeWindow.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return google.maps.fleetengine.delivery.v1.Common + .internal_static_maps_fleetengine_delivery_v1_TimeWindow_descriptor; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TimeWindow getDefaultInstanceForType() { + return google.maps.fleetengine.delivery.v1.TimeWindow.getDefaultInstance(); + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TimeWindow build() { + google.maps.fleetengine.delivery.v1.TimeWindow result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TimeWindow buildPartial() { + google.maps.fleetengine.delivery.v1.TimeWindow result = + new google.maps.fleetengine.delivery.v1.TimeWindow(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(google.maps.fleetengine.delivery.v1.TimeWindow result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof google.maps.fleetengine.delivery.v1.TimeWindow) { + return mergeFrom((google.maps.fleetengine.delivery.v1.TimeWindow) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.maps.fleetengine.delivery.v1.TimeWindow other) { + if (other == google.maps.fleetengine.delivery.v1.TimeWindow.getDefaultInstance()) return this; + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + 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(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * Required. The start time of the time window (inclusive).
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. The start time of the time window (inclusive).
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The start time of the time window (inclusive).
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The start time of the time window (inclusive).
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The start time of the time window (inclusive).
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The start time of the time window (inclusive).
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000001); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The start time of the time window (inclusive).
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The start time of the time window (inclusive).
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * Required. The start time of the time window (inclusive).
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * Required. The end time of the time window (inclusive).
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The end time of the time window (inclusive).
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The end time of the time window (inclusive).
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The end time of the time window (inclusive).
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The end time of the time window (inclusive).
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The end time of the time window (inclusive).
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000002); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The end time of the time window (inclusive).
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The end time of the time window (inclusive).
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * Required. The end time of the time window (inclusive).
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + @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.delivery.v1.TimeWindow) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.delivery.v1.TimeWindow) + private static final google.maps.fleetengine.delivery.v1.TimeWindow DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new google.maps.fleetengine.delivery.v1.TimeWindow(); + } + + public static google.maps.fleetengine.delivery.v1.TimeWindow getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TimeWindow 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 google.maps.fleetengine.delivery.v1.TimeWindow getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/TimeWindowOrBuilder.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/TimeWindowOrBuilder.java new file mode 100644 index 000000000000..de9e496a83c6 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/TimeWindowOrBuilder.java @@ -0,0 +1,98 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/common.proto + +package google.maps.fleetengine.delivery.v1; + +public interface TimeWindowOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.delivery.v1.TimeWindow) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The start time of the time window (inclusive).
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * Required. The start time of the time window (inclusive).
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * Required. The start time of the time window (inclusive).
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * Required. The end time of the time window (inclusive).
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Required. The end time of the time window (inclusive).
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Required. The end time of the time window (inclusive).
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/UpdateDeliveryVehicleRequest.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/UpdateDeliveryVehicleRequest.java new file mode 100644 index 000000000000..7a792ad6cbc3 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/UpdateDeliveryVehicleRequest.java @@ -0,0 +1,1364 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_api.proto + +package google.maps.fleetengine.delivery.v1; + +/** + * + * + *
+ * The `UpdateDeliveryVehicle` request message.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest} + */ +public final class UpdateDeliveryVehicleRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest) + UpdateDeliveryVehicleRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateDeliveryVehicleRequest.newBuilder() to construct. + private UpdateDeliveryVehicleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateDeliveryVehicleRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateDeliveryVehicleRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_UpdateDeliveryVehicleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_UpdateDeliveryVehicleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest.class, + google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest.Builder.class); + } + + public static final int HEADER_FIELD_NUMBER = 1; + private google.maps.fleetengine.delivery.v1.DeliveryRequestHeader header_; + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the header field is set. + */ + @java.lang.Override + public boolean hasHeader() { + return header_ != null; + } + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The header. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader getHeader() { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance() + : header_; + } + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder getHeaderOrBuilder() { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance() + : header_; + } + + public static final int DELIVERY_VEHICLE_FIELD_NUMBER = 3; + private google.maps.fleetengine.delivery.v1.DeliveryVehicle deliveryVehicle_; + /** + * + * + *
+   * Required. The `DeliveryVehicle` entity update to apply.
+   * Note: You cannot update the name of the `DeliveryVehicle`.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the deliveryVehicle field is set. + */ + @java.lang.Override + public boolean hasDeliveryVehicle() { + return deliveryVehicle_ != null; + } + /** + * + * + *
+   * Required. The `DeliveryVehicle` entity update to apply.
+   * Note: You cannot update the name of the `DeliveryVehicle`.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The deliveryVehicle. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryVehicle getDeliveryVehicle() { + return deliveryVehicle_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryVehicle.getDefaultInstance() + : deliveryVehicle_; + } + /** + * + * + *
+   * Required. The `DeliveryVehicle` entity update to apply.
+   * Note: You cannot update the name of the `DeliveryVehicle`.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryVehicleOrBuilder + getDeliveryVehicleOrBuilder() { + return deliveryVehicle_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryVehicle.getDefaultInstance() + : deliveryVehicle_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 4; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. A field mask that indicates which `DeliveryVehicle` fields to
+   * update. Note that the update_mask must contain at least one field.
+   *
+   * This is a comma-separated list of fully qualified names of fields. Example:
+   * `"remaining_vehicle_journey_segments"`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. A field mask that indicates which `DeliveryVehicle` fields to
+   * update. Note that the update_mask must contain at least one field.
+   *
+   * This is a comma-separated list of fully qualified names of fields. Example:
+   * `"remaining_vehicle_journey_segments"`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.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 that indicates which `DeliveryVehicle` fields to
+   * update. Note that the update_mask must contain at least one field.
+   *
+   * This is a comma-separated list of fully qualified names of fields. Example:
+   * `"remaining_vehicle_journey_segments"`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.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 (header_ != null) { + output.writeMessage(1, getHeader()); + } + if (deliveryVehicle_ != null) { + output.writeMessage(3, getDeliveryVehicle()); + } + if (updateMask_ != null) { + output.writeMessage(4, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (header_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getHeader()); + } + if (deliveryVehicle_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDeliveryVehicle()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, 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 google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest)) { + return super.equals(obj); + } + google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest other = + (google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest) obj; + + if (hasHeader() != other.hasHeader()) return false; + if (hasHeader()) { + if (!getHeader().equals(other.getHeader())) return false; + } + if (hasDeliveryVehicle() != other.hasDeliveryVehicle()) return false; + if (hasDeliveryVehicle()) { + if (!getDeliveryVehicle().equals(other.getDeliveryVehicle())) 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(); + } + if (hasDeliveryVehicle()) { + hash = (37 * hash) + DELIVERY_VEHICLE_FIELD_NUMBER; + hash = (53 * hash) + getDeliveryVehicle().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 google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest 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 google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest 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 google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest 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( + google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest 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 `UpdateDeliveryVehicle` request message.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest) + google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_UpdateDeliveryVehicleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_UpdateDeliveryVehicleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest.class, + google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest.Builder.class); + } + + // Construct using google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + deliveryVehicle_ = null; + if (deliveryVehicleBuilder_ != null) { + deliveryVehicleBuilder_.dispose(); + deliveryVehicleBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_UpdateDeliveryVehicleRequest_descriptor; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest + getDefaultInstanceForType() { + return google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest.getDefaultInstance(); + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest build() { + google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest buildPartial() { + google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest result = + new google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.header_ = headerBuilder_ == null ? header_ : headerBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.deliveryVehicle_ = + deliveryVehicleBuilder_ == null ? deliveryVehicle_ : deliveryVehicleBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest) { + return mergeFrom((google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest other) { + if (other + == google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest.getDefaultInstance()) + return this; + if (other.hasHeader()) { + mergeHeader(other.getHeader()); + } + if (other.hasDeliveryVehicle()) { + mergeDeliveryVehicle(other.getDeliveryVehicle()); + } + 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: + { + input.readMessage(getDeliveryVehicleFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 34: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private google.maps.fleetengine.delivery.v1.DeliveryRequestHeader header_; + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder> + headerBuilder_; + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the header field is set. + */ + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The header. + */ + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader getHeader() { + if (headerBuilder_ == null) { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance() + : header_; + } else { + return headerBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHeader(google.maps.fleetengine.delivery.v1.DeliveryRequestHeader value) { + if (headerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + header_ = value; + } else { + headerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHeader( + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder builderForValue) { + if (headerBuilder_ == null) { + header_ = builderForValue.build(); + } else { + headerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeHeader(google.maps.fleetengine.delivery.v1.DeliveryRequestHeader value) { + if (headerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && header_ != null + && header_ + != google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance()) { + getHeaderBuilder().mergeFrom(value); + } else { + header_ = value; + } + } else { + headerBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearHeader() { + bitField0_ = (bitField0_ & ~0x00000001); + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder getHeaderBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getHeaderFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder getHeaderOrBuilder() { + if (headerBuilder_ != null) { + return headerBuilder_.getMessageOrBuilder(); + } else { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance() + : header_; + } + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder> + getHeaderFieldBuilder() { + if (headerBuilder_ == null) { + headerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder>( + getHeader(), getParentForChildren(), isClean()); + header_ = null; + } + return headerBuilder_; + } + + private google.maps.fleetengine.delivery.v1.DeliveryVehicle deliveryVehicle_; + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryVehicle, + google.maps.fleetengine.delivery.v1.DeliveryVehicle.Builder, + google.maps.fleetengine.delivery.v1.DeliveryVehicleOrBuilder> + deliveryVehicleBuilder_; + /** + * + * + *
+     * Required. The `DeliveryVehicle` entity update to apply.
+     * Note: You cannot update the name of the `DeliveryVehicle`.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the deliveryVehicle field is set. + */ + public boolean hasDeliveryVehicle() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The `DeliveryVehicle` entity update to apply.
+     * Note: You cannot update the name of the `DeliveryVehicle`.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The deliveryVehicle. + */ + public google.maps.fleetengine.delivery.v1.DeliveryVehicle getDeliveryVehicle() { + if (deliveryVehicleBuilder_ == null) { + return deliveryVehicle_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryVehicle.getDefaultInstance() + : deliveryVehicle_; + } else { + return deliveryVehicleBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The `DeliveryVehicle` entity update to apply.
+     * Note: You cannot update the name of the `DeliveryVehicle`.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDeliveryVehicle(google.maps.fleetengine.delivery.v1.DeliveryVehicle value) { + if (deliveryVehicleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deliveryVehicle_ = value; + } else { + deliveryVehicleBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The `DeliveryVehicle` entity update to apply.
+     * Note: You cannot update the name of the `DeliveryVehicle`.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDeliveryVehicle( + google.maps.fleetengine.delivery.v1.DeliveryVehicle.Builder builderForValue) { + if (deliveryVehicleBuilder_ == null) { + deliveryVehicle_ = builderForValue.build(); + } else { + deliveryVehicleBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The `DeliveryVehicle` entity update to apply.
+     * Note: You cannot update the name of the `DeliveryVehicle`.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDeliveryVehicle(google.maps.fleetengine.delivery.v1.DeliveryVehicle value) { + if (deliveryVehicleBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && deliveryVehicle_ != null + && deliveryVehicle_ + != google.maps.fleetengine.delivery.v1.DeliveryVehicle.getDefaultInstance()) { + getDeliveryVehicleBuilder().mergeFrom(value); + } else { + deliveryVehicle_ = value; + } + } else { + deliveryVehicleBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The `DeliveryVehicle` entity update to apply.
+     * Note: You cannot update the name of the `DeliveryVehicle`.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDeliveryVehicle() { + bitField0_ = (bitField0_ & ~0x00000002); + deliveryVehicle_ = null; + if (deliveryVehicleBuilder_ != null) { + deliveryVehicleBuilder_.dispose(); + deliveryVehicleBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The `DeliveryVehicle` entity update to apply.
+     * Note: You cannot update the name of the `DeliveryVehicle`.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public google.maps.fleetengine.delivery.v1.DeliveryVehicle.Builder getDeliveryVehicleBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getDeliveryVehicleFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The `DeliveryVehicle` entity update to apply.
+     * Note: You cannot update the name of the `DeliveryVehicle`.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public google.maps.fleetengine.delivery.v1.DeliveryVehicleOrBuilder + getDeliveryVehicleOrBuilder() { + if (deliveryVehicleBuilder_ != null) { + return deliveryVehicleBuilder_.getMessageOrBuilder(); + } else { + return deliveryVehicle_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryVehicle.getDefaultInstance() + : deliveryVehicle_; + } + } + /** + * + * + *
+     * Required. The `DeliveryVehicle` entity update to apply.
+     * Note: You cannot update the name of the `DeliveryVehicle`.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryVehicle, + google.maps.fleetengine.delivery.v1.DeliveryVehicle.Builder, + google.maps.fleetengine.delivery.v1.DeliveryVehicleOrBuilder> + getDeliveryVehicleFieldBuilder() { + if (deliveryVehicleBuilder_ == null) { + deliveryVehicleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryVehicle, + google.maps.fleetengine.delivery.v1.DeliveryVehicle.Builder, + google.maps.fleetengine.delivery.v1.DeliveryVehicleOrBuilder>( + getDeliveryVehicle(), getParentForChildren(), isClean()); + deliveryVehicle_ = null; + } + return deliveryVehicleBuilder_; + } + + 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 that indicates which `DeliveryVehicle` fields to
+     * update. Note that the update_mask must contain at least one field.
+     *
+     * This is a comma-separated list of fully qualified names of fields. Example:
+     * `"remaining_vehicle_journey_segments"`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. A field mask that indicates which `DeliveryVehicle` fields to
+     * update. Note that the update_mask must contain at least one field.
+     *
+     * This is a comma-separated list of fully qualified names of fields. Example:
+     * `"remaining_vehicle_journey_segments"`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.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 that indicates which `DeliveryVehicle` fields to
+     * update. Note that the update_mask must contain at least one field.
+     *
+     * This is a comma-separated list of fully qualified names of fields. Example:
+     * `"remaining_vehicle_journey_segments"`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.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_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A field mask that indicates which `DeliveryVehicle` fields to
+     * update. Note that the update_mask must contain at least one field.
+     *
+     * This is a comma-separated list of fully qualified names of fields. Example:
+     * `"remaining_vehicle_journey_segments"`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.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_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A field mask that indicates which `DeliveryVehicle` fields to
+     * update. Note that the update_mask must contain at least one field.
+     *
+     * This is a comma-separated list of fully qualified names of fields. Example:
+     * `"remaining_vehicle_journey_segments"`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A field mask that indicates which `DeliveryVehicle` fields to
+     * update. Note that the update_mask must contain at least one field.
+     *
+     * This is a comma-separated list of fully qualified names of fields. Example:
+     * `"remaining_vehicle_journey_segments"`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000004); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A field mask that indicates which `DeliveryVehicle` fields to
+     * update. Note that the update_mask must contain at least one field.
+     *
+     * This is a comma-separated list of fully qualified names of fields. Example:
+     * `"remaining_vehicle_journey_segments"`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. A field mask that indicates which `DeliveryVehicle` fields to
+     * update. Note that the update_mask must contain at least one field.
+     *
+     * This is a comma-separated list of fully qualified names of fields. Example:
+     * `"remaining_vehicle_journey_segments"`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.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 that indicates which `DeliveryVehicle` fields to
+     * update. Note that the update_mask must contain at least one field.
+     *
+     * This is a comma-separated list of fully qualified names of fields. Example:
+     * `"remaining_vehicle_journey_segments"`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.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.delivery.v1.UpdateDeliveryVehicleRequest) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest) + private static final google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest(); + } + + public static google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateDeliveryVehicleRequest 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 google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/UpdateDeliveryVehicleRequestOrBuilder.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/UpdateDeliveryVehicleRequestOrBuilder.java new file mode 100644 index 000000000000..8b73f50cbddb --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/UpdateDeliveryVehicleRequestOrBuilder.java @@ -0,0 +1,160 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_api.proto + +package google.maps.fleetengine.delivery.v1; + +public interface UpdateDeliveryVehicleRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the header field is set. + */ + boolean hasHeader(); + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The header. + */ + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader getHeader(); + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder getHeaderOrBuilder(); + + /** + * + * + *
+   * Required. The `DeliveryVehicle` entity update to apply.
+   * Note: You cannot update the name of the `DeliveryVehicle`.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the deliveryVehicle field is set. + */ + boolean hasDeliveryVehicle(); + /** + * + * + *
+   * Required. The `DeliveryVehicle` entity update to apply.
+   * Note: You cannot update the name of the `DeliveryVehicle`.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The deliveryVehicle. + */ + google.maps.fleetengine.delivery.v1.DeliveryVehicle getDeliveryVehicle(); + /** + * + * + *
+   * Required. The `DeliveryVehicle` entity update to apply.
+   * Note: You cannot update the name of the `DeliveryVehicle`.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + google.maps.fleetengine.delivery.v1.DeliveryVehicleOrBuilder getDeliveryVehicleOrBuilder(); + + /** + * + * + *
+   * Required. A field mask that indicates which `DeliveryVehicle` fields to
+   * update. Note that the update_mask must contain at least one field.
+   *
+   * This is a comma-separated list of fully qualified names of fields. Example:
+   * `"remaining_vehicle_journey_segments"`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. A field mask that indicates which `DeliveryVehicle` fields to
+   * update. Note that the update_mask must contain at least one field.
+   *
+   * This is a comma-separated list of fully qualified names of fields. Example:
+   * `"remaining_vehicle_journey_segments"`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. A field mask that indicates which `DeliveryVehicle` fields to
+   * update. Note that the update_mask must contain at least one field.
+   *
+   * This is a comma-separated list of fully qualified names of fields. Example:
+   * `"remaining_vehicle_journey_segments"`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/UpdateTaskRequest.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/UpdateTaskRequest.java new file mode 100644 index 000000000000..0e3e027ccd88 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/UpdateTaskRequest.java @@ -0,0 +1,1504 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_api.proto + +package google.maps.fleetengine.delivery.v1; + +/** + * + * + *
+ * The `UpdateTask` request message.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.UpdateTaskRequest} + */ +public final class UpdateTaskRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.delivery.v1.UpdateTaskRequest) + UpdateTaskRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateTaskRequest.newBuilder() to construct. + private UpdateTaskRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateTaskRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateTaskRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_UpdateTaskRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_UpdateTaskRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.UpdateTaskRequest.class, + google.maps.fleetengine.delivery.v1.UpdateTaskRequest.Builder.class); + } + + public static final int HEADER_FIELD_NUMBER = 1; + private google.maps.fleetengine.delivery.v1.DeliveryRequestHeader header_; + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the header field is set. + */ + @java.lang.Override + public boolean hasHeader() { + return header_ != null; + } + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The header. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader getHeader() { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance() + : header_; + } + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder getHeaderOrBuilder() { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance() + : header_; + } + + public static final int TASK_FIELD_NUMBER = 3; + private google.maps.fleetengine.delivery.v1.Task task_; + /** + * + * + *
+   * Required. The Task associated with the update.
+   * The following fields are maintained by Fleet Engine. Do not update
+   * them using `Task.update`.
+   *
+   *   * `last_location`.
+   *   * `last_location_snappable`.
+   *   * `name`.
+   *   * `remaining_vehicle_journey_segments`.
+   *   * `task_outcome_location_source`.
+   *
+   * Note: You cannot change the value of `task_outcome` once you set it.
+   *
+   * If the Task has been assigned to a delivery vehicle, then don't set the
+   * Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop`
+   * that contains the Task from the delivery vehicle, which automatically sets
+   * the Task state to CLOSED.
+   * 
+ * + * .maps.fleetengine.delivery.v1.Task task = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the task field is set. + */ + @java.lang.Override + public boolean hasTask() { + return task_ != null; + } + /** + * + * + *
+   * Required. The Task associated with the update.
+   * The following fields are maintained by Fleet Engine. Do not update
+   * them using `Task.update`.
+   *
+   *   * `last_location`.
+   *   * `last_location_snappable`.
+   *   * `name`.
+   *   * `remaining_vehicle_journey_segments`.
+   *   * `task_outcome_location_source`.
+   *
+   * Note: You cannot change the value of `task_outcome` once you set it.
+   *
+   * If the Task has been assigned to a delivery vehicle, then don't set the
+   * Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop`
+   * that contains the Task from the delivery vehicle, which automatically sets
+   * the Task state to CLOSED.
+   * 
+ * + * .maps.fleetengine.delivery.v1.Task task = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The task. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.Task getTask() { + return task_ == null ? google.maps.fleetengine.delivery.v1.Task.getDefaultInstance() : task_; + } + /** + * + * + *
+   * Required. The Task associated with the update.
+   * The following fields are maintained by Fleet Engine. Do not update
+   * them using `Task.update`.
+   *
+   *   * `last_location`.
+   *   * `last_location_snappable`.
+   *   * `name`.
+   *   * `remaining_vehicle_journey_segments`.
+   *   * `task_outcome_location_source`.
+   *
+   * Note: You cannot change the value of `task_outcome` once you set it.
+   *
+   * If the Task has been assigned to a delivery vehicle, then don't set the
+   * Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop`
+   * that contains the Task from the delivery vehicle, which automatically sets
+   * the Task state to CLOSED.
+   * 
+ * + * .maps.fleetengine.delivery.v1.Task task = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TaskOrBuilder getTaskOrBuilder() { + return task_ == null ? google.maps.fleetengine.delivery.v1.Task.getDefaultInstance() : task_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 4; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. The field mask that indicates which Task fields to update.
+   * Note: The `update_mask` must contain at least one field.
+   *
+   * This is a comma-separated list of fully qualified names of fields. Example:
+   * `"task_outcome,task_outcome_time,task_outcome_location"`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. The field mask that indicates which Task fields to update.
+   * Note: The `update_mask` must contain at least one field.
+   *
+   * This is a comma-separated list of fully qualified names of fields. Example:
+   * `"task_outcome,task_outcome_time,task_outcome_location"`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.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 that indicates which Task fields to update.
+   * Note: The `update_mask` must contain at least one field.
+   *
+   * This is a comma-separated list of fully qualified names of fields. Example:
+   * `"task_outcome,task_outcome_time,task_outcome_location"`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.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 (header_ != null) { + output.writeMessage(1, getHeader()); + } + if (task_ != null) { + output.writeMessage(3, getTask()); + } + if (updateMask_ != null) { + output.writeMessage(4, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (header_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getHeader()); + } + if (task_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTask()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, 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 google.maps.fleetengine.delivery.v1.UpdateTaskRequest)) { + return super.equals(obj); + } + google.maps.fleetengine.delivery.v1.UpdateTaskRequest other = + (google.maps.fleetengine.delivery.v1.UpdateTaskRequest) obj; + + if (hasHeader() != other.hasHeader()) return false; + if (hasHeader()) { + if (!getHeader().equals(other.getHeader())) return false; + } + if (hasTask() != other.hasTask()) return false; + if (hasTask()) { + if (!getTask().equals(other.getTask())) 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(); + } + if (hasTask()) { + hash = (37 * hash) + TASK_FIELD_NUMBER; + hash = (53 * hash) + getTask().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 google.maps.fleetengine.delivery.v1.UpdateTaskRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.UpdateTaskRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.UpdateTaskRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.UpdateTaskRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.UpdateTaskRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.UpdateTaskRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.UpdateTaskRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.UpdateTaskRequest 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 google.maps.fleetengine.delivery.v1.UpdateTaskRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.UpdateTaskRequest 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 google.maps.fleetengine.delivery.v1.UpdateTaskRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.UpdateTaskRequest 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( + google.maps.fleetengine.delivery.v1.UpdateTaskRequest 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 `UpdateTask` request message.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.UpdateTaskRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.delivery.v1.UpdateTaskRequest) + google.maps.fleetengine.delivery.v1.UpdateTaskRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_UpdateTaskRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_UpdateTaskRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.UpdateTaskRequest.class, + google.maps.fleetengine.delivery.v1.UpdateTaskRequest.Builder.class); + } + + // Construct using google.maps.fleetengine.delivery.v1.UpdateTaskRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + task_ = null; + if (taskBuilder_ != null) { + taskBuilder_.dispose(); + taskBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return google.maps.fleetengine.delivery.v1.DeliveryApi + .internal_static_maps_fleetengine_delivery_v1_UpdateTaskRequest_descriptor; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.UpdateTaskRequest getDefaultInstanceForType() { + return google.maps.fleetengine.delivery.v1.UpdateTaskRequest.getDefaultInstance(); + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.UpdateTaskRequest build() { + google.maps.fleetengine.delivery.v1.UpdateTaskRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.UpdateTaskRequest buildPartial() { + google.maps.fleetengine.delivery.v1.UpdateTaskRequest result = + new google.maps.fleetengine.delivery.v1.UpdateTaskRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(google.maps.fleetengine.delivery.v1.UpdateTaskRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.header_ = headerBuilder_ == null ? header_ : headerBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.task_ = taskBuilder_ == null ? task_ : taskBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof google.maps.fleetengine.delivery.v1.UpdateTaskRequest) { + return mergeFrom((google.maps.fleetengine.delivery.v1.UpdateTaskRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.maps.fleetengine.delivery.v1.UpdateTaskRequest other) { + if (other == google.maps.fleetengine.delivery.v1.UpdateTaskRequest.getDefaultInstance()) + return this; + if (other.hasHeader()) { + mergeHeader(other.getHeader()); + } + if (other.hasTask()) { + mergeTask(other.getTask()); + } + 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: + { + input.readMessage(getTaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 34: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private google.maps.fleetengine.delivery.v1.DeliveryRequestHeader header_; + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder> + headerBuilder_; + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the header field is set. + */ + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The header. + */ + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader getHeader() { + if (headerBuilder_ == null) { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance() + : header_; + } else { + return headerBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHeader(google.maps.fleetengine.delivery.v1.DeliveryRequestHeader value) { + if (headerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + header_ = value; + } else { + headerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHeader( + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder builderForValue) { + if (headerBuilder_ == null) { + header_ = builderForValue.build(); + } else { + headerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeHeader(google.maps.fleetengine.delivery.v1.DeliveryRequestHeader value) { + if (headerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && header_ != null + && header_ + != google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance()) { + getHeaderBuilder().mergeFrom(value); + } else { + header_ = value; + } + } else { + headerBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearHeader() { + bitField0_ = (bitField0_ & ~0x00000001); + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder getHeaderBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getHeaderFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder getHeaderOrBuilder() { + if (headerBuilder_ != null) { + return headerBuilder_.getMessageOrBuilder(); + } else { + return header_ == null + ? google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.getDefaultInstance() + : header_; + } + } + /** + * + * + *
+     * Optional. The standard Delivery API request header.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder> + getHeaderFieldBuilder() { + if (headerBuilder_ == null) { + headerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader.Builder, + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder>( + getHeader(), getParentForChildren(), isClean()); + header_ = null; + } + return headerBuilder_; + } + + private google.maps.fleetengine.delivery.v1.Task task_; + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.Task, + google.maps.fleetengine.delivery.v1.Task.Builder, + google.maps.fleetengine.delivery.v1.TaskOrBuilder> + taskBuilder_; + /** + * + * + *
+     * Required. The Task associated with the update.
+     * The following fields are maintained by Fleet Engine. Do not update
+     * them using `Task.update`.
+     *
+     *   * `last_location`.
+     *   * `last_location_snappable`.
+     *   * `name`.
+     *   * `remaining_vehicle_journey_segments`.
+     *   * `task_outcome_location_source`.
+     *
+     * Note: You cannot change the value of `task_outcome` once you set it.
+     *
+     * If the Task has been assigned to a delivery vehicle, then don't set the
+     * Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop`
+     * that contains the Task from the delivery vehicle, which automatically sets
+     * the Task state to CLOSED.
+     * 
+ * + * .maps.fleetengine.delivery.v1.Task task = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the task field is set. + */ + public boolean hasTask() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The Task associated with the update.
+     * The following fields are maintained by Fleet Engine. Do not update
+     * them using `Task.update`.
+     *
+     *   * `last_location`.
+     *   * `last_location_snappable`.
+     *   * `name`.
+     *   * `remaining_vehicle_journey_segments`.
+     *   * `task_outcome_location_source`.
+     *
+     * Note: You cannot change the value of `task_outcome` once you set it.
+     *
+     * If the Task has been assigned to a delivery vehicle, then don't set the
+     * Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop`
+     * that contains the Task from the delivery vehicle, which automatically sets
+     * the Task state to CLOSED.
+     * 
+ * + * .maps.fleetengine.delivery.v1.Task task = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The task. + */ + public google.maps.fleetengine.delivery.v1.Task getTask() { + if (taskBuilder_ == null) { + return task_ == null + ? google.maps.fleetengine.delivery.v1.Task.getDefaultInstance() + : task_; + } else { + return taskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The Task associated with the update.
+     * The following fields are maintained by Fleet Engine. Do not update
+     * them using `Task.update`.
+     *
+     *   * `last_location`.
+     *   * `last_location_snappable`.
+     *   * `name`.
+     *   * `remaining_vehicle_journey_segments`.
+     *   * `task_outcome_location_source`.
+     *
+     * Note: You cannot change the value of `task_outcome` once you set it.
+     *
+     * If the Task has been assigned to a delivery vehicle, then don't set the
+     * Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop`
+     * that contains the Task from the delivery vehicle, which automatically sets
+     * the Task state to CLOSED.
+     * 
+ * + * .maps.fleetengine.delivery.v1.Task task = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTask(google.maps.fleetengine.delivery.v1.Task value) { + if (taskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + task_ = value; + } else { + taskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Task associated with the update.
+     * The following fields are maintained by Fleet Engine. Do not update
+     * them using `Task.update`.
+     *
+     *   * `last_location`.
+     *   * `last_location_snappable`.
+     *   * `name`.
+     *   * `remaining_vehicle_journey_segments`.
+     *   * `task_outcome_location_source`.
+     *
+     * Note: You cannot change the value of `task_outcome` once you set it.
+     *
+     * If the Task has been assigned to a delivery vehicle, then don't set the
+     * Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop`
+     * that contains the Task from the delivery vehicle, which automatically sets
+     * the Task state to CLOSED.
+     * 
+ * + * .maps.fleetengine.delivery.v1.Task task = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTask(google.maps.fleetengine.delivery.v1.Task.Builder builderForValue) { + if (taskBuilder_ == null) { + task_ = builderForValue.build(); + } else { + taskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Task associated with the update.
+     * The following fields are maintained by Fleet Engine. Do not update
+     * them using `Task.update`.
+     *
+     *   * `last_location`.
+     *   * `last_location_snappable`.
+     *   * `name`.
+     *   * `remaining_vehicle_journey_segments`.
+     *   * `task_outcome_location_source`.
+     *
+     * Note: You cannot change the value of `task_outcome` once you set it.
+     *
+     * If the Task has been assigned to a delivery vehicle, then don't set the
+     * Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop`
+     * that contains the Task from the delivery vehicle, which automatically sets
+     * the Task state to CLOSED.
+     * 
+ * + * .maps.fleetengine.delivery.v1.Task task = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTask(google.maps.fleetengine.delivery.v1.Task value) { + if (taskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && task_ != null + && task_ != google.maps.fleetengine.delivery.v1.Task.getDefaultInstance()) { + getTaskBuilder().mergeFrom(value); + } else { + task_ = value; + } + } else { + taskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Task associated with the update.
+     * The following fields are maintained by Fleet Engine. Do not update
+     * them using `Task.update`.
+     *
+     *   * `last_location`.
+     *   * `last_location_snappable`.
+     *   * `name`.
+     *   * `remaining_vehicle_journey_segments`.
+     *   * `task_outcome_location_source`.
+     *
+     * Note: You cannot change the value of `task_outcome` once you set it.
+     *
+     * If the Task has been assigned to a delivery vehicle, then don't set the
+     * Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop`
+     * that contains the Task from the delivery vehicle, which automatically sets
+     * the Task state to CLOSED.
+     * 
+ * + * .maps.fleetengine.delivery.v1.Task task = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTask() { + bitField0_ = (bitField0_ & ~0x00000002); + task_ = null; + if (taskBuilder_ != null) { + taskBuilder_.dispose(); + taskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Task associated with the update.
+     * The following fields are maintained by Fleet Engine. Do not update
+     * them using `Task.update`.
+     *
+     *   * `last_location`.
+     *   * `last_location_snappable`.
+     *   * `name`.
+     *   * `remaining_vehicle_journey_segments`.
+     *   * `task_outcome_location_source`.
+     *
+     * Note: You cannot change the value of `task_outcome` once you set it.
+     *
+     * If the Task has been assigned to a delivery vehicle, then don't set the
+     * Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop`
+     * that contains the Task from the delivery vehicle, which automatically sets
+     * the Task state to CLOSED.
+     * 
+ * + * .maps.fleetengine.delivery.v1.Task task = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public google.maps.fleetengine.delivery.v1.Task.Builder getTaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getTaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The Task associated with the update.
+     * The following fields are maintained by Fleet Engine. Do not update
+     * them using `Task.update`.
+     *
+     *   * `last_location`.
+     *   * `last_location_snappable`.
+     *   * `name`.
+     *   * `remaining_vehicle_journey_segments`.
+     *   * `task_outcome_location_source`.
+     *
+     * Note: You cannot change the value of `task_outcome` once you set it.
+     *
+     * If the Task has been assigned to a delivery vehicle, then don't set the
+     * Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop`
+     * that contains the Task from the delivery vehicle, which automatically sets
+     * the Task state to CLOSED.
+     * 
+ * + * .maps.fleetengine.delivery.v1.Task task = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public google.maps.fleetengine.delivery.v1.TaskOrBuilder getTaskOrBuilder() { + if (taskBuilder_ != null) { + return taskBuilder_.getMessageOrBuilder(); + } else { + return task_ == null + ? google.maps.fleetengine.delivery.v1.Task.getDefaultInstance() + : task_; + } + } + /** + * + * + *
+     * Required. The Task associated with the update.
+     * The following fields are maintained by Fleet Engine. Do not update
+     * them using `Task.update`.
+     *
+     *   * `last_location`.
+     *   * `last_location_snappable`.
+     *   * `name`.
+     *   * `remaining_vehicle_journey_segments`.
+     *   * `task_outcome_location_source`.
+     *
+     * Note: You cannot change the value of `task_outcome` once you set it.
+     *
+     * If the Task has been assigned to a delivery vehicle, then don't set the
+     * Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop`
+     * that contains the Task from the delivery vehicle, which automatically sets
+     * the Task state to CLOSED.
+     * 
+ * + * .maps.fleetengine.delivery.v1.Task task = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.Task, + google.maps.fleetengine.delivery.v1.Task.Builder, + google.maps.fleetengine.delivery.v1.TaskOrBuilder> + getTaskFieldBuilder() { + if (taskBuilder_ == null) { + taskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.Task, + google.maps.fleetengine.delivery.v1.Task.Builder, + google.maps.fleetengine.delivery.v1.TaskOrBuilder>( + getTask(), getParentForChildren(), isClean()); + task_ = null; + } + return taskBuilder_; + } + + 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 that indicates which Task fields to update.
+     * Note: The `update_mask` must contain at least one field.
+     *
+     * This is a comma-separated list of fully qualified names of fields. Example:
+     * `"task_outcome,task_outcome_time,task_outcome_location"`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The field mask that indicates which Task fields to update.
+     * Note: The `update_mask` must contain at least one field.
+     *
+     * This is a comma-separated list of fully qualified names of fields. Example:
+     * `"task_outcome,task_outcome_time,task_outcome_location"`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.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 that indicates which Task fields to update.
+     * Note: The `update_mask` must contain at least one field.
+     *
+     * This is a comma-separated list of fully qualified names of fields. Example:
+     * `"task_outcome,task_outcome_time,task_outcome_location"`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.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_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The field mask that indicates which Task fields to update.
+     * Note: The `update_mask` must contain at least one field.
+     *
+     * This is a comma-separated list of fully qualified names of fields. Example:
+     * `"task_outcome,task_outcome_time,task_outcome_location"`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.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_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The field mask that indicates which Task fields to update.
+     * Note: The `update_mask` must contain at least one field.
+     *
+     * This is a comma-separated list of fully qualified names of fields. Example:
+     * `"task_outcome,task_outcome_time,task_outcome_location"`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The field mask that indicates which Task fields to update.
+     * Note: The `update_mask` must contain at least one field.
+     *
+     * This is a comma-separated list of fully qualified names of fields. Example:
+     * `"task_outcome,task_outcome_time,task_outcome_location"`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000004); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The field mask that indicates which Task fields to update.
+     * Note: The `update_mask` must contain at least one field.
+     *
+     * This is a comma-separated list of fully qualified names of fields. Example:
+     * `"task_outcome,task_outcome_time,task_outcome_location"`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The field mask that indicates which Task fields to update.
+     * Note: The `update_mask` must contain at least one field.
+     *
+     * This is a comma-separated list of fully qualified names of fields. Example:
+     * `"task_outcome,task_outcome_time,task_outcome_location"`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.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 that indicates which Task fields to update.
+     * Note: The `update_mask` must contain at least one field.
+     *
+     * This is a comma-separated list of fully qualified names of fields. Example:
+     * `"task_outcome,task_outcome_time,task_outcome_location"`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.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.delivery.v1.UpdateTaskRequest) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.delivery.v1.UpdateTaskRequest) + private static final google.maps.fleetengine.delivery.v1.UpdateTaskRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new google.maps.fleetengine.delivery.v1.UpdateTaskRequest(); + } + + public static google.maps.fleetengine.delivery.v1.UpdateTaskRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateTaskRequest 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 google.maps.fleetengine.delivery.v1.UpdateTaskRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/UpdateTaskRequestOrBuilder.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/UpdateTaskRequestOrBuilder.java new file mode 100644 index 000000000000..7b4e74e358d4 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/UpdateTaskRequestOrBuilder.java @@ -0,0 +1,199 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_api.proto + +package google.maps.fleetengine.delivery.v1; + +public interface UpdateTaskRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.delivery.v1.UpdateTaskRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the header field is set. + */ + boolean hasHeader(); + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The header. + */ + google.maps.fleetengine.delivery.v1.DeliveryRequestHeader getHeader(); + /** + * + * + *
+   * Optional. The standard Delivery API request header.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + google.maps.fleetengine.delivery.v1.DeliveryRequestHeaderOrBuilder getHeaderOrBuilder(); + + /** + * + * + *
+   * Required. The Task associated with the update.
+   * The following fields are maintained by Fleet Engine. Do not update
+   * them using `Task.update`.
+   *
+   *   * `last_location`.
+   *   * `last_location_snappable`.
+   *   * `name`.
+   *   * `remaining_vehicle_journey_segments`.
+   *   * `task_outcome_location_source`.
+   *
+   * Note: You cannot change the value of `task_outcome` once you set it.
+   *
+   * If the Task has been assigned to a delivery vehicle, then don't set the
+   * Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop`
+   * that contains the Task from the delivery vehicle, which automatically sets
+   * the Task state to CLOSED.
+   * 
+ * + * .maps.fleetengine.delivery.v1.Task task = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the task field is set. + */ + boolean hasTask(); + /** + * + * + *
+   * Required. The Task associated with the update.
+   * The following fields are maintained by Fleet Engine. Do not update
+   * them using `Task.update`.
+   *
+   *   * `last_location`.
+   *   * `last_location_snappable`.
+   *   * `name`.
+   *   * `remaining_vehicle_journey_segments`.
+   *   * `task_outcome_location_source`.
+   *
+   * Note: You cannot change the value of `task_outcome` once you set it.
+   *
+   * If the Task has been assigned to a delivery vehicle, then don't set the
+   * Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop`
+   * that contains the Task from the delivery vehicle, which automatically sets
+   * the Task state to CLOSED.
+   * 
+ * + * .maps.fleetengine.delivery.v1.Task task = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The task. + */ + google.maps.fleetengine.delivery.v1.Task getTask(); + /** + * + * + *
+   * Required. The Task associated with the update.
+   * The following fields are maintained by Fleet Engine. Do not update
+   * them using `Task.update`.
+   *
+   *   * `last_location`.
+   *   * `last_location_snappable`.
+   *   * `name`.
+   *   * `remaining_vehicle_journey_segments`.
+   *   * `task_outcome_location_source`.
+   *
+   * Note: You cannot change the value of `task_outcome` once you set it.
+   *
+   * If the Task has been assigned to a delivery vehicle, then don't set the
+   * Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop`
+   * that contains the Task from the delivery vehicle, which automatically sets
+   * the Task state to CLOSED.
+   * 
+ * + * .maps.fleetengine.delivery.v1.Task task = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + google.maps.fleetengine.delivery.v1.TaskOrBuilder getTaskOrBuilder(); + + /** + * + * + *
+   * Required. The field mask that indicates which Task fields to update.
+   * Note: The `update_mask` must contain at least one field.
+   *
+   * This is a comma-separated list of fully qualified names of fields. Example:
+   * `"task_outcome,task_outcome_time,task_outcome_location"`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. The field mask that indicates which Task fields to update.
+   * Note: The `update_mask` must contain at least one field.
+   *
+   * This is a comma-separated list of fully qualified names of fields. Example:
+   * `"task_outcome,task_outcome_time,task_outcome_location"`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. The field mask that indicates which Task fields to update.
+   * Note: The `update_mask` must contain at least one field.
+   *
+   * This is a comma-separated list of fully qualified names of fields. Example:
+   * `"task_outcome,task_outcome_time,task_outcome_location"`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/VehicleJourneySegment.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/VehicleJourneySegment.java new file mode 100644 index 000000000000..fc9f53f97c8b --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/VehicleJourneySegment.java @@ -0,0 +1,2312 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_vehicles.proto + +package google.maps.fleetengine.delivery.v1; + +/** + * + * + *
+ * Represents a Vehicle’s travel segment - from its previous stop to the
+ * current stop. If it is the first active stop, then it is from the
+ * Vehicle’s current location to this stop.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.VehicleJourneySegment} + */ +public final class VehicleJourneySegment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.delivery.v1.VehicleJourneySegment) + VehicleJourneySegmentOrBuilder { + private static final long serialVersionUID = 0L; + // Use VehicleJourneySegment.newBuilder() to construct. + private VehicleJourneySegment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VehicleJourneySegment() { + path_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VehicleJourneySegment(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryVehicles + .internal_static_maps_fleetengine_delivery_v1_VehicleJourneySegment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryVehicles + .internal_static_maps_fleetengine_delivery_v1_VehicleJourneySegment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.VehicleJourneySegment.class, + google.maps.fleetengine.delivery.v1.VehicleJourneySegment.Builder.class); + } + + public static final int STOP_FIELD_NUMBER = 1; + private google.maps.fleetengine.delivery.v1.VehicleStop stop_; + /** + * + * + *
+   * Specifies the stop location, along with the `Task`s associated with
+   * the stop. Some fields of the VehicleStop might not be present if this
+   * journey segment is part of `JourneySharingInfo`.
+   * 
+ * + * .maps.fleetengine.delivery.v1.VehicleStop stop = 1; + * + * @return Whether the stop field is set. + */ + @java.lang.Override + public boolean hasStop() { + return stop_ != null; + } + /** + * + * + *
+   * Specifies the stop location, along with the `Task`s associated with
+   * the stop. Some fields of the VehicleStop might not be present if this
+   * journey segment is part of `JourneySharingInfo`.
+   * 
+ * + * .maps.fleetengine.delivery.v1.VehicleStop stop = 1; + * + * @return The stop. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.VehicleStop getStop() { + return stop_ == null + ? google.maps.fleetengine.delivery.v1.VehicleStop.getDefaultInstance() + : stop_; + } + /** + * + * + *
+   * Specifies the stop location, along with the `Task`s associated with
+   * the stop. Some fields of the VehicleStop might not be present if this
+   * journey segment is part of `JourneySharingInfo`.
+   * 
+ * + * .maps.fleetengine.delivery.v1.VehicleStop stop = 1; + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.VehicleStopOrBuilder getStopOrBuilder() { + return stop_ == null + ? google.maps.fleetengine.delivery.v1.VehicleStop.getDefaultInstance() + : stop_; + } + + public static final int DRIVING_DISTANCE_METERS_FIELD_NUMBER = 2; + private com.google.protobuf.Int32Value drivingDistanceMeters_; + /** + * + * + *
+   * Output only. The travel distance from the previous stop to this stop.
+   * If the current stop is the first stop in the list of journey
+   * segments, then the starting point is the vehicle's location recorded
+   * at the time that this stop was added to the list. This field might not be
+   * present if this journey segment is part of `JourneySharingInfo`.
+   * 
+ * + * + * .google.protobuf.Int32Value driving_distance_meters = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the drivingDistanceMeters field is set. + */ + @java.lang.Override + public boolean hasDrivingDistanceMeters() { + return drivingDistanceMeters_ != null; + } + /** + * + * + *
+   * Output only. The travel distance from the previous stop to this stop.
+   * If the current stop is the first stop in the list of journey
+   * segments, then the starting point is the vehicle's location recorded
+   * at the time that this stop was added to the list. This field might not be
+   * present if this journey segment is part of `JourneySharingInfo`.
+   * 
+ * + * + * .google.protobuf.Int32Value driving_distance_meters = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The drivingDistanceMeters. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getDrivingDistanceMeters() { + return drivingDistanceMeters_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : drivingDistanceMeters_; + } + /** + * + * + *
+   * Output only. The travel distance from the previous stop to this stop.
+   * If the current stop is the first stop in the list of journey
+   * segments, then the starting point is the vehicle's location recorded
+   * at the time that this stop was added to the list. This field might not be
+   * present if this journey segment is part of `JourneySharingInfo`.
+   * 
+ * + * + * .google.protobuf.Int32Value driving_distance_meters = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getDrivingDistanceMetersOrBuilder() { + return drivingDistanceMeters_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : drivingDistanceMeters_; + } + + public static final int DRIVING_DURATION_FIELD_NUMBER = 3; + private com.google.protobuf.Duration drivingDuration_; + /** + * + * + *
+   * Output only. The travel time from the previous stop to this stop.
+   * If the current stop is the first stop in the list of journey
+   * segments, then the starting point is the Vehicle's location recorded
+   * at the time that this stop was added to the list.
+   *
+   * If this field is defined in the path
+   * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or
+   * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST),
+   * then it may be populated with the value from
+   * `DeliveryVehicle.remaining_duration` (gRPC) or
+   * `DeliveryVehicle.remainingDuration` (REST).
+   * This provides the remaining driving duration from the driver app's latest
+   * known location rather than the driving time from the previous stop.
+   * 
+ * + * + * .google.protobuf.Duration driving_duration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the drivingDuration field is set. + */ + @java.lang.Override + public boolean hasDrivingDuration() { + return drivingDuration_ != null; + } + /** + * + * + *
+   * Output only. The travel time from the previous stop to this stop.
+   * If the current stop is the first stop in the list of journey
+   * segments, then the starting point is the Vehicle's location recorded
+   * at the time that this stop was added to the list.
+   *
+   * If this field is defined in the path
+   * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or
+   * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST),
+   * then it may be populated with the value from
+   * `DeliveryVehicle.remaining_duration` (gRPC) or
+   * `DeliveryVehicle.remainingDuration` (REST).
+   * This provides the remaining driving duration from the driver app's latest
+   * known location rather than the driving time from the previous stop.
+   * 
+ * + * + * .google.protobuf.Duration driving_duration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The drivingDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getDrivingDuration() { + return drivingDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : drivingDuration_; + } + /** + * + * + *
+   * Output only. The travel time from the previous stop to this stop.
+   * If the current stop is the first stop in the list of journey
+   * segments, then the starting point is the Vehicle's location recorded
+   * at the time that this stop was added to the list.
+   *
+   * If this field is defined in the path
+   * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or
+   * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST),
+   * then it may be populated with the value from
+   * `DeliveryVehicle.remaining_duration` (gRPC) or
+   * `DeliveryVehicle.remainingDuration` (REST).
+   * This provides the remaining driving duration from the driver app's latest
+   * known location rather than the driving time from the previous stop.
+   * 
+ * + * + * .google.protobuf.Duration driving_duration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getDrivingDurationOrBuilder() { + return drivingDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : drivingDuration_; + } + + public static final int PATH_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List path_; + /** + * + * + *
+   * Output only. The path from the previous stop to this stop. If the current
+   * stop is the first stop in the list of journey segments, then this is the
+   * path from the vehicle's current location to this stop at the time that the
+   * stop was added to the list. This field might not be present if this journey
+   * segment is part of `JourneySharingInfo`.
+   *
+   * If this field is defined in the path
+   * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+   * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+   * (REST), then it may be populated with the `LatLng`s decoded from
+   * `DeliveryVehicle.current_route_segment` (gRPC) or
+   * `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving
+   * path from the driver app's latest known location rather than the path from
+   * the previous stop.
+   * 
+ * + * repeated .google.type.LatLng path = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getPathList() { + return path_; + } + /** + * + * + *
+   * Output only. The path from the previous stop to this stop. If the current
+   * stop is the first stop in the list of journey segments, then this is the
+   * path from the vehicle's current location to this stop at the time that the
+   * stop was added to the list. This field might not be present if this journey
+   * segment is part of `JourneySharingInfo`.
+   *
+   * If this field is defined in the path
+   * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+   * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+   * (REST), then it may be populated with the `LatLng`s decoded from
+   * `DeliveryVehicle.current_route_segment` (gRPC) or
+   * `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving
+   * path from the driver app's latest known location rather than the path from
+   * the previous stop.
+   * 
+ * + * repeated .google.type.LatLng path = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getPathOrBuilderList() { + return path_; + } + /** + * + * + *
+   * Output only. The path from the previous stop to this stop. If the current
+   * stop is the first stop in the list of journey segments, then this is the
+   * path from the vehicle's current location to this stop at the time that the
+   * stop was added to the list. This field might not be present if this journey
+   * segment is part of `JourneySharingInfo`.
+   *
+   * If this field is defined in the path
+   * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+   * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+   * (REST), then it may be populated with the `LatLng`s decoded from
+   * `DeliveryVehicle.current_route_segment` (gRPC) or
+   * `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving
+   * path from the driver app's latest known location rather than the path from
+   * the previous stop.
+   * 
+ * + * repeated .google.type.LatLng path = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getPathCount() { + return path_.size(); + } + /** + * + * + *
+   * Output only. The path from the previous stop to this stop. If the current
+   * stop is the first stop in the list of journey segments, then this is the
+   * path from the vehicle's current location to this stop at the time that the
+   * stop was added to the list. This field might not be present if this journey
+   * segment is part of `JourneySharingInfo`.
+   *
+   * If this field is defined in the path
+   * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+   * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+   * (REST), then it may be populated with the `LatLng`s decoded from
+   * `DeliveryVehicle.current_route_segment` (gRPC) or
+   * `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving
+   * path from the driver app's latest known location rather than the path from
+   * the previous stop.
+   * 
+ * + * repeated .google.type.LatLng path = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.type.LatLng getPath(int index) { + return path_.get(index); + } + /** + * + * + *
+   * Output only. The path from the previous stop to this stop. If the current
+   * stop is the first stop in the list of journey segments, then this is the
+   * path from the vehicle's current location to this stop at the time that the
+   * stop was added to the list. This field might not be present if this journey
+   * segment is part of `JourneySharingInfo`.
+   *
+   * If this field is defined in the path
+   * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+   * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+   * (REST), then it may be populated with the `LatLng`s decoded from
+   * `DeliveryVehicle.current_route_segment` (gRPC) or
+   * `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving
+   * path from the driver app's latest known location rather than the path from
+   * the previous stop.
+   * 
+ * + * repeated .google.type.LatLng path = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getPathOrBuilder(int index) { + return path_.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 (stop_ != null) { + output.writeMessage(1, getStop()); + } + if (drivingDistanceMeters_ != null) { + output.writeMessage(2, getDrivingDistanceMeters()); + } + if (drivingDuration_ != null) { + output.writeMessage(3, getDrivingDuration()); + } + for (int i = 0; i < path_.size(); i++) { + output.writeMessage(5, path_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (stop_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStop()); + } + if (drivingDistanceMeters_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDrivingDistanceMeters()); + } + if (drivingDuration_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDrivingDuration()); + } + for (int i = 0; i < path_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, path_.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 google.maps.fleetengine.delivery.v1.VehicleJourneySegment)) { + return super.equals(obj); + } + google.maps.fleetengine.delivery.v1.VehicleJourneySegment other = + (google.maps.fleetengine.delivery.v1.VehicleJourneySegment) obj; + + if (hasStop() != other.hasStop()) return false; + if (hasStop()) { + if (!getStop().equals(other.getStop())) return false; + } + if (hasDrivingDistanceMeters() != other.hasDrivingDistanceMeters()) return false; + if (hasDrivingDistanceMeters()) { + if (!getDrivingDistanceMeters().equals(other.getDrivingDistanceMeters())) return false; + } + if (hasDrivingDuration() != other.hasDrivingDuration()) return false; + if (hasDrivingDuration()) { + if (!getDrivingDuration().equals(other.getDrivingDuration())) return false; + } + if (!getPathList().equals(other.getPathList())) 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 (hasStop()) { + hash = (37 * hash) + STOP_FIELD_NUMBER; + hash = (53 * hash) + getStop().hashCode(); + } + if (hasDrivingDistanceMeters()) { + hash = (37 * hash) + DRIVING_DISTANCE_METERS_FIELD_NUMBER; + hash = (53 * hash) + getDrivingDistanceMeters().hashCode(); + } + if (hasDrivingDuration()) { + hash = (37 * hash) + DRIVING_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getDrivingDuration().hashCode(); + } + if (getPathCount() > 0) { + hash = (37 * hash) + PATH_FIELD_NUMBER; + hash = (53 * hash) + getPathList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.maps.fleetengine.delivery.v1.VehicleJourneySegment parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.VehicleJourneySegment parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.VehicleJourneySegment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.VehicleJourneySegment parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.VehicleJourneySegment parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.VehicleJourneySegment parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.VehicleJourneySegment parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.VehicleJourneySegment 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 google.maps.fleetengine.delivery.v1.VehicleJourneySegment parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.VehicleJourneySegment 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 google.maps.fleetengine.delivery.v1.VehicleJourneySegment parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.VehicleJourneySegment 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( + google.maps.fleetengine.delivery.v1.VehicleJourneySegment 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; + } + /** + * + * + *
+   * Represents a Vehicle’s travel segment - from its previous stop to the
+   * current stop. If it is the first active stop, then it is from the
+   * Vehicle’s current location to this stop.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.VehicleJourneySegment} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.delivery.v1.VehicleJourneySegment) + google.maps.fleetengine.delivery.v1.VehicleJourneySegmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryVehicles + .internal_static_maps_fleetengine_delivery_v1_VehicleJourneySegment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryVehicles + .internal_static_maps_fleetengine_delivery_v1_VehicleJourneySegment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.VehicleJourneySegment.class, + google.maps.fleetengine.delivery.v1.VehicleJourneySegment.Builder.class); + } + + // Construct using google.maps.fleetengine.delivery.v1.VehicleJourneySegment.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + stop_ = null; + if (stopBuilder_ != null) { + stopBuilder_.dispose(); + stopBuilder_ = null; + } + drivingDistanceMeters_ = null; + if (drivingDistanceMetersBuilder_ != null) { + drivingDistanceMetersBuilder_.dispose(); + drivingDistanceMetersBuilder_ = null; + } + drivingDuration_ = null; + if (drivingDurationBuilder_ != null) { + drivingDurationBuilder_.dispose(); + drivingDurationBuilder_ = null; + } + if (pathBuilder_ == null) { + path_ = java.util.Collections.emptyList(); + } else { + path_ = null; + pathBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return google.maps.fleetengine.delivery.v1.DeliveryVehicles + .internal_static_maps_fleetengine_delivery_v1_VehicleJourneySegment_descriptor; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.VehicleJourneySegment getDefaultInstanceForType() { + return google.maps.fleetengine.delivery.v1.VehicleJourneySegment.getDefaultInstance(); + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.VehicleJourneySegment build() { + google.maps.fleetengine.delivery.v1.VehicleJourneySegment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.VehicleJourneySegment buildPartial() { + google.maps.fleetengine.delivery.v1.VehicleJourneySegment result = + new google.maps.fleetengine.delivery.v1.VehicleJourneySegment(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + google.maps.fleetengine.delivery.v1.VehicleJourneySegment result) { + if (pathBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + path_ = java.util.Collections.unmodifiableList(path_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.path_ = path_; + } else { + result.path_ = pathBuilder_.build(); + } + } + + private void buildPartial0(google.maps.fleetengine.delivery.v1.VehicleJourneySegment result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.stop_ = stopBuilder_ == null ? stop_ : stopBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.drivingDistanceMeters_ = + drivingDistanceMetersBuilder_ == null + ? drivingDistanceMeters_ + : drivingDistanceMetersBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.drivingDuration_ = + drivingDurationBuilder_ == null ? drivingDuration_ : drivingDurationBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof google.maps.fleetengine.delivery.v1.VehicleJourneySegment) { + return mergeFrom((google.maps.fleetengine.delivery.v1.VehicleJourneySegment) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.maps.fleetengine.delivery.v1.VehicleJourneySegment other) { + if (other == google.maps.fleetengine.delivery.v1.VehicleJourneySegment.getDefaultInstance()) + return this; + if (other.hasStop()) { + mergeStop(other.getStop()); + } + if (other.hasDrivingDistanceMeters()) { + mergeDrivingDistanceMeters(other.getDrivingDistanceMeters()); + } + if (other.hasDrivingDuration()) { + mergeDrivingDuration(other.getDrivingDuration()); + } + if (pathBuilder_ == null) { + if (!other.path_.isEmpty()) { + if (path_.isEmpty()) { + path_ = other.path_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensurePathIsMutable(); + path_.addAll(other.path_); + } + onChanged(); + } + } else { + if (!other.path_.isEmpty()) { + if (pathBuilder_.isEmpty()) { + pathBuilder_.dispose(); + pathBuilder_ = null; + path_ = other.path_; + bitField0_ = (bitField0_ & ~0x00000008); + pathBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPathFieldBuilder() + : null; + } else { + pathBuilder_.addAllMessages(other.path_); + } + } + } + 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(getStopFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + getDrivingDistanceMetersFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getDrivingDurationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 42: + { + com.google.type.LatLng m = + input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); + if (pathBuilder_ == null) { + ensurePathIsMutable(); + path_.add(m); + } else { + pathBuilder_.addMessage(m); + } + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private google.maps.fleetengine.delivery.v1.VehicleStop stop_; + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.VehicleStop, + google.maps.fleetengine.delivery.v1.VehicleStop.Builder, + google.maps.fleetengine.delivery.v1.VehicleStopOrBuilder> + stopBuilder_; + /** + * + * + *
+     * Specifies the stop location, along with the `Task`s associated with
+     * the stop. Some fields of the VehicleStop might not be present if this
+     * journey segment is part of `JourneySharingInfo`.
+     * 
+ * + * .maps.fleetengine.delivery.v1.VehicleStop stop = 1; + * + * @return Whether the stop field is set. + */ + public boolean hasStop() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Specifies the stop location, along with the `Task`s associated with
+     * the stop. Some fields of the VehicleStop might not be present if this
+     * journey segment is part of `JourneySharingInfo`.
+     * 
+ * + * .maps.fleetengine.delivery.v1.VehicleStop stop = 1; + * + * @return The stop. + */ + public google.maps.fleetengine.delivery.v1.VehicleStop getStop() { + if (stopBuilder_ == null) { + return stop_ == null + ? google.maps.fleetengine.delivery.v1.VehicleStop.getDefaultInstance() + : stop_; + } else { + return stopBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Specifies the stop location, along with the `Task`s associated with
+     * the stop. Some fields of the VehicleStop might not be present if this
+     * journey segment is part of `JourneySharingInfo`.
+     * 
+ * + * .maps.fleetengine.delivery.v1.VehicleStop stop = 1; + */ + public Builder setStop(google.maps.fleetengine.delivery.v1.VehicleStop value) { + if (stopBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stop_ = value; + } else { + stopBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the stop location, along with the `Task`s associated with
+     * the stop. Some fields of the VehicleStop might not be present if this
+     * journey segment is part of `JourneySharingInfo`.
+     * 
+ * + * .maps.fleetengine.delivery.v1.VehicleStop stop = 1; + */ + public Builder setStop( + google.maps.fleetengine.delivery.v1.VehicleStop.Builder builderForValue) { + if (stopBuilder_ == null) { + stop_ = builderForValue.build(); + } else { + stopBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the stop location, along with the `Task`s associated with
+     * the stop. Some fields of the VehicleStop might not be present if this
+     * journey segment is part of `JourneySharingInfo`.
+     * 
+ * + * .maps.fleetengine.delivery.v1.VehicleStop stop = 1; + */ + public Builder mergeStop(google.maps.fleetengine.delivery.v1.VehicleStop value) { + if (stopBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && stop_ != null + && stop_ != google.maps.fleetengine.delivery.v1.VehicleStop.getDefaultInstance()) { + getStopBuilder().mergeFrom(value); + } else { + stop_ = value; + } + } else { + stopBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the stop location, along with the `Task`s associated with
+     * the stop. Some fields of the VehicleStop might not be present if this
+     * journey segment is part of `JourneySharingInfo`.
+     * 
+ * + * .maps.fleetengine.delivery.v1.VehicleStop stop = 1; + */ + public Builder clearStop() { + bitField0_ = (bitField0_ & ~0x00000001); + stop_ = null; + if (stopBuilder_ != null) { + stopBuilder_.dispose(); + stopBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the stop location, along with the `Task`s associated with
+     * the stop. Some fields of the VehicleStop might not be present if this
+     * journey segment is part of `JourneySharingInfo`.
+     * 
+ * + * .maps.fleetengine.delivery.v1.VehicleStop stop = 1; + */ + public google.maps.fleetengine.delivery.v1.VehicleStop.Builder getStopBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getStopFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Specifies the stop location, along with the `Task`s associated with
+     * the stop. Some fields of the VehicleStop might not be present if this
+     * journey segment is part of `JourneySharingInfo`.
+     * 
+ * + * .maps.fleetengine.delivery.v1.VehicleStop stop = 1; + */ + public google.maps.fleetengine.delivery.v1.VehicleStopOrBuilder getStopOrBuilder() { + if (stopBuilder_ != null) { + return stopBuilder_.getMessageOrBuilder(); + } else { + return stop_ == null + ? google.maps.fleetengine.delivery.v1.VehicleStop.getDefaultInstance() + : stop_; + } + } + /** + * + * + *
+     * Specifies the stop location, along with the `Task`s associated with
+     * the stop. Some fields of the VehicleStop might not be present if this
+     * journey segment is part of `JourneySharingInfo`.
+     * 
+ * + * .maps.fleetengine.delivery.v1.VehicleStop stop = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.VehicleStop, + google.maps.fleetengine.delivery.v1.VehicleStop.Builder, + google.maps.fleetengine.delivery.v1.VehicleStopOrBuilder> + getStopFieldBuilder() { + if (stopBuilder_ == null) { + stopBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.VehicleStop, + google.maps.fleetengine.delivery.v1.VehicleStop.Builder, + google.maps.fleetengine.delivery.v1.VehicleStopOrBuilder>( + getStop(), getParentForChildren(), isClean()); + stop_ = null; + } + return stopBuilder_; + } + + private com.google.protobuf.Int32Value drivingDistanceMeters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + drivingDistanceMetersBuilder_; + /** + * + * + *
+     * Output only. The travel distance from the previous stop to this stop.
+     * If the current stop is the first stop in the list of journey
+     * segments, then the starting point is the vehicle's location recorded
+     * at the time that this stop was added to the list. This field might not be
+     * present if this journey segment is part of `JourneySharingInfo`.
+     * 
+ * + * + * .google.protobuf.Int32Value driving_distance_meters = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the drivingDistanceMeters field is set. + */ + public boolean hasDrivingDistanceMeters() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. The travel distance from the previous stop to this stop.
+     * If the current stop is the first stop in the list of journey
+     * segments, then the starting point is the vehicle's location recorded
+     * at the time that this stop was added to the list. This field might not be
+     * present if this journey segment is part of `JourneySharingInfo`.
+     * 
+ * + * + * .google.protobuf.Int32Value driving_distance_meters = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The drivingDistanceMeters. + */ + public com.google.protobuf.Int32Value getDrivingDistanceMeters() { + if (drivingDistanceMetersBuilder_ == null) { + return drivingDistanceMeters_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : drivingDistanceMeters_; + } else { + return drivingDistanceMetersBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The travel distance from the previous stop to this stop.
+     * If the current stop is the first stop in the list of journey
+     * segments, then the starting point is the vehicle's location recorded
+     * at the time that this stop was added to the list. This field might not be
+     * present if this journey segment is part of `JourneySharingInfo`.
+     * 
+ * + * + * .google.protobuf.Int32Value driving_distance_meters = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDrivingDistanceMeters(com.google.protobuf.Int32Value value) { + if (drivingDistanceMetersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + drivingDistanceMeters_ = value; + } else { + drivingDistanceMetersBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The travel distance from the previous stop to this stop.
+     * If the current stop is the first stop in the list of journey
+     * segments, then the starting point is the vehicle's location recorded
+     * at the time that this stop was added to the list. This field might not be
+     * present if this journey segment is part of `JourneySharingInfo`.
+     * 
+ * + * + * .google.protobuf.Int32Value driving_distance_meters = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDrivingDistanceMeters( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (drivingDistanceMetersBuilder_ == null) { + drivingDistanceMeters_ = builderForValue.build(); + } else { + drivingDistanceMetersBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The travel distance from the previous stop to this stop.
+     * If the current stop is the first stop in the list of journey
+     * segments, then the starting point is the vehicle's location recorded
+     * at the time that this stop was added to the list. This field might not be
+     * present if this journey segment is part of `JourneySharingInfo`.
+     * 
+ * + * + * .google.protobuf.Int32Value driving_distance_meters = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDrivingDistanceMeters(com.google.protobuf.Int32Value value) { + if (drivingDistanceMetersBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && drivingDistanceMeters_ != null + && drivingDistanceMeters_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getDrivingDistanceMetersBuilder().mergeFrom(value); + } else { + drivingDistanceMeters_ = value; + } + } else { + drivingDistanceMetersBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The travel distance from the previous stop to this stop.
+     * If the current stop is the first stop in the list of journey
+     * segments, then the starting point is the vehicle's location recorded
+     * at the time that this stop was added to the list. This field might not be
+     * present if this journey segment is part of `JourneySharingInfo`.
+     * 
+ * + * + * .google.protobuf.Int32Value driving_distance_meters = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDrivingDistanceMeters() { + bitField0_ = (bitField0_ & ~0x00000002); + drivingDistanceMeters_ = null; + if (drivingDistanceMetersBuilder_ != null) { + drivingDistanceMetersBuilder_.dispose(); + drivingDistanceMetersBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The travel distance from the previous stop to this stop.
+     * If the current stop is the first stop in the list of journey
+     * segments, then the starting point is the vehicle's location recorded
+     * at the time that this stop was added to the list. This field might not be
+     * present if this journey segment is part of `JourneySharingInfo`.
+     * 
+ * + * + * .google.protobuf.Int32Value driving_distance_meters = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Int32Value.Builder getDrivingDistanceMetersBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getDrivingDistanceMetersFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The travel distance from the previous stop to this stop.
+     * If the current stop is the first stop in the list of journey
+     * segments, then the starting point is the vehicle's location recorded
+     * at the time that this stop was added to the list. This field might not be
+     * present if this journey segment is part of `JourneySharingInfo`.
+     * 
+ * + * + * .google.protobuf.Int32Value driving_distance_meters = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Int32ValueOrBuilder getDrivingDistanceMetersOrBuilder() { + if (drivingDistanceMetersBuilder_ != null) { + return drivingDistanceMetersBuilder_.getMessageOrBuilder(); + } else { + return drivingDistanceMeters_ == null + ? com.google.protobuf.Int32Value.getDefaultInstance() + : drivingDistanceMeters_; + } + } + /** + * + * + *
+     * Output only. The travel distance from the previous stop to this stop.
+     * If the current stop is the first stop in the list of journey
+     * segments, then the starting point is the vehicle's location recorded
+     * at the time that this stop was added to the list. This field might not be
+     * present if this journey segment is part of `JourneySharingInfo`.
+     * 
+ * + * + * .google.protobuf.Int32Value driving_distance_meters = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder> + getDrivingDistanceMetersFieldBuilder() { + if (drivingDistanceMetersBuilder_ == null) { + drivingDistanceMetersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Int32Value, + com.google.protobuf.Int32Value.Builder, + com.google.protobuf.Int32ValueOrBuilder>( + getDrivingDistanceMeters(), getParentForChildren(), isClean()); + drivingDistanceMeters_ = null; + } + return drivingDistanceMetersBuilder_; + } + + private com.google.protobuf.Duration drivingDuration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + drivingDurationBuilder_; + /** + * + * + *
+     * Output only. The travel time from the previous stop to this stop.
+     * If the current stop is the first stop in the list of journey
+     * segments, then the starting point is the Vehicle's location recorded
+     * at the time that this stop was added to the list.
+     *
+     * If this field is defined in the path
+     * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or
+     * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST),
+     * then it may be populated with the value from
+     * `DeliveryVehicle.remaining_duration` (gRPC) or
+     * `DeliveryVehicle.remainingDuration` (REST).
+     * This provides the remaining driving duration from the driver app's latest
+     * known location rather than the driving time from the previous stop.
+     * 
+ * + * + * .google.protobuf.Duration driving_duration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the drivingDuration field is set. + */ + public boolean hasDrivingDuration() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. The travel time from the previous stop to this stop.
+     * If the current stop is the first stop in the list of journey
+     * segments, then the starting point is the Vehicle's location recorded
+     * at the time that this stop was added to the list.
+     *
+     * If this field is defined in the path
+     * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or
+     * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST),
+     * then it may be populated with the value from
+     * `DeliveryVehicle.remaining_duration` (gRPC) or
+     * `DeliveryVehicle.remainingDuration` (REST).
+     * This provides the remaining driving duration from the driver app's latest
+     * known location rather than the driving time from the previous stop.
+     * 
+ * + * + * .google.protobuf.Duration driving_duration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The drivingDuration. + */ + public com.google.protobuf.Duration getDrivingDuration() { + if (drivingDurationBuilder_ == null) { + return drivingDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : drivingDuration_; + } else { + return drivingDurationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The travel time from the previous stop to this stop.
+     * If the current stop is the first stop in the list of journey
+     * segments, then the starting point is the Vehicle's location recorded
+     * at the time that this stop was added to the list.
+     *
+     * If this field is defined in the path
+     * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or
+     * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST),
+     * then it may be populated with the value from
+     * `DeliveryVehicle.remaining_duration` (gRPC) or
+     * `DeliveryVehicle.remainingDuration` (REST).
+     * This provides the remaining driving duration from the driver app's latest
+     * known location rather than the driving time from the previous stop.
+     * 
+ * + * + * .google.protobuf.Duration driving_duration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDrivingDuration(com.google.protobuf.Duration value) { + if (drivingDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + drivingDuration_ = value; + } else { + drivingDurationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The travel time from the previous stop to this stop.
+     * If the current stop is the first stop in the list of journey
+     * segments, then the starting point is the Vehicle's location recorded
+     * at the time that this stop was added to the list.
+     *
+     * If this field is defined in the path
+     * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or
+     * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST),
+     * then it may be populated with the value from
+     * `DeliveryVehicle.remaining_duration` (gRPC) or
+     * `DeliveryVehicle.remainingDuration` (REST).
+     * This provides the remaining driving duration from the driver app's latest
+     * known location rather than the driving time from the previous stop.
+     * 
+ * + * + * .google.protobuf.Duration driving_duration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDrivingDuration(com.google.protobuf.Duration.Builder builderForValue) { + if (drivingDurationBuilder_ == null) { + drivingDuration_ = builderForValue.build(); + } else { + drivingDurationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The travel time from the previous stop to this stop.
+     * If the current stop is the first stop in the list of journey
+     * segments, then the starting point is the Vehicle's location recorded
+     * at the time that this stop was added to the list.
+     *
+     * If this field is defined in the path
+     * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or
+     * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST),
+     * then it may be populated with the value from
+     * `DeliveryVehicle.remaining_duration` (gRPC) or
+     * `DeliveryVehicle.remainingDuration` (REST).
+     * This provides the remaining driving duration from the driver app's latest
+     * known location rather than the driving time from the previous stop.
+     * 
+ * + * + * .google.protobuf.Duration driving_duration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDrivingDuration(com.google.protobuf.Duration value) { + if (drivingDurationBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && drivingDuration_ != null + && drivingDuration_ != com.google.protobuf.Duration.getDefaultInstance()) { + getDrivingDurationBuilder().mergeFrom(value); + } else { + drivingDuration_ = value; + } + } else { + drivingDurationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The travel time from the previous stop to this stop.
+     * If the current stop is the first stop in the list of journey
+     * segments, then the starting point is the Vehicle's location recorded
+     * at the time that this stop was added to the list.
+     *
+     * If this field is defined in the path
+     * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or
+     * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST),
+     * then it may be populated with the value from
+     * `DeliveryVehicle.remaining_duration` (gRPC) or
+     * `DeliveryVehicle.remainingDuration` (REST).
+     * This provides the remaining driving duration from the driver app's latest
+     * known location rather than the driving time from the previous stop.
+     * 
+ * + * + * .google.protobuf.Duration driving_duration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDrivingDuration() { + bitField0_ = (bitField0_ & ~0x00000004); + drivingDuration_ = null; + if (drivingDurationBuilder_ != null) { + drivingDurationBuilder_.dispose(); + drivingDurationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The travel time from the previous stop to this stop.
+     * If the current stop is the first stop in the list of journey
+     * segments, then the starting point is the Vehicle's location recorded
+     * at the time that this stop was added to the list.
+     *
+     * If this field is defined in the path
+     * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or
+     * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST),
+     * then it may be populated with the value from
+     * `DeliveryVehicle.remaining_duration` (gRPC) or
+     * `DeliveryVehicle.remainingDuration` (REST).
+     * This provides the remaining driving duration from the driver app's latest
+     * known location rather than the driving time from the previous stop.
+     * 
+ * + * + * .google.protobuf.Duration driving_duration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Duration.Builder getDrivingDurationBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getDrivingDurationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The travel time from the previous stop to this stop.
+     * If the current stop is the first stop in the list of journey
+     * segments, then the starting point is the Vehicle's location recorded
+     * at the time that this stop was added to the list.
+     *
+     * If this field is defined in the path
+     * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or
+     * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST),
+     * then it may be populated with the value from
+     * `DeliveryVehicle.remaining_duration` (gRPC) or
+     * `DeliveryVehicle.remainingDuration` (REST).
+     * This provides the remaining driving duration from the driver app's latest
+     * known location rather than the driving time from the previous stop.
+     * 
+ * + * + * .google.protobuf.Duration driving_duration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.DurationOrBuilder getDrivingDurationOrBuilder() { + if (drivingDurationBuilder_ != null) { + return drivingDurationBuilder_.getMessageOrBuilder(); + } else { + return drivingDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : drivingDuration_; + } + } + /** + * + * + *
+     * Output only. The travel time from the previous stop to this stop.
+     * If the current stop is the first stop in the list of journey
+     * segments, then the starting point is the Vehicle's location recorded
+     * at the time that this stop was added to the list.
+     *
+     * If this field is defined in the path
+     * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or
+     * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST),
+     * then it may be populated with the value from
+     * `DeliveryVehicle.remaining_duration` (gRPC) or
+     * `DeliveryVehicle.remainingDuration` (REST).
+     * This provides the remaining driving duration from the driver app's latest
+     * known location rather than the driving time from the previous stop.
+     * 
+ * + * + * .google.protobuf.Duration driving_duration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getDrivingDurationFieldBuilder() { + if (drivingDurationBuilder_ == null) { + drivingDurationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getDrivingDuration(), getParentForChildren(), isClean()); + drivingDuration_ = null; + } + return drivingDurationBuilder_; + } + + private java.util.List path_ = java.util.Collections.emptyList(); + + private void ensurePathIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + path_ = new java.util.ArrayList(path_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + pathBuilder_; + + /** + * + * + *
+     * Output only. The path from the previous stop to this stop. If the current
+     * stop is the first stop in the list of journey segments, then this is the
+     * path from the vehicle's current location to this stop at the time that the
+     * stop was added to the list. This field might not be present if this journey
+     * segment is part of `JourneySharingInfo`.
+     *
+     * If this field is defined in the path
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+     * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+     * (REST), then it may be populated with the `LatLng`s decoded from
+     * `DeliveryVehicle.current_route_segment` (gRPC) or
+     * `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving
+     * path from the driver app's latest known location rather than the path from
+     * the previous stop.
+     * 
+ * + * repeated .google.type.LatLng path = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getPathList() { + if (pathBuilder_ == null) { + return java.util.Collections.unmodifiableList(path_); + } else { + return pathBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. The path from the previous stop to this stop. If the current
+     * stop is the first stop in the list of journey segments, then this is the
+     * path from the vehicle's current location to this stop at the time that the
+     * stop was added to the list. This field might not be present if this journey
+     * segment is part of `JourneySharingInfo`.
+     *
+     * If this field is defined in the path
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+     * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+     * (REST), then it may be populated with the `LatLng`s decoded from
+     * `DeliveryVehicle.current_route_segment` (gRPC) or
+     * `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving
+     * path from the driver app's latest known location rather than the path from
+     * the previous stop.
+     * 
+ * + * repeated .google.type.LatLng path = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getPathCount() { + if (pathBuilder_ == null) { + return path_.size(); + } else { + return pathBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. The path from the previous stop to this stop. If the current
+     * stop is the first stop in the list of journey segments, then this is the
+     * path from the vehicle's current location to this stop at the time that the
+     * stop was added to the list. This field might not be present if this journey
+     * segment is part of `JourneySharingInfo`.
+     *
+     * If this field is defined in the path
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+     * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+     * (REST), then it may be populated with the `LatLng`s decoded from
+     * `DeliveryVehicle.current_route_segment` (gRPC) or
+     * `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving
+     * path from the driver app's latest known location rather than the path from
+     * the previous stop.
+     * 
+ * + * repeated .google.type.LatLng path = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.type.LatLng getPath(int index) { + if (pathBuilder_ == null) { + return path_.get(index); + } else { + return pathBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. The path from the previous stop to this stop. If the current
+     * stop is the first stop in the list of journey segments, then this is the
+     * path from the vehicle's current location to this stop at the time that the
+     * stop was added to the list. This field might not be present if this journey
+     * segment is part of `JourneySharingInfo`.
+     *
+     * If this field is defined in the path
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+     * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+     * (REST), then it may be populated with the `LatLng`s decoded from
+     * `DeliveryVehicle.current_route_segment` (gRPC) or
+     * `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving
+     * path from the driver app's latest known location rather than the path from
+     * the previous stop.
+     * 
+ * + * repeated .google.type.LatLng path = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPath(int index, com.google.type.LatLng value) { + if (pathBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePathIsMutable(); + path_.set(index, value); + onChanged(); + } else { + pathBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. The path from the previous stop to this stop. If the current
+     * stop is the first stop in the list of journey segments, then this is the
+     * path from the vehicle's current location to this stop at the time that the
+     * stop was added to the list. This field might not be present if this journey
+     * segment is part of `JourneySharingInfo`.
+     *
+     * If this field is defined in the path
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+     * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+     * (REST), then it may be populated with the `LatLng`s decoded from
+     * `DeliveryVehicle.current_route_segment` (gRPC) or
+     * `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving
+     * path from the driver app's latest known location rather than the path from
+     * the previous stop.
+     * 
+ * + * repeated .google.type.LatLng path = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPath(int index, com.google.type.LatLng.Builder builderForValue) { + if (pathBuilder_ == null) { + ensurePathIsMutable(); + path_.set(index, builderForValue.build()); + onChanged(); + } else { + pathBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The path from the previous stop to this stop. If the current
+     * stop is the first stop in the list of journey segments, then this is the
+     * path from the vehicle's current location to this stop at the time that the
+     * stop was added to the list. This field might not be present if this journey
+     * segment is part of `JourneySharingInfo`.
+     *
+     * If this field is defined in the path
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+     * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+     * (REST), then it may be populated with the `LatLng`s decoded from
+     * `DeliveryVehicle.current_route_segment` (gRPC) or
+     * `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving
+     * path from the driver app's latest known location rather than the path from
+     * the previous stop.
+     * 
+ * + * repeated .google.type.LatLng path = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPath(com.google.type.LatLng value) { + if (pathBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePathIsMutable(); + path_.add(value); + onChanged(); + } else { + pathBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. The path from the previous stop to this stop. If the current
+     * stop is the first stop in the list of journey segments, then this is the
+     * path from the vehicle's current location to this stop at the time that the
+     * stop was added to the list. This field might not be present if this journey
+     * segment is part of `JourneySharingInfo`.
+     *
+     * If this field is defined in the path
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+     * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+     * (REST), then it may be populated with the `LatLng`s decoded from
+     * `DeliveryVehicle.current_route_segment` (gRPC) or
+     * `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving
+     * path from the driver app's latest known location rather than the path from
+     * the previous stop.
+     * 
+ * + * repeated .google.type.LatLng path = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPath(int index, com.google.type.LatLng value) { + if (pathBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePathIsMutable(); + path_.add(index, value); + onChanged(); + } else { + pathBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. The path from the previous stop to this stop. If the current
+     * stop is the first stop in the list of journey segments, then this is the
+     * path from the vehicle's current location to this stop at the time that the
+     * stop was added to the list. This field might not be present if this journey
+     * segment is part of `JourneySharingInfo`.
+     *
+     * If this field is defined in the path
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+     * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+     * (REST), then it may be populated with the `LatLng`s decoded from
+     * `DeliveryVehicle.current_route_segment` (gRPC) or
+     * `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving
+     * path from the driver app's latest known location rather than the path from
+     * the previous stop.
+     * 
+ * + * repeated .google.type.LatLng path = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPath(com.google.type.LatLng.Builder builderForValue) { + if (pathBuilder_ == null) { + ensurePathIsMutable(); + path_.add(builderForValue.build()); + onChanged(); + } else { + pathBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The path from the previous stop to this stop. If the current
+     * stop is the first stop in the list of journey segments, then this is the
+     * path from the vehicle's current location to this stop at the time that the
+     * stop was added to the list. This field might not be present if this journey
+     * segment is part of `JourneySharingInfo`.
+     *
+     * If this field is defined in the path
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+     * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+     * (REST), then it may be populated with the `LatLng`s decoded from
+     * `DeliveryVehicle.current_route_segment` (gRPC) or
+     * `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving
+     * path from the driver app's latest known location rather than the path from
+     * the previous stop.
+     * 
+ * + * repeated .google.type.LatLng path = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPath(int index, com.google.type.LatLng.Builder builderForValue) { + if (pathBuilder_ == null) { + ensurePathIsMutable(); + path_.add(index, builderForValue.build()); + onChanged(); + } else { + pathBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The path from the previous stop to this stop. If the current
+     * stop is the first stop in the list of journey segments, then this is the
+     * path from the vehicle's current location to this stop at the time that the
+     * stop was added to the list. This field might not be present if this journey
+     * segment is part of `JourneySharingInfo`.
+     *
+     * If this field is defined in the path
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+     * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+     * (REST), then it may be populated with the `LatLng`s decoded from
+     * `DeliveryVehicle.current_route_segment` (gRPC) or
+     * `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving
+     * path from the driver app's latest known location rather than the path from
+     * the previous stop.
+     * 
+ * + * repeated .google.type.LatLng path = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllPath(java.lang.Iterable values) { + if (pathBuilder_ == null) { + ensurePathIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, path_); + onChanged(); + } else { + pathBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. The path from the previous stop to this stop. If the current
+     * stop is the first stop in the list of journey segments, then this is the
+     * path from the vehicle's current location to this stop at the time that the
+     * stop was added to the list. This field might not be present if this journey
+     * segment is part of `JourneySharingInfo`.
+     *
+     * If this field is defined in the path
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+     * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+     * (REST), then it may be populated with the `LatLng`s decoded from
+     * `DeliveryVehicle.current_route_segment` (gRPC) or
+     * `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving
+     * path from the driver app's latest known location rather than the path from
+     * the previous stop.
+     * 
+ * + * repeated .google.type.LatLng path = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearPath() { + if (pathBuilder_ == null) { + path_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + pathBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. The path from the previous stop to this stop. If the current
+     * stop is the first stop in the list of journey segments, then this is the
+     * path from the vehicle's current location to this stop at the time that the
+     * stop was added to the list. This field might not be present if this journey
+     * segment is part of `JourneySharingInfo`.
+     *
+     * If this field is defined in the path
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+     * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+     * (REST), then it may be populated with the `LatLng`s decoded from
+     * `DeliveryVehicle.current_route_segment` (gRPC) or
+     * `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving
+     * path from the driver app's latest known location rather than the path from
+     * the previous stop.
+     * 
+ * + * repeated .google.type.LatLng path = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removePath(int index) { + if (pathBuilder_ == null) { + ensurePathIsMutable(); + path_.remove(index); + onChanged(); + } else { + pathBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. The path from the previous stop to this stop. If the current
+     * stop is the first stop in the list of journey segments, then this is the
+     * path from the vehicle's current location to this stop at the time that the
+     * stop was added to the list. This field might not be present if this journey
+     * segment is part of `JourneySharingInfo`.
+     *
+     * If this field is defined in the path
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+     * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+     * (REST), then it may be populated with the `LatLng`s decoded from
+     * `DeliveryVehicle.current_route_segment` (gRPC) or
+     * `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving
+     * path from the driver app's latest known location rather than the path from
+     * the previous stop.
+     * 
+ * + * repeated .google.type.LatLng path = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.type.LatLng.Builder getPathBuilder(int index) { + return getPathFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. The path from the previous stop to this stop. If the current
+     * stop is the first stop in the list of journey segments, then this is the
+     * path from the vehicle's current location to this stop at the time that the
+     * stop was added to the list. This field might not be present if this journey
+     * segment is part of `JourneySharingInfo`.
+     *
+     * If this field is defined in the path
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+     * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+     * (REST), then it may be populated with the `LatLng`s decoded from
+     * `DeliveryVehicle.current_route_segment` (gRPC) or
+     * `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving
+     * path from the driver app's latest known location rather than the path from
+     * the previous stop.
+     * 
+ * + * repeated .google.type.LatLng path = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.type.LatLngOrBuilder getPathOrBuilder(int index) { + if (pathBuilder_ == null) { + return path_.get(index); + } else { + return pathBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. The path from the previous stop to this stop. If the current
+     * stop is the first stop in the list of journey segments, then this is the
+     * path from the vehicle's current location to this stop at the time that the
+     * stop was added to the list. This field might not be present if this journey
+     * segment is part of `JourneySharingInfo`.
+     *
+     * If this field is defined in the path
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+     * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+     * (REST), then it may be populated with the `LatLng`s decoded from
+     * `DeliveryVehicle.current_route_segment` (gRPC) or
+     * `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving
+     * path from the driver app's latest known location rather than the path from
+     * the previous stop.
+     * 
+ * + * repeated .google.type.LatLng path = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getPathOrBuilderList() { + if (pathBuilder_ != null) { + return pathBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(path_); + } + } + /** + * + * + *
+     * Output only. The path from the previous stop to this stop. If the current
+     * stop is the first stop in the list of journey segments, then this is the
+     * path from the vehicle's current location to this stop at the time that the
+     * stop was added to the list. This field might not be present if this journey
+     * segment is part of `JourneySharingInfo`.
+     *
+     * If this field is defined in the path
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+     * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+     * (REST), then it may be populated with the `LatLng`s decoded from
+     * `DeliveryVehicle.current_route_segment` (gRPC) or
+     * `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving
+     * path from the driver app's latest known location rather than the path from
+     * the previous stop.
+     * 
+ * + * repeated .google.type.LatLng path = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.type.LatLng.Builder addPathBuilder() { + return getPathFieldBuilder().addBuilder(com.google.type.LatLng.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. The path from the previous stop to this stop. If the current
+     * stop is the first stop in the list of journey segments, then this is the
+     * path from the vehicle's current location to this stop at the time that the
+     * stop was added to the list. This field might not be present if this journey
+     * segment is part of `JourneySharingInfo`.
+     *
+     * If this field is defined in the path
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+     * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+     * (REST), then it may be populated with the `LatLng`s decoded from
+     * `DeliveryVehicle.current_route_segment` (gRPC) or
+     * `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving
+     * path from the driver app's latest known location rather than the path from
+     * the previous stop.
+     * 
+ * + * repeated .google.type.LatLng path = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.type.LatLng.Builder addPathBuilder(int index) { + return getPathFieldBuilder().addBuilder(index, com.google.type.LatLng.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. The path from the previous stop to this stop. If the current
+     * stop is the first stop in the list of journey segments, then this is the
+     * path from the vehicle's current location to this stop at the time that the
+     * stop was added to the list. This field might not be present if this journey
+     * segment is part of `JourneySharingInfo`.
+     *
+     * If this field is defined in the path
+     * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+     * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+     * (REST), then it may be populated with the `LatLng`s decoded from
+     * `DeliveryVehicle.current_route_segment` (gRPC) or
+     * `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving
+     * path from the driver app's latest known location rather than the path from
+     * the previous stop.
+     * 
+ * + * repeated .google.type.LatLng path = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getPathBuilderList() { + return getPathFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + getPathFieldBuilder() { + if (pathBuilder_ == null) { + pathBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.type.LatLng, + com.google.type.LatLng.Builder, + com.google.type.LatLngOrBuilder>( + path_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + path_ = null; + } + return pathBuilder_; + } + + @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.delivery.v1.VehicleJourneySegment) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.delivery.v1.VehicleJourneySegment) + private static final google.maps.fleetengine.delivery.v1.VehicleJourneySegment DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new google.maps.fleetengine.delivery.v1.VehicleJourneySegment(); + } + + public static google.maps.fleetengine.delivery.v1.VehicleJourneySegment getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VehicleJourneySegment 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 google.maps.fleetengine.delivery.v1.VehicleJourneySegment getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/VehicleJourneySegmentOrBuilder.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/VehicleJourneySegmentOrBuilder.java new file mode 100644 index 000000000000..27c231d019d5 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/VehicleJourneySegmentOrBuilder.java @@ -0,0 +1,317 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_vehicles.proto + +package google.maps.fleetengine.delivery.v1; + +public interface VehicleJourneySegmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.delivery.v1.VehicleJourneySegment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Specifies the stop location, along with the `Task`s associated with
+   * the stop. Some fields of the VehicleStop might not be present if this
+   * journey segment is part of `JourneySharingInfo`.
+   * 
+ * + * .maps.fleetengine.delivery.v1.VehicleStop stop = 1; + * + * @return Whether the stop field is set. + */ + boolean hasStop(); + /** + * + * + *
+   * Specifies the stop location, along with the `Task`s associated with
+   * the stop. Some fields of the VehicleStop might not be present if this
+   * journey segment is part of `JourneySharingInfo`.
+   * 
+ * + * .maps.fleetengine.delivery.v1.VehicleStop stop = 1; + * + * @return The stop. + */ + google.maps.fleetengine.delivery.v1.VehicleStop getStop(); + /** + * + * + *
+   * Specifies the stop location, along with the `Task`s associated with
+   * the stop. Some fields of the VehicleStop might not be present if this
+   * journey segment is part of `JourneySharingInfo`.
+   * 
+ * + * .maps.fleetengine.delivery.v1.VehicleStop stop = 1; + */ + google.maps.fleetengine.delivery.v1.VehicleStopOrBuilder getStopOrBuilder(); + + /** + * + * + *
+   * Output only. The travel distance from the previous stop to this stop.
+   * If the current stop is the first stop in the list of journey
+   * segments, then the starting point is the vehicle's location recorded
+   * at the time that this stop was added to the list. This field might not be
+   * present if this journey segment is part of `JourneySharingInfo`.
+   * 
+ * + * + * .google.protobuf.Int32Value driving_distance_meters = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the drivingDistanceMeters field is set. + */ + boolean hasDrivingDistanceMeters(); + /** + * + * + *
+   * Output only. The travel distance from the previous stop to this stop.
+   * If the current stop is the first stop in the list of journey
+   * segments, then the starting point is the vehicle's location recorded
+   * at the time that this stop was added to the list. This field might not be
+   * present if this journey segment is part of `JourneySharingInfo`.
+   * 
+ * + * + * .google.protobuf.Int32Value driving_distance_meters = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The drivingDistanceMeters. + */ + com.google.protobuf.Int32Value getDrivingDistanceMeters(); + /** + * + * + *
+   * Output only. The travel distance from the previous stop to this stop.
+   * If the current stop is the first stop in the list of journey
+   * segments, then the starting point is the vehicle's location recorded
+   * at the time that this stop was added to the list. This field might not be
+   * present if this journey segment is part of `JourneySharingInfo`.
+   * 
+ * + * + * .google.protobuf.Int32Value driving_distance_meters = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.Int32ValueOrBuilder getDrivingDistanceMetersOrBuilder(); + + /** + * + * + *
+   * Output only. The travel time from the previous stop to this stop.
+   * If the current stop is the first stop in the list of journey
+   * segments, then the starting point is the Vehicle's location recorded
+   * at the time that this stop was added to the list.
+   *
+   * If this field is defined in the path
+   * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or
+   * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST),
+   * then it may be populated with the value from
+   * `DeliveryVehicle.remaining_duration` (gRPC) or
+   * `DeliveryVehicle.remainingDuration` (REST).
+   * This provides the remaining driving duration from the driver app's latest
+   * known location rather than the driving time from the previous stop.
+   * 
+ * + * + * .google.protobuf.Duration driving_duration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the drivingDuration field is set. + */ + boolean hasDrivingDuration(); + /** + * + * + *
+   * Output only. The travel time from the previous stop to this stop.
+   * If the current stop is the first stop in the list of journey
+   * segments, then the starting point is the Vehicle's location recorded
+   * at the time that this stop was added to the list.
+   *
+   * If this field is defined in the path
+   * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or
+   * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST),
+   * then it may be populated with the value from
+   * `DeliveryVehicle.remaining_duration` (gRPC) or
+   * `DeliveryVehicle.remainingDuration` (REST).
+   * This provides the remaining driving duration from the driver app's latest
+   * known location rather than the driving time from the previous stop.
+   * 
+ * + * + * .google.protobuf.Duration driving_duration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The drivingDuration. + */ + com.google.protobuf.Duration getDrivingDuration(); + /** + * + * + *
+   * Output only. The travel time from the previous stop to this stop.
+   * If the current stop is the first stop in the list of journey
+   * segments, then the starting point is the Vehicle's location recorded
+   * at the time that this stop was added to the list.
+   *
+   * If this field is defined in the path
+   * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or
+   * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST),
+   * then it may be populated with the value from
+   * `DeliveryVehicle.remaining_duration` (gRPC) or
+   * `DeliveryVehicle.remainingDuration` (REST).
+   * This provides the remaining driving duration from the driver app's latest
+   * known location rather than the driving time from the previous stop.
+   * 
+ * + * + * .google.protobuf.Duration driving_duration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.DurationOrBuilder getDrivingDurationOrBuilder(); + + /** + * + * + *
+   * Output only. The path from the previous stop to this stop. If the current
+   * stop is the first stop in the list of journey segments, then this is the
+   * path from the vehicle's current location to this stop at the time that the
+   * stop was added to the list. This field might not be present if this journey
+   * segment is part of `JourneySharingInfo`.
+   *
+   * If this field is defined in the path
+   * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+   * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+   * (REST), then it may be populated with the `LatLng`s decoded from
+   * `DeliveryVehicle.current_route_segment` (gRPC) or
+   * `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving
+   * path from the driver app's latest known location rather than the path from
+   * the previous stop.
+   * 
+ * + * repeated .google.type.LatLng path = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getPathList(); + /** + * + * + *
+   * Output only. The path from the previous stop to this stop. If the current
+   * stop is the first stop in the list of journey segments, then this is the
+   * path from the vehicle's current location to this stop at the time that the
+   * stop was added to the list. This field might not be present if this journey
+   * segment is part of `JourneySharingInfo`.
+   *
+   * If this field is defined in the path
+   * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+   * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+   * (REST), then it may be populated with the `LatLng`s decoded from
+   * `DeliveryVehicle.current_route_segment` (gRPC) or
+   * `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving
+   * path from the driver app's latest known location rather than the path from
+   * the previous stop.
+   * 
+ * + * repeated .google.type.LatLng path = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.type.LatLng getPath(int index); + /** + * + * + *
+   * Output only. The path from the previous stop to this stop. If the current
+   * stop is the first stop in the list of journey segments, then this is the
+   * path from the vehicle's current location to this stop at the time that the
+   * stop was added to the list. This field might not be present if this journey
+   * segment is part of `JourneySharingInfo`.
+   *
+   * If this field is defined in the path
+   * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+   * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+   * (REST), then it may be populated with the `LatLng`s decoded from
+   * `DeliveryVehicle.current_route_segment` (gRPC) or
+   * `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving
+   * path from the driver app's latest known location rather than the path from
+   * the previous stop.
+   * 
+ * + * repeated .google.type.LatLng path = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getPathCount(); + /** + * + * + *
+   * Output only. The path from the previous stop to this stop. If the current
+   * stop is the first stop in the list of journey segments, then this is the
+   * path from the vehicle's current location to this stop at the time that the
+   * stop was added to the list. This field might not be present if this journey
+   * segment is part of `JourneySharingInfo`.
+   *
+   * If this field is defined in the path
+   * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+   * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+   * (REST), then it may be populated with the `LatLng`s decoded from
+   * `DeliveryVehicle.current_route_segment` (gRPC) or
+   * `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving
+   * path from the driver app's latest known location rather than the path from
+   * the previous stop.
+   * 
+ * + * repeated .google.type.LatLng path = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getPathOrBuilderList(); + /** + * + * + *
+   * Output only. The path from the previous stop to this stop. If the current
+   * stop is the first stop in the list of journey segments, then this is the
+   * path from the vehicle's current location to this stop at the time that the
+   * stop was added to the list. This field might not be present if this journey
+   * segment is part of `JourneySharingInfo`.
+   *
+   * If this field is defined in the path
+   * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path`
+   * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path`
+   * (REST), then it may be populated with the `LatLng`s decoded from
+   * `DeliveryVehicle.current_route_segment` (gRPC) or
+   * `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving
+   * path from the driver app's latest known location rather than the path from
+   * the previous stop.
+   * 
+ * + * repeated .google.type.LatLng path = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.type.LatLngOrBuilder getPathOrBuilder(int index); +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/VehicleStop.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/VehicleStop.java new file mode 100644 index 000000000000..366d587b2c9a --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/VehicleStop.java @@ -0,0 +1,3047 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_vehicles.proto + +package google.maps.fleetengine.delivery.v1; + +/** + * + * + *
+ * Describes a point where a Vehicle stops to perform one or more `Task`s.
+ * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.VehicleStop} + */ +public final class VehicleStop extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.delivery.v1.VehicleStop) + VehicleStopOrBuilder { + private static final long serialVersionUID = 0L; + // Use VehicleStop.newBuilder() to construct. + private VehicleStop(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VehicleStop() { + tasks_ = java.util.Collections.emptyList(); + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VehicleStop(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryVehicles + .internal_static_maps_fleetengine_delivery_v1_VehicleStop_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryVehicles + .internal_static_maps_fleetengine_delivery_v1_VehicleStop_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.VehicleStop.class, + google.maps.fleetengine.delivery.v1.VehicleStop.Builder.class); + } + + /** + * + * + *
+   * The current state of a `VehicleStop`.
+   * 
+ * + * Protobuf enum {@code maps.fleetengine.delivery.v1.VehicleStop.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * Created, but not actively routing.
+     * 
+ * + * NEW = 1; + */ + NEW(1), + /** + * + * + *
+     * Assigned and actively routing.
+     * 
+ * + * ENROUTE = 2; + */ + ENROUTE(2), + /** + * + * + *
+     * Arrived at stop. Assumes that when the Vehicle is routing to the next
+     * stop, that all previous stops have been completed.
+     * 
+ * + * ARRIVED = 3; + */ + ARRIVED(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Created, but not actively routing.
+     * 
+ * + * NEW = 1; + */ + public static final int NEW_VALUE = 1; + /** + * + * + *
+     * Assigned and actively routing.
+     * 
+ * + * ENROUTE = 2; + */ + public static final int ENROUTE_VALUE = 2; + /** + * + * + *
+     * Arrived at stop. Assumes that when the Vehicle is routing to the next
+     * stop, that all previous stops have been completed.
+     * 
+ * + * ARRIVED = 3; + */ + public static final int ARRIVED_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 State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return NEW; + case 2: + return ENROUTE; + case 3: + return ARRIVED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.VehicleStop.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:maps.fleetengine.delivery.v1.VehicleStop.State) + } + + public interface TaskInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.delivery.v1.VehicleStop.TaskInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The Task ID. This field won't be populated in the response of either a
+     * `GetTask`, or a `SearchTasks` call. Task IDs are 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 task_id = 1; + * + * @return The taskId. + */ + java.lang.String getTaskId(); + /** + * + * + *
+     * The Task ID. This field won't be populated in the response of either a
+     * `GetTask`, or a `SearchTasks` call. Task IDs are 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 task_id = 1; + * + * @return The bytes for taskId. + */ + com.google.protobuf.ByteString getTaskIdBytes(); + + /** + * + * + *
+     * Output only. The time required to perform the Task.
+     * 
+ * + * + * .google.protobuf.Duration task_duration = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the taskDuration field is set. + */ + boolean hasTaskDuration(); + /** + * + * + *
+     * Output only. The time required to perform the Task.
+     * 
+ * + * + * .google.protobuf.Duration task_duration = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The taskDuration. + */ + com.google.protobuf.Duration getTaskDuration(); + /** + * + * + *
+     * Output only. The time required to perform the Task.
+     * 
+ * + * + * .google.protobuf.Duration task_duration = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.DurationOrBuilder getTaskDurationOrBuilder(); + + /** + * + * + *
+     * Output only. The time window during which the task should be completed.
+     * This is only set in the response to `GetDeliveryVehicle`.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the targetTimeWindow field is set. + */ + boolean hasTargetTimeWindow(); + /** + * + * + *
+     * Output only. The time window during which the task should be completed.
+     * This is only set in the response to `GetDeliveryVehicle`.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The targetTimeWindow. + */ + google.maps.fleetengine.delivery.v1.TimeWindow getTargetTimeWindow(); + /** + * + * + *
+     * Output only. The time window during which the task should be completed.
+     * This is only set in the response to `GetDeliveryVehicle`.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + google.maps.fleetengine.delivery.v1.TimeWindowOrBuilder getTargetTimeWindowOrBuilder(); + } + /** + * + * + *
+   * Additional information about the Task performed at this stop.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.VehicleStop.TaskInfo} + */ + public static final class TaskInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:maps.fleetengine.delivery.v1.VehicleStop.TaskInfo) + TaskInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use TaskInfo.newBuilder() to construct. + private TaskInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TaskInfo() { + taskId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TaskInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryVehicles + .internal_static_maps_fleetengine_delivery_v1_VehicleStop_TaskInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryVehicles + .internal_static_maps_fleetengine_delivery_v1_VehicleStop_TaskInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo.class, + google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo.Builder.class); + } + + public static final int TASK_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object taskId_ = ""; + /** + * + * + *
+     * The Task ID. This field won't be populated in the response of either a
+     * `GetTask`, or a `SearchTasks` call. Task IDs are 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 task_id = 1; + * + * @return The taskId. + */ + @java.lang.Override + public java.lang.String getTaskId() { + java.lang.Object ref = taskId_; + 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(); + taskId_ = s; + return s; + } + } + /** + * + * + *
+     * The Task ID. This field won't be populated in the response of either a
+     * `GetTask`, or a `SearchTasks` call. Task IDs are 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 task_id = 1; + * + * @return The bytes for taskId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTaskIdBytes() { + java.lang.Object ref = taskId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + taskId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TASK_DURATION_FIELD_NUMBER = 2; + private com.google.protobuf.Duration taskDuration_; + /** + * + * + *
+     * Output only. The time required to perform the Task.
+     * 
+ * + * + * .google.protobuf.Duration task_duration = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the taskDuration field is set. + */ + @java.lang.Override + public boolean hasTaskDuration() { + return taskDuration_ != null; + } + /** + * + * + *
+     * Output only. The time required to perform the Task.
+     * 
+ * + * + * .google.protobuf.Duration task_duration = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The taskDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getTaskDuration() { + return taskDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : taskDuration_; + } + /** + * + * + *
+     * Output only. The time required to perform the Task.
+     * 
+ * + * + * .google.protobuf.Duration task_duration = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTaskDurationOrBuilder() { + return taskDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : taskDuration_; + } + + public static final int TARGET_TIME_WINDOW_FIELD_NUMBER = 3; + private google.maps.fleetengine.delivery.v1.TimeWindow targetTimeWindow_; + /** + * + * + *
+     * Output only. The time window during which the task should be completed.
+     * This is only set in the response to `GetDeliveryVehicle`.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the targetTimeWindow field is set. + */ + @java.lang.Override + public boolean hasTargetTimeWindow() { + return targetTimeWindow_ != null; + } + /** + * + * + *
+     * Output only. The time window during which the task should be completed.
+     * This is only set in the response to `GetDeliveryVehicle`.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The targetTimeWindow. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TimeWindow getTargetTimeWindow() { + return targetTimeWindow_ == null + ? google.maps.fleetengine.delivery.v1.TimeWindow.getDefaultInstance() + : targetTimeWindow_; + } + /** + * + * + *
+     * Output only. The time window during which the task should be completed.
+     * This is only set in the response to `GetDeliveryVehicle`.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.TimeWindowOrBuilder getTargetTimeWindowOrBuilder() { + return targetTimeWindow_ == null + ? google.maps.fleetengine.delivery.v1.TimeWindow.getDefaultInstance() + : targetTimeWindow_; + } + + 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(taskId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, taskId_); + } + if (taskDuration_ != null) { + output.writeMessage(2, getTaskDuration()); + } + if (targetTimeWindow_ != null) { + output.writeMessage(3, getTargetTimeWindow()); + } + 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(taskId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, taskId_); + } + if (taskDuration_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTaskDuration()); + } + if (targetTimeWindow_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTargetTimeWindow()); + } + 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 google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo)) { + return super.equals(obj); + } + google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo other = + (google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo) obj; + + if (!getTaskId().equals(other.getTaskId())) return false; + if (hasTaskDuration() != other.hasTaskDuration()) return false; + if (hasTaskDuration()) { + if (!getTaskDuration().equals(other.getTaskDuration())) return false; + } + if (hasTargetTimeWindow() != other.hasTargetTimeWindow()) return false; + if (hasTargetTimeWindow()) { + if (!getTargetTimeWindow().equals(other.getTargetTimeWindow())) 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) + TASK_ID_FIELD_NUMBER; + hash = (53 * hash) + getTaskId().hashCode(); + if (hasTaskDuration()) { + hash = (37 * hash) + TASK_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getTaskDuration().hashCode(); + } + if (hasTargetTimeWindow()) { + hash = (37 * hash) + TARGET_TIME_WINDOW_FIELD_NUMBER; + hash = (53 * hash) + getTargetTimeWindow().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo 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 google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo 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 google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo 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( + google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo 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; + } + /** + * + * + *
+     * Additional information about the Task performed at this stop.
+     * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.VehicleStop.TaskInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.delivery.v1.VehicleStop.TaskInfo) + google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryVehicles + .internal_static_maps_fleetengine_delivery_v1_VehicleStop_TaskInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryVehicles + .internal_static_maps_fleetengine_delivery_v1_VehicleStop_TaskInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo.class, + google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo.Builder.class); + } + + // Construct using google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + taskId_ = ""; + taskDuration_ = null; + if (taskDurationBuilder_ != null) { + taskDurationBuilder_.dispose(); + taskDurationBuilder_ = null; + } + targetTimeWindow_ = null; + if (targetTimeWindowBuilder_ != null) { + targetTimeWindowBuilder_.dispose(); + targetTimeWindowBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return google.maps.fleetengine.delivery.v1.DeliveryVehicles + .internal_static_maps_fleetengine_delivery_v1_VehicleStop_TaskInfo_descriptor; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo getDefaultInstanceForType() { + return google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo.getDefaultInstance(); + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo build() { + google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo buildPartial() { + google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo result = + new google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.taskId_ = taskId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.taskDuration_ = + taskDurationBuilder_ == null ? taskDuration_ : taskDurationBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.targetTimeWindow_ = + targetTimeWindowBuilder_ == null + ? targetTimeWindow_ + : targetTimeWindowBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo) { + return mergeFrom((google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo other) { + if (other == google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo.getDefaultInstance()) + return this; + if (!other.getTaskId().isEmpty()) { + taskId_ = other.taskId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasTaskDuration()) { + mergeTaskDuration(other.getTaskDuration()); + } + if (other.hasTargetTimeWindow()) { + mergeTargetTimeWindow(other.getTargetTimeWindow()); + } + 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: + { + taskId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getTaskDurationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + getTargetTimeWindowFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object taskId_ = ""; + /** + * + * + *
+       * The Task ID. This field won't be populated in the response of either a
+       * `GetTask`, or a `SearchTasks` call. Task IDs are 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 task_id = 1; + * + * @return The taskId. + */ + public java.lang.String getTaskId() { + java.lang.Object ref = taskId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + taskId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The Task ID. This field won't be populated in the response of either a
+       * `GetTask`, or a `SearchTasks` call. Task IDs are 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 task_id = 1; + * + * @return The bytes for taskId. + */ + public com.google.protobuf.ByteString getTaskIdBytes() { + java.lang.Object ref = taskId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + taskId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The Task ID. This field won't be populated in the response of either a
+       * `GetTask`, or a `SearchTasks` call. Task IDs are 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 task_id = 1; + * + * @param value The taskId to set. + * @return This builder for chaining. + */ + public Builder setTaskId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + taskId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The Task ID. This field won't be populated in the response of either a
+       * `GetTask`, or a `SearchTasks` call. Task IDs are 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 task_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearTaskId() { + taskId_ = getDefaultInstance().getTaskId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The Task ID. This field won't be populated in the response of either a
+       * `GetTask`, or a `SearchTasks` call. Task IDs are 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 task_id = 1; + * + * @param value The bytes for taskId to set. + * @return This builder for chaining. + */ + public Builder setTaskIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + taskId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Duration taskDuration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + taskDurationBuilder_; + /** + * + * + *
+       * Output only. The time required to perform the Task.
+       * 
+ * + * + * .google.protobuf.Duration task_duration = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the taskDuration field is set. + */ + public boolean hasTaskDuration() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * Output only. The time required to perform the Task.
+       * 
+ * + * + * .google.protobuf.Duration task_duration = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The taskDuration. + */ + public com.google.protobuf.Duration getTaskDuration() { + if (taskDurationBuilder_ == null) { + return taskDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : taskDuration_; + } else { + return taskDurationBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Output only. The time required to perform the Task.
+       * 
+ * + * + * .google.protobuf.Duration task_duration = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTaskDuration(com.google.protobuf.Duration value) { + if (taskDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + taskDuration_ = value; + } else { + taskDurationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The time required to perform the Task.
+       * 
+ * + * + * .google.protobuf.Duration task_duration = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTaskDuration(com.google.protobuf.Duration.Builder builderForValue) { + if (taskDurationBuilder_ == null) { + taskDuration_ = builderForValue.build(); + } else { + taskDurationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The time required to perform the Task.
+       * 
+ * + * + * .google.protobuf.Duration task_duration = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeTaskDuration(com.google.protobuf.Duration value) { + if (taskDurationBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && taskDuration_ != null + && taskDuration_ != com.google.protobuf.Duration.getDefaultInstance()) { + getTaskDurationBuilder().mergeFrom(value); + } else { + taskDuration_ = value; + } + } else { + taskDurationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The time required to perform the Task.
+       * 
+ * + * + * .google.protobuf.Duration task_duration = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearTaskDuration() { + bitField0_ = (bitField0_ & ~0x00000002); + taskDuration_ = null; + if (taskDurationBuilder_ != null) { + taskDurationBuilder_.dispose(); + taskDurationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The time required to perform the Task.
+       * 
+ * + * + * .google.protobuf.Duration task_duration = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Duration.Builder getTaskDurationBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getTaskDurationFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Output only. The time required to perform the Task.
+       * 
+ * + * + * .google.protobuf.Duration task_duration = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.DurationOrBuilder getTaskDurationOrBuilder() { + if (taskDurationBuilder_ != null) { + return taskDurationBuilder_.getMessageOrBuilder(); + } else { + return taskDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : taskDuration_; + } + } + /** + * + * + *
+       * Output only. The time required to perform the Task.
+       * 
+ * + * + * .google.protobuf.Duration task_duration = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTaskDurationFieldBuilder() { + if (taskDurationBuilder_ == null) { + taskDurationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getTaskDuration(), getParentForChildren(), isClean()); + taskDuration_ = null; + } + return taskDurationBuilder_; + } + + private google.maps.fleetengine.delivery.v1.TimeWindow targetTimeWindow_; + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.TimeWindow, + google.maps.fleetengine.delivery.v1.TimeWindow.Builder, + google.maps.fleetengine.delivery.v1.TimeWindowOrBuilder> + targetTimeWindowBuilder_; + /** + * + * + *
+       * Output only. The time window during which the task should be completed.
+       * This is only set in the response to `GetDeliveryVehicle`.
+       * 
+ * + * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the targetTimeWindow field is set. + */ + public boolean hasTargetTimeWindow() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+       * Output only. The time window during which the task should be completed.
+       * This is only set in the response to `GetDeliveryVehicle`.
+       * 
+ * + * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The targetTimeWindow. + */ + public google.maps.fleetengine.delivery.v1.TimeWindow getTargetTimeWindow() { + if (targetTimeWindowBuilder_ == null) { + return targetTimeWindow_ == null + ? google.maps.fleetengine.delivery.v1.TimeWindow.getDefaultInstance() + : targetTimeWindow_; + } else { + return targetTimeWindowBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Output only. The time window during which the task should be completed.
+       * This is only set in the response to `GetDeliveryVehicle`.
+       * 
+ * + * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTargetTimeWindow(google.maps.fleetengine.delivery.v1.TimeWindow value) { + if (targetTimeWindowBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + targetTimeWindow_ = value; + } else { + targetTimeWindowBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The time window during which the task should be completed.
+       * This is only set in the response to `GetDeliveryVehicle`.
+       * 
+ * + * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTargetTimeWindow( + google.maps.fleetengine.delivery.v1.TimeWindow.Builder builderForValue) { + if (targetTimeWindowBuilder_ == null) { + targetTimeWindow_ = builderForValue.build(); + } else { + targetTimeWindowBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The time window during which the task should be completed.
+       * This is only set in the response to `GetDeliveryVehicle`.
+       * 
+ * + * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeTargetTimeWindow(google.maps.fleetengine.delivery.v1.TimeWindow value) { + if (targetTimeWindowBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && targetTimeWindow_ != null + && targetTimeWindow_ + != google.maps.fleetengine.delivery.v1.TimeWindow.getDefaultInstance()) { + getTargetTimeWindowBuilder().mergeFrom(value); + } else { + targetTimeWindow_ = value; + } + } else { + targetTimeWindowBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The time window during which the task should be completed.
+       * This is only set in the response to `GetDeliveryVehicle`.
+       * 
+ * + * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearTargetTimeWindow() { + bitField0_ = (bitField0_ & ~0x00000004); + targetTimeWindow_ = null; + if (targetTimeWindowBuilder_ != null) { + targetTimeWindowBuilder_.dispose(); + targetTimeWindowBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The time window during which the task should be completed.
+       * This is only set in the response to `GetDeliveryVehicle`.
+       * 
+ * + * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public google.maps.fleetengine.delivery.v1.TimeWindow.Builder getTargetTimeWindowBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getTargetTimeWindowFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Output only. The time window during which the task should be completed.
+       * This is only set in the response to `GetDeliveryVehicle`.
+       * 
+ * + * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public google.maps.fleetengine.delivery.v1.TimeWindowOrBuilder + getTargetTimeWindowOrBuilder() { + if (targetTimeWindowBuilder_ != null) { + return targetTimeWindowBuilder_.getMessageOrBuilder(); + } else { + return targetTimeWindow_ == null + ? google.maps.fleetengine.delivery.v1.TimeWindow.getDefaultInstance() + : targetTimeWindow_; + } + } + /** + * + * + *
+       * Output only. The time window during which the task should be completed.
+       * This is only set in the response to `GetDeliveryVehicle`.
+       * 
+ * + * + * .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.TimeWindow, + google.maps.fleetengine.delivery.v1.TimeWindow.Builder, + google.maps.fleetengine.delivery.v1.TimeWindowOrBuilder> + getTargetTimeWindowFieldBuilder() { + if (targetTimeWindowBuilder_ == null) { + targetTimeWindowBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.TimeWindow, + google.maps.fleetengine.delivery.v1.TimeWindow.Builder, + google.maps.fleetengine.delivery.v1.TimeWindowOrBuilder>( + getTargetTimeWindow(), getParentForChildren(), isClean()); + targetTimeWindow_ = null; + } + return targetTimeWindowBuilder_; + } + + @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.delivery.v1.VehicleStop.TaskInfo) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.delivery.v1.VehicleStop.TaskInfo) + private static final google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo(); + } + + public static google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TaskInfo 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 google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int PLANNED_LOCATION_FIELD_NUMBER = 1; + private google.maps.fleetengine.delivery.v1.LocationInfo plannedLocation_; + /** + * + * + *
+   * Required. The location of the stop. Note that the locations in the `Task`s
+   * might not exactly match this location, but will be within a short distance
+   * of it. This field won't be populated in the response of either a `GetTask`,
+   * or a `SearchTasks` call.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the plannedLocation field is set. + */ + @java.lang.Override + public boolean hasPlannedLocation() { + return plannedLocation_ != null; + } + /** + * + * + *
+   * Required. The location of the stop. Note that the locations in the `Task`s
+   * might not exactly match this location, but will be within a short distance
+   * of it. This field won't be populated in the response of either a `GetTask`,
+   * or a `SearchTasks` call.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The plannedLocation. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.LocationInfo getPlannedLocation() { + return plannedLocation_ == null + ? google.maps.fleetengine.delivery.v1.LocationInfo.getDefaultInstance() + : plannedLocation_; + } + /** + * + * + *
+   * Required. The location of the stop. Note that the locations in the `Task`s
+   * might not exactly match this location, but will be within a short distance
+   * of it. This field won't be populated in the response of either a `GetTask`,
+   * or a `SearchTasks` call.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.LocationInfoOrBuilder getPlannedLocationOrBuilder() { + return plannedLocation_ == null + ? google.maps.fleetengine.delivery.v1.LocationInfo.getDefaultInstance() + : plannedLocation_; + } + + public static final int TASKS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List tasks_; + /** + * + * + *
+   * The list of `Task`s to be performed at this stop. This field won't be
+   * populated in the response of either a `GetTask` or `SearchTasks` call.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.VehicleStop.TaskInfo tasks = 2; + */ + @java.lang.Override + public java.util.List getTasksList() { + return tasks_; + } + /** + * + * + *
+   * The list of `Task`s to be performed at this stop. This field won't be
+   * populated in the response of either a `GetTask` or `SearchTasks` call.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.VehicleStop.TaskInfo tasks = 2; + */ + @java.lang.Override + public java.util.List + getTasksOrBuilderList() { + return tasks_; + } + /** + * + * + *
+   * The list of `Task`s to be performed at this stop. This field won't be
+   * populated in the response of either a `GetTask` or `SearchTasks` call.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.VehicleStop.TaskInfo tasks = 2; + */ + @java.lang.Override + public int getTasksCount() { + return tasks_.size(); + } + /** + * + * + *
+   * The list of `Task`s to be performed at this stop. This field won't be
+   * populated in the response of either a `GetTask` or `SearchTasks` call.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.VehicleStop.TaskInfo tasks = 2; + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo getTasks(int index) { + return tasks_.get(index); + } + /** + * + * + *
+   * The list of `Task`s to be performed at this stop. This field won't be
+   * populated in the response of either a `GetTask` or `SearchTasks` call.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.VehicleStop.TaskInfo tasks = 2; + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfoOrBuilder getTasksOrBuilder( + int index) { + return tasks_.get(index); + } + + public static final int STATE_FIELD_NUMBER = 3; + private int state_ = 0; + /** + * + * + *
+   * The state of the `VehicleStop`. This field won't be populated in the
+   * response of either a `GetTask`, or a `SearchTasks` call.
+   * 
+ * + * .maps.fleetengine.delivery.v1.VehicleStop.State state = 3; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * The state of the `VehicleStop`. This field won't be populated in the
+   * response of either a `GetTask`, or a `SearchTasks` call.
+   * 
+ * + * .maps.fleetengine.delivery.v1.VehicleStop.State state = 3; + * + * @return The state. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.VehicleStop.State getState() { + google.maps.fleetengine.delivery.v1.VehicleStop.State result = + google.maps.fleetengine.delivery.v1.VehicleStop.State.forNumber(state_); + return result == null + ? google.maps.fleetengine.delivery.v1.VehicleStop.State.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 (plannedLocation_ != null) { + output.writeMessage(1, getPlannedLocation()); + } + for (int i = 0; i < tasks_.size(); i++) { + output.writeMessage(2, tasks_.get(i)); + } + if (state_ + != google.maps.fleetengine.delivery.v1.VehicleStop.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, state_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (plannedLocation_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPlannedLocation()); + } + for (int i = 0; i < tasks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, tasks_.get(i)); + } + if (state_ + != google.maps.fleetengine.delivery.v1.VehicleStop.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, state_); + } + 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 google.maps.fleetengine.delivery.v1.VehicleStop)) { + return super.equals(obj); + } + google.maps.fleetengine.delivery.v1.VehicleStop other = + (google.maps.fleetengine.delivery.v1.VehicleStop) obj; + + if (hasPlannedLocation() != other.hasPlannedLocation()) return false; + if (hasPlannedLocation()) { + if (!getPlannedLocation().equals(other.getPlannedLocation())) return false; + } + if (!getTasksList().equals(other.getTasksList())) return false; + if (state_ != other.state_) 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 (hasPlannedLocation()) { + hash = (37 * hash) + PLANNED_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getPlannedLocation().hashCode(); + } + if (getTasksCount() > 0) { + hash = (37 * hash) + TASKS_FIELD_NUMBER; + hash = (53 * hash) + getTasksList().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.maps.fleetengine.delivery.v1.VehicleStop parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.VehicleStop parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.VehicleStop parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.VehicleStop parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.VehicleStop parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static google.maps.fleetengine.delivery.v1.VehicleStop parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static google.maps.fleetengine.delivery.v1.VehicleStop parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.VehicleStop 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 google.maps.fleetengine.delivery.v1.VehicleStop parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.VehicleStop 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 google.maps.fleetengine.delivery.v1.VehicleStop parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static google.maps.fleetengine.delivery.v1.VehicleStop 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(google.maps.fleetengine.delivery.v1.VehicleStop 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 point where a Vehicle stops to perform one or more `Task`s.
+   * 
+ * + * Protobuf type {@code maps.fleetengine.delivery.v1.VehicleStop} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:maps.fleetengine.delivery.v1.VehicleStop) + google.maps.fleetengine.delivery.v1.VehicleStopOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return google.maps.fleetengine.delivery.v1.DeliveryVehicles + .internal_static_maps_fleetengine_delivery_v1_VehicleStop_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.maps.fleetengine.delivery.v1.DeliveryVehicles + .internal_static_maps_fleetengine_delivery_v1_VehicleStop_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.maps.fleetengine.delivery.v1.VehicleStop.class, + google.maps.fleetengine.delivery.v1.VehicleStop.Builder.class); + } + + // Construct using google.maps.fleetengine.delivery.v1.VehicleStop.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + plannedLocation_ = null; + if (plannedLocationBuilder_ != null) { + plannedLocationBuilder_.dispose(); + plannedLocationBuilder_ = null; + } + if (tasksBuilder_ == null) { + tasks_ = java.util.Collections.emptyList(); + } else { + tasks_ = null; + tasksBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + state_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return google.maps.fleetengine.delivery.v1.DeliveryVehicles + .internal_static_maps_fleetengine_delivery_v1_VehicleStop_descriptor; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.VehicleStop getDefaultInstanceForType() { + return google.maps.fleetengine.delivery.v1.VehicleStop.getDefaultInstance(); + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.VehicleStop build() { + google.maps.fleetengine.delivery.v1.VehicleStop result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.maps.fleetengine.delivery.v1.VehicleStop buildPartial() { + google.maps.fleetengine.delivery.v1.VehicleStop result = + new google.maps.fleetengine.delivery.v1.VehicleStop(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + google.maps.fleetengine.delivery.v1.VehicleStop result) { + if (tasksBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + tasks_ = java.util.Collections.unmodifiableList(tasks_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.tasks_ = tasks_; + } else { + result.tasks_ = tasksBuilder_.build(); + } + } + + private void buildPartial0(google.maps.fleetengine.delivery.v1.VehicleStop result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.plannedLocation_ = + plannedLocationBuilder_ == null ? plannedLocation_ : plannedLocationBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.state_ = state_; + } + } + + @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 google.maps.fleetengine.delivery.v1.VehicleStop) { + return mergeFrom((google.maps.fleetengine.delivery.v1.VehicleStop) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.maps.fleetengine.delivery.v1.VehicleStop other) { + if (other == google.maps.fleetengine.delivery.v1.VehicleStop.getDefaultInstance()) + return this; + if (other.hasPlannedLocation()) { + mergePlannedLocation(other.getPlannedLocation()); + } + if (tasksBuilder_ == null) { + if (!other.tasks_.isEmpty()) { + if (tasks_.isEmpty()) { + tasks_ = other.tasks_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTasksIsMutable(); + tasks_.addAll(other.tasks_); + } + onChanged(); + } + } else { + if (!other.tasks_.isEmpty()) { + if (tasksBuilder_.isEmpty()) { + tasksBuilder_.dispose(); + tasksBuilder_ = null; + tasks_ = other.tasks_; + bitField0_ = (bitField0_ & ~0x00000002); + tasksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTasksFieldBuilder() + : null; + } else { + tasksBuilder_.addAllMessages(other.tasks_); + } + } + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + 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(getPlannedLocationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo m = + input.readMessage( + google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo.parser(), + extensionRegistry); + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + tasks_.add(m); + } else { + tasksBuilder_.addMessage(m); + } + break; + } // case 18 + case 24: + { + state_ = 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 google.maps.fleetengine.delivery.v1.LocationInfo plannedLocation_; + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.LocationInfo, + google.maps.fleetengine.delivery.v1.LocationInfo.Builder, + google.maps.fleetengine.delivery.v1.LocationInfoOrBuilder> + plannedLocationBuilder_; + /** + * + * + *
+     * Required. The location of the stop. Note that the locations in the `Task`s
+     * might not exactly match this location, but will be within a short distance
+     * of it. This field won't be populated in the response of either a `GetTask`,
+     * or a `SearchTasks` call.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the plannedLocation field is set. + */ + public boolean hasPlannedLocation() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. The location of the stop. Note that the locations in the `Task`s
+     * might not exactly match this location, but will be within a short distance
+     * of it. This field won't be populated in the response of either a `GetTask`,
+     * or a `SearchTasks` call.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The plannedLocation. + */ + public google.maps.fleetengine.delivery.v1.LocationInfo getPlannedLocation() { + if (plannedLocationBuilder_ == null) { + return plannedLocation_ == null + ? google.maps.fleetengine.delivery.v1.LocationInfo.getDefaultInstance() + : plannedLocation_; + } else { + return plannedLocationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The location of the stop. Note that the locations in the `Task`s
+     * might not exactly match this location, but will be within a short distance
+     * of it. This field won't be populated in the response of either a `GetTask`,
+     * or a `SearchTasks` call.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPlannedLocation(google.maps.fleetengine.delivery.v1.LocationInfo value) { + if (plannedLocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + plannedLocation_ = value; + } else { + plannedLocationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The location of the stop. Note that the locations in the `Task`s
+     * might not exactly match this location, but will be within a short distance
+     * of it. This field won't be populated in the response of either a `GetTask`,
+     * or a `SearchTasks` call.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPlannedLocation( + google.maps.fleetengine.delivery.v1.LocationInfo.Builder builderForValue) { + if (plannedLocationBuilder_ == null) { + plannedLocation_ = builderForValue.build(); + } else { + plannedLocationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The location of the stop. Note that the locations in the `Task`s
+     * might not exactly match this location, but will be within a short distance
+     * of it. This field won't be populated in the response of either a `GetTask`,
+     * or a `SearchTasks` call.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePlannedLocation(google.maps.fleetengine.delivery.v1.LocationInfo value) { + if (plannedLocationBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && plannedLocation_ != null + && plannedLocation_ + != google.maps.fleetengine.delivery.v1.LocationInfo.getDefaultInstance()) { + getPlannedLocationBuilder().mergeFrom(value); + } else { + plannedLocation_ = value; + } + } else { + plannedLocationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The location of the stop. Note that the locations in the `Task`s
+     * might not exactly match this location, but will be within a short distance
+     * of it. This field won't be populated in the response of either a `GetTask`,
+     * or a `SearchTasks` call.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPlannedLocation() { + bitField0_ = (bitField0_ & ~0x00000001); + plannedLocation_ = null; + if (plannedLocationBuilder_ != null) { + plannedLocationBuilder_.dispose(); + plannedLocationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The location of the stop. Note that the locations in the `Task`s
+     * might not exactly match this location, but will be within a short distance
+     * of it. This field won't be populated in the response of either a `GetTask`,
+     * or a `SearchTasks` call.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public google.maps.fleetengine.delivery.v1.LocationInfo.Builder getPlannedLocationBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getPlannedLocationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The location of the stop. Note that the locations in the `Task`s
+     * might not exactly match this location, but will be within a short distance
+     * of it. This field won't be populated in the response of either a `GetTask`,
+     * or a `SearchTasks` call.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public google.maps.fleetengine.delivery.v1.LocationInfoOrBuilder getPlannedLocationOrBuilder() { + if (plannedLocationBuilder_ != null) { + return plannedLocationBuilder_.getMessageOrBuilder(); + } else { + return plannedLocation_ == null + ? google.maps.fleetengine.delivery.v1.LocationInfo.getDefaultInstance() + : plannedLocation_; + } + } + /** + * + * + *
+     * Required. The location of the stop. Note that the locations in the `Task`s
+     * might not exactly match this location, but will be within a short distance
+     * of it. This field won't be populated in the response of either a `GetTask`,
+     * or a `SearchTasks` call.
+     * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.LocationInfo, + google.maps.fleetengine.delivery.v1.LocationInfo.Builder, + google.maps.fleetengine.delivery.v1.LocationInfoOrBuilder> + getPlannedLocationFieldBuilder() { + if (plannedLocationBuilder_ == null) { + plannedLocationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + google.maps.fleetengine.delivery.v1.LocationInfo, + google.maps.fleetengine.delivery.v1.LocationInfo.Builder, + google.maps.fleetengine.delivery.v1.LocationInfoOrBuilder>( + getPlannedLocation(), getParentForChildren(), isClean()); + plannedLocation_ = null; + } + return plannedLocationBuilder_; + } + + private java.util.List tasks_ = + java.util.Collections.emptyList(); + + private void ensureTasksIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + tasks_ = + new java.util.ArrayList( + tasks_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo, + google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo.Builder, + google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfoOrBuilder> + tasksBuilder_; + + /** + * + * + *
+     * The list of `Task`s to be performed at this stop. This field won't be
+     * populated in the response of either a `GetTask` or `SearchTasks` call.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.VehicleStop.TaskInfo tasks = 2; + */ + public java.util.List getTasksList() { + if (tasksBuilder_ == null) { + return java.util.Collections.unmodifiableList(tasks_); + } else { + return tasksBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of `Task`s to be performed at this stop. This field won't be
+     * populated in the response of either a `GetTask` or `SearchTasks` call.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.VehicleStop.TaskInfo tasks = 2; + */ + public int getTasksCount() { + if (tasksBuilder_ == null) { + return tasks_.size(); + } else { + return tasksBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of `Task`s to be performed at this stop. This field won't be
+     * populated in the response of either a `GetTask` or `SearchTasks` call.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.VehicleStop.TaskInfo tasks = 2; + */ + public google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo getTasks(int index) { + if (tasksBuilder_ == null) { + return tasks_.get(index); + } else { + return tasksBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of `Task`s to be performed at this stop. This field won't be
+     * populated in the response of either a `GetTask` or `SearchTasks` call.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.VehicleStop.TaskInfo tasks = 2; + */ + public Builder setTasks( + int index, google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo value) { + if (tasksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTasksIsMutable(); + tasks_.set(index, value); + onChanged(); + } else { + tasksBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of `Task`s to be performed at this stop. This field won't be
+     * populated in the response of either a `GetTask` or `SearchTasks` call.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.VehicleStop.TaskInfo tasks = 2; + */ + public Builder setTasks( + int index, + google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo.Builder builderForValue) { + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + tasks_.set(index, builderForValue.build()); + onChanged(); + } else { + tasksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of `Task`s to be performed at this stop. This field won't be
+     * populated in the response of either a `GetTask` or `SearchTasks` call.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.VehicleStop.TaskInfo tasks = 2; + */ + public Builder addTasks(google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo value) { + if (tasksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTasksIsMutable(); + tasks_.add(value); + onChanged(); + } else { + tasksBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of `Task`s to be performed at this stop. This field won't be
+     * populated in the response of either a `GetTask` or `SearchTasks` call.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.VehicleStop.TaskInfo tasks = 2; + */ + public Builder addTasks( + int index, google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo value) { + if (tasksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTasksIsMutable(); + tasks_.add(index, value); + onChanged(); + } else { + tasksBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of `Task`s to be performed at this stop. This field won't be
+     * populated in the response of either a `GetTask` or `SearchTasks` call.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.VehicleStop.TaskInfo tasks = 2; + */ + public Builder addTasks( + google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo.Builder builderForValue) { + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + tasks_.add(builderForValue.build()); + onChanged(); + } else { + tasksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of `Task`s to be performed at this stop. This field won't be
+     * populated in the response of either a `GetTask` or `SearchTasks` call.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.VehicleStop.TaskInfo tasks = 2; + */ + public Builder addTasks( + int index, + google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo.Builder builderForValue) { + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + tasks_.add(index, builderForValue.build()); + onChanged(); + } else { + tasksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of `Task`s to be performed at this stop. This field won't be
+     * populated in the response of either a `GetTask` or `SearchTasks` call.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.VehicleStop.TaskInfo tasks = 2; + */ + public Builder addAllTasks( + java.lang.Iterable + values) { + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tasks_); + onChanged(); + } else { + tasksBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of `Task`s to be performed at this stop. This field won't be
+     * populated in the response of either a `GetTask` or `SearchTasks` call.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.VehicleStop.TaskInfo tasks = 2; + */ + public Builder clearTasks() { + if (tasksBuilder_ == null) { + tasks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + tasksBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of `Task`s to be performed at this stop. This field won't be
+     * populated in the response of either a `GetTask` or `SearchTasks` call.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.VehicleStop.TaskInfo tasks = 2; + */ + public Builder removeTasks(int index) { + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + tasks_.remove(index); + onChanged(); + } else { + tasksBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of `Task`s to be performed at this stop. This field won't be
+     * populated in the response of either a `GetTask` or `SearchTasks` call.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.VehicleStop.TaskInfo tasks = 2; + */ + public google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo.Builder getTasksBuilder( + int index) { + return getTasksFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of `Task`s to be performed at this stop. This field won't be
+     * populated in the response of either a `GetTask` or `SearchTasks` call.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.VehicleStop.TaskInfo tasks = 2; + */ + public google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfoOrBuilder getTasksOrBuilder( + int index) { + if (tasksBuilder_ == null) { + return tasks_.get(index); + } else { + return tasksBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of `Task`s to be performed at this stop. This field won't be
+     * populated in the response of either a `GetTask` or `SearchTasks` call.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.VehicleStop.TaskInfo tasks = 2; + */ + public java.util.List< + ? extends google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfoOrBuilder> + getTasksOrBuilderList() { + if (tasksBuilder_ != null) { + return tasksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tasks_); + } + } + /** + * + * + *
+     * The list of `Task`s to be performed at this stop. This field won't be
+     * populated in the response of either a `GetTask` or `SearchTasks` call.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.VehicleStop.TaskInfo tasks = 2; + */ + public google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo.Builder addTasksBuilder() { + return getTasksFieldBuilder() + .addBuilder( + google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo.getDefaultInstance()); + } + /** + * + * + *
+     * The list of `Task`s to be performed at this stop. This field won't be
+     * populated in the response of either a `GetTask` or `SearchTasks` call.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.VehicleStop.TaskInfo tasks = 2; + */ + public google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo.Builder addTasksBuilder( + int index) { + return getTasksFieldBuilder() + .addBuilder( + index, google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo.getDefaultInstance()); + } + /** + * + * + *
+     * The list of `Task`s to be performed at this stop. This field won't be
+     * populated in the response of either a `GetTask` or `SearchTasks` call.
+     * 
+ * + * repeated .maps.fleetengine.delivery.v1.VehicleStop.TaskInfo tasks = 2; + */ + public java.util.List + getTasksBuilderList() { + return getTasksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo, + google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo.Builder, + google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfoOrBuilder> + getTasksFieldBuilder() { + if (tasksBuilder_ == null) { + tasksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo, + google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo.Builder, + google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfoOrBuilder>( + tasks_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + tasks_ = null; + } + return tasksBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * The state of the `VehicleStop`. This field won't be populated in the
+     * response of either a `GetTask`, or a `SearchTasks` call.
+     * 
+ * + * .maps.fleetengine.delivery.v1.VehicleStop.State state = 3; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * The state of the `VehicleStop`. This field won't be populated in the
+     * response of either a `GetTask`, or a `SearchTasks` call.
+     * 
+ * + * .maps.fleetengine.delivery.v1.VehicleStop.State state = 3; + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The state of the `VehicleStop`. This field won't be populated in the
+     * response of either a `GetTask`, or a `SearchTasks` call.
+     * 
+ * + * .maps.fleetengine.delivery.v1.VehicleStop.State state = 3; + * + * @return The state. + */ + @java.lang.Override + public google.maps.fleetengine.delivery.v1.VehicleStop.State getState() { + google.maps.fleetengine.delivery.v1.VehicleStop.State result = + google.maps.fleetengine.delivery.v1.VehicleStop.State.forNumber(state_); + return result == null + ? google.maps.fleetengine.delivery.v1.VehicleStop.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The state of the `VehicleStop`. This field won't be populated in the
+     * response of either a `GetTask`, or a `SearchTasks` call.
+     * 
+ * + * .maps.fleetengine.delivery.v1.VehicleStop.State state = 3; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(google.maps.fleetengine.delivery.v1.VehicleStop.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The state of the `VehicleStop`. This field won't be populated in the
+     * response of either a `GetTask`, or a `SearchTasks` call.
+     * 
+ * + * .maps.fleetengine.delivery.v1.VehicleStop.State state = 3; + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000004); + state_ = 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.delivery.v1.VehicleStop) + } + + // @@protoc_insertion_point(class_scope:maps.fleetengine.delivery.v1.VehicleStop) + private static final google.maps.fleetengine.delivery.v1.VehicleStop DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new google.maps.fleetengine.delivery.v1.VehicleStop(); + } + + public static google.maps.fleetengine.delivery.v1.VehicleStop getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VehicleStop 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 google.maps.fleetengine.delivery.v1.VehicleStop getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/VehicleStopOrBuilder.java b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/VehicleStopOrBuilder.java new file mode 100644 index 000000000000..02fb25e2b64e --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/java/com/google/maps/fleetengine/delivery/v1/VehicleStopOrBuilder.java @@ -0,0 +1,159 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/delivery/v1/delivery_vehicles.proto + +package google.maps.fleetengine.delivery.v1; + +public interface VehicleStopOrBuilder + extends + // @@protoc_insertion_point(interface_extends:maps.fleetengine.delivery.v1.VehicleStop) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The location of the stop. Note that the locations in the `Task`s
+   * might not exactly match this location, but will be within a short distance
+   * of it. This field won't be populated in the response of either a `GetTask`,
+   * or a `SearchTasks` call.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the plannedLocation field is set. + */ + boolean hasPlannedLocation(); + /** + * + * + *
+   * Required. The location of the stop. Note that the locations in the `Task`s
+   * might not exactly match this location, but will be within a short distance
+   * of it. This field won't be populated in the response of either a `GetTask`,
+   * or a `SearchTasks` call.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The plannedLocation. + */ + google.maps.fleetengine.delivery.v1.LocationInfo getPlannedLocation(); + /** + * + * + *
+   * Required. The location of the stop. Note that the locations in the `Task`s
+   * might not exactly match this location, but will be within a short distance
+   * of it. This field won't be populated in the response of either a `GetTask`,
+   * or a `SearchTasks` call.
+   * 
+ * + * + * .maps.fleetengine.delivery.v1.LocationInfo planned_location = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + google.maps.fleetengine.delivery.v1.LocationInfoOrBuilder getPlannedLocationOrBuilder(); + + /** + * + * + *
+   * The list of `Task`s to be performed at this stop. This field won't be
+   * populated in the response of either a `GetTask` or `SearchTasks` call.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.VehicleStop.TaskInfo tasks = 2; + */ + java.util.List getTasksList(); + /** + * + * + *
+   * The list of `Task`s to be performed at this stop. This field won't be
+   * populated in the response of either a `GetTask` or `SearchTasks` call.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.VehicleStop.TaskInfo tasks = 2; + */ + google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfo getTasks(int index); + /** + * + * + *
+   * The list of `Task`s to be performed at this stop. This field won't be
+   * populated in the response of either a `GetTask` or `SearchTasks` call.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.VehicleStop.TaskInfo tasks = 2; + */ + int getTasksCount(); + /** + * + * + *
+   * The list of `Task`s to be performed at this stop. This field won't be
+   * populated in the response of either a `GetTask` or `SearchTasks` call.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.VehicleStop.TaskInfo tasks = 2; + */ + java.util.List + getTasksOrBuilderList(); + /** + * + * + *
+   * The list of `Task`s to be performed at this stop. This field won't be
+   * populated in the response of either a `GetTask` or `SearchTasks` call.
+   * 
+ * + * repeated .maps.fleetengine.delivery.v1.VehicleStop.TaskInfo tasks = 2; + */ + google.maps.fleetengine.delivery.v1.VehicleStop.TaskInfoOrBuilder getTasksOrBuilder(int index); + + /** + * + * + *
+   * The state of the `VehicleStop`. This field won't be populated in the
+   * response of either a `GetTask`, or a `SearchTasks` call.
+   * 
+ * + * .maps.fleetengine.delivery.v1.VehicleStop.State state = 3; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * The state of the `VehicleStop`. This field won't be populated in the
+   * response of either a `GetTask`, or a `SearchTasks` call.
+   * 
+ * + * .maps.fleetengine.delivery.v1.VehicleStop.State state = 3; + * + * @return The state. + */ + google.maps.fleetengine.delivery.v1.VehicleStop.State getState(); +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/proto/google/maps/fleetengine/delivery/v1/common.proto b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/proto/google/maps/fleetengine/delivery/v1/common.proto new file mode 100644 index 000000000000..53911eb9518c --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/proto/google/maps/fleetengine/delivery/v1/common.proto @@ -0,0 +1,247 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package maps.fleetengine.delivery.v1; + +import "google/api/field_behavior.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; +import "google/type/latlng.proto"; + +option csharp_namespace = "Google.Maps.FleetEngine.Delivery.V1"; +option go_package = "cloud.google.com/go/maps/fleetengine/delivery/apiv1/deliverypb;deliverypb"; +option java_multiple_files = true; +option java_outer_classname = "Common"; +option java_package = "google.maps.fleetengine.delivery.v1"; +option objc_class_prefix = "CFED"; + +// Describes a vehicle attribute as a key-value pair. The "key:value" string +// length cannot exceed 256 characters. +message DeliveryVehicleAttribute { + // The attribute's key. + string key = 1; + + // The attribute's value. + string value = 2; + + // The attribute's value, can be in string, bool, or double type. + oneof delivery_vehicle_attribute_value { + // 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; + + // Boolean typed attribute value. + bool bool_value = 4; + + // Double typed attribute value. + double number_value = 5; + } +} + +// The location, speed, and heading of a vehicle at a point in time. +message DeliveryVehicleLocation { + // 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; + + // Deprecated: Use `latlng_accuracy` instead. + google.protobuf.DoubleValue horizontal_accuracy = 8 [deprecated = true]; + + // Accuracy of `location` in meters as a radius. + google.protobuf.DoubleValue latlng_accuracy = 22; + + // Direction the vehicle is moving in degrees. 0 represents North. + // The valid range is [0,360). + google.protobuf.Int32Value heading = 2; + + // Deprecated: Use `heading_accuracy` instead. + google.protobuf.DoubleValue bearing_accuracy = 10 [deprecated = true]; + + // Accuracy of `heading` in degrees. + google.protobuf.DoubleValue heading_accuracy = 23; + + // Altitude in meters above WGS84. + google.protobuf.DoubleValue altitude = 5; + + // Deprecated: Use `altitude_accuracy` instead. + google.protobuf.DoubleValue vertical_accuracy = 9 [deprecated = true]; + + // Accuracy of `altitude` in meters. + google.protobuf.DoubleValue altitude_accuracy = 24; + + // Speed of the vehicle in kilometers per hour. + // Deprecated: Use `speed` instead. + google.protobuf.Int32Value speed_kmph = 3 [deprecated = true]; + + // Speed of the vehicle in meters/second + google.protobuf.DoubleValue speed = 6; + + // Accuracy of `speed` in meters/second. + google.protobuf.DoubleValue speed_accuracy = 7; + + // The time when `location` was reported by the sensor according to the + // sensor's clock. + google.protobuf.Timestamp update_time = 4; + + // Output only. The time when the server received the location information. + google.protobuf.Timestamp server_time = 13 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Provider of location data (for example, `GPS`). + DeliveryVehicleLocationSensor location_sensor = 11; + + // Whether `location` is snapped to a road. + google.protobuf.BoolValue is_road_snapped = 27; + + // 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]; + + // 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]; + + // 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]; + + // Raw vehicle location (unprocessed by road-snapper). + google.type.LatLng raw_location = 16; + + // Timestamp associated with the raw location. + google.protobuf.Timestamp raw_location_time = 17; + + // Source of the raw location. Defaults to `GPS`. + DeliveryVehicleLocationSensor raw_location_sensor = 28; + + // Accuracy of `raw_location` as a radius, in meters. + google.protobuf.DoubleValue raw_location_accuracy = 25; + + // Supplemental location provided by the integrating app. + google.type.LatLng supplemental_location = 18; + + // Timestamp associated with the supplemental location. + google.protobuf.Timestamp supplemental_location_time = 19; + + // Source of the supplemental location. Defaults to + // `CUSTOMER_SUPPLIED_LOCATION`. + DeliveryVehicleLocationSensor supplemental_location_sensor = 20; + + // Accuracy of `supplemental_location` as a radius, in meters. + google.protobuf.DoubleValue supplemental_location_accuracy = 21; + + // Deprecated: Use `is_road_snapped` instead. + bool road_snapped = 26 [deprecated = true]; +} + +// The sensor or methodology used to determine the location. +enum DeliveryVehicleLocationSensor { + // The sensor is unspecified or unknown. + UNKNOWN_SENSOR = 0; + + // GPS or Assisted GPS. + GPS = 1; + + // Assisted GPS, cell tower ID, or WiFi access point. + NETWORK = 2; + + // Cell tower ID or WiFi access point. + PASSIVE = 3; + + // A location determined by the mobile device to be the most likely + // road position. + 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 DeliveryVehicle's + // `last_location.supplemental_location_sensor`. + 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; + + // Android's Fused Location Provider. + FUSED_LOCATION_PROVIDER = 100; + + // The location provider on Apple operating systems. + CORE_LOCATION = 200; +} + +// The vehicle's navigation status. +enum DeliveryVehicleNavigationStatus { + // Unspecified navigation status. + UNKNOWN_NAVIGATION_STATUS = 0; + + // The Driver app's navigation is in `FREE_NAV` mode. + NO_GUIDANCE = 1; + + // Turn-by-turn navigation is available and the Driver app navigation has + // entered `GUIDED_NAV` mode. + ENROUTE_TO_DESTINATION = 2; + + // The vehicle has gone off the suggested route. + OFF_ROUTE = 3; + + // The vehicle is within approximately 50m of the destination. + ARRIVED_AT_DESTINATION = 4; +} + +// A time range. +message TimeWindow { + // Required. The start time of the time window (inclusive). + google.protobuf.Timestamp start_time = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The end time of the time window (inclusive). + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Describes a task attribute as a key-value pair. The "key:value" string length +// cannot exceed 256 characters. +message TaskAttribute { + // The attribute's key. Keys may not contain the colon character (:). + string key = 1; + + // The attribute's value, can be in string, bool, or double type. If none are + // set the TaskAttribute string_value will be stored as the empty string "". + oneof task_attribute_value { + // String typed attribute value. + string string_value = 2; + + // Boolean typed attribute value. + bool bool_value = 3; + + // Double typed attribute value. + double number_value = 4; + } +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/proto/google/maps/fleetengine/delivery/v1/delivery_api.proto b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/proto/google/maps/fleetengine/delivery/v1/delivery_api.proto new file mode 100644 index 000000000000..469ed3e78b4e --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/proto/google/maps/fleetengine/delivery/v1/delivery_api.proto @@ -0,0 +1,597 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package maps.fleetengine.delivery.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/api/routing.proto"; +import "google/geo/type/viewport.proto"; +import "google/maps/fleetengine/delivery/v1/delivery_vehicles.proto"; +import "google/maps/fleetengine/delivery/v1/header.proto"; +import "google/maps/fleetengine/delivery/v1/task_tracking_info.proto"; +import "google/maps/fleetengine/delivery/v1/tasks.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Maps.FleetEngine.Delivery.V1"; +option go_package = "cloud.google.com/go/maps/fleetengine/delivery/apiv1/deliverypb;deliverypb"; +option java_multiple_files = true; +option java_outer_classname = "DeliveryApi"; +option java_package = "google.maps.fleetengine.delivery.v1"; +option objc_class_prefix = "CFED"; +option (google.api.resource_definition) = { + type: "fleetengine.googleapis.com/Provider" + pattern: "providers/{provider}" +}; + +// The Last Mile Delivery service. +service DeliveryService { + option (google.api.default_host) = "fleetengine.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates and returns a new `DeliveryVehicle`. + rpc CreateDeliveryVehicle(CreateDeliveryVehicleRequest) + returns (DeliveryVehicle) { + option (google.api.http) = { + post: "/v1/{parent=providers/*}/deliveryVehicles" + body: "delivery_vehicle" + }; + option (google.api.routing) = { + routing_parameters { + field: "parent" + path_template: "{provider_id=providers/*}" + } + }; + option (google.api.method_signature) = + "parent,delivery_vehicle,delivery_vehicle_id"; + } + + // Returns the specified `DeliveryVehicle` instance. + rpc GetDeliveryVehicle(GetDeliveryVehicleRequest) returns (DeliveryVehicle) { + option (google.api.http) = { + get: "/v1/{name=providers/*/deliveryVehicles/*}" + }; + option (google.api.routing) = { + routing_parameters { + field: "name" + path_template: "{provider_id=providers/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Writes updated `DeliveryVehicle` data to Fleet Engine, and assigns + // `Tasks` to the `DeliveryVehicle`. You cannot update the name of the + // `DeliveryVehicle`. You *can* update `remaining_vehicle_journey_segments` + // though, but it must contain all of the `VehicleJourneySegment`s currently + // on the `DeliveryVehicle`. The `task_id`s are retrieved from + // `remaining_vehicle_journey_segments`, and their corresponding `Tasks` are + // assigned to the `DeliveryVehicle` if they have not yet been assigned. + rpc UpdateDeliveryVehicle(UpdateDeliveryVehicleRequest) + returns (DeliveryVehicle) { + option (google.api.http) = { + patch: "/v1/{delivery_vehicle.name=providers/*/deliveryVehicles/*}" + body: "delivery_vehicle" + }; + option (google.api.routing) = { + routing_parameters { + field: "delivery_vehicle.name" + path_template: "{provider_id=providers/*}" + } + }; + option (google.api.method_signature) = "delivery_vehicle,update_mask"; + } + + // Creates and returns a batch of new `Task` objects. + rpc BatchCreateTasks(BatchCreateTasksRequest) + returns (BatchCreateTasksResponse) { + option (google.api.http) = { + post: "/v1/{parent=providers/*}/tasks:batchCreate" + body: "*" + }; + option (google.api.routing) = { + routing_parameters { + field: "parent" + path_template: "{provider_id=providers/*}" + } + }; + } + + // Creates and returns a new `Task` object. + rpc CreateTask(CreateTaskRequest) returns (Task) { + option (google.api.http) = { + post: "/v1/{parent=providers/*}/tasks" + body: "task" + }; + option (google.api.routing) = { + routing_parameters { + field: "parent" + path_template: "{provider_id=providers/*}" + } + }; + option (google.api.method_signature) = "parent,task,task_id"; + } + + // Gets information about a `Task`. + rpc GetTask(GetTaskRequest) returns (Task) { + option (google.api.http) = { + get: "/v1/{name=providers/*/tasks/*}" + }; + option (google.api.routing) = { + routing_parameters { + field: "name" + path_template: "{provider_id=providers/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Deprecated: Use `GetTaskTrackingInfo` instead. + rpc SearchTasks(SearchTasksRequest) returns (SearchTasksResponse) { + option deprecated = true; + option (google.api.http) = { + get: "/v1/{parent=providers/*}/tasks:search" + }; + option (google.api.routing) = { + routing_parameters { + field: "parent" + path_template: "{provider_id=providers/*}" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Updates `Task` data. + rpc UpdateTask(UpdateTaskRequest) returns (Task) { + option (google.api.http) = { + patch: "/v1/{task.name=providers/*/tasks/*}" + body: "task" + }; + option (google.api.routing) = { + routing_parameters { + field: "task.name" + path_template: "{provider_id=providers/*}" + } + }; + option (google.api.method_signature) = "task,update_mask"; + } + + // Gets all `Task`s that meet the specified filtering criteria. + rpc ListTasks(ListTasksRequest) returns (ListTasksResponse) { + option (google.api.http) = { + get: "/v1/{parent=providers/*}/tasks" + }; + option (google.api.routing) = { + routing_parameters { + field: "parent" + path_template: "{provider_id=providers/*}" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Returns the specified `TaskTrackingInfo` instance. + rpc GetTaskTrackingInfo(GetTaskTrackingInfoRequest) + returns (TaskTrackingInfo) { + option (google.api.http) = { + get: "/v1/{name=providers/*/taskTrackingInfo/*}" + }; + option (google.api.routing) = { + routing_parameters { + field: "name" + path_template: "{provider_id=providers/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Gets all `DeliveryVehicle`s that meet the specified filtering criteria. + rpc ListDeliveryVehicles(ListDeliveryVehiclesRequest) + returns (ListDeliveryVehiclesResponse) { + option (google.api.http) = { + get: "/v1/{parent=providers/*}/deliveryVehicles" + }; + option (google.api.routing) = { + routing_parameters { + field: "parent" + path_template: "{provider_id=providers/*}" + } + }; + option (google.api.method_signature) = "parent"; + } +} + +// The `CreateDeliveryVehicle` request message. +message CreateDeliveryVehicleRequest { + // Optional. The standard Delivery API request header. + DeliveryRequestHeader header = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Must be in the format `providers/{provider}`. The provider must + // be the Google Cloud Project ID. For example, `sample-cloud-project`. + string parent = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Delivery Vehicle ID must be unique and 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 delivery_vehicle_id = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. The `DeliveryVehicle` entity to create. When creating a new + // delivery vehicle, you may set the following optional fields: + // + // * last_location + // * attributes + // + // Note: The DeliveryVehicle's `name` field is ignored. All other + // DeliveryVehicle fields must not be set; otherwise, an error is returned. + DeliveryVehicle delivery_vehicle = 5 [(google.api.field_behavior) = REQUIRED]; +} + +// The `GetDeliveryVehicle` request message. +message GetDeliveryVehicleRequest { + // Optional. The standard Delivery API request header. + DeliveryRequestHeader header = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Must be in the format + // `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. + // The `provider` must be the Google Cloud Project ID. For example, + // `sample-cloud-project`. + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "fleetengine.googleapis.com/DeliveryVehicle" + } + ]; +} + +// The `ListDeliveryVehicles` request message. +message ListDeliveryVehiclesRequest { + // Optional. The standard Delivery API request header. + DeliveryRequestHeader header = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Must be in the format `providers/{provider}`. + // The `provider` must be the Google Cloud Project ID. + // For example, `sample-cloud-project`. + string parent = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "fleetengine.googleapis.com/DeliveryVehicle" + } + ]; + + // Optional. The maximum number of vehicles to return. The service may return + // fewer than this number. If you don't specify this number, then the server + // determines the number of results to return. + int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListDeliveryVehicles` + // call. You must provide this in order to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListDeliveryVehicles` + // must match the call that provided the page token. + string page_token = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A filter query to apply when listing delivery vehicles. See + // http://aip.dev/160 for examples of the filter syntax. If you don't specify + // a value, or if you specify an empty string for the filter, then all + // delivery vehicles are returned. + // + // Note that the only queries supported for `ListDeliveryVehicles` are + // on vehicle attributes (for example, `attributes. = ` or + // `attributes. = AND attributes. = `). 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. = "10"` or + // `attributes. = "true"`). + // + // The maximum number of restrictions allowed in a filter query is 50. A + // restriction is a part of the query of the form + // `attribute. `, for example `attributes.foo = bar` + // is 1 restriction. + string filter = 6 [(google.api.field_behavior) = OPTIONAL]; + + // 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 = 7 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The `ListDeliveryVehicles` response message. +message ListDeliveryVehiclesResponse { + // The set of delivery vehicles that meet the requested filtering criteria. + // When no filter is specified, the request returns all delivery vehicles. A + // successful response can also be empty. An empty response indicates that no + // delivery vehicles were found meeting the requested filter criteria. + repeated DeliveryVehicle delivery_vehicles = 1; + + // You can pass this token in the `ListDeliveryVehiclesRequest` to continue to + // list results. When all of the results are returned, this field won't be in + // the response, or it will be an empty string. + string next_page_token = 2; + + // The total number of delivery vehicles that match the request criteria, + // across all pages. + int64 total_size = 3; +} + +// The `UpdateDeliveryVehicle` request message. +message UpdateDeliveryVehicleRequest { + // Optional. The standard Delivery API request header. + DeliveryRequestHeader header = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The `DeliveryVehicle` entity update to apply. + // Note: You cannot update the name of the `DeliveryVehicle`. + DeliveryVehicle delivery_vehicle = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. A field mask that indicates which `DeliveryVehicle` fields to + // update. Note that the update_mask must contain at least one field. + // + // This is a comma-separated list of fully qualified names of fields. Example: + // `"remaining_vehicle_journey_segments"`. + google.protobuf.FieldMask update_mask = 4 + [(google.api.field_behavior) = REQUIRED]; +} + +// The `BatchCreateTask` request message. +message BatchCreateTasksRequest { + // Optional. The standard Delivery API request header. + // Note: If you set this field, then the header field in the + // `CreateTaskRequest` messages must either be empty, or it must match this + // field. + DeliveryRequestHeader header = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The parent resource shared by all tasks. This value must be in + // the format `providers/{provider}`. The `provider` must be the Google Cloud + // Project ID. For example, `sample-cloud-project`. The parent field in the + // `CreateTaskRequest` messages must either be empty, or it must match this + // field. + string parent = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "fleetengine.googleapis.com/Task" + } + ]; + + // Required. The request message that specifies the resources to create. + // Note: You can create a maximum of 500 tasks in a batch. + repeated CreateTaskRequest requests = 4 + [(google.api.field_behavior) = REQUIRED]; +} + +// The `BatchCreateTask` response message. +message BatchCreateTasksResponse { + // The created Tasks. + repeated Task tasks = 1; +} + +// The `CreateTask` request message. +message CreateTaskRequest { + // Optional. The standard Delivery API request header. + DeliveryRequestHeader header = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Must be in the format `providers/{provider}`. The `provider` must + // be the Google Cloud Project ID. For example, `sample-cloud-project`. + string parent = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Task ID must be unique, but it should be not a shipment + // tracking ID. To store a shipment tracking ID, use the `tracking_id` field. + // Note that multiple tasks can have the same `tracking_id`. Task IDs are + // 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 task_id = 5 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Task entity to create. + // When creating a Task, the following fields are required: + // + // * `type` + // * `state` (must be set to `OPEN`) + // * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP` + // tasks, but required for all other task types) + // * `planned_location` (optional for `UNAVAILABLE` tasks) + // * `task_duration` + // + // Note: The Task's `name` field is ignored. All other Task fields must not be + // set; otherwise, an error is returned. + Task task = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// The `GetTask` request message. +message GetTaskRequest { + // Optional. The standard Delivery API request header. + DeliveryRequestHeader header = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Must be in the format `providers/{provider}/tasks/{task}`. The + // `provider` must be the Google Cloud Project ID. For example, + // `sample-cloud-project`. + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "fleetengine.googleapis.com/Task" + } + ]; +} + +// Deprecated: Issue `GetTaskTrackingInfoRequest`s to `GetTaskTrackingInfo` +// instead. +message SearchTasksRequest { + option deprecated = true; + + // Optional. The standard Delivery API request header. + DeliveryRequestHeader header = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Must be in the format `providers/{provider}`. + // The provider must be the Google Cloud Project ID. For example, + // `sample-cloud-project`. + string parent = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The identifier of the set of related Tasks being requested. + // Tracking IDs are 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 tracking_id = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The maximum number of Tasks to return. The service may return + // fewer than this value. If you don't specify this value, then the server + // determines the number of results to return. + int32 page_size = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `SearchTasks` call. You + // must provide this value to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `SearchTasks` must match + // the call that provided the page token. + string page_token = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// The `SearchTasks` response. It contains the set of Tasks that meet the search +// criteria in the `SearchTasksRequest`. +message SearchTasksResponse { + option deprecated = true; + + // The set of Tasks for the requested `tracking_id`. A successful response can + // also be empty. An empty response indicates that no Tasks are associated + // with the supplied `tracking_id`. + repeated Task tasks = 1; + + // Pass this token in the `SearchTasksRequest` to continue to + // list results. If all results have been returned, then this field is either + // an empty string, or it doesn't appear in the response. + string next_page_token = 2; +} + +// The `UpdateTask` request message. +message UpdateTaskRequest { + // Optional. The standard Delivery API request header. + DeliveryRequestHeader header = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The Task associated with the update. + // The following fields are maintained by Fleet Engine. Do not update + // them using `Task.update`. + // + // * `last_location`. + // * `last_location_snappable`. + // * `name`. + // * `remaining_vehicle_journey_segments`. + // * `task_outcome_location_source`. + // + // Note: You cannot change the value of `task_outcome` once you set it. + // + // If the Task has been assigned to a delivery vehicle, then don't set the + // Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop` + // that contains the Task from the delivery vehicle, which automatically sets + // the Task state to CLOSED. + Task task = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The field mask that indicates which Task fields to update. + // Note: The `update_mask` must contain at least one field. + // + // This is a comma-separated list of fully qualified names of fields. Example: + // `"task_outcome,task_outcome_time,task_outcome_location"`. + google.protobuf.FieldMask update_mask = 4 + [(google.api.field_behavior) = REQUIRED]; +} + +// The `ListTasks` request message. +message ListTasksRequest { + // Optional. The standard Delivery API request header. + DeliveryRequestHeader header = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Must be in the format `providers/{provider}`. + // The `provider` must be the Google Cloud Project ID. For example, + // `sample-cloud-project`. + string parent = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "fleetengine.googleapis.com/Task" + } + ]; + + // Optional. The maximum number of Tasks to return. The service may return + // fewer than this value. If you don't specify this value, then the server + // determines the number of results to return. + int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token received from a previous `ListTasks` call. + // You can provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListTasks` must match + // the call that provided the page token. + string page_token = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A filter query to apply when listing Tasks. See + // http://aip.dev/160 for examples of filter syntax. If you don't specify a + // value, or if you filter on an empty string, then all Tasks are returned. + // For information about the Task properties that you can filter on, see [Task + // list](/maps/documentation/transportation-logistics/last-mile-fleet-solution/fleet-performance/fleet-engine/deliveries_api#list_tasks). + string filter = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// The `ListTasks` response that contains the set of Tasks that meet the filter +// criteria in the `ListTasksRequest`. +message ListTasksResponse { + // The set of Tasks that meet the requested filtering criteria. When no filter + // is specified, the request returns all tasks. A successful response can also + // be empty. An empty response indicates that no Tasks were found meeting the + // requested filter criteria. + repeated Task tasks = 1; + + // Pass this token in the `ListTasksRequest` to continue to list results. + // If all results have been returned, then this field is either an empty + // string, or it doesn't appear in the response. + string next_page_token = 2; + + // The total number of Tasks that match the request criteria, across all + // pages. + int64 total_size = 3; +} + +// The `GetTaskTrackingInfoRequest` request message. +message GetTaskTrackingInfoRequest { + // Optional. The standard Delivery API request header. + DeliveryRequestHeader header = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Must be in the format + // `providers/{provider}/taskTrackingInfo/{tracking_id}`. The `provider` + // must be the Google Cloud Project ID, and the `tracking_id` must be the + // tracking ID associated with the task. An example name can be + // `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`. + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "fleetengine.googleapis.com/TaskTrackingInfo" + } + ]; +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/proto/google/maps/fleetengine/delivery/v1/delivery_vehicles.proto b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/proto/google/maps/fleetengine/delivery/v1/delivery_vehicles.proto new file mode 100644 index 000000000000..3b9a59e45032 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/proto/google/maps/fleetengine/delivery/v1/delivery_vehicles.proto @@ -0,0 +1,269 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package maps.fleetengine.delivery.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/maps/fleetengine/delivery/v1/common.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/wrappers.proto"; +import "google/type/latlng.proto"; + +option csharp_namespace = "Google.Maps.FleetEngine.Delivery.V1"; +option go_package = "cloud.google.com/go/maps/fleetengine/delivery/apiv1/deliverypb;deliverypb"; +option java_multiple_files = true; +option java_outer_classname = "DeliveryVehicles"; +option java_package = "google.maps.fleetengine.delivery.v1"; +option objc_class_prefix = "CFED"; + +// The `DeliveryVehicle` message. A delivery vehicle transports shipments from a +// depot to a delivery location, and from a pickup location to the depot. In +// some cases, delivery vehicles also transport shipments directly from the +// pickup location to the delivery location. +// +// Note: gRPC and REST APIs use different field naming conventions. For example, +// the `DeliveryVehicle.current_route_segment` field in the gRPC API and the +// `DeliveryVehicle.currentRouteSegment` field in the REST API refer to the same +// field. +message DeliveryVehicle { + option (google.api.resource) = { + type: "fleetengine.googleapis.com/DeliveryVehicle" + pattern: "providers/{provider}/deliveryVehicles/{vehicle}" + }; + + // The type of delivery vehicle. + enum DeliveryVehicleType { + // The value is unused. + DELIVERY_VEHICLE_TYPE_UNSPECIFIED = 0; + + // An automobile. + AUTO = 1; + + // A motorcycle, moped, or other two-wheeled vehicle + TWO_WHEELER = 2; + + // Human-powered transport. + BICYCLE = 3; + + // A human transporter, typically walking or running, traveling along + // pedestrian pathways. + PEDESTRIAN = 4; + } + + // The unique name of this Delivery Vehicle. + // The format is `providers/{provider}/deliveryVehicles/{vehicle}`. + string name = 1; + + // The last reported location of the Delivery Vehicle. + DeliveryVehicleLocation last_location = 2; + + // The Delivery Vehicle's navigation status. + DeliveryVehicleNavigationStatus navigation_status = 3; + + // The encoded polyline specifying the route that the navigation recommends + // taking to the next waypoint. Your driver app updates this when a + // stop is reached or passed, and when the navigation reroutes. These + // `LatLng`s are returned in + // `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` + // (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` + // (REST) for all active Tasks assigned to the Vehicle. + // + // There are a few cases where this field might not be used to populate + // `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` + // (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` + // (REST): + // + // * The endpoint of the `current_route_segment` does not match + // `DeliveryVehicle.remaining_vehicle_journey_segments[0].stop` (gRPC) or + // `DeliveryVehicle.remainingVehicleJourneySegments[0].stop` (REST). + // + // * The driver app has not updated its location recently, so the last + // updated value for this field might be stale. + // + // * The driver app has recently updated its location, but the + // `current_route_segment` is stale, and points to a previous vehicle stop. + // + // In these cases, Fleet Engine populates this field with a route from the + // most recently passed VehicleStop to the upcoming VehicleStop to ensure that + // the consumer of this field has the best available information on the + // current path of the Delivery Vehicle. + bytes current_route_segment = 4; + + // The location where the `current_route_segment` ends. This is not currently + // populated by the driver app, but you can supply it on + // `UpdateDeliveryVehicle` calls. It is either the `LatLng` from the upcoming + // vehicle stop, or the last `LatLng` of the `current_route_segment`. Fleet + // Engine will then do its best to interpolate to an actual `VehicleStop`. + // + // This field is ignored in `UpdateDeliveryVehicle` calls if the + // `current_route_segment` field is empty. + google.type.LatLng current_route_segment_end_point = 5; + + // The remaining driving distance for the `current_route_segment`. + // The Driver app typically provides this field, but there are some + // circumstances in which Fleet Engine will override the value sent by the + // app. For more information, see + // [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment]. + // This field is returned in + // `Task.remaining_vehicle_journey_segments[0].driving_distance_meters` (gRPC) + // or `Task.remainingVehicleJourneySegments[0].drivingDistanceMeters` (REST) + // for all active `Task`s assigned to the Delivery Vehicle. + // + // Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the + // `current_route_segment` field is empty. + google.protobuf.Int32Value remaining_distance_meters = 6; + + // The remaining driving time for the `current_route_segment`. + // The Driver app typically provides this field, but there are some + // circumstances in which Fleet Engine will override the value sent by the + // app. For more information, see + // [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment]. + // This field is returned in + // `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or + // `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST) for all + // active tasks assigned to the Delivery Vehicle. + // + // Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the + // `current_route_segment` field is empty. + google.protobuf.Duration remaining_duration = 7; + + // The journey segments assigned to this Delivery Vehicle, starting from the + // Vehicle's most recently reported location. This field won't be populated + // in the response of `ListDeliveryVehicles`. + repeated VehicleJourneySegment remaining_vehicle_journey_segments = 8; + + // A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have + // at most 100 attributes, and each attribute must have a unique key. + repeated DeliveryVehicleAttribute attributes = 9; + + // The type of this delivery vehicle. If unset, this will default to `AUTO`. + DeliveryVehicleType type = 10; +} + +// A location with any additional identifiers. +message LocationInfo { + // The location's coordinates. + google.type.LatLng point = 1; +} + +// Represents a Vehicle’s travel segment - from its previous stop to the +// current stop. If it is the first active stop, then it is from the +// Vehicle’s current location to this stop. +message VehicleJourneySegment { + // Specifies the stop location, along with the `Task`s associated with + // the stop. Some fields of the VehicleStop might not be present if this + // journey segment is part of `JourneySharingInfo`. + VehicleStop stop = 1; + + // Output only. The travel distance from the previous stop to this stop. + // If the current stop is the first stop in the list of journey + // segments, then the starting point is the vehicle's location recorded + // at the time that this stop was added to the list. This field might not be + // present if this journey segment is part of `JourneySharingInfo`. + google.protobuf.Int32Value driving_distance_meters = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The travel time from the previous stop to this stop. + // If the current stop is the first stop in the list of journey + // segments, then the starting point is the Vehicle's location recorded + // at the time that this stop was added to the list. + // + // If this field is defined in the path + // `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or + // `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST), + // then it may be populated with the value from + // `DeliveryVehicle.remaining_duration` (gRPC) or + // `DeliveryVehicle.remainingDuration` (REST). + // This provides the remaining driving duration from the driver app's latest + // known location rather than the driving time from the previous stop. + google.protobuf.Duration driving_duration = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The path from the previous stop to this stop. If the current + // stop is the first stop in the list of journey segments, then this is the + // path from the vehicle's current location to this stop at the time that the + // stop was added to the list. This field might not be present if this journey + // segment is part of `JourneySharingInfo`. + // + // If this field is defined in the path + // `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` + // (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` + // (REST), then it may be populated with the `LatLng`s decoded from + // `DeliveryVehicle.current_route_segment` (gRPC) or + // `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving + // path from the driver app's latest known location rather than the path from + // the previous stop. + repeated google.type.LatLng path = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Describes a point where a Vehicle stops to perform one or more `Task`s. +message VehicleStop { + // Additional information about the Task performed at this stop. + message TaskInfo { + // The Task ID. This field won't be populated in the response of either a + // `GetTask`, or a `SearchTasks` call. Task IDs are 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 task_id = 1; + + // Output only. The time required to perform the Task. + google.protobuf.Duration task_duration = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time window during which the task should be completed. + // This is only set in the response to `GetDeliveryVehicle`. + TimeWindow target_time_window = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The current state of a `VehicleStop`. + enum State { + // Unknown. + STATE_UNSPECIFIED = 0; + + // Created, but not actively routing. + NEW = 1; + + // Assigned and actively routing. + ENROUTE = 2; + + // Arrived at stop. Assumes that when the Vehicle is routing to the next + // stop, that all previous stops have been completed. + ARRIVED = 3; + } + + // Required. The location of the stop. Note that the locations in the `Task`s + // might not exactly match this location, but will be within a short distance + // of it. This field won't be populated in the response of either a `GetTask`, + // or a `SearchTasks` call. + LocationInfo planned_location = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of `Task`s to be performed at this stop. This field won't be + // populated in the response of either a `GetTask` or `SearchTasks` call. + repeated TaskInfo tasks = 2; + + // The state of the `VehicleStop`. This field won't be populated in the + // response of either a `GetTask`, or a `SearchTasks` call. + State state = 3; +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/proto/google/maps/fleetengine/delivery/v1/header.proto b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/proto/google/maps/fleetengine/delivery/v1/header.proto new file mode 100644 index 000000000000..f12425da8953 --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/proto/google/maps/fleetengine/delivery/v1/header.proto @@ -0,0 +1,104 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package maps.fleetengine.delivery.v1; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Maps.FleetEngine.Delivery.V1"; +option go_package = "cloud.google.com/go/maps/fleetengine/delivery/apiv1/deliverypb;deliverypb"; +option java_multiple_files = true; +option java_outer_classname = "Headers"; +option java_package = "google.maps.fleetengine.delivery.v1"; +option objc_class_prefix = "CFED"; + +// A RequestHeader contains fields common to all Delivery RPC requests. +message DeliveryRequestHeader { + // Possible types of SDK. + enum SdkType { + // The default value. This value is used if the `sdk_type` is omitted. + SDK_TYPE_UNSPECIFIED = 0; + + // The calling SDK is Consumer. + CONSUMER = 1; + + // The calling SDK is Driver. + DRIVER = 2; + + // The calling SDK is JavaScript. + JAVASCRIPT = 3; + } + + // The platform of the calling SDK. + enum Platform { + // The default value. This value is used if the platform is omitted. + PLATFORM_UNSPECIFIED = 0; + + // The request is coming from Android. + ANDROID = 1; + + // The request is coming from iOS. + IOS = 2; + + // The request is coming from the web. + WEB = 3; + } + + // 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; + + // Required. CLDR region code of the region where the request originates. + // Field value example: `US`. + string region_code = 2 [(google.api.field_behavior) = REQUIRED]; + + // Version of the calling SDK, if applicable. + // The version format is "major.minor.patch", example: `1.1.2`. + string sdk_version = 3; + + // Version of the operating system on which the calling SDK is running. + // Field value examples: `4.4.1`, `12.1`. + string os_version = 4; + + // Model of the device on which the calling SDK is running. + // Field value examples: `iPhone12,1`, `SM-G920F`. + string device_model = 5; + + // The type of SDK sending the request. + SdkType sdk_type = 6; + + // 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; + + // 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; + + // Platform of the calling SDK. + Platform platform = 9; + + // Manufacturer of the Android device from the calling SDK, only applicable + // for the Android SDKs. + // Field value example: `Samsung`. + string manufacturer = 10; + + // Android API level of the calling SDK, only applicable for the Android SDKs. + // Field value example: `23`. + int32 android_api_level = 11; +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/proto/google/maps/fleetengine/delivery/v1/task_tracking_info.proto b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/proto/google/maps/fleetengine/delivery/v1/task_tracking_info.proto new file mode 100644 index 000000000000..41c4fecf7adf --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/proto/google/maps/fleetengine/delivery/v1/task_tracking_info.proto @@ -0,0 +1,98 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package maps.fleetengine.delivery.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/maps/fleetengine/delivery/v1/common.proto"; +import "google/maps/fleetengine/delivery/v1/delivery_vehicles.proto"; +import "google/maps/fleetengine/delivery/v1/tasks.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; +import "google/type/latlng.proto"; + +option csharp_namespace = "Google.Maps.FleetEngine.Delivery.V1"; +option go_package = "cloud.google.com/go/maps/fleetengine/delivery/apiv1/deliverypb;deliverypb"; +option java_multiple_files = true; +option java_outer_classname = "TaskTrackingInfoProto"; +option java_package = "google.maps.fleetengine.delivery.v1"; +option objc_class_prefix = "CFED"; + +// The `TaskTrackingInfo` message. The message contains task tracking +// information which will be used for display. If a tracking ID is associated +// with multiple Tasks, Fleet Engine uses a heuristic to decide which Task's +// TaskTrackingInfo to select. +message TaskTrackingInfo { + option (google.api.resource) = { + type: "fleetengine.googleapis.com/TaskTrackingInfo" + pattern: "providers/{provider}/taskTrackingInfo/{tracking}" + }; + + // Must be in the format `providers/{provider}/taskTrackingInfo/{tracking}`, + // where `tracking` represents the tracking ID. + string name = 1; + + // Immutable. The tracking ID of a Task. + // * 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 tracking_id = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // The vehicle's last location. + DeliveryVehicleLocation vehicle_location = 3; + + // A list of points which when connected forms a polyline of the vehicle's + // expected route to the location of this task. + repeated google.type.LatLng route_polyline_points = 4; + + // Indicates the number of stops the vehicle remaining until the task stop is + // reached, including the task stop. For example, if the vehicle's next stop + // is the task stop, the value will be 1. + google.protobuf.Int32Value remaining_stop_count = 5; + + // The total remaining distance in meters to the `VehicleStop` of interest. + google.protobuf.Int32Value remaining_driving_distance_meters = 6; + + // The timestamp that indicates the estimated arrival time to the stop + // location. + google.protobuf.Timestamp estimated_arrival_time = 7; + + // The timestamp that indicates the estimated completion time of a Task. + google.protobuf.Timestamp estimated_task_completion_time = 8; + + // The current execution state of the Task. + Task.State state = 11; + + // The outcome of attempting to execute a Task. + Task.TaskOutcome task_outcome = 9; + + // The timestamp that indicates when the Task's outcome was set by the + // provider. + google.protobuf.Timestamp task_outcome_time = 12; + + // Immutable. The location where the Task will be completed. + LocationInfo planned_location = 10 [(google.api.field_behavior) = IMMUTABLE]; + + // The time window during which the task should be completed. + TimeWindow target_time_window = 13; + + // The custom attributes set on the task. + repeated TaskAttribute attributes = 14; +} diff --git a/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/proto/google/maps/fleetengine/delivery/v1/tasks.proto b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/proto/google/maps/fleetengine/delivery/v1/tasks.proto new file mode 100644 index 000000000000..95699db7e6eb --- /dev/null +++ b/java-maps-fleetengine-delivery/proto-google-maps-fleetengine-delivery-v1/src/main/proto/google/maps/fleetengine/delivery/v1/tasks.proto @@ -0,0 +1,288 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package maps.fleetengine.delivery.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/maps/fleetengine/delivery/v1/common.proto"; +import "google/maps/fleetengine/delivery/v1/delivery_vehicles.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Maps.FleetEngine.Delivery.V1"; +option go_package = "cloud.google.com/go/maps/fleetengine/delivery/apiv1/deliverypb;deliverypb"; +option java_multiple_files = true; +option java_outer_classname = "Tasks"; +option java_package = "google.maps.fleetengine.delivery.v1"; +option objc_class_prefix = "CFED"; + +// A Task in the Delivery API represents a single action to track. In general, +// there is a distinction between shipment-related Tasks and break Tasks. A +// shipment can have multiple Tasks associated with it. For example, there could +// be one Task for the pickup, and one for the drop-off or transfer. Also, +// different Tasks for a given shipment can be handled by different vehicles. +// For example, one vehicle could handle the pickup, driving the shipment to the +// hub, while another vehicle drives the same shipment from the hub to the +// drop-off location. +// +// Note: gRPC and REST APIs use different field naming conventions. For example, +// the `Task.journey_sharing_info` field in the gRPC API and the +// `DeliveryVehicle.journeySharingInfo` field in the REST API refer to the same +// field. +message Task { + option (google.api.resource) = { + type: "fleetengine.googleapis.com/Task" + pattern: "providers/{provider}/tasks/{task}" + }; + + // The type of Task. + enum Type { + // Default, the Task type is unknown. + TYPE_UNSPECIFIED = 0; + + // A pickup Task is the action taken for picking up a shipment from a + // customer. Depot or feeder vehicle pickups should use the `SCHEDULED_STOP` + // type. + PICKUP = 1; + + // A delivery Task is the action taken for delivering a shipment to an end + // customer. Depot or feeder vehicle dropoffs should use the + // `SCHEDULED_STOP` type. + DELIVERY = 2; + + // A scheduled stop Task is used for planning purposes. For example, it + // could represent picking up or dropping off shipments from feeder vehicles + // or depots. It shouldn't be used for any shipments that are picked up or + // dropped off from an end customer. + SCHEDULED_STOP = 3; + + // A Task that means the Vehicle is not available for service. For example, + // this can happen when the driver takes a break, or when the vehicle + // is being refueled. + UNAVAILABLE = 4; + } + + // The state of a Task. This indicates the Tasks's progress. + enum State { + // Default. Used for an unspecified or unrecognized Task state. + STATE_UNSPECIFIED = 0; + + // Either the Task has not yet been assigned to a delivery vehicle, or the + // delivery vehicle has not yet passed the `Task`'s assigned vehicle stop. + OPEN = 1; + + // When the vehicle passes the vehicle stop for this Task. + CLOSED = 2; + } + + // The outcome of attempting to execute a Task. When `TaskState` is closed, + // `TaskOutcome` indicates whether it was completed successfully. + enum TaskOutcome { + // The Task outcome before its value is set. + TASK_OUTCOME_UNSPECIFIED = 0; + + // The Task completed successfully. + SUCCEEDED = 1; + + // Either the Task couldn't be completed, or it was cancelled. + FAILED = 2; + } + + // The identity of the source that populated the `task_outcome_location`. + enum TaskOutcomeLocationSource { + // The task outcome before it is set. + TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED = 0; + + // The provider-specified the `task_outcome_location`. + PROVIDER = 2; + + // The provider didn't specify the `task_outcome_location`, so Fleet Engine + // used the last known vehicle location. + LAST_VEHICLE_LOCATION = 3; + } + + // Journey sharing specific fields. + message JourneySharingInfo { + // Tracking information for the stops that the assigned vehicle will make + // before it completes this Task. Note that this list can contain stops + // from other tasks. + // + // The first segment, + // `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC) + // or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST), + // contains route information from the driver's last known location to the + // upcoming `VehicleStop`. Current route information usually comes from the + // driver app, except for some cases noted in the documentation for + // [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment]. + // The other segments in + // `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or + // `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are + // populated by Fleet Engine. They provide route information between the + // remaining `VehicleStops`. + repeated VehicleJourneySegment remaining_vehicle_journey_segments = 1; + + // Indicates the vehicle's last reported location of the assigned vehicle. + DeliveryVehicleLocation last_location = 2; + + // Indicates whether the vehicle's lastLocation can be snapped to + // the `current_route_segment`. This value is False if either + // `last_location` or `current_route_segment` don't exist. This value is + // computed by Fleet Engine. Updates from clients are ignored. + bool last_location_snappable = 3; + } + + // Must be in the format `providers/{provider}/tasks/{task}`. + string name = 1; + + // Required. Immutable. Defines the type of the Task. For example, a break or + // shipment. + Type type = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Required. The current execution state of the Task. + State state = 3 [(google.api.field_behavior) = REQUIRED]; + + // The outcome of the Task. + TaskOutcome task_outcome = 9; + + // The timestamp that indicates when the `Task`'s outcome was set by the + // provider. + google.protobuf.Timestamp task_outcome_time = 10; + + // The location where the `Task`'s outcome was set. This value is updated as + // part of `UpdateTask`. If this value isn't explicitly updated by the + // provider, then Fleet Engine populates it by default with the last known + // vehicle location (the *raw* location). + LocationInfo task_outcome_location = 11; + + // Indicates where the value of the `task_outcome_location` came from. + TaskOutcomeLocationSource task_outcome_location_source = 12; + + // Immutable. This field facilitates the storing of an ID so you can avoid + // using a complicated mapping. You cannot set `tracking_id` for Tasks of type + // `UNAVAILABLE` and `SCHEDULED_STOP`. These IDs are 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 tracking_id = 4 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The ID of the vehicle that is executing this Task. Delivery + // Vehicle IDs are 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 delivery_vehicle_id = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The location where the Task will be completed. + // Optional for `UNAVAILABLE` Tasks, but required for all other Tasks. + LocationInfo planned_location = 6 [(google.api.field_behavior) = IMMUTABLE]; + + // Required. Immutable. The time needed to execute a Task at this location. + google.protobuf.Duration task_duration = 7 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // The time window during which the task should be completed. + TimeWindow target_time_window = 14; + + // Output only. Journey sharing-specific fields. Not populated when state is + // `CLOSED`. + JourneySharingInfo journey_sharing_info = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The configuration for task tracking that specifies which data elements are + // visible to the end users under what circumstances. + TaskTrackingViewConfig task_tracking_view_config = 13; + + // A list of custom Task attributes. Each attribute must have a unique key. + repeated TaskAttribute attributes = 15; +} + +// The configuration message that defines when a data element of a Task should +// be visible to the end users. +message TaskTrackingViewConfig { + // The option message that defines when a data element should be visible to + // the end users. + message VisibilityOption { + // The specific visibility option chosen. + oneof visibility_option { + // This data element is visible to the end users if the remaining stop + // count <= remaining_stop_count_threshold. + int32 remaining_stop_count_threshold = 1; + + // This data element is visible to the end users if the ETA to the stop + // <= duration_until_estimated_arrival_time_threshold. + google.protobuf.Duration duration_until_estimated_arrival_time_threshold = + 2; + + // This data element is visible to the end users if the remaining + // driving distance in meters <= + // remaining_driving_distance_meters_threshold. + int32 remaining_driving_distance_meters_threshold = 3; + + // If set to true, this data element is always visible to the end users + // with no thresholds. This field cannot be set to false. + bool always = 4; + + // If set to true, this data element is always hidden from the end users + // with no thresholds. This field cannot be set to false. + bool never = 5; + } + } + + // The field that specifies when route polyline points can be visible. If this + // field is not specified, the project level default visibility configuration + // for this data will be used. + VisibilityOption route_polyline_points_visibility = 1; + + // The field that specifies when estimated arrival time can be visible. If + // this field is not specified, the project level default visibility + // configuration for this data will be used. + VisibilityOption estimated_arrival_time_visibility = 2; + + // The field that specifies when estimated task completion time can be + // visible. If this field is not specified, the project level default + // visibility configuration for this data will be used. + VisibilityOption estimated_task_completion_time_visibility = 3; + + // The field that specifies when remaining driving distance can be visible. If + // this field is not specified, the project level default visibility + // configuration for this data will be used. + VisibilityOption remaining_driving_distance_visibility = 4; + + // The field that specifies when remaining stop count can be visible. If this + // field is not specified, the project level default visibility configuration + // for this data will be used. + VisibilityOption remaining_stop_count_visibility = 5; + + // The field that specifies when vehicle location can be visible. If this + // field is not specified, the project level default visibility configuration + // for this data will be used. + VisibilityOption vehicle_location_visibility = 6; +} diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/batchcreatetasks/AsyncBatchCreateTasks.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/batchcreatetasks/AsyncBatchCreateTasks.java new file mode 100644 index 000000000000..8819524034bc --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/batchcreatetasks/AsyncBatchCreateTasks.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_BatchCreateTasks_async] +import com.google.api.core.ApiFuture; +import google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest; +import google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse; +import google.maps.fleetengine.delivery.v1.CreateTaskRequest; +import google.maps.fleetengine.delivery.v1.DeliveryRequestHeader; +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.ProviderName; +import java.util.ArrayList; + +public class AsyncBatchCreateTasks { + + public static void main(String[] args) throws Exception { + asyncBatchCreateTasks(); + } + + public static void asyncBatchCreateTasks() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + BatchCreateTasksRequest request = + BatchCreateTasksRequest.newBuilder() + .setHeader(DeliveryRequestHeader.newBuilder().build()) + .setParent(ProviderName.of("[PROVIDER]").toString()) + .addAllRequests(new ArrayList()) + .build(); + ApiFuture future = + deliveryServiceClient.batchCreateTasksCallable().futureCall(request); + // Do something. + BatchCreateTasksResponse response = future.get(); + } + } +} +// [END fleetengine_v1_generated_DeliveryService_BatchCreateTasks_async] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/batchcreatetasks/SyncBatchCreateTasks.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/batchcreatetasks/SyncBatchCreateTasks.java new file mode 100644 index 000000000000..6ca57f5a0c7f --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/batchcreatetasks/SyncBatchCreateTasks.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_BatchCreateTasks_sync] +import google.maps.fleetengine.delivery.v1.BatchCreateTasksRequest; +import google.maps.fleetengine.delivery.v1.BatchCreateTasksResponse; +import google.maps.fleetengine.delivery.v1.CreateTaskRequest; +import google.maps.fleetengine.delivery.v1.DeliveryRequestHeader; +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.ProviderName; +import java.util.ArrayList; + +public class SyncBatchCreateTasks { + + public static void main(String[] args) throws Exception { + syncBatchCreateTasks(); + } + + public static void syncBatchCreateTasks() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + BatchCreateTasksRequest request = + BatchCreateTasksRequest.newBuilder() + .setHeader(DeliveryRequestHeader.newBuilder().build()) + .setParent(ProviderName.of("[PROVIDER]").toString()) + .addAllRequests(new ArrayList()) + .build(); + BatchCreateTasksResponse response = deliveryServiceClient.batchCreateTasks(request); + } + } +} +// [END fleetengine_v1_generated_DeliveryService_BatchCreateTasks_sync] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/create/SyncCreateSetCredentialsProvider.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..12e346fbf614 --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.DeliveryServiceSettings; +import google.maps.fleetengine.delivery.v1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DeliveryServiceSettings deliveryServiceSettings = + DeliveryServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + DeliveryServiceClient deliveryServiceClient = + DeliveryServiceClient.create(deliveryServiceSettings); + } +} +// [END fleetengine_v1_generated_DeliveryService_Create_SetCredentialsProvider_sync] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/create/SyncCreateSetCredentialsProvider1.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..9c58fc8d1e85 --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,41 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_Create_SetCredentialsProvider1_sync] +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.DeliveryServiceSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DeliveryServiceSettings deliveryServiceSettings = + DeliveryServiceSettings.newHttpJsonBuilder().build(); + DeliveryServiceClient deliveryServiceClient = + DeliveryServiceClient.create(deliveryServiceSettings); + } +} +// [END fleetengine_v1_generated_DeliveryService_Create_SetCredentialsProvider1_sync] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/create/SyncCreateSetEndpoint.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..4b46deadc8f5 --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_Create_SetEndpoint_sync] +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.DeliveryServiceSettings; +import google.maps.fleetengine.delivery.v1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DeliveryServiceSettings deliveryServiceSettings = + DeliveryServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + DeliveryServiceClient deliveryServiceClient = + DeliveryServiceClient.create(deliveryServiceSettings); + } +} +// [END fleetengine_v1_generated_DeliveryService_Create_SetEndpoint_sync] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/createdeliveryvehicle/AsyncCreateDeliveryVehicle.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/createdeliveryvehicle/AsyncCreateDeliveryVehicle.java new file mode 100644 index 000000000000..a12c10e87f44 --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/createdeliveryvehicle/AsyncCreateDeliveryVehicle.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_CreateDeliveryVehicle_async] +import com.google.api.core.ApiFuture; +import google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest; +import google.maps.fleetengine.delivery.v1.DeliveryRequestHeader; +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.DeliveryVehicle; + +public class AsyncCreateDeliveryVehicle { + + public static void main(String[] args) throws Exception { + asyncCreateDeliveryVehicle(); + } + + public static void asyncCreateDeliveryVehicle() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + CreateDeliveryVehicleRequest request = + CreateDeliveryVehicleRequest.newBuilder() + .setHeader(DeliveryRequestHeader.newBuilder().build()) + .setParent("parent-995424086") + .setDeliveryVehicleId("deliveryVehicleId-861424685") + .setDeliveryVehicle(DeliveryVehicle.newBuilder().build()) + .build(); + ApiFuture future = + deliveryServiceClient.createDeliveryVehicleCallable().futureCall(request); + // Do something. + DeliveryVehicle response = future.get(); + } + } +} +// [END fleetengine_v1_generated_DeliveryService_CreateDeliveryVehicle_async] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/createdeliveryvehicle/SyncCreateDeliveryVehicle.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/createdeliveryvehicle/SyncCreateDeliveryVehicle.java new file mode 100644 index 000000000000..f413d55ffd0f --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/createdeliveryvehicle/SyncCreateDeliveryVehicle.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_CreateDeliveryVehicle_sync] +import google.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest; +import google.maps.fleetengine.delivery.v1.DeliveryRequestHeader; +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.DeliveryVehicle; + +public class SyncCreateDeliveryVehicle { + + public static void main(String[] args) throws Exception { + syncCreateDeliveryVehicle(); + } + + public static void syncCreateDeliveryVehicle() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + CreateDeliveryVehicleRequest request = + CreateDeliveryVehicleRequest.newBuilder() + .setHeader(DeliveryRequestHeader.newBuilder().build()) + .setParent("parent-995424086") + .setDeliveryVehicleId("deliveryVehicleId-861424685") + .setDeliveryVehicle(DeliveryVehicle.newBuilder().build()) + .build(); + DeliveryVehicle response = deliveryServiceClient.createDeliveryVehicle(request); + } + } +} +// [END fleetengine_v1_generated_DeliveryService_CreateDeliveryVehicle_sync] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/createdeliveryvehicle/SyncCreateDeliveryVehicleStringDeliveryvehicleString.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/createdeliveryvehicle/SyncCreateDeliveryVehicleStringDeliveryvehicleString.java new file mode 100644 index 000000000000..6b78d35788e5 --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/createdeliveryvehicle/SyncCreateDeliveryVehicleStringDeliveryvehicleString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_CreateDeliveryVehicle_StringDeliveryvehicleString_sync] +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.DeliveryVehicle; + +public class SyncCreateDeliveryVehicleStringDeliveryvehicleString { + + public static void main(String[] args) throws Exception { + syncCreateDeliveryVehicleStringDeliveryvehicleString(); + } + + public static void syncCreateDeliveryVehicleStringDeliveryvehicleString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + String parent = "parent-995424086"; + DeliveryVehicle deliveryVehicle = DeliveryVehicle.newBuilder().build(); + String deliveryVehicleId = "deliveryVehicleId-861424685"; + DeliveryVehicle response = + deliveryServiceClient.createDeliveryVehicle(parent, deliveryVehicle, deliveryVehicleId); + } + } +} +// [END fleetengine_v1_generated_DeliveryService_CreateDeliveryVehicle_StringDeliveryvehicleString_sync] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/createtask/AsyncCreateTask.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/createtask/AsyncCreateTask.java new file mode 100644 index 000000000000..35077e08611a --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/createtask/AsyncCreateTask.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_CreateTask_async] +import com.google.api.core.ApiFuture; +import google.maps.fleetengine.delivery.v1.CreateTaskRequest; +import google.maps.fleetengine.delivery.v1.DeliveryRequestHeader; +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.Task; + +public class AsyncCreateTask { + + public static void main(String[] args) throws Exception { + asyncCreateTask(); + } + + public static void asyncCreateTask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + CreateTaskRequest request = + CreateTaskRequest.newBuilder() + .setHeader(DeliveryRequestHeader.newBuilder().build()) + .setParent("parent-995424086") + .setTaskId("taskId-880873088") + .setTask(Task.newBuilder().build()) + .build(); + ApiFuture future = deliveryServiceClient.createTaskCallable().futureCall(request); + // Do something. + Task response = future.get(); + } + } +} +// [END fleetengine_v1_generated_DeliveryService_CreateTask_async] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/createtask/SyncCreateTask.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/createtask/SyncCreateTask.java new file mode 100644 index 000000000000..faa4f226f322 --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/createtask/SyncCreateTask.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_CreateTask_sync] +import google.maps.fleetengine.delivery.v1.CreateTaskRequest; +import google.maps.fleetengine.delivery.v1.DeliveryRequestHeader; +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.Task; + +public class SyncCreateTask { + + public static void main(String[] args) throws Exception { + syncCreateTask(); + } + + public static void syncCreateTask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + CreateTaskRequest request = + CreateTaskRequest.newBuilder() + .setHeader(DeliveryRequestHeader.newBuilder().build()) + .setParent("parent-995424086") + .setTaskId("taskId-880873088") + .setTask(Task.newBuilder().build()) + .build(); + Task response = deliveryServiceClient.createTask(request); + } + } +} +// [END fleetengine_v1_generated_DeliveryService_CreateTask_sync] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/createtask/SyncCreateTaskStringTaskString.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/createtask/SyncCreateTaskStringTaskString.java new file mode 100644 index 000000000000..57de591ee00a --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/createtask/SyncCreateTaskStringTaskString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_CreateTask_StringTaskString_sync] +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.Task; + +public class SyncCreateTaskStringTaskString { + + public static void main(String[] args) throws Exception { + syncCreateTaskStringTaskString(); + } + + public static void syncCreateTaskStringTaskString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + String parent = "parent-995424086"; + Task task = Task.newBuilder().build(); + String taskId = "taskId-880873088"; + Task response = deliveryServiceClient.createTask(parent, task, taskId); + } + } +} +// [END fleetengine_v1_generated_DeliveryService_CreateTask_StringTaskString_sync] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/getdeliveryvehicle/AsyncGetDeliveryVehicle.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/getdeliveryvehicle/AsyncGetDeliveryVehicle.java new file mode 100644 index 000000000000..bfa152dfcc05 --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/getdeliveryvehicle/AsyncGetDeliveryVehicle.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_GetDeliveryVehicle_async] +import com.google.api.core.ApiFuture; +import google.maps.fleetengine.delivery.v1.DeliveryRequestHeader; +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.DeliveryVehicle; +import google.maps.fleetengine.delivery.v1.DeliveryVehicleName; +import google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest; + +public class AsyncGetDeliveryVehicle { + + public static void main(String[] args) throws Exception { + asyncGetDeliveryVehicle(); + } + + public static void asyncGetDeliveryVehicle() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + GetDeliveryVehicleRequest request = + GetDeliveryVehicleRequest.newBuilder() + .setHeader(DeliveryRequestHeader.newBuilder().build()) + .setName(DeliveryVehicleName.of("[PROVIDER]", "[VEHICLE]").toString()) + .build(); + ApiFuture future = + deliveryServiceClient.getDeliveryVehicleCallable().futureCall(request); + // Do something. + DeliveryVehicle response = future.get(); + } + } +} +// [END fleetengine_v1_generated_DeliveryService_GetDeliveryVehicle_async] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/getdeliveryvehicle/SyncGetDeliveryVehicle.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/getdeliveryvehicle/SyncGetDeliveryVehicle.java new file mode 100644 index 000000000000..f4432eb06e71 --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/getdeliveryvehicle/SyncGetDeliveryVehicle.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_GetDeliveryVehicle_sync] +import google.maps.fleetengine.delivery.v1.DeliveryRequestHeader; +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.DeliveryVehicle; +import google.maps.fleetengine.delivery.v1.DeliveryVehicleName; +import google.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest; + +public class SyncGetDeliveryVehicle { + + public static void main(String[] args) throws Exception { + syncGetDeliveryVehicle(); + } + + public static void syncGetDeliveryVehicle() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + GetDeliveryVehicleRequest request = + GetDeliveryVehicleRequest.newBuilder() + .setHeader(DeliveryRequestHeader.newBuilder().build()) + .setName(DeliveryVehicleName.of("[PROVIDER]", "[VEHICLE]").toString()) + .build(); + DeliveryVehicle response = deliveryServiceClient.getDeliveryVehicle(request); + } + } +} +// [END fleetengine_v1_generated_DeliveryService_GetDeliveryVehicle_sync] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/getdeliveryvehicle/SyncGetDeliveryVehicleDeliveryvehiclename.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/getdeliveryvehicle/SyncGetDeliveryVehicleDeliveryvehiclename.java new file mode 100644 index 000000000000..0e8cb0121ec2 --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/getdeliveryvehicle/SyncGetDeliveryVehicleDeliveryvehiclename.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_GetDeliveryVehicle_Deliveryvehiclename_sync] +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.DeliveryVehicle; +import google.maps.fleetengine.delivery.v1.DeliveryVehicleName; + +public class SyncGetDeliveryVehicleDeliveryvehiclename { + + public static void main(String[] args) throws Exception { + syncGetDeliveryVehicleDeliveryvehiclename(); + } + + public static void syncGetDeliveryVehicleDeliveryvehiclename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + DeliveryVehicleName name = DeliveryVehicleName.of("[PROVIDER]", "[VEHICLE]"); + DeliveryVehicle response = deliveryServiceClient.getDeliveryVehicle(name); + } + } +} +// [END fleetengine_v1_generated_DeliveryService_GetDeliveryVehicle_Deliveryvehiclename_sync] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/getdeliveryvehicle/SyncGetDeliveryVehicleString.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/getdeliveryvehicle/SyncGetDeliveryVehicleString.java new file mode 100644 index 000000000000..c4c141ae99a1 --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/getdeliveryvehicle/SyncGetDeliveryVehicleString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_GetDeliveryVehicle_String_sync] +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.DeliveryVehicle; +import google.maps.fleetengine.delivery.v1.DeliveryVehicleName; + +public class SyncGetDeliveryVehicleString { + + public static void main(String[] args) throws Exception { + syncGetDeliveryVehicleString(); + } + + public static void syncGetDeliveryVehicleString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + String name = DeliveryVehicleName.of("[PROVIDER]", "[VEHICLE]").toString(); + DeliveryVehicle response = deliveryServiceClient.getDeliveryVehicle(name); + } + } +} +// [END fleetengine_v1_generated_DeliveryService_GetDeliveryVehicle_String_sync] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/gettask/AsyncGetTask.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/gettask/AsyncGetTask.java new file mode 100644 index 000000000000..3a981e559673 --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/gettask/AsyncGetTask.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_GetTask_async] +import com.google.api.core.ApiFuture; +import google.maps.fleetengine.delivery.v1.DeliveryRequestHeader; +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.GetTaskRequest; +import google.maps.fleetengine.delivery.v1.Task; +import google.maps.fleetengine.delivery.v1.TaskName; + +public class AsyncGetTask { + + public static void main(String[] args) throws Exception { + asyncGetTask(); + } + + public static void asyncGetTask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + GetTaskRequest request = + GetTaskRequest.newBuilder() + .setHeader(DeliveryRequestHeader.newBuilder().build()) + .setName(TaskName.of("[PROVIDER]", "[TASK]").toString()) + .build(); + ApiFuture future = deliveryServiceClient.getTaskCallable().futureCall(request); + // Do something. + Task response = future.get(); + } + } +} +// [END fleetengine_v1_generated_DeliveryService_GetTask_async] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/gettask/SyncGetTask.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/gettask/SyncGetTask.java new file mode 100644 index 000000000000..a1f24ddd9bb8 --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/gettask/SyncGetTask.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_GetTask_sync] +import google.maps.fleetengine.delivery.v1.DeliveryRequestHeader; +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.GetTaskRequest; +import google.maps.fleetengine.delivery.v1.Task; +import google.maps.fleetengine.delivery.v1.TaskName; + +public class SyncGetTask { + + public static void main(String[] args) throws Exception { + syncGetTask(); + } + + public static void syncGetTask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + GetTaskRequest request = + GetTaskRequest.newBuilder() + .setHeader(DeliveryRequestHeader.newBuilder().build()) + .setName(TaskName.of("[PROVIDER]", "[TASK]").toString()) + .build(); + Task response = deliveryServiceClient.getTask(request); + } + } +} +// [END fleetengine_v1_generated_DeliveryService_GetTask_sync] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/gettask/SyncGetTaskString.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/gettask/SyncGetTaskString.java new file mode 100644 index 000000000000..cc46530ac6ae --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/gettask/SyncGetTaskString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_GetTask_String_sync] +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.Task; +import google.maps.fleetengine.delivery.v1.TaskName; + +public class SyncGetTaskString { + + public static void main(String[] args) throws Exception { + syncGetTaskString(); + } + + public static void syncGetTaskString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + String name = TaskName.of("[PROVIDER]", "[TASK]").toString(); + Task response = deliveryServiceClient.getTask(name); + } + } +} +// [END fleetengine_v1_generated_DeliveryService_GetTask_String_sync] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/gettask/SyncGetTaskTaskname.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/gettask/SyncGetTaskTaskname.java new file mode 100644 index 000000000000..d0a36e20730a --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/gettask/SyncGetTaskTaskname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_GetTask_Taskname_sync] +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.Task; +import google.maps.fleetengine.delivery.v1.TaskName; + +public class SyncGetTaskTaskname { + + public static void main(String[] args) throws Exception { + syncGetTaskTaskname(); + } + + public static void syncGetTaskTaskname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + TaskName name = TaskName.of("[PROVIDER]", "[TASK]"); + Task response = deliveryServiceClient.getTask(name); + } + } +} +// [END fleetengine_v1_generated_DeliveryService_GetTask_Taskname_sync] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/gettasktrackinginfo/AsyncGetTaskTrackingInfo.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/gettasktrackinginfo/AsyncGetTaskTrackingInfo.java new file mode 100644 index 000000000000..5005e2d90864 --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/gettasktrackinginfo/AsyncGetTaskTrackingInfo.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_GetTaskTrackingInfo_async] +import com.google.api.core.ApiFuture; +import google.maps.fleetengine.delivery.v1.DeliveryRequestHeader; +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest; +import google.maps.fleetengine.delivery.v1.TaskTrackingInfo; +import google.maps.fleetengine.delivery.v1.TaskTrackingInfoName; + +public class AsyncGetTaskTrackingInfo { + + public static void main(String[] args) throws Exception { + asyncGetTaskTrackingInfo(); + } + + public static void asyncGetTaskTrackingInfo() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + GetTaskTrackingInfoRequest request = + GetTaskTrackingInfoRequest.newBuilder() + .setHeader(DeliveryRequestHeader.newBuilder().build()) + .setName(TaskTrackingInfoName.of("[PROVIDER]", "[TRACKING]").toString()) + .build(); + ApiFuture future = + deliveryServiceClient.getTaskTrackingInfoCallable().futureCall(request); + // Do something. + TaskTrackingInfo response = future.get(); + } + } +} +// [END fleetengine_v1_generated_DeliveryService_GetTaskTrackingInfo_async] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/gettasktrackinginfo/SyncGetTaskTrackingInfo.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/gettasktrackinginfo/SyncGetTaskTrackingInfo.java new file mode 100644 index 000000000000..e641e802d520 --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/gettasktrackinginfo/SyncGetTaskTrackingInfo.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_GetTaskTrackingInfo_sync] +import google.maps.fleetengine.delivery.v1.DeliveryRequestHeader; +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest; +import google.maps.fleetengine.delivery.v1.TaskTrackingInfo; +import google.maps.fleetengine.delivery.v1.TaskTrackingInfoName; + +public class SyncGetTaskTrackingInfo { + + public static void main(String[] args) throws Exception { + syncGetTaskTrackingInfo(); + } + + public static void syncGetTaskTrackingInfo() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + GetTaskTrackingInfoRequest request = + GetTaskTrackingInfoRequest.newBuilder() + .setHeader(DeliveryRequestHeader.newBuilder().build()) + .setName(TaskTrackingInfoName.of("[PROVIDER]", "[TRACKING]").toString()) + .build(); + TaskTrackingInfo response = deliveryServiceClient.getTaskTrackingInfo(request); + } + } +} +// [END fleetengine_v1_generated_DeliveryService_GetTaskTrackingInfo_sync] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/gettasktrackinginfo/SyncGetTaskTrackingInfoString.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/gettasktrackinginfo/SyncGetTaskTrackingInfoString.java new file mode 100644 index 000000000000..874be55e56ce --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/gettasktrackinginfo/SyncGetTaskTrackingInfoString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_GetTaskTrackingInfo_String_sync] +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.TaskTrackingInfo; +import google.maps.fleetengine.delivery.v1.TaskTrackingInfoName; + +public class SyncGetTaskTrackingInfoString { + + public static void main(String[] args) throws Exception { + syncGetTaskTrackingInfoString(); + } + + public static void syncGetTaskTrackingInfoString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + String name = TaskTrackingInfoName.of("[PROVIDER]", "[TRACKING]").toString(); + TaskTrackingInfo response = deliveryServiceClient.getTaskTrackingInfo(name); + } + } +} +// [END fleetengine_v1_generated_DeliveryService_GetTaskTrackingInfo_String_sync] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/gettasktrackinginfo/SyncGetTaskTrackingInfoTasktrackinginfoname.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/gettasktrackinginfo/SyncGetTaskTrackingInfoTasktrackinginfoname.java new file mode 100644 index 000000000000..ad01a63070fc --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/gettasktrackinginfo/SyncGetTaskTrackingInfoTasktrackinginfoname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_GetTaskTrackingInfo_Tasktrackinginfoname_sync] +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.TaskTrackingInfo; +import google.maps.fleetengine.delivery.v1.TaskTrackingInfoName; + +public class SyncGetTaskTrackingInfoTasktrackinginfoname { + + public static void main(String[] args) throws Exception { + syncGetTaskTrackingInfoTasktrackinginfoname(); + } + + public static void syncGetTaskTrackingInfoTasktrackinginfoname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + TaskTrackingInfoName name = TaskTrackingInfoName.of("[PROVIDER]", "[TRACKING]"); + TaskTrackingInfo response = deliveryServiceClient.getTaskTrackingInfo(name); + } + } +} +// [END fleetengine_v1_generated_DeliveryService_GetTaskTrackingInfo_Tasktrackinginfoname_sync] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/listdeliveryvehicles/AsyncListDeliveryVehicles.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/listdeliveryvehicles/AsyncListDeliveryVehicles.java new file mode 100644 index 000000000000..b6d766885104 --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/listdeliveryvehicles/AsyncListDeliveryVehicles.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_ListDeliveryVehicles_async] +import com.google.api.core.ApiFuture; +import com.google.geo.type.Viewport; +import google.maps.fleetengine.delivery.v1.DeliveryRequestHeader; +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.DeliveryVehicle; +import google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest; +import google.maps.fleetengine.delivery.v1.ProviderName; + +public class AsyncListDeliveryVehicles { + + public static void main(String[] args) throws Exception { + asyncListDeliveryVehicles(); + } + + public static void asyncListDeliveryVehicles() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + ListDeliveryVehiclesRequest request = + ListDeliveryVehiclesRequest.newBuilder() + .setHeader(DeliveryRequestHeader.newBuilder().build()) + .setParent(ProviderName.of("[PROVIDER]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setViewport(Viewport.newBuilder().build()) + .build(); + ApiFuture future = + deliveryServiceClient.listDeliveryVehiclesPagedCallable().futureCall(request); + // Do something. + for (DeliveryVehicle element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END fleetengine_v1_generated_DeliveryService_ListDeliveryVehicles_async] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/listdeliveryvehicles/AsyncListDeliveryVehiclesPaged.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/listdeliveryvehicles/AsyncListDeliveryVehiclesPaged.java new file mode 100644 index 000000000000..34c5ea61e673 --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/listdeliveryvehicles/AsyncListDeliveryVehiclesPaged.java @@ -0,0 +1,67 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_ListDeliveryVehicles_Paged_async] +import com.google.common.base.Strings; +import com.google.geo.type.Viewport; +import google.maps.fleetengine.delivery.v1.DeliveryRequestHeader; +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.DeliveryVehicle; +import google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest; +import google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse; +import google.maps.fleetengine.delivery.v1.ProviderName; + +public class AsyncListDeliveryVehiclesPaged { + + public static void main(String[] args) throws Exception { + asyncListDeliveryVehiclesPaged(); + } + + public static void asyncListDeliveryVehiclesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + ListDeliveryVehiclesRequest request = + ListDeliveryVehiclesRequest.newBuilder() + .setHeader(DeliveryRequestHeader.newBuilder().build()) + .setParent(ProviderName.of("[PROVIDER]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setViewport(Viewport.newBuilder().build()) + .build(); + while (true) { + ListDeliveryVehiclesResponse response = + deliveryServiceClient.listDeliveryVehiclesCallable().call(request); + for (DeliveryVehicle element : response.getDeliveryVehiclesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END fleetengine_v1_generated_DeliveryService_ListDeliveryVehicles_Paged_async] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/listdeliveryvehicles/SyncListDeliveryVehicles.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/listdeliveryvehicles/SyncListDeliveryVehicles.java new file mode 100644 index 000000000000..e0fb2daad65c --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/listdeliveryvehicles/SyncListDeliveryVehicles.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_ListDeliveryVehicles_sync] +import com.google.geo.type.Viewport; +import google.maps.fleetengine.delivery.v1.DeliveryRequestHeader; +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.DeliveryVehicle; +import google.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest; +import google.maps.fleetengine.delivery.v1.ProviderName; + +public class SyncListDeliveryVehicles { + + public static void main(String[] args) throws Exception { + syncListDeliveryVehicles(); + } + + public static void syncListDeliveryVehicles() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + ListDeliveryVehiclesRequest request = + ListDeliveryVehiclesRequest.newBuilder() + .setHeader(DeliveryRequestHeader.newBuilder().build()) + .setParent(ProviderName.of("[PROVIDER]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setViewport(Viewport.newBuilder().build()) + .build(); + for (DeliveryVehicle element : + deliveryServiceClient.listDeliveryVehicles(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END fleetengine_v1_generated_DeliveryService_ListDeliveryVehicles_sync] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/listdeliveryvehicles/SyncListDeliveryVehiclesProvidername.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/listdeliveryvehicles/SyncListDeliveryVehiclesProvidername.java new file mode 100644 index 000000000000..8e2a8d67f2bf --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/listdeliveryvehicles/SyncListDeliveryVehiclesProvidername.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_ListDeliveryVehicles_Providername_sync] +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.DeliveryVehicle; +import google.maps.fleetengine.delivery.v1.ProviderName; + +public class SyncListDeliveryVehiclesProvidername { + + public static void main(String[] args) throws Exception { + syncListDeliveryVehiclesProvidername(); + } + + public static void syncListDeliveryVehiclesProvidername() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + ProviderName parent = ProviderName.of("[PROVIDER]"); + for (DeliveryVehicle element : + deliveryServiceClient.listDeliveryVehicles(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END fleetengine_v1_generated_DeliveryService_ListDeliveryVehicles_Providername_sync] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/listdeliveryvehicles/SyncListDeliveryVehiclesString.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/listdeliveryvehicles/SyncListDeliveryVehiclesString.java new file mode 100644 index 000000000000..ef2cfbc63ecc --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/listdeliveryvehicles/SyncListDeliveryVehiclesString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_ListDeliveryVehicles_String_sync] +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.DeliveryVehicle; +import google.maps.fleetengine.delivery.v1.ProviderName; + +public class SyncListDeliveryVehiclesString { + + public static void main(String[] args) throws Exception { + syncListDeliveryVehiclesString(); + } + + public static void syncListDeliveryVehiclesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + String parent = ProviderName.of("[PROVIDER]").toString(); + for (DeliveryVehicle element : + deliveryServiceClient.listDeliveryVehicles(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END fleetengine_v1_generated_DeliveryService_ListDeliveryVehicles_String_sync] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/listtasks/AsyncListTasks.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/listtasks/AsyncListTasks.java new file mode 100644 index 000000000000..bf99dd33d392 --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/listtasks/AsyncListTasks.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_ListTasks_async] +import com.google.api.core.ApiFuture; +import google.maps.fleetengine.delivery.v1.DeliveryRequestHeader; +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.ListTasksRequest; +import google.maps.fleetengine.delivery.v1.ProviderName; +import google.maps.fleetengine.delivery.v1.Task; + +public class AsyncListTasks { + + public static void main(String[] args) throws Exception { + asyncListTasks(); + } + + public static void asyncListTasks() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + ListTasksRequest request = + ListTasksRequest.newBuilder() + .setHeader(DeliveryRequestHeader.newBuilder().build()) + .setParent(ProviderName.of("[PROVIDER]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + ApiFuture future = deliveryServiceClient.listTasksPagedCallable().futureCall(request); + // Do something. + for (Task element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END fleetengine_v1_generated_DeliveryService_ListTasks_async] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/listtasks/AsyncListTasksPaged.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/listtasks/AsyncListTasksPaged.java new file mode 100644 index 000000000000..5f2467f03113 --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/listtasks/AsyncListTasksPaged.java @@ -0,0 +1,64 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_ListTasks_Paged_async] +import com.google.common.base.Strings; +import google.maps.fleetengine.delivery.v1.DeliveryRequestHeader; +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.ListTasksRequest; +import google.maps.fleetengine.delivery.v1.ListTasksResponse; +import google.maps.fleetengine.delivery.v1.ProviderName; +import google.maps.fleetengine.delivery.v1.Task; + +public class AsyncListTasksPaged { + + public static void main(String[] args) throws Exception { + asyncListTasksPaged(); + } + + public static void asyncListTasksPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + ListTasksRequest request = + ListTasksRequest.newBuilder() + .setHeader(DeliveryRequestHeader.newBuilder().build()) + .setParent(ProviderName.of("[PROVIDER]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + while (true) { + ListTasksResponse response = deliveryServiceClient.listTasksCallable().call(request); + for (Task element : response.getTasksList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END fleetengine_v1_generated_DeliveryService_ListTasks_Paged_async] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/listtasks/SyncListTasks.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/listtasks/SyncListTasks.java new file mode 100644 index 000000000000..233b5f203805 --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/listtasks/SyncListTasks.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_ListTasks_sync] +import google.maps.fleetengine.delivery.v1.DeliveryRequestHeader; +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.ListTasksRequest; +import google.maps.fleetengine.delivery.v1.ProviderName; +import google.maps.fleetengine.delivery.v1.Task; + +public class SyncListTasks { + + public static void main(String[] args) throws Exception { + syncListTasks(); + } + + public static void syncListTasks() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + ListTasksRequest request = + ListTasksRequest.newBuilder() + .setHeader(DeliveryRequestHeader.newBuilder().build()) + .setParent(ProviderName.of("[PROVIDER]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + for (Task element : deliveryServiceClient.listTasks(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END fleetengine_v1_generated_DeliveryService_ListTasks_sync] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/listtasks/SyncListTasksProvidername.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/listtasks/SyncListTasksProvidername.java new file mode 100644 index 000000000000..c2f03bb6aa65 --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/listtasks/SyncListTasksProvidername.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_ListTasks_Providername_sync] +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.ProviderName; +import google.maps.fleetengine.delivery.v1.Task; + +public class SyncListTasksProvidername { + + public static void main(String[] args) throws Exception { + syncListTasksProvidername(); + } + + public static void syncListTasksProvidername() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + ProviderName parent = ProviderName.of("[PROVIDER]"); + for (Task element : deliveryServiceClient.listTasks(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END fleetengine_v1_generated_DeliveryService_ListTasks_Providername_sync] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/listtasks/SyncListTasksString.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/listtasks/SyncListTasksString.java new file mode 100644 index 000000000000..d8697ea31d64 --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/listtasks/SyncListTasksString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_ListTasks_String_sync] +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.ProviderName; +import google.maps.fleetengine.delivery.v1.Task; + +public class SyncListTasksString { + + public static void main(String[] args) throws Exception { + syncListTasksString(); + } + + public static void syncListTasksString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + String parent = ProviderName.of("[PROVIDER]").toString(); + for (Task element : deliveryServiceClient.listTasks(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END fleetengine_v1_generated_DeliveryService_ListTasks_String_sync] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/searchtasks/AsyncSearchTasks.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/searchtasks/AsyncSearchTasks.java new file mode 100644 index 000000000000..3fee7596055e --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/searchtasks/AsyncSearchTasks.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_SearchTasks_async] +import com.google.api.core.ApiFuture; +import google.maps.fleetengine.delivery.v1.DeliveryRequestHeader; +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.SearchTasksRequest; +import google.maps.fleetengine.delivery.v1.Task; + +public class AsyncSearchTasks { + + public static void main(String[] args) throws Exception { + asyncSearchTasks(); + } + + public static void asyncSearchTasks() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + SearchTasksRequest request = + SearchTasksRequest.newBuilder() + .setHeader(DeliveryRequestHeader.newBuilder().build()) + .setParent("parent-995424086") + .setTrackingId("trackingId1168987698") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = deliveryServiceClient.searchTasksPagedCallable().futureCall(request); + // Do something. + for (Task element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END fleetengine_v1_generated_DeliveryService_SearchTasks_async] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/searchtasks/AsyncSearchTasksPaged.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/searchtasks/AsyncSearchTasksPaged.java new file mode 100644 index 000000000000..ab6316b51d95 --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/searchtasks/AsyncSearchTasksPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_SearchTasks_Paged_async] +import com.google.common.base.Strings; +import google.maps.fleetengine.delivery.v1.DeliveryRequestHeader; +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.SearchTasksRequest; +import google.maps.fleetengine.delivery.v1.SearchTasksResponse; +import google.maps.fleetengine.delivery.v1.Task; + +public class AsyncSearchTasksPaged { + + public static void main(String[] args) throws Exception { + asyncSearchTasksPaged(); + } + + public static void asyncSearchTasksPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + SearchTasksRequest request = + SearchTasksRequest.newBuilder() + .setHeader(DeliveryRequestHeader.newBuilder().build()) + .setParent("parent-995424086") + .setTrackingId("trackingId1168987698") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + SearchTasksResponse response = deliveryServiceClient.searchTasksCallable().call(request); + for (Task element : response.getTasksList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END fleetengine_v1_generated_DeliveryService_SearchTasks_Paged_async] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/searchtasks/SyncSearchTasks.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/searchtasks/SyncSearchTasks.java new file mode 100644 index 000000000000..f99aae6119fd --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/searchtasks/SyncSearchTasks.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_SearchTasks_sync] +import google.maps.fleetengine.delivery.v1.DeliveryRequestHeader; +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.SearchTasksRequest; +import google.maps.fleetengine.delivery.v1.Task; + +public class SyncSearchTasks { + + public static void main(String[] args) throws Exception { + syncSearchTasks(); + } + + public static void syncSearchTasks() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + SearchTasksRequest request = + SearchTasksRequest.newBuilder() + .setHeader(DeliveryRequestHeader.newBuilder().build()) + .setParent("parent-995424086") + .setTrackingId("trackingId1168987698") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Task element : deliveryServiceClient.searchTasks(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END fleetengine_v1_generated_DeliveryService_SearchTasks_sync] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/searchtasks/SyncSearchTasksString.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/searchtasks/SyncSearchTasksString.java new file mode 100644 index 000000000000..7098f1f74f18 --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/searchtasks/SyncSearchTasksString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_SearchTasks_String_sync] +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.Task; + +public class SyncSearchTasksString { + + public static void main(String[] args) throws Exception { + syncSearchTasksString(); + } + + public static void syncSearchTasksString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + String parent = "parent-995424086"; + for (Task element : deliveryServiceClient.searchTasks(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END fleetengine_v1_generated_DeliveryService_SearchTasks_String_sync] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/updatedeliveryvehicle/AsyncUpdateDeliveryVehicle.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/updatedeliveryvehicle/AsyncUpdateDeliveryVehicle.java new file mode 100644 index 000000000000..20d4d4a0dd58 --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/updatedeliveryvehicle/AsyncUpdateDeliveryVehicle.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_UpdateDeliveryVehicle_async] +import com.google.api.core.ApiFuture; +import com.google.protobuf.FieldMask; +import google.maps.fleetengine.delivery.v1.DeliveryRequestHeader; +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.DeliveryVehicle; +import google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest; + +public class AsyncUpdateDeliveryVehicle { + + public static void main(String[] args) throws Exception { + asyncUpdateDeliveryVehicle(); + } + + public static void asyncUpdateDeliveryVehicle() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + UpdateDeliveryVehicleRequest request = + UpdateDeliveryVehicleRequest.newBuilder() + .setHeader(DeliveryRequestHeader.newBuilder().build()) + .setDeliveryVehicle(DeliveryVehicle.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + deliveryServiceClient.updateDeliveryVehicleCallable().futureCall(request); + // Do something. + DeliveryVehicle response = future.get(); + } + } +} +// [END fleetengine_v1_generated_DeliveryService_UpdateDeliveryVehicle_async] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/updatedeliveryvehicle/SyncUpdateDeliveryVehicle.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/updatedeliveryvehicle/SyncUpdateDeliveryVehicle.java new file mode 100644 index 000000000000..8c187671a918 --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/updatedeliveryvehicle/SyncUpdateDeliveryVehicle.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_UpdateDeliveryVehicle_sync] +import com.google.protobuf.FieldMask; +import google.maps.fleetengine.delivery.v1.DeliveryRequestHeader; +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.DeliveryVehicle; +import google.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest; + +public class SyncUpdateDeliveryVehicle { + + public static void main(String[] args) throws Exception { + syncUpdateDeliveryVehicle(); + } + + public static void syncUpdateDeliveryVehicle() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + UpdateDeliveryVehicleRequest request = + UpdateDeliveryVehicleRequest.newBuilder() + .setHeader(DeliveryRequestHeader.newBuilder().build()) + .setDeliveryVehicle(DeliveryVehicle.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + DeliveryVehicle response = deliveryServiceClient.updateDeliveryVehicle(request); + } + } +} +// [END fleetengine_v1_generated_DeliveryService_UpdateDeliveryVehicle_sync] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/updatedeliveryvehicle/SyncUpdateDeliveryVehicleDeliveryvehicleFieldmask.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/updatedeliveryvehicle/SyncUpdateDeliveryVehicleDeliveryvehicleFieldmask.java new file mode 100644 index 000000000000..bd7f97c92896 --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/updatedeliveryvehicle/SyncUpdateDeliveryVehicleDeliveryvehicleFieldmask.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_UpdateDeliveryVehicle_DeliveryvehicleFieldmask_sync] +import com.google.protobuf.FieldMask; +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.DeliveryVehicle; + +public class SyncUpdateDeliveryVehicleDeliveryvehicleFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateDeliveryVehicleDeliveryvehicleFieldmask(); + } + + public static void syncUpdateDeliveryVehicleDeliveryvehicleFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + DeliveryVehicle deliveryVehicle = DeliveryVehicle.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + DeliveryVehicle response = + deliveryServiceClient.updateDeliveryVehicle(deliveryVehicle, updateMask); + } + } +} +// [END fleetengine_v1_generated_DeliveryService_UpdateDeliveryVehicle_DeliveryvehicleFieldmask_sync] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/updatetask/AsyncUpdateTask.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/updatetask/AsyncUpdateTask.java new file mode 100644 index 000000000000..0dc1d0d70a10 --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/updatetask/AsyncUpdateTask.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_UpdateTask_async] +import com.google.api.core.ApiFuture; +import com.google.protobuf.FieldMask; +import google.maps.fleetengine.delivery.v1.DeliveryRequestHeader; +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.Task; +import google.maps.fleetengine.delivery.v1.UpdateTaskRequest; + +public class AsyncUpdateTask { + + public static void main(String[] args) throws Exception { + asyncUpdateTask(); + } + + public static void asyncUpdateTask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + UpdateTaskRequest request = + UpdateTaskRequest.newBuilder() + .setHeader(DeliveryRequestHeader.newBuilder().build()) + .setTask(Task.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = deliveryServiceClient.updateTaskCallable().futureCall(request); + // Do something. + Task response = future.get(); + } + } +} +// [END fleetengine_v1_generated_DeliveryService_UpdateTask_async] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/updatetask/SyncUpdateTask.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/updatetask/SyncUpdateTask.java new file mode 100644 index 000000000000..a57dbdc4d706 --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/updatetask/SyncUpdateTask.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_UpdateTask_sync] +import com.google.protobuf.FieldMask; +import google.maps.fleetengine.delivery.v1.DeliveryRequestHeader; +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.Task; +import google.maps.fleetengine.delivery.v1.UpdateTaskRequest; + +public class SyncUpdateTask { + + public static void main(String[] args) throws Exception { + syncUpdateTask(); + } + + public static void syncUpdateTask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + UpdateTaskRequest request = + UpdateTaskRequest.newBuilder() + .setHeader(DeliveryRequestHeader.newBuilder().build()) + .setTask(Task.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Task response = deliveryServiceClient.updateTask(request); + } + } +} +// [END fleetengine_v1_generated_DeliveryService_UpdateTask_sync] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/updatetask/SyncUpdateTaskTaskFieldmask.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/updatetask/SyncUpdateTaskTaskFieldmask.java new file mode 100644 index 000000000000..2e6b1e30caef --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservice/updatetask/SyncUpdateTaskTaskFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryService_UpdateTask_TaskFieldmask_sync] +import com.google.protobuf.FieldMask; +import google.maps.fleetengine.delivery.v1.DeliveryServiceClient; +import google.maps.fleetengine.delivery.v1.Task; + +public class SyncUpdateTaskTaskFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateTaskTaskFieldmask(); + } + + public static void syncUpdateTaskTaskFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.create()) { + Task task = Task.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Task response = deliveryServiceClient.updateTask(task, updateMask); + } + } +} +// [END fleetengine_v1_generated_DeliveryService_UpdateTask_TaskFieldmask_sync] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservicesettings/createdeliveryvehicle/SyncCreateDeliveryVehicle.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservicesettings/createdeliveryvehicle/SyncCreateDeliveryVehicle.java new file mode 100644 index 000000000000..c7386828499d --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/deliveryservicesettings/createdeliveryvehicle/SyncCreateDeliveryVehicle.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.samples; + +// [START fleetengine_v1_generated_DeliveryServiceSettings_CreateDeliveryVehicle_sync] +import google.maps.fleetengine.delivery.v1.DeliveryServiceSettings; +import java.time.Duration; + +public class SyncCreateDeliveryVehicle { + + public static void main(String[] args) throws Exception { + syncCreateDeliveryVehicle(); + } + + public static void syncCreateDeliveryVehicle() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DeliveryServiceSettings.Builder deliveryServiceSettingsBuilder = + DeliveryServiceSettings.newBuilder(); + deliveryServiceSettingsBuilder + .createDeliveryVehicleSettings() + .setRetrySettings( + deliveryServiceSettingsBuilder + .createDeliveryVehicleSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + DeliveryServiceSettings deliveryServiceSettings = deliveryServiceSettingsBuilder.build(); + } +} +// [END fleetengine_v1_generated_DeliveryServiceSettings_CreateDeliveryVehicle_sync] diff --git a/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/stub/deliveryservicestubsettings/createdeliveryvehicle/SyncCreateDeliveryVehicle.java b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/stub/deliveryservicestubsettings/createdeliveryvehicle/SyncCreateDeliveryVehicle.java new file mode 100644 index 000000000000..e1bb3a6abe5a --- /dev/null +++ b/java-maps-fleetengine-delivery/samples/snippets/generated/google/maps/fleetengine/delivery/v1/stub/deliveryservicestubsettings/createdeliveryvehicle/SyncCreateDeliveryVehicle.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 google.maps.fleetengine.delivery.v1.stub.samples; + +// [START fleetengine_v1_generated_DeliveryServiceStubSettings_CreateDeliveryVehicle_sync] +import google.maps.fleetengine.delivery.v1.stub.DeliveryServiceStubSettings; +import java.time.Duration; + +public class SyncCreateDeliveryVehicle { + + public static void main(String[] args) throws Exception { + syncCreateDeliveryVehicle(); + } + + public static void syncCreateDeliveryVehicle() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DeliveryServiceStubSettings.Builder deliveryServiceSettingsBuilder = + DeliveryServiceStubSettings.newBuilder(); + deliveryServiceSettingsBuilder + .createDeliveryVehicleSettings() + .setRetrySettings( + deliveryServiceSettingsBuilder + .createDeliveryVehicleSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + DeliveryServiceStubSettings deliveryServiceSettings = deliveryServiceSettingsBuilder.build(); + } +} +// [END fleetengine_v1_generated_DeliveryServiceStubSettings_CreateDeliveryVehicle_sync] diff --git a/pom.xml b/pom.xml index c38fadafbee2..fef3ee2cc4fe 100644 --- a/pom.xml +++ b/pom.xml @@ -107,6 +107,7 @@ java-life-sciences java-managed-identities java-maps-addressvalidation + java-maps-fleetengine-delivery java-maps-mapsplatformdatasets java-maps-routing java-mediatranslation diff --git a/versions.txt b/versions.txt index 981ea964f1bf..e6d9b354a40b 100644 --- a/versions.txt +++ b/versions.txt @@ -691,3 +691,6 @@ proto-google-cloud-redis-cluster-v1beta1:0.1.0:0.2.0-SNAPSHOT proto-google-cloud-redis-cluster-v1:0.1.0:0.2.0-SNAPSHOT grpc-google-cloud-redis-cluster-v1:0.1.0:0.2.0-SNAPSHOT grpc-google-cloud-redis-cluster-v1beta1:0.1.0:0.2.0-SNAPSHOT +google-maps-fleetengine-delivery:0.0.0:0.0.1-SNAPSHOT +proto-google-maps-fleetengine-delivery-v1:0.0.0:0.0.1-SNAPSHOT +grpc-google-maps-fleetengine-delivery-v1:0.0.0:0.0.1-SNAPSHOT