# Google Cloud Gke Hub V1 Client - Class PBNamespace (1.3.1)

1.3.1 (latest) 1.3.0 1.2.2 1.1.0 1.0.6 0.10.0 0.9.5 0.8.2 0.7.1 0.6.3 0.5.6 Reference documentation and code samples for the Google Cloud Gke Hub V1 Client class PBNamespace.

Namespace represents a namespace across the Fleet

Generated from protobuf message `google.cloud.gkehub.v1.Namespace`

## Namespace

Google \\ Cloud \\ GkeHub \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` The resource name for the namespace `projects/{project}/locations/{location}/namespaces/{namespace}` |
| `↳ uid` | `string` Output only. Google-generated UUID for this resource. This is unique across all namespace resources. If a namespace resource is deleted and another resource with the same name is created, it gets a different uid. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. When the namespace was created. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. When the namespace was last updated. |
| `↳ delete_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. When the namespace was deleted. |
| `↳ state` | `https://docs.cloud.google.com/php/docs/reference/cloud-gke-hub/latest/V1.NamespaceLifecycleState` Output only. State of the namespace resource. |
| `↳ scope` | `string` Required. Scope associated with the namespace |
| `↳ namespace_labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Optional. Namespace-level cluster namespace labels. These labels are applied to the related namespace of the member clusters bound to the parent Scope. Scope-level labels (`namespace_labels` in the Fleet Scope resource) take precedence over Namespace-level labels if they share a key. Keys and values must be Kubernetes-conformant. |
| `↳ labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Optional. Labels for this Namespace. |

### getName

The resource name for the namespace
`projects/{project}/locations/{location}/namespaces/{namespace}`

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

### setName

The resource name for the namespace
`projects/{project}/locations/{location}/namespaces/{namespace}`

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

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

### getUid

Output only. Google-generated UUID for this resource. This is unique across
all namespace resources. If a namespace resource is deleted and another
resource with the same name is created, it gets a different uid.

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

### setUid

Output only. Google-generated UUID for this resource. This is unique across
all namespace resources. If a namespace resource is deleted and another
resource with the same name is created, it gets a different uid.

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

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

### getCreateTime

Output only. When the namespace was created.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. When the namespace was created.

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

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

### getUpdateTime

Output only. When the namespace was last updated.

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

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. When the namespace was last updated.

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

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

### getDeleteTime

Output only. When the namespace was deleted.

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

### hasDeleteTime

### clearDeleteTime

### setDeleteTime

Output only. When the namespace was deleted.

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

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

### getState

Output only. State of the namespace resource.

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

### hasState

### clearState

### setState

Output only. State of the namespace resource.

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

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

### getScope

Required. Scope associated with the namespace

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

### setScope

Required. Scope associated with the namespace

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

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

### getNamespaceLabels

Optional. Namespace-level cluster namespace labels. These labels are
applied to the related namespace of the member clusters bound to the parent
Scope. Scope-level labels (`namespace_labels` in the Fleet Scope
resource) take precedence over Namespace-level labels if they share
a key. Keys and values must be Kubernetes-conformant.

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

### setNamespaceLabels

Optional. Namespace-level cluster namespace labels. These labels are
applied to the related namespace of the member clusters bound to the parent
Scope. Scope-level labels (`namespace_labels` in the Fleet Scope
resource) take precedence over Namespace-level labels if they share
a key. Keys and values must be Kubernetes-conformant.

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

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

### getLabels

Optional. Labels for this Namespace.

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

### setLabels

Optional. Labels for this Namespace.

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

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