Class Vehicle.DurationLimit.Builder (1.7.0)
Stay organized with collections
Save and categorize content based on your preferences.
- 1.76.0 (latest)
- 1.74.0
- 1.73.0
- 1.72.0
- 1.71.0
- 1.70.0
- 1.68.0
- 1.66.0
- 1.65.0
- 1.62.0
- 1.61.0
- 1.60.0
- 1.58.0
- 1.57.0
- 1.56.0
- 1.55.0
- 1.54.0
- 1.53.0
- 1.52.0
- 1.51.0
- 1.50.0
- 1.49.0
- 1.47.0
- 1.46.0
- 1.45.0
- 1.44.0
- 1.43.0
- 1.42.0
- 1.41.0
- 1.40.0
- 1.39.0
- 1.38.0
- 1.37.0
- 1.35.0
- 1.34.0
- 1.33.0
- 1.32.0
- 1.31.0
- 1.30.0
- 1.29.0
- 1.28.0
- 1.27.0
- 1.26.0
- 1.25.0
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.0
- 1.13.0
- 1.12.0
- 1.11.0
- 1.10.0
- 1.9.0
- 1.7.0
- 1.6.0
- 1.5.0
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.14
- 0.1.2
publicstaticfinalclass Vehicle.DurationLimit.BuilderextendsGeneratedMessageV3.Builder<Vehicle.DurationLimit.Builder>implementsVehicle.DurationLimitOrBuilderA 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
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > Vehicle.DurationLimit.BuilderImplements
Vehicle.DurationLimitOrBuilderInherited Members
Static Methods
getDescriptor()
publicstaticfinalDescriptors.DescriptorgetDescriptor()Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
publicVehicle.DurationLimit.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)build()
publicVehicle.DurationLimitbuild()buildPartial()
publicVehicle.DurationLimitbuildPartial()clear()
publicVehicle.DurationLimit.Builderclear()clearCostPerHourAfterSoftMax()
publicVehicle.DurationLimit.BuilderclearCostPerHourAfterSoftMax() 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:
<code><code>
cost_per_hour_after_soft_max * (duration - soft_max_duration)
</code></code>
The cost must be nonnegative.
optional double cost_per_hour_after_soft_max = 3;
Vehicle.DurationLimit.Builder
This builder for chaining.
clearCostPerSquareHourAfterQuadraticSoftMax()
publicVehicle.DurationLimit.BuilderclearCostPerSquareHourAfterQuadraticSoftMax() 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:
<code><code>
cost_per_square_hour_after_quadratic_soft_max *
(duration - quadratic_soft_max_duration)^2
</code></code>
The cost must be nonnegative.
optional double cost_per_square_hour_after_quadratic_soft_max = 5;
Vehicle.DurationLimit.Builder
This builder for chaining.
clearField(Descriptors.FieldDescriptor field)
publicVehicle.DurationLimit.BuilderclearField(Descriptors.FieldDescriptorfield)clearMaxDuration()
publicVehicle.DurationLimit.BuilderclearMaxDuration()A hard limit constraining the duration to be at most max_duration.
.google.protobuf.Duration max_duration = 1;
clearOneof(Descriptors.OneofDescriptor oneof)
publicVehicle.DurationLimit.BuilderclearOneof(Descriptors.OneofDescriptoroneof)clearQuadraticSoftMaxDuration()
publicVehicle.DurationLimit.BuilderclearQuadraticSoftMaxDuration() 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;
clearSoftMaxDuration()
publicVehicle.DurationLimit.BuilderclearSoftMaxDuration() 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;
clone()
publicVehicle.DurationLimit.Builderclone()getCostPerHourAfterSoftMax()
publicdoublegetCostPerHourAfterSoftMax() 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:
<code><code>
cost_per_hour_after_soft_max * (duration - soft_max_duration)
</code></code>
The cost must be nonnegative.
optional double cost_per_hour_after_soft_max = 3;
double
The costPerHourAfterSoftMax.
getCostPerSquareHourAfterQuadraticSoftMax()
publicdoublegetCostPerSquareHourAfterQuadraticSoftMax() 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:
<code><code>
cost_per_square_hour_after_quadratic_soft_max *
(duration - quadratic_soft_max_duration)^2
</code></code>
The cost must be nonnegative.
optional double cost_per_square_hour_after_quadratic_soft_max = 5;
double
The costPerSquareHourAfterQuadraticSoftMax.
getDefaultInstanceForType()
publicVehicle.DurationLimitgetDefaultInstanceForType()getDescriptorForType()
publicDescriptors.DescriptorgetDescriptorForType()getMaxDuration()
publicDurationgetMaxDuration()A hard limit constraining the duration to be at most max_duration.
.google.protobuf.Duration max_duration = 1;
Duration
The maxDuration.
getMaxDurationBuilder()
publicDuration.BuildergetMaxDurationBuilder()A hard limit constraining the duration to be at most max_duration.
.google.protobuf.Duration max_duration = 1;
getMaxDurationOrBuilder()
publicDurationOrBuildergetMaxDurationOrBuilder()A hard limit constraining the duration to be at most max_duration.
.google.protobuf.Duration max_duration = 1;
getQuadraticSoftMaxDuration()
publicDurationgetQuadraticSoftMaxDuration() 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;
Duration
The quadraticSoftMaxDuration.
getQuadraticSoftMaxDurationBuilder()
publicDuration.BuildergetQuadraticSoftMaxDurationBuilder() 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;
getQuadraticSoftMaxDurationOrBuilder()
publicDurationOrBuildergetQuadraticSoftMaxDurationOrBuilder() 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;
getSoftMaxDuration()
publicDurationgetSoftMaxDuration() 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;
Duration
The softMaxDuration.
getSoftMaxDurationBuilder()
publicDuration.BuildergetSoftMaxDurationBuilder() 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;
getSoftMaxDurationOrBuilder()
publicDurationOrBuildergetSoftMaxDurationOrBuilder() 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;
hasCostPerHourAfterSoftMax()
publicbooleanhasCostPerHourAfterSoftMax() 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:
<code><code>
cost_per_hour_after_soft_max * (duration - soft_max_duration)
</code></code>
The cost must be nonnegative.
optional double cost_per_hour_after_soft_max = 3;
boolean
Whether the costPerHourAfterSoftMax field is set.
hasCostPerSquareHourAfterQuadraticSoftMax()
publicbooleanhasCostPerSquareHourAfterQuadraticSoftMax() 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:
<code><code>
cost_per_square_hour_after_quadratic_soft_max *
(duration - quadratic_soft_max_duration)^2
</code></code>
The cost must be nonnegative.
optional double cost_per_square_hour_after_quadratic_soft_max = 5;
boolean
Whether the costPerSquareHourAfterQuadraticSoftMax field is set.
hasMaxDuration()
publicbooleanhasMaxDuration()A hard limit constraining the duration to be at most max_duration.
.google.protobuf.Duration max_duration = 1;
boolean
Whether the maxDuration field is set.
hasQuadraticSoftMaxDuration()
publicbooleanhasQuadraticSoftMaxDuration() 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;
boolean
Whether the quadraticSoftMaxDuration field is set.
hasSoftMaxDuration()
publicbooleanhasSoftMaxDuration() 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;
boolean
Whether the softMaxDuration field is set.
internalGetFieldAccessorTable()
protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()isInitialized()
publicfinalbooleanisInitialized()mergeFrom(Vehicle.DurationLimit other)
publicVehicle.DurationLimit.BuildermergeFrom(Vehicle.DurationLimitother)mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
publicVehicle.DurationLimit.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)mergeFrom(Message other)
publicVehicle.DurationLimit.BuildermergeFrom(Messageother)mergeMaxDuration(Duration value)
publicVehicle.DurationLimit.BuildermergeMaxDuration(Durationvalue)A hard limit constraining the duration to be at most max_duration.
.google.protobuf.Duration max_duration = 1;
mergeQuadraticSoftMaxDuration(Duration value)
publicVehicle.DurationLimit.BuildermergeQuadraticSoftMaxDuration(Durationvalue) 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;
mergeSoftMaxDuration(Duration value)
publicVehicle.DurationLimit.BuildermergeSoftMaxDuration(Durationvalue) 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;
mergeUnknownFields(UnknownFieldSet unknownFields)
publicfinalVehicle.DurationLimit.BuildermergeUnknownFields(UnknownFieldSetunknownFields)setCostPerHourAfterSoftMax(double value)
publicVehicle.DurationLimit.BuildersetCostPerHourAfterSoftMax(doublevalue) 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:
<code><code>
cost_per_hour_after_soft_max * (duration - soft_max_duration)
</code></code>
The cost must be nonnegative.
optional double cost_per_hour_after_soft_max = 3;
Vehicle.DurationLimit.Builder
This builder for chaining.
setCostPerSquareHourAfterQuadraticSoftMax(double value)
publicVehicle.DurationLimit.BuildersetCostPerSquareHourAfterQuadraticSoftMax(doublevalue) 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:
<code><code>
cost_per_square_hour_after_quadratic_soft_max *
(duration - quadratic_soft_max_duration)^2
</code></code>
The cost must be nonnegative.
optional double cost_per_square_hour_after_quadratic_soft_max = 5;
Vehicle.DurationLimit.Builder
This builder for chaining.
setField(Descriptors.FieldDescriptor field, Object value)
publicVehicle.DurationLimit.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)setMaxDuration(Duration value)
publicVehicle.DurationLimit.BuildersetMaxDuration(Durationvalue)A hard limit constraining the duration to be at most max_duration.
.google.protobuf.Duration max_duration = 1;
setMaxDuration(Duration.Builder builderForValue)
publicVehicle.DurationLimit.BuildersetMaxDuration(Duration.BuilderbuilderForValue)A hard limit constraining the duration to be at most max_duration.
.google.protobuf.Duration max_duration = 1;
setQuadraticSoftMaxDuration(Duration value)
publicVehicle.DurationLimit.BuildersetQuadraticSoftMaxDuration(Durationvalue) 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;
setQuadraticSoftMaxDuration(Duration.Builder builderForValue)
publicVehicle.DurationLimit.BuildersetQuadraticSoftMaxDuration(Duration.BuilderbuilderForValue) 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;
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
publicVehicle.DurationLimit.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)setSoftMaxDuration(Duration value)
publicVehicle.DurationLimit.BuildersetSoftMaxDuration(Durationvalue) 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;
setSoftMaxDuration(Duration.Builder builderForValue)
publicVehicle.DurationLimit.BuildersetSoftMaxDuration(Duration.BuilderbuilderForValue) 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;
setUnknownFields(UnknownFieldSet unknownFields)
publicfinalVehicle.DurationLimit.BuildersetUnknownFields(UnknownFieldSetunknownFields)