Class BreakRule.BreakRequest.Builder

  • All Implemented Interfaces:
    BreakRule.BreakRequestOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    BreakRule.BreakRequest

    public static final class BreakRule.BreakRequest.Builder
    extends com.google.protobuf.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 `BreakRequest`s 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
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<BreakRule.BreakRequest.Builder>
      • clear

        public BreakRule.BreakRequest.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<BreakRule.BreakRequest.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<BreakRule.BreakRequest.Builder>
      • getDefaultInstanceForType

        public BreakRule.BreakRequest getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public BreakRule.BreakRequest build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public BreakRule.BreakRequest buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public BreakRule.BreakRequest.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<BreakRule.BreakRequest.Builder>
      • clearField

        public BreakRule.BreakRequest.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<BreakRule.BreakRequest.Builder>
      • clearOneof

        public BreakRule.BreakRequest.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<BreakRule.BreakRequest.Builder>
      • setRepeatedField

        public BreakRule.BreakRequest.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                               int index,
                                                               Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<BreakRule.BreakRequest.Builder>
      • addRepeatedField

        public BreakRule.BreakRequest.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                               Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<BreakRule.BreakRequest.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<BreakRule.BreakRequest.Builder>
      • mergeFrom

        public BreakRule.BreakRequest.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                 throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<BreakRule.BreakRequest.Builder>
        Throws:
        IOException
      • 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];
        Specified by:
        hasEarliestStartTime in interface BreakRule.BreakRequestOrBuilder
        Returns:
        Whether the earliestStartTime field is set.
      • getEarliestStartTime

        public com.google.protobuf.Timestamp getEarliestStartTime()
         Required. Lower bound (inclusive) on the start of the break.
         
        .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getEarliestStartTime in interface BreakRule.BreakRequestOrBuilder
        Returns:
        The earliestStartTime.
      • setEarliestStartTime

        public BreakRule.BreakRequest.Builder setEarliestStartTime​(com.google.protobuf.Timestamp value)
         Required. Lower bound (inclusive) on the start of the break.
         
        .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED];
      • setEarliestStartTime

        public BreakRule.BreakRequest.Builder setEarliestStartTime​(com.google.protobuf.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];
      • mergeEarliestStartTime

        public BreakRule.BreakRequest.Builder mergeEarliestStartTime​(com.google.protobuf.Timestamp value)
         Required. Lower bound (inclusive) on the start of the break.
         
        .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED];
      • 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];
      • getEarliestStartTimeBuilder

        public com.google.protobuf.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];
      • getEarliestStartTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getEarliestStartTimeOrBuilder()
         Required. Lower bound (inclusive) on the start of the break.
         
        .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getEarliestStartTimeOrBuilder in interface BreakRule.BreakRequestOrBuilder
      • 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];
        Specified by:
        hasLatestStartTime in interface BreakRule.BreakRequestOrBuilder
        Returns:
        Whether the latestStartTime field is set.
      • getLatestStartTime

        public com.google.protobuf.Timestamp getLatestStartTime()
         Required. Upper bound (inclusive) on the start of the break.
         
        .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getLatestStartTime in interface BreakRule.BreakRequestOrBuilder
        Returns:
        The latestStartTime.
      • setLatestStartTime

        public BreakRule.BreakRequest.Builder setLatestStartTime​(com.google.protobuf.Timestamp value)
         Required. Upper bound (inclusive) on the start of the break.
         
        .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED];
      • setLatestStartTime

        public BreakRule.BreakRequest.Builder setLatestStartTime​(com.google.protobuf.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];
      • mergeLatestStartTime

        public BreakRule.BreakRequest.Builder mergeLatestStartTime​(com.google.protobuf.Timestamp value)
         Required. Upper bound (inclusive) on the start of the break.
         
        .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED];
      • 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];
      • getLatestStartTimeBuilder

        public com.google.protobuf.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];
      • getLatestStartTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getLatestStartTimeOrBuilder()
         Required. Upper bound (inclusive) on the start of the break.
         
        .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getLatestStartTimeOrBuilder in interface BreakRule.BreakRequestOrBuilder
      • hasMinDuration

        public boolean hasMinDuration()
         Required. Minimum duration of the break. Must be positive.
         
        .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        hasMinDuration in interface BreakRule.BreakRequestOrBuilder
        Returns:
        Whether the minDuration field is set.
      • getMinDuration

        public com.google.protobuf.Duration getMinDuration()
         Required. Minimum duration of the break. Must be positive.
         
        .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getMinDuration in interface BreakRule.BreakRequestOrBuilder
        Returns:
        The minDuration.
      • setMinDuration

        public BreakRule.BreakRequest.Builder setMinDuration​(com.google.protobuf.Duration value)
         Required. Minimum duration of the break. Must be positive.
         
        .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED];
      • setMinDuration

        public BreakRule.BreakRequest.Builder setMinDuration​(com.google.protobuf.Duration.Builder builderForValue)
         Required. Minimum duration of the break. Must be positive.
         
        .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED];
      • mergeMinDuration

        public BreakRule.BreakRequest.Builder mergeMinDuration​(com.google.protobuf.Duration value)
         Required. Minimum duration of the break. Must be positive.
         
        .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED];
      • 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];
      • getMinDurationBuilder

        public com.google.protobuf.Duration.Builder getMinDurationBuilder()
         Required. Minimum duration of the break. Must be positive.
         
        .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED];
      • getMinDurationOrBuilder

        public com.google.protobuf.DurationOrBuilder getMinDurationOrBuilder()
         Required. Minimum duration of the break. Must be positive.
         
        .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getMinDurationOrBuilder in interface BreakRule.BreakRequestOrBuilder
      • setUnknownFields

        public final BreakRule.BreakRequest.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<BreakRule.BreakRequest.Builder>
      • mergeUnknownFields

        public final BreakRule.BreakRequest.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<BreakRule.BreakRequest.Builder>