# Recommender V1 Client - Class Impact (2.2.0)

2.2.0 (latest) 2.1.3 2.0.5 1.11.5 1.10.0 1.9.1 1.8.2 1.7.8 Reference documentation and code samples for the Recommender V1 Client class Impact.

Contains the impact a recommendation can have for a given category.

Generated from protobuf message `google.cloud.recommender.v1.Impact`

## Namespace

Google \\ Cloud \\ Recommender \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ category` | `int` Category that is being targeted. |
| `↳ cost_projection` | `https://docs.cloud.google.com/php/docs/reference/cloud-recommender/latest/V1.CostProjection` Use with CategoryType.COST |
| `↳ security_projection` | `https://docs.cloud.google.com/php/docs/reference/cloud-recommender/latest/V1.SecurityProjection` Use with CategoryType.SECURITY |
| `↳ sustainability_projection` | `https://docs.cloud.google.com/php/docs/reference/cloud-recommender/latest/V1.SustainabilityProjection` Use with CategoryType.SUSTAINABILITY |
| `↳ reliability_projection` | `https://docs.cloud.google.com/php/docs/reference/cloud-recommender/latest/V1.ReliabilityProjection` Use with CategoryType.RELIABILITY |
| `↳ service` | `string` The service that this impact is associated with. |

### getCategory

Category that is being targeted.

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

### setCategory

Category that is being targeted.

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

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

### getCostProjection

Use with CategoryType.COST

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

### hasCostProjection

### setCostProjection

Use with CategoryType.COST

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

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

### getSecurityProjection

Use with CategoryType.SECURITY

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

### hasSecurityProjection

### setSecurityProjection

Use with CategoryType.SECURITY

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

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

### getSustainabilityProjection

Use with CategoryType.SUSTAINABILITY

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

### hasSustainabilityProjection

### setSustainabilityProjection

Use with CategoryType.SUSTAINABILITY

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

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

### getReliabilityProjection

Use with CategoryType.RELIABILITY

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

### hasReliabilityProjection

### setReliabilityProjection

Use with CategoryType.RELIABILITY

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

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

### getService

The service that this impact is associated with.

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

### setService

The service that this impact is associated with.

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

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

### getProjection

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