# Google Cloud Secure Source Manager V1 Client - Class PullRequest (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 PullRequest.

Metadata of a PullRequest. PullRequest is the request
from a user to merge a branch (head) into another branch (base).

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

## Namespace

Google \\ Cloud \\ SecureSourceManager \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Output only. Identifier. A unique identifier for a PullRequest. The number appended at the end is generated by the server. Format: `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request_id}` |
| `↳ title` | `string` Required. The pull request title. |
| `↳ body` | `string` Optional. The pull request body. Provides a detailed description of the changes. |
| `↳ base` | `https://docs.cloud.google.com/php/docs/reference/cloud-securesourcemanager/latest/V1.PullRequest.Branch` Required. The branch to merge changes in. |
| `↳ head` | `https://docs.cloud.google.com/php/docs/reference/cloud-securesourcemanager/latest/V1.PullRequest.Branch` Immutable. The branch containing the changes to be merged. |
| `↳ state` | `int` Output only. State of the pull request (open, closed or merged). |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Creation timestamp. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Last updated timestamp. |
| `↳ close_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Close timestamp (if closed or merged). Cleared when pull request is re-opened. |

### getName

Output only. Identifier. A unique identifier for a PullRequest. The number
appended at the end is generated by the server. Format:
`projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request_id}`

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

### setName

Output only. Identifier. A unique identifier for a PullRequest. The number
appended at the end is generated by the server. Format:
`projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request_id}`

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

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

### getTitle

Required. The pull request title.

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

### setTitle

Required. The pull request title.

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

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

### getBody

Optional. The pull request body. Provides a detailed description of the
changes.

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

### setBody

Optional. The pull request body. Provides a detailed description of the
changes.

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

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

### getBase

Required. The branch to merge changes in.

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

### hasBase

### clearBase

### setBase

Required. The branch to merge changes in.

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

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

### getHead

Immutable. The branch containing the changes to be merged.

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

### hasHead

### clearHead

### setHead

Immutable. The branch containing the changes to be merged.

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

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

### getState

Output only. State of the pull request (open, closed or merged).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [State](https://docs.cloud.google.com/php/docs/reference/cloud-securesourcemanager/latest/V1.PullRequest.State). |

### setState

Output only. State of the pull request (open, closed or merged).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [State](https://docs.cloud.google.com/php/docs/reference/cloud-securesourcemanager/latest/V1.PullRequest.State). |

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

### getCreateTime

Output only. Creation timestamp.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. Creation timestamp.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

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

### getUpdateTime

Output only. Last updated timestamp.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. Last updated timestamp.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

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

### getCloseTime

Output only. Close timestamp (if closed or merged). Cleared when pull
request is re-opened.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasCloseTime

### clearCloseTime

### setCloseTime

Output only. Close timestamp (if closed or merged). Cleared when pull
request is re-opened.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

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