public static final class Snapshot.Builder extends GeneratedMessageV3.Builder<Snapshot.Builder> implements SnapshotOrBuilder
A snapshot resource. Snapshots are used in
Seek
operations, which allow you to manage message acknowledgments in bulk. That
is, you can set the acknowledgment state of messages in an existing
subscription to the state captured by a snapshot.
Protobuf type google.pubsub.v1.Snapshot
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Snapshot.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
Returns
buildPartial()
public Snapshot buildPartial()
Returns
clear()
public Snapshot.Builder clear()
Returns
Overrides
clearExpireTime()
public Snapshot.Builder clearExpireTime()
The snapshot is guaranteed to exist up until this time.
A newly-created snapshot expires no later than 7 days from the time of its
creation. Its exact lifetime is determined at creation by the existing
backlog in the source subscription. Specifically, the lifetime of the
snapshot is 7 days - (age of oldest unacked message in the subscription)
.
For example, consider a subscription whose oldest unacked message is 3 days
old. If a snapshot is created from this subscription, the snapshot -- which
will always capture this 3-day-old backlog as long as the snapshot
exists -- will expire in 4 days. The service will refuse to create a
snapshot that would expire in less than 1 hour after creation.
.google.protobuf.Timestamp expire_time = 3;
Returns
clearField(Descriptors.FieldDescriptor field)
public Snapshot.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearLabels()
public Snapshot.Builder clearLabels()
Returns
clearName()
public Snapshot.Builder clearName()
The name of the snapshot.
string name = 1;
Returns
clearOneof(Descriptors.OneofDescriptor oneof)
public Snapshot.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clearTopic()
public Snapshot.Builder clearTopic()
The name of the topic from which this snapshot is retaining messages.
string topic = 2 [(.google.api.resource_reference) = { ... }
Returns
clone()
public Snapshot.Builder clone()
Returns
Overrides
containsLabels(String key)
public boolean containsLabels(String key)
Parameter
Returns
getDefaultInstanceForType()
public Snapshot getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
getExpireTime()
public Timestamp getExpireTime()
The snapshot is guaranteed to exist up until this time.
A newly-created snapshot expires no later than 7 days from the time of its
creation. Its exact lifetime is determined at creation by the existing
backlog in the source subscription. Specifically, the lifetime of the
snapshot is 7 days - (age of oldest unacked message in the subscription)
.
For example, consider a subscription whose oldest unacked message is 3 days
old. If a snapshot is created from this subscription, the snapshot -- which
will always capture this 3-day-old backlog as long as the snapshot
exists -- will expire in 4 days. The service will refuse to create a
snapshot that would expire in less than 1 hour after creation.
.google.protobuf.Timestamp expire_time = 3;
Returns
getExpireTimeBuilder()
public Timestamp.Builder getExpireTimeBuilder()
The snapshot is guaranteed to exist up until this time.
A newly-created snapshot expires no later than 7 days from the time of its
creation. Its exact lifetime is determined at creation by the existing
backlog in the source subscription. Specifically, the lifetime of the
snapshot is 7 days - (age of oldest unacked message in the subscription)
.
For example, consider a subscription whose oldest unacked message is 3 days
old. If a snapshot is created from this subscription, the snapshot -- which
will always capture this 3-day-old backlog as long as the snapshot
exists -- will expire in 4 days. The service will refuse to create a
snapshot that would expire in less than 1 hour after creation.
.google.protobuf.Timestamp expire_time = 3;
Returns
getExpireTimeOrBuilder()
public TimestampOrBuilder getExpireTimeOrBuilder()
The snapshot is guaranteed to exist up until this time.
A newly-created snapshot expires no later than 7 days from the time of its
creation. Its exact lifetime is determined at creation by the existing
backlog in the source subscription. Specifically, the lifetime of the
snapshot is 7 days - (age of oldest unacked message in the subscription)
.
For example, consider a subscription whose oldest unacked message is 3 days
old. If a snapshot is created from this subscription, the snapshot -- which
will always capture this 3-day-old backlog as long as the snapshot
exists -- will expire in 4 days. The service will refuse to create a
snapshot that would expire in less than 1 hour after creation.
.google.protobuf.Timestamp expire_time = 3;
Returns
getLabels()
public Map<String,String> getLabels()
Returns
getLabelsCount()
public int getLabelsCount()
Returns
getLabelsMap()
public Map<String,String> getLabelsMap()
Returns
getLabelsOrDefault(String key, String defaultValue)
public String getLabelsOrDefault(String key, String defaultValue)
Parameters
Returns
getLabelsOrThrow(String key)
public String getLabelsOrThrow(String key)
Parameter
Returns
getMutableLabels()
public Map<String,String> getMutableLabels()
Use alternate mutation accessors instead.
Returns
getName()
The name of the snapshot.
string name = 1;
Returns
Type | Description |
String | The name.
|
getNameBytes()
public ByteString getNameBytes()
The name of the snapshot.
string name = 1;
Returns
getTopic()
The name of the topic from which this snapshot is retaining messages.
string topic = 2 [(.google.api.resource_reference) = { ... }
Returns
Type | Description |
String | The topic.
|
getTopicBytes()
public ByteString getTopicBytes()
The name of the topic from which this snapshot is retaining messages.
string topic = 2 [(.google.api.resource_reference) = { ... }
Returns
hasExpireTime()
public boolean hasExpireTime()
The snapshot is guaranteed to exist up until this time.
A newly-created snapshot expires no later than 7 days from the time of its
creation. Its exact lifetime is determined at creation by the existing
backlog in the source subscription. Specifically, the lifetime of the
snapshot is 7 days - (age of oldest unacked message in the subscription)
.
For example, consider a subscription whose oldest unacked message is 3 days
old. If a snapshot is created from this subscription, the snapshot -- which
will always capture this 3-day-old backlog as long as the snapshot
exists -- will expire in 4 days. The service will refuse to create a
snapshot that would expire in less than 1 hour after creation.
.google.protobuf.Timestamp expire_time = 3;
Returns
Type | Description |
boolean | Whether the expireTime field is set.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter
Returns
Overrides
internalGetMutableMapField(int number)
protected MapField internalGetMutableMapField(int number)
Parameter
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeExpireTime(Timestamp value)
public Snapshot.Builder mergeExpireTime(Timestamp value)
The snapshot is guaranteed to exist up until this time.
A newly-created snapshot expires no later than 7 days from the time of its
creation. Its exact lifetime is determined at creation by the existing
backlog in the source subscription. Specifically, the lifetime of the
snapshot is 7 days - (age of oldest unacked message in the subscription)
.
For example, consider a subscription whose oldest unacked message is 3 days
old. If a snapshot is created from this subscription, the snapshot -- which
will always capture this 3-day-old backlog as long as the snapshot
exists -- will expire in 4 days. The service will refuse to create a
snapshot that would expire in less than 1 hour after creation.
.google.protobuf.Timestamp expire_time = 3;
Parameter
Returns
public Snapshot.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public Snapshot.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeFrom(Snapshot other)
public Snapshot.Builder mergeFrom(Snapshot other)
Parameter
Returns
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Snapshot.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
putAllLabels(Map<String,String> values)
public Snapshot.Builder putAllLabels(Map<String,String> values)
Parameter
Returns
putLabels(String key, String value)
public Snapshot.Builder putLabels(String key, String value)
Parameters
Returns
removeLabels(String key)
public Snapshot.Builder removeLabels(String key)
Parameter
Returns
setExpireTime(Timestamp value)
public Snapshot.Builder setExpireTime(Timestamp value)
The snapshot is guaranteed to exist up until this time.
A newly-created snapshot expires no later than 7 days from the time of its
creation. Its exact lifetime is determined at creation by the existing
backlog in the source subscription. Specifically, the lifetime of the
snapshot is 7 days - (age of oldest unacked message in the subscription)
.
For example, consider a subscription whose oldest unacked message is 3 days
old. If a snapshot is created from this subscription, the snapshot -- which
will always capture this 3-day-old backlog as long as the snapshot
exists -- will expire in 4 days. The service will refuse to create a
snapshot that would expire in less than 1 hour after creation.
.google.protobuf.Timestamp expire_time = 3;
Parameter
Returns
setExpireTime(Timestamp.Builder builderForValue)
public Snapshot.Builder setExpireTime(Timestamp.Builder builderForValue)
The snapshot is guaranteed to exist up until this time.
A newly-created snapshot expires no later than 7 days from the time of its
creation. Its exact lifetime is determined at creation by the existing
backlog in the source subscription. Specifically, the lifetime of the
snapshot is 7 days - (age of oldest unacked message in the subscription)
.
For example, consider a subscription whose oldest unacked message is 3 days
old. If a snapshot is created from this subscription, the snapshot -- which
will always capture this 3-day-old backlog as long as the snapshot
exists -- will expire in 4 days. The service will refuse to create a
snapshot that would expire in less than 1 hour after creation.
.google.protobuf.Timestamp expire_time = 3;
Parameter
Name | Description |
builderForValue | Builder
|
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public Snapshot.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
setName(String value)
public Snapshot.Builder setName(String value)
The name of the snapshot.
string name = 1;
Parameter
Name | Description |
value | String
The name to set.
|
Returns
setNameBytes(ByteString value)
public Snapshot.Builder setNameBytes(ByteString value)
The name of the snapshot.
string name = 1;
Parameter
Name | Description |
value | ByteString
The bytes for name to set.
|
Returns
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Snapshot.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setTopic(String value)
public Snapshot.Builder setTopic(String value)
The name of the topic from which this snapshot is retaining messages.
string topic = 2 [(.google.api.resource_reference) = { ... }
Parameter
Name | Description |
value | String
The topic to set.
|
Returns
setTopicBytes(ByteString value)
public Snapshot.Builder setTopicBytes(ByteString value)
The name of the topic from which this snapshot is retaining messages.
string topic = 2 [(.google.api.resource_reference) = { ... }
Parameter
Name | Description |
value | ByteString
The bytes for topic to set.
|
Returns
setUnknownFields(UnknownFieldSet unknownFields)
public final Snapshot.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides