Class PubsubConfig.Builder (3.45.0)

public static final class PubsubConfig.Builder extends GeneratedMessageV3.Builder<PubsubConfig.Builder> implements PubsubConfigOrBuilder

PubsubConfig describes the configuration of a trigger that creates a build whenever a Pub/Sub message is published.

Protobuf type google.devtools.cloudbuild.v1.PubsubConfig

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public PubsubConfig build()
Returns
Type Description
PubsubConfig

buildPartial()

public PubsubConfig buildPartial()
Returns
Type Description
PubsubConfig

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearServiceAccountEmail()

public PubsubConfig.Builder clearServiceAccountEmail()

Service account that will make the push request.

string service_account_email = 3 [(.google.api.resource_reference) = { ... }

Returns
Type Description
PubsubConfig.Builder

This builder for chaining.

clearState()

public PubsubConfig.Builder clearState()

Potential issues with the underlying Pub/Sub subscription configuration. Only populated on get requests.

.google.devtools.cloudbuild.v1.PubsubConfig.State state = 4;

Returns
Type Description
PubsubConfig.Builder

This builder for chaining.

clearSubscription()

public PubsubConfig.Builder clearSubscription()

Output only. Name of the subscription. Format is projects/{project}/subscriptions/{subscription}.

string subscription = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
PubsubConfig.Builder

This builder for chaining.

clearTopic()

public PubsubConfig.Builder clearTopic()

The name of the topic from which this subscription is receiving messages. Format is projects/{project}/topics/{topic}.

string topic = 2 [(.google.api.resource_reference) = { ... }

Returns
Type Description
PubsubConfig.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public PubsubConfig getDefaultInstanceForType()
Returns
Type Description
PubsubConfig

getDescriptorForType()

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

getServiceAccountEmail()

public String getServiceAccountEmail()

Service account that will make the push request.

string service_account_email = 3 [(.google.api.resource_reference) = { ... }

Returns
Type Description
String

The serviceAccountEmail.

getServiceAccountEmailBytes()

public ByteString getServiceAccountEmailBytes()

Service account that will make the push request.

string service_account_email = 3 [(.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for serviceAccountEmail.

getState()

public PubsubConfig.State getState()

Potential issues with the underlying Pub/Sub subscription configuration. Only populated on get requests.

.google.devtools.cloudbuild.v1.PubsubConfig.State state = 4;

Returns
Type Description
PubsubConfig.State

The state.

getStateValue()

public int getStateValue()

Potential issues with the underlying Pub/Sub subscription configuration. Only populated on get requests.

.google.devtools.cloudbuild.v1.PubsubConfig.State state = 4;

Returns
Type Description
int

The enum numeric value on the wire for state.

getSubscription()

public String getSubscription()

Output only. Name of the subscription. Format is projects/{project}/subscriptions/{subscription}.

string subscription = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The subscription.

getSubscriptionBytes()

public ByteString getSubscriptionBytes()

Output only. Name of the subscription. Format is projects/{project}/subscriptions/{subscription}.

string subscription = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for subscription.

getTopic()

public String getTopic()

The name of the topic from which this subscription is receiving messages. Format is projects/{project}/topics/{topic}.

string topic = 2 [(.google.api.resource_reference) = { ... }

Returns
Type Description
String

The topic.

getTopicBytes()

public ByteString getTopicBytes()

The name of the topic from which this subscription is receiving messages. Format is projects/{project}/topics/{topic}.

string topic = 2 [(.google.api.resource_reference) = { ... }

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(PubsubConfig other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setServiceAccountEmail(String value)

public PubsubConfig.Builder setServiceAccountEmail(String value)

Service account that will make the push request.

string service_account_email = 3 [(.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The serviceAccountEmail to set.

Returns
Type Description
PubsubConfig.Builder

This builder for chaining.

setServiceAccountEmailBytes(ByteString value)

public PubsubConfig.Builder setServiceAccountEmailBytes(ByteString value)

Service account that will make the push request.

string service_account_email = 3 [(.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for serviceAccountEmail to set.

Returns
Type Description
PubsubConfig.Builder

This builder for chaining.

setState(PubsubConfig.State value)

public PubsubConfig.Builder setState(PubsubConfig.State value)

Potential issues with the underlying Pub/Sub subscription configuration. Only populated on get requests.

.google.devtools.cloudbuild.v1.PubsubConfig.State state = 4;

Parameter
Name Description
value PubsubConfig.State

The state to set.

Returns
Type Description
PubsubConfig.Builder

This builder for chaining.

setStateValue(int value)

public PubsubConfig.Builder setStateValue(int value)

Potential issues with the underlying Pub/Sub subscription configuration. Only populated on get requests.

.google.devtools.cloudbuild.v1.PubsubConfig.State state = 4;

Parameter
Name Description
value int

The enum numeric value on the wire for state to set.

Returns
Type Description
PubsubConfig.Builder

This builder for chaining.

setSubscription(String value)

public PubsubConfig.Builder setSubscription(String value)

Output only. Name of the subscription. Format is projects/{project}/subscriptions/{subscription}.

string subscription = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The subscription to set.

Returns
Type Description
PubsubConfig.Builder

This builder for chaining.

setSubscriptionBytes(ByteString value)

public PubsubConfig.Builder setSubscriptionBytes(ByteString value)

Output only. Name of the subscription. Format is projects/{project}/subscriptions/{subscription}.

string subscription = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for subscription to set.

Returns
Type Description
PubsubConfig.Builder

This builder for chaining.

setTopic(String value)

public PubsubConfig.Builder setTopic(String value)

The name of the topic from which this subscription is receiving messages. Format is projects/{project}/topics/{topic}.

string topic = 2 [(.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The topic to set.

Returns
Type Description
PubsubConfig.Builder

This builder for chaining.

setTopicBytes(ByteString value)

public PubsubConfig.Builder setTopicBytes(ByteString value)

The name of the topic from which this subscription is receiving messages. Format is projects/{project}/topics/{topic}.

string topic = 2 [(.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for topic to set.

Returns
Type Description
PubsubConfig.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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