# Google Cloud Service Directory V1 Client - Class PBNamespace (2.2.0)

2.2.0 (latest) 2.1.2 2.0.6 1.3.6 1.2.1 1.1.2 1.0.5 Reference documentation and code samples for the Google Cloud Service Directory V1 Client class PBNamespace.

A container for [services](https://docs.cloud.google.com/php/docs/reference/cloud-service-directory/latest/V1.Service).

Namespaces allow administrators to group services together and define
permissions for a collection of services.

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

## Namespace

Google \\ Cloud \\ ServiceDirectory \\ V1

## Methods

### __construct

Constructor.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `data` | `mixed` |

### getName

Immutable. The resource name for the namespace in the format
`projects/*/locations/*/namespaces/*`.

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

### setName

Immutable. The resource name for the namespace in the format
`projects/*/locations/*/namespaces/*`.

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

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

### getLabels

Optional. Resource labels associated with this namespace.

No more than 64 user labels can be associated with a given resource. Label
keys and values can be no longer than 63 characters.

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

### setLabels

Optional. Resource labels associated with this namespace.

No more than 64 user labels can be associated with a given resource. Label
keys and values can be no longer than 63 characters.

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

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

### getUid

Output only. The globally unique identifier of the namespace in the UUID4
format.

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

### setUid

Output only. The globally unique identifier of the namespace in the UUID4
format.

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

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