3.3.0 (latest) 3.2.0 3.1.0 3.0.0 2.2.0

    public sealed class Policy : IMessage<Policy>, IEquatable<Policy>, IDeepCloneable<Policy>, IBufferMessage, IMessage

Reference documentation and code samples for the Google.Cloud.OrgPolicy.V1 class Policy.

Defines a Cloud Organization `Policy` which is used to specify `Constraints`
for configurations of Cloud Platform resources.

## Inheritance

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

## Implements

[IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.md.txt)[Policy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V1/latest/Google.Cloud.OrgPolicy.V1.Policy.md.txt), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Policy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V1/latest/Google.Cloud.OrgPolicy.V1.Policy.md.txt), [IDeepCloneable](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.md.txt)[Policy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V1/latest/Google.Cloud.OrgPolicy.V1.Policy.md.txt), [IBufferMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.md.txt), [IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.md.txt)

## 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.OrgPolicy.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V1/latest/Google.Cloud.OrgPolicy.V1.md.txt)

## Assembly

Google.Cloud.OrgPolicy.V1.dll

## Constructors

### Policy()

    public Policy()

### Policy(Policy)

    public Policy(Policy other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `Policy` |

## Properties

### BooleanPolicy

    public Policy.Types.BooleanPolicy BooleanPolicy { get; set; }

For boolean `Constraints`, whether to enforce the `Constraint` or not.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `PolicyTypesBooleanPolicy` |   |

### Constraint

    public string Constraint { get; set; }

The name of the `Constraint` the `Policy` is configuring, for example,
`constraints/serviceuser.services`.

Immutable after creation.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### Etag

    public ByteString Etag { get; set; }

An opaque tag indicating the current version of the `Policy`, used for
concurrency control.

When the `Policy` is returned from either a `GetPolicy` or a
`ListOrgPolicy` request, this `etag` indicates the version of the current
`Policy` to use when executing a read-modify-write loop.

When the `Policy` is returned from a `GetEffectivePolicy` request, the
`etag` will be unset.

When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value
that was returned from a `GetOrgPolicy` request as part of a
read-modify-write loop for concurrency control. Not setting the `etag`in a
`SetOrgPolicy` request will result in an unconditional write of the
`Policy`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `ByteString` |   |

### ListPolicy

    public Policy.Types.ListPolicy ListPolicy { get; set; }

List of values either allowed or disallowed.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `PolicyTypesListPolicy` |   |

### PolicyTypeCase

    public Policy.PolicyTypeOneofCase PolicyTypeCase { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `PolicyPolicyTypeOneofCase` |   |

### RestoreDefault

    public Policy.Types.RestoreDefault RestoreDefault { get; set; }

Restores the default behavior of the constraint; independent of
`Constraint` type.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `PolicyTypesRestoreDefault` |   |

### UpdateTime

    public Timestamp UpdateTime { get; set; }

The time stamp the `Policy` was previously updated. This is set by the
server, not specified by the caller, and represents the last time a call to
`SetOrgPolicy` was made for that `Policy`. Any value set by the client will
be ignored.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `Timestamp` |   |

### Version

    public int Version { get; set; }

Version of the `Policy`. Default version is 0;

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `int` |   |