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 classVehicle.DurationLimit.BuilderA 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 intCOST_PER_HOUR_AFTER_SOFT_MAX_FIELD_NUMBERstatic intCOST_PER_SQUARE_HOUR_AFTER_QUADRATIC_SOFT_MAX_FIELD_NUMBERstatic intMAX_DURATION_FIELD_NUMBERstatic intQUADRATIC_SOFT_MAX_DURATION_FIELD_NUMBERstatic intSOFT_MAX_DURATION_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)doublegetCostPerHourAfterSoftMax()Cost per hour incurred if the `soft_max_duration` threshold is violated.doublegetCostPerSquareHourAfterQuadraticSoftMax()Cost per square hour incurred if the `quadratic_soft_max_duration` threshold is violated.static Vehicle.DurationLimitgetDefaultInstance()Vehicle.DurationLimitgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.DurationgetMaxDuration()A hard limit constraining the duration to be at most max_duration.com.google.protobuf.DurationOrBuildergetMaxDurationOrBuilder()A hard limit constraining the duration to be at most max_duration.com.google.protobuf.Parser<Vehicle.DurationLimit>getParserForType()com.google.protobuf.DurationgetQuadraticSoftMaxDuration()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.DurationOrBuildergetQuadraticSoftMaxDurationOrBuilder()A soft limit not enforcing a maximum duration limit, but when violated makes the route incur a cost, quadratic in the duration.intgetSerializedSize()com.google.protobuf.DurationgetSoftMaxDuration()A soft limit not enforcing a maximum duration limit, but when violated makes the route incur a cost.com.google.protobuf.DurationOrBuildergetSoftMaxDurationOrBuilder()A soft limit not enforcing a maximum duration limit, but when violated makes the route incur a cost.booleanhasCostPerHourAfterSoftMax()Cost per hour incurred if the `soft_max_duration` threshold is violated.booleanhasCostPerSquareHourAfterQuadraticSoftMax()Cost per square hour incurred if the `quadratic_soft_max_duration` threshold is violated.inthashCode()booleanhasMaxDuration()A hard limit constraining the duration to be at most max_duration.booleanhasQuadraticSoftMaxDuration()A soft limit not enforcing a maximum duration limit, but when violated makes the route incur a cost, quadratic in the duration.booleanhasSoftMaxDuration()A soft limit not enforcing a maximum duration limit, but when violated makes the route incur a cost.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static Vehicle.DurationLimit.BuildernewBuilder()static Vehicle.DurationLimit.BuildernewBuilder(Vehicle.DurationLimit prototype)Vehicle.DurationLimit.BuildernewBuilderForType()protected Vehicle.DurationLimit.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static Vehicle.DurationLimitparseDelimitedFrom(InputStream input)static Vehicle.DurationLimitparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static Vehicle.DurationLimitparseFrom(byte[] data)static Vehicle.DurationLimitparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static Vehicle.DurationLimitparseFrom(com.google.protobuf.ByteString data)static Vehicle.DurationLimitparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static Vehicle.DurationLimitparseFrom(com.google.protobuf.CodedInputStream input)static Vehicle.DurationLimitparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static Vehicle.DurationLimitparseFrom(InputStream input)static Vehicle.DurationLimitparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static Vehicle.DurationLimitparseFrom(ByteBuffer data)static Vehicle.DurationLimitparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<Vehicle.DurationLimit>parser()Vehicle.DurationLimit.BuildertoBuilder()voidwriteTo(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:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein 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:
hasMaxDurationin 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:
getMaxDurationin 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:
getMaxDurationOrBuilderin 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:
hasSoftMaxDurationin 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:
getSoftMaxDurationin 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:
getSoftMaxDurationOrBuilderin 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:
hasCostPerHourAfterSoftMaxin 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:
getCostPerHourAfterSoftMaxin 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:
hasQuadraticSoftMaxDurationin 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:
getQuadraticSoftMaxDurationin 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:
getQuadraticSoftMaxDurationOrBuilderin 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:
hasCostPerSquareHourAfterQuadraticSoftMaxin 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:
getCostPerSquareHourAfterQuadraticSoftMaxin interfaceVehicle.DurationLimitOrBuilder- Returns:
- The costPerSquareHourAfterQuadraticSoftMax.
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein 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:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein 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:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Vehicle.DurationLimit.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein 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:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public Vehicle.DurationLimit getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-