Class PullRequestFilter.Builder

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

public static final class PullRequestFilter.Builder extends com.google.protobuf.GeneratedMessage.Builder<PullRequestFilter.Builder> implements PullRequestFilterOrBuilder
 PullRequestFilter contains filter properties for matching GitHub Pull
 Requests.
 
Protobuf type google.devtools.cloudbuild.v1.PullRequestFilter
  • 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<PullRequestFilter.Builder>
    • clear

      public PullRequestFilter.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<PullRequestFilter.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<PullRequestFilter.Builder>
    • getDefaultInstanceForType

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

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

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

      public PullRequestFilter.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<PullRequestFilter.Builder>
    • mergeFrom

      public PullRequestFilter.Builder mergeFrom(PullRequestFilter other)
    • isInitialized

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

      public PullRequestFilter.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<PullRequestFilter.Builder>
      Throws:
      IOException
    • getGitRefCase

      public PullRequestFilter.GitRefCase getGitRefCase()
      Specified by:
      getGitRefCase in interface PullRequestFilterOrBuilder
    • clearGitRef

      public PullRequestFilter.Builder clearGitRef()
    • hasBranch

      public boolean hasBranch()
       Regex of branches to match.
      
       The syntax of the regular expressions accepted is the syntax accepted by
       RE2 and described at https://github.com/google/re2/wiki/Syntax
       
      string branch = 2;
      Specified by:
      hasBranch in interface PullRequestFilterOrBuilder
      Returns:
      Whether the branch field is set.
    • getBranch

      public String getBranch()
       Regex of branches to match.
      
       The syntax of the regular expressions accepted is the syntax accepted by
       RE2 and described at https://github.com/google/re2/wiki/Syntax
       
      string branch = 2;
      Specified by:
      getBranch in interface PullRequestFilterOrBuilder
      Returns:
      The branch.
    • getBranchBytes

      public com.google.protobuf.ByteString getBranchBytes()
       Regex of branches to match.
      
       The syntax of the regular expressions accepted is the syntax accepted by
       RE2 and described at https://github.com/google/re2/wiki/Syntax
       
      string branch = 2;
      Specified by:
      getBranchBytes in interface PullRequestFilterOrBuilder
      Returns:
      The bytes for branch.
    • setBranch

      public PullRequestFilter.Builder setBranch(String value)
       Regex of branches to match.
      
       The syntax of the regular expressions accepted is the syntax accepted by
       RE2 and described at https://github.com/google/re2/wiki/Syntax
       
      string branch = 2;
      Parameters:
      value - The branch to set.
      Returns:
      This builder for chaining.
    • clearBranch

      public PullRequestFilter.Builder clearBranch()
       Regex of branches to match.
      
       The syntax of the regular expressions accepted is the syntax accepted by
       RE2 and described at https://github.com/google/re2/wiki/Syntax
       
      string branch = 2;
      Returns:
      This builder for chaining.
    • setBranchBytes

      public PullRequestFilter.Builder setBranchBytes(com.google.protobuf.ByteString value)
       Regex of branches to match.
      
       The syntax of the regular expressions accepted is the syntax accepted by
       RE2 and described at https://github.com/google/re2/wiki/Syntax
       
      string branch = 2;
      Parameters:
      value - The bytes for branch to set.
      Returns:
      This builder for chaining.
    • getCommentControlValue

      public int getCommentControlValue()
       If CommentControl is enabled, depending on the setting, builds may not
       fire until a repository writer comments `/gcbrun` on a pull
       request or `/gcbrun` is in the pull request description.
       Only PR comments that contain `/gcbrun` will trigger builds.
      
       If CommentControl is set to disabled, comments with `/gcbrun` from a user
       with repository write permission or above will
       still trigger builds to run.
       
      .google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl comment_control = 5;
      Specified by:
      getCommentControlValue in interface PullRequestFilterOrBuilder
      Returns:
      The enum numeric value on the wire for commentControl.
    • setCommentControlValue

      public PullRequestFilter.Builder setCommentControlValue(int value)
       If CommentControl is enabled, depending on the setting, builds may not
       fire until a repository writer comments `/gcbrun` on a pull
       request or `/gcbrun` is in the pull request description.
       Only PR comments that contain `/gcbrun` will trigger builds.
      
       If CommentControl is set to disabled, comments with `/gcbrun` from a user
       with repository write permission or above will
       still trigger builds to run.
       
      .google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl comment_control = 5;
      Parameters:
      value - The enum numeric value on the wire for commentControl to set.
      Returns:
      This builder for chaining.
    • getCommentControl

      public PullRequestFilter.CommentControl getCommentControl()
       If CommentControl is enabled, depending on the setting, builds may not
       fire until a repository writer comments `/gcbrun` on a pull
       request or `/gcbrun` is in the pull request description.
       Only PR comments that contain `/gcbrun` will trigger builds.
      
       If CommentControl is set to disabled, comments with `/gcbrun` from a user
       with repository write permission or above will
       still trigger builds to run.
       
      .google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl comment_control = 5;
      Specified by:
      getCommentControl in interface PullRequestFilterOrBuilder
      Returns:
      The commentControl.
    • setCommentControl

       If CommentControl is enabled, depending on the setting, builds may not
       fire until a repository writer comments `/gcbrun` on a pull
       request or `/gcbrun` is in the pull request description.
       Only PR comments that contain `/gcbrun` will trigger builds.
      
       If CommentControl is set to disabled, comments with `/gcbrun` from a user
       with repository write permission or above will
       still trigger builds to run.
       
      .google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl comment_control = 5;
      Parameters:
      value - The commentControl to set.
      Returns:
      This builder for chaining.
    • clearCommentControl

      public PullRequestFilter.Builder clearCommentControl()
       If CommentControl is enabled, depending on the setting, builds may not
       fire until a repository writer comments `/gcbrun` on a pull
       request or `/gcbrun` is in the pull request description.
       Only PR comments that contain `/gcbrun` will trigger builds.
      
       If CommentControl is set to disabled, comments with `/gcbrun` from a user
       with repository write permission or above will
       still trigger builds to run.
       
      .google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl comment_control = 5;
      Returns:
      This builder for chaining.
    • getInvertRegex

      public boolean getInvertRegex()
       If true, branches that do NOT match the git_ref will trigger a build.
       
      bool invert_regex = 6;
      Specified by:
      getInvertRegex in interface PullRequestFilterOrBuilder
      Returns:
      The invertRegex.
    • setInvertRegex

      public PullRequestFilter.Builder setInvertRegex(boolean value)
       If true, branches that do NOT match the git_ref will trigger a build.
       
      bool invert_regex = 6;
      Parameters:
      value - The invertRegex to set.
      Returns:
      This builder for chaining.
    • clearInvertRegex

      public PullRequestFilter.Builder clearInvertRegex()
       If true, branches that do NOT match the git_ref will trigger a build.
       
      bool invert_regex = 6;
      Returns:
      This builder for chaining.