Class: Google::Maps::FleetEngine::Delivery::V1::Task

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb

Overview

A Task in the Delivery API represents a single action to track. In general, there is a distinction between shipment-related Tasks and break Tasks. A shipment can have multiple Tasks associated with it. For example, there could be one Task for the pickup, and one for the drop-off or transfer. Also, different Tasks for a given shipment can be handled by different vehicles. For example, one vehicle could handle the pickup, driving the shipment to the hub, while another vehicle drives the same shipment from the hub to the drop-off location.

Note: gRPC and REST APIs use different field naming conventions. For example, the Task.journey_sharing_info field in the gRPC API and the Task.journeySharingInfo field in the REST API refer to the same field.

Defined Under Namespace

Modules: State, TaskOutcome, TaskOutcomeLocationSource, Type Classes: JourneySharingInfo

Instance Attribute Summary collapse

Instance Attribute Details

#attributes::Array<::Google::Maps::FleetEngine::Delivery::V1::TaskAttribute>

Returns A list of custom Task attributes. Each attribute must have a unique key.

Returns:



109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
# File 'proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb', line 109

class Task
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Journey sharing specific fields.
  # @!attribute [rw] remaining_vehicle_journey_segments
  #   @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::VehicleJourneySegment>]
  #     Tracking information for the stops that the assigned vehicle will make
  #     before it completes this Task. Note that this list can contain stops
  #     from other tasks.
  #
  #     The first segment,
  #     `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
  #     or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
  #     contains route information from the driver's last known location to the
  #     upcoming `VehicleStop`. Current route information usually comes from the
  #     driver app, except for some cases noted in the documentation for
  #     {::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle#current_route_segment DeliveryVehicle.current_route_segment}.
  #     The other segments in
  #     `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
  #     `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
  #     populated by Fleet Engine. They provide route information between the
  #     remaining `VehicleStops`.
  # @!attribute [rw] last_location
  #   @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocation]
  #     Indicates the vehicle's last reported location of the assigned vehicle.
  # @!attribute [rw] last_location_snappable
  #   @return [::Boolean]
  #     Indicates whether the vehicle's lastLocation can be snapped to
  #     the `current_route_segment`. This value is False if either
  #     `last_location` or `current_route_segment` don't exist. This value is
  #     computed by Fleet Engine. Updates from clients are ignored.
  class JourneySharingInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The type of Task.
  module Type
    # Default, the Task type is unknown.
    TYPE_UNSPECIFIED = 0

    # A pickup Task is the action taken for picking up a shipment from a
    # customer. Depot or feeder vehicle pickups should use the `SCHEDULED_STOP`
    # type.
    PICKUP = 1

    # A delivery Task is the action taken for delivering a shipment to an end
    # customer. Depot or feeder vehicle dropoffs should use the
    # `SCHEDULED_STOP` type.
    DELIVERY = 2

    # A scheduled stop Task is used for planning purposes. For example, it
    # could represent picking up or dropping off shipments from feeder vehicles
    # or depots. It shouldn't be used for any shipments that are picked up or
    # dropped off from an end customer.
    SCHEDULED_STOP = 3

    # A Task that means the Vehicle is not available for service. For example,
    # this can happen when the driver takes a break, or when the vehicle
    # is being refueled.
    UNAVAILABLE = 4
  end

  # The state of a Task. This indicates the Tasks's progress.
  module State
    # Default. Used for an unspecified or unrecognized Task state.
    STATE_UNSPECIFIED = 0

    # Either the Task has not yet been assigned to a delivery vehicle, or the
    # delivery vehicle has not yet passed the `Task`'s assigned vehicle stop.
    OPEN = 1

    # When the vehicle passes the vehicle stop for this Task.
    CLOSED = 2
  end

  # The outcome of attempting to execute a Task. When `TaskState` is closed,
  # `TaskOutcome` indicates whether it was completed successfully.
  module TaskOutcome
    # The Task outcome before its value is set.
    TASK_OUTCOME_UNSPECIFIED = 0

    # The Task completed successfully.
    SUCCEEDED = 1

    # Either the Task couldn't be completed, or it was cancelled.
    FAILED = 2
  end

  # The identity of the source that populated the `task_outcome_location`.
  module TaskOutcomeLocationSource
    # The task outcome before it is set.
    TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED = 0

    # The provider-specified the `task_outcome_location`.
    PROVIDER = 2

    # The provider didn't specify the `task_outcome_location`, so Fleet Engine
    # used the last known vehicle location.
    LAST_VEHICLE_LOCATION = 3
  end
end

#delivery_vehicle_id::String (readonly)

Returns Output only. The ID of the vehicle that is executing this Task. Delivery Vehicle 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 '#'.

Returns:

  • (::String)

    Output only. The ID of the vehicle that is executing this Task. Delivery Vehicle 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 '#'.


109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
# File 'proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb', line 109

class Task
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Journey sharing specific fields.
  # @!attribute [rw] remaining_vehicle_journey_segments
  #   @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::VehicleJourneySegment>]
  #     Tracking information for the stops that the assigned vehicle will make
  #     before it completes this Task. Note that this list can contain stops
  #     from other tasks.
  #
  #     The first segment,
  #     `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
  #     or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
  #     contains route information from the driver's last known location to the
  #     upcoming `VehicleStop`. Current route information usually comes from the
  #     driver app, except for some cases noted in the documentation for
  #     {::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle#current_route_segment DeliveryVehicle.current_route_segment}.
  #     The other segments in
  #     `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
  #     `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
  #     populated by Fleet Engine. They provide route information between the
  #     remaining `VehicleStops`.
  # @!attribute [rw] last_location
  #   @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocation]
  #     Indicates the vehicle's last reported location of the assigned vehicle.
  # @!attribute [rw] last_location_snappable
  #   @return [::Boolean]
  #     Indicates whether the vehicle's lastLocation can be snapped to
  #     the `current_route_segment`. This value is False if either
  #     `last_location` or `current_route_segment` don't exist. This value is
  #     computed by Fleet Engine. Updates from clients are ignored.
  class JourneySharingInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The type of Task.
  module Type
    # Default, the Task type is unknown.
    TYPE_UNSPECIFIED = 0

    # A pickup Task is the action taken for picking up a shipment from a
    # customer. Depot or feeder vehicle pickups should use the `SCHEDULED_STOP`
    # type.
    PICKUP = 1

    # A delivery Task is the action taken for delivering a shipment to an end
    # customer. Depot or feeder vehicle dropoffs should use the
    # `SCHEDULED_STOP` type.
    DELIVERY = 2

    # A scheduled stop Task is used for planning purposes. For example, it
    # could represent picking up or dropping off shipments from feeder vehicles
    # or depots. It shouldn't be used for any shipments that are picked up or
    # dropped off from an end customer.
    SCHEDULED_STOP = 3

    # A Task that means the Vehicle is not available for service. For example,
    # this can happen when the driver takes a break, or when the vehicle
    # is being refueled.
    UNAVAILABLE = 4
  end

  # The state of a Task. This indicates the Tasks's progress.
  module State
    # Default. Used for an unspecified or unrecognized Task state.
    STATE_UNSPECIFIED = 0

    # Either the Task has not yet been assigned to a delivery vehicle, or the
    # delivery vehicle has not yet passed the `Task`'s assigned vehicle stop.
    OPEN = 1

    # When the vehicle passes the vehicle stop for this Task.
    CLOSED = 2
  end

  # The outcome of attempting to execute a Task. When `TaskState` is closed,
  # `TaskOutcome` indicates whether it was completed successfully.
  module TaskOutcome
    # The Task outcome before its value is set.
    TASK_OUTCOME_UNSPECIFIED = 0

    # The Task completed successfully.
    SUCCEEDED = 1

    # Either the Task couldn't be completed, or it was cancelled.
    FAILED = 2
  end

  # The identity of the source that populated the `task_outcome_location`.
  module TaskOutcomeLocationSource
    # The task outcome before it is set.
    TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED = 0

    # The provider-specified the `task_outcome_location`.
    PROVIDER = 2

    # The provider didn't specify the `task_outcome_location`, so Fleet Engine
    # used the last known vehicle location.
    LAST_VEHICLE_LOCATION = 3
  end
end

#journey_sharing_info::Google::Maps::FleetEngine::Delivery::V1::Task::JourneySharingInfo (readonly)

Returns Output only. Journey sharing-specific fields. Not populated when state is CLOSED.

Returns:



109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
# File 'proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb', line 109

class Task
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Journey sharing specific fields.
  # @!attribute [rw] remaining_vehicle_journey_segments
  #   @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::VehicleJourneySegment>]
  #     Tracking information for the stops that the assigned vehicle will make
  #     before it completes this Task. Note that this list can contain stops
  #     from other tasks.
  #
  #     The first segment,
  #     `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
  #     or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
  #     contains route information from the driver's last known location to the
  #     upcoming `VehicleStop`. Current route information usually comes from the
  #     driver app, except for some cases noted in the documentation for
  #     {::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle#current_route_segment DeliveryVehicle.current_route_segment}.
  #     The other segments in
  #     `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
  #     `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
  #     populated by Fleet Engine. They provide route information between the
  #     remaining `VehicleStops`.
  # @!attribute [rw] last_location
  #   @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocation]
  #     Indicates the vehicle's last reported location of the assigned vehicle.
  # @!attribute [rw] last_location_snappable
  #   @return [::Boolean]
  #     Indicates whether the vehicle's lastLocation can be snapped to
  #     the `current_route_segment`. This value is False if either
  #     `last_location` or `current_route_segment` don't exist. This value is
  #     computed by Fleet Engine. Updates from clients are ignored.
  class JourneySharingInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The type of Task.
  module Type
    # Default, the Task type is unknown.
    TYPE_UNSPECIFIED = 0

    # A pickup Task is the action taken for picking up a shipment from a
    # customer. Depot or feeder vehicle pickups should use the `SCHEDULED_STOP`
    # type.
    PICKUP = 1

    # A delivery Task is the action taken for delivering a shipment to an end
    # customer. Depot or feeder vehicle dropoffs should use the
    # `SCHEDULED_STOP` type.
    DELIVERY = 2

    # A scheduled stop Task is used for planning purposes. For example, it
    # could represent picking up or dropping off shipments from feeder vehicles
    # or depots. It shouldn't be used for any shipments that are picked up or
    # dropped off from an end customer.
    SCHEDULED_STOP = 3

    # A Task that means the Vehicle is not available for service. For example,
    # this can happen when the driver takes a break, or when the vehicle
    # is being refueled.
    UNAVAILABLE = 4
  end

  # The state of a Task. This indicates the Tasks's progress.
  module State
    # Default. Used for an unspecified or unrecognized Task state.
    STATE_UNSPECIFIED = 0

    # Either the Task has not yet been assigned to a delivery vehicle, or the
    # delivery vehicle has not yet passed the `Task`'s assigned vehicle stop.
    OPEN = 1

    # When the vehicle passes the vehicle stop for this Task.
    CLOSED = 2
  end

  # The outcome of attempting to execute a Task. When `TaskState` is closed,
  # `TaskOutcome` indicates whether it was completed successfully.
  module TaskOutcome
    # The Task outcome before its value is set.
    TASK_OUTCOME_UNSPECIFIED = 0

    # The Task completed successfully.
    SUCCEEDED = 1

    # Either the Task couldn't be completed, or it was cancelled.
    FAILED = 2
  end

  # The identity of the source that populated the `task_outcome_location`.
  module TaskOutcomeLocationSource
    # The task outcome before it is set.
    TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED = 0

    # The provider-specified the `task_outcome_location`.
    PROVIDER = 2

    # The provider didn't specify the `task_outcome_location`, so Fleet Engine
    # used the last known vehicle location.
    LAST_VEHICLE_LOCATION = 3
  end
end

#name::String

Returns Must be in the format providers/{provider}/tasks/{task}.

Returns:

  • (::String)

    Must be in the format providers/{provider}/tasks/{task}.



109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
# File 'proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb', line 109

class Task
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Journey sharing specific fields.
  # @!attribute [rw] remaining_vehicle_journey_segments
  #   @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::VehicleJourneySegment>]
  #     Tracking information for the stops that the assigned vehicle will make
  #     before it completes this Task. Note that this list can contain stops
  #     from other tasks.
  #
  #     The first segment,
  #     `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
  #     or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
  #     contains route information from the driver's last known location to the
  #     upcoming `VehicleStop`. Current route information usually comes from the
  #     driver app, except for some cases noted in the documentation for
  #     {::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle#current_route_segment DeliveryVehicle.current_route_segment}.
  #     The other segments in
  #     `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
  #     `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
  #     populated by Fleet Engine. They provide route information between the
  #     remaining `VehicleStops`.
  # @!attribute [rw] last_location
  #   @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocation]
  #     Indicates the vehicle's last reported location of the assigned vehicle.
  # @!attribute [rw] last_location_snappable
  #   @return [::Boolean]
  #     Indicates whether the vehicle's lastLocation can be snapped to
  #     the `current_route_segment`. This value is False if either
  #     `last_location` or `current_route_segment` don't exist. This value is
  #     computed by Fleet Engine. Updates from clients are ignored.
  class JourneySharingInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The type of Task.
  module Type
    # Default, the Task type is unknown.
    TYPE_UNSPECIFIED = 0

    # A pickup Task is the action taken for picking up a shipment from a
    # customer. Depot or feeder vehicle pickups should use the `SCHEDULED_STOP`
    # type.
    PICKUP = 1

    # A delivery Task is the action taken for delivering a shipment to an end
    # customer. Depot or feeder vehicle dropoffs should use the
    # `SCHEDULED_STOP` type.
    DELIVERY = 2

    # A scheduled stop Task is used for planning purposes. For example, it
    # could represent picking up or dropping off shipments from feeder vehicles
    # or depots. It shouldn't be used for any shipments that are picked up or
    # dropped off from an end customer.
    SCHEDULED_STOP = 3

    # A Task that means the Vehicle is not available for service. For example,
    # this can happen when the driver takes a break, or when the vehicle
    # is being refueled.
    UNAVAILABLE = 4
  end

  # The state of a Task. This indicates the Tasks's progress.
  module State
    # Default. Used for an unspecified or unrecognized Task state.
    STATE_UNSPECIFIED = 0

    # Either the Task has not yet been assigned to a delivery vehicle, or the
    # delivery vehicle has not yet passed the `Task`'s assigned vehicle stop.
    OPEN = 1

    # When the vehicle passes the vehicle stop for this Task.
    CLOSED = 2
  end

  # The outcome of attempting to execute a Task. When `TaskState` is closed,
  # `TaskOutcome` indicates whether it was completed successfully.
  module TaskOutcome
    # The Task outcome before its value is set.
    TASK_OUTCOME_UNSPECIFIED = 0

    # The Task completed successfully.
    SUCCEEDED = 1

    # Either the Task couldn't be completed, or it was cancelled.
    FAILED = 2
  end

  # The identity of the source that populated the `task_outcome_location`.
  module TaskOutcomeLocationSource
    # The task outcome before it is set.
    TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED = 0

    # The provider-specified the `task_outcome_location`.
    PROVIDER = 2

    # The provider didn't specify the `task_outcome_location`, so Fleet Engine
    # used the last known vehicle location.
    LAST_VEHICLE_LOCATION = 3
  end
end

#planned_location::Google::Maps::FleetEngine::Delivery::V1::LocationInfo

Returns Immutable. The location where the Task will be completed. Optional for UNAVAILABLE Tasks, but required for all other Tasks.

Returns:



109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
# File 'proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb', line 109

class Task
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Journey sharing specific fields.
  # @!attribute [rw] remaining_vehicle_journey_segments
  #   @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::VehicleJourneySegment>]
  #     Tracking information for the stops that the assigned vehicle will make
  #     before it completes this Task. Note that this list can contain stops
  #     from other tasks.
  #
  #     The first segment,
  #     `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
  #     or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
  #     contains route information from the driver's last known location to the
  #     upcoming `VehicleStop`. Current route information usually comes from the
  #     driver app, except for some cases noted in the documentation for
  #     {::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle#current_route_segment DeliveryVehicle.current_route_segment}.
  #     The other segments in
  #     `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
  #     `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
  #     populated by Fleet Engine. They provide route information between the
  #     remaining `VehicleStops`.
  # @!attribute [rw] last_location
  #   @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocation]
  #     Indicates the vehicle's last reported location of the assigned vehicle.
  # @!attribute [rw] last_location_snappable
  #   @return [::Boolean]
  #     Indicates whether the vehicle's lastLocation can be snapped to
  #     the `current_route_segment`. This value is False if either
  #     `last_location` or `current_route_segment` don't exist. This value is
  #     computed by Fleet Engine. Updates from clients are ignored.
  class JourneySharingInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The type of Task.
  module Type
    # Default, the Task type is unknown.
    TYPE_UNSPECIFIED = 0

    # A pickup Task is the action taken for picking up a shipment from a
    # customer. Depot or feeder vehicle pickups should use the `SCHEDULED_STOP`
    # type.
    PICKUP = 1

    # A delivery Task is the action taken for delivering a shipment to an end
    # customer. Depot or feeder vehicle dropoffs should use the
    # `SCHEDULED_STOP` type.
    DELIVERY = 2

    # A scheduled stop Task is used for planning purposes. For example, it
    # could represent picking up or dropping off shipments from feeder vehicles
    # or depots. It shouldn't be used for any shipments that are picked up or
    # dropped off from an end customer.
    SCHEDULED_STOP = 3

    # A Task that means the Vehicle is not available for service. For example,
    # this can happen when the driver takes a break, or when the vehicle
    # is being refueled.
    UNAVAILABLE = 4
  end

  # The state of a Task. This indicates the Tasks's progress.
  module State
    # Default. Used for an unspecified or unrecognized Task state.
    STATE_UNSPECIFIED = 0

    # Either the Task has not yet been assigned to a delivery vehicle, or the
    # delivery vehicle has not yet passed the `Task`'s assigned vehicle stop.
    OPEN = 1

    # When the vehicle passes the vehicle stop for this Task.
    CLOSED = 2
  end

  # The outcome of attempting to execute a Task. When `TaskState` is closed,
  # `TaskOutcome` indicates whether it was completed successfully.
  module TaskOutcome
    # The Task outcome before its value is set.
    TASK_OUTCOME_UNSPECIFIED = 0

    # The Task completed successfully.
    SUCCEEDED = 1

    # Either the Task couldn't be completed, or it was cancelled.
    FAILED = 2
  end

  # The identity of the source that populated the `task_outcome_location`.
  module TaskOutcomeLocationSource
    # The task outcome before it is set.
    TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED = 0

    # The provider-specified the `task_outcome_location`.
    PROVIDER = 2

    # The provider didn't specify the `task_outcome_location`, so Fleet Engine
    # used the last known vehicle location.
    LAST_VEHICLE_LOCATION = 3
  end
end

#state::Google::Maps::FleetEngine::Delivery::V1::Task::State

Returns Required. The current execution state of the Task.

Returns:



109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
# File 'proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb', line 109

class Task
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Journey sharing specific fields.
  # @!attribute [rw] remaining_vehicle_journey_segments
  #   @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::VehicleJourneySegment>]
  #     Tracking information for the stops that the assigned vehicle will make
  #     before it completes this Task. Note that this list can contain stops
  #     from other tasks.
  #
  #     The first segment,
  #     `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
  #     or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
  #     contains route information from the driver's last known location to the
  #     upcoming `VehicleStop`. Current route information usually comes from the
  #     driver app, except for some cases noted in the documentation for
  #     {::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle#current_route_segment DeliveryVehicle.current_route_segment}.
  #     The other segments in
  #     `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
  #     `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
  #     populated by Fleet Engine. They provide route information between the
  #     remaining `VehicleStops`.
  # @!attribute [rw] last_location
  #   @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocation]
  #     Indicates the vehicle's last reported location of the assigned vehicle.
  # @!attribute [rw] last_location_snappable
  #   @return [::Boolean]
  #     Indicates whether the vehicle's lastLocation can be snapped to
  #     the `current_route_segment`. This value is False if either
  #     `last_location` or `current_route_segment` don't exist. This value is
  #     computed by Fleet Engine. Updates from clients are ignored.
  class JourneySharingInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The type of Task.
  module Type
    # Default, the Task type is unknown.
    TYPE_UNSPECIFIED = 0

    # A pickup Task is the action taken for picking up a shipment from a
    # customer. Depot or feeder vehicle pickups should use the `SCHEDULED_STOP`
    # type.
    PICKUP = 1

    # A delivery Task is the action taken for delivering a shipment to an end
    # customer. Depot or feeder vehicle dropoffs should use the
    # `SCHEDULED_STOP` type.
    DELIVERY = 2

    # A scheduled stop Task is used for planning purposes. For example, it
    # could represent picking up or dropping off shipments from feeder vehicles
    # or depots. It shouldn't be used for any shipments that are picked up or
    # dropped off from an end customer.
    SCHEDULED_STOP = 3

    # A Task that means the Vehicle is not available for service. For example,
    # this can happen when the driver takes a break, or when the vehicle
    # is being refueled.
    UNAVAILABLE = 4
  end

  # The state of a Task. This indicates the Tasks's progress.
  module State
    # Default. Used for an unspecified or unrecognized Task state.
    STATE_UNSPECIFIED = 0

    # Either the Task has not yet been assigned to a delivery vehicle, or the
    # delivery vehicle has not yet passed the `Task`'s assigned vehicle stop.
    OPEN = 1

    # When the vehicle passes the vehicle stop for this Task.
    CLOSED = 2
  end

  # The outcome of attempting to execute a Task. When `TaskState` is closed,
  # `TaskOutcome` indicates whether it was completed successfully.
  module TaskOutcome
    # The Task outcome before its value is set.
    TASK_OUTCOME_UNSPECIFIED = 0

    # The Task completed successfully.
    SUCCEEDED = 1

    # Either the Task couldn't be completed, or it was cancelled.
    FAILED = 2
  end

  # The identity of the source that populated the `task_outcome_location`.
  module TaskOutcomeLocationSource
    # The task outcome before it is set.
    TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED = 0

    # The provider-specified the `task_outcome_location`.
    PROVIDER = 2

    # The provider didn't specify the `task_outcome_location`, so Fleet Engine
    # used the last known vehicle location.
    LAST_VEHICLE_LOCATION = 3
  end
end

#target_time_window::Google::Maps::FleetEngine::Delivery::V1::TimeWindow

Returns The time window during which the task should be completed.

Returns:



109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
# File 'proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb', line 109

class Task
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Journey sharing specific fields.
  # @!attribute [rw] remaining_vehicle_journey_segments
  #   @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::VehicleJourneySegment>]
  #     Tracking information for the stops that the assigned vehicle will make
  #     before it completes this Task. Note that this list can contain stops
  #     from other tasks.
  #
  #     The first segment,
  #     `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
  #     or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
  #     contains route information from the driver's last known location to the
  #     upcoming `VehicleStop`. Current route information usually comes from the
  #     driver app, except for some cases noted in the documentation for
  #     {::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle#current_route_segment DeliveryVehicle.current_route_segment}.
  #     The other segments in
  #     `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
  #     `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
  #     populated by Fleet Engine. They provide route information between the
  #     remaining `VehicleStops`.
  # @!attribute [rw] last_location
  #   @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocation]
  #     Indicates the vehicle's last reported location of the assigned vehicle.
  # @!attribute [rw] last_location_snappable
  #   @return [::Boolean]
  #     Indicates whether the vehicle's lastLocation can be snapped to
  #     the `current_route_segment`. This value is False if either
  #     `last_location` or `current_route_segment` don't exist. This value is
  #     computed by Fleet Engine. Updates from clients are ignored.
  class JourneySharingInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The type of Task.
  module Type
    # Default, the Task type is unknown.
    TYPE_UNSPECIFIED = 0

    # A pickup Task is the action taken for picking up a shipment from a
    # customer. Depot or feeder vehicle pickups should use the `SCHEDULED_STOP`
    # type.
    PICKUP = 1

    # A delivery Task is the action taken for delivering a shipment to an end
    # customer. Depot or feeder vehicle dropoffs should use the
    # `SCHEDULED_STOP` type.
    DELIVERY = 2

    # A scheduled stop Task is used for planning purposes. For example, it
    # could represent picking up or dropping off shipments from feeder vehicles
    # or depots. It shouldn't be used for any shipments that are picked up or
    # dropped off from an end customer.
    SCHEDULED_STOP = 3

    # A Task that means the Vehicle is not available for service. For example,
    # this can happen when the driver takes a break, or when the vehicle
    # is being refueled.
    UNAVAILABLE = 4
  end

  # The state of a Task. This indicates the Tasks's progress.
  module State
    # Default. Used for an unspecified or unrecognized Task state.
    STATE_UNSPECIFIED = 0

    # Either the Task has not yet been assigned to a delivery vehicle, or the
    # delivery vehicle has not yet passed the `Task`'s assigned vehicle stop.
    OPEN = 1

    # When the vehicle passes the vehicle stop for this Task.
    CLOSED = 2
  end

  # The outcome of attempting to execute a Task. When `TaskState` is closed,
  # `TaskOutcome` indicates whether it was completed successfully.
  module TaskOutcome
    # The Task outcome before its value is set.
    TASK_OUTCOME_UNSPECIFIED = 0

    # The Task completed successfully.
    SUCCEEDED = 1

    # Either the Task couldn't be completed, or it was cancelled.
    FAILED = 2
  end

  # The identity of the source that populated the `task_outcome_location`.
  module TaskOutcomeLocationSource
    # The task outcome before it is set.
    TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED = 0

    # The provider-specified the `task_outcome_location`.
    PROVIDER = 2

    # The provider didn't specify the `task_outcome_location`, so Fleet Engine
    # used the last known vehicle location.
    LAST_VEHICLE_LOCATION = 3
  end
end

#task_duration::Google::Protobuf::Duration

Returns Required. Immutable. The time needed to execute a Task at this location.

Returns:



109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
# File 'proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb', line 109

class Task
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Journey sharing specific fields.
  # @!attribute [rw] remaining_vehicle_journey_segments
  #   @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::VehicleJourneySegment>]
  #     Tracking information for the stops that the assigned vehicle will make
  #     before it completes this Task. Note that this list can contain stops
  #     from other tasks.
  #
  #     The first segment,
  #     `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
  #     or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
  #     contains route information from the driver's last known location to the
  #     upcoming `VehicleStop`. Current route information usually comes from the
  #     driver app, except for some cases noted in the documentation for
  #     {::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle#current_route_segment DeliveryVehicle.current_route_segment}.
  #     The other segments in
  #     `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
  #     `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
  #     populated by Fleet Engine. They provide route information between the
  #     remaining `VehicleStops`.
  # @!attribute [rw] last_location
  #   @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocation]
  #     Indicates the vehicle's last reported location of the assigned vehicle.
  # @!attribute [rw] last_location_snappable
  #   @return [::Boolean]
  #     Indicates whether the vehicle's lastLocation can be snapped to
  #     the `current_route_segment`. This value is False if either
  #     `last_location` or `current_route_segment` don't exist. This value is
  #     computed by Fleet Engine. Updates from clients are ignored.
  class JourneySharingInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The type of Task.
  module Type
    # Default, the Task type is unknown.
    TYPE_UNSPECIFIED = 0

    # A pickup Task is the action taken for picking up a shipment from a
    # customer. Depot or feeder vehicle pickups should use the `SCHEDULED_STOP`
    # type.
    PICKUP = 1

    # A delivery Task is the action taken for delivering a shipment to an end
    # customer. Depot or feeder vehicle dropoffs should use the
    # `SCHEDULED_STOP` type.
    DELIVERY = 2

    # A scheduled stop Task is used for planning purposes. For example, it
    # could represent picking up or dropping off shipments from feeder vehicles
    # or depots. It shouldn't be used for any shipments that are picked up or
    # dropped off from an end customer.
    SCHEDULED_STOP = 3

    # A Task that means the Vehicle is not available for service. For example,
    # this can happen when the driver takes a break, or when the vehicle
    # is being refueled.
    UNAVAILABLE = 4
  end

  # The state of a Task. This indicates the Tasks's progress.
  module State
    # Default. Used for an unspecified or unrecognized Task state.
    STATE_UNSPECIFIED = 0

    # Either the Task has not yet been assigned to a delivery vehicle, or the
    # delivery vehicle has not yet passed the `Task`'s assigned vehicle stop.
    OPEN = 1

    # When the vehicle passes the vehicle stop for this Task.
    CLOSED = 2
  end

  # The outcome of attempting to execute a Task. When `TaskState` is closed,
  # `TaskOutcome` indicates whether it was completed successfully.
  module TaskOutcome
    # The Task outcome before its value is set.
    TASK_OUTCOME_UNSPECIFIED = 0

    # The Task completed successfully.
    SUCCEEDED = 1

    # Either the Task couldn't be completed, or it was cancelled.
    FAILED = 2
  end

  # The identity of the source that populated the `task_outcome_location`.
  module TaskOutcomeLocationSource
    # The task outcome before it is set.
    TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED = 0

    # The provider-specified the `task_outcome_location`.
    PROVIDER = 2

    # The provider didn't specify the `task_outcome_location`, so Fleet Engine
    # used the last known vehicle location.
    LAST_VEHICLE_LOCATION = 3
  end
end

#task_outcome::Google::Maps::FleetEngine::Delivery::V1::Task::TaskOutcome

Returns The outcome of the Task.

Returns:



109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
# File 'proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb', line 109

class Task
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Journey sharing specific fields.
  # @!attribute [rw] remaining_vehicle_journey_segments
  #   @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::VehicleJourneySegment>]
  #     Tracking information for the stops that the assigned vehicle will make
  #     before it completes this Task. Note that this list can contain stops
  #     from other tasks.
  #
  #     The first segment,
  #     `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
  #     or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
  #     contains route information from the driver's last known location to the
  #     upcoming `VehicleStop`. Current route information usually comes from the
  #     driver app, except for some cases noted in the documentation for
  #     {::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle#current_route_segment DeliveryVehicle.current_route_segment}.
  #     The other segments in
  #     `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
  #     `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
  #     populated by Fleet Engine. They provide route information between the
  #     remaining `VehicleStops`.
  # @!attribute [rw] last_location
  #   @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocation]
  #     Indicates the vehicle's last reported location of the assigned vehicle.
  # @!attribute [rw] last_location_snappable
  #   @return [::Boolean]
  #     Indicates whether the vehicle's lastLocation can be snapped to
  #     the `current_route_segment`. This value is False if either
  #     `last_location` or `current_route_segment` don't exist. This value is
  #     computed by Fleet Engine. Updates from clients are ignored.
  class JourneySharingInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The type of Task.
  module Type
    # Default, the Task type is unknown.
    TYPE_UNSPECIFIED = 0

    # A pickup Task is the action taken for picking up a shipment from a
    # customer. Depot or feeder vehicle pickups should use the `SCHEDULED_STOP`
    # type.
    PICKUP = 1

    # A delivery Task is the action taken for delivering a shipment to an end
    # customer. Depot or feeder vehicle dropoffs should use the
    # `SCHEDULED_STOP` type.
    DELIVERY = 2

    # A scheduled stop Task is used for planning purposes. For example, it
    # could represent picking up or dropping off shipments from feeder vehicles
    # or depots. It shouldn't be used for any shipments that are picked up or
    # dropped off from an end customer.
    SCHEDULED_STOP = 3

    # A Task that means the Vehicle is not available for service. For example,
    # this can happen when the driver takes a break, or when the vehicle
    # is being refueled.
    UNAVAILABLE = 4
  end

  # The state of a Task. This indicates the Tasks's progress.
  module State
    # Default. Used for an unspecified or unrecognized Task state.
    STATE_UNSPECIFIED = 0

    # Either the Task has not yet been assigned to a delivery vehicle, or the
    # delivery vehicle has not yet passed the `Task`'s assigned vehicle stop.
    OPEN = 1

    # When the vehicle passes the vehicle stop for this Task.
    CLOSED = 2
  end

  # The outcome of attempting to execute a Task. When `TaskState` is closed,
  # `TaskOutcome` indicates whether it was completed successfully.
  module TaskOutcome
    # The Task outcome before its value is set.
    TASK_OUTCOME_UNSPECIFIED = 0

    # The Task completed successfully.
    SUCCEEDED = 1

    # Either the Task couldn't be completed, or it was cancelled.
    FAILED = 2
  end

  # The identity of the source that populated the `task_outcome_location`.
  module TaskOutcomeLocationSource
    # The task outcome before it is set.
    TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED = 0

    # The provider-specified the `task_outcome_location`.
    PROVIDER = 2

    # The provider didn't specify the `task_outcome_location`, so Fleet Engine
    # used the last known vehicle location.
    LAST_VEHICLE_LOCATION = 3
  end
end

#task_outcome_location::Google::Maps::FleetEngine::Delivery::V1::LocationInfo

Returns The location where the Task's outcome was set. This value is updated as part of UpdateTask. If this value isn't explicitly updated by the provider, then Fleet Engine populates it by default with the last known vehicle location (the raw location).

Returns:

  • (::Google::Maps::FleetEngine::Delivery::V1::LocationInfo)

    The location where the Task's outcome was set. This value is updated as part of UpdateTask. If this value isn't explicitly updated by the provider, then Fleet Engine populates it by default with the last known vehicle location (the raw location).



109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
# File 'proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb', line 109

class Task
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Journey sharing specific fields.
  # @!attribute [rw] remaining_vehicle_journey_segments
  #   @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::VehicleJourneySegment>]
  #     Tracking information for the stops that the assigned vehicle will make
  #     before it completes this Task. Note that this list can contain stops
  #     from other tasks.
  #
  #     The first segment,
  #     `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
  #     or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
  #     contains route information from the driver's last known location to the
  #     upcoming `VehicleStop`. Current route information usually comes from the
  #     driver app, except for some cases noted in the documentation for
  #     {::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle#current_route_segment DeliveryVehicle.current_route_segment}.
  #     The other segments in
  #     `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
  #     `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
  #     populated by Fleet Engine. They provide route information between the
  #     remaining `VehicleStops`.
  # @!attribute [rw] last_location
  #   @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocation]
  #     Indicates the vehicle's last reported location of the assigned vehicle.
  # @!attribute [rw] last_location_snappable
  #   @return [::Boolean]
  #     Indicates whether the vehicle's lastLocation can be snapped to
  #     the `current_route_segment`. This value is False if either
  #     `last_location` or `current_route_segment` don't exist. This value is
  #     computed by Fleet Engine. Updates from clients are ignored.
  class JourneySharingInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The type of Task.
  module Type
    # Default, the Task type is unknown.
    TYPE_UNSPECIFIED = 0

    # A pickup Task is the action taken for picking up a shipment from a
    # customer. Depot or feeder vehicle pickups should use the `SCHEDULED_STOP`
    # type.
    PICKUP = 1

    # A delivery Task is the action taken for delivering a shipment to an end
    # customer. Depot or feeder vehicle dropoffs should use the
    # `SCHEDULED_STOP` type.
    DELIVERY = 2

    # A scheduled stop Task is used for planning purposes. For example, it
    # could represent picking up or dropping off shipments from feeder vehicles
    # or depots. It shouldn't be used for any shipments that are picked up or
    # dropped off from an end customer.
    SCHEDULED_STOP = 3

    # A Task that means the Vehicle is not available for service. For example,
    # this can happen when the driver takes a break, or when the vehicle
    # is being refueled.
    UNAVAILABLE = 4
  end

  # The state of a Task. This indicates the Tasks's progress.
  module State
    # Default. Used for an unspecified or unrecognized Task state.
    STATE_UNSPECIFIED = 0

    # Either the Task has not yet been assigned to a delivery vehicle, or the
    # delivery vehicle has not yet passed the `Task`'s assigned vehicle stop.
    OPEN = 1

    # When the vehicle passes the vehicle stop for this Task.
    CLOSED = 2
  end

  # The outcome of attempting to execute a Task. When `TaskState` is closed,
  # `TaskOutcome` indicates whether it was completed successfully.
  module TaskOutcome
    # The Task outcome before its value is set.
    TASK_OUTCOME_UNSPECIFIED = 0

    # The Task completed successfully.
    SUCCEEDED = 1

    # Either the Task couldn't be completed, or it was cancelled.
    FAILED = 2
  end

  # The identity of the source that populated the `task_outcome_location`.
  module TaskOutcomeLocationSource
    # The task outcome before it is set.
    TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED = 0

    # The provider-specified the `task_outcome_location`.
    PROVIDER = 2

    # The provider didn't specify the `task_outcome_location`, so Fleet Engine
    # used the last known vehicle location.
    LAST_VEHICLE_LOCATION = 3
  end
end

#task_outcome_location_source::Google::Maps::FleetEngine::Delivery::V1::Task::TaskOutcomeLocationSource

Returns Indicates where the value of the task_outcome_location came from.

Returns:



109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
# File 'proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb', line 109

class Task
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Journey sharing specific fields.
  # @!attribute [rw] remaining_vehicle_journey_segments
  #   @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::VehicleJourneySegment>]
  #     Tracking information for the stops that the assigned vehicle will make
  #     before it completes this Task. Note that this list can contain stops
  #     from other tasks.
  #
  #     The first segment,
  #     `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
  #     or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
  #     contains route information from the driver's last known location to the
  #     upcoming `VehicleStop`. Current route information usually comes from the
  #     driver app, except for some cases noted in the documentation for
  #     {::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle#current_route_segment DeliveryVehicle.current_route_segment}.
  #     The other segments in
  #     `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
  #     `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
  #     populated by Fleet Engine. They provide route information between the
  #     remaining `VehicleStops`.
  # @!attribute [rw] last_location
  #   @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocation]
  #     Indicates the vehicle's last reported location of the assigned vehicle.
  # @!attribute [rw] last_location_snappable
  #   @return [::Boolean]
  #     Indicates whether the vehicle's lastLocation can be snapped to
  #     the `current_route_segment`. This value is False if either
  #     `last_location` or `current_route_segment` don't exist. This value is
  #     computed by Fleet Engine. Updates from clients are ignored.
  class JourneySharingInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The type of Task.
  module Type
    # Default, the Task type is unknown.
    TYPE_UNSPECIFIED = 0

    # A pickup Task is the action taken for picking up a shipment from a
    # customer. Depot or feeder vehicle pickups should use the `SCHEDULED_STOP`
    # type.
    PICKUP = 1

    # A delivery Task is the action taken for delivering a shipment to an end
    # customer. Depot or feeder vehicle dropoffs should use the
    # `SCHEDULED_STOP` type.
    DELIVERY = 2

    # A scheduled stop Task is used for planning purposes. For example, it
    # could represent picking up or dropping off shipments from feeder vehicles
    # or depots. It shouldn't be used for any shipments that are picked up or
    # dropped off from an end customer.
    SCHEDULED_STOP = 3

    # A Task that means the Vehicle is not available for service. For example,
    # this can happen when the driver takes a break, or when the vehicle
    # is being refueled.
    UNAVAILABLE = 4
  end

  # The state of a Task. This indicates the Tasks's progress.
  module State
    # Default. Used for an unspecified or unrecognized Task state.
    STATE_UNSPECIFIED = 0

    # Either the Task has not yet been assigned to a delivery vehicle, or the
    # delivery vehicle has not yet passed the `Task`'s assigned vehicle stop.
    OPEN = 1

    # When the vehicle passes the vehicle stop for this Task.
    CLOSED = 2
  end

  # The outcome of attempting to execute a Task. When `TaskState` is closed,
  # `TaskOutcome` indicates whether it was completed successfully.
  module TaskOutcome
    # The Task outcome before its value is set.
    TASK_OUTCOME_UNSPECIFIED = 0

    # The Task completed successfully.
    SUCCEEDED = 1

    # Either the Task couldn't be completed, or it was cancelled.
    FAILED = 2
  end

  # The identity of the source that populated the `task_outcome_location`.
  module TaskOutcomeLocationSource
    # The task outcome before it is set.
    TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED = 0

    # The provider-specified the `task_outcome_location`.
    PROVIDER = 2

    # The provider didn't specify the `task_outcome_location`, so Fleet Engine
    # used the last known vehicle location.
    LAST_VEHICLE_LOCATION = 3
  end
end

#task_outcome_time::Google::Protobuf::Timestamp

Returns The timestamp that indicates when the Task's outcome was set by the provider.

Returns:



109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
# File 'proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb', line 109

class Task
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Journey sharing specific fields.
  # @!attribute [rw] remaining_vehicle_journey_segments
  #   @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::VehicleJourneySegment>]
  #     Tracking information for the stops that the assigned vehicle will make
  #     before it completes this Task. Note that this list can contain stops
  #     from other tasks.
  #
  #     The first segment,
  #     `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
  #     or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
  #     contains route information from the driver's last known location to the
  #     upcoming `VehicleStop`. Current route information usually comes from the
  #     driver app, except for some cases noted in the documentation for
  #     {::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle#current_route_segment DeliveryVehicle.current_route_segment}.
  #     The other segments in
  #     `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
  #     `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
  #     populated by Fleet Engine. They provide route information between the
  #     remaining `VehicleStops`.
  # @!attribute [rw] last_location
  #   @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocation]
  #     Indicates the vehicle's last reported location of the assigned vehicle.
  # @!attribute [rw] last_location_snappable
  #   @return [::Boolean]
  #     Indicates whether the vehicle's lastLocation can be snapped to
  #     the `current_route_segment`. This value is False if either
  #     `last_location` or `current_route_segment` don't exist. This value is
  #     computed by Fleet Engine. Updates from clients are ignored.
  class JourneySharingInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The type of Task.
  module Type
    # Default, the Task type is unknown.
    TYPE_UNSPECIFIED = 0

    # A pickup Task is the action taken for picking up a shipment from a
    # customer. Depot or feeder vehicle pickups should use the `SCHEDULED_STOP`
    # type.
    PICKUP = 1

    # A delivery Task is the action taken for delivering a shipment to an end
    # customer. Depot or feeder vehicle dropoffs should use the
    # `SCHEDULED_STOP` type.
    DELIVERY = 2

    # A scheduled stop Task is used for planning purposes. For example, it
    # could represent picking up or dropping off shipments from feeder vehicles
    # or depots. It shouldn't be used for any shipments that are picked up or
    # dropped off from an end customer.
    SCHEDULED_STOP = 3

    # A Task that means the Vehicle is not available for service. For example,
    # this can happen when the driver takes a break, or when the vehicle
    # is being refueled.
    UNAVAILABLE = 4
  end

  # The state of a Task. This indicates the Tasks's progress.
  module State
    # Default. Used for an unspecified or unrecognized Task state.
    STATE_UNSPECIFIED = 0

    # Either the Task has not yet been assigned to a delivery vehicle, or the
    # delivery vehicle has not yet passed the `Task`'s assigned vehicle stop.
    OPEN = 1

    # When the vehicle passes the vehicle stop for this Task.
    CLOSED = 2
  end

  # The outcome of attempting to execute a Task. When `TaskState` is closed,
  # `TaskOutcome` indicates whether it was completed successfully.
  module TaskOutcome
    # The Task outcome before its value is set.
    TASK_OUTCOME_UNSPECIFIED = 0

    # The Task completed successfully.
    SUCCEEDED = 1

    # Either the Task couldn't be completed, or it was cancelled.
    FAILED = 2
  end

  # The identity of the source that populated the `task_outcome_location`.
  module TaskOutcomeLocationSource
    # The task outcome before it is set.
    TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED = 0

    # The provider-specified the `task_outcome_location`.
    PROVIDER = 2

    # The provider didn't specify the `task_outcome_location`, so Fleet Engine
    # used the last known vehicle location.
    LAST_VEHICLE_LOCATION = 3
  end
end

#task_tracking_view_config::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingViewConfig

Returns The configuration for task tracking that specifies which data elements are visible to the end users under what circumstances.

Returns:



109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
# File 'proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb', line 109

class Task
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Journey sharing specific fields.
  # @!attribute [rw] remaining_vehicle_journey_segments
  #   @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::VehicleJourneySegment>]
  #     Tracking information for the stops that the assigned vehicle will make
  #     before it completes this Task. Note that this list can contain stops
  #     from other tasks.
  #
  #     The first segment,
  #     `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
  #     or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
  #     contains route information from the driver's last known location to the
  #     upcoming `VehicleStop`. Current route information usually comes from the
  #     driver app, except for some cases noted in the documentation for
  #     {::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle#current_route_segment DeliveryVehicle.current_route_segment}.
  #     The other segments in
  #     `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
  #     `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
  #     populated by Fleet Engine. They provide route information between the
  #     remaining `VehicleStops`.
  # @!attribute [rw] last_location
  #   @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocation]
  #     Indicates the vehicle's last reported location of the assigned vehicle.
  # @!attribute [rw] last_location_snappable
  #   @return [::Boolean]
  #     Indicates whether the vehicle's lastLocation can be snapped to
  #     the `current_route_segment`. This value is False if either
  #     `last_location` or `current_route_segment` don't exist. This value is
  #     computed by Fleet Engine. Updates from clients are ignored.
  class JourneySharingInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The type of Task.
  module Type
    # Default, the Task type is unknown.
    TYPE_UNSPECIFIED = 0

    # A pickup Task is the action taken for picking up a shipment from a
    # customer. Depot or feeder vehicle pickups should use the `SCHEDULED_STOP`
    # type.
    PICKUP = 1

    # A delivery Task is the action taken for delivering a shipment to an end
    # customer. Depot or feeder vehicle dropoffs should use the
    # `SCHEDULED_STOP` type.
    DELIVERY = 2

    # A scheduled stop Task is used for planning purposes. For example, it
    # could represent picking up or dropping off shipments from feeder vehicles
    # or depots. It shouldn't be used for any shipments that are picked up or
    # dropped off from an end customer.
    SCHEDULED_STOP = 3

    # A Task that means the Vehicle is not available for service. For example,
    # this can happen when the driver takes a break, or when the vehicle
    # is being refueled.
    UNAVAILABLE = 4
  end

  # The state of a Task. This indicates the Tasks's progress.
  module State
    # Default. Used for an unspecified or unrecognized Task state.
    STATE_UNSPECIFIED = 0

    # Either the Task has not yet been assigned to a delivery vehicle, or the
    # delivery vehicle has not yet passed the `Task`'s assigned vehicle stop.
    OPEN = 1

    # When the vehicle passes the vehicle stop for this Task.
    CLOSED = 2
  end

  # The outcome of attempting to execute a Task. When `TaskState` is closed,
  # `TaskOutcome` indicates whether it was completed successfully.
  module TaskOutcome
    # The Task outcome before its value is set.
    TASK_OUTCOME_UNSPECIFIED = 0

    # The Task completed successfully.
    SUCCEEDED = 1

    # Either the Task couldn't be completed, or it was cancelled.
    FAILED = 2
  end

  # The identity of the source that populated the `task_outcome_location`.
  module TaskOutcomeLocationSource
    # The task outcome before it is set.
    TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED = 0

    # The provider-specified the `task_outcome_location`.
    PROVIDER = 2

    # The provider didn't specify the `task_outcome_location`, so Fleet Engine
    # used the last known vehicle location.
    LAST_VEHICLE_LOCATION = 3
  end
end

#tracking_id::String

Returns Immutable. This field facilitates the storing of an ID so you can avoid using a complicated mapping. You cannot set tracking_id for Tasks of type UNAVAILABLE and SCHEDULED_STOP. These 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 '#'.

Returns:

  • (::String)

    Immutable. This field facilitates the storing of an ID so you can avoid using a complicated mapping. You cannot set tracking_id for Tasks of type UNAVAILABLE and SCHEDULED_STOP. These 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 '#'.


109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
# File 'proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb', line 109

class Task
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Journey sharing specific fields.
  # @!attribute [rw] remaining_vehicle_journey_segments
  #   @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::VehicleJourneySegment>]
  #     Tracking information for the stops that the assigned vehicle will make
  #     before it completes this Task. Note that this list can contain stops
  #     from other tasks.
  #
  #     The first segment,
  #     `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
  #     or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
  #     contains route information from the driver's last known location to the
  #     upcoming `VehicleStop`. Current route information usually comes from the
  #     driver app, except for some cases noted in the documentation for
  #     {::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle#current_route_segment DeliveryVehicle.current_route_segment}.
  #     The other segments in
  #     `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
  #     `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
  #     populated by Fleet Engine. They provide route information between the
  #     remaining `VehicleStops`.
  # @!attribute [rw] last_location
  #   @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocation]
  #     Indicates the vehicle's last reported location of the assigned vehicle.
  # @!attribute [rw] last_location_snappable
  #   @return [::Boolean]
  #     Indicates whether the vehicle's lastLocation can be snapped to
  #     the `current_route_segment`. This value is False if either
  #     `last_location` or `current_route_segment` don't exist. This value is
  #     computed by Fleet Engine. Updates from clients are ignored.
  class JourneySharingInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The type of Task.
  module Type
    # Default, the Task type is unknown.
    TYPE_UNSPECIFIED = 0

    # A pickup Task is the action taken for picking up a shipment from a
    # customer. Depot or feeder vehicle pickups should use the `SCHEDULED_STOP`
    # type.
    PICKUP = 1

    # A delivery Task is the action taken for delivering a shipment to an end
    # customer. Depot or feeder vehicle dropoffs should use the
    # `SCHEDULED_STOP` type.
    DELIVERY = 2

    # A scheduled stop Task is used for planning purposes. For example, it
    # could represent picking up or dropping off shipments from feeder vehicles
    # or depots. It shouldn't be used for any shipments that are picked up or
    # dropped off from an end customer.
    SCHEDULED_STOP = 3

    # A Task that means the Vehicle is not available for service. For example,
    # this can happen when the driver takes a break, or when the vehicle
    # is being refueled.
    UNAVAILABLE = 4
  end

  # The state of a Task. This indicates the Tasks's progress.
  module State
    # Default. Used for an unspecified or unrecognized Task state.
    STATE_UNSPECIFIED = 0

    # Either the Task has not yet been assigned to a delivery vehicle, or the
    # delivery vehicle has not yet passed the `Task`'s assigned vehicle stop.
    OPEN = 1

    # When the vehicle passes the vehicle stop for this Task.
    CLOSED = 2
  end

  # The outcome of attempting to execute a Task. When `TaskState` is closed,
  # `TaskOutcome` indicates whether it was completed successfully.
  module TaskOutcome
    # The Task outcome before its value is set.
    TASK_OUTCOME_UNSPECIFIED = 0

    # The Task completed successfully.
    SUCCEEDED = 1

    # Either the Task couldn't be completed, or it was cancelled.
    FAILED = 2
  end

  # The identity of the source that populated the `task_outcome_location`.
  module TaskOutcomeLocationSource
    # The task outcome before it is set.
    TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED = 0

    # The provider-specified the `task_outcome_location`.
    PROVIDER = 2

    # The provider didn't specify the `task_outcome_location`, so Fleet Engine
    # used the last known vehicle location.
    LAST_VEHICLE_LOCATION = 3
  end
end

#type::Google::Maps::FleetEngine::Delivery::V1::Task::Type

Returns Required. Immutable. Defines the type of the Task. For example, a break or shipment.

Returns:



109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
# File 'proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb', line 109

class Task
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Journey sharing specific fields.
  # @!attribute [rw] remaining_vehicle_journey_segments
  #   @return [::Array<::Google::Maps::FleetEngine::Delivery::V1::VehicleJourneySegment>]
  #     Tracking information for the stops that the assigned vehicle will make
  #     before it completes this Task. Note that this list can contain stops
  #     from other tasks.
  #
  #     The first segment,
  #     `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
  #     or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
  #     contains route information from the driver's last known location to the
  #     upcoming `VehicleStop`. Current route information usually comes from the
  #     driver app, except for some cases noted in the documentation for
  #     {::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle#current_route_segment DeliveryVehicle.current_route_segment}.
  #     The other segments in
  #     `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
  #     `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
  #     populated by Fleet Engine. They provide route information between the
  #     remaining `VehicleStops`.
  # @!attribute [rw] last_location
  #   @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicleLocation]
  #     Indicates the vehicle's last reported location of the assigned vehicle.
  # @!attribute [rw] last_location_snappable
  #   @return [::Boolean]
  #     Indicates whether the vehicle's lastLocation can be snapped to
  #     the `current_route_segment`. This value is False if either
  #     `last_location` or `current_route_segment` don't exist. This value is
  #     computed by Fleet Engine. Updates from clients are ignored.
  class JourneySharingInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The type of Task.
  module Type
    # Default, the Task type is unknown.
    TYPE_UNSPECIFIED = 0

    # A pickup Task is the action taken for picking up a shipment from a
    # customer. Depot or feeder vehicle pickups should use the `SCHEDULED_STOP`
    # type.
    PICKUP = 1

    # A delivery Task is the action taken for delivering a shipment to an end
    # customer. Depot or feeder vehicle dropoffs should use the
    # `SCHEDULED_STOP` type.
    DELIVERY = 2

    # A scheduled stop Task is used for planning purposes. For example, it
    # could represent picking up or dropping off shipments from feeder vehicles
    # or depots. It shouldn't be used for any shipments that are picked up or
    # dropped off from an end customer.
    SCHEDULED_STOP = 3

    # A Task that means the Vehicle is not available for service. For example,
    # this can happen when the driver takes a break, or when the vehicle
    # is being refueled.
    UNAVAILABLE = 4
  end

  # The state of a Task. This indicates the Tasks's progress.
  module State
    # Default. Used for an unspecified or unrecognized Task state.
    STATE_UNSPECIFIED = 0

    # Either the Task has not yet been assigned to a delivery vehicle, or the
    # delivery vehicle has not yet passed the `Task`'s assigned vehicle stop.
    OPEN = 1

    # When the vehicle passes the vehicle stop for this Task.
    CLOSED = 2
  end

  # The outcome of attempting to execute a Task. When `TaskState` is closed,
  # `TaskOutcome` indicates whether it was completed successfully.
  module TaskOutcome
    # The Task outcome before its value is set.
    TASK_OUTCOME_UNSPECIFIED = 0

    # The Task completed successfully.
    SUCCEEDED = 1

    # Either the Task couldn't be completed, or it was cancelled.
    FAILED = 2
  end

  # The identity of the source that populated the `task_outcome_location`.
  module TaskOutcomeLocationSource
    # The task outcome before it is set.
    TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED = 0

    # The provider-specified the `task_outcome_location`.
    PROVIDER = 2

    # The provider didn't specify the `task_outcome_location`, so Fleet Engine
    # used the last known vehicle location.
    LAST_VEHICLE_LOCATION = 3
  end
end