Class WatchResponse.Builder

  • All Implemented Interfaces:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, WatchResponseOrBuilder, java.lang.Cloneable
    Enclosing class:
    WatchResponse

    public static final class WatchResponse.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<WatchResponse.Builder>
    implements WatchResponseOrBuilder
    Protobuf type etcdserverpb.WatchResponse
    • 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<WatchResponse.Builder>
      • clear

        public WatchResponse.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<WatchResponse.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<WatchResponse.Builder>
      • getDefaultInstanceForType

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

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

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

        public WatchResponse.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<WatchResponse.Builder>
      • setField

        public WatchResponse.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                              java.lang.Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<WatchResponse.Builder>
      • clearField

        public WatchResponse.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<WatchResponse.Builder>
      • clearOneof

        public WatchResponse.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<WatchResponse.Builder>
      • setRepeatedField

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

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

        public WatchResponse.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<WatchResponse.Builder>
      • isInitialized

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

        public WatchResponse.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                        throws java.io.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<WatchResponse.Builder>
        Throws:
        java.io.IOException
      • hasHeader

        public boolean hasHeader()
        .etcdserverpb.ResponseHeader header = 1;
        Specified by:
        hasHeader in interface WatchResponseOrBuilder
        Returns:
        Whether the header field is set.
      • getHeaderBuilder

        public ResponseHeader.Builder getHeaderBuilder()
        .etcdserverpb.ResponseHeader header = 1;
      • getWatchId

        public long getWatchId()
         watch_id is the ID of the watcher that corresponds to the response.
         
        int64 watch_id = 2;
        Specified by:
        getWatchId in interface WatchResponseOrBuilder
        Returns:
        The watchId.
      • setWatchId

        public WatchResponse.Builder setWatchId​(long value)
         watch_id is the ID of the watcher that corresponds to the response.
         
        int64 watch_id = 2;
        Parameters:
        value - The watchId to set.
        Returns:
        This builder for chaining.
      • clearWatchId

        public WatchResponse.Builder clearWatchId()
         watch_id is the ID of the watcher that corresponds to the response.
         
        int64 watch_id = 2;
        Returns:
        This builder for chaining.
      • getCreated

        public boolean getCreated()
         created is set to true if the response is for a create watch request.
         The client should record the watch_id and expect to receive events for
         the created watcher from the same stream.
         All events sent to the created watcher will attach with the same watch_id.
         
        bool created = 3;
        Specified by:
        getCreated in interface WatchResponseOrBuilder
        Returns:
        The created.
      • setCreated

        public WatchResponse.Builder setCreated​(boolean value)
         created is set to true if the response is for a create watch request.
         The client should record the watch_id and expect to receive events for
         the created watcher from the same stream.
         All events sent to the created watcher will attach with the same watch_id.
         
        bool created = 3;
        Parameters:
        value - The created to set.
        Returns:
        This builder for chaining.
      • clearCreated

        public WatchResponse.Builder clearCreated()
         created is set to true if the response is for a create watch request.
         The client should record the watch_id and expect to receive events for
         the created watcher from the same stream.
         All events sent to the created watcher will attach with the same watch_id.
         
        bool created = 3;
        Returns:
        This builder for chaining.
      • getCanceled

        public boolean getCanceled()
         canceled is set to true if the response is for a cancel watch request.
         No further events will be sent to the canceled watcher.
         
        bool canceled = 4;
        Specified by:
        getCanceled in interface WatchResponseOrBuilder
        Returns:
        The canceled.
      • setCanceled

        public WatchResponse.Builder setCanceled​(boolean value)
         canceled is set to true if the response is for a cancel watch request.
         No further events will be sent to the canceled watcher.
         
        bool canceled = 4;
        Parameters:
        value - The canceled to set.
        Returns:
        This builder for chaining.
      • clearCanceled

        public WatchResponse.Builder clearCanceled()
         canceled is set to true if the response is for a cancel watch request.
         No further events will be sent to the canceled watcher.
         
        bool canceled = 4;
        Returns:
        This builder for chaining.
      • getCompactRevision

        public long getCompactRevision()
         compact_revision is set to the minimum index if a watcher tries to watch
         at a compacted index.
         This happens when creating a watcher at a compacted revision or the watcher cannot
         catch up with the progress of the key-value store.
         The client should treat the watcher as canceled and should not try to create any
         watcher with the same start_revision again.
         
        int64 compact_revision = 5;
        Specified by:
        getCompactRevision in interface WatchResponseOrBuilder
        Returns:
        The compactRevision.
      • setCompactRevision

        public WatchResponse.Builder setCompactRevision​(long value)
         compact_revision is set to the minimum index if a watcher tries to watch
         at a compacted index.
         This happens when creating a watcher at a compacted revision or the watcher cannot
         catch up with the progress of the key-value store.
         The client should treat the watcher as canceled and should not try to create any
         watcher with the same start_revision again.
         
        int64 compact_revision = 5;
        Parameters:
        value - The compactRevision to set.
        Returns:
        This builder for chaining.
      • clearCompactRevision

        public WatchResponse.Builder clearCompactRevision()
         compact_revision is set to the minimum index if a watcher tries to watch
         at a compacted index.
         This happens when creating a watcher at a compacted revision or the watcher cannot
         catch up with the progress of the key-value store.
         The client should treat the watcher as canceled and should not try to create any
         watcher with the same start_revision again.
         
        int64 compact_revision = 5;
        Returns:
        This builder for chaining.
      • getCancelReason

        public java.lang.String getCancelReason()
         cancel_reason indicates the reason for canceling the watcher.
         
        string cancel_reason = 6;
        Specified by:
        getCancelReason in interface WatchResponseOrBuilder
        Returns:
        The cancelReason.
      • getCancelReasonBytes

        public com.google.protobuf.ByteString getCancelReasonBytes()
         cancel_reason indicates the reason for canceling the watcher.
         
        string cancel_reason = 6;
        Specified by:
        getCancelReasonBytes in interface WatchResponseOrBuilder
        Returns:
        The bytes for cancelReason.
      • setCancelReason

        public WatchResponse.Builder setCancelReason​(java.lang.String value)
         cancel_reason indicates the reason for canceling the watcher.
         
        string cancel_reason = 6;
        Parameters:
        value - The cancelReason to set.
        Returns:
        This builder for chaining.
      • clearCancelReason

        public WatchResponse.Builder clearCancelReason()
         cancel_reason indicates the reason for canceling the watcher.
         
        string cancel_reason = 6;
        Returns:
        This builder for chaining.
      • setCancelReasonBytes

        public WatchResponse.Builder setCancelReasonBytes​(com.google.protobuf.ByteString value)
         cancel_reason indicates the reason for canceling the watcher.
         
        string cancel_reason = 6;
        Parameters:
        value - The bytes for cancelReason to set.
        Returns:
        This builder for chaining.
      • addAllEvents

        public WatchResponse.Builder addAllEvents​(java.lang.Iterable<? extends Event> values)
        repeated .mvccpb.Event events = 11;
      • removeEvents

        public WatchResponse.Builder removeEvents​(int index)
        repeated .mvccpb.Event events = 11;
      • getEventsBuilder

        public Event.Builder getEventsBuilder​(int index)
        repeated .mvccpb.Event events = 11;
      • addEventsBuilder

        public Event.Builder addEventsBuilder()
        repeated .mvccpb.Event events = 11;
      • addEventsBuilder

        public Event.Builder addEventsBuilder​(int index)
        repeated .mvccpb.Event events = 11;
      • getEventsBuilderList

        public java.util.List<Event.Builder> getEventsBuilderList()
        repeated .mvccpb.Event events = 11;
      • setUnknownFields

        public final WatchResponse.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<WatchResponse.Builder>
      • mergeUnknownFields

        public final WatchResponse.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<WatchResponse.Builder>