public sealed class AnalyzerOrgPolicy.Types.Rule : IMessage<AnalyzerOrgPolicy.Types.Rule>, IEquatable<AnalyzerOrgPolicy.Types.Rule>, IDeepCloneable<AnalyzerOrgPolicy.Types.Rule>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud Asset Inventory v1 API class AnalyzerOrgPolicy.Types.Rule.
This rule message is a customized version of the one defined in the
Organization Policy system. In addition to the fields defined in the
original organization policy, it contains additional field(s) under
specific circumstances to support analysis results.
public ConditionEvaluation ConditionEvaluation { get; set; }
The condition evaluation result for this rule.
Only populated if it meets all the following criteria:
There is a
[condition][google.cloud.asset.v1.AnalyzerOrgPolicy.Rule.condition]
defined for this rule.
This rule is within
[AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer.consolidated_policy][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer.consolidated_policy],
or
[AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset.consolidated_policy][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset.consolidated_policy]
when the
[AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset]
has
[AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset.governed_resource][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset.governed_resource].
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis webpage provides documentation for the \u003ccode\u003eAnalyzerOrgPolicy.Types.Rule\u003c/code\u003e class within the Google Cloud Asset Inventory v1 API, presenting various versions of the class.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the \u003ccode\u003eAnalyzerOrgPolicy.Types.Rule\u003c/code\u003e class is 3.12.0, with multiple previous versions also available, dating down to version 2.7.0.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAnalyzerOrgPolicy.Types.Rule\u003c/code\u003e class is a modified version of the Organization Policy system's rule, including extra fields for supporting analysis results under certain situations.\u003c/p\u003e\n"],["\u003cp\u003eThe class implements several interfaces, such as \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, providing methods and properties for interacting with and managing its data.\u003c/p\u003e\n"],["\u003cp\u003eThe properties of this class include settings like \u003ccode\u003eAllowAll\u003c/code\u003e, \u003ccode\u003eDenyAll\u003c/code\u003e, and \u003ccode\u003eEnforce\u003c/code\u003e for policy constraints, as well as \u003ccode\u003eCondition\u003c/code\u003e and \u003ccode\u003eConditionEvaluation\u003c/code\u003e for rule evaluation, alongside a list of \u003ccode\u003eValues\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Asset Inventory v1 API - Class AnalyzerOrgPolicy.Types.Rule (3.13.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.13.0 (latest)](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicy.Types.Rule)\n- [3.12.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.12.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicy.Types.Rule)\n- [3.11.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.11.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicy.Types.Rule)\n- [3.10.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.10.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicy.Types.Rule)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.9.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicy.Types.Rule)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.8.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicy.Types.Rule)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.7.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicy.Types.Rule)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.6.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicy.Types.Rule)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.5.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicy.Types.Rule)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.4.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicy.Types.Rule)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.3.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicy.Types.Rule)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.2.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicy.Types.Rule)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.1.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicy.Types.Rule)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.0.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicy.Types.Rule)\n- [2.11.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/2.11.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicy.Types.Rule)\n- [2.10.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/2.10.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicy.Types.Rule)\n- [2.9.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/2.9.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicy.Types.Rule)\n- [2.8.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/2.8.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicy.Types.Rule)\n- [2.7.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/2.7.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicy.Types.Rule) \n\n public sealed class AnalyzerOrgPolicy.Types.Rule : IMessage\u003cAnalyzerOrgPolicy.Types.Rule\u003e, IEquatable\u003cAnalyzerOrgPolicy.Types.Rule\u003e, IDeepCloneable\u003cAnalyzerOrgPolicy.Types.Rule\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Asset Inventory v1 API class AnalyzerOrgPolicy.Types.Rule.\n\nThis rule message is a customized version of the one defined in the\nOrganization Policy system. In addition to the fields defined in the\noriginal organization policy, it contains additional field(s) under\nspecific circumstances to support analysis results. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e AnalyzerOrgPolicy.Types.Rule \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[AnalyzerOrgPolicy](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicy)[Types](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicy.Types)[Rule](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicy.Types.Rule), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[AnalyzerOrgPolicy](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicy)[Types](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicy.Types)[Rule](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicy.Types.Rule), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[AnalyzerOrgPolicy](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicy)[Types](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicy.Types)[Rule](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicy.Types.Rule), [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) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Asset.V1](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Asset.V1.dll\n\nConstructors\n------------\n\n### Rule()\n\n public Rule()\n\n### Rule(Rule)\n\n public Rule(AnalyzerOrgPolicy.Types.Rule other)\n\nProperties\n----------\n\n### AllowAll\n\n public bool AllowAll { get; set; }\n\nSetting this to true means that all values are allowed. This field can\nbe set only in Policies for list constraints.\n\n### Condition\n\n public Expr Condition { get; set; }\n\nThe evaluating condition for this rule.\n\n### ConditionEvaluation\n\n public ConditionEvaluation ConditionEvaluation { get; set; }\n\nThe condition evaluation result for this rule.\nOnly populated if it meets all the following criteria:\n\n- There is a \\[condition\\]\\[google.cloud.asset.v1.AnalyzerOrgPolicy.Rule.condition\\] defined for this rule.\n- This rule is within \\[AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer.consolidated_policy\\]\\[google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer.consolidated_policy\\], or \\[AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset.consolidated_policy\\]\\[google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset.consolidated_policy\\] when the \\[AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset\\]\\[google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset\\] has \\[AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset.governed_resource\\]\\[google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset.governed_resource\\].\n\n### DenyAll\n\n public bool DenyAll { get; set; }\n\nSetting this to true means that all values are denied. This field can\nbe set only in Policies for list constraints.\n\n### Enforce\n\n public bool Enforce { get; set; }\n\nIf `true`, then the `Policy` is enforced. If `false`, then any\nconfiguration is acceptable.\nThis field can be set only in Policies for boolean constraints.\n\n### HasAllowAll\n\n public bool HasAllowAll { get; }\n\nGets whether the \"allow_all\" field is set\n\n### HasDenyAll\n\n public bool HasDenyAll { get; }\n\nGets whether the \"deny_all\" field is set\n\n### HasEnforce\n\n public bool HasEnforce { get; }\n\nGets whether the \"enforce\" field is set\n\n### KindCase\n\n public AnalyzerOrgPolicy.Types.Rule.KindOneofCase KindCase { get; }\n\n### Values\n\n public AnalyzerOrgPolicy.Types.Rule.Types.StringValues Values { get; set; }\n\nList of values to be used for this policy rule. This field can be set\nonly in policies for list constraints."]]