# Google Cloud Secure Source Manager V1 Client - Class CreateBranchRuleRequest (1.8.0)

1.8.0 (latest) 1.7.0 1.6.3 1.5.0 1.4.1 1.3.3 1.2.0 1.1.0 1.0.0 0.2.5 0.1.0 Reference documentation and code samples for the Google Cloud Secure Source Manager V1 Client class CreateBranchRuleRequest.

CreateBranchRuleRequest is the request to create a branch rule.

Generated from protobuf message `google.cloud.securesourcemanager.v1.CreateBranchRuleRequest`

## Namespace

Google \\ Cloud \\ SecureSourceManager \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ parent` | `string` |
| `↳ branch_rule` | `https://docs.cloud.google.com/php/docs/reference/cloud-securesourcemanager/latest/V1.BranchRule` |
| `↳ branch_rule_id` | `string` |

### getParent

Generated from protobuf field `string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setParent

Generated from protobuf field `string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getBranchRule

Generated from protobuf field `.google.cloud.securesourcemanager.v1.BranchRule branch_rule = 2 [(.google.api.field_behavior) = REQUIRED];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-securesourcemanager/latest/V1.BranchRule|null` |   |

### hasBranchRule

### clearBranchRule

### setBranchRule

Generated from protobuf field `.google.cloud.securesourcemanager.v1.BranchRule branch_rule = 2 [(.google.api.field_behavior) = REQUIRED];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-securesourcemanager/latest/V1.BranchRule` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getBranchRuleId

Generated from protobuf field `string branch_rule_id = 3 [(.google.api.field_behavior) = REQUIRED];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setBranchRuleId

Generated from protobuf field `string branch_rule_id = 3 [(.google.api.field_behavior) = REQUIRED];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Please see SecureSourceManagerClient::repositoryName() for help formatting this field. |
| `branchRule` | `https://docs.cloud.google.com/php/docs/reference/cloud-securesourcemanager/latest/V1.BranchRule` |
| `branchRuleId` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-securesourcemanager/latest/V1.CreateBranchRuleRequest` |   |