# Service Directory v1 API - Class Namespace (2.7.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.7.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ServiceDirectory.V1/latest/Google.Cloud.ServiceDirectory.V1.Namespace)
- [2.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ServiceDirectory.V1/2.6.0/Google.Cloud.ServiceDirectory.V1.Namespace)
- [2.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ServiceDirectory.V1/2.5.0/Google.Cloud.ServiceDirectory.V1.Namespace)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ServiceDirectory.V1/2.4.0/Google.Cloud.ServiceDirectory.V1.Namespace)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ServiceDirectory.V1/2.3.0/Google.Cloud.ServiceDirectory.V1.Namespace)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ServiceDirectory.V1/2.2.0/Google.Cloud.ServiceDirectory.V1.Namespace)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ServiceDirectory.V1/2.1.0/Google.Cloud.ServiceDirectory.V1.Namespace)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ServiceDirectory.V1/2.0.0/Google.Cloud.ServiceDirectory.V1.Namespace)
- [1.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ServiceDirectory.V1/1.4.0/Google.Cloud.ServiceDirectory.V1.Namespace)
- [1.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ServiceDirectory.V1/1.3.0/Google.Cloud.ServiceDirectory.V1.Namespace)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ServiceDirectory.V1/1.2.0/Google.Cloud.ServiceDirectory.V1.Namespace)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ServiceDirectory.V1/1.1.0/Google.Cloud.ServiceDirectory.V1.Namespace)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ServiceDirectory.V1/1.0.0/Google.Cloud.ServiceDirectory.V1.Namespace)

    public sealed class Namespace : IMessage<Namespace>, IEquatable<Namespace>, IDeepCloneable<Namespace>, IBufferMessage, IMessage

Reference documentation and code samples for the Service Directory v1 API class Namespace.

A container for \[services\]\[google.cloud.servicedirectory.v1.Service\].
Namespaces allow administrators to group services together and define
permissions for a collection of services.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> Namespace

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Namespace](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ServiceDirectory.V1/latest/Google.Cloud.ServiceDirectory.V1.Namespace), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Namespace](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ServiceDirectory.V1/latest/Google.Cloud.ServiceDirectory.V1.Namespace), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Namespace](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ServiceDirectory.V1/latest/Google.Cloud.ServiceDirectory.V1.Namespace), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.ServiceDirectory.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ServiceDirectory.V1/latest/Google.Cloud.ServiceDirectory.V1)

## Assembly

Google.Cloud.ServiceDirectory.V1.dll

## Constructors

### Namespace()

    public Namespace()

### Namespace(Namespace)

    public Namespace(Namespace other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ServiceDirectory.V1/latest/Google.Cloud.ServiceDirectory.V1.Namespace` |

## Properties

### Labels

    public MapField<string, string> Labels { get; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.MapField-2.htmlhttps://learn.microsoft.com/dotnet/api/system.stringhttps://learn.microsoft.com/dotnet/api/system.string` |   |

### Name

    public string Name { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### NamespaceName

    public NamespaceName NamespaceName { get; set; }

[NamespaceName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ServiceDirectory.V1/latest/Google.Cloud.ServiceDirectory.V1.NamespaceName)-typed view over the [Name](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ServiceDirectory.V1/latest/Google.Cloud.ServiceDirectory.V1.Namespace#Google_Cloud_ServiceDirectory_V1_Namespace_Name) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ServiceDirectory.V1/latest/Google.Cloud.ServiceDirectory.V1.NamespaceName` |   |

### Uid

    public string Uid { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |