Package com.google.cloud.optimization.v1
Class TransitionAttributes
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.optimization.v1.TransitionAttributes
- All Implemented Interfaces:
TransitionAttributesOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
@Generated
public final class TransitionAttributes
extends com.google.protobuf.GeneratedMessage
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- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classSpecifies attributes of transitions between two consecutive visits on a route.Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message, T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleandoublegetCost()Specifies a cost for performing this transition.doubleSpecifies a cost per kilometer applied to the distance traveled while performing this transition.static TransitionAttributescom.google.protobuf.DurationgetDelay()Specifies a delay incurred when performing this transition.com.google.protobuf.DurationOrBuilderSpecifies a delay incurred when performing this transition.static final com.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.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`.com.google.protobuf.Parser<TransitionAttributes>intTags 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.inthashCode()protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanstatic TransitionAttributes.Builderstatic TransitionAttributes.BuildernewBuilder(TransitionAttributes prototype) protected TransitionAttributes.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static TransitionAttributesparseDelimitedFrom(InputStream input) static TransitionAttributesparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TransitionAttributesparseFrom(byte[] data) static TransitionAttributesparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TransitionAttributesparseFrom(com.google.protobuf.ByteString data) static TransitionAttributesparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TransitionAttributesparseFrom(com.google.protobuf.CodedInputStream input) static TransitionAttributesparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TransitionAttributesparseFrom(InputStream input) static TransitionAttributesparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TransitionAttributesparseFrom(ByteBuffer data) static TransitionAttributesparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<TransitionAttributes>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
SRC_TAG_FIELD_NUMBER
public static final int SRC_TAG_FIELD_NUMBER- See Also:
-
EXCLUDED_SRC_TAG_FIELD_NUMBER
public static final int EXCLUDED_SRC_TAG_FIELD_NUMBER- See Also:
-
DST_TAG_FIELD_NUMBER
public static final int DST_TAG_FIELD_NUMBER- See Also:
-
EXCLUDED_DST_TAG_FIELD_NUMBER
public static final int EXCLUDED_DST_TAG_FIELD_NUMBER- See Also:
-
COST_FIELD_NUMBER
public static final int COST_FIELD_NUMBER- See Also:
-
COST_PER_KILOMETER_FIELD_NUMBER
public static final int COST_PER_KILOMETER_FIELD_NUMBER- See Also:
-
DISTANCE_LIMIT_FIELD_NUMBER
public static final int DISTANCE_LIMIT_FIELD_NUMBER- See Also:
-
DELAY_FIELD_NUMBER
public static final int DELAY_FIELD_NUMBER- See Also:
-
-
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
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static TransitionAttributes parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TransitionAttributes parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TransitionAttributes parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TransitionAttributes parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TransitionAttributes parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TransitionAttributes parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static TransitionAttributes parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static TransitionAttributes parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static TransitionAttributes parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static TransitionAttributes parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected TransitionAttributes.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-