# Policy Simulator v1 API - Class OrgPolicyViolationsPreview.Types.ResourceCounts (1.4.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [1.4.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview.Types.ResourceCounts)
- [1.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/1.3.0/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview.Types.ResourceCounts)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/1.2.0/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview.Types.ResourceCounts)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/1.1.0/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview.Types.ResourceCounts)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/1.0.0/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview.Types.ResourceCounts)

    public sealed class OrgPolicyViolationsPreview.Types.ResourceCounts : IMessage<OrgPolicyViolationsPreview.Types.ResourceCounts>, IEquatable<OrgPolicyViolationsPreview.Types.ResourceCounts>, IDeepCloneable<OrgPolicyViolationsPreview.Types.ResourceCounts>, IBufferMessage, IMessage

Reference documentation and code samples for the Policy Simulator v1 API class OrgPolicyViolationsPreview.Types.ResourceCounts.

A summary of the state of all resources scanned for compliance with the
changed OrgPolicy.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> OrgPolicyViolationsPreview.Types.ResourceCounts

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[OrgPolicyViolationsPreview](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview.Types)[ResourceCounts](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview.Types.ResourceCounts), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[OrgPolicyViolationsPreview](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview.Types)[ResourceCounts](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview.Types.ResourceCounts), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[OrgPolicyViolationsPreview](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview.Types)[ResourceCounts](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview.Types.ResourceCounts), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.PolicySimulator.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1)

## Assembly

Google.Cloud.PolicySimulator.V1.dll

## Constructors

### ResourceCounts()

    public ResourceCounts()

### ResourceCounts(ResourceCounts)

    public ResourceCounts(OrgPolicyViolationsPreview.Types.ResourceCounts other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview.Types.ResourceCounts` |

## Properties

### Compliant

    public int Compliant { get; set; }

Output only. Number of scanned resources with zero violations.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### Errors

    public int Errors { get; set; }

Output only. Number of resources that returned an error when scanned.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### Noncompliant

    public int Noncompliant { get; set; }

Output only. Number of scanned resources with at least one violation.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### Scanned

    public int Scanned { get; set; }

Output only. Number of resources checked for compliance.

Must equal: unenforced + noncompliant + compliant + error

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### Unenforced

    public int Unenforced { get; set; }

Output only. Number of resources where the constraint was not enforced,
i.e. the Policy set `enforced: false` for that resource.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |