Package com.google.cloud.optimization.v1
Class TransitionAttributes.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<TransitionAttributes.Builder>
com.google.cloud.optimization.v1.TransitionAttributes.Builder
- All Implemented Interfaces:
TransitionAttributesOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- TransitionAttributes
public static final class TransitionAttributes.Builder
extends com.google.protobuf.GeneratedMessage.Builder<TransitionAttributes.Builder>
implements TransitionAttributesOrBuilder
Specifies attributes of transitions between two consecutive visits on a route. Several `TransitionAttributes` may apply to the same transition: in that case, all extra costs add up and the strictest constraint or limit applies (following natural "AND" semantics).Protobuf type
google.cloud.optimization.v1.TransitionAttributes-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()Specifies a cost for performing this transition.Specifies a cost per kilometer applied to the distance traveled while performing this transition.Specifies a delay incurred when performing this transition.Specifies a limit on the distance traveled while performing this transition.A destination visit or vehicle end matches iff its [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] or [Vehicle.end_tags][google.cloud.optimization.v1.Vehicle.end_tags] either contains `dst_tag` or does not contain `excluded_dst_tag` (depending on which of these two fields is non-empty).See `dst_tag`.See `src_tag`.Tags defining the set of (src->dst) transitions these attributes apply to.doublegetCost()Specifies a cost for performing this transition.doubleSpecifies a cost per kilometer applied to the distance traveled while performing this transition.com.google.protobuf.DurationgetDelay()Specifies a delay incurred when performing this transition.com.google.protobuf.Duration.BuilderSpecifies a delay incurred when performing this transition.com.google.protobuf.DurationOrBuilderSpecifies a delay incurred when performing this transition.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorSpecifies a limit on the distance traveled while performing this transition.Specifies a limit on the distance traveled while performing this transition.Specifies a limit on the distance traveled while performing this transition.A destination visit or vehicle end matches iff its [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] or [Vehicle.end_tags][google.cloud.optimization.v1.Vehicle.end_tags] either contains `dst_tag` or does not contain `excluded_dst_tag` (depending on which of these two fields is non-empty).com.google.protobuf.ByteStringA destination visit or vehicle end matches iff its [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] or [Vehicle.end_tags][google.cloud.optimization.v1.Vehicle.end_tags] either contains `dst_tag` or does not contain `excluded_dst_tag` (depending on which of these two fields is non-empty).See `dst_tag`.com.google.protobuf.ByteStringSee `dst_tag`.See `src_tag`.com.google.protobuf.ByteStringSee `src_tag`.Tags defining the set of (src->dst) transitions these attributes apply to.com.google.protobuf.ByteStringTags defining the set of (src->dst) transitions these attributes apply to.booleanhasDelay()Specifies a delay incurred when performing this transition.booleanSpecifies a limit on the distance traveled while performing this transition.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeDelay(com.google.protobuf.Duration value) Specifies a delay incurred when performing this transition.mergeDistanceLimit(DistanceLimit value) Specifies a limit on the distance traveled while performing this transition.mergeFrom(TransitionAttributes other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setCost(double value) Specifies a cost for performing this transition.setCostPerKilometer(double value) Specifies a cost per kilometer applied to the distance traveled while performing this transition.setDelay(com.google.protobuf.Duration value) Specifies a delay incurred when performing this transition.setDelay(com.google.protobuf.Duration.Builder builderForValue) Specifies a delay incurred when performing this transition.setDistanceLimit(DistanceLimit value) Specifies a limit on the distance traveled while performing this transition.setDistanceLimit(DistanceLimit.Builder builderForValue) Specifies a limit on the distance traveled while performing this transition.A destination visit or vehicle end matches iff its [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] or [Vehicle.end_tags][google.cloud.optimization.v1.Vehicle.end_tags] either contains `dst_tag` or does not contain `excluded_dst_tag` (depending on which of these two fields is non-empty).setDstTagBytes(com.google.protobuf.ByteString value) A destination visit or vehicle end matches iff its [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] or [Vehicle.end_tags][google.cloud.optimization.v1.Vehicle.end_tags] either contains `dst_tag` or does not contain `excluded_dst_tag` (depending on which of these two fields is non-empty).setExcludedDstTag(String value) See `dst_tag`.setExcludedDstTagBytes(com.google.protobuf.ByteString value) See `dst_tag`.setExcludedSrcTag(String value) See `src_tag`.setExcludedSrcTagBytes(com.google.protobuf.ByteString value) See `src_tag`.Tags defining the set of (src->dst) transitions these attributes apply to.setSrcTagBytes(com.google.protobuf.ByteString value) Tags defining the set of (src->dst) transitions these attributes apply to.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<TransitionAttributes.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<TransitionAttributes.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<TransitionAttributes.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<TransitionAttributes.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<TransitionAttributes.Builder>
-
mergeFrom
public TransitionAttributes.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<TransitionAttributes.Builder>- Throws:
IOException
-
getSrcTag
Tags defining the set of (src->dst) transitions these attributes apply to. A source visit or vehicle start matches iff its [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags] either contains `src_tag` or does not contain `excluded_src_tag` (depending on which of these two fields is non-empty).
string src_tag = 1;- Specified by:
getSrcTagin interfaceTransitionAttributesOrBuilder- Returns:
- The srcTag.
-
getSrcTagBytes
public com.google.protobuf.ByteString getSrcTagBytes()Tags defining the set of (src->dst) transitions these attributes apply to. A source visit or vehicle start matches iff its [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags] either contains `src_tag` or does not contain `excluded_src_tag` (depending on which of these two fields is non-empty).
string src_tag = 1;- Specified by:
getSrcTagBytesin interfaceTransitionAttributesOrBuilder- Returns:
- The bytes for srcTag.
-
setSrcTag
Tags defining the set of (src->dst) transitions these attributes apply to. A source visit or vehicle start matches iff its [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags] either contains `src_tag` or does not contain `excluded_src_tag` (depending on which of these two fields is non-empty).
string src_tag = 1;- Parameters:
value- The srcTag to set.- Returns:
- This builder for chaining.
-
clearSrcTag
Tags defining the set of (src->dst) transitions these attributes apply to. A source visit or vehicle start matches iff its [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags] either contains `src_tag` or does not contain `excluded_src_tag` (depending on which of these two fields is non-empty).
string src_tag = 1;- Returns:
- This builder for chaining.
-
setSrcTagBytes
Tags defining the set of (src->dst) transitions these attributes apply to. A source visit or vehicle start matches iff its [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags] either contains `src_tag` or does not contain `excluded_src_tag` (depending on which of these two fields is non-empty).
string src_tag = 1;- Parameters:
value- The bytes for srcTag to set.- Returns:
- This builder for chaining.
-
getExcludedSrcTag
See `src_tag`. Exactly one of `src_tag` and `excluded_src_tag` must be non-empty.
string excluded_src_tag = 2;- Specified by:
getExcludedSrcTagin interfaceTransitionAttributesOrBuilder- Returns:
- The excludedSrcTag.
-
getExcludedSrcTagBytes
public com.google.protobuf.ByteString getExcludedSrcTagBytes()See `src_tag`. Exactly one of `src_tag` and `excluded_src_tag` must be non-empty.
string excluded_src_tag = 2;- Specified by:
getExcludedSrcTagBytesin interfaceTransitionAttributesOrBuilder- Returns:
- The bytes for excludedSrcTag.
-
setExcludedSrcTag
See `src_tag`. Exactly one of `src_tag` and `excluded_src_tag` must be non-empty.
string excluded_src_tag = 2;- Parameters:
value- The excludedSrcTag to set.- Returns:
- This builder for chaining.
-
clearExcludedSrcTag
See `src_tag`. Exactly one of `src_tag` and `excluded_src_tag` must be non-empty.
string excluded_src_tag = 2;- Returns:
- This builder for chaining.
-
setExcludedSrcTagBytes
See `src_tag`. Exactly one of `src_tag` and `excluded_src_tag` must be non-empty.
string excluded_src_tag = 2;- Parameters:
value- The bytes for excludedSrcTag to set.- Returns:
- This builder for chaining.
-
getDstTag
A destination visit or vehicle end matches iff its [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] or [Vehicle.end_tags][google.cloud.optimization.v1.Vehicle.end_tags] either contains `dst_tag` or does not contain `excluded_dst_tag` (depending on which of these two fields is non-empty).
string dst_tag = 3;- Specified by:
getDstTagin interfaceTransitionAttributesOrBuilder- Returns:
- The dstTag.
-
getDstTagBytes
public com.google.protobuf.ByteString getDstTagBytes()A destination visit or vehicle end matches iff its [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] or [Vehicle.end_tags][google.cloud.optimization.v1.Vehicle.end_tags] either contains `dst_tag` or does not contain `excluded_dst_tag` (depending on which of these two fields is non-empty).
string dst_tag = 3;- Specified by:
getDstTagBytesin interfaceTransitionAttributesOrBuilder- Returns:
- The bytes for dstTag.
-
setDstTag
A destination visit or vehicle end matches iff its [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] or [Vehicle.end_tags][google.cloud.optimization.v1.Vehicle.end_tags] either contains `dst_tag` or does not contain `excluded_dst_tag` (depending on which of these two fields is non-empty).
string dst_tag = 3;- Parameters:
value- The dstTag to set.- Returns:
- This builder for chaining.
-
clearDstTag
A destination visit or vehicle end matches iff its [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] or [Vehicle.end_tags][google.cloud.optimization.v1.Vehicle.end_tags] either contains `dst_tag` or does not contain `excluded_dst_tag` (depending on which of these two fields is non-empty).
string dst_tag = 3;- Returns:
- This builder for chaining.
-
setDstTagBytes
A destination visit or vehicle end matches iff its [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] or [Vehicle.end_tags][google.cloud.optimization.v1.Vehicle.end_tags] either contains `dst_tag` or does not contain `excluded_dst_tag` (depending on which of these two fields is non-empty).
string dst_tag = 3;- Parameters:
value- The bytes for dstTag to set.- Returns:
- This builder for chaining.
-
getExcludedDstTag
See `dst_tag`. Exactly one of `dst_tag` and `excluded_dst_tag` must be non-empty.
string excluded_dst_tag = 4;- Specified by:
getExcludedDstTagin interfaceTransitionAttributesOrBuilder- Returns:
- The excludedDstTag.
-
getExcludedDstTagBytes
public com.google.protobuf.ByteString getExcludedDstTagBytes()See `dst_tag`. Exactly one of `dst_tag` and `excluded_dst_tag` must be non-empty.
string excluded_dst_tag = 4;- Specified by:
getExcludedDstTagBytesin interfaceTransitionAttributesOrBuilder- Returns:
- The bytes for excludedDstTag.
-
setExcludedDstTag
See `dst_tag`. Exactly one of `dst_tag` and `excluded_dst_tag` must be non-empty.
string excluded_dst_tag = 4;- Parameters:
value- The excludedDstTag to set.- Returns:
- This builder for chaining.
-
clearExcludedDstTag
See `dst_tag`. Exactly one of `dst_tag` and `excluded_dst_tag` must be non-empty.
string excluded_dst_tag = 4;- Returns:
- This builder for chaining.
-
setExcludedDstTagBytes
See `dst_tag`. Exactly one of `dst_tag` and `excluded_dst_tag` must be non-empty.
string excluded_dst_tag = 4;- Parameters:
value- The bytes for excludedDstTag to set.- Returns:
- This builder for chaining.
-
getCost
public double getCost()Specifies a cost for performing this transition. This is in the same unit as all other costs in the model and must not be negative. It is applied on top of all other existing costs.
double cost = 5;- Specified by:
getCostin interfaceTransitionAttributesOrBuilder- Returns:
- The cost.
-
setCost
Specifies a cost for performing this transition. This is in the same unit as all other costs in the model and must not be negative. It is applied on top of all other existing costs.
double cost = 5;- Parameters:
value- The cost to set.- Returns:
- This builder for chaining.
-
clearCost
Specifies a cost for performing this transition. This is in the same unit as all other costs in the model and must not be negative. It is applied on top of all other existing costs.
double cost = 5;- Returns:
- This builder for chaining.
-
getCostPerKilometer
public double getCostPerKilometer()Specifies a cost per kilometer applied to the distance traveled while performing this transition. It adds up to any [Vehicle.cost_per_kilometer][google.cloud.optimization.v1.Vehicle.cost_per_kilometer] specified on vehicles.
double cost_per_kilometer = 6;- Specified by:
getCostPerKilometerin interfaceTransitionAttributesOrBuilder- Returns:
- The costPerKilometer.
-
setCostPerKilometer
Specifies a cost per kilometer applied to the distance traveled while performing this transition. It adds up to any [Vehicle.cost_per_kilometer][google.cloud.optimization.v1.Vehicle.cost_per_kilometer] specified on vehicles.
double cost_per_kilometer = 6;- Parameters:
value- The costPerKilometer to set.- Returns:
- This builder for chaining.
-
clearCostPerKilometer
Specifies a cost per kilometer applied to the distance traveled while performing this transition. It adds up to any [Vehicle.cost_per_kilometer][google.cloud.optimization.v1.Vehicle.cost_per_kilometer] specified on vehicles.
double cost_per_kilometer = 6;- Returns:
- This builder for chaining.
-
hasDistanceLimit
public boolean hasDistanceLimit()Specifies a limit on the distance traveled while performing this transition. As of 2021/06, only soft limits are supported.
.google.cloud.optimization.v1.DistanceLimit distance_limit = 7;- Specified by:
hasDistanceLimitin interfaceTransitionAttributesOrBuilder- Returns:
- Whether the distanceLimit field is set.
-
getDistanceLimit
Specifies a limit on the distance traveled while performing this transition. As of 2021/06, only soft limits are supported.
.google.cloud.optimization.v1.DistanceLimit distance_limit = 7;- Specified by:
getDistanceLimitin interfaceTransitionAttributesOrBuilder- Returns:
- The distanceLimit.
-
setDistanceLimit
Specifies a limit on the distance traveled while performing this transition. As of 2021/06, only soft limits are supported.
.google.cloud.optimization.v1.DistanceLimit distance_limit = 7; -
setDistanceLimit
Specifies a limit on the distance traveled while performing this transition. As of 2021/06, only soft limits are supported.
.google.cloud.optimization.v1.DistanceLimit distance_limit = 7; -
mergeDistanceLimit
Specifies a limit on the distance traveled while performing this transition. As of 2021/06, only soft limits are supported.
.google.cloud.optimization.v1.DistanceLimit distance_limit = 7; -
clearDistanceLimit
Specifies a limit on the distance traveled while performing this transition. As of 2021/06, only soft limits are supported.
.google.cloud.optimization.v1.DistanceLimit distance_limit = 7; -
getDistanceLimitBuilder
Specifies a limit on the distance traveled while performing this transition. As of 2021/06, only soft limits are supported.
.google.cloud.optimization.v1.DistanceLimit distance_limit = 7; -
getDistanceLimitOrBuilder
Specifies a limit on the distance traveled while performing this transition. As of 2021/06, only soft limits are supported.
.google.cloud.optimization.v1.DistanceLimit distance_limit = 7;- Specified by:
getDistanceLimitOrBuilderin interfaceTransitionAttributesOrBuilder
-
hasDelay
public boolean hasDelay()Specifies a delay incurred when performing this transition. This delay always occurs *after* finishing the source visit and *before* starting the destination visit.
.google.protobuf.Duration delay = 8;- Specified by:
hasDelayin interfaceTransitionAttributesOrBuilder- Returns:
- Whether the delay field is set.
-
getDelay
public com.google.protobuf.Duration getDelay()Specifies a delay incurred when performing this transition. This delay always occurs *after* finishing the source visit and *before* starting the destination visit.
.google.protobuf.Duration delay = 8;- Specified by:
getDelayin interfaceTransitionAttributesOrBuilder- Returns:
- The delay.
-
setDelay
Specifies a delay incurred when performing this transition. This delay always occurs *after* finishing the source visit and *before* starting the destination visit.
.google.protobuf.Duration delay = 8; -
setDelay
Specifies a delay incurred when performing this transition. This delay always occurs *after* finishing the source visit and *before* starting the destination visit.
.google.protobuf.Duration delay = 8; -
mergeDelay
Specifies a delay incurred when performing this transition. This delay always occurs *after* finishing the source visit and *before* starting the destination visit.
.google.protobuf.Duration delay = 8; -
clearDelay
Specifies a delay incurred when performing this transition. This delay always occurs *after* finishing the source visit and *before* starting the destination visit.
.google.protobuf.Duration delay = 8; -
getDelayBuilder
public com.google.protobuf.Duration.Builder getDelayBuilder()Specifies a delay incurred when performing this transition. This delay always occurs *after* finishing the source visit and *before* starting the destination visit.
.google.protobuf.Duration delay = 8; -
getDelayOrBuilder
public com.google.protobuf.DurationOrBuilder getDelayOrBuilder()Specifies a delay incurred when performing this transition. This delay always occurs *after* finishing the source visit and *before* starting the destination visit.
.google.protobuf.Duration delay = 8;- Specified by:
getDelayOrBuilderin interfaceTransitionAttributesOrBuilder
-