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()
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Snapshot.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
buildPartial()
public Snapshot buildPartial()
clear()
public Snapshot.Builder clear()
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;
clearField(Descriptors.FieldDescriptor field)
public Snapshot.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearLabels()
public Snapshot.Builder clearLabels()
clearName()
public Snapshot.Builder clearName()
The name of the snapshot.
string name = 1;
clearOneof(Descriptors.OneofDescriptor oneof)
public Snapshot.Builder clearOneof(Descriptors.OneofDescriptor oneof)
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) = { ... }
clone()
public Snapshot.Builder clone()
Overrides
containsLabels(String key)
public boolean containsLabels(String key)
Parameter |
---|
Name | Description |
key | String
|
getDefaultInstanceForType()
public Snapshot getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
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 |
---|
Type | Description |
Timestamp | The expireTime.
|
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;
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;
getLabels()
public Map<String,String> getLabels()
getLabelsCount()
public int getLabelsCount()
Returns |
---|
Type | Description |
int | |
getLabelsMap()
public Map<String,String> getLabelsMap()
getLabelsOrDefault(String key, String defaultValue)
public String getLabelsOrDefault(String key, String defaultValue)
getLabelsOrThrow(String key)
public String getLabelsOrThrow(String key)
Parameter |
---|
Name | Description |
key | String
|
getMutableLabels()
public Map<String,String> getMutableLabels()
Use alternate mutation accessors instead.
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 |
---|
Type | Description |
ByteString | The bytes for name.
|
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 |
---|
Type | Description |
ByteString | The bytes for topic.
|
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()
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter |
---|
Name | Description |
number | int
|
Overrides
internalGetMutableMapField(int number)
protected MapField internalGetMutableMapField(int number)
Parameter |
---|
Name | Description |
number | int
|
Overrides
isInitialized()
public final boolean isInitialized()
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;
public Snapshot.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public Snapshot.Builder mergeFrom(Message other)
Parameter |
---|
Name | Description |
other | Message
|
Overrides
mergeFrom(Snapshot other)
public Snapshot.Builder mergeFrom(Snapshot other)
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Snapshot.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Overrides
putAllLabels(Map<String,String> values)
public Snapshot.Builder putAllLabels(Map<String,String> values)
putLabels(String key, String value)
public Snapshot.Builder putLabels(String key, String value)
removeLabels(String key)
public Snapshot.Builder removeLabels(String key)
Parameter |
---|
Name | Description |
key | String
|
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;
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
|
setField(Descriptors.FieldDescriptor field, Object value)
public Snapshot.Builder setField(Descriptors.FieldDescriptor field, Object value)
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.
|
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.
|
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Snapshot.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
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.
|
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.
|
setUnknownFields(UnknownFieldSet unknownFields)
public final Snapshot.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides