Class Pubsub.Builder (1.52.0)

public static final class Pubsub.Builder extends GeneratedMessageV3.Builder<Pubsub.Builder> implements PubsubOrBuilder

Represents a Pub/Sub transport.

Protobuf type google.cloud.eventarc.v1.Pubsub

Implements

PubsubOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Pubsub build()
Returns
Type Description
Pubsub

buildPartial()

public Pubsub buildPartial()
Returns
Type Description
Pubsub

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearSubscription()

public Pubsub.Builder clearSubscription()

Output only. The name of the Pub/Sub subscription created and managed by Eventarc as a transport for the event delivery. Format: projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}.

string subscription = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Pubsub.Builder

This builder for chaining.

clearTopic()

public Pubsub.Builder clearTopic()

Optional. The name of the Pub/Sub topic created and managed by Eventarc as a transport for the event delivery. Format: projects/{PROJECT_ID}/topics/{TOPIC_NAME}.

You can set an existing topic for triggers of the type google.cloud.pubsub.topic.v1.messagePublished. The topic you provide here is not deleted by Eventarc at trigger deletion.

string topic = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Pubsub.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public Pubsub getDefaultInstanceForType()
Returns
Type Description
Pubsub

getDescriptorForType()

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

getSubscription()

public String getSubscription()

Output only. The name of the Pub/Sub subscription created and managed by Eventarc as a transport for the event delivery. Format: projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}.

string subscription = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The subscription.

getSubscriptionBytes()

public ByteString getSubscriptionBytes()

Output only. The name of the Pub/Sub subscription created and managed by Eventarc as a transport for the event delivery. Format: projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}.

string subscription = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for subscription.

getTopic()

public String getTopic()

Optional. The name of the Pub/Sub topic created and managed by Eventarc as a transport for the event delivery. Format: projects/{PROJECT_ID}/topics/{TOPIC_NAME}.

You can set an existing topic for triggers of the type google.cloud.pubsub.topic.v1.messagePublished. The topic you provide here is not deleted by Eventarc at trigger deletion.

string topic = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The topic.

getTopicBytes()

public ByteString getTopicBytes()

Optional. The name of the Pub/Sub topic created and managed by Eventarc as a transport for the event delivery. Format: projects/{PROJECT_ID}/topics/{TOPIC_NAME}.

You can set an existing topic for triggers of the type google.cloud.pubsub.topic.v1.messagePublished. The topic you provide here is not deleted by Eventarc at trigger deletion.

string topic = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for topic.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Pubsub other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setSubscription(String value)

public Pubsub.Builder setSubscription(String value)

Output only. The name of the Pub/Sub subscription created and managed by Eventarc as a transport for the event delivery. Format: projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}.

string subscription = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The subscription to set.

Returns
Type Description
Pubsub.Builder

This builder for chaining.

setSubscriptionBytes(ByteString value)

public Pubsub.Builder setSubscriptionBytes(ByteString value)

Output only. The name of the Pub/Sub subscription created and managed by Eventarc as a transport for the event delivery. Format: projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}.

string subscription = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for subscription to set.

Returns
Type Description
Pubsub.Builder

This builder for chaining.

setTopic(String value)

public Pubsub.Builder setTopic(String value)

Optional. The name of the Pub/Sub topic created and managed by Eventarc as a transport for the event delivery. Format: projects/{PROJECT_ID}/topics/{TOPIC_NAME}.

You can set an existing topic for triggers of the type google.cloud.pubsub.topic.v1.messagePublished. The topic you provide here is not deleted by Eventarc at trigger deletion.

string topic = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The topic to set.

Returns
Type Description
Pubsub.Builder

This builder for chaining.

setTopicBytes(ByteString value)

public Pubsub.Builder setTopicBytes(ByteString value)

Optional. The name of the Pub/Sub topic created and managed by Eventarc as a transport for the event delivery. Format: projects/{PROJECT_ID}/topics/{TOPIC_NAME}.

You can set an existing topic for triggers of the type google.cloud.pubsub.topic.v1.messagePublished. The topic you provide here is not deleted by Eventarc at trigger deletion.

string topic = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for topic to set.

Returns
Type Description
Pubsub.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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