# Class Rule (0.11.0)

0.11.0 (latest) 0.10.0 0.9.0 0.8.0 0.7.16 0.6.0 0.5.1 0.4.1 0.3.1 0.2.1 0.1.0

    Rule(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Represents the rule for a content warehouse trigger.

| ## Attributes ||
|---|---|
| **Name** | **Description** |
| `description` | `str` Short description of the rule and its context. |
| `rule_id` | `str` ID of the rule. It has to be unique across all the examples. This is managed internally. |
| `trigger_type` | `https://docs.cloud.google.com/python/docs/reference/contentwarehouse/latest/google.cloud.contentwarehouse_v1.types.Rule.TriggerType` Identifies the trigger type for running the policy. |
| `condition` | `str` Represents the conditional expression to be evaluated. Expression should evaluate to a boolean result. When the condition is true actions are executed. Example: user_role = "hsbc_role_1" AND doc.salary \> 20000 |
| `actions` | `MutableSequence[https://docs.cloud.google.com/python/docs/reference/contentwarehouse/latest/google.cloud.contentwarehouse_v1.types.Action]` List of actions that are executed when the rule is satisfied. |

## Classes

### TriggerType

    TriggerType(value)

The trigger types for actions.