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(). + * + *
The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *
See the individual methods for example code. + * + *
Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *
This class can be customized by passing in a custom instance of TripServiceSettings to + * create(). For example: + * + *
To customize credentials: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * TripServiceSettings tripServiceSettings =
+ * TripServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * TripServiceClient tripServiceClient = TripServiceClient.create(tripServiceSettings);
+ * }
+ *
+ * To customize the endpoint: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * TripServiceSettings tripServiceSettings =
+ * TripServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * TripServiceClient tripServiceClient = TripServiceClient.create(tripServiceSettings);
+ * }
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class TripServiceClient implements BackgroundResource { + private final TripServiceSettings settings; + private final TripServiceStub stub; + + /** Constructs an instance of TripServiceClient with default settings. */ + public static final TripServiceClient create() throws IOException { + return create(TripServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of TripServiceClient, using the given settings. The channels are created + * based on the settings passed in, or defaults for any settings that are not set. + */ + public static final TripServiceClient create(TripServiceSettings settings) throws IOException { + return new TripServiceClient(settings); + } + + /** + * Constructs an instance of TripServiceClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(TripServiceSettings). + */ + public static final TripServiceClient create(TripServiceStub stub) { + return new TripServiceClient(stub); + } + + /** + * Constructs an instance of TripServiceClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected TripServiceClient(TripServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((TripServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected TripServiceClient(TripServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final TripServiceSettings getSettings() { + return settings; + } + + public TripServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a trip in the Fleet Engine and returns the new trip. + * + *
Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (TripServiceClient tripServiceClient = TripServiceClient.create()) {
+ * CreateTripRequest request =
+ * CreateTripRequest.newBuilder()
+ * .setHeader(RequestHeader.newBuilder().build())
+ * .setParent(TripName.of("[PROVIDER]", "[TRIP]").toString())
+ * .setTripId("tripId-865466336")
+ * .setTrip(Trip.newBuilder().build())
+ * .build();
+ * Trip response = tripServiceClient.createTrip(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Trip createTrip(CreateTripRequest request) {
+ return createTripCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a trip in the Fleet Engine and returns the new trip.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (TripServiceClient tripServiceClient = TripServiceClient.create()) {
+ * CreateTripRequest request =
+ * CreateTripRequest.newBuilder()
+ * .setHeader(RequestHeader.newBuilder().build())
+ * .setParent(TripName.of("[PROVIDER]", "[TRIP]").toString())
+ * .setTripId("tripId-865466336")
+ * .setTrip(Trip.newBuilder().build())
+ * .build();
+ * ApiFuture future = tripServiceClient.createTripCallable().futureCall(request);
+ * // Do something.
+ * Trip response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (TripServiceClient tripServiceClient = TripServiceClient.create()) {
+ * GetTripRequest request =
+ * GetTripRequest.newBuilder()
+ * .setHeader(RequestHeader.newBuilder().build())
+ * .setName(TripName.of("[PROVIDER]", "[TRIP]").toString())
+ * .setView(TripView.forNumber(0))
+ * .setCurrentRouteSegmentVersion(Timestamp.newBuilder().build())
+ * .setRemainingWaypointsVersion(Timestamp.newBuilder().build())
+ * .setRouteFormatType(PolylineFormatType.forNumber(0))
+ * .setCurrentRouteSegmentTrafficVersion(Timestamp.newBuilder().build())
+ * .setRemainingWaypointsRouteVersion(Timestamp.newBuilder().build())
+ * .build();
+ * Trip response = tripServiceClient.getTrip(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Trip getTrip(GetTripRequest request) {
+ return getTripCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get information about a single trip.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (TripServiceClient tripServiceClient = TripServiceClient.create()) {
+ * GetTripRequest request =
+ * GetTripRequest.newBuilder()
+ * .setHeader(RequestHeader.newBuilder().build())
+ * .setName(TripName.of("[PROVIDER]", "[TRIP]").toString())
+ * .setView(TripView.forNumber(0))
+ * .setCurrentRouteSegmentVersion(Timestamp.newBuilder().build())
+ * .setRemainingWaypointsVersion(Timestamp.newBuilder().build())
+ * .setRouteFormatType(PolylineFormatType.forNumber(0))
+ * .setCurrentRouteSegmentTrafficVersion(Timestamp.newBuilder().build())
+ * .setRemainingWaypointsRouteVersion(Timestamp.newBuilder().build())
+ * .build();
+ * ApiFuture future = tripServiceClient.getTripCallable().futureCall(request);
+ * // Do something.
+ * Trip response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (TripServiceClient tripServiceClient = TripServiceClient.create()) {
+ * ReportBillableTripRequest request =
+ * ReportBillableTripRequest.newBuilder()
+ * .setName("name3373707")
+ * .setCountryCode("countryCode-1477067101")
+ * .setPlatform(BillingPlatformIdentifier.forNumber(0))
+ * .addAllRelatedIds(new ArrayList())
+ * .build();
+ * tripServiceClient.reportBillableTrip(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void reportBillableTrip(ReportBillableTripRequest request) {
+ reportBillableTripCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Report billable trip usage.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (TripServiceClient tripServiceClient = TripServiceClient.create()) {
+ * ReportBillableTripRequest request =
+ * ReportBillableTripRequest.newBuilder()
+ * .setName("name3373707")
+ * .setCountryCode("countryCode-1477067101")
+ * .setPlatform(BillingPlatformIdentifier.forNumber(0))
+ * .addAllRelatedIds(new ArrayList())
+ * .build();
+ * ApiFuture future = tripServiceClient.reportBillableTripCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (TripServiceClient tripServiceClient = TripServiceClient.create()) {
+ * SearchTripsRequest request =
+ * SearchTripsRequest.newBuilder()
+ * .setHeader(RequestHeader.newBuilder().build())
+ * .setParent("parent-995424086")
+ * .setVehicleId("vehicleId-1984135833")
+ * .setActiveTripsOnly(true)
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setMinimumStaleness(Duration.newBuilder().build())
+ * .build();
+ * for (Trip element : tripServiceClient.searchTrips(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SearchTripsPagedResponse searchTrips(SearchTripsRequest request) {
+ return searchTripsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get all the trips for a specific vehicle.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (TripServiceClient tripServiceClient = TripServiceClient.create()) {
+ * SearchTripsRequest request =
+ * SearchTripsRequest.newBuilder()
+ * .setHeader(RequestHeader.newBuilder().build())
+ * .setParent("parent-995424086")
+ * .setVehicleId("vehicleId-1984135833")
+ * .setActiveTripsOnly(true)
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setMinimumStaleness(Duration.newBuilder().build())
+ * .build();
+ * ApiFuture future = tripServiceClient.searchTripsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Trip element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (TripServiceClient tripServiceClient = TripServiceClient.create()) {
+ * UpdateTripRequest request =
+ * UpdateTripRequest.newBuilder()
+ * .setHeader(RequestHeader.newBuilder().build())
+ * .setName("name3373707")
+ * .setTrip(Trip.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Trip response = tripServiceClient.updateTrip(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Trip updateTrip(UpdateTripRequest request) {
+ return updateTripCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates trip data.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (TripServiceClient tripServiceClient = TripServiceClient.create()) {
+ * UpdateTripRequest request =
+ * UpdateTripRequest.newBuilder()
+ * .setHeader(RequestHeader.newBuilder().build())
+ * .setName("name3373707")
+ * .setTrip(Trip.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future = tripServiceClient.updateTripCallable().futureCall(request);
+ * // Do something.
+ * Trip response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableThe 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 total timeout of createTrip 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
+ * TripServiceSettings.Builder tripServiceSettingsBuilder = TripServiceSettings.newBuilder();
+ * tripServiceSettingsBuilder
+ * .createTripSettings()
+ * .setRetrySettings(
+ * tripServiceSettingsBuilder
+ * .createTripSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * TripServiceSettings tripServiceSettings = tripServiceSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class TripServiceSettings extends ClientSettingsNote: 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().
+ *
+ * The surface of this class includes several types of Java methods for each of the API's
+ * methods:
+ *
+ * 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:
+ *
+ * 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 total timeout of createVehicle to 30 seconds:
+ *
+ * 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 total timeout of createTrip 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
+ * 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);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ * {@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()) {
+ * UpdateVehicleLocationRequest request =
+ * UpdateVehicleLocationRequest.newBuilder()
+ * .setHeader(RequestHeader.newBuilder().build())
+ * .setName("name3373707")
+ * .setCurrentLocation(VehicleLocation.newBuilder().build())
+ * .setCurrentState(VehicleState.forNumber(0))
+ * .build();
+ * VehicleLocation response = vehicleServiceClient.updateVehicleLocation(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
+ * @deprecated This method is deprecated and will be removed in the next major version update.
+ */
+ @Deprecated
+ public final VehicleLocation updateVehicleLocation(UpdateVehicleLocationRequest request) {
+ return updateVehicleLocationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deprecated: Use the `UpdateVehicle` method instead. UpdateVehicleLocation updates the location
+ * of the vehicle.
+ *
+ * {@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()) {
+ * UpdateVehicleLocationRequest request =
+ * UpdateVehicleLocationRequest.newBuilder()
+ * .setHeader(RequestHeader.newBuilder().build())
+ * .setName("name3373707")
+ * .setCurrentLocation(VehicleLocation.newBuilder().build())
+ * .setCurrentState(VehicleState.forNumber(0))
+ * .build();
+ * ApiFuture
+ *
+ * @deprecated This method is deprecated and will be removed in the next major version update.
+ */
+ @Deprecated
+ 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
+ * 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
+ * @deprecated This method is deprecated and will be removed in the next major version update.
+ */
+ @Deprecated
+ public final SearchVehiclesResponse searchFuzzedVehicles(SearchVehiclesRequest request) {
+ return searchFuzzedVehiclesCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deprecated: Use `SearchVehicles` instead.
+ *
+ * {@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
+ *
+ * @deprecated This method is deprecated and will be removed in the next major version update.
+ */
+ @Deprecated
+ 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()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * VehicleServiceSettings vehicleServiceSettings = vehicleServiceSettingsBuilder.build();
+ * }
+ */
+@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 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..a9f78d7e6c39
--- /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 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.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()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * TripServiceStubSettings tripServiceSettings = tripServiceSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class TripServiceStubSettings extends StubSettings