diff --git a/generation_config.yaml b/generation_config.yaml
index ffe4ac94d60d..643965133ad3 100644
--- a/generation_config.yaml
+++ b/generation_config.yaml
@@ -1274,6 +1274,25 @@ libraries:
GAPICs:
- proto_path: google/maps/areainsights/v1
requires_billing: true
+- api_shortname: maps-fleetengine
+ name_pretty: Local Rides and Deliveries API
+ product_documentation:
+ https://developers.google.com/maps/documentation/transportation-logistics/mobility
+ api_description: Enables Fleet Engine for access to the On Demand Rides and Deliveries
+ and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the
+ Cloud Logging Services is subject to the Google Maps Platform Terms of Service
+ located at https://cloud.google.com/maps-platform/terms.
+ client_documentation:
+ https://cloud.google.com/java/docs/reference/google-maps-fleetengine/latest/overview
+ release_level: preview
+ distribution_name: com.google.maps:google-maps-fleetengine
+ api_id: maps-fleetengine.googleapis.com
+ library_type: GAPIC_AUTO
+ group_id: com.google.maps
+ cloud_api: false
+ GAPICs:
+ - proto_path: google/maps/fleetengine/v1
+ requires_billing: true
- api_shortname: maps-mapsplatformdatasets
name_pretty: Maps Platform Datasets API
product_documentation: https://developers.google.com/maps/documentation
diff --git a/java-maps-fleetengine/.OwlBot-hermetic.yaml b/java-maps-fleetengine/.OwlBot-hermetic.yaml
new file mode 100644
index 000000000000..6248bc68e648
--- /dev/null
+++ b/java-maps-fleetengine/.OwlBot-hermetic.yaml
@@ -0,0 +1,35 @@
+# Copyright 2024 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+deep-remove-regex:
+- "/java-maps-fleetengine/grpc-google-.*/src"
+- "/java-maps-fleetengine/proto-google-.*/src"
+- "/java-maps-fleetengine/google-.*/src"
+- "/java-maps-fleetengine/samples/snippets/generated"
+
+deep-preserve-regex:
+- "/java-maps-fleetengine/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java"
+
+deep-copy-regex:
+- source: "/google/maps/fleetengine/(v.*)/.*-java/proto-google-.*/src"
+ dest: "/owl-bot-staging/java-maps-fleetengine/$1/proto-google-maps-fleetengine-$1/src"
+- source: "/google/maps/fleetengine/(v.*)/.*-java/grpc-google-.*/src"
+ dest: "/owl-bot-staging/java-maps-fleetengine/$1/grpc-google-maps-fleetengine-$1/src"
+- source: "/google/maps/fleetengine/(v.*)/.*-java/gapic-google-.*/src"
+ dest: "/owl-bot-staging/java-maps-fleetengine/$1/google-maps-fleetengine/src"
+- source: "/google/maps/fleetengine/(v.*)/.*-java/samples/snippets/generated"
+ dest: "/owl-bot-staging/java-maps-fleetengine/$1/samples/snippets/generated"
+
+api-name: maps-fleetengine
\ No newline at end of file
diff --git a/java-maps-fleetengine/.repo-metadata.json b/java-maps-fleetengine/.repo-metadata.json
new file mode 100644
index 000000000000..92c2f940f88b
--- /dev/null
+++ b/java-maps-fleetengine/.repo-metadata.json
@@ -0,0 +1,16 @@
+{
+ "api_shortname": "maps-fleetengine",
+ "name_pretty": "Local Rides and Deliveries API",
+ "product_documentation": "https://developers.google.com/maps/documentation/transportation-logistics/mobility",
+ "api_description": "Enables Fleet Engine for access to the On Demand Rides and Deliveries and Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud Logging Services is subject to the Google Maps Platform Terms of Service located at https://cloud.google.com/maps-platform/terms.",
+ "client_documentation": "https://cloud.google.com/java/docs/reference/google-maps-fleetengine/latest/overview",
+ "release_level": "preview",
+ "transport": "grpc",
+ "language": "java",
+ "repo": "googleapis/google-cloud-java",
+ "repo_short": "java-maps-fleetengine",
+ "distribution_name": "com.google.maps:google-maps-fleetengine",
+ "api_id": "maps-fleetengine.googleapis.com",
+ "library_type": "GAPIC_AUTO",
+ "requires_billing": true
+}
\ No newline at end of file
diff --git a/java-maps-fleetengine/README.md b/java-maps-fleetengine/README.md
new file mode 100644
index 000000000000..e717c624dfbf
--- /dev/null
+++ b/java-maps-fleetengine/README.md
@@ -0,0 +1,224 @@
+# Google Local Rides and Deliveries API Client for Java
+
+Java idiomatic client for [Local Rides and Deliveries API][product-docs].
+
+[![Maven][maven-version-image]][maven-version-link]
+![Stability][stability-image]
+
+- [Product Documentation][product-docs]
+- [Client Library Documentation][javadocs]
+
+> Note: This client is a work-in-progress, and may occasionally
+> make backwards-incompatible changes.
+
+
+## Quickstart
+
+
+If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
+
+```xml
+
This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (TripServiceClient tripServiceClient = TripServiceClient.create()) { + * CreateTripRequest request = + * CreateTripRequest.newBuilder() + * .setHeader(RequestHeader.newBuilder().build()) + * .setParent(TripName.of("[PROVIDER]", "[TRIP]").toString()) + * .setTripId("tripId-865466336") + * .setTrip(Trip.newBuilder().build()) + * .build(); + * Trip response = tripServiceClient.createTrip(request); + * } + * }+ * + *
Note: close() needs to be called on the TripServiceClient object to clean up resources such as + * threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *
Method | + *Description | + *Method Variants | + *
---|---|---|
CreateTrip |
+ * Creates a trip in the Fleet Engine and returns the new trip. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetTrip |
+ * Get information about a single trip. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ReportBillableTrip |
+ * Report billable trip usage. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
SearchTrips |
+ * Get all the trips for a specific vehicle. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
UpdateTrip |
+ * Updates trip data. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return 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 TripServiceSettings to + * create(). For example: + * + *
To customize credentials: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * TripServiceSettings tripServiceSettings = + * TripServiceSettings.newBuilder() + * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + * .build(); + * TripServiceClient tripServiceClient = TripServiceClient.create(tripServiceSettings); + * }+ * + *
To customize the endpoint: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * TripServiceSettings tripServiceSettings = + * TripServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + * TripServiceClient tripServiceClient = TripServiceClient.create(tripServiceSettings); + * }+ * + *
Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class TripServiceClient implements BackgroundResource { + private final TripServiceSettings settings; + private final TripServiceStub stub; + + /** Constructs an instance of TripServiceClient with default settings. */ + public static final TripServiceClient create() throws IOException { + return create(TripServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of TripServiceClient, using the given settings. The channels are created + * based on the settings passed in, or defaults for any settings that are not set. + */ + public static final TripServiceClient create(TripServiceSettings settings) throws IOException { + return new TripServiceClient(settings); + } + + /** + * Constructs an instance of TripServiceClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(TripServiceSettings). + */ + public static final TripServiceClient create(TripServiceStub stub) { + return new TripServiceClient(stub); + } + + /** + * Constructs an instance of TripServiceClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected TripServiceClient(TripServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((TripServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected TripServiceClient(TripServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final TripServiceSettings getSettings() { + return settings; + } + + public TripServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a trip in the Fleet Engine and returns the new trip. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (TripServiceClient tripServiceClient = TripServiceClient.create()) { + * CreateTripRequest request = + * CreateTripRequest.newBuilder() + * .setHeader(RequestHeader.newBuilder().build()) + * .setParent(TripName.of("[PROVIDER]", "[TRIP]").toString()) + * .setTripId("tripId-865466336") + * .setTrip(Trip.newBuilder().build()) + * .build(); + * Trip response = tripServiceClient.createTrip(request); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Trip createTrip(CreateTripRequest request) { + return createTripCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a trip in the Fleet Engine and returns the new trip. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (TripServiceClient tripServiceClient = TripServiceClient.create()) { + * CreateTripRequest request = + * CreateTripRequest.newBuilder() + * .setHeader(RequestHeader.newBuilder().build()) + * .setParent(TripName.of("[PROVIDER]", "[TRIP]").toString()) + * .setTripId("tripId-865466336") + * .setTrip(Trip.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = tripServiceClient.createTripCallable().futureCall(request); + * // Do something. + * Trip response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (TripServiceClient tripServiceClient = TripServiceClient.create()) { + * GetTripRequest request = + * GetTripRequest.newBuilder() + * .setHeader(RequestHeader.newBuilder().build()) + * .setName(TripName.of("[PROVIDER]", "[TRIP]").toString()) + * .setView(TripView.forNumber(0)) + * .setCurrentRouteSegmentVersion(Timestamp.newBuilder().build()) + * .setRemainingWaypointsVersion(Timestamp.newBuilder().build()) + * .setRouteFormatType(PolylineFormatType.forNumber(0)) + * .setCurrentRouteSegmentTrafficVersion(Timestamp.newBuilder().build()) + * .setRemainingWaypointsRouteVersion(Timestamp.newBuilder().build()) + * .build(); + * Trip response = tripServiceClient.getTrip(request); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Trip getTrip(GetTripRequest request) { + return getTripCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get information about a single trip. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (TripServiceClient tripServiceClient = TripServiceClient.create()) { + * GetTripRequest request = + * GetTripRequest.newBuilder() + * .setHeader(RequestHeader.newBuilder().build()) + * .setName(TripName.of("[PROVIDER]", "[TRIP]").toString()) + * .setView(TripView.forNumber(0)) + * .setCurrentRouteSegmentVersion(Timestamp.newBuilder().build()) + * .setRemainingWaypointsVersion(Timestamp.newBuilder().build()) + * .setRouteFormatType(PolylineFormatType.forNumber(0)) + * .setCurrentRouteSegmentTrafficVersion(Timestamp.newBuilder().build()) + * .setRemainingWaypointsRouteVersion(Timestamp.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = tripServiceClient.getTripCallable().futureCall(request); + * // Do something. + * Trip response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (TripServiceClient tripServiceClient = TripServiceClient.create()) { + * ReportBillableTripRequest request = + * ReportBillableTripRequest.newBuilder() + * .setName("name3373707") + * .setCountryCode("countryCode-1477067101") + * .setPlatform(BillingPlatformIdentifier.forNumber(0)) + * .addAllRelatedIds(new ArrayList+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void reportBillableTrip(ReportBillableTripRequest request) { + reportBillableTripCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Report billable trip usage. + * + *()) + * .build(); + * tripServiceClient.reportBillableTrip(request); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (TripServiceClient tripServiceClient = TripServiceClient.create()) { + * ReportBillableTripRequest request = + * ReportBillableTripRequest.newBuilder() + * .setName("name3373707") + * .setCountryCode("countryCode-1477067101") + * .setPlatform(BillingPlatformIdentifier.forNumber(0)) + * .addAllRelatedIds(new ArrayList+ */ + public final UnaryCallable()) + * .build(); + * ApiFuture future = tripServiceClient.reportBillableTripCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (TripServiceClient tripServiceClient = TripServiceClient.create()) { + * SearchTripsRequest request = + * SearchTripsRequest.newBuilder() + * .setHeader(RequestHeader.newBuilder().build()) + * .setParent("parent-995424086") + * .setVehicleId("vehicleId-1984135833") + * .setActiveTripsOnly(true) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setMinimumStaleness(Duration.newBuilder().build()) + * .build(); + * for (Trip element : tripServiceClient.searchTrips(request).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchTripsPagedResponse searchTrips(SearchTripsRequest request) { + return searchTripsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get all the trips for a specific vehicle. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (TripServiceClient tripServiceClient = TripServiceClient.create()) { + * SearchTripsRequest request = + * SearchTripsRequest.newBuilder() + * .setHeader(RequestHeader.newBuilder().build()) + * .setParent("parent-995424086") + * .setVehicleId("vehicleId-1984135833") + * .setActiveTripsOnly(true) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setMinimumStaleness(Duration.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = tripServiceClient.searchTripsPagedCallable().futureCall(request); + * // Do something. + * for (Trip element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (TripServiceClient tripServiceClient = TripServiceClient.create()) { + * SearchTripsRequest request = + * SearchTripsRequest.newBuilder() + * .setHeader(RequestHeader.newBuilder().build()) + * .setParent("parent-995424086") + * .setVehicleId("vehicleId-1984135833") + * .setActiveTripsOnly(true) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setMinimumStaleness(Duration.newBuilder().build()) + * .build(); + * while (true) { + * SearchTripsResponse response = tripServiceClient.searchTripsCallable().call(request); + * for (Trip element : response.getTripsList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }+ */ + public final UnaryCallable
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (TripServiceClient tripServiceClient = TripServiceClient.create()) { + * UpdateTripRequest request = + * UpdateTripRequest.newBuilder() + * .setHeader(RequestHeader.newBuilder().build()) + * .setName("name3373707") + * .setTrip(Trip.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * Trip response = tripServiceClient.updateTrip(request); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Trip updateTrip(UpdateTripRequest request) { + return updateTripCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates trip data. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (TripServiceClient tripServiceClient = TripServiceClient.create()) { + * UpdateTripRequest request = + * UpdateTripRequest.newBuilder() + * .setHeader(RequestHeader.newBuilder().build()) + * .setName("name3373707") + * .setTrip(Trip.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = tripServiceClient.updateTripCallable().futureCall(request); + * // Do something. + * Trip response = future.get(); + * } + * }
The default instance has everything set to sensible defaults: + * + *
The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *
For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of createTrip: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * TripServiceSettings.Builder tripServiceSettingsBuilder = TripServiceSettings.newBuilder(); + * tripServiceSettingsBuilder + * .createTripSettings() + * .setRetrySettings( + * tripServiceSettingsBuilder + * .createTripSettings() + * .getRetrySettings() + * .toBuilder() + * .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + * .setMaxAttempts(5) + * .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + * .setRetryDelayMultiplier(1.3) + * .setRpcTimeoutMultiplier(1.5) + * .setTotalTimeoutDuration(Duration.ofSeconds(300)) + * .build()); + * TripServiceSettings tripServiceSettings = tripServiceSettingsBuilder.build(); + * }+ * + * Please refer to the [Client Side Retry + * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for + * additional support in setting retries. + */ +@Generated("by gapic-generator-java") +public class TripServiceSettings extends ClientSettings
Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction 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:
+ *
+ * Note: close() needs to be called on the VehicleServiceClient object to clean up resources such
+ * as threads. In the example above, try-with-resources is used, which automatically calls close().
+ *
+ * CreateVehicle Instantiates a new vehicle associated with an on-demand rideshare or deliveries provider. Each `Vehicle` must have a unique vehicle ID.
+ * The following `Vehicle` fields are required when creating a `Vehicle`:
+ * The following `Vehicle` fields are ignored when creating a `Vehicle`:
+ * All other fields are optional and used if provided. Request object method variants only take one parameter, a request object, which must be constructed before the call. createVehicle(CreateVehicleRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. createVehicleCallable()
+ * GetVehicle Returns a vehicle from the Fleet Engine. Request object method variants only take one parameter, a request object, which must be constructed before the call. getVehicle(GetVehicleRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getVehicleCallable()
+ * UpdateVehicle Writes updated vehicle data to the Fleet Engine.
+ * When updating a `Vehicle`, the following fields cannot be updated since they are managed by the server:
+ * The vehicle `name` also cannot be updated.
+ * If the `attributes` field is updated, **all** the vehicle's attributes are replaced with the attributes provided in the request. If you want to update only some attributes, see the `UpdateVehicleAttributes` method. Likewise, the `waypoints` field can be updated, but must contain all the waypoints currently on the vehicle, and no other waypoints. Request object method variants only take one parameter, a request object, which must be constructed before the call. updateVehicle(UpdateVehicleRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. updateVehicleCallable()
+ * UpdateVehicleAttributes Partially updates a vehicle's attributes. Only the attributes mentioned in the request will be updated, other attributes will NOT be altered. Note: this is different in `UpdateVehicle`, where the whole `attributes` field will be replaced by the one in `UpdateVehicleRequest`, attributes not in the request would be removed. Request object method variants only take one parameter, a request object, which must be constructed before the call. updateVehicleAttributes(UpdateVehicleAttributesRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. updateVehicleAttributesCallable()
+ * ListVehicles Returns a paginated list of vehicles associated with a provider that match the request options. Request object method variants only take one parameter, a request object, which must be constructed before the call. listVehicles(ListVehiclesRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listVehiclesPagedCallable()
+ * listVehiclesCallable()
+ * SearchVehicles Returns a list of vehicles that match the request options. Request object method variants only take one parameter, a request object, which must be constructed before the call. searchVehicles(SearchVehiclesRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. searchVehiclesCallable()
+ * See the individual methods for example code.
+ *
+ * Many parameters require resource names to be formatted in a particular way. To assist with
+ * these names, this class includes a format method for each type of name, and additionally a parse
+ * method to extract the individual identifiers contained within names that are returned.
+ *
+ * This class can be customized by passing in a custom instance of VehicleServiceSettings to
+ * create(). For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@Generated("by gapic-generator-java")
+public class VehicleServiceClient implements BackgroundResource {
+ private final VehicleServiceSettings settings;
+ private final VehicleServiceStub stub;
+
+ /** Constructs an instance of VehicleServiceClient with default settings. */
+ public static final VehicleServiceClient create() throws IOException {
+ return create(VehicleServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of VehicleServiceClient, using the given settings. The channels are
+ * created based on the settings passed in, or defaults for any settings that are not set.
+ */
+ public static final VehicleServiceClient create(VehicleServiceSettings settings)
+ throws IOException {
+ return new VehicleServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of VehicleServiceClient, using the given stub for making calls. This is
+ * for advanced usage - prefer using create(VehicleServiceSettings).
+ */
+ public static final VehicleServiceClient create(VehicleServiceStub stub) {
+ return new VehicleServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of VehicleServiceClient, using the given settings. This is protected so
+ * that it is easy to make a subclass, but otherwise, the static factory methods should be
+ * preferred.
+ */
+ protected VehicleServiceClient(VehicleServiceSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((VehicleServiceStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ protected VehicleServiceClient(VehicleServiceStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final VehicleServiceSettings getSettings() {
+ return settings;
+ }
+
+ public VehicleServiceStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Instantiates a new vehicle associated with an on-demand rideshare or deliveries provider. Each
+ * `Vehicle` must have a unique vehicle ID.
+ *
+ * The following `Vehicle` fields are required when creating a `Vehicle`:
+ *
+ * The following `Vehicle` fields are ignored when creating a `Vehicle`:
+ *
+ * All other fields are optional and used if provided.
+ *
+ * Sample code:
+ *
+ * The following `Vehicle` fields are required when creating a `Vehicle`:
+ *
+ * The following `Vehicle` fields are ignored when creating a `Vehicle`:
+ *
+ * All other fields are optional and used if provided.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * When updating a `Vehicle`, the following fields cannot be updated since they are managed by
+ * the server:
+ *
+ * The vehicle `name` also cannot be updated.
+ *
+ * If the `attributes` field is updated, **all** the vehicle's attributes are
+ * replaced with the attributes provided in the request. If you want to update only some
+ * attributes, see the `UpdateVehicleAttributes` method. Likewise, the `waypoints` field can be
+ * updated, but must contain all the waypoints currently on the vehicle, and no other waypoints.
+ *
+ * Sample code:
+ *
+ * When updating a `Vehicle`, the following fields cannot be updated since they are managed by
+ * the server:
+ *
+ * The vehicle `name` also cannot be updated.
+ *
+ * If the `attributes` field is updated, **all** the vehicle's attributes are
+ * replaced with the attributes provided in the request. If you want to update only some
+ * attributes, see the `UpdateVehicleAttributes` method. Likewise, the `waypoints` field can be
+ * updated, but must contain all the waypoints currently on the vehicle, and no other waypoints.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the
+ * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
+ * of createVehicle:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction The interfaces provided are listed below, along with usage samples.
+ *
+ * ======================= TripServiceClient =======================
+ *
+ * Service Description: Trip management service.
+ *
+ * Sample for TripServiceClient:
+ *
+ * ======================= VehicleServiceClient =======================
+ *
+ * Service Description: Vehicle management service.
+ *
+ * Sample for VehicleServiceClient:
+ *
+ * This class is for advanced usage.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcTripServiceCallableFactory implements GrpcStubCallableFactory {
+
+ @Override
+ public This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcTripServiceStub extends TripServiceStub {
+ private static final MethodDescriptor This class is for advanced usage.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcVehicleServiceCallableFactory implements GrpcStubCallableFactory {
+
+ @Override
+ public This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcVehicleServiceStub extends VehicleServiceStub {
+ private static final MethodDescriptor This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public abstract class TripServiceStub implements BackgroundResource {
+
+ public UnaryCallable The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the
+ * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
+ * of createTrip:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public abstract class VehicleServiceStub implements BackgroundResource {
+
+ public UnaryCallable The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the
+ * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
+ * of createVehicle:
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VehicleServiceClient vehicleServiceClient = VehicleServiceClient.create()) {
+ * CreateVehicleRequest request =
+ * CreateVehicleRequest.newBuilder()
+ * .setHeader(RequestHeader.newBuilder().build())
+ * .setParent("parent-995424086")
+ * .setVehicleId("vehicleId-1984135833")
+ * .setVehicle(Vehicle.newBuilder().build())
+ * .build();
+ * Vehicle response = vehicleServiceClient.createVehicle(request);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ * Method
+ * Description
+ * Method Variants
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * VehicleServiceSettings vehicleServiceSettings =
+ * VehicleServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * VehicleServiceClient vehicleServiceClient = VehicleServiceClient.create(vehicleServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * VehicleServiceSettings vehicleServiceSettings =
+ * VehicleServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * VehicleServiceClient vehicleServiceClient = VehicleServiceClient.create(vehicleServiceSettings);
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VehicleServiceClient vehicleServiceClient = VehicleServiceClient.create()) {
+ * CreateVehicleRequest request =
+ * CreateVehicleRequest.newBuilder()
+ * .setHeader(RequestHeader.newBuilder().build())
+ * .setParent("parent-995424086")
+ * .setVehicleId("vehicleId-1984135833")
+ * .setVehicle(Vehicle.newBuilder().build())
+ * .build();
+ * Vehicle response = vehicleServiceClient.createVehicle(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Vehicle createVehicle(CreateVehicleRequest request) {
+ return createVehicleCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Instantiates a new vehicle associated with an on-demand rideshare or deliveries provider. Each
+ * `Vehicle` must have a unique vehicle ID.
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VehicleServiceClient vehicleServiceClient = VehicleServiceClient.create()) {
+ * CreateVehicleRequest request =
+ * CreateVehicleRequest.newBuilder()
+ * .setHeader(RequestHeader.newBuilder().build())
+ * .setParent("parent-995424086")
+ * .setVehicleId("vehicleId-1984135833")
+ * .setVehicle(Vehicle.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VehicleServiceClient vehicleServiceClient = VehicleServiceClient.create()) {
+ * GetVehicleRequest request =
+ * GetVehicleRequest.newBuilder()
+ * .setHeader(RequestHeader.newBuilder().build())
+ * .setName(VehicleName.of("[PROVIDER]", "[VEHICLE]").toString())
+ * .setCurrentRouteSegmentVersion(Timestamp.newBuilder().build())
+ * .setWaypointsVersion(Timestamp.newBuilder().build())
+ * .build();
+ * Vehicle response = vehicleServiceClient.getVehicle(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Vehicle getVehicle(GetVehicleRequest request) {
+ return getVehicleCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns a vehicle from the Fleet Engine.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VehicleServiceClient vehicleServiceClient = VehicleServiceClient.create()) {
+ * GetVehicleRequest request =
+ * GetVehicleRequest.newBuilder()
+ * .setHeader(RequestHeader.newBuilder().build())
+ * .setName(VehicleName.of("[PROVIDER]", "[VEHICLE]").toString())
+ * .setCurrentRouteSegmentVersion(Timestamp.newBuilder().build())
+ * .setWaypointsVersion(Timestamp.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VehicleServiceClient vehicleServiceClient = VehicleServiceClient.create()) {
+ * UpdateVehicleRequest request =
+ * UpdateVehicleRequest.newBuilder()
+ * .setHeader(RequestHeader.newBuilder().build())
+ * .setName("name3373707")
+ * .setVehicle(Vehicle.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Vehicle response = vehicleServiceClient.updateVehicle(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Vehicle updateVehicle(UpdateVehicleRequest request) {
+ return updateVehicleCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Writes updated vehicle data to the Fleet Engine.
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VehicleServiceClient vehicleServiceClient = VehicleServiceClient.create()) {
+ * UpdateVehicleRequest request =
+ * UpdateVehicleRequest.newBuilder()
+ * .setHeader(RequestHeader.newBuilder().build())
+ * .setName("name3373707")
+ * .setVehicle(Vehicle.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VehicleServiceClient vehicleServiceClient = VehicleServiceClient.create()) {
+ * UpdateVehicleAttributesRequest request =
+ * UpdateVehicleAttributesRequest.newBuilder()
+ * .setHeader(RequestHeader.newBuilder().build())
+ * .setName("name3373707")
+ * .addAllAttributes(new ArrayList
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final UpdateVehicleAttributesResponse updateVehicleAttributes(
+ UpdateVehicleAttributesRequest request) {
+ return updateVehicleAttributesCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Partially updates a vehicle's attributes. Only the attributes mentioned in the request will be
+ * updated, other attributes will NOT be altered. Note: this is different in `UpdateVehicle`,
+ * where the whole `attributes` field will be replaced by the one in `UpdateVehicleRequest`,
+ * attributes not in the request would be removed.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VehicleServiceClient vehicleServiceClient = VehicleServiceClient.create()) {
+ * UpdateVehicleAttributesRequest request =
+ * UpdateVehicleAttributesRequest.newBuilder()
+ * .setHeader(RequestHeader.newBuilder().build())
+ * .setName("name3373707")
+ * .addAllAttributes(new ArrayList
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VehicleServiceClient vehicleServiceClient = VehicleServiceClient.create()) {
+ * ListVehiclesRequest request =
+ * ListVehiclesRequest.newBuilder()
+ * .setHeader(RequestHeader.newBuilder().build())
+ * .setParent("parent-995424086")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setMinimumCapacity(Int32Value.newBuilder().build())
+ * .addAllTripTypes(new ArrayList
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListVehiclesPagedResponse listVehicles(ListVehiclesRequest request) {
+ return listVehiclesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns a paginated list of vehicles associated with a provider that match the request options.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VehicleServiceClient vehicleServiceClient = VehicleServiceClient.create()) {
+ * ListVehiclesRequest request =
+ * ListVehiclesRequest.newBuilder()
+ * .setHeader(RequestHeader.newBuilder().build())
+ * .setParent("parent-995424086")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setMinimumCapacity(Int32Value.newBuilder().build())
+ * .addAllTripTypes(new ArrayList
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VehicleServiceClient vehicleServiceClient = VehicleServiceClient.create()) {
+ * ListVehiclesRequest request =
+ * ListVehiclesRequest.newBuilder()
+ * .setHeader(RequestHeader.newBuilder().build())
+ * .setParent("parent-995424086")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setMinimumCapacity(Int32Value.newBuilder().build())
+ * .addAllTripTypes(new ArrayList
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VehicleServiceClient vehicleServiceClient = VehicleServiceClient.create()) {
+ * SearchVehiclesRequest request =
+ * SearchVehiclesRequest.newBuilder()
+ * .setHeader(RequestHeader.newBuilder().build())
+ * .setParent("parent-995424086")
+ * .setPickupPoint(TerminalLocation.newBuilder().build())
+ * .setDropoffPoint(TerminalLocation.newBuilder().build())
+ * .setPickupRadiusMeters(-254656044)
+ * .setCount(94851343)
+ * .setMinimumCapacity(518841803)
+ * .addAllTripTypes(new ArrayList
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SearchVehiclesResponse searchVehicles(SearchVehiclesRequest request) {
+ return searchVehiclesCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns a list of vehicles that match the request options.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VehicleServiceClient vehicleServiceClient = VehicleServiceClient.create()) {
+ * SearchVehiclesRequest request =
+ * SearchVehiclesRequest.newBuilder()
+ * .setHeader(RequestHeader.newBuilder().build())
+ * .setParent("parent-995424086")
+ * .setPickupPoint(TerminalLocation.newBuilder().build())
+ * .setDropoffPoint(TerminalLocation.newBuilder().build())
+ * .setPickupRadiusMeters(-254656044)
+ * .setCount(94851343)
+ * .setMinimumCapacity(518841803)
+ * .addAllTripTypes(new ArrayList
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * VehicleServiceSettings.Builder vehicleServiceSettingsBuilder =
+ * VehicleServiceSettings.newBuilder();
+ * vehicleServiceSettingsBuilder
+ * .createVehicleSettings()
+ * .setRetrySettings(
+ * vehicleServiceSettingsBuilder
+ * .createVehicleSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ * .setMaxAttempts(5)
+ * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ * .setRetryDelayMultiplier(1.3)
+ * .setRpcTimeoutMultiplier(1.5)
+ * .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ * .build());
+ * VehicleServiceSettings vehicleServiceSettings = vehicleServiceSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
+ * additional support in setting retries.
+ */
+@Generated("by gapic-generator-java")
+public class VehicleServiceSettings extends ClientSettings{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (TripServiceClient tripServiceClient = TripServiceClient.create()) {
+ * CreateTripRequest request =
+ * CreateTripRequest.newBuilder()
+ * .setHeader(RequestHeader.newBuilder().build())
+ * .setParent(TripName.of("[PROVIDER]", "[TRIP]").toString())
+ * .setTripId("tripId-865466336")
+ * .setTrip(Trip.newBuilder().build())
+ * .build();
+ * Trip response = tripServiceClient.createTrip(request);
+ * }
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VehicleServiceClient vehicleServiceClient = VehicleServiceClient.create()) {
+ * CreateVehicleRequest request =
+ * CreateVehicleRequest.newBuilder()
+ * .setHeader(RequestHeader.newBuilder().build())
+ * .setParent("parent-995424086")
+ * .setVehicleId("vehicleId-1984135833")
+ * .setVehicle(Vehicle.newBuilder().build())
+ * .build();
+ * Vehicle response = vehicleServiceClient.createVehicle(request);
+ * }
+ * }
+ */
+@Generated("by gapic-generator-java")
+package com.google.maps.fleetengine.v1;
+
+import javax.annotation.Generated;
diff --git a/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/stub/GrpcTripServiceCallableFactory.java b/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/stub/GrpcTripServiceCallableFactory.java
new file mode 100644
index 000000000000..ededf3fd83f6
--- /dev/null
+++ b/java-maps-fleetengine/google-maps-fleetengine/src/main/java/com/google/maps/fleetengine/v1/stub/GrpcTripServiceCallableFactory.java
@@ -0,0 +1,113 @@
+/*
+ * Copyright 2024 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.maps.fleetengine.v1.stub;
+
+import com.google.api.gax.grpc.GrpcCallSettings;
+import com.google.api.gax.grpc.GrpcCallableFactory;
+import com.google.api.gax.grpc.GrpcStubCallableFactory;
+import com.google.api.gax.rpc.BatchingCallSettings;
+import com.google.api.gax.rpc.BidiStreamingCallable;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.ClientStreamingCallable;
+import com.google.api.gax.rpc.OperationCallSettings;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.PagedCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallable;
+import com.google.api.gax.rpc.StreamingCallSettings;
+import com.google.api.gax.rpc.UnaryCallSettings;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.longrunning.Operation;
+import com.google.longrunning.stub.OperationsStub;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * gRPC callable factory implementation for the TripService service API.
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * TripServiceStubSettings.Builder tripServiceSettingsBuilder =
+ * TripServiceStubSettings.newBuilder();
+ * tripServiceSettingsBuilder
+ * .createTripSettings()
+ * .setRetrySettings(
+ * tripServiceSettingsBuilder
+ * .createTripSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ * .setMaxAttempts(5)
+ * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ * .setRetryDelayMultiplier(1.3)
+ * .setRpcTimeoutMultiplier(1.5)
+ * .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ * .build());
+ * TripServiceStubSettings tripServiceSettings = tripServiceSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
+ * additional support in setting retries.
+ */
+@Generated("by gapic-generator-java")
+public class TripServiceStubSettings extends StubSettings
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * VehicleServiceStubSettings.Builder vehicleServiceSettingsBuilder =
+ * VehicleServiceStubSettings.newBuilder();
+ * vehicleServiceSettingsBuilder
+ * .createVehicleSettings()
+ * .setRetrySettings(
+ * vehicleServiceSettingsBuilder
+ * .createVehicleSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ * .setMaxAttempts(5)
+ * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ * .setRetryDelayMultiplier(1.3)
+ * .setRpcTimeoutMultiplier(1.5)
+ * .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ * .build());
+ * VehicleServiceStubSettings vehicleServiceSettings = vehicleServiceSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
+ * additional support in setting retries.
+ */
+@Generated("by gapic-generator-java")
+public class VehicleServiceStubSettings extends StubSettings