Package com.google.cloud.optimization.v1
Class Vehicle.DurationLimit
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- 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.GeneratedMessageV3 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 typegoogle.cloud.optimization.v1.Vehicle.DurationLimit
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Vehicle.DurationLimit.Builder
A limit defining a maximum duration of the route of a vehicle.-
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_PER_HOUR_AFTER_SOFT_MAX_FIELD_NUMBER
static int
COST_PER_SQUARE_HOUR_AFTER_QUADRATIC_SOFT_MAX_FIELD_NUMBER
static int
MAX_DURATION_FIELD_NUMBER
static int
QUADRATIC_SOFT_MAX_DURATION_FIELD_NUMBER
static int
SOFT_MAX_DURATION_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
double
getCostPerHourAfterSoftMax()
Cost per hour incurred if the `soft_max_duration` threshold is violated.double
getCostPerSquareHourAfterQuadraticSoftMax()
Cost per square hour incurred if the `quadratic_soft_max_duration` threshold is violated.static Vehicle.DurationLimit
getDefaultInstance()
Vehicle.DurationLimit
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Duration
getMaxDuration()
A hard limit constraining the duration to be at most max_duration.com.google.protobuf.DurationOrBuilder
getMaxDurationOrBuilder()
A hard limit constraining the duration to be at most max_duration.com.google.protobuf.Parser<Vehicle.DurationLimit>
getParserForType()
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.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.int
getSerializedSize()
com.google.protobuf.Duration
getSoftMaxDuration()
A soft limit not enforcing a maximum duration limit, but when violated makes the route incur a cost.com.google.protobuf.DurationOrBuilder
getSoftMaxDurationOrBuilder()
A soft limit not enforcing a maximum duration limit, but when violated makes the route incur a cost.boolean
hasCostPerHourAfterSoftMax()
Cost per hour incurred if the `soft_max_duration` threshold is violated.boolean
hasCostPerSquareHourAfterQuadraticSoftMax()
Cost per square hour incurred if the `quadratic_soft_max_duration` threshold is violated.int
hashCode()
boolean
hasMaxDuration()
A hard limit constraining the duration to be at most max_duration.boolean
hasQuadraticSoftMaxDuration()
A soft limit not enforcing a maximum duration limit, but when violated makes the route incur a cost, quadratic in the duration.boolean
hasSoftMaxDuration()
A soft limit not enforcing a maximum duration limit, but when violated makes the route incur a cost.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
static Vehicle.DurationLimit.Builder
newBuilder()
static Vehicle.DurationLimit.Builder
newBuilder(Vehicle.DurationLimit prototype)
Vehicle.DurationLimit.Builder
newBuilderForType()
protected Vehicle.DurationLimit.Builder
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
protected Object
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
static Vehicle.DurationLimit
parseDelimitedFrom(InputStream input)
static Vehicle.DurationLimit
parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Vehicle.DurationLimit
parseFrom(byte[] data)
static Vehicle.DurationLimit
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Vehicle.DurationLimit
parseFrom(com.google.protobuf.ByteString data)
static Vehicle.DurationLimit
parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Vehicle.DurationLimit
parseFrom(com.google.protobuf.CodedInputStream input)
static Vehicle.DurationLimit
parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Vehicle.DurationLimit
parseFrom(InputStream input)
static Vehicle.DurationLimit
parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Vehicle.DurationLimit
parseFrom(ByteBuffer data)
static Vehicle.DurationLimit
parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser<Vehicle.DurationLimit>
parser()
Vehicle.DurationLimit.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
-
MAX_DURATION_FIELD_NUMBER
public static final int MAX_DURATION_FIELD_NUMBER
- See Also:
- Constant Field Values
-
SOFT_MAX_DURATION_FIELD_NUMBER
public static final int SOFT_MAX_DURATION_FIELD_NUMBER
- See Also:
- Constant Field Values
-
COST_PER_HOUR_AFTER_SOFT_MAX_FIELD_NUMBER
public static final int COST_PER_HOUR_AFTER_SOFT_MAX_FIELD_NUMBER
- See Also:
- Constant Field Values
-
QUADRATIC_SOFT_MAX_DURATION_FIELD_NUMBER
public static final int QUADRATIC_SOFT_MAX_DURATION_FIELD_NUMBER
- See Also:
- Constant Field Values
-
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:
- 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
-
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 interfaceVehicle.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 interfaceVehicle.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 interfaceVehicle.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 interfaceVehicle.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 interfaceVehicle.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 interfaceVehicle.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 interfaceVehicle.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 interfaceVehicle.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 interfaceVehicle.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 interfaceVehicle.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 interfaceVehicle.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 interfaceVehicle.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 interfaceVehicle.DurationLimitOrBuilder
- Returns:
- The costPerSquareHourAfterQuadraticSoftMax.
-
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 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 interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in interfacecom.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 interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Vehicle.DurationLimit.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForType
in classcom.google.protobuf.GeneratedMessageV3
-
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 interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public Vehicle.DurationLimit getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
-