# Google Maps FleetEngine V1 Client - Class UpdateVehicleRequest (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 UpdateVehicleRequest.

\`UpdateVehicle request message.

Generated from protobuf message `maps.fleetengine.v1.UpdateVehicleRequest`

## Namespace

Google \\ Maps \\ FleetEngine \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ header` | `https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/V1.RequestHeader` The standard Fleet Engine request header. |
| `↳ name` | `string` Required. Must be in the format `providers/{provider}/vehicles/{vehicle}`. The {provider} must be the Project ID (for example, `sample-cloud-project`) of the Google Cloud Project of which the service account making this call is a member. |
| `↳ vehicle` | `https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/V1.Vehicle` Required. The `Vehicle` entity values to apply. When updating a `Vehicle`, the following fields may not be updated as they are managed by the server. \* \* `available_capacity` \* \* `current_route_segment_version` \* \* `current_trips` \* \* `name` \* \* `waypoints_version` If the `attributes` field is updated, **all** the vehicle's attributes are replaced with the attributes provided in the request. If you want to update only some attributes, see the `UpdateVehicleAttributes` method. Likewise, the `waypoints` field can be updated, but must contain all the waypoints currently on the vehicle, and no other waypoints. |
| `↳ update_mask` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/FieldMask` Required. A field mask indicating which fields of the `Vehicle` to update. At least one field name must be provided. |

### getHeader

The standard Fleet Engine request header.

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

### hasHeader

### clearHeader

### setHeader

The standard Fleet Engine request header.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/V1.RequestHeader` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getName

Required. Must be in the format
`providers/{provider}/vehicles/{vehicle}`.

The {provider} must be the Project ID (for example, `sample-cloud-project`)
of the Google Cloud Project of which the service account making
this call is a member.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setName

Required. Must be in the format
`providers/{provider}/vehicles/{vehicle}`.

The {provider} must be the Project ID (for example, `sample-cloud-project`)
of the Google Cloud Project of which the service account making
this call is a member.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getVehicle

Required. The `Vehicle` entity values to apply. When updating a `Vehicle`,
the following fields may not be updated as they are managed by the
server.

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

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

### hasVehicle

### clearVehicle

### setVehicle

Required. The `Vehicle` entity values to apply. When updating a `Vehicle`,
the following fields may not be updated as they are managed by the
server.

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/V1.Vehicle` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getUpdateMask

Required. A field mask indicating which fields of the `Vehicle` to update.

At least one field name must be provided.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/FieldMask|null` |   |

### hasUpdateMask

### clearUpdateMask

### setUpdateMask

Required. A field mask indicating which fields of the `Vehicle` to update.

At least one field name must be provided.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/FieldMask` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |