Reference documentation and code samples for the Google Cloud Secure Source Manager V1 Client class BranchRule.
Metadata of a BranchRule. BranchRule is the protection rule to enforce pre-defined rules on designated branches within a repository.
Generated from protobuf message google.cloud.securesourcemanager.v1.BranchRule
Namespace
Google \ Cloud \ SecureSourceManager \ V1Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ name
string
Optional. A unique identifier for a BranchRule. The name should be of the format: projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}
↳ uid
string
Output only. Unique identifier of the repository.
↳ create_time
↳ update_time
↳ annotations
array| Google\Protobuf\Internal\MapField
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.
↳ etag
string
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.
↳ include_pattern
string
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.
↳ disabled
bool
Optional. Determines if the branch rule is disabled or not.
↳ require_pull_request
bool
Optional. Determines if the branch rule requires a pull request or not.
↳ minimum_reviews_count
int
Optional. The minimum number of reviews required for the branch rule to be matched.
↳ minimum_approvals_count
int
Optional. The minimum number of approvals required for the branch rule to be matched.
↳ require_comments_resolved
bool
Optional. Determines if require comments resolved before merging to the branch.
↳ allow_stale_reviews
bool
Optional. Determines if allow stale reviews or approvals before merging to the branch.
↳ require_linear_history
bool
Optional. Determines if require linear history before merging to the branch.
↳ required_status_checks
getName
Optional. A unique identifier for a BranchRule. The name should be of the
format: projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}
string
setName
Optional. A unique identifier for a BranchRule. The name should be of the
format: projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}
var
string
$this
getUid
Output only. Unique identifier of the repository.
string
setUid
Output only. Unique identifier of the repository.
var
string
$this
getCreateTime
Output only. Create timestamp.
hasCreateTime
clearCreateTime
setCreateTime
Output only. Create timestamp.
$this
getUpdateTime
Output only. Update timestamp.
hasUpdateTime
clearUpdateTime
setUpdateTime
Output only. Update timestamp.
$this
getAnnotations
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.
setAnnotations
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.
$this
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
setEtag
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.
var
string
$this
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
setIncludePattern
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.
var
string
$this
getDisabled
Optional. Determines if the branch rule is disabled or not.
bool
setDisabled
Optional. Determines if the branch rule is disabled or not.
var
bool
$this
getRequirePullRequest
Optional. Determines if the branch rule requires a pull request or not.
bool
setRequirePullRequest
Optional. Determines if the branch rule requires a pull request or not.
var
bool
$this
getMinimumReviewsCount
Optional. The minimum number of reviews required for the branch rule to be matched.
int
setMinimumReviewsCount
Optional. The minimum number of reviews required for the branch rule to be matched.
var
int
$this
getMinimumApprovalsCount
Optional. The minimum number of approvals required for the branch rule to be matched.
int
setMinimumApprovalsCount
Optional. The minimum number of approvals required for the branch rule to be matched.
var
int
$this
getRequireCommentsResolved
Optional. Determines if require comments resolved before merging to the branch.
bool
setRequireCommentsResolved
Optional. Determines if require comments resolved before merging to the branch.
var
bool
$this
getAllowStaleReviews
Optional. Determines if allow stale reviews or approvals before merging to the branch.
bool
setAllowStaleReviews
Optional. Determines if allow stale reviews or approvals before merging to the branch.
var
bool
$this
getRequireLinearHistory
Optional. Determines if require linear history before merging to the branch.
bool
setRequireLinearHistory
Optional. Determines if require linear history before merging to the branch.
var
bool
$this
getRequiredStatusChecks
Optional. List of required status checks before merging to the branch.
setRequiredStatusChecks
Optional. List of required status checks before merging to the branch.
$this