Class MessagePublishedData.Builder (0.15.0)

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
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public MessagePublishedData.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
MessagePublishedData.Builder
Overrides

build()

public MessagePublishedData build()
Returns
Type Description
MessagePublishedData

buildPartial()

public MessagePublishedData buildPartial()
Returns
Type Description
MessagePublishedData

clear()

public MessagePublishedData.Builder clear()
Returns
Type Description
MessagePublishedData.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public MessagePublishedData.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
MessagePublishedData.Builder
Overrides

clearMessage()

public MessagePublishedData.Builder clearMessage()

The message that was published.

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

Returns
Type Description
MessagePublishedData.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public MessagePublishedData.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
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
Type Description
MessagePublishedData.Builder

This builder for chaining.

clone()

public MessagePublishedData.Builder clone()
Returns
Type Description
MessagePublishedData.Builder
Overrides

getDefaultInstanceForType()

public MessagePublishedData getDefaultInstanceForType()
Returns
Type Description
MessagePublishedData

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getMessage()

public PubsubMessage getMessage()

The message that was published.

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

Returns
Type Description
PubsubMessage

The message.

getMessageBuilder()

public PubsubMessage.Builder getMessageBuilder()

The message that was published.

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

Returns
Type Description
PubsubMessage.Builder

getMessageOrBuilder()

public PubsubMessageOrBuilder getMessageOrBuilder()

The message that was published.

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

Returns
Type Description
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
Type Description
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
Type Description
ByteString

The bytes for subscription.

hasMessage()

public boolean hasMessage()

The message that was published.

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

Returns
Type Description
boolean

Whether the message field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(MessagePublishedData other)

public MessagePublishedData.Builder mergeFrom(MessagePublishedData other)
Parameter
Name Description
other MessagePublishedData
Returns
Type Description
MessagePublishedData.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public MessagePublishedData.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
MessagePublishedData.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public MessagePublishedData.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
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
Name Description
value PubsubMessage
Returns
Type Description
MessagePublishedData.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final MessagePublishedData.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
MessagePublishedData.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public MessagePublishedData.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
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
Name Description
value PubsubMessage
Returns
Type Description
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
Name Description
builderForValue PubsubMessage.Builder
Returns
Type Description
MessagePublishedData.Builder

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

public MessagePublishedData.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
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
Name Description
value String

The subscription to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for subscription to set.

Returns
Type Description
MessagePublishedData.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final MessagePublishedData.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
MessagePublishedData.Builder
Overrides