Class PublishEventsRequest.Builder (0.31.0)

public static final class PublishEventsRequest.Builder extends GeneratedMessageV3.Builder<PublishEventsRequest.Builder> implements PublishEventsRequestOrBuilder

The request message for the PublishEvents method.

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

Static Methods

getDescriptor()

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

Methods

addAllEvents(Iterable<? extends Any> values)

public PublishEventsRequest.Builder addAllEvents(Iterable<? extends Any> values)

The CloudEvents v1.0 events to publish. No other types are allowed. If this field is set, then the text_events fields must not be set.

repeated .google.protobuf.Any events = 2;

Parameter
NameDescription
valuesIterable<? extends com.google.protobuf.Any>
Returns
TypeDescription
PublishEventsRequest.Builder

addAllTextEvents(Iterable<String> values)

public PublishEventsRequest.Builder addAllTextEvents(Iterable<String> values)

The text representation of events to publish. CloudEvent v1.0 in JSON format is the only allowed type. Refer to https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md for specification. If this field is set, then the events fields must not be set.

repeated string text_events = 3;

Parameter
NameDescription
valuesIterable<String>

The textEvents to add.

Returns
TypeDescription
PublishEventsRequest.Builder

This builder for chaining.

addEvents(Any value)

public PublishEventsRequest.Builder addEvents(Any value)

The CloudEvents v1.0 events to publish. No other types are allowed. If this field is set, then the text_events fields must not be set.

repeated .google.protobuf.Any events = 2;

Parameter
NameDescription
valueAny
Returns
TypeDescription
PublishEventsRequest.Builder

addEvents(Any.Builder builderForValue)

public PublishEventsRequest.Builder addEvents(Any.Builder builderForValue)

The CloudEvents v1.0 events to publish. No other types are allowed. If this field is set, then the text_events fields must not be set.

repeated .google.protobuf.Any events = 2;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
PublishEventsRequest.Builder

addEvents(int index, Any value)

public PublishEventsRequest.Builder addEvents(int index, Any value)

The CloudEvents v1.0 events to publish. No other types are allowed. If this field is set, then the text_events fields must not be set.

repeated .google.protobuf.Any events = 2;

Parameters
NameDescription
indexint
valueAny
Returns
TypeDescription
PublishEventsRequest.Builder

addEvents(int index, Any.Builder builderForValue)

public PublishEventsRequest.Builder addEvents(int index, Any.Builder builderForValue)

The CloudEvents v1.0 events to publish. No other types are allowed. If this field is set, then the text_events fields must not be set.

repeated .google.protobuf.Any events = 2;

Parameters
NameDescription
indexint
builderForValueBuilder
Returns
TypeDescription
PublishEventsRequest.Builder

addEventsBuilder()

public Any.Builder addEventsBuilder()

The CloudEvents v1.0 events to publish. No other types are allowed. If this field is set, then the text_events fields must not be set.

repeated .google.protobuf.Any events = 2;

Returns
TypeDescription
Builder

addEventsBuilder(int index)

public Any.Builder addEventsBuilder(int index)

The CloudEvents v1.0 events to publish. No other types are allowed. If this field is set, then the text_events fields must not be set.

repeated .google.protobuf.Any events = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addTextEvents(String value)

public PublishEventsRequest.Builder addTextEvents(String value)

The text representation of events to publish. CloudEvent v1.0 in JSON format is the only allowed type. Refer to https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md for specification. If this field is set, then the events fields must not be set.

repeated string text_events = 3;

Parameter
NameDescription
valueString

The textEvents to add.

Returns
TypeDescription
PublishEventsRequest.Builder

This builder for chaining.

addTextEventsBytes(ByteString value)

public PublishEventsRequest.Builder addTextEventsBytes(ByteString value)

The text representation of events to publish. CloudEvent v1.0 in JSON format is the only allowed type. Refer to https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md for specification. If this field is set, then the events fields must not be set.

repeated string text_events = 3;

Parameter
NameDescription
valueByteString

The bytes of the textEvents to add.

Returns
TypeDescription
PublishEventsRequest.Builder

This builder for chaining.

build()

public PublishEventsRequest build()
Returns
TypeDescription
PublishEventsRequest

buildPartial()

public PublishEventsRequest buildPartial()
Returns
TypeDescription
PublishEventsRequest

clear()

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

clearChannel()

public PublishEventsRequest.Builder clearChannel()

The full name of the channel to publish to. For example: projects/{project}/locations/{location}/channels/{channel-id}.

string channel = 1;

Returns
TypeDescription
PublishEventsRequest.Builder

This builder for chaining.

clearEvents()

public PublishEventsRequest.Builder clearEvents()

The CloudEvents v1.0 events to publish. No other types are allowed. If this field is set, then the text_events fields must not be set.

repeated .google.protobuf.Any events = 2;

Returns
TypeDescription
PublishEventsRequest.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearTextEvents()

public PublishEventsRequest.Builder clearTextEvents()

The text representation of events to publish. CloudEvent v1.0 in JSON format is the only allowed type. Refer to https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md for specification. If this field is set, then the events fields must not be set.

repeated string text_events = 3;

Returns
TypeDescription
PublishEventsRequest.Builder

This builder for chaining.

clone()

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

getChannel()

public String getChannel()

The full name of the channel to publish to. For example: projects/{project}/locations/{location}/channels/{channel-id}.

string channel = 1;

Returns
TypeDescription
String

The channel.

getChannelBytes()

public ByteString getChannelBytes()

The full name of the channel to publish to. For example: projects/{project}/locations/{location}/channels/{channel-id}.

string channel = 1;

Returns
TypeDescription
ByteString

The bytes for channel.

getDefaultInstanceForType()

public PublishEventsRequest getDefaultInstanceForType()
Returns
TypeDescription
PublishEventsRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getEvents(int index)

public Any getEvents(int index)

The CloudEvents v1.0 events to publish. No other types are allowed. If this field is set, then the text_events fields must not be set.

repeated .google.protobuf.Any events = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
Any

getEventsBuilder(int index)

public Any.Builder getEventsBuilder(int index)

The CloudEvents v1.0 events to publish. No other types are allowed. If this field is set, then the text_events fields must not be set.

repeated .google.protobuf.Any events = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
Builder

getEventsBuilderList()

public List<Any.Builder> getEventsBuilderList()

The CloudEvents v1.0 events to publish. No other types are allowed. If this field is set, then the text_events fields must not be set.

repeated .google.protobuf.Any events = 2;

Returns
TypeDescription
List<Builder>

getEventsCount()

public int getEventsCount()

The CloudEvents v1.0 events to publish. No other types are allowed. If this field is set, then the text_events fields must not be set.

repeated .google.protobuf.Any events = 2;

Returns
TypeDescription
int

getEventsList()

public List<Any> getEventsList()

The CloudEvents v1.0 events to publish. No other types are allowed. If this field is set, then the text_events fields must not be set.

repeated .google.protobuf.Any events = 2;

Returns
TypeDescription
List<Any>

getEventsOrBuilder(int index)

public AnyOrBuilder getEventsOrBuilder(int index)

The CloudEvents v1.0 events to publish. No other types are allowed. If this field is set, then the text_events fields must not be set.

repeated .google.protobuf.Any events = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
AnyOrBuilder

getEventsOrBuilderList()

public List<? extends AnyOrBuilder> getEventsOrBuilderList()

The CloudEvents v1.0 events to publish. No other types are allowed. If this field is set, then the text_events fields must not be set.

repeated .google.protobuf.Any events = 2;

Returns
TypeDescription
List<? extends com.google.protobuf.AnyOrBuilder>

getTextEvents(int index)

public String getTextEvents(int index)

The text representation of events to publish. CloudEvent v1.0 in JSON format is the only allowed type. Refer to https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md for specification. If this field is set, then the events fields must not be set.

repeated string text_events = 3;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The textEvents at the given index.

getTextEventsBytes(int index)

public ByteString getTextEventsBytes(int index)

The text representation of events to publish. CloudEvent v1.0 in JSON format is the only allowed type. Refer to https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md for specification. If this field is set, then the events fields must not be set.

repeated string text_events = 3;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the textEvents at the given index.

getTextEventsCount()

public int getTextEventsCount()

The text representation of events to publish. CloudEvent v1.0 in JSON format is the only allowed type. Refer to https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md for specification. If this field is set, then the events fields must not be set.

repeated string text_events = 3;

Returns
TypeDescription
int

The count of textEvents.

getTextEventsList()

public ProtocolStringList getTextEventsList()

The text representation of events to publish. CloudEvent v1.0 in JSON format is the only allowed type. Refer to https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md for specification. If this field is set, then the events fields must not be set.

repeated string text_events = 3;

Returns
TypeDescription
ProtocolStringList

A list containing the textEvents.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(PublishEventsRequest other)

public PublishEventsRequest.Builder mergeFrom(PublishEventsRequest other)
Parameter
NameDescription
otherPublishEventsRequest
Returns
TypeDescription
PublishEventsRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeEvents(int index)

public PublishEventsRequest.Builder removeEvents(int index)

The CloudEvents v1.0 events to publish. No other types are allowed. If this field is set, then the text_events fields must not be set.

repeated .google.protobuf.Any events = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
PublishEventsRequest.Builder

setChannel(String value)

public PublishEventsRequest.Builder setChannel(String value)

The full name of the channel to publish to. For example: projects/{project}/locations/{location}/channels/{channel-id}.

string channel = 1;

Parameter
NameDescription
valueString

The channel to set.

Returns
TypeDescription
PublishEventsRequest.Builder

This builder for chaining.

setChannelBytes(ByteString value)

public PublishEventsRequest.Builder setChannelBytes(ByteString value)

The full name of the channel to publish to. For example: projects/{project}/locations/{location}/channels/{channel-id}.

string channel = 1;

Parameter
NameDescription
valueByteString

The bytes for channel to set.

Returns
TypeDescription
PublishEventsRequest.Builder

This builder for chaining.

setEvents(int index, Any value)

public PublishEventsRequest.Builder setEvents(int index, Any value)

The CloudEvents v1.0 events to publish. No other types are allowed. If this field is set, then the text_events fields must not be set.

repeated .google.protobuf.Any events = 2;

Parameters
NameDescription
indexint
valueAny
Returns
TypeDescription
PublishEventsRequest.Builder

setEvents(int index, Any.Builder builderForValue)

public PublishEventsRequest.Builder setEvents(int index, Any.Builder builderForValue)

The CloudEvents v1.0 events to publish. No other types are allowed. If this field is set, then the text_events fields must not be set.

repeated .google.protobuf.Any events = 2;

Parameters
NameDescription
indexint
builderForValueBuilder
Returns
TypeDescription
PublishEventsRequest.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setTextEvents(int index, String value)

public PublishEventsRequest.Builder setTextEvents(int index, String value)

The text representation of events to publish. CloudEvent v1.0 in JSON format is the only allowed type. Refer to https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md for specification. If this field is set, then the events fields must not be set.

repeated string text_events = 3;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The textEvents to set.

Returns
TypeDescription
PublishEventsRequest.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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