# Google Cloud Chronicle V1 Client - Class RuleDeployment (0.4.0)

0.4.0 (latest) 0.3.0 0.2.3 0.1.2 Reference documentation and code samples for the Google Cloud Chronicle V1 Client class RuleDeployment.

The RuleDeployment resource represents the deployment state of a Rule.

Generated from protobuf message `google.cloud.chronicle.v1.RuleDeployment`

## Namespace

Google \\ Cloud \\ Chronicle \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Required. The resource name of the rule deployment. Note that RuleDeployment is a child of the overall Rule, not any individual revision, so the resource ID segment for the Rule resource must not reference a specific revision. Format: `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` |
| `↳ enabled` | `bool` Whether the rule is currently deployed continuously against incoming data. |
| `↳ alerting` | `bool` Whether detections resulting from this deployment should be considered alerts. |
| `↳ archived` | `bool` The archive state of the rule deployment. Cannot be set to true unless enabled is set to false. If set to true, alerting will automatically be set to false. If currently set to true, enabled, alerting, and run_frequency cannot be updated. |
| `↳ archive_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The timestamp when the rule deployment archive state was last set to true. If the rule deployment's current archive state is not set to true, the field will be empty. |
| `↳ run_frequency` | `int` The run frequency of the rule deployment. |
| `↳ execution_state` | `int` Output only. The execution state of the rule deployment. |
| `↳ producer_rules` | `string[]` Output only. The names of the associated/chained producer rules. Rules are considered producers for this rule if this rule explicitly filters on their ruleid. Format: `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` |
| `↳ consumer_rules` | `string[]` Output only. The names of the associated/chained consumer rules. Rules are considered consumers of this rule if their rule text explicitly filters on this rule's ruleid. Format: `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` |
| `↳ last_alert_status_change_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The timestamp when the rule deployment alert state was lastly changed. This is filled regardless of the current alert state. E.g. if the current alert status is false, this timestamp will be the timestamp when the alert status was changed to false. |

### getName

Required. The resource name of the rule deployment.

Note that RuleDeployment is a child of the overall Rule, not any individual
revision, so the resource ID segment for the Rule resource must not
reference a specific revision.
Format:
`projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setName

Required. The resource name of the rule deployment.

Note that RuleDeployment is a child of the overall Rule, not any individual
revision, so the resource ID segment for the Rule resource must not
reference a specific revision.
Format:
`projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getEnabled

Whether the rule is currently deployed continuously against incoming data.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setEnabled

Whether the rule is currently deployed continuously against incoming data.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAlerting

Whether detections resulting from this deployment should be considered
alerts.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setAlerting

Whether detections resulting from this deployment should be considered
alerts.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getArchived

The archive state of the rule deployment.

Cannot be set to true unless enabled is set to false.
If set to true, alerting will automatically be set to false.
If currently set to true, enabled, alerting, and run_frequency cannot be
updated.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setArchived

The archive state of the rule deployment.

Cannot be set to true unless enabled is set to false.
If set to true, alerting will automatically be set to false.
If currently set to true, enabled, alerting, and run_frequency cannot be
updated.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getArchiveTime

Output only. The timestamp when the rule deployment archive state was last
set to true. If the rule deployment's current archive state is not set to
true, the field will be empty.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasArchiveTime

### clearArchiveTime

### setArchiveTime

Output only. The timestamp when the rule deployment archive state was last
set to true. If the rule deployment's current archive state is not set to
true, the field will be empty.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getRunFrequency

The run frequency of the rule deployment.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [RunFrequency](https://docs.cloud.google.com/php/docs/reference/cloud-chronicle/latest/V1.RunFrequency). |

### setRunFrequency

The run frequency of the rule deployment.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [RunFrequency](https://docs.cloud.google.com/php/docs/reference/cloud-chronicle/latest/V1.RunFrequency). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getExecutionState

Output only. The execution state of the rule deployment.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [ExecutionState](https://docs.cloud.google.com/php/docs/reference/cloud-chronicle/latest/V1.RuleDeployment.ExecutionState). |

### setExecutionState

Output only. The execution state of the rule deployment.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [ExecutionState](https://docs.cloud.google.com/php/docs/reference/cloud-chronicle/latest/V1.RuleDeployment.ExecutionState). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getProducerRules

Output only. The names of the associated/chained producer rules. Rules are
considered producers for this rule if this rule explicitly filters on their
ruleid. Format:
`projects/{project}/locations/{location}/instances/{instance}/rules/{rule}`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setProducerRules

Output only. The names of the associated/chained producer rules. Rules are
considered producers for this rule if this rule explicitly filters on their
ruleid. Format:
`projects/{project}/locations/{location}/instances/{instance}/rules/{rule}`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getConsumerRules

Output only. The names of the associated/chained consumer rules. Rules are
considered consumers of this rule if their rule text explicitly filters on
this rule's ruleid. Format:
`projects/{project}/locations/{location}/instances/{instance}/rules/{rule}`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setConsumerRules

Output only. The names of the associated/chained consumer rules. Rules are
considered consumers of this rule if their rule text explicitly filters on
this rule's ruleid. Format:
`projects/{project}/locations/{location}/instances/{instance}/rules/{rule}`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getLastAlertStatusChangeTime

Output only. The timestamp when the rule deployment alert state was lastly
changed. This is filled regardless of the current alert state. E.g. if the
current alert status is false, this timestamp will be the timestamp when
the alert status was changed to false.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasLastAlertStatusChangeTime

### clearLastAlertStatusChangeTime

### setLastAlertStatusChangeTime

Output only. The timestamp when the rule deployment alert state was lastly
changed. This is filled regardless of the current alert state. E.g. if the
current alert status is false, this timestamp will be the timestamp when
the alert status was changed to false.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |