public static final class Snapshot.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder> implements SnapshotOrBuilder
A snapshot resource. Snapshots are used in [Seek](https://cloud.google.com/pubsub/docs/replay-overview) 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
Modifier and Type | Method and Description |
---|---|
Snapshot.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
Snapshot |
build() |
Snapshot |
buildPartial() |
Snapshot.Builder |
clear() |
Snapshot.Builder |
clearExpireTime()
The snapshot is guaranteed to exist up until this time.
|
Snapshot.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
Snapshot.Builder |
clearLabels() |
Snapshot.Builder |
clearName()
The name of the snapshot.
|
Snapshot.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
Snapshot.Builder |
clearTopic()
The name of the topic from which this snapshot is retaining messages.
|
Snapshot.Builder |
clone() |
boolean |
containsLabels(String key)
See [Creating and managing labels]
(https://cloud.google.com/pubsub/docs/labels).
|
Snapshot |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
com.google.protobuf.Timestamp |
getExpireTime()
The snapshot is guaranteed to exist up until this time.
|
com.google.protobuf.Timestamp.Builder |
getExpireTimeBuilder()
The snapshot is guaranteed to exist up until this time.
|
com.google.protobuf.TimestampOrBuilder |
getExpireTimeOrBuilder()
The snapshot is guaranteed to exist up until this time.
|
Map<String,String> |
getLabels()
Deprecated.
|
int |
getLabelsCount()
See [Creating and managing labels]
(https://cloud.google.com/pubsub/docs/labels).
|
Map<String,String> |
getLabelsMap()
See [Creating and managing labels]
(https://cloud.google.com/pubsub/docs/labels).
|
String |
getLabelsOrDefault(String key,
String defaultValue)
See [Creating and managing labels]
(https://cloud.google.com/pubsub/docs/labels).
|
String |
getLabelsOrThrow(String key)
See [Creating and managing labels]
(https://cloud.google.com/pubsub/docs/labels).
|
Map<String,String> |
getMutableLabels()
Deprecated.
|
String |
getName()
The name of the snapshot.
|
com.google.protobuf.ByteString |
getNameBytes()
The name of the snapshot.
|
String |
getTopic()
The name of the topic from which this snapshot is retaining messages.
|
com.google.protobuf.ByteString |
getTopicBytes()
The name of the topic from which this snapshot is retaining messages.
|
boolean |
hasExpireTime()
The snapshot is guaranteed to exist up until this time.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
protected com.google.protobuf.MapField |
internalGetMapField(int number) |
protected com.google.protobuf.MapField |
internalGetMutableMapField(int number) |
boolean |
isInitialized() |
Snapshot.Builder |
mergeExpireTime(com.google.protobuf.Timestamp value)
The snapshot is guaranteed to exist up until this time.
|
Snapshot.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
Snapshot.Builder |
mergeFrom(com.google.protobuf.Message other) |
Snapshot.Builder |
mergeFrom(Snapshot other) |
Snapshot.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
Snapshot.Builder |
putAllLabels(Map<String,String> values)
See [Creating and managing labels]
(https://cloud.google.com/pubsub/docs/labels).
|
Snapshot.Builder |
putLabels(String key,
String value)
See [Creating and managing labels]
(https://cloud.google.com/pubsub/docs/labels).
|
Snapshot.Builder |
removeLabels(String key)
See [Creating and managing labels]
(https://cloud.google.com/pubsub/docs/labels).
|
Snapshot.Builder |
setExpireTime(com.google.protobuf.Timestamp.Builder builderForValue)
The snapshot is guaranteed to exist up until this time.
|
Snapshot.Builder |
setExpireTime(com.google.protobuf.Timestamp value)
The snapshot is guaranteed to exist up until this time.
|
Snapshot.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
Snapshot.Builder |
setName(String value)
The name of the snapshot.
|
Snapshot.Builder |
setNameBytes(com.google.protobuf.ByteString value)
The name of the snapshot.
|
Snapshot.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
Snapshot.Builder |
setTopic(String value)
The name of the topic from which this snapshot is retaining messages.
|
Snapshot.Builder |
setTopicBytes(com.google.protobuf.ByteString value)
The name of the topic from which this snapshot is retaining messages.
|
Snapshot.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.MapField internalGetMapField(int number)
internalGetMapField
in class com.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
protected com.google.protobuf.MapField internalGetMutableMapField(int number)
internalGetMutableMapField
in class com.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class com.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
public Snapshot.Builder clear()
clear
in interface com.google.protobuf.Message.Builder
clear
in interface com.google.protobuf.MessageLite.Builder
clear
in class com.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType
in interface com.google.protobuf.Message.Builder
getDescriptorForType
in interface com.google.protobuf.MessageOrBuilder
getDescriptorForType
in class com.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
public Snapshot getDefaultInstanceForType()
getDefaultInstanceForType
in interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType
in interface com.google.protobuf.MessageOrBuilder
public Snapshot build()
build
in interface com.google.protobuf.Message.Builder
build
in interface com.google.protobuf.MessageLite.Builder
public Snapshot buildPartial()
buildPartial
in interface com.google.protobuf.Message.Builder
buildPartial
in interface com.google.protobuf.MessageLite.Builder
public Snapshot.Builder clone()
clone
in interface com.google.protobuf.Message.Builder
clone
in interface com.google.protobuf.MessageLite.Builder
clone
in class com.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
public Snapshot.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField
in interface com.google.protobuf.Message.Builder
setField
in class com.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
public Snapshot.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField
in interface com.google.protobuf.Message.Builder
clearField
in class com.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
public Snapshot.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof
in interface com.google.protobuf.Message.Builder
clearOneof
in class com.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
public Snapshot.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField
in interface com.google.protobuf.Message.Builder
setRepeatedField
in class com.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
public Snapshot.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField
in interface com.google.protobuf.Message.Builder
addRepeatedField
in class com.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
public Snapshot.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom
in interface com.google.protobuf.Message.Builder
mergeFrom
in class com.google.protobuf.AbstractMessage.Builder<Snapshot.Builder>
public Snapshot.Builder mergeFrom(Snapshot other)
public final boolean isInitialized()
isInitialized
in interface com.google.protobuf.MessageLiteOrBuilder
isInitialized
in class com.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
public Snapshot.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom
in interface com.google.protobuf.Message.Builder
mergeFrom
in interface com.google.protobuf.MessageLite.Builder
mergeFrom
in class com.google.protobuf.AbstractMessage.Builder<Snapshot.Builder>
IOException
public String getName()
The name of the snapshot.
string name = 1;
getName
in interface SnapshotOrBuilder
public com.google.protobuf.ByteString getNameBytes()
The name of the snapshot.
string name = 1;
getNameBytes
in interface SnapshotOrBuilder
public Snapshot.Builder setName(String value)
The name of the snapshot.
string name = 1;
value
- The name to set.public Snapshot.Builder clearName()
The name of the snapshot.
string name = 1;
public Snapshot.Builder setNameBytes(com.google.protobuf.ByteString value)
The name of the snapshot.
string name = 1;
value
- The bytes for name to set.public String getTopic()
The name of the topic from which this snapshot is retaining messages.
string topic = 2 [(.google.api.resource_reference) = { ... }
getTopic
in interface SnapshotOrBuilder
public com.google.protobuf.ByteString getTopicBytes()
The name of the topic from which this snapshot is retaining messages.
string topic = 2 [(.google.api.resource_reference) = { ... }
getTopicBytes
in interface SnapshotOrBuilder
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) = { ... }
value
- The topic to set.public Snapshot.Builder clearTopic()
The name of the topic from which this snapshot is retaining messages.
string topic = 2 [(.google.api.resource_reference) = { ... }
public Snapshot.Builder setTopicBytes(com.google.protobuf.ByteString value)
The name of the topic from which this snapshot is retaining messages.
string topic = 2 [(.google.api.resource_reference) = { ... }
value
- The bytes for topic to set.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;
hasExpireTime
in interface SnapshotOrBuilder
public com.google.protobuf.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;
getExpireTime
in interface SnapshotOrBuilder
public Snapshot.Builder setExpireTime(com.google.protobuf.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 setExpireTime(com.google.protobuf.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;
public Snapshot.Builder mergeExpireTime(com.google.protobuf.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 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;
public com.google.protobuf.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;
public com.google.protobuf.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;
getExpireTimeOrBuilder
in interface SnapshotOrBuilder
public int getLabelsCount()
SnapshotOrBuilder
See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 4;
getLabelsCount
in interface SnapshotOrBuilder
public boolean containsLabels(String key)
See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 4;
containsLabels
in interface SnapshotOrBuilder
@Deprecated public Map<String,String> getLabels()
getLabelsMap()
instead.getLabels
in interface SnapshotOrBuilder
public Map<String,String> getLabelsMap()
See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 4;
getLabelsMap
in interface SnapshotOrBuilder
public String getLabelsOrDefault(String key, String defaultValue)
See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 4;
getLabelsOrDefault
in interface SnapshotOrBuilder
public String getLabelsOrThrow(String key)
See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 4;
getLabelsOrThrow
in interface SnapshotOrBuilder
public Snapshot.Builder clearLabels()
public Snapshot.Builder removeLabels(String key)
See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 4;
@Deprecated public Map<String,String> getMutableLabels()
public Snapshot.Builder putLabels(String key, String value)
See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 4;
public Snapshot.Builder putAllLabels(Map<String,String> values)
See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 4;
public final Snapshot.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields
in interface com.google.protobuf.Message.Builder
setUnknownFields
in class com.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
public final Snapshot.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields
in interface com.google.protobuf.Message.Builder
mergeUnknownFields
in class com.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
Copyright © 2023 Google LLC. All rights reserved.