Optional. The standard Delivery API request header.
↳ parent
string
Required. Must be in the format providers/{provider}. The provider must be the Google Cloud Project ID. For example, sample-cloud-project.
↳ task_id
string
Required. The Task ID must be unique, but it should be not a shipment tracking ID. To store a shipment tracking ID, use the tracking_id field. Note that multiple tasks can have the same tracking_id. Task IDs are 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. * * May not contain any of the following ASCII characters: '/', ':', '?', ',', or '#'.
Required. The Task entity to create. When creating a Task, the following fields are required: * * type * * state (must be set to OPEN) * * tracking_id (must not be set for UNAVAILABLE or SCHEDULED_STOP tasks, but required for all other task types) * * planned_location (optional for UNAVAILABLE tasks) * * task_duration The following fields can be optionally set: * * target_time_window * * task_tracking_view_config * * attributes Note: The Task's name field is ignored. All other Task fields must not be set; otherwise, an error is returned.
getHeader
Optional. The standard Delivery API request header.
Required. The Task entity to create.
When creating a Task, the following fields are required:
type
state (must be set to OPEN)
tracking_id (must not be set for UNAVAILABLE or SCHEDULED_STOP
tasks, but required for all other task types)
planned_location (optional for UNAVAILABLE tasks)
task_duration
The following fields can be optionally set:
target_time_window
task_tracking_view_config
attributes
Note: The Task's name field is ignored. All other Task fields must not be
set; otherwise, an error is returned.
taskId
string
Required. The Task ID must be unique, but it should be not a shipment
tracking ID. To store a shipment tracking ID, use the tracking_id field.
Note that multiple tasks can have the same tracking_id. Task IDs are
subject to the following restrictions:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Maps FleetEngine Delivery V1 Client - Class CreateTaskRequest (0.4.1)\n\nVersion latestkeyboard_arrow_down\n\n- [0.4.1 (latest)](/php/docs/reference/maps-fleetengine-delivery/latest/V1.CreateTaskRequest)\n- [0.4.0](/php/docs/reference/maps-fleetengine-delivery/0.4.0/V1.CreateTaskRequest)\n- [0.3.1](/php/docs/reference/maps-fleetengine-delivery/0.3.1/V1.CreateTaskRequest)\n- [0.2.0](/php/docs/reference/maps-fleetengine-delivery/0.2.0/V1.CreateTaskRequest)\n- [0.1.8](/php/docs/reference/maps-fleetengine-delivery/0.1.8/V1.CreateTaskRequest) \nReference documentation and code samples for the Google Maps FleetEngine Delivery V1 Client class CreateTaskRequest.\n\nThe `CreateTask` request message.\n\nGenerated from protobuf message `maps.fleetengine.delivery.v1.CreateTaskRequest`\n\nNamespace\n---------\n\nGoogle \\\\ Maps \\\\ FleetEngine \\\\ Delivery \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getHeader\n\nOptional. The standard Delivery API request header.\n\n### hasHeader\n\n### clearHeader\n\n### setHeader\n\nOptional. The standard Delivery API request header.\n\n### getParent\n\nRequired. Must be in the format `providers/{provider}`. The `provider` must\nbe the Google Cloud Project ID. For example, `sample-cloud-project`.\n\n### setParent\n\nRequired. Must be in the format `providers/{provider}`. The `provider` must\nbe the Google Cloud Project ID. For example, `sample-cloud-project`.\n\n### getTaskId\n\nRequired. The Task ID must be unique, but it should be not a shipment\ntracking ID. To store a shipment tracking ID, use the `tracking_id` field.\n\nNote that multiple tasks can have the same `tracking_id`. Task IDs are\nsubject to the following restrictions:\n\n- Must be a valid Unicode string.\n- Limited to a maximum length of 64 characters.\n- Normalized according to [Unicode Normalization Form C](http://www.unicode.org/reports/tr15/).\n- May not contain any of the following ASCII characters: '/', ':', '?', ',', or '#'.\n\n### setTaskId\n\nRequired. The Task ID must be unique, but it should be not a shipment\ntracking ID. To store a shipment tracking ID, use the `tracking_id` field.\n\nNote that multiple tasks can have the same `tracking_id`. Task IDs are\nsubject to the following restrictions:\n\n- Must be a valid Unicode string.\n- Limited to a maximum length of 64 characters.\n- Normalized according to [Unicode Normalization Form C](http://www.unicode.org/reports/tr15/).\n- May not contain any of the following ASCII characters: '/', ':', '?', ',', or '#'.\n\n### getTask\n\nRequired. The Task entity to create.\n\nWhen creating a Task, the following fields are required:\n\n- `type`\n- `state` (must be set to `OPEN`)\n- `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP` tasks, but required for all other task types)\n- `planned_location` (optional for `UNAVAILABLE` tasks)\n- `task_duration` The following fields can be optionally set:\n- `target_time_window`\n- `task_tracking_view_config`\n- `attributes` Note: The Task's `name` field is ignored. All other Task fields must not be set; otherwise, an error is returned.\n\n### hasTask\n\n### clearTask\n\n### setTask\n\nRequired. The Task entity to create.\n\nWhen creating a Task, the following fields are required:\n\n- `type`\n- `state` (must be set to `OPEN`)\n- `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP` tasks, but required for all other task types)\n- `planned_location` (optional for `UNAVAILABLE` tasks)\n- `task_duration` The following fields can be optionally set:\n- `target_time_window`\n- `task_tracking_view_config`\n- `attributes` Note: The Task's `name` field is ignored. All other Task fields must not be set; otherwise, an error is returned.\n\n### static::build"]]