public static final class PubsubMessage.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<PubsubMessage.Builder> implements PubsubMessageOrBuilder
A message data and its attributes. The message payload must not be empty; it must contain either a non-empty data field, or at least one attribute.Protobuf type
google.pubsub.v1.PubsubMessage| Modifier and Type | Method and Description |
|---|---|
PubsubMessage.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) |
PubsubMessage |
build() |
PubsubMessage |
buildPartial() |
PubsubMessage.Builder |
clear() |
PubsubMessage.Builder |
clearAttributes() |
PubsubMessage.Builder |
clearData()
The message payload.
|
PubsubMessage.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
PubsubMessage.Builder |
clearMessageId()
ID of this message, assigned by the server when the message is published.
|
PubsubMessage.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
PubsubMessage.Builder |
clearPublishTime()
The time at which the message was published, populated by the server when
it receives the `Publish` call.
|
PubsubMessage.Builder |
clone() |
boolean |
containsAttributes(java.lang.String key)
Optional attributes for this message.
|
java.util.Map<java.lang.String,java.lang.String> |
getAttributes()
Deprecated.
|
int |
getAttributesCount()
Optional attributes for this message.
|
java.util.Map<java.lang.String,java.lang.String> |
getAttributesMap()
Optional attributes for this message.
|
java.lang.String |
getAttributesOrDefault(java.lang.String key,
java.lang.String defaultValue)
Optional attributes for this message.
|
java.lang.String |
getAttributesOrThrow(java.lang.String key)
Optional attributes for this message.
|
com.google.protobuf.ByteString |
getData()
The message payload.
|
PubsubMessage |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
java.lang.String |
getMessageId()
ID of this message, assigned by the server when the message is published.
|
com.google.protobuf.ByteString |
getMessageIdBytes()
ID of this message, assigned by the server when the message is published.
|
java.util.Map<java.lang.String,java.lang.String> |
getMutableAttributes()
Deprecated.
|
com.google.protobuf.Timestamp |
getPublishTime()
The time at which the message was published, populated by the server when
it receives the `Publish` call.
|
com.google.protobuf.Timestamp.Builder |
getPublishTimeBuilder()
The time at which the message was published, populated by the server when
it receives the `Publish` call.
|
com.google.protobuf.TimestampOrBuilder |
getPublishTimeOrBuilder()
The time at which the message was published, populated by the server when
it receives the `Publish` call.
|
boolean |
hasPublishTime()
The time at which the message was published, populated by the server when
it receives the `Publish` call.
|
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() |
PubsubMessage.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
PubsubMessage.Builder |
mergeFrom(com.google.protobuf.Message other) |
PubsubMessage.Builder |
mergeFrom(PubsubMessage other) |
PubsubMessage.Builder |
mergePublishTime(com.google.protobuf.Timestamp value)
The time at which the message was published, populated by the server when
it receives the `Publish` call.
|
PubsubMessage.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
PubsubMessage.Builder |
putAllAttributes(java.util.Map<java.lang.String,java.lang.String> values)
Optional attributes for this message.
|
PubsubMessage.Builder |
putAttributes(java.lang.String key,
java.lang.String value)
Optional attributes for this message.
|
PubsubMessage.Builder |
removeAttributes(java.lang.String key)
Optional attributes for this message.
|
PubsubMessage.Builder |
setData(com.google.protobuf.ByteString value)
The message payload.
|
PubsubMessage.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) |
PubsubMessage.Builder |
setMessageId(java.lang.String value)
ID of this message, assigned by the server when the message is published.
|
PubsubMessage.Builder |
setMessageIdBytes(com.google.protobuf.ByteString value)
ID of this message, assigned by the server when the message is published.
|
PubsubMessage.Builder |
setPublishTime(com.google.protobuf.Timestamp.Builder builderForValue)
The time at which the message was published, populated by the server when
it receives the `Publish` call.
|
PubsubMessage.Builder |
setPublishTime(com.google.protobuf.Timestamp value)
The time at which the message was published, populated by the server when
it receives the `Publish` call.
|
PubsubMessage.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) |
PubsubMessage.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, isClean, markClean, newBuilderForField, onBuilt, onChanged, parseUnknownFieldfindInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.MapField internalGetMapField(int number)
internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<PubsubMessage.Builder>protected com.google.protobuf.MapField internalGetMutableMapField(int number)
internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<PubsubMessage.Builder>protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<PubsubMessage.Builder>public PubsubMessage.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<PubsubMessage.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<PubsubMessage.Builder>public PubsubMessage getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic PubsubMessage build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic PubsubMessage buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic PubsubMessage.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<PubsubMessage.Builder>public PubsubMessage.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<PubsubMessage.Builder>public PubsubMessage.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<PubsubMessage.Builder>public PubsubMessage.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<PubsubMessage.Builder>public PubsubMessage.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<PubsubMessage.Builder>public PubsubMessage.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<PubsubMessage.Builder>public PubsubMessage.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<PubsubMessage.Builder>public PubsubMessage.Builder mergeFrom(PubsubMessage other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<PubsubMessage.Builder>public PubsubMessage.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<PubsubMessage.Builder>java.io.IOExceptionpublic com.google.protobuf.ByteString getData()
The message payload.
optional bytes data = 1;getData in interface PubsubMessageOrBuilderpublic PubsubMessage.Builder setData(com.google.protobuf.ByteString value)
The message payload.
optional bytes data = 1;public PubsubMessage.Builder clearData()
The message payload.
optional bytes data = 1;public int getAttributesCount()
PubsubMessageOrBuilderOptional attributes for this message.
map<string, string> attributes = 2;getAttributesCount in interface PubsubMessageOrBuilderpublic boolean containsAttributes(java.lang.String key)
Optional attributes for this message.
map<string, string> attributes = 2;containsAttributes in interface PubsubMessageOrBuilder@Deprecated public java.util.Map<java.lang.String,java.lang.String> getAttributes()
getAttributesMap() instead.getAttributes in interface PubsubMessageOrBuilderpublic java.util.Map<java.lang.String,java.lang.String> getAttributesMap()
Optional attributes for this message.
map<string, string> attributes = 2;getAttributesMap in interface PubsubMessageOrBuilderpublic java.lang.String getAttributesOrDefault(java.lang.String key,
java.lang.String defaultValue)
Optional attributes for this message.
map<string, string> attributes = 2;getAttributesOrDefault in interface PubsubMessageOrBuilderpublic java.lang.String getAttributesOrThrow(java.lang.String key)
Optional attributes for this message.
map<string, string> attributes = 2;getAttributesOrThrow in interface PubsubMessageOrBuilderpublic PubsubMessage.Builder clearAttributes()
public PubsubMessage.Builder removeAttributes(java.lang.String key)
Optional attributes for this message.
map<string, string> attributes = 2;@Deprecated public java.util.Map<java.lang.String,java.lang.String> getMutableAttributes()
public PubsubMessage.Builder putAttributes(java.lang.String key, java.lang.String value)
Optional attributes for this message.
map<string, string> attributes = 2;public PubsubMessage.Builder putAllAttributes(java.util.Map<java.lang.String,java.lang.String> values)
Optional attributes for this message.
map<string, string> attributes = 2;public java.lang.String getMessageId()
ID of this message, assigned by the server when the message is published. Guaranteed to be unique within the topic. This value may be read by a subscriber that receives a `PubsubMessage` via a `Pull` call or a push delivery. It must not be populated by the publisher in a `Publish` call.
optional string message_id = 3;getMessageId in interface PubsubMessageOrBuilderpublic com.google.protobuf.ByteString getMessageIdBytes()
ID of this message, assigned by the server when the message is published. Guaranteed to be unique within the topic. This value may be read by a subscriber that receives a `PubsubMessage` via a `Pull` call or a push delivery. It must not be populated by the publisher in a `Publish` call.
optional string message_id = 3;getMessageIdBytes in interface PubsubMessageOrBuilderpublic PubsubMessage.Builder setMessageId(java.lang.String value)
ID of this message, assigned by the server when the message is published. Guaranteed to be unique within the topic. This value may be read by a subscriber that receives a `PubsubMessage` via a `Pull` call or a push delivery. It must not be populated by the publisher in a `Publish` call.
optional string message_id = 3;public PubsubMessage.Builder clearMessageId()
ID of this message, assigned by the server when the message is published. Guaranteed to be unique within the topic. This value may be read by a subscriber that receives a `PubsubMessage` via a `Pull` call or a push delivery. It must not be populated by the publisher in a `Publish` call.
optional string message_id = 3;public PubsubMessage.Builder setMessageIdBytes(com.google.protobuf.ByteString value)
ID of this message, assigned by the server when the message is published. Guaranteed to be unique within the topic. This value may be read by a subscriber that receives a `PubsubMessage` via a `Pull` call or a push delivery. It must not be populated by the publisher in a `Publish` call.
optional string message_id = 3;public boolean hasPublishTime()
The time at which the message was published, populated by the server when it receives the `Publish` call. It must not be populated by the publisher in a `Publish` call.
optional .google.protobuf.Timestamp publish_time = 4;hasPublishTime in interface PubsubMessageOrBuilderpublic com.google.protobuf.Timestamp getPublishTime()
The time at which the message was published, populated by the server when it receives the `Publish` call. It must not be populated by the publisher in a `Publish` call.
optional .google.protobuf.Timestamp publish_time = 4;getPublishTime in interface PubsubMessageOrBuilderpublic PubsubMessage.Builder setPublishTime(com.google.protobuf.Timestamp value)
The time at which the message was published, populated by the server when it receives the `Publish` call. It must not be populated by the publisher in a `Publish` call.
optional .google.protobuf.Timestamp publish_time = 4;public PubsubMessage.Builder setPublishTime(com.google.protobuf.Timestamp.Builder builderForValue)
The time at which the message was published, populated by the server when it receives the `Publish` call. It must not be populated by the publisher in a `Publish` call.
optional .google.protobuf.Timestamp publish_time = 4;public PubsubMessage.Builder mergePublishTime(com.google.protobuf.Timestamp value)
The time at which the message was published, populated by the server when it receives the `Publish` call. It must not be populated by the publisher in a `Publish` call.
optional .google.protobuf.Timestamp publish_time = 4;public PubsubMessage.Builder clearPublishTime()
The time at which the message was published, populated by the server when it receives the `Publish` call. It must not be populated by the publisher in a `Publish` call.
optional .google.protobuf.Timestamp publish_time = 4;public com.google.protobuf.Timestamp.Builder getPublishTimeBuilder()
The time at which the message was published, populated by the server when it receives the `Publish` call. It must not be populated by the publisher in a `Publish` call.
optional .google.protobuf.Timestamp publish_time = 4;public com.google.protobuf.TimestampOrBuilder getPublishTimeOrBuilder()
The time at which the message was published, populated by the server when it receives the `Publish` call. It must not be populated by the publisher in a `Publish` call.
optional .google.protobuf.Timestamp publish_time = 4;getPublishTimeOrBuilder in interface PubsubMessageOrBuilderpublic final PubsubMessage.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<PubsubMessage.Builder>public final PubsubMessage.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<PubsubMessage.Builder>