Package com.google.pubsub.v1
Class Snapshot.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
com.google.pubsub.v1.Snapshot.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,SnapshotOrBuilder,Cloneable
- Enclosing class:
- Snapshot
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-
Method Summary
Modifier and TypeMethodDescriptionaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()clear()The snapshot is guaranteed to exist up until this time.clearField(com.google.protobuf.Descriptors.FieldDescriptor field) The name of the snapshot.clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) The name of the topic from which this snapshot is retaining messages.clone()booleancontainsLabels(String key) See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.Descriptorcom.google.protobuf.TimestampThe snapshot is guaranteed to exist up until this time.com.google.protobuf.Timestamp.BuilderThe snapshot is guaranteed to exist up until this time.com.google.protobuf.TimestampOrBuilderThe snapshot is guaranteed to exist up until this time.Deprecated.intSee [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).getLabelsOrDefault(String key, String defaultValue) See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).getLabelsOrThrow(String key) See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).Deprecated.getName()The name of the snapshot.com.google.protobuf.ByteStringThe name of the snapshot.getTopic()The name of the topic from which this snapshot is retaining messages.com.google.protobuf.ByteStringThe name of the topic from which this snapshot is retaining messages.booleanThe snapshot is guaranteed to exist up until this time.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableprotected com.google.protobuf.MapFieldinternalGetMapField(int number) protected com.google.protobuf.MapFieldinternalGetMutableMapField(int number) final booleanmergeExpireTime(com.google.protobuf.Timestamp value) The snapshot is guaranteed to exist up until this time.mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) final Snapshot.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) putAllLabels(Map<String, String> values) See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).removeLabels(String key) See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).setExpireTime(com.google.protobuf.Timestamp value) The snapshot is guaranteed to exist up until this time.setExpireTime(com.google.protobuf.Timestamp.Builder builderForValue) The snapshot is guaranteed to exist up until this time.The name of the snapshot.setNameBytes(com.google.protobuf.ByteString value) The name of the snapshot.setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) The name of the topic from which this snapshot is retaining messages.setTopicBytes(com.google.protobuf.ByteString value) The name of the topic from which this snapshot is retaining messages.final Snapshot.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapFieldReflection, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetMapField
protected com.google.protobuf.MapField internalGetMapField(int number) - Overrides:
internalGetMapFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
-
internalGetMutableMapField
protected com.google.protobuf.MapField internalGetMutableMapField(int number) - Overrides:
internalGetMutableMapFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<Snapshot.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<Snapshot.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<Snapshot.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.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<Snapshot.Builder>
-
setField
public Snapshot.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
-
clearField
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
-
clearOneof
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
-
setRepeatedField
public Snapshot.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
-
addRepeatedField
public Snapshot.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Snapshot.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
-
mergeFrom
public Snapshot.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Snapshot.Builder>- Throws:
IOException
-
getName
The name of the snapshot.
string name = 1;- Specified by:
getNamein interfaceSnapshotOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()The name of the snapshot.
string name = 1;- Specified by:
getNameBytesin interfaceSnapshotOrBuilder- Returns:
- The bytes for name.
-
setName
The name of the snapshot.
string name = 1;- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
The name of the snapshot.
string name = 1;- Returns:
- This builder for chaining.
-
setNameBytes
The name of the snapshot.
string name = 1;- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
getTopic
The name of the topic from which this snapshot is retaining messages.
string topic = 2 [(.google.api.resource_reference) = { ... }- Specified by:
getTopicin interfaceSnapshotOrBuilder- Returns:
- The topic.
-
getTopicBytes
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) = { ... }- Specified by:
getTopicBytesin interfaceSnapshotOrBuilder- Returns:
- The bytes for topic.
-
setTopic
The name of the topic from which this snapshot is retaining messages.
string topic = 2 [(.google.api.resource_reference) = { ... }- Parameters:
value- The topic to set.- Returns:
- This builder for chaining.
-
clearTopic
The name of the topic from which this snapshot is retaining messages.
string topic = 2 [(.google.api.resource_reference) = { ... }- Returns:
- This builder for chaining.
-
setTopicBytes
The name of the topic from which this snapshot is retaining messages.
string topic = 2 [(.google.api.resource_reference) = { ... }- Parameters:
value- The bytes for topic to set.- Returns:
- This builder for chaining.
-
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;- Specified by:
hasExpireTimein interfaceSnapshotOrBuilder- Returns:
- Whether the expireTime field is set.
-
getExpireTime
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;- Specified by:
getExpireTimein interfaceSnapshotOrBuilder- Returns:
- The expireTime.
-
setExpireTime
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
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; -
mergeExpireTime
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; -
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; -
getExpireTimeBuilder
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; -
getExpireTimeOrBuilder
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;- Specified by:
getExpireTimeOrBuilderin interfaceSnapshotOrBuilder
-
getLabelsCount
public int getLabelsCount()Description copied from interface:SnapshotOrBuilderSee [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 4;- Specified by:
getLabelsCountin interfaceSnapshotOrBuilder
-
containsLabels
See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 4;- Specified by:
containsLabelsin interfaceSnapshotOrBuilder
-
getLabels
Deprecated.UsegetLabelsMap()instead.- Specified by:
getLabelsin interfaceSnapshotOrBuilder
-
getLabelsMap
See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 4;- Specified by:
getLabelsMapin interfaceSnapshotOrBuilder
-
getLabelsOrDefault
See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 4;- Specified by:
getLabelsOrDefaultin interfaceSnapshotOrBuilder
-
getLabelsOrThrow
See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 4;- Specified by:
getLabelsOrThrowin interfaceSnapshotOrBuilder
-
clearLabels
-
removeLabels
See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 4; -
getMutableLabels
Deprecated.Use alternate mutation accessors instead. -
putLabels
See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 4; -
putAllLabels
See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 4; -
setUnknownFields
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
-
mergeUnknownFields
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
-