# Service Directory v1beta1 API - Class CreateNamespaceRequest (2.0.0-beta07)

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

- [2.0.0-beta07 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ServiceDirectory.V1Beta1/latest/Google.Cloud.ServiceDirectory.V1Beta1.CreateNamespaceRequest)
- [2.0.0-beta06](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ServiceDirectory.V1Beta1/2.0.0-beta06/Google.Cloud.ServiceDirectory.V1Beta1.CreateNamespaceRequest)
- [1.0.0-beta06](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ServiceDirectory.V1Beta1/1.0.0-beta06/Google.Cloud.ServiceDirectory.V1Beta1.CreateNamespaceRequest)

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

Reference documentation and code samples for the Service Directory v1beta1 API class CreateNamespaceRequest.

The request message for
\[RegistrationService.CreateNamespace\]\[google.cloud.servicedirectory.v1beta1.RegistrationService.CreateNamespace\].

## Inheritance

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

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[CreateNamespaceRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ServiceDirectory.V1Beta1/latest/Google.Cloud.ServiceDirectory.V1Beta1.CreateNamespaceRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[CreateNamespaceRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ServiceDirectory.V1Beta1/latest/Google.Cloud.ServiceDirectory.V1Beta1.CreateNamespaceRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[CreateNamespaceRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ServiceDirectory.V1Beta1/latest/Google.Cloud.ServiceDirectory.V1Beta1.CreateNamespaceRequest), [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.V1Beta1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ServiceDirectory.V1Beta1/latest/Google.Cloud.ServiceDirectory.V1Beta1)

## Assembly

Google.Cloud.ServiceDirectory.V1Beta1.dll

## Constructors

### CreateNamespaceRequest()

    public CreateNamespaceRequest()

### CreateNamespaceRequest(CreateNamespaceRequest)

    public CreateNamespaceRequest(CreateNamespaceRequest other)

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

## Properties

### Namespace

    public Namespace Namespace { get; set; }

Required. A namespace with initial fields set.

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

### NamespaceId

    public string NamespaceId { get; set; }

Required. The Resource ID must be 1-63 characters long, and comply with
\<a href="<https://www.ietf.org/rfc/rfc1035.txt>" target="_blank"\>RFC1035\</a\>.
Specifically, the name must be 1-63 characters long and match the regular
expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first
character must be a lowercase letter, and all following characters must
be a dash, lowercase letter, or digit, except the last character, which
cannot be a dash.

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

### Parent

    public string Parent { get; set; }

Required. The resource name of the project and location the namespace
will be created in.

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

### ParentAsLocationName

    public LocationName ParentAsLocationName { get; set; }

[LocationName](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html)-typed view over the [Parent](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ServiceDirectory.V1Beta1/latest/Google.Cloud.ServiceDirectory.V1Beta1.CreateNamespaceRequest#Google_Cloud_ServiceDirectory_V1Beta1_CreateNamespaceRequest_Parent) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` |   |