# Google Cloud Security Command Center V2 Client - Class Process (2.5.1)

2.5.1 (latest) 2.5.0 2.4.2 2.3.0 2.2.1 2.1.1 2.0.4 1.32.0 1.31.0 1.30.0 1.29.0 1.28.2 1.21.0 1.20.2 1.19.1 1.18.0 1.17.0 1.16.0 1.15.1 1.14.2 1.13.1 Reference documentation and code samples for the Google Cloud Security Command Center V2 Client class Process.

Represents an operating system process.

Generated from protobuf message `google.cloud.securitycenter.v2.Process`

## Namespace

Google \\ Cloud \\ SecurityCenter \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` The process name, as displayed in utilities like `top` and `ps`. This name can be accessed through `/proc/[pid]/comm` and changed with `prctl(PR_SET_NAME)`. |
| `↳ binary` | `https://docs.cloud.google.com/php/docs/reference/cloud-security-center/latest/V2.File` File information for the process executable. |
| `↳ libraries` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-security-center/latest/V2.File>` File information for libraries loaded by the process. |
| `↳ script` | `https://docs.cloud.google.com/php/docs/reference/cloud-security-center/latest/V2.File` When the process represents the invocation of a script, `binary` provides information about the interpreter, while `script` provides information about the script file provided to the interpreter. |
| `↳ args` | `string[]` Process arguments as JSON encoded strings. |
| `↳ arguments_truncated` | `bool` True if `args` is incomplete. |
| `↳ env_variables` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-security-center/latest/V2.EnvironmentVariable>` Process environment variables. |
| `↳ env_variables_truncated` | `bool` True if `env_variables` is incomplete. |
| `↳ pid` | `int|string` The process ID. |
| `↳ parent_pid` | `int|string` The parent process ID. |
| `↳ user_id` | `int|string` The ID of the user that executed the process. E.g. If this is the root user this will always be 0. |

### getName

The process name, as displayed in utilities like `top` and `ps`. This name
can be accessed through `/proc/[pid]/comm` and changed with
`prctl(PR_SET_NAME)`.

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

### setName

The process name, as displayed in utilities like `top` and `ps`. This name
can be accessed through `/proc/[pid]/comm` and changed with
`prctl(PR_SET_NAME)`.

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

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

### getBinary

File information for the process executable.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-security-center/latest/V2.File|null` |   |

### hasBinary

### clearBinary

### setBinary

File information for the process executable.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-security-center/latest/V2.File` |

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

### getLibraries

File information for libraries loaded by the process.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-security-center/latest/V2.File>` |   |

### setLibraries

File information for libraries loaded by the process.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-security-center/latest/V2.File>` |

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

### getScript

When the process represents the invocation of a script, `binary` provides
information about the interpreter, while `script` provides information
about the script file provided to the interpreter.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-security-center/latest/V2.File|null` |   |

### hasScript

### clearScript

### setScript

When the process represents the invocation of a script, `binary` provides
information about the interpreter, while `script` provides information
about the script file provided to the interpreter.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-security-center/latest/V2.File` |

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

### getArgs

Process arguments as JSON encoded strings.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setArgs

Process arguments as JSON encoded strings.

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

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

### getArgumentsTruncated

True if `args` is incomplete.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setArgumentsTruncated

True if `args` is incomplete.

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

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

### getEnvVariables

Process environment variables.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-security-center/latest/V2.EnvironmentVariable>` |   |

### setEnvVariables

Process environment variables.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-security-center/latest/V2.EnvironmentVariable>` |

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

### getEnvVariablesTruncated

True if `env_variables` is incomplete.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setEnvVariablesTruncated

True if `env_variables` is incomplete.

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

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

### getPid

The process ID.

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

### setPid

The process ID.

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

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

### getParentPid

The parent process ID.

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

### setParentPid

The parent process ID.

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

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

### getUserId

The ID of the user that executed the process. E.g. If this is the root user
this will always be 0.

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

### setUserId

The ID of the user that executed the process. E.g. If this is the root user
this will always be 0.

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

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