Reference documentation and code samples for the Data Loss Prevention V2 Client class PolicyRule.
A single policy rule. The first rule to match from the list above controls the result.
Generated from protobuf message google.privacy.dlp.v2.ContentPolicy.PolicyRule
Namespace
Google \ Cloud \ Dlp \ V2 \ ContentPolicyMethods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ conditions |
array<PolicyRule\PolicyCondition>
Optional. Conditions that must match for this rule to apply. All conditions must match ( |
↳ action |
PolicyAction
Required. Action to take if this rule applies. |
getConditions
Optional. Conditions that must match for this rule to apply.
All conditions must match (AND). For OR conditions, use multiple
rules.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\RepeatedField<PolicyRule\PolicyCondition> |
|
setConditions
Optional. Conditions that must match for this rule to apply.
All conditions must match (AND). For OR conditions, use multiple
rules.
| Parameter | |
|---|---|
| Name | Description |
var |
array<PolicyRule\PolicyCondition>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getAction
Required. Action to take if this rule applies.
| Returns | |
|---|---|
| Type | Description |
PolicyAction|null |
|
hasAction
clearAction
setAction
Required. Action to take if this rule applies.
| Parameter | |
|---|---|
| Name | Description |
var |
PolicyAction
|
| Returns | |
|---|---|
| Type | Description |
$this |
|