Class BreakRule.BreakRequest

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

    public static final class BreakRule.BreakRequest
    extends com.google.protobuf.GeneratedMessageV3
    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
    See Also:
    Serialized Form
    • Field Detail

      • EARLIEST_START_TIME_FIELD_NUMBER

        public static final int EARLIEST_START_TIME_FIELD_NUMBER
        See Also:
        Constant Field Values
      • LATEST_START_TIME_FIELD_NUMBER

        public static final int LATEST_START_TIME_FIELD_NUMBER
        See Also:
        Constant Field Values
      • MIN_DURATION_FIELD_NUMBER

        public static final int MIN_DURATION_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • 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
      • 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.
      • 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.
      • 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.
      • 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
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static BreakRule.BreakRequest parseFrom​(ByteBuffer data)
                                                throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static BreakRule.BreakRequest parseFrom​(ByteBuffer data,
                                                       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static BreakRule.BreakRequest parseFrom​(com.google.protobuf.ByteString data)
                                                throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static BreakRule.BreakRequest parseFrom​(com.google.protobuf.ByteString data,
                                                       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static BreakRule.BreakRequest parseFrom​(byte[] data)
                                                throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static BreakRule.BreakRequest parseFrom​(byte[] data,
                                                       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • newBuilderForType

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

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

        protected BreakRule.BreakRequest.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getParserForType

        public com.google.protobuf.Parser<BreakRule.BreakRequest> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

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