Required. 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.
↳ trip_id
string
Required. 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. * * May not contain any of the following ASCII characters: '/', ':', '?', ',', or '#'.
Required. Trip entity to create. When creating a Trip, the following fields are required: * * trip_type * * pickup_point The following fields are used if you provide them: * * number_of_passengers * * vehicle_id * * dropoff_point * * intermediate_destinations * * vehicle_waypoints All other Trip fields are ignored. For example, all trips start with a trip_status of NEW even if you pass in a trip_status of CANCELED in the creation request. Only EXCLUSIVE trips support intermediate_destinations. When vehicle_id is set for a shared trip, you must supply the list of Trip.vehicle_waypoints to specify the order of the remaining waypoints for the vehicle, otherwise the waypoint order will be undetermined. When you specify Trip.vehicle_waypoints, the list must contain all the remaining waypoints of the vehicle's trips, with no extra waypoints. You must order these waypoints such that for a given trip, the pickup point is before intermediate destinations, and all intermediate destinations come before the drop-off point. An EXCLUSIVE trip's waypoints must not interleave with any other trips. The trip_id, waypoint_type and location fields are used, and all other TripWaypoint fields in vehicle_waypoints are ignored.
Required. 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.
Returns
Type
Description
string
setParent
Required. 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.
May not contain any of the following ASCII characters: '/', ':', '?',
',', or '#'.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getTrip
Required. Trip entity to create.
When creating a Trip, the following fields are required:
trip_type
pickup_point
The following fields are used if you provide them:
number_of_passengers
vehicle_id
dropoff_point
intermediate_destinations
vehicle_waypoints
All other Trip fields are ignored. For example, all trips start with a
trip_status of NEW even if you pass in a trip_status of CANCELED in
the creation request.
Only EXCLUSIVE trips support intermediate_destinations.
When vehicle_id is set for a shared trip, you must supply
the list of Trip.vehicle_waypoints to specify the order of the remaining
waypoints for the vehicle, otherwise the waypoint order will be
undetermined.
When you specify Trip.vehicle_waypoints, the list must contain all
the remaining waypoints of the vehicle's trips, with no extra waypoints.
You must order these waypoints such that for a given trip, the pickup
point is before intermediate destinations, and all intermediate
destinations come before the drop-off point. An EXCLUSIVE trip's
waypoints must not interleave with any other trips.
The trip_id, waypoint_type and location fields are used, and all
other TripWaypoint fields in vehicle_waypoints are ignored.
When creating a Trip, the following fields are required:
trip_type
pickup_point
The following fields are used if you provide them:
number_of_passengers
vehicle_id
dropoff_point
intermediate_destinations
vehicle_waypoints
All other Trip fields are ignored. For example, all trips start with a
trip_status of NEW even if you pass in a trip_status of CANCELED in
the creation request.
Only EXCLUSIVE trips support intermediate_destinations.
When vehicle_id is set for a shared trip, you must supply
the list of Trip.vehicle_waypoints to specify the order of the remaining
waypoints for the vehicle, otherwise the waypoint order will be
undetermined.
When you specify Trip.vehicle_waypoints, the list must contain all
the remaining waypoints of the vehicle's trips, with no extra waypoints.
You must order these waypoints such that for a given trip, the pickup
point is before intermediate destinations, and all intermediate
destinations come before the drop-off point. An EXCLUSIVE trip's
waypoints must not interleave with any other trips.
The trip_id, waypoint_type and location fields are used, and all
other TripWaypoint fields in vehicle_waypoints are ignored.
[[["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 V1 Client - Class CreateTripRequest (0.4.1)\n\nVersion latestkeyboard_arrow_down\n\n- [0.4.1 (latest)](/php/docs/reference/maps-fleetengine/latest/V1.CreateTripRequest)\n- [0.4.0](/php/docs/reference/maps-fleetengine/0.4.0/V1.CreateTripRequest)\n- [0.3.1](/php/docs/reference/maps-fleetengine/0.3.1/V1.CreateTripRequest)\n- [0.2.0](/php/docs/reference/maps-fleetengine/0.2.0/V1.CreateTripRequest)\n- [0.1.6](/php/docs/reference/maps-fleetengine/0.1.6/V1.CreateTripRequest) \nReference documentation and code samples for the Google Maps FleetEngine V1 Client class CreateTripRequest.\n\nCreateTrip request message.\n\nGenerated from protobuf message `maps.fleetengine.v1.CreateTripRequest`\n\nNamespace\n---------\n\nGoogle \\\\ Maps \\\\ FleetEngine \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getHeader\n\nThe standard Fleet Engine request header.\n\n### hasHeader\n\n### clearHeader\n\n### setHeader\n\nThe standard Fleet Engine request header.\n\n### getParent\n\nRequired. Must be in the format `providers/{provider}`.\n\nThe provider must be the Project ID (for example, `sample-cloud-project`)\nof the Google Cloud Project of which the service account making\nthis call is a member.\n\n### setParent\n\nRequired. Must be in the format `providers/{provider}`.\n\nThe provider must be the Project ID (for example, `sample-cloud-project`)\nof the Google Cloud Project of which the service account making\nthis call is a member.\n\n### getTripId\n\nRequired. Unique Trip ID.\n\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### setTripId\n\nRequired. Unique Trip ID.\n\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### getTrip\n\nRequired. Trip entity to create.\n\nWhen creating a Trip, the following fields are required:\n\n- `trip_type`\n- `pickup_point` The following fields are used if you provide them:\n- `number_of_passengers`\n- `vehicle_id`\n- `dropoff_point`\n- `intermediate_destinations`\n- `vehicle_waypoints` All other Trip fields are ignored. For example, all trips start with a `trip_status` of `NEW` even if you pass in a `trip_status` of `CANCELED` in the creation request. Only `EXCLUSIVE` trips support `intermediate_destinations`. When `vehicle_id` is set for a shared trip, you must supply the list of `Trip.vehicle_waypoints` to specify the order of the remaining waypoints for the vehicle, otherwise the waypoint order will be undetermined. When you specify `Trip.vehicle_waypoints`, the list must contain all the remaining waypoints of the vehicle's trips, with no extra waypoints. You must order these waypoints such that for a given trip, the pickup point is before intermediate destinations, and all intermediate destinations come before the drop-off point. An `EXCLUSIVE` trip's waypoints must not interleave with any other trips. The `trip_id`, `waypoint_type` and `location` fields are used, and all other TripWaypoint fields in `vehicle_waypoints` are ignored.\n\n### hasTrip\n\n### clearTrip\n\n### setTrip\n\nRequired. Trip entity to create.\n\nWhen creating a Trip, the following fields are required:\n\n- `trip_type`\n- `pickup_point` The following fields are used if you provide them:\n- `number_of_passengers`\n- `vehicle_id`\n- `dropoff_point`\n- `intermediate_destinations`\n- `vehicle_waypoints` All other Trip fields are ignored. For example, all trips start with a `trip_status` of `NEW` even if you pass in a `trip_status` of `CANCELED` in the creation request. Only `EXCLUSIVE` trips support `intermediate_destinations`. When `vehicle_id` is set for a shared trip, you must supply the list of `Trip.vehicle_waypoints` to specify the order of the remaining waypoints for the vehicle, otherwise the waypoint order will be undetermined. When you specify `Trip.vehicle_waypoints`, the list must contain all the remaining waypoints of the vehicle's trips, with no extra waypoints. You must order these waypoints such that for a given trip, the pickup point is before intermediate destinations, and all intermediate destinations come before the drop-off point. An `EXCLUSIVE` trip's waypoints must not interleave with any other trips. The `trip_id`, `waypoint_type` and `location` fields are used, and all other TripWaypoint fields in `vehicle_waypoints` are ignored."]]