io.etcd.jetcd.api

## Class WatchResponse.Builder

- java.lang.Object
- - com.google.protobuf.AbstractMessageLite.Builder
  - - com.google.protobuf.AbstractMessage.Builder<BuilderType>
    - - com.google.protobuf.GeneratedMessageV3.Builder<WatchResponse.Builder>
      - - io.etcd.jetcd.api.WatchResponse.Builder

All Implemented Interfaces:
  com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, WatchResponseOrBuilder, 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 Summary

All Methods Static Methods Instance Methods Concrete Methods
`WatchResponse.Builder` `addAllEvents(Iterable<? extends Event> values)` `repeated .mvccpb.Event events = 11;`
`WatchResponse.Builder` `addEvents(Event.Builder builderForValue)` `repeated .mvccpb.Event events = 11;`
`WatchResponse.Builder` `addEvents(Event value)` `repeated .mvccpb.Event events = 11;`
`WatchResponse.Builder` `addEvents(int index, Event.Builder builderForValue)` `repeated .mvccpb.Event events = 11;`
`WatchResponse.Builder` `addEvents(int index, Event value)` `repeated .mvccpb.Event events = 11;`
`Event.Builder` `addEventsBuilder()` `repeated .mvccpb.Event events = 11;`
`Event.Builder` `addEventsBuilder(int index)` `repeated .mvccpb.Event events = 11;`
`WatchResponse.Builder` `addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)`
`WatchResponse` `build()`
`WatchResponse` `buildPartial()`
`WatchResponse.Builder` `clear()`
`WatchResponse.Builder` `clearCanceled()` canceled is set to true if the response is for a cancel watch request.
`WatchResponse.Builder` `clearCancelReason()` cancel_reason indicates the reason for canceling the watcher.
`WatchResponse.Builder` `clearCompactRevision()` compact_revision is set to the minimum index if a watcher tries to watch at a compacted index.
`WatchResponse.Builder` `clearCreated()` created is set to true if the response is for a create watch request.
`WatchResponse.Builder` `clearEvents()` `repeated .mvccpb.Event events = 11;`
`WatchResponse.Builder` `clearField(com.google.protobuf.Descriptors.FieldDescriptor field)`
`WatchResponse.Builder` `clearHeader()` `.etcdserverpb.ResponseHeader header = 1;`
`WatchResponse.Builder` `clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)`
`WatchResponse.Builder` `clearWatchId()` watch_id is the ID of the watcher that corresponds to the response.
`WatchResponse.Builder` `clone()`
`boolean` `getCanceled()` canceled is set to true if the response is for a cancel watch request.
`String` `getCancelReason()` cancel_reason indicates the reason for canceling the watcher.
`com.google.protobuf.ByteString` `getCancelReasonBytes()` cancel_reason indicates the reason for canceling the watcher.
`long` `getCompactRevision()` compact_revision is set to the minimum index if a watcher tries to watch at a compacted index.
`boolean` `getCreated()` created is set to true if the response is for a create watch request.
`WatchResponse` `getDefaultInstanceForType()`
`static com.google.protobuf.Descriptors.Descriptor` `getDescriptor()`
`com.google.protobuf.Descriptors.Descriptor` `getDescriptorForType()`
`Event` `getEvents(int index)` `repeated .mvccpb.Event events = 11;`
`Event.Builder` `getEventsBuilder(int index)` `repeated .mvccpb.Event events = 11;`
`List<Event.Builder>` `getEventsBuilderList()` `repeated .mvccpb.Event events = 11;`
`int` `getEventsCount()` `repeated .mvccpb.Event events = 11;`
`List<Event>` `getEventsList()` `repeated .mvccpb.Event events = 11;`
`EventOrBuilder` `getEventsOrBuilder(int index)` `repeated .mvccpb.Event events = 11;`
`List<? extends EventOrBuilder>` `getEventsOrBuilderList()` `repeated .mvccpb.Event events = 11;`
`ResponseHeader` `getHeader()` `.etcdserverpb.ResponseHeader header = 1;`
`ResponseHeader.Builder` `getHeaderBuilder()` `.etcdserverpb.ResponseHeader header = 1;`
`ResponseHeaderOrBuilder` `getHeaderOrBuilder()` `.etcdserverpb.ResponseHeader header = 1;`
`long` `getWatchId()` watch_id is the ID of the watcher that corresponds to the response.
`boolean` `hasHeader()` `.etcdserverpb.ResponseHeader header = 1;`
`protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable` `internalGetFieldAccessorTable()`
`boolean` `isInitialized()`
`WatchResponse.Builder` `mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)`
`WatchResponse.Builder` `mergeFrom(com.google.protobuf.Message other)`
`WatchResponse.Builder` `mergeFrom(WatchResponse other)`
`WatchResponse.Builder` `mergeHeader(ResponseHeader value)` `.etcdserverpb.ResponseHeader header = 1;`
`WatchResponse.Builder` `mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)`
`WatchResponse.Builder` `removeEvents(int index)` `repeated .mvccpb.Event events = 11;`
`WatchResponse.Builder` `setCanceled(boolean value)` canceled is set to true if the response is for a cancel watch request.
`WatchResponse.Builder` `setCancelReason(String value)` cancel_reason indicates the reason for canceling the watcher.
`WatchResponse.Builder` `setCancelReasonBytes(com.google.protobuf.ByteString value)` cancel_reason indicates the reason for canceling the watcher.
`WatchResponse.Builder` `setCompactRevision(long value)` compact_revision is set to the minimum index if a watcher tries to watch at a compacted index.
`WatchResponse.Builder` `setCreated(boolean value)` created is set to true if the response is for a create watch request.
`WatchResponse.Builder` `setEvents(int index, Event.Builder builderForValue)` `repeated .mvccpb.Event events = 11;`
`WatchResponse.Builder` `setEvents(int index, Event value)` `repeated .mvccpb.Event events = 11;`
`WatchResponse.Builder` `setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)`
`WatchResponse.Builder` `setHeader(ResponseHeader.Builder builderForValue)` `.etcdserverpb.ResponseHeader header = 1;`
`WatchResponse.Builder` `setHeader(ResponseHeader value)` `.etcdserverpb.ResponseHeader header = 1;`
`WatchResponse.Builder` `setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)`
`WatchResponse.Builder` `setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)`
`WatchResponse.Builder` `setWatchId(long value)` watch_id is the ID of the watcher that corresponds to the response.

### Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder

`getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3`

### Methods inherited from class com.google.protobuf.AbstractMessage.Builder

`findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString`

### Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

`addAll, addAll, mergeFrom, newUninitializedMessageException`

### Methods inherited from class java.lang.Object

`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface com.google.protobuf.MessageOrBuilder

`findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof`

### Methods inherited from interface com.google.protobuf.MessageLite.Builder

`mergeFrom`

### 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,
                                          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,
                                                  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,
                                                  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>`

#### mergeFrom

    public WatchResponse.Builder mergeFrom(WatchResponse other)

#### 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 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:
  `IOException`

#### hasHeader

    public boolean hasHeader()

`.etcdserverpb.ResponseHeader header = 1;`

Specified by:
  `hasHeader` in interface `WatchResponseOrBuilder`
Returns:
  Whether the header field is set.

#### getHeader

    public ResponseHeader getHeader()

`.etcdserverpb.ResponseHeader header = 1;`

Specified by:
  `getHeader` in interface `WatchResponseOrBuilder`
Returns:
  The header.

#### setHeader

    public WatchResponse.Builder setHeader(ResponseHeader value)

`.etcdserverpb.ResponseHeader header = 1;`

#### setHeader

    public WatchResponse.Builder setHeader(ResponseHeader.Builder builderForValue)

`.etcdserverpb.ResponseHeader header = 1;`

#### mergeHeader

    public WatchResponse.Builder mergeHeader(ResponseHeader value)

`.etcdserverpb.ResponseHeader header = 1;`

#### clearHeader

    public WatchResponse.Builder clearHeader()

`.etcdserverpb.ResponseHeader header = 1;`

#### getHeaderBuilder

    public ResponseHeader.Builder getHeaderBuilder()

`.etcdserverpb.ResponseHeader header = 1;`

#### getHeaderOrBuilder

    public ResponseHeaderOrBuilder getHeaderOrBuilder()

`.etcdserverpb.ResponseHeader header = 1;`

Specified by:
  `getHeaderOrBuilder` in interface `WatchResponseOrBuilder`

#### 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 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(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.

#### getEventsList

    public List<Event> getEventsList()

`repeated .mvccpb.Event events = 11;`

Specified by:
  `getEventsList` in interface `WatchResponseOrBuilder`

#### getEventsCount

    public int getEventsCount()

`repeated .mvccpb.Event events = 11;`

Specified by:
  `getEventsCount` in interface `WatchResponseOrBuilder`

#### getEvents

    public Event getEvents(int index)

`repeated .mvccpb.Event events = 11;`

Specified by:
  `getEvents` in interface `WatchResponseOrBuilder`

#### setEvents

    public WatchResponse.Builder setEvents(int index,
                                           Event value)

`repeated .mvccpb.Event events = 11;`

#### setEvents

    public WatchResponse.Builder setEvents(int index,
                                           Event.Builder builderForValue)

`repeated .mvccpb.Event events = 11;`

#### addEvents

    public WatchResponse.Builder addEvents(Event value)

`repeated .mvccpb.Event events = 11;`

#### addEvents

    public WatchResponse.Builder addEvents(int index,
                                           Event value)

`repeated .mvccpb.Event events = 11;`

#### addEvents

    public WatchResponse.Builder addEvents(Event.Builder builderForValue)

`repeated .mvccpb.Event events = 11;`

#### addEvents

    public WatchResponse.Builder addEvents(int index,
                                           Event.Builder builderForValue)

`repeated .mvccpb.Event events = 11;`

#### addAllEvents

    public WatchResponse.Builder addAllEvents(Iterable<? extends Event> values)

`repeated .mvccpb.Event events = 11;`

#### clearEvents

    public WatchResponse.Builder clearEvents()

`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;`

#### getEventsOrBuilder

    public EventOrBuilder getEventsOrBuilder(int index)

`repeated .mvccpb.Event events = 11;`

Specified by:
  `getEventsOrBuilder` in interface `WatchResponseOrBuilder`

#### getEventsOrBuilderList

    public List<? extends EventOrBuilder> getEventsOrBuilderList()

`repeated .mvccpb.Event events = 11;`

Specified by:
  `getEventsOrBuilderList` in interface `WatchResponseOrBuilder`

#### addEventsBuilder

    public Event.Builder addEventsBuilder()

`repeated .mvccpb.Event events = 11;`

#### addEventsBuilder

    public Event.Builder addEventsBuilder(int index)

`repeated .mvccpb.Event events = 11;`

#### getEventsBuilderList

    public 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>`