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 Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<TransitionAttributes.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<TransitionAttributes.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<TransitionAttributes.Builder>
    • getDefaultInstanceForType

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

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

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

      public TransitionAttributes.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<TransitionAttributes.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.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:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<TransitionAttributes.Builder>
      Throws:
      IOException
    • 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.
    • setSrcTag

      public TransitionAttributes.Builder setSrcTag(String value)
       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

      public TransitionAttributes.Builder 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

      public TransitionAttributes.Builder setSrcTagBytes(com.google.protobuf.ByteString value)
       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

      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.
    • setExcludedSrcTag

      public TransitionAttributes.Builder setExcludedSrcTag(String value)
       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

      public TransitionAttributes.Builder 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

      public TransitionAttributes.Builder setExcludedSrcTagBytes(com.google.protobuf.ByteString value)
       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

      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.
    • setDstTag

      public TransitionAttributes.Builder setDstTag(String 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).
       
      string dst_tag = 3;
      Parameters:
      value - The dstTag to set.
      Returns:
      This builder for chaining.
    • clearDstTag

      public TransitionAttributes.Builder 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

      public TransitionAttributes.Builder 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).
       
      string dst_tag = 3;
      Parameters:
      value - The bytes for dstTag to set.
      Returns:
      This builder for chaining.
    • 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.
    • setExcludedDstTag

      public TransitionAttributes.Builder setExcludedDstTag(String value)
       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

      public TransitionAttributes.Builder 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

      public TransitionAttributes.Builder setExcludedDstTagBytes(com.google.protobuf.ByteString value)
       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:
      getCost in interface TransitionAttributesOrBuilder
      Returns:
      The cost.
    • setCost

      public TransitionAttributes.Builder setCost(double value)
       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

      public TransitionAttributes.Builder 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:
      getCostPerKilometer in interface TransitionAttributesOrBuilder
      Returns:
      The costPerKilometer.
    • setCostPerKilometer

      public TransitionAttributes.Builder setCostPerKilometer(double value)
       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

      public TransitionAttributes.Builder 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:
      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.
    • setDistanceLimit

      public TransitionAttributes.Builder setDistanceLimit(DistanceLimit value)
       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

      public TransitionAttributes.Builder setDistanceLimit(DistanceLimit.Builder builderForValue)
       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

      public TransitionAttributes.Builder mergeDistanceLimit(DistanceLimit value)
       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

      public TransitionAttributes.Builder 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

      public DistanceLimit.Builder 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

      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 interface TransitionAttributesOrBuilder
    • 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.
    • setDelay

      public TransitionAttributes.Builder setDelay(com.google.protobuf.Duration value)
       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

      public TransitionAttributes.Builder setDelay(com.google.protobuf.Duration.Builder builderForValue)
       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

      public TransitionAttributes.Builder mergeDelay(com.google.protobuf.Duration value)
       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

      public TransitionAttributes.Builder 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:
      getDelayOrBuilder in interface TransitionAttributesOrBuilder