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 typegoogle.pubsub.v1.Snapshot
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method 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 value)
The snapshot is guaranteed to exist up until this time.Snapshot.Builder
setExpireTime(com.google.protobuf.Timestamp.Builder builderForValue)
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)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetMapField
protected com.google.protobuf.MapField internalGetMapField(int number)
- Overrides:
internalGetMapField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
-
internalGetMutableMapField
protected com.google.protobuf.MapField internalGetMutableMapField(int number)
- Overrides:
internalGetMutableMapField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
-
clear
public Snapshot.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
-
getDefaultInstanceForType
public Snapshot getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public Snapshot build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public Snapshot buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public Snapshot.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
-
setField
public Snapshot.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
-
clearField
public Snapshot.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
-
clearOneof
public Snapshot.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
-
setRepeatedField
public Snapshot.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
-
addRepeatedField
public Snapshot.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
-
mergeFrom
public Snapshot.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Snapshot.Builder>
-
mergeFrom
public Snapshot.Builder mergeFrom(Snapshot other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in 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:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Snapshot.Builder>
- Throws:
IOException
-
getName
public String getName()
The name of the snapshot.
string name = 1;
- Specified by:
getName
in interfaceSnapshotOrBuilder
- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()
The name of the snapshot.
string name = 1;
- Specified by:
getNameBytes
in interfaceSnapshotOrBuilder
- Returns:
- The bytes for name.
-
setName
public Snapshot.Builder setName(String value)
The name of the snapshot.
string name = 1;
- Parameters:
value
- The name to set.- Returns:
- This builder for chaining.
-
clearName
public Snapshot.Builder clearName()
The name of the snapshot.
string name = 1;
- Returns:
- This builder for chaining.
-
setNameBytes
public Snapshot.Builder setNameBytes(com.google.protobuf.ByteString value)
The name of the snapshot.
string name = 1;
- Parameters:
value
- The bytes for name to set.- Returns:
- This builder for chaining.
-
getTopic
public String getTopic()
The name of the topic from which this snapshot is retaining messages.
string topic = 2 [(.google.api.resource_reference) = { ... }
- Specified by:
getTopic
in 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:
getTopicBytes
in interfaceSnapshotOrBuilder
- Returns:
- The bytes for topic.
-
setTopic
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) = { ... }
- Parameters:
value
- The topic to set.- Returns:
- This builder for chaining.
-
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:
- This builder for chaining.
-
setTopicBytes
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) = { ... }
- 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:
hasExpireTime
in 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:
getExpireTime
in interfaceSnapshotOrBuilder
- Returns:
- The expireTime.
-
setExpireTime
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;
-
setExpireTime
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;
-
mergeExpireTime
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;
-
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;
-
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:
getExpireTimeOrBuilder
in interfaceSnapshotOrBuilder
-
getLabelsCount
public int getLabelsCount()
Description copied from interface:SnapshotOrBuilder
See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 4;
- Specified by:
getLabelsCount
in interfaceSnapshotOrBuilder
-
containsLabels
public boolean containsLabels(String key)
See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 4;
- Specified by:
containsLabels
in interfaceSnapshotOrBuilder
-
getLabels
@Deprecated public Map<String,String> getLabels()
Deprecated.UsegetLabelsMap()
instead.- Specified by:
getLabels
in interfaceSnapshotOrBuilder
-
getLabelsMap
public Map<String,String> getLabelsMap()
See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 4;
- Specified by:
getLabelsMap
in interfaceSnapshotOrBuilder
-
getLabelsOrDefault
public String getLabelsOrDefault(String key, String defaultValue)
See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 4;
- Specified by:
getLabelsOrDefault
in interfaceSnapshotOrBuilder
-
getLabelsOrThrow
public String getLabelsOrThrow(String key)
See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 4;
- Specified by:
getLabelsOrThrow
in interfaceSnapshotOrBuilder
-
clearLabels
public Snapshot.Builder clearLabels()
-
removeLabels
public Snapshot.Builder removeLabels(String key)
See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 4;
-
getMutableLabels
@Deprecated public Map<String,String> getMutableLabels()
Deprecated.Use alternate mutation accessors instead.
-
putLabels
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;
-
putAllLabels
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;
-
setUnknownFields
public final Snapshot.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
-
mergeUnknownFields
public final Snapshot.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
-
-