Class PubsubConfig.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<PubsubConfig.Builder>
com.google.cloudbuild.v1.PubsubConfig.Builder
All Implemented Interfaces:
PubsubConfigOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
PubsubConfig

public static final class PubsubConfig.Builder extends com.google.protobuf.GeneratedMessage.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
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<PubsubConfig.Builder>
    • clear

      public PubsubConfig.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<PubsubConfig.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<PubsubConfig.Builder>
    • getDefaultInstanceForType

      public PubsubConfig getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public PubsubConfig build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public PubsubConfig buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public PubsubConfig.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<PubsubConfig.Builder>
    • mergeFrom

      public PubsubConfig.Builder mergeFrom(PubsubConfig other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<PubsubConfig.Builder>
    • mergeFrom

      public PubsubConfig.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<PubsubConfig.Builder>
      Throws:
      IOException
    • 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) = { ... }
      Specified by:
      getSubscription in interface PubsubConfigOrBuilder
      Returns:
      The subscription.
    • getSubscriptionBytes

      public com.google.protobuf.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) = { ... }
      Specified by:
      getSubscriptionBytes in interface PubsubConfigOrBuilder
      Returns:
      The bytes for subscription.
    • setSubscription

      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) = { ... }
      Parameters:
      value - The subscription to set.
      Returns:
      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:
      This builder for chaining.
    • setSubscriptionBytes

      public PubsubConfig.Builder setSubscriptionBytes(com.google.protobuf.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) = { ... }
      Parameters:
      value - The bytes for subscription to set.
      Returns:
      This builder for chaining.
    • getTopic

      public String getTopic()
       Optional. The name of the topic from which this subscription is receiving
       messages. Format is `projects/{project}/topics/{topic}`.
       
      string topic = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Specified by:
      getTopic in interface PubsubConfigOrBuilder
      Returns:
      The topic.
    • getTopicBytes

      public com.google.protobuf.ByteString getTopicBytes()
       Optional. The name of the topic from which this subscription is receiving
       messages. Format is `projects/{project}/topics/{topic}`.
       
      string topic = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Specified by:
      getTopicBytes in interface PubsubConfigOrBuilder
      Returns:
      The bytes for topic.
    • setTopic

      public PubsubConfig.Builder setTopic(String value)
       Optional. The name of the topic from which this subscription is receiving
       messages. Format is `projects/{project}/topics/{topic}`.
       
      string topic = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The topic to set.
      Returns:
      This builder for chaining.
    • clearTopic

      public PubsubConfig.Builder clearTopic()
       Optional. The name of the topic from which this subscription is receiving
       messages. Format is `projects/{project}/topics/{topic}`.
       
      string topic = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setTopicBytes

      public PubsubConfig.Builder setTopicBytes(com.google.protobuf.ByteString value)
       Optional. The name of the topic from which this subscription is receiving
       messages. Format is `projects/{project}/topics/{topic}`.
       
      string topic = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for topic to set.
      Returns:
      This builder for chaining.
    • getServiceAccountEmail

      public String getServiceAccountEmail()
       Service account that will make the push request.
       
      string service_account_email = 3 [(.google.api.resource_reference) = { ... }
      Specified by:
      getServiceAccountEmail in interface PubsubConfigOrBuilder
      Returns:
      The serviceAccountEmail.
    • getServiceAccountEmailBytes

      public com.google.protobuf.ByteString getServiceAccountEmailBytes()
       Service account that will make the push request.
       
      string service_account_email = 3 [(.google.api.resource_reference) = { ... }
      Specified by:
      getServiceAccountEmailBytes in interface PubsubConfigOrBuilder
      Returns:
      The bytes for serviceAccountEmail.
    • setServiceAccountEmail

      public PubsubConfig.Builder setServiceAccountEmail(String value)
       Service account that will make the push request.
       
      string service_account_email = 3 [(.google.api.resource_reference) = { ... }
      Parameters:
      value - The serviceAccountEmail to set.
      Returns:
      This builder for chaining.
    • clearServiceAccountEmail

      public PubsubConfig.Builder clearServiceAccountEmail()
       Service account that will make the push request.
       
      string service_account_email = 3 [(.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setServiceAccountEmailBytes

      public PubsubConfig.Builder setServiceAccountEmailBytes(com.google.protobuf.ByteString value)
       Service account that will make the push request.
       
      string service_account_email = 3 [(.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for serviceAccountEmail to set.
      Returns:
      This builder for chaining.
    • 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;
      Specified by:
      getStateValue in interface PubsubConfigOrBuilder
      Returns:
      The enum numeric value on the wire for state.
    • setStateValue

      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;
      Parameters:
      value - The enum numeric value on the wire for state to set.
      Returns:
      This builder for chaining.
    • 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;
      Specified by:
      getState in interface PubsubConfigOrBuilder
      Returns:
      The state.
    • setState

      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;
      Parameters:
      value - The state to set.
      Returns:
      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:
      This builder for chaining.