# Discovery Engine v1beta API - Class CreateDocumentRequest (1.0.0-beta23)

1.0.0-beta23 (latest) 1.0.0-beta22

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

Reference documentation and code samples for the Discovery Engine v1beta API class CreateDocumentRequest.

Request message for
\[DocumentService.CreateDocument\]\[google.cloud.discoveryengine.v1beta.DocumentService.CreateDocument\]
method.

## Inheritance

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

## Implements

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

## Assembly

Google.Cloud.DiscoveryEngine.V1Beta.dll

## Constructors

### CreateDocumentRequest()

    public CreateDocumentRequest()

### CreateDocumentRequest(CreateDocumentRequest)

    public CreateDocumentRequest(CreateDocumentRequest other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.CreateDocumentRequest` |

## Properties

### Document

    public Document Document { get; set; }

Required. The \[Document\]\[google.cloud.discoveryengine.v1beta.Document\] to
create.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.Document` |   |

### DocumentId

    public string DocumentId { get; set; }

Required. The ID to use for the
\[Document\]\[google.cloud.discoveryengine.v1beta.Document\], which becomes the
final component of the
\[Document.name\]\[google.cloud.discoveryengine.v1beta.Document.name\].

If the caller does not have permission to create the
\[Document\]\[google.cloud.discoveryengine.v1beta.Document\], regardless of
whether or not it exists, a `PERMISSION_DENIED` error is returned.

This field must be unique among all
\[Document\]\[google.cloud.discoveryengine.v1beta.Document\]s with the same
\[parent\]\[google.cloud.discoveryengine.v1beta.CreateDocumentRequest.parent\].
Otherwise, an `ALREADY_EXISTS` error is returned.

This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
standard with a length limit of 63 characters. Otherwise, an
`INVALID_ARGUMENT` error is returned.

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

### Parent

    public string Parent { get; set; }

Required. The parent resource name, such as
`projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.

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

### ParentAsBranchName

    public BranchName ParentAsBranchName { get; set; }

[BranchName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.BranchName)-typed view over the [Parent](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.CreateDocumentRequest#Google_Cloud_DiscoveryEngine_V1Beta_CreateDocumentRequest_Parent) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.BranchName` |   |