Package 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,java.lang.Cloneable
- Enclosing class:
- WatchResponse
public static final class WatchResponse.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<WatchResponse.Builder> implements WatchResponseOrBuilder
Protobuf typeetcdserverpb.WatchResponse
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description WatchResponse.BuilderaddAllEvents(java.lang.Iterable<? extends Event> values)repeated .mvccpb.Event events = 11;WatchResponse.BuilderaddEvents(int index, Event value)repeated .mvccpb.Event events = 11;WatchResponse.BuilderaddEvents(int index, Event.Builder builderForValue)repeated .mvccpb.Event events = 11;WatchResponse.BuilderaddEvents(Event value)repeated .mvccpb.Event events = 11;WatchResponse.BuilderaddEvents(Event.Builder builderForValue)repeated .mvccpb.Event events = 11;Event.BuilderaddEventsBuilder()repeated .mvccpb.Event events = 11;Event.BuilderaddEventsBuilder(int index)repeated .mvccpb.Event events = 11;WatchResponse.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)WatchResponsebuild()WatchResponsebuildPartial()WatchResponse.Builderclear()WatchResponse.BuilderclearCanceled()canceled is set to true if the response is for a cancel watch request.WatchResponse.BuilderclearCancelReason()cancel_reason indicates the reason for canceling the watcher.WatchResponse.BuilderclearCompactRevision()compact_revision is set to the minimum index if a watcher tries to watch at a compacted index.WatchResponse.BuilderclearCreated()created is set to true if the response is for a create watch request.WatchResponse.BuilderclearEvents()repeated .mvccpb.Event events = 11;WatchResponse.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)WatchResponse.BuilderclearHeader().etcdserverpb.ResponseHeader header = 1;WatchResponse.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)WatchResponse.BuilderclearWatchId()watch_id is the ID of the watcher that corresponds to the response.WatchResponse.Builderclone()booleangetCanceled()canceled is set to true if the response is for a cancel watch request.java.lang.StringgetCancelReason()cancel_reason indicates the reason for canceling the watcher.com.google.protobuf.ByteStringgetCancelReasonBytes()cancel_reason indicates the reason for canceling the watcher.longgetCompactRevision()compact_revision is set to the minimum index if a watcher tries to watch at a compacted index.booleangetCreated()created is set to true if the response is for a create watch request.WatchResponsegetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()EventgetEvents(int index)repeated .mvccpb.Event events = 11;Event.BuildergetEventsBuilder(int index)repeated .mvccpb.Event events = 11;java.util.List<Event.Builder>getEventsBuilderList()repeated .mvccpb.Event events = 11;intgetEventsCount()repeated .mvccpb.Event events = 11;java.util.List<Event>getEventsList()repeated .mvccpb.Event events = 11;EventOrBuildergetEventsOrBuilder(int index)repeated .mvccpb.Event events = 11;java.util.List<? extends EventOrBuilder>getEventsOrBuilderList()repeated .mvccpb.Event events = 11;ResponseHeadergetHeader().etcdserverpb.ResponseHeader header = 1;ResponseHeader.BuildergetHeaderBuilder().etcdserverpb.ResponseHeader header = 1;ResponseHeaderOrBuildergetHeaderOrBuilder().etcdserverpb.ResponseHeader header = 1;longgetWatchId()watch_id is the ID of the watcher that corresponds to the response.booleanhasHeader().etcdserverpb.ResponseHeader header = 1;protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()WatchResponse.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)WatchResponse.BuildermergeFrom(com.google.protobuf.Message other)WatchResponse.BuildermergeFrom(WatchResponse other)WatchResponse.BuildermergeHeader(ResponseHeader value).etcdserverpb.ResponseHeader header = 1;WatchResponse.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)WatchResponse.BuilderremoveEvents(int index)repeated .mvccpb.Event events = 11;WatchResponse.BuildersetCanceled(boolean value)canceled is set to true if the response is for a cancel watch request.WatchResponse.BuildersetCancelReason(java.lang.String value)cancel_reason indicates the reason for canceling the watcher.WatchResponse.BuildersetCancelReasonBytes(com.google.protobuf.ByteString value)cancel_reason indicates the reason for canceling the watcher.WatchResponse.BuildersetCompactRevision(long value)compact_revision is set to the minimum index if a watcher tries to watch at a compacted index.WatchResponse.BuildersetCreated(boolean value)created is set to true if the response is for a create watch request.WatchResponse.BuildersetEvents(int index, Event value)repeated .mvccpb.Event events = 11;WatchResponse.BuildersetEvents(int index, Event.Builder builderForValue)repeated .mvccpb.Event events = 11;WatchResponse.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)WatchResponse.BuildersetHeader(ResponseHeader value).etcdserverpb.ResponseHeader header = 1;WatchResponse.BuildersetHeader(ResponseHeader.Builder builderForValue).etcdserverpb.ResponseHeader header = 1;WatchResponse.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)WatchResponse.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)WatchResponse.BuildersetWatchId(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
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<WatchResponse.Builder>
-
clear
public WatchResponse.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<WatchResponse.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<WatchResponse.Builder>
-
getDefaultInstanceForType
public WatchResponse getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public WatchResponse build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public WatchResponse buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public WatchResponse.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<WatchResponse.Builder>
-
setField
public WatchResponse.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<WatchResponse.Builder>
-
clearField
public WatchResponse.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<WatchResponse.Builder>
-
clearOneof
public WatchResponse.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.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:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<WatchResponse.Builder>
-
addRepeatedField
public WatchResponse.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<WatchResponse.Builder>
-
mergeFrom
public WatchResponse.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<WatchResponse.Builder>
-
mergeFrom
public WatchResponse.Builder mergeFrom(WatchResponse other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.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:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<WatchResponse.Builder>- Throws:
java.io.IOException
-
hasHeader
public boolean hasHeader()
.etcdserverpb.ResponseHeader header = 1;- Specified by:
hasHeaderin interfaceWatchResponseOrBuilder- Returns:
- Whether the header field is set.
-
getHeader
public ResponseHeader getHeader()
.etcdserverpb.ResponseHeader header = 1;- Specified by:
getHeaderin interfaceWatchResponseOrBuilder- 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:
getHeaderOrBuilderin interfaceWatchResponseOrBuilder
-
getWatchId
public long getWatchId()
watch_id is the ID of the watcher that corresponds to the response.
int64 watch_id = 2;- Specified by:
getWatchIdin interfaceWatchResponseOrBuilder- 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:
getCreatedin interfaceWatchResponseOrBuilder- 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:
getCanceledin interfaceWatchResponseOrBuilder- 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:
getCompactRevisionin interfaceWatchResponseOrBuilder- 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:
getCancelReasonin interfaceWatchResponseOrBuilder- 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:
getCancelReasonBytesin interfaceWatchResponseOrBuilder- 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.
-
getEventsList
public java.util.List<Event> getEventsList()
repeated .mvccpb.Event events = 11;- Specified by:
getEventsListin interfaceWatchResponseOrBuilder
-
getEventsCount
public int getEventsCount()
repeated .mvccpb.Event events = 11;- Specified by:
getEventsCountin interfaceWatchResponseOrBuilder
-
getEvents
public Event getEvents(int index)
repeated .mvccpb.Event events = 11;- Specified by:
getEventsin interfaceWatchResponseOrBuilder
-
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(java.lang.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:
getEventsOrBuilderin interfaceWatchResponseOrBuilder
-
getEventsOrBuilderList
public java.util.List<? extends EventOrBuilder> getEventsOrBuilderList()
repeated .mvccpb.Event events = 11;- Specified by:
getEventsOrBuilderListin interfaceWatchResponseOrBuilder
-
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:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<WatchResponse.Builder>
-
mergeUnknownFields
public final WatchResponse.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<WatchResponse.Builder>
-
-