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

Reference documentation and code samples for the Design Center v1 API class Policy.

A Policy is a resource within an Application Template that refers to a Policy
that you author outside of Application Design Center and attach to an
application template.

## Inheritance

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

## Implements

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

## Assembly

Google.Cloud.DesignCenter.V1.dll

## Constructors

### Policy()

    public Policy()

### Policy(Policy)

    public Policy(Policy other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DesignCenter.V1/latest/Google.Cloud.DesignCenter.V1.Policy` |

## Properties

### ApplyConditions

    public RepeatedField<ApplyCondition> ApplyConditions { get; }

Optional. Conditions for applying the policy. Condition accepts the
`criticality` and `environment` parameters from the application template.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DesignCenter.V1/latest/Google.Cloud.DesignCenter.V1.ApplyCondition` |   |

### CloudControlConfigs

    public RepeatedField<CloudControlConfig> CloudControlConfigs { get; }

Optional. Input only. Parameter values for the cloud controls of the
policy's framework, grouped by cloud control. Only honored when framework
parameter support is enabled for the project; ignored otherwise.

The values are saved with the application template and are not returned on
the policy. On update, they replace the saved values. If they are empty,
the saved values are cleared if `cloud_control_configs` is named in the
update mask. Otherwise, the saved values are kept, unless the policy's
framework changes.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DesignCenter.V1/latest/Google.Cloud.DesignCenter.V1.CloudControlConfig` |   |

### CreateTime

    public Timestamp CreateTime { get; set; }

Output only. The policy creation timestamp.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Timestamp.html` |   |

### Description

    public string Description { get; set; }

Optional. The policy description.

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

### DisplayName

    public string DisplayName { get; set; }

Optional. The policy display name.

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

### HasPolicyRevisionUri

    public bool HasPolicyRevisionUri { get; }

Gets whether the "policy_revision_uri" field is set

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

### HasPolicyUri

    public bool HasPolicyUri { get; }

Gets whether the "policy_uri" field is set

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

### Name

    public string Name { get; set; }

Identifier. The policy name in the following format:
`projects/$project/locations/$location/spaces/$space/applicationTemplates/$applicationTemplate/policies/$policy`

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

### PolicyName

    public PolicyName PolicyName { get; set; }

[PolicyName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DesignCenter.V1/latest/Google.Cloud.DesignCenter.V1.PolicyName)-typed view over the [Name](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DesignCenter.V1/latest/Google.Cloud.DesignCenter.V1.Policy#Google_Cloud_DesignCenter_V1_Policy_Name) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DesignCenter.V1/latest/Google.Cloud.DesignCenter.V1.PolicyName` |   |

### PolicyRevisionUri

    public string PolicyRevisionUri { get; set; }

Optional. URI of the policy revision.

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

### PolicyType

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

Required. The policy type.
Policy type is used to determine the domain of the policy.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DesignCenter.V1/latest/Google.Cloud.DesignCenter.V1.Policyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DesignCenter.V1/latest/Google.Cloud.DesignCenter.V1.Policy.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DesignCenter.V1/latest/Google.Cloud.DesignCenter.V1.Policy.Types.PolicyType` |   |

### PolicyUri

    public string PolicyUri { get; set; }

Optional. URI of the policy.

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

### UpdateTime

    public Timestamp UpdateTime { get; set; }

Output only. The policy update timestamp.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Timestamp.html` |   |

### UriCase

    public Policy.UriOneofCase UriCase { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DesignCenter.V1/latest/Google.Cloud.DesignCenter.V1.Policyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DesignCenter.V1/latest/Google.Cloud.DesignCenter.V1.Policy.UriOneofCase` |   |