Class Shipment.VisitRequest.Builder (1.52.0)

public static final class Shipment.VisitRequest.Builder extends GeneratedMessageV3.Builder<Shipment.VisitRequest.Builder> implements Shipment.VisitRequestOrBuilder

Request for a visit which can be done by a vehicle: it has a geo-location (or two, see below), opening and closing times represented by time windows, and a service duration time (time spent by the vehicle once it has arrived to pickup or drop off goods).

Protobuf type google.cloud.optimization.v1.Shipment.VisitRequest

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllDemands(Iterable<? extends CapacityQuantity> values) (deprecated)

public Shipment.VisitRequest.Builder addAllDemands(Iterable<? extends CapacityQuantity> values)

Deprecated: Use VisitRequest.load_demands instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 9 [deprecated = true];

Parameter
Name Description
values Iterable<? extends com.google.cloud.optimization.v1.CapacityQuantity>
Returns
Type Description
Shipment.VisitRequest.Builder

addAllTags(Iterable<String> values)

public Shipment.VisitRequest.Builder addAllTags(Iterable<String> values)

Specifies tags attached to the visit request. Empty or duplicate strings are not allowed.

repeated string tags = 5;

Parameter
Name Description
values Iterable<String>

The tags to add.

Returns
Type Description
Shipment.VisitRequest.Builder

This builder for chaining.

addAllTimeWindows(Iterable<? extends TimeWindow> values)

public Shipment.VisitRequest.Builder addAllTimeWindows(Iterable<? extends TimeWindow> values)

Time windows which constrain the arrival time at a visit. Note that a vehicle may depart outside of the arrival time window, i.e. arrival time + duration do not need to be inside a time window. This can result in waiting time if the vehicle arrives before TimeWindow.start_time.

The absence of TimeWindow means that the vehicle can perform this visit at any time.

Time windows must be disjoint, i.e. no time window must overlap with or be adjacent to another, and they must be in increasing order.

cost_per_hour_after_soft_end_time and soft_end_time can only be set if there is a single time window.

repeated .google.cloud.optimization.v1.TimeWindow time_windows = 6;

Parameter
Name Description
values Iterable<? extends com.google.cloud.optimization.v1.TimeWindow>
Returns
Type Description
Shipment.VisitRequest.Builder

addAllVisitTypes(Iterable<String> values)

public Shipment.VisitRequest.Builder addAllVisitTypes(Iterable<String> values)

Specifies the types of the visit. This may be used to allocate additional time required for a vehicle to complete this visit (see Vehicle.extra_visit_duration_for_visit_type).

A type can only appear once.

repeated string visit_types = 10;

Parameter
Name Description
values Iterable<String>

The visitTypes to add.

Returns
Type Description
Shipment.VisitRequest.Builder

This builder for chaining.

addDemands(CapacityQuantity value) (deprecated)

public Shipment.VisitRequest.Builder addDemands(CapacityQuantity value)

Deprecated: Use VisitRequest.load_demands instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 9 [deprecated = true];

Parameter
Name Description
value CapacityQuantity
Returns
Type Description
Shipment.VisitRequest.Builder

addDemands(CapacityQuantity.Builder builderForValue) (deprecated)

public Shipment.VisitRequest.Builder addDemands(CapacityQuantity.Builder builderForValue)

Deprecated: Use VisitRequest.load_demands instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 9 [deprecated = true];

Parameter
Name Description
builderForValue CapacityQuantity.Builder
Returns
Type Description
Shipment.VisitRequest.Builder

addDemands(int index, CapacityQuantity value) (deprecated)

public Shipment.VisitRequest.Builder addDemands(int index, CapacityQuantity value)

Deprecated: Use VisitRequest.load_demands instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 9 [deprecated = true];

Parameters
Name Description
index int
value CapacityQuantity
Returns
Type Description
Shipment.VisitRequest.Builder

addDemands(int index, CapacityQuantity.Builder builderForValue) (deprecated)

public Shipment.VisitRequest.Builder addDemands(int index, CapacityQuantity.Builder builderForValue)

Deprecated: Use VisitRequest.load_demands instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 9 [deprecated = true];

Parameters
Name Description
index int
builderForValue CapacityQuantity.Builder
Returns
Type Description
Shipment.VisitRequest.Builder

addDemandsBuilder() (deprecated)

public CapacityQuantity.Builder addDemandsBuilder()

Deprecated: Use VisitRequest.load_demands instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 9 [deprecated = true];

Returns
Type Description
CapacityQuantity.Builder

addDemandsBuilder(int index) (deprecated)

public CapacityQuantity.Builder addDemandsBuilder(int index)

Deprecated: Use VisitRequest.load_demands instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 9 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description
CapacityQuantity.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Shipment.VisitRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Shipment.VisitRequest.Builder
Overrides

addTags(String value)

public Shipment.VisitRequest.Builder addTags(String value)

Specifies tags attached to the visit request. Empty or duplicate strings are not allowed.

repeated string tags = 5;

Parameter
Name Description
value String

The tags to add.

Returns
Type Description
Shipment.VisitRequest.Builder

This builder for chaining.

addTagsBytes(ByteString value)

public Shipment.VisitRequest.Builder addTagsBytes(ByteString value)

Specifies tags attached to the visit request. Empty or duplicate strings are not allowed.

repeated string tags = 5;

Parameter
Name Description
value ByteString

The bytes of the tags to add.

Returns
Type Description
Shipment.VisitRequest.Builder

This builder for chaining.

addTimeWindows(TimeWindow value)

public Shipment.VisitRequest.Builder addTimeWindows(TimeWindow value)

Time windows which constrain the arrival time at a visit. Note that a vehicle may depart outside of the arrival time window, i.e. arrival time + duration do not need to be inside a time window. This can result in waiting time if the vehicle arrives before TimeWindow.start_time.

The absence of TimeWindow means that the vehicle can perform this visit at any time.

Time windows must be disjoint, i.e. no time window must overlap with or be adjacent to another, and they must be in increasing order.

cost_per_hour_after_soft_end_time and soft_end_time can only be set if there is a single time window.

repeated .google.cloud.optimization.v1.TimeWindow time_windows = 6;

Parameter
Name Description
value TimeWindow
Returns
Type Description
Shipment.VisitRequest.Builder

addTimeWindows(TimeWindow.Builder builderForValue)

public Shipment.VisitRequest.Builder addTimeWindows(TimeWindow.Builder builderForValue)

Time windows which constrain the arrival time at a visit. Note that a vehicle may depart outside of the arrival time window, i.e. arrival time + duration do not need to be inside a time window. This can result in waiting time if the vehicle arrives before TimeWindow.start_time.

The absence of TimeWindow means that the vehicle can perform this visit at any time.

Time windows must be disjoint, i.e. no time window must overlap with or be adjacent to another, and they must be in increasing order.

cost_per_hour_after_soft_end_time and soft_end_time can only be set if there is a single time window.

repeated .google.cloud.optimization.v1.TimeWindow time_windows = 6;

Parameter
Name Description
builderForValue TimeWindow.Builder
Returns
Type Description
Shipment.VisitRequest.Builder

addTimeWindows(int index, TimeWindow value)

public Shipment.VisitRequest.Builder addTimeWindows(int index, TimeWindow value)

Time windows which constrain the arrival time at a visit. Note that a vehicle may depart outside of the arrival time window, i.e. arrival time + duration do not need to be inside a time window. This can result in waiting time if the vehicle arrives before TimeWindow.start_time.

The absence of TimeWindow means that the vehicle can perform this visit at any time.

Time windows must be disjoint, i.e. no time window must overlap with or be adjacent to another, and they must be in increasing order.

cost_per_hour_after_soft_end_time and soft_end_time can only be set if there is a single time window.

repeated .google.cloud.optimization.v1.TimeWindow time_windows = 6;

Parameters
Name Description
index int
value TimeWindow
Returns
Type Description
Shipment.VisitRequest.Builder

addTimeWindows(int index, TimeWindow.Builder builderForValue)

public Shipment.VisitRequest.Builder addTimeWindows(int index, TimeWindow.Builder builderForValue)

Time windows which constrain the arrival time at a visit. Note that a vehicle may depart outside of the arrival time window, i.e. arrival time + duration do not need to be inside a time window. This can result in waiting time if the vehicle arrives before TimeWindow.start_time.

The absence of TimeWindow means that the vehicle can perform this visit at any time.

Time windows must be disjoint, i.e. no time window must overlap with or be adjacent to another, and they must be in increasing order.

cost_per_hour_after_soft_end_time and soft_end_time can only be set if there is a single time window.

repeated .google.cloud.optimization.v1.TimeWindow time_windows = 6;

Parameters
Name Description
index int
builderForValue TimeWindow.Builder
Returns
Type Description
Shipment.VisitRequest.Builder

addTimeWindowsBuilder()

public TimeWindow.Builder addTimeWindowsBuilder()

Time windows which constrain the arrival time at a visit. Note that a vehicle may depart outside of the arrival time window, i.e. arrival time + duration do not need to be inside a time window. This can result in waiting time if the vehicle arrives before TimeWindow.start_time.

The absence of TimeWindow means that the vehicle can perform this visit at any time.

Time windows must be disjoint, i.e. no time window must overlap with or be adjacent to another, and they must be in increasing order.

cost_per_hour_after_soft_end_time and soft_end_time can only be set if there is a single time window.

repeated .google.cloud.optimization.v1.TimeWindow time_windows = 6;

Returns
Type Description
TimeWindow.Builder

addTimeWindowsBuilder(int index)

public TimeWindow.Builder addTimeWindowsBuilder(int index)

Time windows which constrain the arrival time at a visit. Note that a vehicle may depart outside of the arrival time window, i.e. arrival time + duration do not need to be inside a time window. This can result in waiting time if the vehicle arrives before TimeWindow.start_time.

The absence of TimeWindow means that the vehicle can perform this visit at any time.

Time windows must be disjoint, i.e. no time window must overlap with or be adjacent to another, and they must be in increasing order.

cost_per_hour_after_soft_end_time and soft_end_time can only be set if there is a single time window.

repeated .google.cloud.optimization.v1.TimeWindow time_windows = 6;

Parameter
Name Description
index int
Returns
Type Description
TimeWindow.Builder

addVisitTypes(String value)

public Shipment.VisitRequest.Builder addVisitTypes(String value)

Specifies the types of the visit. This may be used to allocate additional time required for a vehicle to complete this visit (see Vehicle.extra_visit_duration_for_visit_type).

A type can only appear once.

repeated string visit_types = 10;

Parameter
Name Description
value String

The visitTypes to add.

Returns
Type Description
Shipment.VisitRequest.Builder

This builder for chaining.

addVisitTypesBytes(ByteString value)

public Shipment.VisitRequest.Builder addVisitTypesBytes(ByteString value)

Specifies the types of the visit. This may be used to allocate additional time required for a vehicle to complete this visit (see Vehicle.extra_visit_duration_for_visit_type).

A type can only appear once.

repeated string visit_types = 10;

Parameter
Name Description
value ByteString

The bytes of the visitTypes to add.

Returns
Type Description
Shipment.VisitRequest.Builder

This builder for chaining.

build()

public Shipment.VisitRequest build()
Returns
Type Description
Shipment.VisitRequest

buildPartial()

public Shipment.VisitRequest buildPartial()
Returns
Type Description
Shipment.VisitRequest

clear()

public Shipment.VisitRequest.Builder clear()
Returns
Type Description
Shipment.VisitRequest.Builder
Overrides

clearArrivalLocation()

public Shipment.VisitRequest.Builder clearArrivalLocation()

The geo-location where the vehicle arrives when performing this VisitRequest. If the shipment model has duration distance matrices, arrival_location must not be specified.

.google.type.LatLng arrival_location = 1;

Returns
Type Description
Shipment.VisitRequest.Builder

clearArrivalWaypoint()

public Shipment.VisitRequest.Builder clearArrivalWaypoint()

The waypoint where the vehicle arrives when performing this VisitRequest. If the shipment model has duration distance matrices, arrival_waypoint must not be specified.

.google.cloud.optimization.v1.Waypoint arrival_waypoint = 2;

Returns
Type Description
Shipment.VisitRequest.Builder

clearCost()

public Shipment.VisitRequest.Builder clearCost()

Cost to service this visit request on a vehicle route. This can be used to pay different costs for each alternative pickup or delivery of a shipment. This cost must be in the same unit as Shipment.penalty_cost and must not be negative.

double cost = 8;

Returns
Type Description
Shipment.VisitRequest.Builder

This builder for chaining.

clearDemands() (deprecated)

public Shipment.VisitRequest.Builder clearDemands()

Deprecated: Use VisitRequest.load_demands instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 9 [deprecated = true];

Returns
Type Description
Shipment.VisitRequest.Builder

clearDepartureLocation()

public Shipment.VisitRequest.Builder clearDepartureLocation()

The geo-location where the vehicle departs after completing this VisitRequest. Can be omitted if it is the same as arrival_location. If the shipment model has duration distance matrices, departure_location must not be specified.

.google.type.LatLng departure_location = 3;

Returns
Type Description
Shipment.VisitRequest.Builder

clearDepartureWaypoint()

public Shipment.VisitRequest.Builder clearDepartureWaypoint()

The waypoint where the vehicle departs after completing this VisitRequest. Can be omitted if it is the same as arrival_waypoint. If the shipment model has duration distance matrices, departure_waypoint must not be specified.

.google.cloud.optimization.v1.Waypoint departure_waypoint = 4;

Returns
Type Description
Shipment.VisitRequest.Builder

clearDuration()

public Shipment.VisitRequest.Builder clearDuration()

Duration of the visit, i.e. time spent by the vehicle between arrival and departure (to be added to the possible waiting time; see time_windows).

.google.protobuf.Duration duration = 7;

Returns
Type Description
Shipment.VisitRequest.Builder

clearField(Descriptors.FieldDescriptor field)

public Shipment.VisitRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Shipment.VisitRequest.Builder
Overrides

clearLabel()

public Shipment.VisitRequest.Builder clearLabel()

Specifies a label for this VisitRequest. This label is reported in the response as visit_label in the corresponding ShipmentRoute.Visit.

string label = 11;

Returns
Type Description
Shipment.VisitRequest.Builder

This builder for chaining.

clearLoadDemands()

public Shipment.VisitRequest.Builder clearLoadDemands()
Returns
Type Description
Shipment.VisitRequest.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public Shipment.VisitRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Shipment.VisitRequest.Builder
Overrides

clearTags()

public Shipment.VisitRequest.Builder clearTags()

Specifies tags attached to the visit request. Empty or duplicate strings are not allowed.

repeated string tags = 5;

Returns
Type Description
Shipment.VisitRequest.Builder

This builder for chaining.

clearTimeWindows()

public Shipment.VisitRequest.Builder clearTimeWindows()

Time windows which constrain the arrival time at a visit. Note that a vehicle may depart outside of the arrival time window, i.e. arrival time + duration do not need to be inside a time window. This can result in waiting time if the vehicle arrives before TimeWindow.start_time.

The absence of TimeWindow means that the vehicle can perform this visit at any time.

Time windows must be disjoint, i.e. no time window must overlap with or be adjacent to another, and they must be in increasing order.

cost_per_hour_after_soft_end_time and soft_end_time can only be set if there is a single time window.

repeated .google.cloud.optimization.v1.TimeWindow time_windows = 6;

Returns
Type Description
Shipment.VisitRequest.Builder

clearVisitTypes()

public Shipment.VisitRequest.Builder clearVisitTypes()

Specifies the types of the visit. This may be used to allocate additional time required for a vehicle to complete this visit (see Vehicle.extra_visit_duration_for_visit_type).

A type can only appear once.

repeated string visit_types = 10;

Returns
Type Description
Shipment.VisitRequest.Builder

This builder for chaining.

clone()

public Shipment.VisitRequest.Builder clone()
Returns
Type Description
Shipment.VisitRequest.Builder
Overrides

containsLoadDemands(String key)

public boolean containsLoadDemands(String key)

Load demands of this visit request. This is just like Shipment.load_demands field, except that it only applies to this VisitRequest instead of the whole Shipment. The demands listed here are added to the demands listed in Shipment.load_demands.

map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 12;

Parameter
Name Description
key String
Returns
Type Description
boolean

getArrivalLocation()

public LatLng getArrivalLocation()

The geo-location where the vehicle arrives when performing this VisitRequest. If the shipment model has duration distance matrices, arrival_location must not be specified.

.google.type.LatLng arrival_location = 1;

Returns
Type Description
com.google.type.LatLng

The arrivalLocation.

getArrivalLocationBuilder()

public LatLng.Builder getArrivalLocationBuilder()

The geo-location where the vehicle arrives when performing this VisitRequest. If the shipment model has duration distance matrices, arrival_location must not be specified.

.google.type.LatLng arrival_location = 1;

Returns
Type Description
com.google.type.LatLng.Builder

getArrivalLocationOrBuilder()

public LatLngOrBuilder getArrivalLocationOrBuilder()

The geo-location where the vehicle arrives when performing this VisitRequest. If the shipment model has duration distance matrices, arrival_location must not be specified.

.google.type.LatLng arrival_location = 1;

Returns
Type Description
com.google.type.LatLngOrBuilder

getArrivalWaypoint()

public Waypoint getArrivalWaypoint()

The waypoint where the vehicle arrives when performing this VisitRequest. If the shipment model has duration distance matrices, arrival_waypoint must not be specified.

.google.cloud.optimization.v1.Waypoint arrival_waypoint = 2;

Returns
Type Description
Waypoint

The arrivalWaypoint.

getArrivalWaypointBuilder()

public Waypoint.Builder getArrivalWaypointBuilder()

The waypoint where the vehicle arrives when performing this VisitRequest. If the shipment model has duration distance matrices, arrival_waypoint must not be specified.

.google.cloud.optimization.v1.Waypoint arrival_waypoint = 2;

Returns
Type Description
Waypoint.Builder

getArrivalWaypointOrBuilder()

public WaypointOrBuilder getArrivalWaypointOrBuilder()

The waypoint where the vehicle arrives when performing this VisitRequest. If the shipment model has duration distance matrices, arrival_waypoint must not be specified.

.google.cloud.optimization.v1.Waypoint arrival_waypoint = 2;

Returns
Type Description
WaypointOrBuilder

getCost()

public double getCost()

Cost to service this visit request on a vehicle route. This can be used to pay different costs for each alternative pickup or delivery of a shipment. This cost must be in the same unit as Shipment.penalty_cost and must not be negative.

double cost = 8;

Returns
Type Description
double

The cost.

getDefaultInstanceForType()

public Shipment.VisitRequest getDefaultInstanceForType()
Returns
Type Description
Shipment.VisitRequest

getDemands(int index) (deprecated)

public CapacityQuantity getDemands(int index)

Deprecated: Use VisitRequest.load_demands instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 9 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description
CapacityQuantity

getDemandsBuilder(int index) (deprecated)

public CapacityQuantity.Builder getDemandsBuilder(int index)

Deprecated: Use VisitRequest.load_demands instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 9 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description
CapacityQuantity.Builder

getDemandsBuilderList() (deprecated)

public List<CapacityQuantity.Builder> getDemandsBuilderList()

Deprecated: Use VisitRequest.load_demands instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 9 [deprecated = true];

Returns
Type Description
List<Builder>

getDemandsCount() (deprecated)

public int getDemandsCount()

Deprecated: Use VisitRequest.load_demands instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 9 [deprecated = true];

Returns
Type Description
int

getDemandsList() (deprecated)

public List<CapacityQuantity> getDemandsList()

Deprecated: Use VisitRequest.load_demands instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 9 [deprecated = true];

Returns
Type Description
List<CapacityQuantity>

getDemandsOrBuilder(int index) (deprecated)

public CapacityQuantityOrBuilder getDemandsOrBuilder(int index)

Deprecated: Use VisitRequest.load_demands instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 9 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description
CapacityQuantityOrBuilder

getDemandsOrBuilderList() (deprecated)

public List<? extends CapacityQuantityOrBuilder> getDemandsOrBuilderList()

Deprecated: Use VisitRequest.load_demands instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 9 [deprecated = true];

Returns
Type Description
List<? extends com.google.cloud.optimization.v1.CapacityQuantityOrBuilder>

getDepartureLocation()

public LatLng getDepartureLocation()

The geo-location where the vehicle departs after completing this VisitRequest. Can be omitted if it is the same as arrival_location. If the shipment model has duration distance matrices, departure_location must not be specified.

.google.type.LatLng departure_location = 3;

Returns
Type Description
com.google.type.LatLng

The departureLocation.

getDepartureLocationBuilder()

public LatLng.Builder getDepartureLocationBuilder()

The geo-location where the vehicle departs after completing this VisitRequest. Can be omitted if it is the same as arrival_location. If the shipment model has duration distance matrices, departure_location must not be specified.

.google.type.LatLng departure_location = 3;

Returns
Type Description
com.google.type.LatLng.Builder

getDepartureLocationOrBuilder()

public LatLngOrBuilder getDepartureLocationOrBuilder()

The geo-location where the vehicle departs after completing this VisitRequest. Can be omitted if it is the same as arrival_location. If the shipment model has duration distance matrices, departure_location must not be specified.

.google.type.LatLng departure_location = 3;

Returns
Type Description
com.google.type.LatLngOrBuilder

getDepartureWaypoint()

public Waypoint getDepartureWaypoint()

The waypoint where the vehicle departs after completing this VisitRequest. Can be omitted if it is the same as arrival_waypoint. If the shipment model has duration distance matrices, departure_waypoint must not be specified.

.google.cloud.optimization.v1.Waypoint departure_waypoint = 4;

Returns
Type Description
Waypoint

The departureWaypoint.

getDepartureWaypointBuilder()

public Waypoint.Builder getDepartureWaypointBuilder()

The waypoint where the vehicle departs after completing this VisitRequest. Can be omitted if it is the same as arrival_waypoint. If the shipment model has duration distance matrices, departure_waypoint must not be specified.

.google.cloud.optimization.v1.Waypoint departure_waypoint = 4;

Returns
Type Description
Waypoint.Builder

getDepartureWaypointOrBuilder()

public WaypointOrBuilder getDepartureWaypointOrBuilder()

The waypoint where the vehicle departs after completing this VisitRequest. Can be omitted if it is the same as arrival_waypoint. If the shipment model has duration distance matrices, departure_waypoint must not be specified.

.google.cloud.optimization.v1.Waypoint departure_waypoint = 4;

Returns
Type Description
WaypointOrBuilder

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDuration()

public Duration getDuration()

Duration of the visit, i.e. time spent by the vehicle between arrival and departure (to be added to the possible waiting time; see time_windows).

.google.protobuf.Duration duration = 7;

Returns
Type Description
Duration

The duration.

getDurationBuilder()

public Duration.Builder getDurationBuilder()

Duration of the visit, i.e. time spent by the vehicle between arrival and departure (to be added to the possible waiting time; see time_windows).

.google.protobuf.Duration duration = 7;

Returns
Type Description
Builder

getDurationOrBuilder()

public DurationOrBuilder getDurationOrBuilder()

Duration of the visit, i.e. time spent by the vehicle between arrival and departure (to be added to the possible waiting time; see time_windows).

.google.protobuf.Duration duration = 7;

Returns
Type Description
DurationOrBuilder

getLabel()

public String getLabel()

Specifies a label for this VisitRequest. This label is reported in the response as visit_label in the corresponding ShipmentRoute.Visit.

string label = 11;

Returns
Type Description
String

The label.

getLabelBytes()

public ByteString getLabelBytes()

Specifies a label for this VisitRequest. This label is reported in the response as visit_label in the corresponding ShipmentRoute.Visit.

string label = 11;

Returns
Type Description
ByteString

The bytes for label.

getLoadDemands() (deprecated)

public Map<String,Shipment.Load> getLoadDemands()

Use #getLoadDemandsMap() instead.

Returns
Type Description
Map<String,Load>

getLoadDemandsCount()

public int getLoadDemandsCount()

Load demands of this visit request. This is just like Shipment.load_demands field, except that it only applies to this VisitRequest instead of the whole Shipment. The demands listed here are added to the demands listed in Shipment.load_demands.

map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 12;

Returns
Type Description
int

getLoadDemandsMap()

public Map<String,Shipment.Load> getLoadDemandsMap()

Load demands of this visit request. This is just like Shipment.load_demands field, except that it only applies to this VisitRequest instead of the whole Shipment. The demands listed here are added to the demands listed in Shipment.load_demands.

map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 12;

Returns
Type Description
Map<String,Load>

getLoadDemandsOrDefault(String key, Shipment.Load defaultValue)

public Shipment.Load getLoadDemandsOrDefault(String key, Shipment.Load defaultValue)

Load demands of this visit request. This is just like Shipment.load_demands field, except that it only applies to this VisitRequest instead of the whole Shipment. The demands listed here are added to the demands listed in Shipment.load_demands.

map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 12;

Parameters
Name Description
key String
defaultValue Shipment.Load
Returns
Type Description
Shipment.Load

getLoadDemandsOrThrow(String key)

public Shipment.Load getLoadDemandsOrThrow(String key)

Load demands of this visit request. This is just like Shipment.load_demands field, except that it only applies to this VisitRequest instead of the whole Shipment. The demands listed here are added to the demands listed in Shipment.load_demands.

map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 12;

Parameter
Name Description
key String
Returns
Type Description
Shipment.Load

getMutableLoadDemands() (deprecated)

public Map<String,Shipment.Load> getMutableLoadDemands()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,Load>

getTags(int index)

public String getTags(int index)

Specifies tags attached to the visit request. Empty or duplicate strings are not allowed.

repeated string tags = 5;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The tags at the given index.

getTagsBytes(int index)

public ByteString getTagsBytes(int index)

Specifies tags attached to the visit request. Empty or duplicate strings are not allowed.

repeated string tags = 5;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the tags at the given index.

getTagsCount()

public int getTagsCount()

Specifies tags attached to the visit request. Empty or duplicate strings are not allowed.

repeated string tags = 5;

Returns
Type Description
int

The count of tags.

getTagsList()

public ProtocolStringList getTagsList()

Specifies tags attached to the visit request. Empty or duplicate strings are not allowed.

repeated string tags = 5;

Returns
Type Description
ProtocolStringList

A list containing the tags.

getTimeWindows(int index)

public TimeWindow getTimeWindows(int index)

Time windows which constrain the arrival time at a visit. Note that a vehicle may depart outside of the arrival time window, i.e. arrival time + duration do not need to be inside a time window. This can result in waiting time if the vehicle arrives before TimeWindow.start_time.

The absence of TimeWindow means that the vehicle can perform this visit at any time.

Time windows must be disjoint, i.e. no time window must overlap with or be adjacent to another, and they must be in increasing order.

cost_per_hour_after_soft_end_time and soft_end_time can only be set if there is a single time window.

repeated .google.cloud.optimization.v1.TimeWindow time_windows = 6;

Parameter
Name Description
index int
Returns
Type Description
TimeWindow

getTimeWindowsBuilder(int index)

public TimeWindow.Builder getTimeWindowsBuilder(int index)

Time windows which constrain the arrival time at a visit. Note that a vehicle may depart outside of the arrival time window, i.e. arrival time + duration do not need to be inside a time window. This can result in waiting time if the vehicle arrives before TimeWindow.start_time.

The absence of TimeWindow means that the vehicle can perform this visit at any time.

Time windows must be disjoint, i.e. no time window must overlap with or be adjacent to another, and they must be in increasing order.

cost_per_hour_after_soft_end_time and soft_end_time can only be set if there is a single time window.

repeated .google.cloud.optimization.v1.TimeWindow time_windows = 6;

Parameter
Name Description
index int
Returns
Type Description
TimeWindow.Builder

getTimeWindowsBuilderList()

public List<TimeWindow.Builder> getTimeWindowsBuilderList()

Time windows which constrain the arrival time at a visit. Note that a vehicle may depart outside of the arrival time window, i.e. arrival time + duration do not need to be inside a time window. This can result in waiting time if the vehicle arrives before TimeWindow.start_time.

The absence of TimeWindow means that the vehicle can perform this visit at any time.

Time windows must be disjoint, i.e. no time window must overlap with or be adjacent to another, and they must be in increasing order.

cost_per_hour_after_soft_end_time and soft_end_time can only be set if there is a single time window.

repeated .google.cloud.optimization.v1.TimeWindow time_windows = 6;

Returns
Type Description
List<Builder>

getTimeWindowsCount()

public int getTimeWindowsCount()

Time windows which constrain the arrival time at a visit. Note that a vehicle may depart outside of the arrival time window, i.e. arrival time + duration do not need to be inside a time window. This can result in waiting time if the vehicle arrives before TimeWindow.start_time.

The absence of TimeWindow means that the vehicle can perform this visit at any time.

Time windows must be disjoint, i.e. no time window must overlap with or be adjacent to another, and they must be in increasing order.

cost_per_hour_after_soft_end_time and soft_end_time can only be set if there is a single time window.

repeated .google.cloud.optimization.v1.TimeWindow time_windows = 6;

Returns
Type Description
int

getTimeWindowsList()

public List<TimeWindow> getTimeWindowsList()

Time windows which constrain the arrival time at a visit. Note that a vehicle may depart outside of the arrival time window, i.e. arrival time + duration do not need to be inside a time window. This can result in waiting time if the vehicle arrives before TimeWindow.start_time.

The absence of TimeWindow means that the vehicle can perform this visit at any time.

Time windows must be disjoint, i.e. no time window must overlap with or be adjacent to another, and they must be in increasing order.

cost_per_hour_after_soft_end_time and soft_end_time can only be set if there is a single time window.

repeated .google.cloud.optimization.v1.TimeWindow time_windows = 6;

Returns
Type Description
List<TimeWindow>

getTimeWindowsOrBuilder(int index)

public TimeWindowOrBuilder getTimeWindowsOrBuilder(int index)

Time windows which constrain the arrival time at a visit. Note that a vehicle may depart outside of the arrival time window, i.e. arrival time + duration do not need to be inside a time window. This can result in waiting time if the vehicle arrives before TimeWindow.start_time.

The absence of TimeWindow means that the vehicle can perform this visit at any time.

Time windows must be disjoint, i.e. no time window must overlap with or be adjacent to another, and they must be in increasing order.

cost_per_hour_after_soft_end_time and soft_end_time can only be set if there is a single time window.

repeated .google.cloud.optimization.v1.TimeWindow time_windows = 6;

Parameter
Name Description
index int
Returns
Type Description
TimeWindowOrBuilder

getTimeWindowsOrBuilderList()

public List<? extends TimeWindowOrBuilder> getTimeWindowsOrBuilderList()

Time windows which constrain the arrival time at a visit. Note that a vehicle may depart outside of the arrival time window, i.e. arrival time + duration do not need to be inside a time window. This can result in waiting time if the vehicle arrives before TimeWindow.start_time.

The absence of TimeWindow means that the vehicle can perform this visit at any time.

Time windows must be disjoint, i.e. no time window must overlap with or be adjacent to another, and they must be in increasing order.

cost_per_hour_after_soft_end_time and soft_end_time can only be set if there is a single time window.

repeated .google.cloud.optimization.v1.TimeWindow time_windows = 6;

Returns
Type Description
List<? extends com.google.cloud.optimization.v1.TimeWindowOrBuilder>

getVisitTypes(int index)

public String getVisitTypes(int index)

Specifies the types of the visit. This may be used to allocate additional time required for a vehicle to complete this visit (see Vehicle.extra_visit_duration_for_visit_type).

A type can only appear once.

repeated string visit_types = 10;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The visitTypes at the given index.

getVisitTypesBytes(int index)

public ByteString getVisitTypesBytes(int index)

Specifies the types of the visit. This may be used to allocate additional time required for a vehicle to complete this visit (see Vehicle.extra_visit_duration_for_visit_type).

A type can only appear once.

repeated string visit_types = 10;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the visitTypes at the given index.

getVisitTypesCount()

public int getVisitTypesCount()

Specifies the types of the visit. This may be used to allocate additional time required for a vehicle to complete this visit (see Vehicle.extra_visit_duration_for_visit_type).

A type can only appear once.

repeated string visit_types = 10;

Returns
Type Description
int

The count of visitTypes.

getVisitTypesList()

public ProtocolStringList getVisitTypesList()

Specifies the types of the visit. This may be used to allocate additional time required for a vehicle to complete this visit (see Vehicle.extra_visit_duration_for_visit_type).

A type can only appear once.

repeated string visit_types = 10;

Returns
Type Description
ProtocolStringList

A list containing the visitTypes.

hasArrivalLocation()

public boolean hasArrivalLocation()

The geo-location where the vehicle arrives when performing this VisitRequest. If the shipment model has duration distance matrices, arrival_location must not be specified.

.google.type.LatLng arrival_location = 1;

Returns
Type Description
boolean

Whether the arrivalLocation field is set.

hasArrivalWaypoint()

public boolean hasArrivalWaypoint()

The waypoint where the vehicle arrives when performing this VisitRequest. If the shipment model has duration distance matrices, arrival_waypoint must not be specified.

.google.cloud.optimization.v1.Waypoint arrival_waypoint = 2;

Returns
Type Description
boolean

Whether the arrivalWaypoint field is set.

hasDepartureLocation()

public boolean hasDepartureLocation()

The geo-location where the vehicle departs after completing this VisitRequest. Can be omitted if it is the same as arrival_location. If the shipment model has duration distance matrices, departure_location must not be specified.

.google.type.LatLng departure_location = 3;

Returns
Type Description
boolean

Whether the departureLocation field is set.

hasDepartureWaypoint()

public boolean hasDepartureWaypoint()

The waypoint where the vehicle departs after completing this VisitRequest. Can be omitted if it is the same as arrival_waypoint. If the shipment model has duration distance matrices, departure_waypoint must not be specified.

.google.cloud.optimization.v1.Waypoint departure_waypoint = 4;

Returns
Type Description
boolean

Whether the departureWaypoint field is set.

hasDuration()

public boolean hasDuration()

Duration of the visit, i.e. time spent by the vehicle between arrival and departure (to be added to the possible waiting time; see time_windows).

.google.protobuf.Duration duration = 7;

Returns
Type Description
boolean

Whether the duration field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeArrivalLocation(LatLng value)

public Shipment.VisitRequest.Builder mergeArrivalLocation(LatLng value)

The geo-location where the vehicle arrives when performing this VisitRequest. If the shipment model has duration distance matrices, arrival_location must not be specified.

.google.type.LatLng arrival_location = 1;

Parameter
Name Description
value com.google.type.LatLng
Returns
Type Description
Shipment.VisitRequest.Builder

mergeArrivalWaypoint(Waypoint value)

public Shipment.VisitRequest.Builder mergeArrivalWaypoint(Waypoint value)

The waypoint where the vehicle arrives when performing this VisitRequest. If the shipment model has duration distance matrices, arrival_waypoint must not be specified.

.google.cloud.optimization.v1.Waypoint arrival_waypoint = 2;

Parameter
Name Description
value Waypoint
Returns
Type Description
Shipment.VisitRequest.Builder

mergeDepartureLocation(LatLng value)

public Shipment.VisitRequest.Builder mergeDepartureLocation(LatLng value)

The geo-location where the vehicle departs after completing this VisitRequest. Can be omitted if it is the same as arrival_location. If the shipment model has duration distance matrices, departure_location must not be specified.

.google.type.LatLng departure_location = 3;

Parameter
Name Description
value com.google.type.LatLng
Returns
Type Description
Shipment.VisitRequest.Builder

mergeDepartureWaypoint(Waypoint value)

public Shipment.VisitRequest.Builder mergeDepartureWaypoint(Waypoint value)

The waypoint where the vehicle departs after completing this VisitRequest. Can be omitted if it is the same as arrival_waypoint. If the shipment model has duration distance matrices, departure_waypoint must not be specified.

.google.cloud.optimization.v1.Waypoint departure_waypoint = 4;

Parameter
Name Description
value Waypoint
Returns
Type Description
Shipment.VisitRequest.Builder

mergeDuration(Duration value)

public Shipment.VisitRequest.Builder mergeDuration(Duration value)

Duration of the visit, i.e. time spent by the vehicle between arrival and departure (to be added to the possible waiting time; see time_windows).

.google.protobuf.Duration duration = 7;

Parameter
Name Description
value Duration
Returns
Type Description
Shipment.VisitRequest.Builder

mergeFrom(Shipment.VisitRequest other)

public Shipment.VisitRequest.Builder mergeFrom(Shipment.VisitRequest other)
Parameter
Name Description
other Shipment.VisitRequest
Returns
Type Description
Shipment.VisitRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Shipment.VisitRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Shipment.VisitRequest.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Shipment.VisitRequest.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Shipment.VisitRequest.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Shipment.VisitRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Shipment.VisitRequest.Builder
Overrides

putAllLoadDemands(Map<String,Shipment.Load> values)

public Shipment.VisitRequest.Builder putAllLoadDemands(Map<String,Shipment.Load> values)

Load demands of this visit request. This is just like Shipment.load_demands field, except that it only applies to this VisitRequest instead of the whole Shipment. The demands listed here are added to the demands listed in Shipment.load_demands.

map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 12;

Parameter
Name Description
values Map<String,Load>
Returns
Type Description
Shipment.VisitRequest.Builder

putLoadDemands(String key, Shipment.Load value)

public Shipment.VisitRequest.Builder putLoadDemands(String key, Shipment.Load value)

Load demands of this visit request. This is just like Shipment.load_demands field, except that it only applies to this VisitRequest instead of the whole Shipment. The demands listed here are added to the demands listed in Shipment.load_demands.

map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 12;

Parameters
Name Description
key String
value Shipment.Load
Returns
Type Description
Shipment.VisitRequest.Builder

putLoadDemandsBuilderIfAbsent(String key)

public Shipment.Load.Builder putLoadDemandsBuilderIfAbsent(String key)

Load demands of this visit request. This is just like Shipment.load_demands field, except that it only applies to this VisitRequest instead of the whole Shipment. The demands listed here are added to the demands listed in Shipment.load_demands.

map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 12;

Parameter
Name Description
key String
Returns
Type Description
Shipment.Load.Builder

removeDemands(int index) (deprecated)

public Shipment.VisitRequest.Builder removeDemands(int index)

Deprecated: Use VisitRequest.load_demands instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 9 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description
Shipment.VisitRequest.Builder

removeLoadDemands(String key)

public Shipment.VisitRequest.Builder removeLoadDemands(String key)

Load demands of this visit request. This is just like Shipment.load_demands field, except that it only applies to this VisitRequest instead of the whole Shipment. The demands listed here are added to the demands listed in Shipment.load_demands.

map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 12;

Parameter
Name Description
key String
Returns
Type Description
Shipment.VisitRequest.Builder

removeTimeWindows(int index)

public Shipment.VisitRequest.Builder removeTimeWindows(int index)

Time windows which constrain the arrival time at a visit. Note that a vehicle may depart outside of the arrival time window, i.e. arrival time + duration do not need to be inside a time window. This can result in waiting time if the vehicle arrives before TimeWindow.start_time.

The absence of TimeWindow means that the vehicle can perform this visit at any time.

Time windows must be disjoint, i.e. no time window must overlap with or be adjacent to another, and they must be in increasing order.

cost_per_hour_after_soft_end_time and soft_end_time can only be set if there is a single time window.

repeated .google.cloud.optimization.v1.TimeWindow time_windows = 6;

Parameter
Name Description
index int
Returns
Type Description
Shipment.VisitRequest.Builder

setArrivalLocation(LatLng value)

public Shipment.VisitRequest.Builder setArrivalLocation(LatLng value)

The geo-location where the vehicle arrives when performing this VisitRequest. If the shipment model has duration distance matrices, arrival_location must not be specified.

.google.type.LatLng arrival_location = 1;

Parameter
Name Description
value com.google.type.LatLng
Returns
Type Description
Shipment.VisitRequest.Builder

setArrivalLocation(LatLng.Builder builderForValue)

public Shipment.VisitRequest.Builder setArrivalLocation(LatLng.Builder builderForValue)

The geo-location where the vehicle arrives when performing this VisitRequest. If the shipment model has duration distance matrices, arrival_location must not be specified.

.google.type.LatLng arrival_location = 1;

Parameter
Name Description
builderForValue com.google.type.LatLng.Builder
Returns
Type Description
Shipment.VisitRequest.Builder

setArrivalWaypoint(Waypoint value)

public Shipment.VisitRequest.Builder setArrivalWaypoint(Waypoint value)

The waypoint where the vehicle arrives when performing this VisitRequest. If the shipment model has duration distance matrices, arrival_waypoint must not be specified.

.google.cloud.optimization.v1.Waypoint arrival_waypoint = 2;

Parameter
Name Description
value Waypoint
Returns
Type Description
Shipment.VisitRequest.Builder

setArrivalWaypoint(Waypoint.Builder builderForValue)

public Shipment.VisitRequest.Builder setArrivalWaypoint(Waypoint.Builder builderForValue)

The waypoint where the vehicle arrives when performing this VisitRequest. If the shipment model has duration distance matrices, arrival_waypoint must not be specified.

.google.cloud.optimization.v1.Waypoint arrival_waypoint = 2;

Parameter
Name Description
builderForValue Waypoint.Builder
Returns
Type Description
Shipment.VisitRequest.Builder

setCost(double value)

public Shipment.VisitRequest.Builder setCost(double value)

Cost to service this visit request on a vehicle route. This can be used to pay different costs for each alternative pickup or delivery of a shipment. This cost must be in the same unit as Shipment.penalty_cost and must not be negative.

double cost = 8;

Parameter
Name Description
value double

The cost to set.

Returns
Type Description
Shipment.VisitRequest.Builder

This builder for chaining.

setDemands(int index, CapacityQuantity value) (deprecated)

public Shipment.VisitRequest.Builder setDemands(int index, CapacityQuantity value)

Deprecated: Use VisitRequest.load_demands instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 9 [deprecated = true];

Parameters
Name Description
index int
value CapacityQuantity
Returns
Type Description
Shipment.VisitRequest.Builder

setDemands(int index, CapacityQuantity.Builder builderForValue) (deprecated)

public Shipment.VisitRequest.Builder setDemands(int index, CapacityQuantity.Builder builderForValue)

Deprecated: Use VisitRequest.load_demands instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 9 [deprecated = true];

Parameters
Name Description
index int
builderForValue CapacityQuantity.Builder
Returns
Type Description
Shipment.VisitRequest.Builder

setDepartureLocation(LatLng value)

public Shipment.VisitRequest.Builder setDepartureLocation(LatLng value)

The geo-location where the vehicle departs after completing this VisitRequest. Can be omitted if it is the same as arrival_location. If the shipment model has duration distance matrices, departure_location must not be specified.

.google.type.LatLng departure_location = 3;

Parameter
Name Description
value com.google.type.LatLng
Returns
Type Description
Shipment.VisitRequest.Builder

setDepartureLocation(LatLng.Builder builderForValue)

public Shipment.VisitRequest.Builder setDepartureLocation(LatLng.Builder builderForValue)

The geo-location where the vehicle departs after completing this VisitRequest. Can be omitted if it is the same as arrival_location. If the shipment model has duration distance matrices, departure_location must not be specified.

.google.type.LatLng departure_location = 3;

Parameter
Name Description
builderForValue com.google.type.LatLng.Builder
Returns
Type Description
Shipment.VisitRequest.Builder

setDepartureWaypoint(Waypoint value)

public Shipment.VisitRequest.Builder setDepartureWaypoint(Waypoint value)

The waypoint where the vehicle departs after completing this VisitRequest. Can be omitted if it is the same as arrival_waypoint. If the shipment model has duration distance matrices, departure_waypoint must not be specified.

.google.cloud.optimization.v1.Waypoint departure_waypoint = 4;

Parameter
Name Description
value Waypoint
Returns
Type Description
Shipment.VisitRequest.Builder

setDepartureWaypoint(Waypoint.Builder builderForValue)

public Shipment.VisitRequest.Builder setDepartureWaypoint(Waypoint.Builder builderForValue)

The waypoint where the vehicle departs after completing this VisitRequest. Can be omitted if it is the same as arrival_waypoint. If the shipment model has duration distance matrices, departure_waypoint must not be specified.

.google.cloud.optimization.v1.Waypoint departure_waypoint = 4;

Parameter
Name Description
builderForValue Waypoint.Builder
Returns
Type Description
Shipment.VisitRequest.Builder

setDuration(Duration value)

public Shipment.VisitRequest.Builder setDuration(Duration value)

Duration of the visit, i.e. time spent by the vehicle between arrival and departure (to be added to the possible waiting time; see time_windows).

.google.protobuf.Duration duration = 7;

Parameter
Name Description
value Duration
Returns
Type Description
Shipment.VisitRequest.Builder

setDuration(Duration.Builder builderForValue)

public Shipment.VisitRequest.Builder setDuration(Duration.Builder builderForValue)

Duration of the visit, i.e. time spent by the vehicle between arrival and departure (to be added to the possible waiting time; see time_windows).

.google.protobuf.Duration duration = 7;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Shipment.VisitRequest.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Shipment.VisitRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Shipment.VisitRequest.Builder
Overrides

setLabel(String value)

public Shipment.VisitRequest.Builder setLabel(String value)

Specifies a label for this VisitRequest. This label is reported in the response as visit_label in the corresponding ShipmentRoute.Visit.

string label = 11;

Parameter
Name Description
value String

The label to set.

Returns
Type Description
Shipment.VisitRequest.Builder

This builder for chaining.

setLabelBytes(ByteString value)

public Shipment.VisitRequest.Builder setLabelBytes(ByteString value)

Specifies a label for this VisitRequest. This label is reported in the response as visit_label in the corresponding ShipmentRoute.Visit.

string label = 11;

Parameter
Name Description
value ByteString

The bytes for label to set.

Returns
Type Description
Shipment.VisitRequest.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Shipment.VisitRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Shipment.VisitRequest.Builder
Overrides

setTags(int index, String value)

public Shipment.VisitRequest.Builder setTags(int index, String value)

Specifies tags attached to the visit request. Empty or duplicate strings are not allowed.

repeated string tags = 5;

Parameters
Name Description
index int

The index to set the value at.

value String

The tags to set.

Returns
Type Description
Shipment.VisitRequest.Builder

This builder for chaining.

setTimeWindows(int index, TimeWindow value)

public Shipment.VisitRequest.Builder setTimeWindows(int index, TimeWindow value)

Time windows which constrain the arrival time at a visit. Note that a vehicle may depart outside of the arrival time window, i.e. arrival time + duration do not need to be inside a time window. This can result in waiting time if the vehicle arrives before TimeWindow.start_time.

The absence of TimeWindow means that the vehicle can perform this visit at any time.

Time windows must be disjoint, i.e. no time window must overlap with or be adjacent to another, and they must be in increasing order.

cost_per_hour_after_soft_end_time and soft_end_time can only be set if there is a single time window.

repeated .google.cloud.optimization.v1.TimeWindow time_windows = 6;

Parameters
Name Description
index int
value TimeWindow
Returns
Type Description
Shipment.VisitRequest.Builder

setTimeWindows(int index, TimeWindow.Builder builderForValue)

public Shipment.VisitRequest.Builder setTimeWindows(int index, TimeWindow.Builder builderForValue)

Time windows which constrain the arrival time at a visit. Note that a vehicle may depart outside of the arrival time window, i.e. arrival time + duration do not need to be inside a time window. This can result in waiting time if the vehicle arrives before TimeWindow.start_time.

The absence of TimeWindow means that the vehicle can perform this visit at any time.

Time windows must be disjoint, i.e. no time window must overlap with or be adjacent to another, and they must be in increasing order.

cost_per_hour_after_soft_end_time and soft_end_time can only be set if there is a single time window.

repeated .google.cloud.optimization.v1.TimeWindow time_windows = 6;

Parameters
Name Description
index int
builderForValue TimeWindow.Builder
Returns
Type Description
Shipment.VisitRequest.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final Shipment.VisitRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Shipment.VisitRequest.Builder
Overrides

setVisitTypes(int index, String value)

public Shipment.VisitRequest.Builder setVisitTypes(int index, String value)

Specifies the types of the visit. This may be used to allocate additional time required for a vehicle to complete this visit (see Vehicle.extra_visit_duration_for_visit_type).

A type can only appear once.

repeated string visit_types = 10;

Parameters
Name Description
index int

The index to set the value at.

value String

The visitTypes to set.

Returns
Type Description
Shipment.VisitRequest.Builder

This builder for chaining.