# Google Cloud KMS Inventory V1 Client - Class ProtectedResourcesSummary (1.4.0)

1.4.0 (latest) 1.3.0 1.2.3 1.1.1 1.0.4 0.4.5 0.3.1 0.2.3 0.1.2 Reference documentation and code samples for the Google Cloud KMS Inventory V1 Client class ProtectedResourcesSummary.

Aggregate information about the resources protected by a Cloud KMS key in the
same Cloud organization/project as the key.

Generated from protobuf message `google.cloud.kms.inventory.v1.ProtectedResourcesSummary`

## Namespace

Google \\ Cloud \\ Kms \\ Inventory \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` The full name of the ProtectedResourcesSummary resource. Example: projects/test-project/locations/us/keyRings/test-keyring/cryptoKeys/test-key/protectedResourcesSummary |
| `↳ resource_count` | `int|string` The total number of protected resources in the same Cloud organization as the key. |
| `↳ project_count` | `int` The number of distinct Cloud projects in the same Cloud organization as the key that have resources protected by the key. |
| `↳ resource_types` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` The number of resources protected by the key grouped by resource type. |
| `↳ cloud_products` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` The number of resources protected by the key grouped by Cloud product. |
| `↳ locations` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` The number of resources protected by the key grouped by region. |
| `↳ warnings` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-kms-inventory/latest/V1.Warning>` Warning messages for the state of response [ProtectedResourcesSummary](https://docs.cloud.google.com/php/docs/reference/cloud-kms-inventory/latest/V1.ProtectedResourcesSummary) For example, if the organization service account is not configured, INSUFFICIENT_PERMISSIONS_PARTIAL_DATA warning will be returned. |

### getName

The full name of the ProtectedResourcesSummary resource.

Example:
projects/test-project/locations/us/keyRings/test-keyring/cryptoKeys/test-key/protectedResourcesSummary

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

### setName

The full name of the ProtectedResourcesSummary resource.

Example:
projects/test-project/locations/us/keyRings/test-keyring/cryptoKeys/test-key/protectedResourcesSummary

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

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

### getResourceCount

The total number of protected resources in the same Cloud organization as
the key.

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

### setResourceCount

The total number of protected resources in the same Cloud organization as
the key.

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

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

### getProjectCount

The number of distinct Cloud projects in the same Cloud organization as the
key that have resources protected by the key.

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

### setProjectCount

The number of distinct Cloud projects in the same Cloud organization as the
key that have resources protected by the key.

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

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

### getResourceTypes

The number of resources protected by the key grouped by resource type.

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

### setResourceTypes

The number of resources protected by the key grouped by resource type.

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

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

### getCloudProducts

The number of resources protected by the key grouped by Cloud product.

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

### setCloudProducts

The number of resources protected by the key grouped by Cloud product.

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

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

### getLocations

The number of resources protected by the key grouped by region.

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

### setLocations

The number of resources protected by the key grouped by region.

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

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

### getWarnings

Warning messages for the state of response
[ProtectedResourcesSummary](https://docs.cloud.google.com/php/docs/reference/cloud-kms-inventory/latest/V1.ProtectedResourcesSummary)
For example, if the organization service account is not configured,
INSUFFICIENT_PERMISSIONS_PARTIAL_DATA warning will be returned.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-kms-inventory/latest/V1.Warning>` |   |

### setWarnings

Warning messages for the state of response
[ProtectedResourcesSummary](https://docs.cloud.google.com/php/docs/reference/cloud-kms-inventory/latest/V1.ProtectedResourcesSummary)
For example, if the organization service account is not configured,
INSUFFICIENT_PERMISSIONS_PARTIAL_DATA warning will be returned.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-kms-inventory/latest/V1.Warning>` |

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