public static final class PubsubMessage.Builder extends GeneratedMessageV3.Builder<PubsubMessage.Builder> implements PubsubMessageOrBuilderA message published to a topic.
Protobuf type google.events.cloud.pubsub.v1.PubsubMessage
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > PubsubMessage.BuilderImplements
PubsubMessageOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public PubsubMessage.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
PubsubMessage.Builder |
|
build()
public PubsubMessage build()| Returns | |
|---|---|
| Type | Description |
PubsubMessage |
|
buildPartial()
public PubsubMessage buildPartial()| Returns | |
|---|---|
| Type | Description |
PubsubMessage |
|
clear()
public PubsubMessage.Builder clear()| Returns | |
|---|---|
| Type | Description |
PubsubMessage.Builder |
|
clearAttributes()
public PubsubMessage.Builder clearAttributes()| Returns | |
|---|---|
| Type | Description |
PubsubMessage.Builder |
|
clearData()
public PubsubMessage.Builder clearData()The binary data in the message.
bytes data = 1;
| Returns | |
|---|---|
| Type | Description |
PubsubMessage.Builder |
This builder for chaining. |
clearField(Descriptors.FieldDescriptor field)
public PubsubMessage.Builder clearField(Descriptors.FieldDescriptor field)| Parameter | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
| Returns | |
|---|---|
| Type | Description |
PubsubMessage.Builder |
|
clearMessageId()
public PubsubMessage.Builder clearMessageId()ID of this message, assigned by the server when the message is published. Guaranteed to be unique within the topic.
string message_id = 3;
| Returns | |
|---|---|
| Type | Description |
PubsubMessage.Builder |
This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
public PubsubMessage.Builder clearOneof(Descriptors.OneofDescriptor oneof)| Parameter | |
|---|---|
| Name | Description |
oneof |
OneofDescriptor |
| Returns | |
|---|---|
| Type | Description |
PubsubMessage.Builder |
|
clearOrderingKey()
public PubsubMessage.Builder clearOrderingKey()If non-empty, identifies related messages for which publish order should be respected.
string ordering_key = 5;
| Returns | |
|---|---|
| Type | Description |
PubsubMessage.Builder |
This builder for chaining. |
clearPublishTime()
public PubsubMessage.Builder clearPublishTime() The time at which the message was published, populated by the server when
it receives the Publish call.
.google.protobuf.Timestamp publish_time = 4;
| Returns | |
|---|---|
| Type | Description |
PubsubMessage.Builder |
|
clone()
public PubsubMessage.Builder clone()| Returns | |
|---|---|
| Type | Description |
PubsubMessage.Builder |
|
containsAttributes(String key)
public boolean containsAttributes(String key)Attributes for this message.
map<string, string> attributes = 2;
| Parameter | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
boolean |
|
getAttributes()
public Map<String,String> getAttributes()Use #getAttributesMap() instead.
| Returns | |
|---|---|
| Type | Description |
Map<String,String> |
|
getAttributesCount()
public int getAttributesCount()Attributes for this message.
map<string, string> attributes = 2;
| Returns | |
|---|---|
| Type | Description |
int |
|
getAttributesMap()
public Map<String,String> getAttributesMap()Attributes for this message.
map<string, string> attributes = 2;
| Returns | |
|---|---|
| Type | Description |
Map<String,String> |
|
getAttributesOrDefault(String key, String defaultValue)
public String getAttributesOrDefault(String key, String defaultValue)Attributes for this message.
map<string, string> attributes = 2;
| Parameters | |
|---|---|
| Name | Description |
key |
String |
defaultValue |
String |
| Returns | |
|---|---|
| Type | Description |
String |
|
getAttributesOrThrow(String key)
public String getAttributesOrThrow(String key)Attributes for this message.
map<string, string> attributes = 2;
| Parameter | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
String |
|
getData()
public ByteString getData()The binary data in the message.
bytes data = 1;
| Returns | |
|---|---|
| Type | Description |
ByteString |
The data. |
getDefaultInstanceForType()
public PubsubMessage getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
PubsubMessage |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getMessageId()
public String getMessageId()ID of this message, assigned by the server when the message is published. Guaranteed to be unique within the topic.
string message_id = 3;
| Returns | |
|---|---|
| Type | Description |
String |
The messageId. |
getMessageIdBytes()
public ByteString getMessageIdBytes()ID of this message, assigned by the server when the message is published. Guaranteed to be unique within the topic.
string message_id = 3;
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for messageId. |
getMutableAttributes()
public Map<String,String> getMutableAttributes()Use alternate mutation accessors instead.
| Returns | |
|---|---|
| Type | Description |
Map<String,String> |
|
getOrderingKey()
public String getOrderingKey()If non-empty, identifies related messages for which publish order should be respected.
string ordering_key = 5;
| Returns | |
|---|---|
| Type | Description |
String |
The orderingKey. |
getOrderingKeyBytes()
public ByteString getOrderingKeyBytes()If non-empty, identifies related messages for which publish order should be respected.
string ordering_key = 5;
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for orderingKey. |
getPublishTime()
public Timestamp getPublishTime() The time at which the message was published, populated by the server when
it receives the Publish call.
.google.protobuf.Timestamp publish_time = 4;
| Returns | |
|---|---|
| Type | Description |
Timestamp |
The publishTime. |
getPublishTimeBuilder()
public Timestamp.Builder getPublishTimeBuilder() The time at which the message was published, populated by the server when
it receives the Publish call.
.google.protobuf.Timestamp publish_time = 4;
| Returns | |
|---|---|
| Type | Description |
Builder |
|
getPublishTimeOrBuilder()
public TimestampOrBuilder getPublishTimeOrBuilder() The time at which the message was published, populated by the server when
it receives the Publish call.
.google.protobuf.Timestamp publish_time = 4;
| Returns | |
|---|---|
| Type | Description |
TimestampOrBuilder |
|
hasPublishTime()
public boolean hasPublishTime() The time at which the message was published, populated by the server when
it receives the Publish call.
.google.protobuf.Timestamp publish_time = 4;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the publishTime field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
internalGetMapField(int number)
protected MapField internalGetMapField(int number)| Parameter | |
|---|---|
| Name | Description |
number |
int |
| Returns | |
|---|---|
| Type | Description |
MapField |
|
internalGetMutableMapField(int number)
protected MapField internalGetMutableMapField(int number)| Parameter | |
|---|---|
| Name | Description |
number |
int |
| Returns | |
|---|---|
| Type | Description |
MapField |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(PubsubMessage other)
public PubsubMessage.Builder mergeFrom(PubsubMessage other)| Parameter | |
|---|---|
| Name | Description |
other |
PubsubMessage |
| Returns | |
|---|---|
| Type | Description |
PubsubMessage.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public PubsubMessage.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
PubsubMessage.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public PubsubMessage.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
PubsubMessage.Builder |
|
mergePublishTime(Timestamp value)
public PubsubMessage.Builder mergePublishTime(Timestamp value) The time at which the message was published, populated by the server when
it receives the Publish call.
.google.protobuf.Timestamp publish_time = 4;
| Parameter | |
|---|---|
| Name | Description |
value |
Timestamp |
| Returns | |
|---|---|
| Type | Description |
PubsubMessage.Builder |
|
mergeUnknownFields(UnknownFieldSet unknownFields)
public final PubsubMessage.Builder mergeUnknownFields(UnknownFieldSet unknownFields)| Parameter | |
|---|---|
| Name | Description |
unknownFields |
UnknownFieldSet |
| Returns | |
|---|---|
| Type | Description |
PubsubMessage.Builder |
|
putAllAttributes(Map<String,String> values)
public PubsubMessage.Builder putAllAttributes(Map<String,String> values)Attributes for this message.
map<string, string> attributes = 2;
| Parameter | |
|---|---|
| Name | Description |
values |
Map<String,String> |
| Returns | |
|---|---|
| Type | Description |
PubsubMessage.Builder |
|
putAttributes(String key, String value)
public PubsubMessage.Builder putAttributes(String key, String value)Attributes for this message.
map<string, string> attributes = 2;
| Parameters | |
|---|---|
| Name | Description |
key |
String |
value |
String |
| Returns | |
|---|---|
| Type | Description |
PubsubMessage.Builder |
|
removeAttributes(String key)
public PubsubMessage.Builder removeAttributes(String key)Attributes for this message.
map<string, string> attributes = 2;
| Parameter | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
PubsubMessage.Builder |
|
setData(ByteString value)
public PubsubMessage.Builder setData(ByteString value)The binary data in the message.
bytes data = 1;
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe data to set. |
| Returns | |
|---|---|
| Type | Description |
PubsubMessage.Builder |
This builder for chaining. |
setField(Descriptors.FieldDescriptor field, Object value)
public PubsubMessage.Builder setField(Descriptors.FieldDescriptor field, Object value)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
PubsubMessage.Builder |
|
setMessageId(String value)
public PubsubMessage.Builder setMessageId(String value)ID of this message, assigned by the server when the message is published. Guaranteed to be unique within the topic.
string message_id = 3;
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe messageId to set. |
| Returns | |
|---|---|
| Type | Description |
PubsubMessage.Builder |
This builder for chaining. |
setMessageIdBytes(ByteString value)
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.
string message_id = 3;
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for messageId to set. |
| Returns | |
|---|---|
| Type | Description |
PubsubMessage.Builder |
This builder for chaining. |
setOrderingKey(String value)
public PubsubMessage.Builder setOrderingKey(String value)If non-empty, identifies related messages for which publish order should be respected.
string ordering_key = 5;
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe orderingKey to set. |
| Returns | |
|---|---|
| Type | Description |
PubsubMessage.Builder |
This builder for chaining. |
setOrderingKeyBytes(ByteString value)
public PubsubMessage.Builder setOrderingKeyBytes(ByteString value)If non-empty, identifies related messages for which publish order should be respected.
string ordering_key = 5;
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for orderingKey to set. |
| Returns | |
|---|---|
| Type | Description |
PubsubMessage.Builder |
This builder for chaining. |
setPublishTime(Timestamp value)
public PubsubMessage.Builder setPublishTime(Timestamp value) The time at which the message was published, populated by the server when
it receives the Publish call.
.google.protobuf.Timestamp publish_time = 4;
| Parameter | |
|---|---|
| Name | Description |
value |
Timestamp |
| Returns | |
|---|---|
| Type | Description |
PubsubMessage.Builder |
|
setPublishTime(Timestamp.Builder builderForValue)
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.
.google.protobuf.Timestamp publish_time = 4;
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
Builder |
| Returns | |
|---|---|
| Type | Description |
PubsubMessage.Builder |
|
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public PubsubMessage.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
index |
int |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
PubsubMessage.Builder |
|
setUnknownFields(UnknownFieldSet unknownFields)
public final PubsubMessage.Builder setUnknownFields(UnknownFieldSet unknownFields)| Parameter | |
|---|---|
| Name | Description |
unknownFields |
UnknownFieldSet |
| Returns | |
|---|---|
| Type | Description |
PubsubMessage.Builder |
|