Class BranchRule

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.securesourcemanager.v1.BranchRule
All Implemented Interfaces:
BranchRuleOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class BranchRule extends com.google.protobuf.GeneratedMessage implements BranchRuleOrBuilder
 Metadata of a BranchRule. BranchRule is the protection rule to enforce
 pre-defined rules on designated branches within a repository.
 
Protobuf type google.cloud.securesourcemanager.v1.BranchRule
See Also:
  • Field Details

    • NAME_FIELD_NUMBER

      public static final int NAME_FIELD_NUMBER
      See Also:
    • UID_FIELD_NUMBER

      public static final int UID_FIELD_NUMBER
      See Also:
    • CREATE_TIME_FIELD_NUMBER

      public static final int CREATE_TIME_FIELD_NUMBER
      See Also:
    • UPDATE_TIME_FIELD_NUMBER

      public static final int UPDATE_TIME_FIELD_NUMBER
      See Also:
    • ANNOTATIONS_FIELD_NUMBER

      public static final int ANNOTATIONS_FIELD_NUMBER
      See Also:
    • ETAG_FIELD_NUMBER

      public static final int ETAG_FIELD_NUMBER
      See Also:
    • INCLUDE_PATTERN_FIELD_NUMBER

      public static final int INCLUDE_PATTERN_FIELD_NUMBER
      See Also:
    • DISABLED_FIELD_NUMBER

      public static final int DISABLED_FIELD_NUMBER
      See Also:
    • REQUIRE_PULL_REQUEST_FIELD_NUMBER

      public static final int REQUIRE_PULL_REQUEST_FIELD_NUMBER
      See Also:
    • MINIMUM_REVIEWS_COUNT_FIELD_NUMBER

      public static final int MINIMUM_REVIEWS_COUNT_FIELD_NUMBER
      See Also:
    • MINIMUM_APPROVALS_COUNT_FIELD_NUMBER

      public static final int MINIMUM_APPROVALS_COUNT_FIELD_NUMBER
      See Also:
    • REQUIRE_CODE_OWNER_APPROVAL_FIELD_NUMBER

      public static final int REQUIRE_CODE_OWNER_APPROVAL_FIELD_NUMBER
      See Also:
    • REQUIRE_COMMENTS_RESOLVED_FIELD_NUMBER

      public static final int REQUIRE_COMMENTS_RESOLVED_FIELD_NUMBER
      See Also:
    • ALLOW_STALE_REVIEWS_FIELD_NUMBER

      public static final int ALLOW_STALE_REVIEWS_FIELD_NUMBER
      See Also:
    • REQUIRE_LINEAR_HISTORY_FIELD_NUMBER

      public static final int REQUIRE_LINEAR_HISTORY_FIELD_NUMBER
      See Also:
    • REQUIRED_STATUS_CHECKS_FIELD_NUMBER

      public static final int REQUIRED_STATUS_CHECKS_FIELD_NUMBER
      See Also:
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getName

      public String getName()
       Identifier. A unique identifier for a BranchRule. The name should be of the
       format:
       `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}`
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getName in interface BranchRuleOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Identifier. A unique identifier for a BranchRule. The name should be of the
       format:
       `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}`
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getNameBytes in interface BranchRuleOrBuilder
      Returns:
      The bytes for name.
    • getUid

      public String getUid()
       Output only. Unique identifier of the repository.
       
      string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }
      Specified by:
      getUid in interface BranchRuleOrBuilder
      Returns:
      The uid.
    • getUidBytes

      public com.google.protobuf.ByteString getUidBytes()
       Output only. Unique identifier of the repository.
       
      string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }
      Specified by:
      getUidBytes in interface BranchRuleOrBuilder
      Returns:
      The bytes for uid.
    • hasCreateTime

      public boolean hasCreateTime()
       Output only. Create timestamp.
       
      .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasCreateTime in interface BranchRuleOrBuilder
      Returns:
      Whether the createTime field is set.
    • getCreateTime

      public com.google.protobuf.Timestamp getCreateTime()
       Output only. Create timestamp.
       
      .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTime in interface BranchRuleOrBuilder
      Returns:
      The createTime.
    • getCreateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
       Output only. Create timestamp.
       
      .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTimeOrBuilder in interface BranchRuleOrBuilder
    • hasUpdateTime

      public boolean hasUpdateTime()
       Output only. Update timestamp.
       
      .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasUpdateTime in interface BranchRuleOrBuilder
      Returns:
      Whether the updateTime field is set.
    • getUpdateTime

      public com.google.protobuf.Timestamp getUpdateTime()
       Output only. Update timestamp.
       
      .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTime in interface BranchRuleOrBuilder
      Returns:
      The updateTime.
    • getUpdateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
       Output only. Update timestamp.
       
      .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTimeOrBuilder in interface BranchRuleOrBuilder
    • getAnnotationsCount

      public int getAnnotationsCount()
      Description copied from interface: BranchRuleOrBuilder
       Optional. User annotations. These attributes can only be set and used by
       the user. See https://google.aip.dev/128#annotations for more details such
       as format and size limitations.
       
      map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAnnotationsCount in interface BranchRuleOrBuilder
    • containsAnnotations

      public boolean containsAnnotations(String key)
       Optional. User annotations. These attributes can only be set and used by
       the user. See https://google.aip.dev/128#annotations for more details such
       as format and size limitations.
       
      map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      containsAnnotations in interface BranchRuleOrBuilder
    • getAnnotations

      @Deprecated public Map<String,String> getAnnotations()
      Deprecated.
      Use getAnnotationsMap() instead.
      Specified by:
      getAnnotations in interface BranchRuleOrBuilder
    • getAnnotationsMap

      public Map<String,String> getAnnotationsMap()
       Optional. User annotations. These attributes can only be set and used by
       the user. See https://google.aip.dev/128#annotations for more details such
       as format and size limitations.
       
      map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAnnotationsMap in interface BranchRuleOrBuilder
    • getAnnotationsOrDefault

      public String getAnnotationsOrDefault(String key, String defaultValue)
       Optional. User annotations. These attributes can only be set and used by
       the user. See https://google.aip.dev/128#annotations for more details such
       as format and size limitations.
       
      map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAnnotationsOrDefault in interface BranchRuleOrBuilder
    • getAnnotationsOrThrow

      public String getAnnotationsOrThrow(String key)
       Optional. User annotations. These attributes can only be set and used by
       the user. See https://google.aip.dev/128#annotations for more details such
       as format and size limitations.
       
      map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAnnotationsOrThrow in interface BranchRuleOrBuilder
    • getEtag

      public String getEtag()
       Optional. This checksum is computed by the server based on the value of
       other fields, and may be sent on update and delete requests to ensure the
       client has an up-to-date value before proceeding.
       
      string etag = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEtag in interface BranchRuleOrBuilder
      Returns:
      The etag.
    • getEtagBytes

      public com.google.protobuf.ByteString getEtagBytes()
       Optional. This checksum is computed by the server based on the value of
       other fields, and may be sent on update and delete requests to ensure the
       client has an up-to-date value before proceeding.
       
      string etag = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEtagBytes in interface BranchRuleOrBuilder
      Returns:
      The bytes for etag.
    • getIncludePattern

      public String getIncludePattern()
       Optional. The pattern of the branch that can match to this BranchRule.
       Specified as regex.
       .* for all branches. Examples: main, (main|release.*).
       Current MVP phase only support `.*` for wildcard.
       
      string include_pattern = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getIncludePattern in interface BranchRuleOrBuilder
      Returns:
      The includePattern.
    • getIncludePatternBytes

      public com.google.protobuf.ByteString getIncludePatternBytes()
       Optional. The pattern of the branch that can match to this BranchRule.
       Specified as regex.
       .* for all branches. Examples: main, (main|release.*).
       Current MVP phase only support `.*` for wildcard.
       
      string include_pattern = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getIncludePatternBytes in interface BranchRuleOrBuilder
      Returns:
      The bytes for includePattern.
    • getDisabled

      public boolean getDisabled()
       Optional. Determines if the branch rule is disabled or not.
       
      bool disabled = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDisabled in interface BranchRuleOrBuilder
      Returns:
      The disabled.
    • getRequirePullRequest

      public boolean getRequirePullRequest()
       Optional. Determines if the branch rule requires a pull request or not.
       
      bool require_pull_request = 9 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getRequirePullRequest in interface BranchRuleOrBuilder
      Returns:
      The requirePullRequest.
    • getMinimumReviewsCount

      public int getMinimumReviewsCount()
       Optional. The minimum number of reviews required for the branch rule to be
       matched.
       
      int32 minimum_reviews_count = 10 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getMinimumReviewsCount in interface BranchRuleOrBuilder
      Returns:
      The minimumReviewsCount.
    • getMinimumApprovalsCount

      public int getMinimumApprovalsCount()
       Optional. The minimum number of approvals required for the branch rule to
       be matched.
       
      int32 minimum_approvals_count = 11 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getMinimumApprovalsCount in interface BranchRuleOrBuilder
      Returns:
      The minimumApprovalsCount.
    • getRequireCodeOwnerApproval

      public boolean getRequireCodeOwnerApproval()
       Optional. Determines if code owners must approve before merging to the
       branch.
       
      bool require_code_owner_approval = 16 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getRequireCodeOwnerApproval in interface BranchRuleOrBuilder
      Returns:
      The requireCodeOwnerApproval.
    • getRequireCommentsResolved

      public boolean getRequireCommentsResolved()
       Optional. Determines if require comments resolved before merging to the
       branch.
       
      bool require_comments_resolved = 12 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getRequireCommentsResolved in interface BranchRuleOrBuilder
      Returns:
      The requireCommentsResolved.
    • getAllowStaleReviews

      public boolean getAllowStaleReviews()
       Optional. Determines if allow stale reviews or approvals before merging to
       the branch.
       
      bool allow_stale_reviews = 15 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAllowStaleReviews in interface BranchRuleOrBuilder
      Returns:
      The allowStaleReviews.
    • getRequireLinearHistory

      public boolean getRequireLinearHistory()
       Optional. Determines if require linear history before merging to the
       branch.
       
      bool require_linear_history = 13 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getRequireLinearHistory in interface BranchRuleOrBuilder
      Returns:
      The requireLinearHistory.
    • getRequiredStatusChecksList

      public List<BranchRule.Check> getRequiredStatusChecksList()
       Optional. List of required status checks before merging to the branch.
       
      repeated .google.cloud.securesourcemanager.v1.BranchRule.Check required_status_checks = 14 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getRequiredStatusChecksList in interface BranchRuleOrBuilder
    • getRequiredStatusChecksOrBuilderList

      public List<? extends BranchRule.CheckOrBuilder> getRequiredStatusChecksOrBuilderList()
       Optional. List of required status checks before merging to the branch.
       
      repeated .google.cloud.securesourcemanager.v1.BranchRule.Check required_status_checks = 14 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getRequiredStatusChecksOrBuilderList in interface BranchRuleOrBuilder
    • getRequiredStatusChecksCount

      public int getRequiredStatusChecksCount()
       Optional. List of required status checks before merging to the branch.
       
      repeated .google.cloud.securesourcemanager.v1.BranchRule.Check required_status_checks = 14 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getRequiredStatusChecksCount in interface BranchRuleOrBuilder
    • getRequiredStatusChecks

      public BranchRule.Check getRequiredStatusChecks(int index)
       Optional. List of required status checks before merging to the branch.
       
      repeated .google.cloud.securesourcemanager.v1.BranchRule.Check required_status_checks = 14 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getRequiredStatusChecks in interface BranchRuleOrBuilder
    • getRequiredStatusChecksOrBuilder

      public BranchRule.CheckOrBuilder getRequiredStatusChecksOrBuilder(int index)
       Optional. List of required status checks before merging to the branch.
       
      repeated .google.cloud.securesourcemanager.v1.BranchRule.Check required_status_checks = 14 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getRequiredStatusChecksOrBuilder in interface BranchRuleOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static BranchRule parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static BranchRule parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static BranchRule parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static BranchRule parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static BranchRule parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static BranchRule parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static BranchRule parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static BranchRule parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static BranchRule parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static BranchRule parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static BranchRule parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static BranchRule parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public BranchRule.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static BranchRule.Builder newBuilder()
    • newBuilder

      public static BranchRule.Builder newBuilder(BranchRule prototype)
    • toBuilder

      public BranchRule.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected BranchRule.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static BranchRule getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<BranchRule> parser()
    • getParserForType

      public com.google.protobuf.Parser<BranchRule> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public BranchRule getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder