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

Defines a selector to identify a single or a group of resources.

Conditions in the selector are optional, but at least one field
should be set to a non-empty value. If a condition is not specified,
no restrictions will be applied on that dimension.
If more than one condition is specified, a resource will be selected
if and only if all conditions are met.

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

## Namespace

Google \\ Cloud \\ GkeBackup \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ group_kind` | `https://docs.cloud.google.com/php/docs/reference/cloud-gke-backup/latest/V1.RestoreConfig.GroupKind` Optional. Selects resources using their Kubernetes GroupKinds. If specified, only resources of provided GroupKind will be selected. |
| `↳ name` | `string` Optional. Selects resources using their resource names. If specified, only resources with the provided name will be selected. |
| `↳ namespace` | `string` Optional. Selects resources using their namespaces. This only applies to namespace scoped resources and cannot be used for selecting cluster scoped resources. If specified, only resources in the provided namespace will be selected. If not specified, the filter will apply to both cluster scoped and namespace scoped resources (e.g. name or label). The [Namespace](https://pkg.go.dev/k8s.io/api/core/v1#Namespace) resource itself will be restored if and only if any resources within the namespace are restored. |
| `↳ labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Optional. Selects resources using Kubernetes [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/). If specified, a resource will be selected if and only if the resource has all of the provided labels and all the label values match. |

### getGroupKind

Optional. Selects resources using their Kubernetes GroupKinds. If
specified, only resources of provided GroupKind will be selected.

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

### hasGroupKind

### clearGroupKind

### setGroupKind

Optional. Selects resources using their Kubernetes GroupKinds. If
specified, only resources of provided GroupKind will be selected.

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

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

### getName

Optional. Selects resources using their resource names. If specified,
only resources with the provided name will be selected.

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

### setName

Optional. Selects resources using their resource names. If specified,
only resources with the provided name will be selected.

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

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

### getNamespace

Optional. Selects resources using their namespaces. This only applies to
namespace scoped resources and cannot be used for selecting
cluster scoped resources. If specified, only resources in the provided
namespace will be selected. If not specified, the filter will apply to
both cluster scoped and namespace scoped resources (e.g. name or label).

The [Namespace](https://pkg.go.dev/k8s.io/api/core/v1#Namespace) resource
itself will be restored if and only if any resources within the namespace
are restored.

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

### setNamespace

Optional. Selects resources using their namespaces. This only applies to
namespace scoped resources and cannot be used for selecting
cluster scoped resources. If specified, only resources in the provided
namespace will be selected. If not specified, the filter will apply to
both cluster scoped and namespace scoped resources (e.g. name or label).

The [Namespace](https://pkg.go.dev/k8s.io/api/core/v1#Namespace) resource
itself will be restored if and only if any resources within the namespace
are restored.

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

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

### getLabels

Optional. Selects resources using Kubernetes
[labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/).

If specified, a resource will be selected if and only if the resource
has all of the provided labels and all the label values match.

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

### setLabels

Optional. Selects resources using Kubernetes
[labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/).

If specified, a resource will be selected if and only if the resource
has all of the provided labels and all the label values match.

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

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