# Google Cloud Asset Inventory v1 API - Class AnalyzerOrgPolicyConstraint.Types.Constraint (3.14.0)

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

- [3.14.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)
- [3.13.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/3.13.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)
- [3.12.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/3.12.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)
- [3.11.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/3.11.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)
- [3.10.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/3.10.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)
- [3.9.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/3.9.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)
- [3.8.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/3.8.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)
- [3.7.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/3.7.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)
- [3.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/3.6.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)
- [3.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/3.5.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)
- [3.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/3.4.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)
- [3.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/3.3.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)
- [3.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/3.2.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)
- [3.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/3.1.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)
- [3.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/3.0.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)
- [2.11.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/2.11.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)
- [2.10.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/2.10.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)
- [2.9.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/2.9.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)
- [2.8.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/2.8.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)
- [2.7.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/2.7.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)

    public sealed class AnalyzerOrgPolicyConstraint.Types.Constraint : IMessage<AnalyzerOrgPolicyConstraint.Types.Constraint>, IEquatable<AnalyzerOrgPolicyConstraint.Types.Constraint>, IDeepCloneable<AnalyzerOrgPolicyConstraint.Types.Constraint>, IBufferMessage, IMessage

Reference documentation and code samples for the Google Cloud Asset Inventory v1 API class AnalyzerOrgPolicyConstraint.Types.Constraint.

The definition of a constraint.

## Inheritance

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

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[AnalyzerOrgPolicyConstraint](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types)[Constraint](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[AnalyzerOrgPolicyConstraint](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types)[Constraint](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[AnalyzerOrgPolicyConstraint](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types)[Constraint](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint), [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.Asset.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1)

## Assembly

Google.Cloud.Asset.V1.dll

## Constructors

### Constraint()

    public Constraint()

### Constraint(Constraint)

    public Constraint(AnalyzerOrgPolicyConstraint.Types.Constraint other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstrainthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint` |

## Properties

### BooleanConstraint

    public AnalyzerOrgPolicyConstraint.Types.Constraint.Types.BooleanConstraint BooleanConstraint { get; set; }

Defines this constraint as being a BooleanConstraint.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstrainthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constrainthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint.Types.BooleanConstraint` |   |

### ConstraintDefault

    public AnalyzerOrgPolicyConstraint.Types.Constraint.Types.ConstraintDefault ConstraintDefault { get; set; }

The evaluation behavior of this constraint in the absence of 'Policy'.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstrainthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constrainthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint.Types.ConstraintDefault` |   |

### ConstraintTypeCase

    public AnalyzerOrgPolicyConstraint.Types.Constraint.ConstraintTypeOneofCase ConstraintTypeCase { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstrainthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constrainthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint.ConstraintTypeOneofCase` |   |

### Description

    public string Description { get; set; }

Detailed description of what this `Constraint` controls as well as how
and where it is enforced.

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

### DisplayName

    public string DisplayName { get; set; }

The human readable name of the constraint.

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

### ListConstraint

    public AnalyzerOrgPolicyConstraint.Types.Constraint.Types.ListConstraint ListConstraint { get; set; }

Defines this constraint as being a ListConstraint.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstrainthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constrainthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint.Types.ListConstraint` |   |

### Name

    public string Name { get; set; }

The unique name of the constraint. Format of the name should be

- `constraints/{constraint_name}`

For example, `constraints/compute.disableSerialPortAccess`.

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