# Google Cloud Security Command Center V2 Client - Class AttackExposure (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 AttackExposure.

An attack exposure contains the results of an attack path simulation run.

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

## Namespace

Google \\ Cloud \\ SecurityCenter \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ score` | `float` A number between 0 (inclusive) and infinity that represents how important this finding is to remediate. The higher the score, the more important it is to remediate. |
| `↳ latest_calculation_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` The most recent time the attack exposure was updated on this finding. |
| `↳ attack_exposure_result` | `string` The resource name of the attack path simulation result that contains the details regarding this attack exposure score. Example: `organizations/123/simulations/456/attackExposureResults/789` |
| `↳ state` | `int` Output only. What state this AttackExposure is in. This captures whether or not an attack exposure has been calculated or not. |
| `↳ exposed_high_value_resources_count` | `int` The number of high value resources that are exposed as a result of this finding. |
| `↳ exposed_medium_value_resources_count` | `int` The number of medium value resources that are exposed as a result of this finding. |
| `↳ exposed_low_value_resources_count` | `int` The number of high value resources that are exposed as a result of this finding. |

### getScore

A number between 0 (inclusive) and infinity that represents how important
this finding is to remediate. The higher the score, the more important it
is to remediate.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### setScore

A number between 0 (inclusive) and infinity that represents how important
this finding is to remediate. The higher the score, the more important it
is to remediate.

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

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

### getLatestCalculationTime

The most recent time the attack exposure was updated on this finding.

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

### hasLatestCalculationTime

### clearLatestCalculationTime

### setLatestCalculationTime

The most recent time the attack exposure was updated on this finding.

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

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

### getAttackExposureResult

The resource name of the attack path simulation result that contains the
details regarding this attack exposure score.

Example: `organizations/123/simulations/456/attackExposureResults/789`

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

### setAttackExposureResult

The resource name of the attack path simulation result that contains the
details regarding this attack exposure score.

Example: `organizations/123/simulations/456/attackExposureResults/789`

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

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

### getState

Output only. What state this AttackExposure is in. This captures whether or
not an attack exposure has been calculated or not.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [State](https://docs.cloud.google.com/php/docs/reference/cloud-security-center/latest/V2.AttackExposure.State). |

### setState

Output only. What state this AttackExposure is in. This captures whether or
not an attack exposure has been calculated or not.

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

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

### getExposedHighValueResourcesCount

The number of high value resources that are exposed as a result of this
finding.

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

### setExposedHighValueResourcesCount

The number of high value resources that are exposed as a result of this
finding.

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

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

### getExposedMediumValueResourcesCount

The number of medium value resources that are exposed as a result of this
finding.

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

### setExposedMediumValueResourcesCount

The number of medium value resources that are exposed as a result of this
finding.

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

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

### getExposedLowValueResourcesCount

The number of high value resources that are exposed as a result of this
finding.

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

### setExposedLowValueResourcesCount

The number of high value resources that are exposed as a result of this
finding.

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

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