Google Cloud Secure Source Manager V1 Client - Class BranchRule (1.3.1)

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 desginated branches within a repository.

Generated from protobuf message google.cloud.securesourcemanager.v1.BranchRule

Namespace

Google \ Cloud \ SecureSourceManager \ V1

Methods

__construct

Constructor.

Parameters
Name Description
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 Google\Protobuf\Timestamp

Output only. Create timestamp.

↳ update_time Google\Protobuf\Timestamp

Output only. Update timestamp.

↳ 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 array<BranchRule\Check>

Optional. List of required status checks before merging to the branch.

getName

Optional. A unique identifier for a BranchRule. The name should be of the format: projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}

Returns
Type Description
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}

Parameter
Name Description
var string
Returns
Type Description
$this

getUid

Output only. Unique identifier of the repository.

Returns
Type Description
string

setUid

Output only. Unique identifier of the repository.

Parameter
Name Description
var string
Returns
Type Description
$this

getCreateTime

Output only. Create timestamp.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

Output only. Create timestamp.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getUpdateTime

Output only. Update timestamp.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasUpdateTime

clearUpdateTime

setUpdateTime

Output only. Update timestamp.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$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.

Returns
Type Description
Google\Protobuf\Internal\MapField

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.

Parameter
Name Description
var array|Google\Protobuf\Internal\MapField
Returns
Type Description
$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.

Returns
Type Description
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.

Parameter
Name Description
var string
Returns
Type Description
$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.

Returns
Type Description
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.

Parameter
Name Description
var string
Returns
Type Description
$this

getDisabled

Optional. Determines if the branch rule is disabled or not.

Returns
Type Description
bool

setDisabled

Optional. Determines if the branch rule is disabled or not.

Parameter
Name Description
var bool
Returns
Type Description
$this

getRequirePullRequest

Optional. Determines if the branch rule requires a pull request or not.

Returns
Type Description
bool

setRequirePullRequest

Optional. Determines if the branch rule requires a pull request or not.

Parameter
Name Description
var bool
Returns
Type Description
$this

getMinimumReviewsCount

Optional. The minimum number of reviews required for the branch rule to be matched.

Returns
Type Description
int

setMinimumReviewsCount

Optional. The minimum number of reviews required for the branch rule to be matched.

Parameter
Name Description
var int
Returns
Type Description
$this

getMinimumApprovalsCount

Optional. The minimum number of approvals required for the branch rule to be matched.

Returns
Type Description
int

setMinimumApprovalsCount

Optional. The minimum number of approvals required for the branch rule to be matched.

Parameter
Name Description
var int
Returns
Type Description
$this

getRequireCommentsResolved

Optional. Determines if require comments resolved before merging to the branch.

Returns
Type Description
bool

setRequireCommentsResolved

Optional. Determines if require comments resolved before merging to the branch.

Parameter
Name Description
var bool
Returns
Type Description
$this

getAllowStaleReviews

Optional. Determines if allow stale reviews or approvals before merging to the branch.

Returns
Type Description
bool

setAllowStaleReviews

Optional. Determines if allow stale reviews or approvals before merging to the branch.

Parameter
Name Description
var bool
Returns
Type Description
$this

getRequireLinearHistory

Optional. Determines if require linear history before merging to the branch.

Returns
Type Description
bool

setRequireLinearHistory

Optional. Determines if require linear history before merging to the branch.

Parameter
Name Description
var bool
Returns
Type Description
$this

getRequiredStatusChecks

Optional. List of required status checks before merging to the branch.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setRequiredStatusChecks

Optional. List of required status checks before merging to the branch.

Parameter
Name Description
var array<BranchRule\Check>
Returns
Type Description
$this