1.0.0-beta25 (latest) 1.0.0-beta24

    public abstract class ProjectServiceClient

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

ProjectService client wrapper, for convenient use.

## Inheritance

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

## 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.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Derived Types

[ProjectServiceClientImpl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ProjectServiceClientImpl)

## 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

## Remarks

Service for operations on the
\[Project\]\[google.cloud.discoveryengine.v1beta.Project\].

## Properties

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

The default endpoint for the ProjectService service, which is a host of "discoveryengine.googleapis.com" and
a port of 443.

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

### DefaultScopes

    public static IReadOnlyList<string> DefaultScopes { get; }

The default ProjectService scopes.

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

**Remarks** The default ProjectService scopes are:

- <https://www.googleapis.com/auth/cloud-platform>
- <https://www.googleapis.com/auth/discoveryengine.readwrite>
- <https://www.googleapis.com/auth/discoveryengine.serving.readwrite>

### GrpcClient

    public virtual ProjectService.ProjectServiceClient GrpcClient { get; }

The underlying gRPC ProjectService client

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

### LocationsClient

    public virtual LocationsClient LocationsClient { get; }

The [LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.html) associated with this client.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.html` |   |

### ProvisionProjectOperationsClient

    public virtual OperationsClient ProvisionProjectOperationsClient { get; }

The long-running operations client for `ProvisionProject`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

### ServiceMetadata

    public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

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

## Methods

### Create()

    public static ProjectServiceClient Create()

Synchronously creates a [ProjectServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ProjectServiceClient) using the default credentials, endpoint and
settings. To specify custom credentials or other settings, use [ProjectServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ProjectServiceClientBuilder).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ProjectServiceClient` | The created [ProjectServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ProjectServiceClient). |

### CreateAsync(CancellationToken)

    public static Task<ProjectServiceClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a [ProjectServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ProjectServiceClient) using the default credentials, endpoint and
settings. To specify custom credentials or other settings, use [ProjectServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ProjectServiceClientBuilder).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` The [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use while creating the client. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ProjectServiceClient` | The task representing the created [ProjectServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ProjectServiceClient). |

### PollOnceProvisionProject(string, CallSettings)

    public virtual Operation<Project, ProvisionProjectMetadata> PollOnceProvisionProject(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of `ProvisionProject`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.Projecthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ProvisionProjectMetadata` | The result of polling the operation. |

### PollOnceProvisionProjectAsync(string, CallSettings)

    public virtual Task<Operation<Project, ProvisionProjectMetadata>> PollOnceProvisionProjectAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`ProvisionProject`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.Projecthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ProvisionProjectMetadata` | A task representing the result of polling the operation. |

### ProvisionProject(ProjectName, CallSettings)

    public virtual Operation<Project, ProvisionProjectMetadata> ProvisionProject(ProjectName name, CallSettings callSettings = null)

Provisions the project resource. During the
process, related systems will get prepared and initialized.

Caller must read the [Terms for data
use](https://cloud.google.com/retail/data-use-terms), and optionally
specify in request to provide consent to that service terms.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ProjectName` Required. Full resource name of a \[Project\]\[google.cloud.discoveryengine.v1beta.Project\], such as `projects/{project_id_or_number}`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.Projecthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ProvisionProjectMetadata` | The RPC response. |

**Example**

    // Create client
    ProjectServiceClient projectServiceClient = ProjectServiceClient.Create();
    // Initialize request argument(s)
    ProjectName name = ProjectName.FromProject("[PROJECT]");
    // Make the request
    Operation<Project, ProvisionProjectMetadata> response = projectServiceClient.ProvisionProject(name);

    // Poll until the returned long-running operation is complete
    Operation<Project, ProvisionProjectMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Project result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Project, ProvisionProjectMetadata> retrievedResponse = projectServiceClient.PollOnceProvisionProject(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Project retrievedResult = retrievedResponse.Result;
    }

### ProvisionProject(ProvisionProjectRequest, CallSettings)

    public virtual Operation<Project, ProvisionProjectMetadata> ProvisionProject(ProvisionProjectRequest request, CallSettings callSettings = null)

Provisions the project resource. During the
process, related systems will get prepared and initialized.

Caller must read the [Terms for data
use](https://cloud.google.com/retail/data-use-terms), and optionally
specify in request to provide consent to that service terms.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ProvisionProjectRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.Projecthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ProvisionProjectMetadata` | The RPC response. |

**Example**

    // Create client
    ProjectServiceClient projectServiceClient = ProjectServiceClient.Create();
    // Initialize request argument(s)
    ProvisionProjectRequest request = new ProvisionProjectRequest
    {
        ProjectName = ProjectName.FromProject("[PROJECT]"),
        AcceptDataUseTerms = false,
        DataUseTermsVersion = "",
        SaasParams = new ProvisionProjectRequest.Types.SaasParams(),
    };
    // Make the request
    Operation<Project, ProvisionProjectMetadata> response = projectServiceClient.ProvisionProject(request);

    // Poll until the returned long-running operation is complete
    Operation<Project, ProvisionProjectMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Project result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Project, ProvisionProjectMetadata> retrievedResponse = projectServiceClient.PollOnceProvisionProject(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Project retrievedResult = retrievedResponse.Result;
    }

### ProvisionProject(string, CallSettings)

    public virtual Operation<Project, ProvisionProjectMetadata> ProvisionProject(string name, CallSettings callSettings = null)

Provisions the project resource. During the
process, related systems will get prepared and initialized.

Caller must read the [Terms for data
use](https://cloud.google.com/retail/data-use-terms), and optionally
specify in request to provide consent to that service terms.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Full resource name of a \[Project\]\[google.cloud.discoveryengine.v1beta.Project\], such as `projects/{project_id_or_number}`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.Projecthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ProvisionProjectMetadata` | The RPC response. |

**Example**

    // Create client
    ProjectServiceClient projectServiceClient = ProjectServiceClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]";
    // Make the request
    Operation<Project, ProvisionProjectMetadata> response = projectServiceClient.ProvisionProject(name);

    // Poll until the returned long-running operation is complete
    Operation<Project, ProvisionProjectMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Project result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Project, ProvisionProjectMetadata> retrievedResponse = projectServiceClient.PollOnceProvisionProject(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Project retrievedResult = retrievedResponse.Result;
    }

### ProvisionProjectAsync(ProjectName, CallSettings)

    public virtual Task<Operation<Project, ProvisionProjectMetadata>> ProvisionProjectAsync(ProjectName name, CallSettings callSettings = null)

Provisions the project resource. During the
process, related systems will get prepared and initialized.

Caller must read the [Terms for data
use](https://cloud.google.com/retail/data-use-terms), and optionally
specify in request to provide consent to that service terms.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ProjectName` Required. Full resource name of a \[Project\]\[google.cloud.discoveryengine.v1beta.Project\], such as `projects/{project_id_or_number}`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.Projecthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ProvisionProjectMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectServiceClient projectServiceClient = await ProjectServiceClient.CreateAsync();
    // Initialize request argument(s)
    ProjectName name = ProjectName.FromProject("[PROJECT]");
    // Make the request
    Operation<Project, ProvisionProjectMetadata> response = await projectServiceClient.ProvisionProjectAsync(name);

    // Poll until the returned long-running operation is complete
    Operation<Project, ProvisionProjectMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Project result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Project, ProvisionProjectMetadata> retrievedResponse = await projectServiceClient.PollOnceProvisionProjectAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Project retrievedResult = retrievedResponse.Result;
    }

### ProvisionProjectAsync(ProjectName, CancellationToken)

    public virtual Task<Operation<Project, ProvisionProjectMetadata>> ProvisionProjectAsync(ProjectName name, CancellationToken cancellationToken)

Provisions the project resource. During the
process, related systems will get prepared and initialized.

Caller must read the [Terms for data
use](https://cloud.google.com/retail/data-use-terms), and optionally
specify in request to provide consent to that service terms.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ProjectName` Required. Full resource name of a \[Project\]\[google.cloud.discoveryengine.v1beta.Project\], such as `projects/{project_id_or_number}`. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.Projecthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ProvisionProjectMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectServiceClient projectServiceClient = await ProjectServiceClient.CreateAsync();
    // Initialize request argument(s)
    ProjectName name = ProjectName.FromProject("[PROJECT]");
    // Make the request
    Operation<Project, ProvisionProjectMetadata> response = await projectServiceClient.ProvisionProjectAsync(name);

    // Poll until the returned long-running operation is complete
    Operation<Project, ProvisionProjectMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Project result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Project, ProvisionProjectMetadata> retrievedResponse = await projectServiceClient.PollOnceProvisionProjectAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Project retrievedResult = retrievedResponse.Result;
    }

### ProvisionProjectAsync(ProvisionProjectRequest, CallSettings)

    public virtual Task<Operation<Project, ProvisionProjectMetadata>> ProvisionProjectAsync(ProvisionProjectRequest request, CallSettings callSettings = null)

Provisions the project resource. During the
process, related systems will get prepared and initialized.

Caller must read the [Terms for data
use](https://cloud.google.com/retail/data-use-terms), and optionally
specify in request to provide consent to that service terms.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ProvisionProjectRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.Projecthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ProvisionProjectMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectServiceClient projectServiceClient = await ProjectServiceClient.CreateAsync();
    // Initialize request argument(s)
    ProvisionProjectRequest request = new ProvisionProjectRequest
    {
        ProjectName = ProjectName.FromProject("[PROJECT]"),
        AcceptDataUseTerms = false,
        DataUseTermsVersion = "",
        SaasParams = new ProvisionProjectRequest.Types.SaasParams(),
    };
    // Make the request
    Operation<Project, ProvisionProjectMetadata> response = await projectServiceClient.ProvisionProjectAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<Project, ProvisionProjectMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Project result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Project, ProvisionProjectMetadata> retrievedResponse = await projectServiceClient.PollOnceProvisionProjectAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Project retrievedResult = retrievedResponse.Result;
    }

### ProvisionProjectAsync(ProvisionProjectRequest, CancellationToken)

    public virtual Task<Operation<Project, ProvisionProjectMetadata>> ProvisionProjectAsync(ProvisionProjectRequest request, CancellationToken cancellationToken)

Provisions the project resource. During the
process, related systems will get prepared and initialized.

Caller must read the [Terms for data
use](https://cloud.google.com/retail/data-use-terms), and optionally
specify in request to provide consent to that service terms.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ProvisionProjectRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.Projecthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ProvisionProjectMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectServiceClient projectServiceClient = await ProjectServiceClient.CreateAsync();
    // Initialize request argument(s)
    ProvisionProjectRequest request = new ProvisionProjectRequest
    {
        ProjectName = ProjectName.FromProject("[PROJECT]"),
        AcceptDataUseTerms = false,
        DataUseTermsVersion = "",
        SaasParams = new ProvisionProjectRequest.Types.SaasParams(),
    };
    // Make the request
    Operation<Project, ProvisionProjectMetadata> response = await projectServiceClient.ProvisionProjectAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<Project, ProvisionProjectMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Project result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Project, ProvisionProjectMetadata> retrievedResponse = await projectServiceClient.PollOnceProvisionProjectAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Project retrievedResult = retrievedResponse.Result;
    }

### ProvisionProjectAsync(string, CallSettings)

    public virtual Task<Operation<Project, ProvisionProjectMetadata>> ProvisionProjectAsync(string name, CallSettings callSettings = null)

Provisions the project resource. During the
process, related systems will get prepared and initialized.

Caller must read the [Terms for data
use](https://cloud.google.com/retail/data-use-terms), and optionally
specify in request to provide consent to that service terms.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Full resource name of a \[Project\]\[google.cloud.discoveryengine.v1beta.Project\], such as `projects/{project_id_or_number}`. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.Projecthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ProvisionProjectMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectServiceClient projectServiceClient = await ProjectServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]";
    // Make the request
    Operation<Project, ProvisionProjectMetadata> response = await projectServiceClient.ProvisionProjectAsync(name);

    // Poll until the returned long-running operation is complete
    Operation<Project, ProvisionProjectMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Project result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Project, ProvisionProjectMetadata> retrievedResponse = await projectServiceClient.PollOnceProvisionProjectAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Project retrievedResult = retrievedResponse.Result;
    }

### ProvisionProjectAsync(string, CancellationToken)

    public virtual Task<Operation<Project, ProvisionProjectMetadata>> ProvisionProjectAsync(string name, CancellationToken cancellationToken)

Provisions the project resource. During the
process, related systems will get prepared and initialized.

Caller must read the [Terms for data
use](https://cloud.google.com/retail/data-use-terms), and optionally
specify in request to provide consent to that service terms.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Full resource name of a \[Project\]\[google.cloud.discoveryengine.v1beta.Project\], such as `projects/{project_id_or_number}`. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.Projecthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ProvisionProjectMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectServiceClient projectServiceClient = await ProjectServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]";
    // Make the request
    Operation<Project, ProvisionProjectMetadata> response = await projectServiceClient.ProvisionProjectAsync(name);

    // Poll until the returned long-running operation is complete
    Operation<Project, ProvisionProjectMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Project result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Project, ProvisionProjectMetadata> retrievedResponse = await projectServiceClient.PollOnceProvisionProjectAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Project retrievedResult = retrievedResponse.Result;
    }

### ShutdownDefaultChannelsAsync()

    public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ProjectServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_ProjectServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ProjectServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_ProjectServiceClient_CreateAsync_System_Threading_CancellationToken_). Channels which weren't automatically created are not
affected.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A task representing the asynchronous shutdown operation. |

**Remarks** After calling this method, further calls to [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ProjectServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_ProjectServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ProjectServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_ProjectServiceClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.