# Google Cloud Gke Backup V1 Client - Class TransformationRule (1.3.3)

1.3.3 (latest) 1.3.2 1.2.1 1.0.3 0.8.1 0.7.2 0.6.0 0.5.3 0.4.0 0.3.1 0.2.0 0.1.7 Reference documentation and code samples for the Google Cloud Gke Backup V1 Client class TransformationRule.

A transformation rule to be applied against Kubernetes resources as they
are selected for restoration from a Backup. A rule contains both filtering
logic (which resources are subject to transform) and transformation logic.

Generated from protobuf message `google.cloud.gkebackup.v1.RestoreConfig.TransformationRule`

## Namespace

Google \\ Cloud \\ GkeBackup \\ V1 \\ RestoreConfig

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ field_actions` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-gke-backup/latest/V1.RestoreConfig.TransformationRuleAction>` Required. A list of transformation rule actions to take against candidate resources. Actions are executed in order defined - this order matters, as they could potentially interfere with each other and the first operation could affect the outcome of the second operation. |
| `↳ resource_filter` | `https://docs.cloud.google.com/php/docs/reference/cloud-gke-backup/latest/V1.RestoreConfig.ResourceFilter` Optional. This field is used to specify a set of fields that should be used to determine which resources in backup should be acted upon by the supplied transformation rule actions, and this will ensure that only specific resources are affected by transformation rule actions. |
| `↳ description` | `string` Optional. The description is a user specified string description of the transformation rule. |

### getFieldActions

Required. A list of transformation rule actions to take against candidate
resources. Actions are executed in order defined - this order matters, as
they could potentially interfere with each other and the first operation
could affect the outcome of the second operation.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-gke-backup/latest/V1.RestoreConfig.TransformationRuleAction>` |   |

### setFieldActions

Required. A list of transformation rule actions to take against candidate
resources. Actions are executed in order defined - this order matters, as
they could potentially interfere with each other and the first operation
could affect the outcome of the second operation.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-gke-backup/latest/V1.RestoreConfig.TransformationRuleAction>` |

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

### getResourceFilter

Optional. This field is used to specify a set of fields that should be
used to determine which resources in backup should be acted upon by the
supplied transformation rule actions, and this will ensure that only
specific resources are affected by transformation rule actions.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-gke-backup/latest/V1.RestoreConfig.ResourceFilter|null` |   |

### hasResourceFilter

### clearResourceFilter

### setResourceFilter

Optional. This field is used to specify a set of fields that should be
used to determine which resources in backup should be acted upon by the
supplied transformation rule actions, and this will ensure that only
specific resources are affected by transformation rule actions.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-gke-backup/latest/V1.RestoreConfig.ResourceFilter` |

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

### getDescription

Optional. The description is a user specified string description of the
transformation rule.

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

### setDescription

Optional. The description is a user specified string description of the
transformation rule.

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

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