Class PublishRequest (0.55.0)

public final class PublishRequest extends GeneratedMessageV3 implements PublishRequestOrBuilder

The request message for the Publish method.

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

Static Fields

AVRO_MESSAGE_FIELD_NUMBER

public static final int AVRO_MESSAGE_FIELD_NUMBER
Field Value
Type Description
int

JSON_MESSAGE_FIELD_NUMBER

public static final int JSON_MESSAGE_FIELD_NUMBER
Field Value
Type Description
int

MESSAGE_BUS_FIELD_NUMBER

public static final int MESSAGE_BUS_FIELD_NUMBER
Field Value
Type Description
int

PROTO_MESSAGE_FIELD_NUMBER

public static final int PROTO_MESSAGE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static PublishRequest getDefaultInstance()
Returns
Type Description
PublishRequest

getDescriptor()

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

newBuilder()

public static PublishRequest.Builder newBuilder()
Returns
Type Description
PublishRequest.Builder

newBuilder(PublishRequest prototype)

public static PublishRequest.Builder newBuilder(PublishRequest prototype)
Parameter
Name Description
prototype PublishRequest
Returns
Type Description
PublishRequest.Builder

parseDelimitedFrom(InputStream input)

public static PublishRequest parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
PublishRequest
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static PublishRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PublishRequest
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static PublishRequest parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
PublishRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static PublishRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PublishRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static PublishRequest parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
PublishRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static PublishRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PublishRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static PublishRequest parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
PublishRequest
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static PublishRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PublishRequest
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static PublishRequest parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
PublishRequest
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static PublishRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PublishRequest
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static PublishRequest parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
PublishRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static PublishRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PublishRequest
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<PublishRequest> parser()
Returns
Type Description
Parser<PublishRequest>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
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

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.

getParserForType()

public Parser<PublishRequest> getParserForType()
Returns
Type Description
Parser<PublishRequest>
Overrides

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.

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

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected PublishRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
PublishRequest.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

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

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException