public static final class PubsubMessage.Builder extends 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(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(Descriptors.FieldDescriptor field) |
PubsubMessage.Builder |
clearMessageId()
ID of this message, assigned by the server when the message is published.
|
PubsubMessage.Builder |
clearOneof(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.
|
ByteString |
getData()
The message payload.
|
PubsubMessage |
getDefaultInstanceForType() |
static Descriptors.Descriptor |
getDescriptor() |
Descriptors.Descriptor |
getDescriptorForType() |
java.lang.String |
getMessageId()
ID of this message, assigned by the server when the message is published.
|
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.
|
Timestamp |
getPublishTime()
The time at which the message was published, populated by the server when
it receives the `Publish` call.
|
Timestamp.Builder |
getPublishTimeBuilder()
The time at which the message was published, populated by the server when
it receives the `Publish` call.
|
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 GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
protected MapField |
internalGetMapField(int number) |
protected MapField |
internalGetMutableMapField(int number) |
boolean |
isInitialized() |
PubsubMessage.Builder |
mergeFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry) |
PubsubMessage.Builder |
mergeFrom(Message other) |
PubsubMessage.Builder |
mergeFrom(PubsubMessage other) |
PubsubMessage.Builder |
mergePublishTime(Timestamp value)
The time at which the message was published, populated by the server when
it receives the `Publish` call.
|
PubsubMessage.Builder |
mergeUnknownFields(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(ByteString value)
The message payload.
|
PubsubMessage.Builder |
setField(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(ByteString value)
ID of this message, assigned by the server when the message is published.
|
PubsubMessage.Builder |
setPublishTime(Timestamp.Builder builderForValue)
The time at which the message was published, populated by the server when
it receives the `Publish` call.
|
PubsubMessage.Builder |
setPublishTime(Timestamp value)
The time at which the message was published, populated by the server when
it receives the `Publish` call.
|
PubsubMessage.Builder |
setRepeatedField(Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) |
PubsubMessage.Builder |
setUnknownFields(UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, addAll, mergeFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
mergeFrom
public static final Descriptors.Descriptor getDescriptor()
protected MapField internalGetMapField(int number)
internalGetMapField
in class GeneratedMessageV3.Builder<PubsubMessage.Builder>
protected MapField internalGetMutableMapField(int number)
internalGetMutableMapField
in class GeneratedMessageV3.Builder<PubsubMessage.Builder>
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3.Builder<PubsubMessage.Builder>
public PubsubMessage.Builder clear()
clear
in interface Message.Builder
clear
in interface MessageLite.Builder
clear
in class GeneratedMessageV3.Builder<PubsubMessage.Builder>
public Descriptors.Descriptor getDescriptorForType()
getDescriptorForType
in interface Message.Builder
getDescriptorForType
in interface MessageOrBuilder
getDescriptorForType
in class GeneratedMessageV3.Builder<PubsubMessage.Builder>
public PubsubMessage getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
public PubsubMessage build()
build
in interface Message.Builder
build
in interface MessageLite.Builder
public PubsubMessage buildPartial()
buildPartial
in interface Message.Builder
buildPartial
in interface MessageLite.Builder
public PubsubMessage.Builder clone()
clone
in interface Message.Builder
clone
in interface MessageLite.Builder
clone
in class GeneratedMessageV3.Builder<PubsubMessage.Builder>
public PubsubMessage.Builder setField(Descriptors.FieldDescriptor field, java.lang.Object value)
setField
in interface Message.Builder
setField
in class GeneratedMessageV3.Builder<PubsubMessage.Builder>
public PubsubMessage.Builder clearField(Descriptors.FieldDescriptor field)
clearField
in interface Message.Builder
clearField
in class GeneratedMessageV3.Builder<PubsubMessage.Builder>
public PubsubMessage.Builder clearOneof(Descriptors.OneofDescriptor oneof)
clearOneof
in interface Message.Builder
clearOneof
in class GeneratedMessageV3.Builder<PubsubMessage.Builder>
public PubsubMessage.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, java.lang.Object value)
setRepeatedField
in interface Message.Builder
setRepeatedField
in class GeneratedMessageV3.Builder<PubsubMessage.Builder>
public PubsubMessage.Builder addRepeatedField(Descriptors.FieldDescriptor field, java.lang.Object value)
addRepeatedField
in interface Message.Builder
addRepeatedField
in class GeneratedMessageV3.Builder<PubsubMessage.Builder>
public PubsubMessage.Builder mergeFrom(Message other)
mergeFrom
in interface Message.Builder
mergeFrom
in class AbstractMessage.Builder<PubsubMessage.Builder>
public PubsubMessage.Builder mergeFrom(PubsubMessage other)
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3.Builder<PubsubMessage.Builder>
public PubsubMessage.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
mergeFrom
in interface Message.Builder
mergeFrom
in interface MessageLite.Builder
mergeFrom
in class AbstractMessage.Builder<PubsubMessage.Builder>
java.io.IOException
public ByteString getData()
The message payload.
bytes data = 1;
getData
in interface PubsubMessageOrBuilder
public PubsubMessage.Builder setData(ByteString value)
The message payload.
bytes data = 1;
public PubsubMessage.Builder clearData()
The message payload.
bytes data = 1;
public int getAttributesCount()
PubsubMessageOrBuilder
Optional attributes for this message.
map<string, string> attributes = 2;
getAttributesCount
in interface PubsubMessageOrBuilder
public 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 PubsubMessageOrBuilder
public java.util.Map<java.lang.String,java.lang.String> getAttributesMap()
Optional attributes for this message.
map<string, string> attributes = 2;
getAttributesMap
in interface PubsubMessageOrBuilder
public 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 PubsubMessageOrBuilder
public java.lang.String getAttributesOrThrow(java.lang.String key)
Optional attributes for this message.
map<string, string> attributes = 2;
getAttributesOrThrow
in interface PubsubMessageOrBuilder
public 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.
string message_id = 3;
getMessageId
in interface PubsubMessageOrBuilder
public 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.
string message_id = 3;
getMessageIdBytes
in interface PubsubMessageOrBuilder
public 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.
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.
string message_id = 3;
public PubsubMessage.Builder setMessageIdBytes(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.
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.
.google.protobuf.Timestamp publish_time = 4;
hasPublishTime
in interface PubsubMessageOrBuilder
public 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.
.google.protobuf.Timestamp publish_time = 4;
getPublishTime
in interface PubsubMessageOrBuilder
public PubsubMessage.Builder setPublishTime(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.
.google.protobuf.Timestamp publish_time = 4;
public PubsubMessage.Builder setPublishTime(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.
.google.protobuf.Timestamp publish_time = 4;
public PubsubMessage.Builder mergePublishTime(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.
.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.
.google.protobuf.Timestamp publish_time = 4;
public 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.
.google.protobuf.Timestamp publish_time = 4;
public 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.
.google.protobuf.Timestamp publish_time = 4;
getPublishTimeOrBuilder
in interface PubsubMessageOrBuilder
public final PubsubMessage.Builder setUnknownFields(UnknownFieldSet unknownFields)
setUnknownFields
in interface Message.Builder
setUnknownFields
in class GeneratedMessageV3.Builder<PubsubMessage.Builder>
public final PubsubMessage.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
mergeUnknownFields
in interface Message.Builder
mergeUnknownFields
in class GeneratedMessageV3.Builder<PubsubMessage.Builder>