Class PublishRequest.Builder (0.54.0)

public static final class PublishRequest.Builder extends GeneratedMessageV3.Builder<PublishRequest.Builder> implements PublishRequestOrBuilder

The request message for the Publish method.

Protobuf type google.cloud.eventarc.publishing.v1.PublishRequest

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public PublishRequest build()
Returns
Type Description
PublishRequest

buildPartial()

public PublishRequest buildPartial()
Returns
Type Description
PublishRequest

clear()

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

clearAvroMessage()

public PublishRequest.Builder clearAvroMessage()

The Avro format of the CloudEvent being published. Specification can be found here: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/avro-format.md

bytes avro_message = 4;

Returns
Type Description
PublishRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearFormat()

public PublishRequest.Builder clearFormat()
Returns
Type Description
PublishRequest.Builder

clearJsonMessage()

public PublishRequest.Builder clearJsonMessage()

The JSON format of the CloudEvent being published. Specification can be found here: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md

string json_message = 3;

Returns
Type Description
PublishRequest.Builder

This builder for chaining.

clearMessageBus()

public PublishRequest.Builder clearMessageBus()

Required. The full name of the message bus to publish events to. Format: projects/{project}/locations/{location}/messageBuses/{messageBus}.

string message_bus = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
PublishRequest.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public PublishRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
PublishRequest.Builder
Overrides

clearProtoMessage()

public PublishRequest.Builder clearProtoMessage()

The Protobuf format of the CloudEvent being published. Specification can be found here: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/protobuf-format.md

.google.cloud.eventarc.publishing.v1.CloudEvent proto_message = 2;

Returns
Type Description
PublishRequest.Builder

clone()

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

getAvroMessage()

public ByteString getAvroMessage()

The Avro format of the CloudEvent being published. Specification can be found here: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/avro-format.md

bytes avro_message = 4;

Returns
Type Description
ByteString

The avroMessage.

getDefaultInstanceForType()

public PublishRequest getDefaultInstanceForType()
Returns
Type Description
PublishRequest

getDescriptorForType()

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

getFormatCase()

public PublishRequest.FormatCase getFormatCase()
Returns
Type Description
PublishRequest.FormatCase

getJsonMessage()

public String getJsonMessage()

The JSON format of the CloudEvent being published. Specification can be found here: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md

string json_message = 3;

Returns
Type Description
String

The jsonMessage.

getJsonMessageBytes()

public ByteString getJsonMessageBytes()

The JSON format of the CloudEvent being published. Specification can be found here: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md

string json_message = 3;

Returns
Type Description
ByteString

The bytes for jsonMessage.

getMessageBus()

public String getMessageBus()

Required. The full name of the message bus to publish events to. Format: projects/{project}/locations/{location}/messageBuses/{messageBus}.

string message_bus = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The messageBus.

getMessageBusBytes()

public ByteString getMessageBusBytes()

Required. The full name of the message bus to publish events to. Format: projects/{project}/locations/{location}/messageBuses/{messageBus}.

string message_bus = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for messageBus.

getProtoMessage()

public CloudEvent getProtoMessage()

The Protobuf format of the CloudEvent being published. Specification can be found here: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/protobuf-format.md

.google.cloud.eventarc.publishing.v1.CloudEvent proto_message = 2;

Returns
Type Description
CloudEvent

The protoMessage.

getProtoMessageBuilder()

public CloudEvent.Builder getProtoMessageBuilder()

The Protobuf format of the CloudEvent being published. Specification can be found here: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/protobuf-format.md

.google.cloud.eventarc.publishing.v1.CloudEvent proto_message = 2;

Returns
Type Description
CloudEvent.Builder

getProtoMessageOrBuilder()

public CloudEventOrBuilder getProtoMessageOrBuilder()

The Protobuf format of the CloudEvent being published. Specification can be found here: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/protobuf-format.md

.google.cloud.eventarc.publishing.v1.CloudEvent proto_message = 2;

Returns
Type Description
CloudEventOrBuilder

hasAvroMessage()

public boolean hasAvroMessage()

The Avro format of the CloudEvent being published. Specification can be found here: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/avro-format.md

bytes avro_message = 4;

Returns
Type Description
boolean

Whether the avroMessage field is set.

hasJsonMessage()

public boolean hasJsonMessage()

The JSON format of the CloudEvent being published. Specification can be found here: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md

string json_message = 3;

Returns
Type Description
boolean

Whether the jsonMessage field is set.

hasProtoMessage()

public boolean hasProtoMessage()

The Protobuf format of the CloudEvent being published. Specification can be found here: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/protobuf-format.md

.google.cloud.eventarc.publishing.v1.CloudEvent proto_message = 2;

Returns
Type Description
boolean

Whether the protoMessage field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(PublishRequest other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public PublishRequest.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
PublishRequest.Builder
Overrides

mergeProtoMessage(CloudEvent value)

public PublishRequest.Builder mergeProtoMessage(CloudEvent value)

The Protobuf format of the CloudEvent being published. Specification can be found here: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/protobuf-format.md

.google.cloud.eventarc.publishing.v1.CloudEvent proto_message = 2;

Parameter
Name Description
value CloudEvent
Returns
Type Description
PublishRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAvroMessage(ByteString value)

public PublishRequest.Builder setAvroMessage(ByteString value)

The Avro format of the CloudEvent being published. Specification can be found here: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/avro-format.md

bytes avro_message = 4;

Parameter
Name Description
value ByteString

The avroMessage to set.

Returns
Type Description
PublishRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setJsonMessage(String value)

public PublishRequest.Builder setJsonMessage(String value)

The JSON format of the CloudEvent being published. Specification can be found here: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md

string json_message = 3;

Parameter
Name Description
value String

The jsonMessage to set.

Returns
Type Description
PublishRequest.Builder

This builder for chaining.

setJsonMessageBytes(ByteString value)

public PublishRequest.Builder setJsonMessageBytes(ByteString value)

The JSON format of the CloudEvent being published. Specification can be found here: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md

string json_message = 3;

Parameter
Name Description
value ByteString

The bytes for jsonMessage to set.

Returns
Type Description
PublishRequest.Builder

This builder for chaining.

setMessageBus(String value)

public PublishRequest.Builder setMessageBus(String value)

Required. The full name of the message bus to publish events to. Format: projects/{project}/locations/{location}/messageBuses/{messageBus}.

string message_bus = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The messageBus to set.

Returns
Type Description
PublishRequest.Builder

This builder for chaining.

setMessageBusBytes(ByteString value)

public PublishRequest.Builder setMessageBusBytes(ByteString value)

Required. The full name of the message bus to publish events to. Format: projects/{project}/locations/{location}/messageBuses/{messageBus}.

string message_bus = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for messageBus to set.

Returns
Type Description
PublishRequest.Builder

This builder for chaining.

setProtoMessage(CloudEvent value)

public PublishRequest.Builder setProtoMessage(CloudEvent value)

The Protobuf format of the CloudEvent being published. Specification can be found here: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/protobuf-format.md

.google.cloud.eventarc.publishing.v1.CloudEvent proto_message = 2;

Parameter
Name Description
value CloudEvent
Returns
Type Description
PublishRequest.Builder

setProtoMessage(CloudEvent.Builder builderForValue)

public PublishRequest.Builder setProtoMessage(CloudEvent.Builder builderForValue)

The Protobuf format of the CloudEvent being published. Specification can be found here: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/protobuf-format.md

.google.cloud.eventarc.publishing.v1.CloudEvent proto_message = 2;

Parameter
Name Description
builderForValue CloudEvent.Builder
Returns
Type Description
PublishRequest.Builder

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

public PublishRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
PublishRequest.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

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