Class Pubsub.Builder (1.15.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Pubsub build()
Returns
TypeDescription
Pubsub

buildPartial()

public Pubsub buildPartial()
Returns
TypeDescription
Pubsub

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

public Pubsub.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
Pubsub.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public Pubsub getDefaultInstanceForType()
Returns
TypeDescription
Pubsub

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for topic.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Pubsub other)

public Pubsub.Builder mergeFrom(Pubsub other)
Parameter
NameDescription
otherPubsub
Returns
TypeDescription
Pubsub.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

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

public Pubsub.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The subscription to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for subscription to set.

Returns
TypeDescription
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
NameDescription
valueString

The topic to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for topic to set.

Returns
TypeDescription
Pubsub.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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