Package com.google.cloud.optimization.v1
Class TransitionAttributes
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- 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
public final class TransitionAttributes extends com.google.protobuf.GeneratedMessageV3 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 typegoogle.cloud.optimization.v1.TransitionAttributes
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TransitionAttributes.Builder
Specifies attributes of transitions between two consecutive visits on a route.-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static int
COST_FIELD_NUMBER
static int
COST_PER_KILOMETER_FIELD_NUMBER
static int
DELAY_FIELD_NUMBER
static int
DISTANCE_LIMIT_FIELD_NUMBER
static int
DST_TAG_FIELD_NUMBER
static int
EXCLUDED_DST_TAG_FIELD_NUMBER
static int
EXCLUDED_SRC_TAG_FIELD_NUMBER
static int
SRC_TAG_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
double
getCost()
Specifies a cost for performing this transition.double
getCostPerKilometer()
Specifies a cost per kilometer applied to the distance traveled while performing this transition.static TransitionAttributes
getDefaultInstance()
TransitionAttributes
getDefaultInstanceForType()
com.google.protobuf.Duration
getDelay()
Specifies a delay incurred when performing this transition.com.google.protobuf.DurationOrBuilder
getDelayOrBuilder()
Specifies a delay incurred when performing this transition.static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
DistanceLimit
getDistanceLimit()
Specifies a limit on the distance traveled while performing this transition.DistanceLimitOrBuilder
getDistanceLimitOrBuilder()
Specifies a limit on the distance traveled while performing this transition.String
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).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
getExcludedDstTag()
See `dst_tag`.com.google.protobuf.ByteString
getExcludedDstTagBytes()
See `dst_tag`.String
getExcludedSrcTag()
See `src_tag`.com.google.protobuf.ByteString
getExcludedSrcTagBytes()
See `src_tag`.com.google.protobuf.Parser<TransitionAttributes>
getParserForType()
int
getSerializedSize()
String
getSrcTag()
Tags defining the set of (src->dst) transitions these attributes apply to.com.google.protobuf.ByteString
getSrcTagBytes()
Tags defining the set of (src->dst) transitions these attributes apply to.boolean
hasDelay()
Specifies a delay incurred when performing this transition.boolean
hasDistanceLimit()
Specifies a limit on the distance traveled while performing this transition.int
hashCode()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
static TransitionAttributes.Builder
newBuilder()
static TransitionAttributes.Builder
newBuilder(TransitionAttributes prototype)
TransitionAttributes.Builder
newBuilderForType()
protected TransitionAttributes.Builder
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
protected Object
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
static TransitionAttributes
parseDelimitedFrom(InputStream input)
static TransitionAttributes
parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static TransitionAttributes
parseFrom(byte[] data)
static TransitionAttributes
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static TransitionAttributes
parseFrom(com.google.protobuf.ByteString data)
static TransitionAttributes
parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static TransitionAttributes
parseFrom(com.google.protobuf.CodedInputStream input)
static TransitionAttributes
parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static TransitionAttributes
parseFrom(InputStream input)
static TransitionAttributes
parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static TransitionAttributes
parseFrom(ByteBuffer data)
static TransitionAttributes
parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser<TransitionAttributes>
parser()
TransitionAttributes.Builder
toBuilder()
void
writeTo(com.google.protobuf.CodedOutputStream output)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
SRC_TAG_FIELD_NUMBER
public static final int SRC_TAG_FIELD_NUMBER
- See Also:
- Constant Field Values
-
EXCLUDED_SRC_TAG_FIELD_NUMBER
public static final int EXCLUDED_SRC_TAG_FIELD_NUMBER
- See Also:
- Constant Field Values
-
DST_TAG_FIELD_NUMBER
public static final int DST_TAG_FIELD_NUMBER
- See Also:
- Constant Field Values
-
EXCLUDED_DST_TAG_FIELD_NUMBER
public static final int EXCLUDED_DST_TAG_FIELD_NUMBER
- See Also:
- Constant Field Values
-
COST_FIELD_NUMBER
public static final int COST_FIELD_NUMBER
- See Also:
- Constant Field Values
-
COST_PER_KILOMETER_FIELD_NUMBER
public static final int COST_PER_KILOMETER_FIELD_NUMBER
- See Also:
- Constant Field Values
-
DISTANCE_LIMIT_FIELD_NUMBER
public static final int DISTANCE_LIMIT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
DELAY_FIELD_NUMBER
public static final int DELAY_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstance
in classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3
-
getSrcTag
public String 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:
getSrcTag
in 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:
getSrcTagBytes
in interfaceTransitionAttributesOrBuilder
- Returns:
- The bytes for srcTag.
-
getExcludedSrcTag
public String getExcludedSrcTag()
See `src_tag`. Exactly one of `src_tag` and `excluded_src_tag` must be non-empty.
string excluded_src_tag = 2;
- Specified by:
getExcludedSrcTag
in 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:
getExcludedSrcTagBytes
in interfaceTransitionAttributesOrBuilder
- Returns:
- The bytes for excludedSrcTag.
-
getDstTag
public String 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:
getDstTag
in 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:
getDstTagBytes
in interfaceTransitionAttributesOrBuilder
- Returns:
- The bytes for dstTag.
-
getExcludedDstTag
public String getExcludedDstTag()
See `dst_tag`. Exactly one of `dst_tag` and `excluded_dst_tag` must be non-empty.
string excluded_dst_tag = 4;
- Specified by:
getExcludedDstTag
in 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:
getExcludedDstTagBytes
in 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:
getCost
in 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:
getCostPerKilometer
in 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:
hasDistanceLimit
in interfaceTransitionAttributesOrBuilder
- Returns:
- Whether the distanceLimit field is set.
-
getDistanceLimit
public DistanceLimit 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:
getDistanceLimit
in interfaceTransitionAttributesOrBuilder
- Returns:
- The distanceLimit.
-
getDistanceLimitOrBuilder
public DistanceLimitOrBuilder 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:
getDistanceLimitOrBuilder
in 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:
hasDelay
in 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:
getDelay
in 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:
getDelayOrBuilder
in interfaceTransitionAttributesOrBuilder
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessageV3
- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in 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
public static TransitionAttributes parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static TransitionAttributes parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static TransitionAttributes parseDelimitedFrom(InputStream input) throws IOException
- 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
public TransitionAttributes.Builder newBuilderForType()
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.MessageLite
-
newBuilder
public static TransitionAttributes.Builder newBuilder()
-
newBuilder
public static TransitionAttributes.Builder newBuilder(TransitionAttributes prototype)
-
toBuilder
public TransitionAttributes.Builder toBuilder()
- Specified by:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected TransitionAttributes.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static TransitionAttributes getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<TransitionAttributes> parser()
-
getParserForType
public com.google.protobuf.Parser<TransitionAttributes> getParserForType()
- Specified by:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public TransitionAttributes getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
-