Class MessagePublishedData.Builder (0.14.1)

public static final class MessagePublishedData.Builder extends GeneratedMessageV3.Builder<MessagePublishedData.Builder> implements MessagePublishedDataOrBuilder

The event data when a message is published to a topic.

Protobuf type google.events.cloud.pubsub.v1.MessagePublishedData

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public MessagePublishedData.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
MessagePublishedData.Builder
Overrides

build()

public MessagePublishedData build()
Returns
TypeDescription
MessagePublishedData

buildPartial()

public MessagePublishedData buildPartial()
Returns
TypeDescription
MessagePublishedData

clear()

public MessagePublishedData.Builder clear()
Returns
TypeDescription
MessagePublishedData.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public MessagePublishedData.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
MessagePublishedData.Builder
Overrides

clearMessage()

public MessagePublishedData.Builder clearMessage()

The message that was published.

.google.events.cloud.pubsub.v1.PubsubMessage message = 1;

Returns
TypeDescription
MessagePublishedData.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public MessagePublishedData.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
MessagePublishedData.Builder
Overrides

clearSubscription()

public MessagePublishedData.Builder clearSubscription()

The resource name of the subscription for which this event was generated. The format of the value is projects/{project-id}/subscriptions/{subscription-id}.

string subscription = 2;

Returns
TypeDescription
MessagePublishedData.Builder

This builder for chaining.

clone()

public MessagePublishedData.Builder clone()
Returns
TypeDescription
MessagePublishedData.Builder
Overrides

getDefaultInstanceForType()

public MessagePublishedData getDefaultInstanceForType()
Returns
TypeDescription
MessagePublishedData

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getMessage()

public PubsubMessage getMessage()

The message that was published.

.google.events.cloud.pubsub.v1.PubsubMessage message = 1;

Returns
TypeDescription
PubsubMessage

The message.

getMessageBuilder()

public PubsubMessage.Builder getMessageBuilder()

The message that was published.

.google.events.cloud.pubsub.v1.PubsubMessage message = 1;

Returns
TypeDescription
PubsubMessage.Builder

getMessageOrBuilder()

public PubsubMessageOrBuilder getMessageOrBuilder()

The message that was published.

.google.events.cloud.pubsub.v1.PubsubMessage message = 1;

Returns
TypeDescription
PubsubMessageOrBuilder

getSubscription()

public String getSubscription()

The resource name of the subscription for which this event was generated. The format of the value is projects/{project-id}/subscriptions/{subscription-id}.

string subscription = 2;

Returns
TypeDescription
String

The subscription.

getSubscriptionBytes()

public ByteString getSubscriptionBytes()

The resource name of the subscription for which this event was generated. The format of the value is projects/{project-id}/subscriptions/{subscription-id}.

string subscription = 2;

Returns
TypeDescription
ByteString

The bytes for subscription.

hasMessage()

public boolean hasMessage()

The message that was published.

.google.events.cloud.pubsub.v1.PubsubMessage message = 1;

Returns
TypeDescription
boolean

Whether the message field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(MessagePublishedData other)

public MessagePublishedData.Builder mergeFrom(MessagePublishedData other)
Parameter
NameDescription
otherMessagePublishedData
Returns
TypeDescription
MessagePublishedData.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public MessagePublishedData.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
MessagePublishedData.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public MessagePublishedData.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
MessagePublishedData.Builder
Overrides

mergeMessage(PubsubMessage value)

public MessagePublishedData.Builder mergeMessage(PubsubMessage value)

The message that was published.

.google.events.cloud.pubsub.v1.PubsubMessage message = 1;

Parameter
NameDescription
valuePubsubMessage
Returns
TypeDescription
MessagePublishedData.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final MessagePublishedData.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
MessagePublishedData.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public MessagePublishedData.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
MessagePublishedData.Builder
Overrides

setMessage(PubsubMessage value)

public MessagePublishedData.Builder setMessage(PubsubMessage value)

The message that was published.

.google.events.cloud.pubsub.v1.PubsubMessage message = 1;

Parameter
NameDescription
valuePubsubMessage
Returns
TypeDescription
MessagePublishedData.Builder

setMessage(PubsubMessage.Builder builderForValue)

public MessagePublishedData.Builder setMessage(PubsubMessage.Builder builderForValue)

The message that was published.

.google.events.cloud.pubsub.v1.PubsubMessage message = 1;

Parameter
NameDescription
builderForValuePubsubMessage.Builder
Returns
TypeDescription
MessagePublishedData.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public MessagePublishedData.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
MessagePublishedData.Builder
Overrides

setSubscription(String value)

public MessagePublishedData.Builder setSubscription(String value)

The resource name of the subscription for which this event was generated. The format of the value is projects/{project-id}/subscriptions/{subscription-id}.

string subscription = 2;

Parameter
NameDescription
valueString

The subscription to set.

Returns
TypeDescription
MessagePublishedData.Builder

This builder for chaining.

setSubscriptionBytes(ByteString value)

public MessagePublishedData.Builder setSubscriptionBytes(ByteString value)

The resource name of the subscription for which this event was generated. The format of the value is projects/{project-id}/subscriptions/{subscription-id}.

string subscription = 2;

Parameter
NameDescription
valueByteString

The bytes for subscription to set.

Returns
TypeDescription
MessagePublishedData.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final MessagePublishedData.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
MessagePublishedData.Builder
Overrides