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.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
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()
Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
clearField(Descriptors.FieldDescriptor field)
public Snapshot.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearLabels()
public Snapshot.Builder clearLabels()
clearName()
public Snapshot.Builder clearName()
Optional. The name of the snapshot.
string name = 1 [(.google.api.field_behavior) = OPTIONAL];
clearOneof(Descriptors.OneofDescriptor oneof)
public Snapshot.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
clearTopic()
public Snapshot.Builder clearTopic()
Optional. The name of the topic from which this snapshot is retaining
messages.
string topic = 2 [(.google.api.field_behavior) = OPTIONAL, (.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()
Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
Timestamp |
The expireTime.
|
getExpireTimeBuilder()
public Timestamp.Builder getExpireTimeBuilder()
Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
getExpireTimeOrBuilder()
public TimestampOrBuilder getExpireTimeOrBuilder()
Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
getLabels() (deprecated)
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)
Returns |
Type |
Description |
String |
|
getLabelsOrThrow(String key)
public String getLabelsOrThrow(String key)
Parameter |
Name |
Description |
key |
String
|
Returns |
Type |
Description |
String |
|
getMutableLabels() (deprecated)
public Map<String,String> getMutableLabels()
Use alternate mutation accessors instead.
getName()
Optional. The name of the snapshot.
string name = 1 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
String |
The name.
|
getNameBytes()
public ByteString getNameBytes()
Optional. The name of the snapshot.
string name = 1 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
ByteString |
The bytes for name.
|
getTopic()
Optional. The name of the topic from which this snapshot is retaining
messages.
string topic = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
Returns |
Type |
Description |
String |
The topic.
|
getTopicBytes()
public ByteString getTopicBytes()
Optional. The name of the topic from which this snapshot is retaining
messages.
string topic = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
Returns |
Type |
Description |
ByteString |
The bytes for topic.
|
hasExpireTime()
public boolean hasExpireTime()
Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
boolean |
Whether the expireTime field is set.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
internalGetMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter |
Name |
Description |
number |
int
|
Returns |
Type |
Description |
com.google.protobuf.MapFieldReflectionAccessor |
|
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
internalGetMutableMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter |
Name |
Description |
number |
int
|
Returns |
Type |
Description |
com.google.protobuf.MapFieldReflectionAccessor |
|
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
isInitialized()
public final boolean isInitialized()
Overrides
mergeExpireTime(Timestamp value)
public Snapshot.Builder mergeExpireTime(Timestamp value)
Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
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)
Parameter |
Name |
Description |
other |
Snapshot
|
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)
Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
setExpireTime(Timestamp.Builder builderForValue)
public Snapshot.Builder setExpireTime(Timestamp.Builder builderForValue)
Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
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)
Optional. The name of the snapshot.
string name = 1 [(.google.api.field_behavior) = OPTIONAL];
Parameter |
Name |
Description |
value |
String
The name to set.
|
setNameBytes(ByteString value)
public Snapshot.Builder setNameBytes(ByteString value)
Optional. The name of the snapshot.
string name = 1 [(.google.api.field_behavior) = OPTIONAL];
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)
Optional. The name of the topic from which this snapshot is retaining
messages.
string topic = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
Parameter |
Name |
Description |
value |
String
The topic to set.
|
setTopicBytes(ByteString value)
public Snapshot.Builder setTopicBytes(ByteString value)
Optional. The name of the topic from which this snapshot is retaining
messages.
string topic = 2 [(.google.api.field_behavior) = OPTIONAL, (.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