# Google Cloud Gke Backup V1 Client - Class RestoreConfig (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 RestoreConfig.

Configuration of a restore.

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

## Namespace

Google \\ Cloud \\ GkeBackup \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ volume_data_restore_policy` | `int` Optional. Specifies the mechanism to be used to restore volume data. Default: VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED (will be treated as NO_VOLUME_DATA_RESTORATION). |
| `↳ cluster_resource_conflict_policy` | `int` Optional. Defines the behavior for handling the situation where cluster-scoped resources being restored already exist in the target cluster. This MUST be set to a value other than CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if [cluster_resource_restore_scope](https://docs.cloud.google.com/php/docs/reference/cloud-gke-backup/latest/V1.RestoreConfig#_Google_Cloud_GkeBackup_V1_RestoreConfig__getClusterResourceRestoreScope__) is not empty. |
| `↳ namespaced_resource_restore_mode` | `int` Optional. Defines the behavior for handling the situation where sets of namespaced resources being restored already exist in the target cluster. This MUST be set to a value other than NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED. |
| `↳ cluster_resource_restore_scope` | `https://docs.cloud.google.com/php/docs/reference/cloud-gke-backup/latest/V1.RestoreConfig.ClusterResourceRestoreScope` Optional. Identifies the cluster-scoped resources to restore from the Backup. Not specifying it means NO cluster resource will be restored. |
| `↳ all_namespaces` | `bool` Restore all namespaced resources in the Backup if set to "True". Specifying this field to "False" is an error. |
| `↳ selected_namespaces` | `https://docs.cloud.google.com/php/docs/reference/cloud-gke-backup/latest/V1.Namespaces` A list of selected Namespaces to restore from the Backup. The listed Namespaces and all resources contained in them will be restored. |
| `↳ selected_applications` | `https://docs.cloud.google.com/php/docs/reference/cloud-gke-backup/latest/V1.NamespacedNames` A list of selected ProtectedApplications to restore. The listed ProtectedApplications and all the resources to which they refer will be restored. |
| `↳ no_namespaces` | `bool` Do not restore any namespaced resources if set to "True". Specifying this field to "False" is not allowed. |
| `↳ excluded_namespaces` | `https://docs.cloud.google.com/php/docs/reference/cloud-gke-backup/latest/V1.Namespaces` A list of selected namespaces excluded from restoration. All namespaces except those in this list will be restored. |
| `↳ substitution_rules` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-gke-backup/latest/V1.RestoreConfig.SubstitutionRule>` Optional. A list of transformation rules to be applied against Kubernetes resources as they are selected for restoration from a Backup. Rules are executed in order defined - this order matters, as changes made by a rule may impact the filtering logic of subsequent rules. An empty list means no substitution will occur. |
| `↳ transformation_rules` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-gke-backup/latest/V1.RestoreConfig.TransformationRule>` Optional. A list of transformation rules to be applied against Kubernetes resources as they are selected for restoration from a Backup. Rules are executed in order defined - this order matters, as changes made by a rule may impact the filtering logic of subsequent rules. An empty list means no transformation will occur. |
| `↳ volume_data_restore_policy_bindings` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-gke-backup/latest/V1.RestoreConfig.VolumeDataRestorePolicyBinding>` Optional. A table that binds volumes by their scope to a restore policy. Bindings must have a unique scope. Any volumes not scoped in the bindings are subject to the policy defined in volume_data_restore_policy. |
| `↳ restore_order` | `https://docs.cloud.google.com/php/docs/reference/cloud-gke-backup/latest/V1.RestoreConfig.RestoreOrder` Optional. RestoreOrder contains custom ordering to use on a Restore. |

### getVolumeDataRestorePolicy

Optional. Specifies the mechanism to be used to restore volume data.

Default: VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED (will be treated as
NO_VOLUME_DATA_RESTORATION).

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

### setVolumeDataRestorePolicy

Optional. Specifies the mechanism to be used to restore volume data.

Default: VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED (will be treated as
NO_VOLUME_DATA_RESTORATION).

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

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

### getClusterResourceConflictPolicy

Optional. Defines the behavior for handling the situation where
cluster-scoped resources being restored already exist in the target
cluster. This MUST be set to a value other than
CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if
[cluster_resource_restore_scope](https://docs.cloud.google.com/php/docs/reference/cloud-gke-backup/latest/V1.RestoreConfig#_Google_Cloud_GkeBackup_V1_RestoreConfig__getClusterResourceRestoreScope__)
is not empty.

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

### setClusterResourceConflictPolicy

Optional. Defines the behavior for handling the situation where
cluster-scoped resources being restored already exist in the target
cluster. This MUST be set to a value other than
CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if
[cluster_resource_restore_scope](https://docs.cloud.google.com/php/docs/reference/cloud-gke-backup/latest/V1.RestoreConfig#_Google_Cloud_GkeBackup_V1_RestoreConfig__getClusterResourceRestoreScope__)
is not empty.

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

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

### getNamespacedResourceRestoreMode

Optional. Defines the behavior for handling the situation where sets of
namespaced resources being restored already exist in the target cluster.

This MUST be set to a value other than
NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED.

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

### setNamespacedResourceRestoreMode

Optional. Defines the behavior for handling the situation where sets of
namespaced resources being restored already exist in the target cluster.

This MUST be set to a value other than
NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED.

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

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

### getClusterResourceRestoreScope

Optional. Identifies the cluster-scoped resources to restore from the
Backup. Not specifying it means NO cluster resource will be restored.

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

### hasClusterResourceRestoreScope

### clearClusterResourceRestoreScope

### setClusterResourceRestoreScope

Optional. Identifies the cluster-scoped resources to restore from the
Backup. Not specifying it means NO cluster resource will be restored.

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

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

### getAllNamespaces

Restore all namespaced resources in the Backup if set to "True".

Specifying this field to "False" is an error.

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

### hasAllNamespaces

### setAllNamespaces

Restore all namespaced resources in the Backup if set to "True".

Specifying this field to "False" is an error.

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

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

### getSelectedNamespaces

A list of selected Namespaces to restore from the Backup. The listed
Namespaces and all resources contained in them will be restored.

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

### hasSelectedNamespaces

### setSelectedNamespaces

A list of selected Namespaces to restore from the Backup. The listed
Namespaces and all resources contained in them will be restored.

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

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

### getSelectedApplications

A list of selected ProtectedApplications to restore. The listed
ProtectedApplications and all the resources to which they refer will be
restored.

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

### hasSelectedApplications

### setSelectedApplications

A list of selected ProtectedApplications to restore. The listed
ProtectedApplications and all the resources to which they refer will be
restored.

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

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

### getNoNamespaces

Do not restore any namespaced resources if set to "True".

Specifying this field to "False" is not allowed.

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

### hasNoNamespaces

### setNoNamespaces

Do not restore any namespaced resources if set to "True".

Specifying this field to "False" is not allowed.

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

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

### getExcludedNamespaces

A list of selected namespaces excluded from restoration. All
namespaces except those in this list will be restored.

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

### hasExcludedNamespaces

### setExcludedNamespaces

A list of selected namespaces excluded from restoration. All
namespaces except those in this list will be restored.

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

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

### getSubstitutionRules

Optional. A list of transformation rules to be applied against Kubernetes
resources as they are selected for restoration from a Backup. Rules are
executed in order defined - this order matters, as changes made by a rule
may impact the filtering logic of subsequent rules. An empty list means no
substitution will occur.

| **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.SubstitutionRule>` |   |

### setSubstitutionRules

Optional. A list of transformation rules to be applied against Kubernetes
resources as they are selected for restoration from a Backup. Rules are
executed in order defined - this order matters, as changes made by a rule
may impact the filtering logic of subsequent rules. An empty list means no
substitution will occur.

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

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

### getTransformationRules

Optional. A list of transformation rules to be applied against Kubernetes
resources as they are selected for restoration from a Backup. Rules are
executed in order defined - this order matters, as changes made by a rule
may impact the filtering logic of subsequent rules. An empty list means no
transformation will occur.

| **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.TransformationRule>` |   |

### setTransformationRules

Optional. A list of transformation rules to be applied against Kubernetes
resources as they are selected for restoration from a Backup. Rules are
executed in order defined - this order matters, as changes made by a rule
may impact the filtering logic of subsequent rules. An empty list means no
transformation will occur.

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

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

### getVolumeDataRestorePolicyBindings

Optional. A table that binds volumes by their scope to a restore policy.

Bindings must have a unique scope. Any volumes not scoped in the bindings
are subject to the policy defined in volume_data_restore_policy.

| **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.VolumeDataRestorePolicyBinding>` |   |

### setVolumeDataRestorePolicyBindings

Optional. A table that binds volumes by their scope to a restore policy.

Bindings must have a unique scope. Any volumes not scoped in the bindings
are subject to the policy defined in volume_data_restore_policy.

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

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

### getRestoreOrder

Optional. RestoreOrder contains custom ordering to use on a Restore.

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

### hasRestoreOrder

### clearRestoreOrder

### setRestoreOrder

Optional. RestoreOrder contains custom ordering to use on a Restore.

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

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

### getNamespacedResourceRestoreScope

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