# Google Maps FleetEngine V1 Client - Class TripServiceClient (0.5.3)

0.5.3 (latest) 0.5.2 0.4.1 0.3.1 0.2.0 0.1.6 Reference documentation and code samples for the Google Maps FleetEngine V1 Client class TripServiceClient.

Service Description: Trip management service.

This class provides the ability to make remote calls to the backing service through method
calls that map to API methods.

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 parseName method to extract the individual identifiers
contained within formatted names that are returned by the API.

## Namespace

Google \\ Maps \\ FleetEngine \\ V1 \\ Client

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `options` | `array|https://docs.cloud.google.com/php/docs/reference/gax/latest/Options.ClientOptions.html` Optional. Options for configuring the service API wrapper. |
| `↳ apiEndpoint` | `string` The address of the API remote host. May optionally include the port, formatted as " |
| `↳ credentials` | `https://docs.cloud.google.com/php/docs/reference/auth/latest/FetchAuthTokenInterface.html|https://docs.cloud.google.com/php/docs/reference/gax/latest/CredentialsWrapper.html` This option should only be used with a pre-constructed [Google\\Auth\\FetchAuthTokenInterface](https://docs.cloud.google.com/php/docs/reference/auth/latest/FetchAuthTokenInterface.html) or [Google\\ApiCore\\CredentialsWrapper](https://docs.cloud.google.com/php/docs/reference/gax/latest/CredentialsWrapper.html) object. Note that when one of these objects are provided, any settings in $credentialsConfig will be ignored. **Important** : If you are providing a path to a credentials file, or a decoded credentials file as a PHP array, this usage is now DEPRECATED. Providing an unvalidated credential configuration to Google APIs can compromise the security of your systems and data. It is recommended to create the credentials explicitly `use Google\Auth\Credentials\ServiceAccountCredentials; use Google\Maps\FleetEngine\V1\TripServiceClient; $creds = new ServiceAccountCredentials($scopes, $json); $options = new TripServiceClient(['credentials' => $creds]);` <https://cloud.google.com/docs/authentication/external/externally-sourced-credentials> |
| `↳ credentialsConfig` | `array` Options used to configure credentials, including auth token caching, for the client. For a full list of supporting configuration options, see [Google\\ApiCore\\CredentialsWrapper::build()](https://docs.cloud.google.com/php/docs/reference/gax/latest/CredentialsWrapper.html#_Google_ApiCore_CredentialsWrapper__build__) . |
| `↳ disableRetries` | `bool` Determines whether or not retries defined by the client configuration should be disabled. Defaults to `false`. |
| `↳ clientConfig` | `string|array` Client method configuration, including retry settings. This option can be either a path to a JSON file, or a PHP array containing the decoded JSON data. By default this settings points to the default client config file, which is provided in the resources folder. |
| `↳ transport` | `string|https://docs.cloud.google.com/php/docs/reference/gax/latest/Transport.TransportInterface.html` The transport used for executing network requests. May be either the string `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. *Advanced usage* : Additionally, it is possible to pass in an already instantiated [Google\\ApiCore\\Transport\\TransportInterface](https://docs.cloud.google.com/php/docs/reference/gax/latest/Transport.TransportInterface.html) object. Note that when this object is provided, any settings in $transportConfig, and any $apiEndpoint setting, will be ignored. |
| `↳ transportConfig` | `array` Configuration options that will be used to construct the transport. Options for each supported transport type should be passed in a key for that transport. For example: $transportConfig = \[ 'grpc' =\> \[...\], 'rest' =\> \[...\], \]; See the [Google\\ApiCore\\Transport\\GrpcTransport::build()](https://docs.cloud.google.com/php/docs/reference/gax/latest/Transport.GrpcTransport.html#_Google_ApiCore_Transport_GrpcTransport__build__) and [Google\\ApiCore\\Transport\\RestTransport::build()](https://docs.cloud.google.com/php/docs/reference/gax/latest/Transport.RestTransport.html#_Google_ApiCore_Transport_RestTransport__build__) methods for the supported options. |
| `↳ clientCertSource` | `callable` A callable which returns the client cert as a string. This can be used to provide a certificate and private key to the transport layer for mTLS. |
| `↳ logger` | `false|Psr\Log\LoggerInterface` A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the 'GOOGLE_SDK_PHP_LOGGING' environment flag |
| `↳ universeDomain` | `string` The service domain for the client. Defaults to 'googleapis.com'. |

### createTrip

Creates a trip in the Fleet Engine and returns the new trip.

The async variant is [TripServiceClient::createTripAsync()](https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/V1.Client.TripServiceClient#_Google_Maps_FleetEngine_V1_Client_TripServiceClient__createTripAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/V1.CreateTripRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/V1.Trip` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Maps\FleetEngine\V1\Client\TripServiceClient;
    use Google\Maps\FleetEngine\V1\CreateTripRequest;
    use Google\Maps\FleetEngine\V1\Trip;

    /**
     * @param string $formattedParent Must be in the format `providers/{provider}`.
     *                                The provider must be the Project ID (for example, `sample-cloud-project`)
     *                                of the Google Cloud Project of which the service account making
     *                                this call is a member. Please see
     *                                {@see TripServiceClient::tripName()} for help formatting this field.
     * @param string $tripId          Unique Trip ID.
     *                                Subject to the following restrictions:
     *
     *                                * Must be a valid Unicode string.
     *                                * Limited to a maximum length of 64 characters.
     *                                * Normalized according to [Unicode Normalization Form C]
     *                                (http://www.unicode.org/reports/tr15/).
     *                                * May not contain any of the following ASCII characters: '/', ':', '?',
     *                                ',', or '#'.
     */
    function create_trip_sample(string $formattedParent, string $tripId): void
    {
        // Create a client.
        $tripServiceClient = new TripServiceClient();

        // Prepare the request message.
        $trip = new Trip();
        $request = (new CreateTripRequest())
            ->setParent($formattedParent)
            ->setTripId($tripId)
            ->setTrip($trip);

        // Call the API and handle any network failures.
        try {
            /** @var Trip $response */
            $response = $tripServiceClient->createTrip($request);
            printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample 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,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedParent = TripServiceClient::tripName('[PROVIDER]', '[TRIP]');
        $tripId = '[TRIP_ID]';

        create_trip_sample($formattedParent, $tripId);
    }

### deleteTrip

Deletes a single Trip.

Returns FAILED_PRECONDITION if the Trip is active and assigned to a
vehicle.

The async variant is [TripServiceClient::deleteTripAsync()](https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/V1.Client.TripServiceClient#_Google_Maps_FleetEngine_V1_Client_TripServiceClient__deleteTripAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/V1.DeleteTripRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Maps\FleetEngine\V1\Client\TripServiceClient;
    use Google\Maps\FleetEngine\V1\DeleteTripRequest;

    /**
     * @param string $formattedName Must be in the format `providers/{provider}/trips/{trip}`.
     *                              The provider must be the Project ID (for example, `sample-cloud-project`)
     *                              of the Google Cloud Project of which the service account making
     *                              this call is a member. Please see
     *                              {@see TripServiceClient::tripName()} for help formatting this field.
     */
    function delete_trip_sample(string $formattedName): void
    {
        // Create a client.
        $tripServiceClient = new TripServiceClient();

        // Prepare the request message.
        $request = (new DeleteTripRequest())
            ->setName($formattedName);

        // Call the API and handle any network failures.
        try {
            $tripServiceClient->deleteTrip($request);
            printf('Call completed successfully.' . PHP_EOL);
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample 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,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedName = TripServiceClient::tripName('[PROVIDER]', '[TRIP]');

        delete_trip_sample($formattedName);
    }

### getTrip

Get information about a single trip.

The async variant is [TripServiceClient::getTripAsync()](https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/V1.Client.TripServiceClient#_Google_Maps_FleetEngine_V1_Client_TripServiceClient__getTripAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/V1.GetTripRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/V1.Trip` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Maps\FleetEngine\V1\Client\TripServiceClient;
    use Google\Maps\FleetEngine\V1\GetTripRequest;
    use Google\Maps\FleetEngine\V1\Trip;

    /**
     * @param string $formattedName Must be in the format `providers/{provider}/trips/{trip}`.
     *                              The provider must be the Project ID (for example, `sample-cloud-project`)
     *                              of the Google Cloud Project of which the service account making
     *                              this call is a member. Please see
     *                              {@see TripServiceClient::tripName()} for help formatting this field.
     */
    function get_trip_sample(string $formattedName): void
    {
        // Create a client.
        $tripServiceClient = new TripServiceClient();

        // Prepare the request message.
        $request = (new GetTripRequest())
            ->setName($formattedName);

        // Call the API and handle any network failures.
        try {
            /** @var Trip $response */
            $response = $tripServiceClient->getTrip($request);
            printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample 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,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedName = TripServiceClient::tripName('[PROVIDER]', '[TRIP]');

        get_trip_sample($formattedName);
    }

### reportBillableTrip

Report billable trip usage.

The async variant is [TripServiceClient::reportBillableTripAsync()](https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/V1.Client.TripServiceClient#_Google_Maps_FleetEngine_V1_Client_TripServiceClient__reportBillableTripAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/V1.ReportBillableTripRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Maps\FleetEngine\V1\Client\TripServiceClient;
    use Google\Maps\FleetEngine\V1\ReportBillableTripRequest;

    /**
     * @param string $name        Must be in the format
     *                            `providers/{provider}/billableTrips/{billable_trip}`. The
     *                            provider must be the Project ID (for example, `sample-cloud-project`) of
     *                            the Google Cloud Project of which the service account making this call is a
     *                            member.
     * @param string $countryCode Two letter country code of the country where the trip takes
     *                            place. Price is defined according to country code.
     */
    function report_billable_trip_sample(string $name, string $countryCode): void
    {
        // Create a client.
        $tripServiceClient = new TripServiceClient();

        // Prepare the request message.
        $request = (new ReportBillableTripRequest())
            ->setName($name)
            ->setCountryCode($countryCode);

        // Call the API and handle any network failures.
        try {
            $tripServiceClient->reportBillableTrip($request);
            printf('Call completed successfully.' . PHP_EOL);
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample 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,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $name = '[NAME]';
        $countryCode = '[COUNTRY_CODE]';

        report_billable_trip_sample($name, $countryCode);
    }

### searchTrips

Get all the trips for a specific vehicle.

The async variant is [TripServiceClient::searchTripsAsync()](https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/V1.Client.TripServiceClient#_Google_Maps_FleetEngine_V1_Client_TripServiceClient__searchTripsAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/V1.SearchTripsRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/PagedListResponse.html` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\PagedListResponse;
    use Google\Maps\FleetEngine\V1\Client\TripServiceClient;
    use Google\Maps\FleetEngine\V1\SearchTripsRequest;
    use Google\Maps\FleetEngine\V1\Trip;

    /**
     * @param string $parent Must be in the format `providers/{provider}`.
     *                       The provider must be the Project ID (for example, `sample-cloud-project`)
     *                       of the Google Cloud Project of which the service account making
     *                       this call is a member.
     */
    function search_trips_sample(string $parent): void
    {
        // Create a client.
        $tripServiceClient = new TripServiceClient();

        // Prepare the request message.
        $request = (new SearchTripsRequest())
            ->setParent($parent);

        // Call the API and handle any network failures.
        try {
            /** @var PagedListResponse $response */
            $response = $tripServiceClient->searchTrips($request);

            /** @var Trip $element */
            foreach ($response as $element) {
                printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample 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,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $parent = '[PARENT]';

        search_trips_sample($parent);
    }

### updateTrip

Updates trip data.

The async variant is [TripServiceClient::updateTripAsync()](https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/V1.Client.TripServiceClient#_Google_Maps_FleetEngine_V1_Client_TripServiceClient__updateTripAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/V1.UpdateTripRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/V1.Trip` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Maps\FleetEngine\V1\Client\TripServiceClient;
    use Google\Maps\FleetEngine\V1\Trip;
    use Google\Maps\FleetEngine\V1\UpdateTripRequest;
    use Google\Protobuf\FieldMask;

    /**
     * @param string $name Must be in the format
     *                     `providers/{provider}/trips/{trip}`. The provider must
     *                     be the Project ID (for example, `sample-consumer-project`) of the Google
     *                     Cloud Project of which the service account making this call is a member.
     */
    function update_trip_sample(string $name): void
    {
        // Create a client.
        $tripServiceClient = new TripServiceClient();

        // Prepare the request message.
        $trip = new Trip();
        $updateMask = new FieldMask();
        $request = (new UpdateTripRequest())
            ->setName($name)
            ->setTrip($trip)
            ->setUpdateMask($updateMask);

        // Call the API and handle any network failures.
        try {
            /** @var Trip $response */
            $response = $tripServiceClient->updateTrip($request);
            printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample 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,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $name = '[NAME]';

        update_trip_sample($name);
    }

### createTripAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/V1.CreateTripRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/V1.Trip>` |   |

### deleteTripAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/V1.DeleteTripRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<void>` |   |

### getTripAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/V1.GetTripRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/V1.Trip>` |   |

### reportBillableTripAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/V1.ReportBillableTripRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<void>` |   |

### searchTripsAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/V1.SearchTripsRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/PagedListResponse.html>` |   |

### updateTripAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/V1.UpdateTripRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/V1.Trip>` |   |

### static::tripName

Formats a string containing the fully-qualified path to represent a trip
resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `provider` | `string` |
| `trip` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` | The formatted trip resource. |

### static::parseName

Parses a formatted name string and returns an associative array of the components in the name.

The following name formats are supported:
Template: Pattern

- trip: providers/{provider}/trips/{trip}

The optional $template argument can be supplied to specify a particular pattern,
and must match one of the templates listed above. If no $template argument is
provided, or if the $template argument does not match one of the templates
listed, then parseName will check each of the supported templates, and return
the first match.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `formattedName` | `string` The formatted name string |
| `template` | `?string` Optional name of template to match |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `array` | An associative array from name component IDs to component values. |