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

Metadata of a FileDiff. FileDiff represents a single file diff in a pull
request.

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

## Namespace

Google \\ Cloud \\ SecureSourceManager \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Output only. The name of the file. |
| `↳ action` | `int` Output only. The action taken on the file (eg. added, modified, deleted). |
| `↳ sha` | `string` Output only. The commit pointing to the file changes. |
| `↳ patch` | `string` Output only. The git patch containing the file changes. |

### getName

Output only. The name of the file.

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

### setName

Output only. The name of the file.

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

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

### getAction

Output only. The action taken on the file (eg. added, modified, deleted).

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

### setAction

Output only. The action taken on the file (eg. added, modified, deleted).

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

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

### getSha

Output only. The commit pointing to the file changes.

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

### setSha

Output only. The commit pointing to the file changes.

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

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

### getPatch

Output only. The git patch containing the file changes.

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

### setPatch

Output only. The git patch containing the file changes.

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

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