# Google Maps FleetEngine Delivery V1 Client - Class UpdateTaskRequest (0.5.3)

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

The `UpdateTask` request message.

Generated from protobuf message `maps.fleetengine.delivery.v1.UpdateTaskRequest`

## Namespace

Google \\ Maps \\ FleetEngine \\ Delivery \\ 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-delivery/latest/V1.DeliveryRequestHeader` Optional. The standard Delivery API request header. |
| `↳ task` | `https://docs.cloud.google.com/php/docs/reference/maps-fleetengine-delivery/latest/V1.Task` Required. The Task associated with the update. The following fields are maintained by Fleet Engine. Do not update them using `Task.update`. \* \* `last_location`. \* \* `last_location_snappable`. \* \* `name`. \* \* `remaining_vehicle_journey_segments`. \* \* `task_outcome_location_source`. Note: You cannot change the value of `task_outcome` once you set it. If the Task has been assigned to a delivery vehicle, then don't set the Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop` that contains the Task from the delivery vehicle, which automatically sets the Task state to CLOSED. |
| `↳ update_mask` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/FieldMask` Required. The field mask that indicates which Task fields to update. Note: The `update_mask` must contain at least one field. This is a comma-separated list of fully qualified names of fields. Example: `"task_outcome,task_outcome_time,task_outcome_location"`. |

### getHeader

Optional. The standard Delivery API request header.

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

### hasHeader

### clearHeader

### setHeader

Optional. The standard Delivery API request header.

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

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

### getTask

Required. The Task associated with the update.

The following fields are maintained by Fleet Engine. Do not update
them using `Task.update`.

- `last_location`.
- `last_location_snappable`.
- `name`.
- `remaining_vehicle_journey_segments`.
- `task_outcome_location_source`. Note: You cannot change the value of `task_outcome` once you set it. If the Task has been assigned to a delivery vehicle, then don't set the Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop` that contains the Task from the delivery vehicle, which automatically sets the Task state to CLOSED.

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

### hasTask

### clearTask

### setTask

Required. The Task associated with the update.

The following fields are maintained by Fleet Engine. Do not update
them using `Task.update`.

- `last_location`.
- `last_location_snappable`.
- `name`.
- `remaining_vehicle_journey_segments`.
- `task_outcome_location_source`. Note: You cannot change the value of `task_outcome` once you set it. If the Task has been assigned to a delivery vehicle, then don't set the Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop` that contains the Task from the delivery vehicle, which automatically sets the Task state to CLOSED.

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

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

### getUpdateMask

Required. The field mask that indicates which Task fields to update.

Note: The `update_mask` must contain at least one field.
This is a comma-separated list of fully qualified names of fields. Example:
`"task_outcome,task_outcome_time,task_outcome_location"`.

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

### hasUpdateMask

### clearUpdateMask

### setUpdateMask

Required. The field mask that indicates which Task fields to update.

Note: The `update_mask` must contain at least one field.
This is a comma-separated list of fully qualified names of fields. Example:
`"task_outcome,task_outcome_time,task_outcome_location"`.

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

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `task` | `https://docs.cloud.google.com/php/docs/reference/maps-fleetengine-delivery/latest/V1.Task` Required. The Task associated with the update. The following fields are maintained by Fleet Engine. Do not update them using `Task.update`. - - `last_location`. - - `last_location_snappable`. - - `name`. - - `remaining_vehicle_journey_segments`. - - `task_outcome_location_source`. Note: You cannot change the value of `task_outcome` once you set it. If the Task has been assigned to a delivery vehicle, then don't set the Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop` that contains the Task from the delivery vehicle, which automatically sets the Task state to CLOSED. |
| `updateMask` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/FieldMask` Required. The field mask that indicates which Task fields to update. Note: The `update_mask` must contain at least one field. This is a comma-separated list of fully qualified names of fields. Example: `"task_outcome,task_outcome_time,task_outcome_location"`. |

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