Class BreakRule.BreakRequest.Builder (1.15.0)

public static final class BreakRule.BreakRequest.Builder extends GeneratedMessageV3.Builder<BreakRule.BreakRequest.Builder> implements BreakRule.BreakRequestOrBuilder

The sequence of breaks (i.e. their number and order) that apply to each vehicle must be known beforehand. The repeated BreakRequests define that sequence, in the order in which they must occur. Their time windows (earliest_start_time / latest_start_time) may overlap, but they must be compatible with the order (this is checked).

Protobuf type google.cloud.optimization.v1.BreakRule.BreakRequest

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public BreakRule.BreakRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
BreakRule.BreakRequest.Builder
Overrides

build()

public BreakRule.BreakRequest build()
Returns
TypeDescription
BreakRule.BreakRequest

buildPartial()

public BreakRule.BreakRequest buildPartial()
Returns
TypeDescription
BreakRule.BreakRequest

clear()

public BreakRule.BreakRequest.Builder clear()
Returns
TypeDescription
BreakRule.BreakRequest.Builder
Overrides

clearEarliestStartTime()

public BreakRule.BreakRequest.Builder clearEarliestStartTime()

Required. Lower bound (inclusive) on the start of the break.

.google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
BreakRule.BreakRequest.Builder

clearField(Descriptors.FieldDescriptor field)

public BreakRule.BreakRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
BreakRule.BreakRequest.Builder
Overrides

clearLatestStartTime()

public BreakRule.BreakRequest.Builder clearLatestStartTime()

Required. Upper bound (inclusive) on the start of the break.

.google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
BreakRule.BreakRequest.Builder

clearMinDuration()

public BreakRule.BreakRequest.Builder clearMinDuration()

Required. Minimum duration of the break. Must be positive.

.google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
BreakRule.BreakRequest.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public BreakRule.BreakRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
BreakRule.BreakRequest.Builder
Overrides

clone()

public BreakRule.BreakRequest.Builder clone()
Returns
TypeDescription
BreakRule.BreakRequest.Builder
Overrides

getDefaultInstanceForType()

public BreakRule.BreakRequest getDefaultInstanceForType()
Returns
TypeDescription
BreakRule.BreakRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getEarliestStartTime()

public Timestamp getEarliestStartTime()

Required. Lower bound (inclusive) on the start of the break.

.google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
Timestamp

The earliestStartTime.

getEarliestStartTimeBuilder()

public Timestamp.Builder getEarliestStartTimeBuilder()

Required. Lower bound (inclusive) on the start of the break.

.google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
Builder

getEarliestStartTimeOrBuilder()

public TimestampOrBuilder getEarliestStartTimeOrBuilder()

Required. Lower bound (inclusive) on the start of the break.

.google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
TimestampOrBuilder

getLatestStartTime()

public Timestamp getLatestStartTime()

Required. Upper bound (inclusive) on the start of the break.

.google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
Timestamp

The latestStartTime.

getLatestStartTimeBuilder()

public Timestamp.Builder getLatestStartTimeBuilder()

Required. Upper bound (inclusive) on the start of the break.

.google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
Builder

getLatestStartTimeOrBuilder()

public TimestampOrBuilder getLatestStartTimeOrBuilder()

Required. Upper bound (inclusive) on the start of the break.

.google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
TimestampOrBuilder

getMinDuration()

public Duration getMinDuration()

Required. Minimum duration of the break. Must be positive.

.google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
Duration

The minDuration.

getMinDurationBuilder()

public Duration.Builder getMinDurationBuilder()

Required. Minimum duration of the break. Must be positive.

.google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
Builder

getMinDurationOrBuilder()

public DurationOrBuilder getMinDurationOrBuilder()

Required. Minimum duration of the break. Must be positive.

.google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
DurationOrBuilder

hasEarliestStartTime()

public boolean hasEarliestStartTime()

Required. Lower bound (inclusive) on the start of the break.

.google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
boolean

Whether the earliestStartTime field is set.

hasLatestStartTime()

public boolean hasLatestStartTime()

Required. Upper bound (inclusive) on the start of the break.

.google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
boolean

Whether the latestStartTime field is set.

hasMinDuration()

public boolean hasMinDuration()

Required. Minimum duration of the break. Must be positive.

.google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
boolean

Whether the minDuration field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeEarliestStartTime(Timestamp value)

public BreakRule.BreakRequest.Builder mergeEarliestStartTime(Timestamp value)

Required. Lower bound (inclusive) on the start of the break.

.google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
BreakRule.BreakRequest.Builder

mergeFrom(BreakRule.BreakRequest other)

public BreakRule.BreakRequest.Builder mergeFrom(BreakRule.BreakRequest other)
Parameter
NameDescription
otherBreakRule.BreakRequest
Returns
TypeDescription
BreakRule.BreakRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public BreakRule.BreakRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BreakRule.BreakRequest.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public BreakRule.BreakRequest.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
BreakRule.BreakRequest.Builder
Overrides

mergeLatestStartTime(Timestamp value)

public BreakRule.BreakRequest.Builder mergeLatestStartTime(Timestamp value)

Required. Upper bound (inclusive) on the start of the break.

.google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
BreakRule.BreakRequest.Builder

mergeMinDuration(Duration value)

public BreakRule.BreakRequest.Builder mergeMinDuration(Duration value)

Required. Minimum duration of the break. Must be positive.

.google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueDuration
Returns
TypeDescription
BreakRule.BreakRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final BreakRule.BreakRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
BreakRule.BreakRequest.Builder
Overrides

setEarliestStartTime(Timestamp value)

public BreakRule.BreakRequest.Builder setEarliestStartTime(Timestamp value)

Required. Lower bound (inclusive) on the start of the break.

.google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
BreakRule.BreakRequest.Builder

setEarliestStartTime(Timestamp.Builder builderForValue)

public BreakRule.BreakRequest.Builder setEarliestStartTime(Timestamp.Builder builderForValue)

Required. Lower bound (inclusive) on the start of the break.

.google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
BreakRule.BreakRequest.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public BreakRule.BreakRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
BreakRule.BreakRequest.Builder
Overrides

setLatestStartTime(Timestamp value)

public BreakRule.BreakRequest.Builder setLatestStartTime(Timestamp value)

Required. Upper bound (inclusive) on the start of the break.

.google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
BreakRule.BreakRequest.Builder

setLatestStartTime(Timestamp.Builder builderForValue)

public BreakRule.BreakRequest.Builder setLatestStartTime(Timestamp.Builder builderForValue)

Required. Upper bound (inclusive) on the start of the break.

.google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
BreakRule.BreakRequest.Builder

setMinDuration(Duration value)

public BreakRule.BreakRequest.Builder setMinDuration(Duration value)

Required. Minimum duration of the break. Must be positive.

.google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueDuration
Returns
TypeDescription
BreakRule.BreakRequest.Builder

setMinDuration(Duration.Builder builderForValue)

public BreakRule.BreakRequest.Builder setMinDuration(Duration.Builder builderForValue)

Required. Minimum duration of the break. Must be positive.

.google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
BreakRule.BreakRequest.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public BreakRule.BreakRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
BreakRule.BreakRequest.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final BreakRule.BreakRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
BreakRule.BreakRequest.Builder
Overrides