Class 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 type google.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
      • Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

        com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.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 class com.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 interface TransitionAttributesOrBuilder
        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 interface TransitionAttributesOrBuilder
        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 interface TransitionAttributesOrBuilder
        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 interface TransitionAttributesOrBuilder
        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 interface TransitionAttributesOrBuilder
        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 interface TransitionAttributesOrBuilder
        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 interface TransitionAttributesOrBuilder
        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 interface TransitionAttributesOrBuilder
        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 interface TransitionAttributesOrBuilder
        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 interface TransitionAttributesOrBuilder
        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 interface TransitionAttributesOrBuilder
        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 interface TransitionAttributesOrBuilder
        Returns:
        The distanceLimit.
      • 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 interface TransitionAttributesOrBuilder
        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 interface TransitionAttributesOrBuilder
        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 interface TransitionAttributesOrBuilder
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.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
      • newBuilderForType

        public TransitionAttributes.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public TransitionAttributes.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected TransitionAttributes.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getParserForType

        public com.google.protobuf.Parser<TransitionAttributes> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public TransitionAttributes getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder