# Google Cloud Chronicle V1 Client - Class GetRuleRequest (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 GetRuleRequest.

Request message for GetRule method.

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

## Namespace

Google \\ Cloud \\ Chronicle \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Required. The name of the rule to retrieve. Format: `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` |
| `↳ view` | `int` The view field indicates the scope of fields to populate for the Rule being returned. If unspecified, defaults to FULL. |

### getName

Required. The name of the rule to retrieve.

Format:
`projects/{project}/locations/{location}/instances/{instance}/rules/{rule}`

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

### setName

Required. The name of the rule to retrieve.

Format:
`projects/{project}/locations/{location}/instances/{instance}/rules/{rule}`

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

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

### getView

The view field indicates the scope of fields to populate for the Rule being
returned. If unspecified, defaults to FULL.

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

### setView

The view field indicates the scope of fields to populate for the Rule being
returned. If unspecified, defaults to FULL.

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

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

### static::build

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. The name of the rule to retrieve. Format: `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` Please see RuleServiceClient::ruleName() for help formatting this field. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-chronicle/latest/V1.GetRuleRequest` |   |