Reference documentation and code samples for the Google Cloud Asset V1 Client class 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.
Generated from protobuf messagegoogle.cloud.asset.v1.AnalyzerOrgPolicy.Rule
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Google Cloud Asset V1 Client - Class Rule (2.2.3)\n\nVersion latestkeyboard_arrow_down\n\n- [2.2.3 (latest)](/php/docs/reference/cloud-asset/latest/V1.AnalyzerOrgPolicy.Rule)\n- [2.2.2](/php/docs/reference/cloud-asset/2.2.2/V1.AnalyzerOrgPolicy.Rule)\n- [2.1.3](/php/docs/reference/cloud-asset/2.1.3/V1.AnalyzerOrgPolicy.Rule)\n- [2.0.1](/php/docs/reference/cloud-asset/2.0.1/V1.AnalyzerOrgPolicy.Rule)\n- [1.16.4](/php/docs/reference/cloud-asset/1.16.4/V1.AnalyzerOrgPolicy.Rule)\n- [1.14.1](/php/docs/reference/cloud-asset/1.14.1/V1.AnalyzerOrgPolicy.Rule)\n- [1.13.2](/php/docs/reference/cloud-asset/1.13.2/V1.AnalyzerOrgPolicy.Rule)\n- [1.12.2](/php/docs/reference/cloud-asset/1.12.2/V1.AnalyzerOrgPolicy.Rule)\n- [1.11.3](/php/docs/reference/cloud-asset/1.11.3/V1.AnalyzerOrgPolicy.Rule)\n- [1.10.2](/php/docs/reference/cloud-asset/1.10.2/V1.AnalyzerOrgPolicy.Rule)\n- [1.9.2](/php/docs/reference/cloud-asset/1.9.2/V1.AnalyzerOrgPolicy.Rule) \nReference documentation and code samples for the Google Cloud Asset V1 Client class 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\nGenerated from protobuf message `google.cloud.asset.v1.AnalyzerOrgPolicy.Rule`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Asset \\\\ V1 \\\\ AnalyzerOrgPolicy\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getValues\n\nList of values to be used for this policy rule. This field can be set\nonly in policies for list constraints.\n\n### hasValues\n\n### setValues\n\nList of values to be used for this policy rule. This field can be set\nonly in policies for list constraints.\n\n### getAllowAll\n\nSetting this to true means that all values are allowed. This field can\nbe set only in Policies for list constraints.\n\n### hasAllowAll\n\n### setAllowAll\n\nSetting this to true means that all values are allowed. This field can\nbe set only in Policies for list constraints.\n\n### getDenyAll\n\nSetting this to true means that all values are denied. This field can\nbe set only in Policies for list constraints.\n\n### hasDenyAll\n\n### setDenyAll\n\nSetting this to true means that all values are denied. This field can\nbe set only in Policies for list constraints.\n\n### getEnforce\n\nIf `true`, then the `Policy` is enforced. If `false`, then any\nconfiguration is acceptable.\n\nThis field can be set only in Policies for boolean constraints.\n\n### hasEnforce\n\n### setEnforce\n\nIf `true`, then the `Policy` is enforced. If `false`, then any\nconfiguration is acceptable.\n\nThis field can be set only in Policies for boolean constraints.\n\n### getCondition\n\nThe evaluating condition for this rule.\n\n### hasCondition\n\n### clearCondition\n\n### setCondition\n\nThe evaluating condition for this rule.\n\n### getConditionEvaluation\n\nThe condition evaluation result for this rule.\n\nOnly populated if it meets all the following criteria:\n\n- There is a [condition](/php/docs/reference/cloud-asset/latest/V1.AnalyzerOrgPolicy.Rule#_Google_Cloud_Asset_V1_AnalyzerOrgPolicy_Rule__getCondition__) defined for this rule.\n- This rule is within [AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer.consolidated_policy](/php/docs/reference/cloud-asset/latest/V1.AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer#_Google_Cloud_Asset_V1_AnalyzeOrgPolicyGovernedContainersResponse_GovernedContainer__getConsolidatedPolicy__), or [AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset.consolidated_policy](/php/docs/reference/cloud-asset/latest/V1.AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset#_Google_Cloud_Asset_V1_AnalyzeOrgPolicyGovernedAssetsResponse_GovernedAsset__getConsolidatedPolicy__) when the [AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset](/php/docs/reference/cloud-asset/latest/V1.AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset) has [AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset.governed_resource](/php/docs/reference/cloud-asset/latest/V1.AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset#_Google_Cloud_Asset_V1_AnalyzeOrgPolicyGovernedAssetsResponse_GovernedAsset__getGovernedResource__).\n\n### hasConditionEvaluation\n\n### clearConditionEvaluation\n\n### setConditionEvaluation\n\nThe condition evaluation result for this rule.\n\nOnly populated if it meets all the following criteria:\n\n- There is a [condition](/php/docs/reference/cloud-asset/latest/V1.AnalyzerOrgPolicy.Rule#_Google_Cloud_Asset_V1_AnalyzerOrgPolicy_Rule__getCondition__) defined for this rule.\n- This rule is within [AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer.consolidated_policy](/php/docs/reference/cloud-asset/latest/V1.AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer#_Google_Cloud_Asset_V1_AnalyzeOrgPolicyGovernedContainersResponse_GovernedContainer__getConsolidatedPolicy__), or [AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset.consolidated_policy](/php/docs/reference/cloud-asset/latest/V1.AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset#_Google_Cloud_Asset_V1_AnalyzeOrgPolicyGovernedAssetsResponse_GovernedAsset__getConsolidatedPolicy__) when the [AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset](/php/docs/reference/cloud-asset/latest/V1.AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset) has [AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset.governed_resource](/php/docs/reference/cloud-asset/latest/V1.AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset#_Google_Cloud_Asset_V1_AnalyzeOrgPolicyGovernedAssetsResponse_GovernedAsset__getGovernedResource__).\n\n### getKind"]]