Class Vehicle.DurationLimit

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.optimization.v1.Vehicle.DurationLimit
All Implemented Interfaces:
Vehicle.DurationLimitOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable
Enclosing class:
Vehicle

public static final class Vehicle.DurationLimit extends com.google.protobuf.GeneratedMessage implements Vehicle.DurationLimitOrBuilder
 A limit defining a maximum duration of the route of a vehicle. It can be
 either hard or soft.

 When a soft limit field is defined, both the soft max threshold and its
 associated cost must be defined together.
 
Protobuf type google.cloud.optimization.v1.Vehicle.DurationLimit
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    A limit defining a maximum duration of the route of a vehicle.

    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.BuilderParent

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

    com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     

    Fields inherited from class com.google.protobuf.GeneratedMessage

    alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFields

    Fields inherited from class com.google.protobuf.AbstractMessage

    memoizedSize

    Fields inherited from class com.google.protobuf.AbstractMessageLite

    memoizedHashCode
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    double
    Cost per hour incurred if the `soft_max_duration` threshold is violated.
    double
    Cost per square hour incurred if the `quadratic_soft_max_duration` threshold is violated.
     
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Duration
    A hard limit constraining the duration to be at most max_duration.
    com.google.protobuf.DurationOrBuilder
    A hard limit constraining the duration to be at most max_duration.
    com.google.protobuf.Parser<Vehicle.DurationLimit>
     
    com.google.protobuf.Duration
    A soft limit not enforcing a maximum duration limit, but when violated makes the route incur a cost, quadratic in the duration.
    com.google.protobuf.DurationOrBuilder
    A soft limit not enforcing a maximum duration limit, but when violated makes the route incur a cost, quadratic in the duration.
    int
     
    com.google.protobuf.Duration
    A soft limit not enforcing a maximum duration limit, but when violated makes the route incur a cost.
    com.google.protobuf.DurationOrBuilder
    A soft limit not enforcing a maximum duration limit, but when violated makes the route incur a cost.
    boolean
    Cost per hour incurred if the `soft_max_duration` threshold is violated.
    boolean
    Cost per square hour incurred if the `quadratic_soft_max_duration` threshold is violated.
    int
     
    boolean
    A hard limit constraining the duration to be at most max_duration.
    boolean
    A soft limit not enforcing a maximum duration limit, but when violated makes the route incur a cost, quadratic in the duration.
    boolean
    A soft limit not enforcing a maximum duration limit, but when violated makes the route incur a cost.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
     
     
    newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
     
     
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(byte[] data)
     
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.ByteString data)
     
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<Vehicle.DurationLimit>
     
     
    void
    writeTo(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, writeStringNoTag

    Methods inherited from class com.google.protobuf.AbstractMessage

    findInitializationErrors, getInitializationErrorString, hashFields, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite

    addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.MessageLite

    toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Field Details

    • MAX_DURATION_FIELD_NUMBER

      public static final int MAX_DURATION_FIELD_NUMBER
      See Also:
    • SOFT_MAX_DURATION_FIELD_NUMBER

      public static final int SOFT_MAX_DURATION_FIELD_NUMBER
      See Also:
    • COST_PER_HOUR_AFTER_SOFT_MAX_FIELD_NUMBER

      public static final int COST_PER_HOUR_AFTER_SOFT_MAX_FIELD_NUMBER
      See Also:
    • QUADRATIC_SOFT_MAX_DURATION_FIELD_NUMBER

      public static final int QUADRATIC_SOFT_MAX_DURATION_FIELD_NUMBER
      See Also:
    • COST_PER_SQUARE_HOUR_AFTER_QUADRATIC_SOFT_MAX_FIELD_NUMBER

      public static final int COST_PER_SQUARE_HOUR_AFTER_QUADRATIC_SOFT_MAX_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:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • hasMaxDuration

      public boolean hasMaxDuration()
       A hard limit constraining the duration to be at most max_duration.
       
      .google.protobuf.Duration max_duration = 1;
      Specified by:
      hasMaxDuration in interface Vehicle.DurationLimitOrBuilder
      Returns:
      Whether the maxDuration field is set.
    • getMaxDuration

      public com.google.protobuf.Duration getMaxDuration()
       A hard limit constraining the duration to be at most max_duration.
       
      .google.protobuf.Duration max_duration = 1;
      Specified by:
      getMaxDuration in interface Vehicle.DurationLimitOrBuilder
      Returns:
      The maxDuration.
    • getMaxDurationOrBuilder

      public com.google.protobuf.DurationOrBuilder getMaxDurationOrBuilder()
       A hard limit constraining the duration to be at most max_duration.
       
      .google.protobuf.Duration max_duration = 1;
      Specified by:
      getMaxDurationOrBuilder in interface Vehicle.DurationLimitOrBuilder
    • hasSoftMaxDuration

      public boolean hasSoftMaxDuration()
       A soft limit not enforcing a maximum duration limit, but when violated
       makes the route incur a cost. This cost adds up to other costs defined in
       the model, with the same unit.
      
       If defined, `soft_max_duration` must be nonnegative. If max_duration is
       also defined, `soft_max_duration` must be less than max_duration.
       
      .google.protobuf.Duration soft_max_duration = 2;
      Specified by:
      hasSoftMaxDuration in interface Vehicle.DurationLimitOrBuilder
      Returns:
      Whether the softMaxDuration field is set.
    • getSoftMaxDuration

      public com.google.protobuf.Duration getSoftMaxDuration()
       A soft limit not enforcing a maximum duration limit, but when violated
       makes the route incur a cost. This cost adds up to other costs defined in
       the model, with the same unit.
      
       If defined, `soft_max_duration` must be nonnegative. If max_duration is
       also defined, `soft_max_duration` must be less than max_duration.
       
      .google.protobuf.Duration soft_max_duration = 2;
      Specified by:
      getSoftMaxDuration in interface Vehicle.DurationLimitOrBuilder
      Returns:
      The softMaxDuration.
    • getSoftMaxDurationOrBuilder

      public com.google.protobuf.DurationOrBuilder getSoftMaxDurationOrBuilder()
       A soft limit not enforcing a maximum duration limit, but when violated
       makes the route incur a cost. This cost adds up to other costs defined in
       the model, with the same unit.
      
       If defined, `soft_max_duration` must be nonnegative. If max_duration is
       also defined, `soft_max_duration` must be less than max_duration.
       
      .google.protobuf.Duration soft_max_duration = 2;
      Specified by:
      getSoftMaxDurationOrBuilder in interface Vehicle.DurationLimitOrBuilder
    • hasCostPerHourAfterSoftMax

      public boolean hasCostPerHourAfterSoftMax()
       Cost per hour incurred if the `soft_max_duration` threshold is violated.
       The additional cost is 0 if the duration is under the threshold,
       otherwise the cost depends on the duration as follows:
       ```
       cost_per_hour_after_soft_max * (duration - soft_max_duration)
       ```
       The cost must be nonnegative.
       
      optional double cost_per_hour_after_soft_max = 3;
      Specified by:
      hasCostPerHourAfterSoftMax in interface Vehicle.DurationLimitOrBuilder
      Returns:
      Whether the costPerHourAfterSoftMax field is set.
    • getCostPerHourAfterSoftMax

      public double getCostPerHourAfterSoftMax()
       Cost per hour incurred if the `soft_max_duration` threshold is violated.
       The additional cost is 0 if the duration is under the threshold,
       otherwise the cost depends on the duration as follows:
       ```
       cost_per_hour_after_soft_max * (duration - soft_max_duration)
       ```
       The cost must be nonnegative.
       
      optional double cost_per_hour_after_soft_max = 3;
      Specified by:
      getCostPerHourAfterSoftMax in interface Vehicle.DurationLimitOrBuilder
      Returns:
      The costPerHourAfterSoftMax.
    • hasQuadraticSoftMaxDuration

      public boolean hasQuadraticSoftMaxDuration()
       A soft limit not enforcing a maximum duration limit, but when violated
       makes the route incur a cost, quadratic in the duration. This cost adds
       up to other costs defined in the model, with the same unit.
      
       If defined, `quadratic_soft_max_duration` must be nonnegative. If
       `max_duration` is also defined, `quadratic_soft_max_duration` must be
       less than `max_duration`, and the difference must be no larger than one
       day:
      
       `max_duration - quadratic_soft_max_duration <= 86400 seconds`
       
      .google.protobuf.Duration quadratic_soft_max_duration = 4;
      Specified by:
      hasQuadraticSoftMaxDuration in interface Vehicle.DurationLimitOrBuilder
      Returns:
      Whether the quadraticSoftMaxDuration field is set.
    • getQuadraticSoftMaxDuration

      public com.google.protobuf.Duration getQuadraticSoftMaxDuration()
       A soft limit not enforcing a maximum duration limit, but when violated
       makes the route incur a cost, quadratic in the duration. This cost adds
       up to other costs defined in the model, with the same unit.
      
       If defined, `quadratic_soft_max_duration` must be nonnegative. If
       `max_duration` is also defined, `quadratic_soft_max_duration` must be
       less than `max_duration`, and the difference must be no larger than one
       day:
      
       `max_duration - quadratic_soft_max_duration <= 86400 seconds`
       
      .google.protobuf.Duration quadratic_soft_max_duration = 4;
      Specified by:
      getQuadraticSoftMaxDuration in interface Vehicle.DurationLimitOrBuilder
      Returns:
      The quadraticSoftMaxDuration.
    • getQuadraticSoftMaxDurationOrBuilder

      public com.google.protobuf.DurationOrBuilder getQuadraticSoftMaxDurationOrBuilder()
       A soft limit not enforcing a maximum duration limit, but when violated
       makes the route incur a cost, quadratic in the duration. This cost adds
       up to other costs defined in the model, with the same unit.
      
       If defined, `quadratic_soft_max_duration` must be nonnegative. If
       `max_duration` is also defined, `quadratic_soft_max_duration` must be
       less than `max_duration`, and the difference must be no larger than one
       day:
      
       `max_duration - quadratic_soft_max_duration <= 86400 seconds`
       
      .google.protobuf.Duration quadratic_soft_max_duration = 4;
      Specified by:
      getQuadraticSoftMaxDurationOrBuilder in interface Vehicle.DurationLimitOrBuilder
    • hasCostPerSquareHourAfterQuadraticSoftMax

      public boolean hasCostPerSquareHourAfterQuadraticSoftMax()
       Cost per square hour incurred if the
       `quadratic_soft_max_duration` threshold is violated.
      
       The additional cost is 0 if the duration is under the threshold,
       otherwise the cost depends on the duration as follows:
      
       ```
       cost_per_square_hour_after_quadratic_soft_max *
       (duration - quadratic_soft_max_duration)^2
       ```
      
       The cost must be nonnegative.
       
      optional double cost_per_square_hour_after_quadratic_soft_max = 5;
      Specified by:
      hasCostPerSquareHourAfterQuadraticSoftMax in interface Vehicle.DurationLimitOrBuilder
      Returns:
      Whether the costPerSquareHourAfterQuadraticSoftMax field is set.
    • getCostPerSquareHourAfterQuadraticSoftMax

      public double getCostPerSquareHourAfterQuadraticSoftMax()
       Cost per square hour incurred if the
       `quadratic_soft_max_duration` threshold is violated.
      
       The additional cost is 0 if the duration is under the threshold,
       otherwise the cost depends on the duration as follows:
      
       ```
       cost_per_square_hour_after_quadratic_soft_max *
       (duration - quadratic_soft_max_duration)^2
       ```
      
       The cost must be nonnegative.
       
      optional double cost_per_square_hour_after_quadratic_soft_max = 5;
      Specified by:
      getCostPerSquareHourAfterQuadraticSoftMax in interface Vehicle.DurationLimitOrBuilder
      Returns:
      The costPerSquareHourAfterQuadraticSoftMax.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • 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.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • 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 Vehicle.DurationLimit parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Vehicle.DurationLimit parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Vehicle.DurationLimit parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Vehicle.DurationLimit parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Vehicle.DurationLimit parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Vehicle.DurationLimit parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Vehicle.DurationLimit parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Vehicle.DurationLimit parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Vehicle.DurationLimit parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Vehicle.DurationLimit parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Vehicle.DurationLimit parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Vehicle.DurationLimit parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public Vehicle.DurationLimit.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static Vehicle.DurationLimit.Builder newBuilder()
    • newBuilder

      public static Vehicle.DurationLimit.Builder newBuilder(Vehicle.DurationLimit prototype)
    • toBuilder

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

      protected Vehicle.DurationLimit.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static Vehicle.DurationLimit getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<Vehicle.DurationLimit> parser()
    • getParserForType

      public com.google.protobuf.Parser<Vehicle.DurationLimit> 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.GeneratedMessage
    • getDefaultInstanceForType

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