Package com.google.cloud.optimization.v1
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 ClassesModifier and TypeClassDescriptionstatic final classA 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.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleandoubleCost per hour incurred if the `soft_max_duration` threshold is violated.doubleCost per square hour incurred if the `quadratic_soft_max_duration` threshold is violated.static Vehicle.DurationLimitstatic final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.DurationA hard limit constraining the duration to be at most max_duration.com.google.protobuf.DurationOrBuilderA hard limit constraining the duration to be at most max_duration.com.google.protobuf.Parser<Vehicle.DurationLimit>com.google.protobuf.DurationA soft limit not enforcing a maximum duration limit, but when violated makes the route incur a cost, quadratic in the duration.com.google.protobuf.DurationOrBuilderA soft limit not enforcing a maximum duration limit, but when violated makes the route incur a cost, quadratic in the duration.intcom.google.protobuf.DurationA soft limit not enforcing a maximum duration limit, but when violated makes the route incur a cost.com.google.protobuf.DurationOrBuilderA soft limit not enforcing a maximum duration limit, but when violated makes the route incur a cost.booleanCost per hour incurred if the `soft_max_duration` threshold is violated.booleanCost per square hour incurred if the `quadratic_soft_max_duration` threshold is violated.inthashCode()booleanA hard limit constraining the duration to be at most max_duration.booleanA soft limit not enforcing a maximum duration limit, but when violated makes the route incur a cost, quadratic in the duration.booleanA soft limit not enforcing a maximum duration limit, but when violated makes the route incur a cost.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleannewBuilder(Vehicle.DurationLimit prototype) protected Vehicle.DurationLimit.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) 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()voidwriteTo(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, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods 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:
internalGetFieldAccessorTablein classcom.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:
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.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- 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
- Throws:
IOException
-
parseFrom
public static Vehicle.DurationLimit parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- 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
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Vehicle.DurationLimit.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-