Package com.oracle.bmc.devops.model
Class ApprovalRule.Builder
- java.lang.Object
-
- com.oracle.bmc.devops.model.ApprovalRule.Builder
-
- Enclosing class:
- ApprovalRule
public static class ApprovalRule.Builder extends Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ApprovalRule
build()
ApprovalRule.Builder
copy(ApprovalRule model)
ApprovalRule.Builder
destinationBranch(String destinationBranch)
Branch name where pull requests targeting the branch must satisfy the approval rule.ApprovalRule.Builder
minApprovalsCount(Integer minApprovalsCount)
Minimum number of approvals which must be provided by the reviewers specified in the list before the rule can be satisfiedApprovalRule.Builder
name(String name)
Name which is used to uniquely identify an approval rule.ApprovalRule.Builder
reviewers(List<PrincipalDetails> reviewers)
List of users who must provide approvals up to the minApprovalsCount specified in the rule.
-
-
-
Method Detail
-
name
public ApprovalRule.Builder name(String name)
Name which is used to uniquely identify an approval rule.- Parameters:
name
- the value to set- Returns:
- this builder
-
destinationBranch
public ApprovalRule.Builder destinationBranch(String destinationBranch)
Branch name where pull requests targeting the branch must satisfy the approval rule.This value being null means the rule applies to all pull requests
- Parameters:
destinationBranch
- the value to set- Returns:
- this builder
-
reviewers
public ApprovalRule.Builder reviewers(List<PrincipalDetails> reviewers)
List of users who must provide approvals up to the minApprovalsCount specified in the rule.An empty list means the approvals can come from any user.
- Parameters:
reviewers
- the value to set- Returns:
- this builder
-
minApprovalsCount
public ApprovalRule.Builder minApprovalsCount(Integer minApprovalsCount)
Minimum number of approvals which must be provided by the reviewers specified in the list before the rule can be satisfied- Parameters:
minApprovalsCount
- the value to set- Returns:
- this builder
-
build
public ApprovalRule build()
-
copy
public ApprovalRule.Builder copy(ApprovalRule model)
-
-