# Google Cloud Dialogflow v2beta1 API - Class KnowledgeBasesClient (1.0.0-beta30)

1.0.0-beta30 (latest) 1.0.0-beta29

    public abstract class KnowledgeBasesClient

Reference documentation and code samples for the Google Cloud Dialogflow v2beta1 API class KnowledgeBasesClient.

KnowledgeBases client wrapper, for convenient use.

## Inheritance

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

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

[KnowledgeBasesClientImpl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBasesClientImpl)

## Namespace

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

## Assembly

Google.Cloud.Dialogflow.V2Beta1.dll

## Remarks

Service for managing
\[KnowledgeBases\]\[google.cloud.dialogflow.v2beta1.KnowledgeBase\].

## Properties

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

The default endpoint for the KnowledgeBases service, which is a host of "dialogflow.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 KnowledgeBases 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 KnowledgeBases scopes are:

- <https://www.googleapis.com/auth/cloud-platform>
- <https://www.googleapis.com/auth/dialogflow>

### GrpcClient

    public virtual KnowledgeBases.KnowledgeBasesClient GrpcClient { get; }

The underlying gRPC KnowledgeBases client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBaseshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBases.KnowledgeBasesClient` |   |

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

### 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 KnowledgeBasesClient Create()

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

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

### CreateAsync(CancellationToken)

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

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

| **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.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBasesClient` | The task representing the created [KnowledgeBasesClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBasesClient). |

### CreateKnowledgeBase(LocationName, KnowledgeBase, CallSettings)

    public virtual KnowledgeBase CreateKnowledgeBase(LocationName parent, KnowledgeBase knowledgeBase, CallSettings callSettings = null)

Creates a knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The project to create a knowledge base for. Format: `projects/<Project ID>/locations/<Location ID>`. |
| `knowledgeBase` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` Required. The knowledge base to create. |
| `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.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | The RPC response. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = KnowledgeBasesClient.Create();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    KnowledgeBase knowledgeBase = new KnowledgeBase();
    // Make the request
    KnowledgeBase response = knowledgeBasesClient.CreateKnowledgeBase(parent, knowledgeBase);

### CreateKnowledgeBase(ProjectName, KnowledgeBase, CallSettings)

    public virtual KnowledgeBase CreateKnowledgeBase(ProjectName parent, KnowledgeBase knowledgeBase, CallSettings callSettings = null)

Creates a knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.ProjectName.html` Required. The project to create a knowledge base for. Format: `projects/<Project ID>/locations/<Location ID>`. |
| `knowledgeBase` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` Required. The knowledge base to create. |
| `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.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | The RPC response. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = KnowledgeBasesClient.Create();
    // Initialize request argument(s)
    ProjectName parent = ProjectName.FromProject("[PROJECT]");
    KnowledgeBase knowledgeBase = new KnowledgeBase();
    // Make the request
    KnowledgeBase response = knowledgeBasesClient.CreateKnowledgeBase(parent, knowledgeBase);

### CreateKnowledgeBase(CreateKnowledgeBaseRequest, CallSettings)

    public virtual KnowledgeBase CreateKnowledgeBase(CreateKnowledgeBaseRequest request, CallSettings callSettings = null)

Creates a knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.CreateKnowledgeBaseRequest` 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.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | The RPC response. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = KnowledgeBasesClient.Create();
    // Initialize request argument(s)
    CreateKnowledgeBaseRequest request = new CreateKnowledgeBaseRequest
    {
        ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
        KnowledgeBase = new KnowledgeBase(),
    };
    // Make the request
    KnowledgeBase response = knowledgeBasesClient.CreateKnowledgeBase(request);

### CreateKnowledgeBase(string, KnowledgeBase, CallSettings)

    public virtual KnowledgeBase CreateKnowledgeBase(string parent, KnowledgeBase knowledgeBase, CallSettings callSettings = null)

Creates a knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The project to create a knowledge base for. Format: `projects/<Project ID>/locations/<Location ID>`. |
| `knowledgeBase` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` Required. The knowledge base to create. |
| `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.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | The RPC response. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = KnowledgeBasesClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]";
    KnowledgeBase knowledgeBase = new KnowledgeBase();
    // Make the request
    KnowledgeBase response = knowledgeBasesClient.CreateKnowledgeBase(parent, knowledgeBase);

### CreateKnowledgeBaseAsync(LocationName, KnowledgeBase, CallSettings)

    public virtual Task<KnowledgeBase> CreateKnowledgeBaseAsync(LocationName parent, KnowledgeBase knowledgeBase, CallSettings callSettings = null)

Creates a knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The project to create a knowledge base for. Format: `projects/<Project ID>/locations/<Location ID>`. |
| `knowledgeBase` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` Required. The knowledge base to create. |
| `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.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | A Task containing the RPC response. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = await KnowledgeBasesClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    KnowledgeBase knowledgeBase = new KnowledgeBase();
    // Make the request
    KnowledgeBase response = await knowledgeBasesClient.CreateKnowledgeBaseAsync(parent, knowledgeBase);

### CreateKnowledgeBaseAsync(LocationName, KnowledgeBase, CancellationToken)

    public virtual Task<KnowledgeBase> CreateKnowledgeBaseAsync(LocationName parent, KnowledgeBase knowledgeBase, CancellationToken cancellationToken)

Creates a knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The project to create a knowledge base for. Format: `projects/<Project ID>/locations/<Location ID>`. |
| `knowledgeBase` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` Required. The knowledge base to create. |
| `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.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | A Task containing the RPC response. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = await KnowledgeBasesClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    KnowledgeBase knowledgeBase = new KnowledgeBase();
    // Make the request
    KnowledgeBase response = await knowledgeBasesClient.CreateKnowledgeBaseAsync(parent, knowledgeBase);

### CreateKnowledgeBaseAsync(ProjectName, KnowledgeBase, CallSettings)

    public virtual Task<KnowledgeBase> CreateKnowledgeBaseAsync(ProjectName parent, KnowledgeBase knowledgeBase, CallSettings callSettings = null)

Creates a knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.ProjectName.html` Required. The project to create a knowledge base for. Format: `projects/<Project ID>/locations/<Location ID>`. |
| `knowledgeBase` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` Required. The knowledge base to create. |
| `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.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | A Task containing the RPC response. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = await KnowledgeBasesClient.CreateAsync();
    // Initialize request argument(s)
    ProjectName parent = ProjectName.FromProject("[PROJECT]");
    KnowledgeBase knowledgeBase = new KnowledgeBase();
    // Make the request
    KnowledgeBase response = await knowledgeBasesClient.CreateKnowledgeBaseAsync(parent, knowledgeBase);

### CreateKnowledgeBaseAsync(ProjectName, KnowledgeBase, CancellationToken)

    public virtual Task<KnowledgeBase> CreateKnowledgeBaseAsync(ProjectName parent, KnowledgeBase knowledgeBase, CancellationToken cancellationToken)

Creates a knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.ProjectName.html` Required. The project to create a knowledge base for. Format: `projects/<Project ID>/locations/<Location ID>`. |
| `knowledgeBase` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` Required. The knowledge base to create. |
| `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.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | A Task containing the RPC response. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = await KnowledgeBasesClient.CreateAsync();
    // Initialize request argument(s)
    ProjectName parent = ProjectName.FromProject("[PROJECT]");
    KnowledgeBase knowledgeBase = new KnowledgeBase();
    // Make the request
    KnowledgeBase response = await knowledgeBasesClient.CreateKnowledgeBaseAsync(parent, knowledgeBase);

### CreateKnowledgeBaseAsync(CreateKnowledgeBaseRequest, CallSettings)

    public virtual Task<KnowledgeBase> CreateKnowledgeBaseAsync(CreateKnowledgeBaseRequest request, CallSettings callSettings = null)

Creates a knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.CreateKnowledgeBaseRequest` 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.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | A Task containing the RPC response. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = await KnowledgeBasesClient.CreateAsync();
    // Initialize request argument(s)
    CreateKnowledgeBaseRequest request = new CreateKnowledgeBaseRequest
    {
        ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
        KnowledgeBase = new KnowledgeBase(),
    };
    // Make the request
    KnowledgeBase response = await knowledgeBasesClient.CreateKnowledgeBaseAsync(request);

### CreateKnowledgeBaseAsync(CreateKnowledgeBaseRequest, CancellationToken)

    public virtual Task<KnowledgeBase> CreateKnowledgeBaseAsync(CreateKnowledgeBaseRequest request, CancellationToken cancellationToken)

Creates a knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.CreateKnowledgeBaseRequest` 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.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | A Task containing the RPC response. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = await KnowledgeBasesClient.CreateAsync();
    // Initialize request argument(s)
    CreateKnowledgeBaseRequest request = new CreateKnowledgeBaseRequest
    {
        ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
        KnowledgeBase = new KnowledgeBase(),
    };
    // Make the request
    KnowledgeBase response = await knowledgeBasesClient.CreateKnowledgeBaseAsync(request);

### CreateKnowledgeBaseAsync(string, KnowledgeBase, CallSettings)

    public virtual Task<KnowledgeBase> CreateKnowledgeBaseAsync(string parent, KnowledgeBase knowledgeBase, CallSettings callSettings = null)

Creates a knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The project to create a knowledge base for. Format: `projects/<Project ID>/locations/<Location ID>`. |
| `knowledgeBase` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` Required. The knowledge base to create. |
| `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.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | A Task containing the RPC response. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = await KnowledgeBasesClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]";
    KnowledgeBase knowledgeBase = new KnowledgeBase();
    // Make the request
    KnowledgeBase response = await knowledgeBasesClient.CreateKnowledgeBaseAsync(parent, knowledgeBase);

### CreateKnowledgeBaseAsync(string, KnowledgeBase, CancellationToken)

    public virtual Task<KnowledgeBase> CreateKnowledgeBaseAsync(string parent, KnowledgeBase knowledgeBase, CancellationToken cancellationToken)

Creates a knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The project to create a knowledge base for. Format: `projects/<Project ID>/locations/<Location ID>`. |
| `knowledgeBase` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` Required. The knowledge base to create. |
| `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.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | A Task containing the RPC response. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = await KnowledgeBasesClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]";
    KnowledgeBase knowledgeBase = new KnowledgeBase();
    // Make the request
    KnowledgeBase response = await knowledgeBasesClient.CreateKnowledgeBaseAsync(parent, knowledgeBase);

### DeleteKnowledgeBase(DeleteKnowledgeBaseRequest, CallSettings)

    public virtual void DeleteKnowledgeBase(DeleteKnowledgeBaseRequest request, CallSettings callSettings = null)

Deletes the specified knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.DeleteKnowledgeBaseRequest` 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. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = KnowledgeBasesClient.Create();
    // Initialize request argument(s)
    DeleteKnowledgeBaseRequest request = new DeleteKnowledgeBaseRequest
    {
        KnowledgeBaseName = KnowledgeBaseName.FromProjectKnowledgeBase("[PROJECT]", "[KNOWLEDGE_BASE]"),
        Force = false,
    };
    // Make the request
    knowledgeBasesClient.DeleteKnowledgeBase(request);

### DeleteKnowledgeBase(KnowledgeBaseName, CallSettings)

    public virtual void DeleteKnowledgeBase(KnowledgeBaseName name, CallSettings callSettings = null)

Deletes the specified knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBaseName` Required. The name of the knowledge base to delete. Format: `projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>`. |
| `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. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = KnowledgeBasesClient.Create();
    // Initialize request argument(s)
    KnowledgeBaseName name = KnowledgeBaseName.FromProjectKnowledgeBase("[PROJECT]", "[KNOWLEDGE_BASE]");
    // Make the request
    knowledgeBasesClient.DeleteKnowledgeBase(name);

### DeleteKnowledgeBase(string, CallSettings)

    public virtual void DeleteKnowledgeBase(string name, CallSettings callSettings = null)

Deletes the specified knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the knowledge base to delete. Format: `projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>`. |
| `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. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = KnowledgeBasesClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/knowledgeBases/[KNOWLEDGE_BASE]";
    // Make the request
    knowledgeBasesClient.DeleteKnowledgeBase(name);

### DeleteKnowledgeBaseAsync(DeleteKnowledgeBaseRequest, CallSettings)

    public virtual Task DeleteKnowledgeBaseAsync(DeleteKnowledgeBaseRequest request, CallSettings callSettings = null)

Deletes the specified knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.DeleteKnowledgeBaseRequest` 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` | A Task containing the RPC response. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = await KnowledgeBasesClient.CreateAsync();
    // Initialize request argument(s)
    DeleteKnowledgeBaseRequest request = new DeleteKnowledgeBaseRequest
    {
        KnowledgeBaseName = KnowledgeBaseName.FromProjectKnowledgeBase("[PROJECT]", "[KNOWLEDGE_BASE]"),
        Force = false,
    };
    // Make the request
    await knowledgeBasesClient.DeleteKnowledgeBaseAsync(request);

### DeleteKnowledgeBaseAsync(DeleteKnowledgeBaseRequest, CancellationToken)

    public virtual Task DeleteKnowledgeBaseAsync(DeleteKnowledgeBaseRequest request, CancellationToken cancellationToken)

Deletes the specified knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.DeleteKnowledgeBaseRequest` 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` | A Task containing the RPC response. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = await KnowledgeBasesClient.CreateAsync();
    // Initialize request argument(s)
    DeleteKnowledgeBaseRequest request = new DeleteKnowledgeBaseRequest
    {
        KnowledgeBaseName = KnowledgeBaseName.FromProjectKnowledgeBase("[PROJECT]", "[KNOWLEDGE_BASE]"),
        Force = false,
    };
    // Make the request
    await knowledgeBasesClient.DeleteKnowledgeBaseAsync(request);

### DeleteKnowledgeBaseAsync(KnowledgeBaseName, CallSettings)

    public virtual Task DeleteKnowledgeBaseAsync(KnowledgeBaseName name, CallSettings callSettings = null)

Deletes the specified knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBaseName` Required. The name of the knowledge base to delete. Format: `projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>`. |
| `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` | A Task containing the RPC response. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = await KnowledgeBasesClient.CreateAsync();
    // Initialize request argument(s)
    KnowledgeBaseName name = KnowledgeBaseName.FromProjectKnowledgeBase("[PROJECT]", "[KNOWLEDGE_BASE]");
    // Make the request
    await knowledgeBasesClient.DeleteKnowledgeBaseAsync(name);

### DeleteKnowledgeBaseAsync(KnowledgeBaseName, CancellationToken)

    public virtual Task DeleteKnowledgeBaseAsync(KnowledgeBaseName name, CancellationToken cancellationToken)

Deletes the specified knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBaseName` Required. The name of the knowledge base to delete. Format: `projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>`. |
| `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` | A Task containing the RPC response. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = await KnowledgeBasesClient.CreateAsync();
    // Initialize request argument(s)
    KnowledgeBaseName name = KnowledgeBaseName.FromProjectKnowledgeBase("[PROJECT]", "[KNOWLEDGE_BASE]");
    // Make the request
    await knowledgeBasesClient.DeleteKnowledgeBaseAsync(name);

### DeleteKnowledgeBaseAsync(string, CallSettings)

    public virtual Task DeleteKnowledgeBaseAsync(string name, CallSettings callSettings = null)

Deletes the specified knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the knowledge base to delete. Format: `projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>`. |
| `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` | A Task containing the RPC response. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = await KnowledgeBasesClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/knowledgeBases/[KNOWLEDGE_BASE]";
    // Make the request
    await knowledgeBasesClient.DeleteKnowledgeBaseAsync(name);

### DeleteKnowledgeBaseAsync(string, CancellationToken)

    public virtual Task DeleteKnowledgeBaseAsync(string name, CancellationToken cancellationToken)

Deletes the specified knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the knowledge base to delete. Format: `projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>`. |
| `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` | A Task containing the RPC response. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = await KnowledgeBasesClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/knowledgeBases/[KNOWLEDGE_BASE]";
    // Make the request
    await knowledgeBasesClient.DeleteKnowledgeBaseAsync(name);

### GetKnowledgeBase(GetKnowledgeBaseRequest, CallSettings)

    public virtual KnowledgeBase GetKnowledgeBase(GetKnowledgeBaseRequest request, CallSettings callSettings = null)

Retrieves the specified knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.GetKnowledgeBaseRequest` 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.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | The RPC response. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = KnowledgeBasesClient.Create();
    // Initialize request argument(s)
    GetKnowledgeBaseRequest request = new GetKnowledgeBaseRequest
    {
        KnowledgeBaseName = KnowledgeBaseName.FromProjectKnowledgeBase("[PROJECT]", "[KNOWLEDGE_BASE]"),
    };
    // Make the request
    KnowledgeBase response = knowledgeBasesClient.GetKnowledgeBase(request);

### GetKnowledgeBase(KnowledgeBaseName, CallSettings)

    public virtual KnowledgeBase GetKnowledgeBase(KnowledgeBaseName name, CallSettings callSettings = null)

Retrieves the specified knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBaseName` Required. The name of the knowledge base to retrieve. Format `projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>`. |
| `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.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | The RPC response. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = KnowledgeBasesClient.Create();
    // Initialize request argument(s)
    KnowledgeBaseName name = KnowledgeBaseName.FromProjectKnowledgeBase("[PROJECT]", "[KNOWLEDGE_BASE]");
    // Make the request
    KnowledgeBase response = knowledgeBasesClient.GetKnowledgeBase(name);

### GetKnowledgeBase(string, CallSettings)

    public virtual KnowledgeBase GetKnowledgeBase(string name, CallSettings callSettings = null)

Retrieves the specified knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the knowledge base to retrieve. Format `projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>`. |
| `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.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | The RPC response. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = KnowledgeBasesClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/knowledgeBases/[KNOWLEDGE_BASE]";
    // Make the request
    KnowledgeBase response = knowledgeBasesClient.GetKnowledgeBase(name);

### GetKnowledgeBaseAsync(GetKnowledgeBaseRequest, CallSettings)

    public virtual Task<KnowledgeBase> GetKnowledgeBaseAsync(GetKnowledgeBaseRequest request, CallSettings callSettings = null)

Retrieves the specified knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.GetKnowledgeBaseRequest` 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.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | A Task containing the RPC response. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = await KnowledgeBasesClient.CreateAsync();
    // Initialize request argument(s)
    GetKnowledgeBaseRequest request = new GetKnowledgeBaseRequest
    {
        KnowledgeBaseName = KnowledgeBaseName.FromProjectKnowledgeBase("[PROJECT]", "[KNOWLEDGE_BASE]"),
    };
    // Make the request
    KnowledgeBase response = await knowledgeBasesClient.GetKnowledgeBaseAsync(request);

### GetKnowledgeBaseAsync(GetKnowledgeBaseRequest, CancellationToken)

    public virtual Task<KnowledgeBase> GetKnowledgeBaseAsync(GetKnowledgeBaseRequest request, CancellationToken cancellationToken)

Retrieves the specified knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.GetKnowledgeBaseRequest` 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.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | A Task containing the RPC response. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = await KnowledgeBasesClient.CreateAsync();
    // Initialize request argument(s)
    GetKnowledgeBaseRequest request = new GetKnowledgeBaseRequest
    {
        KnowledgeBaseName = KnowledgeBaseName.FromProjectKnowledgeBase("[PROJECT]", "[KNOWLEDGE_BASE]"),
    };
    // Make the request
    KnowledgeBase response = await knowledgeBasesClient.GetKnowledgeBaseAsync(request);

### GetKnowledgeBaseAsync(KnowledgeBaseName, CallSettings)

    public virtual Task<KnowledgeBase> GetKnowledgeBaseAsync(KnowledgeBaseName name, CallSettings callSettings = null)

Retrieves the specified knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBaseName` Required. The name of the knowledge base to retrieve. Format `projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>`. |
| `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.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | A Task containing the RPC response. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = await KnowledgeBasesClient.CreateAsync();
    // Initialize request argument(s)
    KnowledgeBaseName name = KnowledgeBaseName.FromProjectKnowledgeBase("[PROJECT]", "[KNOWLEDGE_BASE]");
    // Make the request
    KnowledgeBase response = await knowledgeBasesClient.GetKnowledgeBaseAsync(name);

### GetKnowledgeBaseAsync(KnowledgeBaseName, CancellationToken)

    public virtual Task<KnowledgeBase> GetKnowledgeBaseAsync(KnowledgeBaseName name, CancellationToken cancellationToken)

Retrieves the specified knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBaseName` Required. The name of the knowledge base to retrieve. Format `projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>`. |
| `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.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | A Task containing the RPC response. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = await KnowledgeBasesClient.CreateAsync();
    // Initialize request argument(s)
    KnowledgeBaseName name = KnowledgeBaseName.FromProjectKnowledgeBase("[PROJECT]", "[KNOWLEDGE_BASE]");
    // Make the request
    KnowledgeBase response = await knowledgeBasesClient.GetKnowledgeBaseAsync(name);

### GetKnowledgeBaseAsync(string, CallSettings)

    public virtual Task<KnowledgeBase> GetKnowledgeBaseAsync(string name, CallSettings callSettings = null)

Retrieves the specified knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the knowledge base to retrieve. Format `projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>`. |
| `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.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | A Task containing the RPC response. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = await KnowledgeBasesClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/knowledgeBases/[KNOWLEDGE_BASE]";
    // Make the request
    KnowledgeBase response = await knowledgeBasesClient.GetKnowledgeBaseAsync(name);

### GetKnowledgeBaseAsync(string, CancellationToken)

    public virtual Task<KnowledgeBase> GetKnowledgeBaseAsync(string name, CancellationToken cancellationToken)

Retrieves the specified knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the knowledge base to retrieve. Format `projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>`. |
| `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.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | A Task containing the RPC response. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = await KnowledgeBasesClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/knowledgeBases/[KNOWLEDGE_BASE]";
    // Make the request
    KnowledgeBase response = await knowledgeBasesClient.GetKnowledgeBaseAsync(name);

### ListKnowledgeBases(LocationName, string, int?, CallSettings)

    public virtual PagedEnumerable<ListKnowledgeBasesResponse, KnowledgeBase> ListKnowledgeBases(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all knowledge bases of the specified agent.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The project to list of knowledge bases for. Format: `projects/<Project ID>/locations/<Location ID>`. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `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://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.ListKnowledgeBasesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | A pageable sequence of [KnowledgeBase](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase) resources. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = KnowledgeBasesClient.Create();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    // Make the request
    PagedEnumerable<ListKnowledgeBasesResponse, KnowledgeBase> response = knowledgeBasesClient.ListKnowledgeBases(parent);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (KnowledgeBase item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListKnowledgeBasesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (KnowledgeBase item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<KnowledgeBase> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (KnowledgeBase item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListKnowledgeBases(ProjectName, string, int?, CallSettings)

    public virtual PagedEnumerable<ListKnowledgeBasesResponse, KnowledgeBase> ListKnowledgeBases(ProjectName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all knowledge bases of the specified agent.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.ProjectName.html` Required. The project to list of knowledge bases for. Format: `projects/<Project ID>/locations/<Location ID>`. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `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://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.ListKnowledgeBasesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | A pageable sequence of [KnowledgeBase](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase) resources. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = KnowledgeBasesClient.Create();
    // Initialize request argument(s)
    ProjectName parent = ProjectName.FromProject("[PROJECT]");
    // Make the request
    PagedEnumerable<ListKnowledgeBasesResponse, KnowledgeBase> response = knowledgeBasesClient.ListKnowledgeBases(parent);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (KnowledgeBase item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListKnowledgeBasesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (KnowledgeBase item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<KnowledgeBase> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (KnowledgeBase item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListKnowledgeBases(ListKnowledgeBasesRequest, CallSettings)

    public virtual PagedEnumerable<ListKnowledgeBasesResponse, KnowledgeBase> ListKnowledgeBases(ListKnowledgeBasesRequest request, CallSettings callSettings = null)

Returns the list of all knowledge bases of the specified agent.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.ListKnowledgeBasesRequest` 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://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.ListKnowledgeBasesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | A pageable sequence of [KnowledgeBase](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase) resources. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = KnowledgeBasesClient.Create();
    // Initialize request argument(s)
    ListKnowledgeBasesRequest request = new ListKnowledgeBasesRequest
    {
        ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
        Filter = "",
    };
    // Make the request
    PagedEnumerable<ListKnowledgeBasesResponse, KnowledgeBase> response = knowledgeBasesClient.ListKnowledgeBases(request);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (KnowledgeBase item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListKnowledgeBasesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (KnowledgeBase item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<KnowledgeBase> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (KnowledgeBase item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListKnowledgeBases(string, string, int?, CallSettings)

    public virtual PagedEnumerable<ListKnowledgeBasesResponse, KnowledgeBase> ListKnowledgeBases(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all knowledge bases of the specified agent.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The project to list of knowledge bases for. Format: `projects/<Project ID>/locations/<Location ID>`. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `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://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.ListKnowledgeBasesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | A pageable sequence of [KnowledgeBase](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase) resources. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = KnowledgeBasesClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]";
    // Make the request
    PagedEnumerable<ListKnowledgeBasesResponse, KnowledgeBase> response = knowledgeBasesClient.ListKnowledgeBases(parent);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (KnowledgeBase item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListKnowledgeBasesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (KnowledgeBase item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<KnowledgeBase> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (KnowledgeBase item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListKnowledgeBasesAsync(LocationName, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListKnowledgeBasesResponse, KnowledgeBase> ListKnowledgeBasesAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all knowledge bases of the specified agent.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The project to list of knowledge bases for. Format: `projects/<Project ID>/locations/<Location ID>`. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `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://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.ListKnowledgeBasesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | A pageable asynchronous sequence of [KnowledgeBase](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase) resources. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = await KnowledgeBasesClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    // Make the request
    PagedAsyncEnumerable<ListKnowledgeBasesResponse, KnowledgeBase> response = knowledgeBasesClient.ListKnowledgeBasesAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (KnowledgeBase item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await foreach (ListKnowledgeBasesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (KnowledgeBase item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<KnowledgeBase> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (KnowledgeBase item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListKnowledgeBasesAsync(ProjectName, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListKnowledgeBasesResponse, KnowledgeBase> ListKnowledgeBasesAsync(ProjectName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all knowledge bases of the specified agent.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.ProjectName.html` Required. The project to list of knowledge bases for. Format: `projects/<Project ID>/locations/<Location ID>`. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `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://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.ListKnowledgeBasesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | A pageable asynchronous sequence of [KnowledgeBase](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase) resources. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = await KnowledgeBasesClient.CreateAsync();
    // Initialize request argument(s)
    ProjectName parent = ProjectName.FromProject("[PROJECT]");
    // Make the request
    PagedAsyncEnumerable<ListKnowledgeBasesResponse, KnowledgeBase> response = knowledgeBasesClient.ListKnowledgeBasesAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (KnowledgeBase item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await foreach (ListKnowledgeBasesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (KnowledgeBase item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<KnowledgeBase> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (KnowledgeBase item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListKnowledgeBasesAsync(ListKnowledgeBasesRequest, CallSettings)

    public virtual PagedAsyncEnumerable<ListKnowledgeBasesResponse, KnowledgeBase> ListKnowledgeBasesAsync(ListKnowledgeBasesRequest request, CallSettings callSettings = null)

Returns the list of all knowledge bases of the specified agent.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.ListKnowledgeBasesRequest` 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://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.ListKnowledgeBasesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | A pageable asynchronous sequence of [KnowledgeBase](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase) resources. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = await KnowledgeBasesClient.CreateAsync();
    // Initialize request argument(s)
    ListKnowledgeBasesRequest request = new ListKnowledgeBasesRequest
    {
        ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
        Filter = "",
    };
    // Make the request
    PagedAsyncEnumerable<ListKnowledgeBasesResponse, KnowledgeBase> response = knowledgeBasesClient.ListKnowledgeBasesAsync(request);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (KnowledgeBase item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await foreach (ListKnowledgeBasesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (KnowledgeBase item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<KnowledgeBase> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (KnowledgeBase item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListKnowledgeBasesAsync(string, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListKnowledgeBasesResponse, KnowledgeBase> ListKnowledgeBasesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all knowledge bases of the specified agent.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The project to list of knowledge bases for. Format: `projects/<Project ID>/locations/<Location ID>`. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `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://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.ListKnowledgeBasesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | A pageable asynchronous sequence of [KnowledgeBase](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase) resources. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = await KnowledgeBasesClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]";
    // Make the request
    PagedAsyncEnumerable<ListKnowledgeBasesResponse, KnowledgeBase> response = knowledgeBasesClient.ListKnowledgeBasesAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (KnowledgeBase item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await foreach (ListKnowledgeBasesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (KnowledgeBase item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<KnowledgeBase> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (KnowledgeBase item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ShutdownDefaultChannelsAsync()

    public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBasesClient#Google_Cloud_Dialogflow_V2Beta1_KnowledgeBasesClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBasesClient#Google_Cloud_Dialogflow_V2Beta1_KnowledgeBasesClient_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.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBasesClient#Google_Cloud_Dialogflow_V2Beta1_KnowledgeBasesClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBasesClient#Google_Cloud_Dialogflow_V2Beta1_KnowledgeBasesClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.

### UpdateKnowledgeBase(KnowledgeBase, CallSettings)

    public virtual KnowledgeBase UpdateKnowledgeBase(KnowledgeBase knowledgeBase, CallSettings callSettings = null)

Updates the specified knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `knowledgeBase` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` Required. The knowledge base to update. |
| `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.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | The RPC response. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = KnowledgeBasesClient.Create();
    // Initialize request argument(s)
    KnowledgeBase knowledgeBase = new KnowledgeBase();
    // Make the request
    KnowledgeBase response = knowledgeBasesClient.UpdateKnowledgeBase(knowledgeBase);

### UpdateKnowledgeBase(KnowledgeBase, FieldMask, CallSettings)

    public virtual KnowledgeBase UpdateKnowledgeBase(KnowledgeBase knowledgeBase, FieldMask updateMask, CallSettings callSettings = null)

Updates the specified knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `knowledgeBase` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` Required. The knowledge base to update. |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. |
| `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.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | The RPC response. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = KnowledgeBasesClient.Create();
    // Initialize request argument(s)
    KnowledgeBase knowledgeBase = new KnowledgeBase();
    FieldMask updateMask = new FieldMask();
    // Make the request
    KnowledgeBase response = knowledgeBasesClient.UpdateKnowledgeBase(knowledgeBase, updateMask);

### UpdateKnowledgeBase(UpdateKnowledgeBaseRequest, CallSettings)

    public virtual KnowledgeBase UpdateKnowledgeBase(UpdateKnowledgeBaseRequest request, CallSettings callSettings = null)

Updates the specified knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.UpdateKnowledgeBaseRequest` 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.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | The RPC response. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = KnowledgeBasesClient.Create();
    // Initialize request argument(s)
    UpdateKnowledgeBaseRequest request = new UpdateKnowledgeBaseRequest
    {
        KnowledgeBase = new KnowledgeBase(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    KnowledgeBase response = knowledgeBasesClient.UpdateKnowledgeBase(request);

### UpdateKnowledgeBaseAsync(KnowledgeBase, CallSettings)

    public virtual Task<KnowledgeBase> UpdateKnowledgeBaseAsync(KnowledgeBase knowledgeBase, CallSettings callSettings = null)

Updates the specified knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `knowledgeBase` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` Required. The knowledge base to update. |
| `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.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | A Task containing the RPC response. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = await KnowledgeBasesClient.CreateAsync();
    // Initialize request argument(s)
    KnowledgeBase knowledgeBase = new KnowledgeBase();
    // Make the request
    KnowledgeBase response = await knowledgeBasesClient.UpdateKnowledgeBaseAsync(knowledgeBase);

### UpdateKnowledgeBaseAsync(KnowledgeBase, FieldMask, CallSettings)

    public virtual Task<KnowledgeBase> UpdateKnowledgeBaseAsync(KnowledgeBase knowledgeBase, FieldMask updateMask, CallSettings callSettings = null)

Updates the specified knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `knowledgeBase` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` Required. The knowledge base to update. |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. |
| `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.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | A Task containing the RPC response. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = await KnowledgeBasesClient.CreateAsync();
    // Initialize request argument(s)
    KnowledgeBase knowledgeBase = new KnowledgeBase();
    FieldMask updateMask = new FieldMask();
    // Make the request
    KnowledgeBase response = await knowledgeBasesClient.UpdateKnowledgeBaseAsync(knowledgeBase, updateMask);

### UpdateKnowledgeBaseAsync(KnowledgeBase, FieldMask, CancellationToken)

    public virtual Task<KnowledgeBase> UpdateKnowledgeBaseAsync(KnowledgeBase knowledgeBase, FieldMask updateMask, CancellationToken cancellationToken)

Updates the specified knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `knowledgeBase` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` Required. The knowledge base to update. |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. |
| `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.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | A Task containing the RPC response. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = await KnowledgeBasesClient.CreateAsync();
    // Initialize request argument(s)
    KnowledgeBase knowledgeBase = new KnowledgeBase();
    FieldMask updateMask = new FieldMask();
    // Make the request
    KnowledgeBase response = await knowledgeBasesClient.UpdateKnowledgeBaseAsync(knowledgeBase, updateMask);

### UpdateKnowledgeBaseAsync(KnowledgeBase, CancellationToken)

    public virtual Task<KnowledgeBase> UpdateKnowledgeBaseAsync(KnowledgeBase knowledgeBase, CancellationToken cancellationToken)

Updates the specified knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `knowledgeBase` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` Required. The knowledge base to update. |
| `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.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | A Task containing the RPC response. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = await KnowledgeBasesClient.CreateAsync();
    // Initialize request argument(s)
    KnowledgeBase knowledgeBase = new KnowledgeBase();
    // Make the request
    KnowledgeBase response = await knowledgeBasesClient.UpdateKnowledgeBaseAsync(knowledgeBase);

### UpdateKnowledgeBaseAsync(UpdateKnowledgeBaseRequest, CallSettings)

    public virtual Task<KnowledgeBase> UpdateKnowledgeBaseAsync(UpdateKnowledgeBaseRequest request, CallSettings callSettings = null)

Updates the specified knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.UpdateKnowledgeBaseRequest` 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.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | A Task containing the RPC response. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = await KnowledgeBasesClient.CreateAsync();
    // Initialize request argument(s)
    UpdateKnowledgeBaseRequest request = new UpdateKnowledgeBaseRequest
    {
        KnowledgeBase = new KnowledgeBase(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    KnowledgeBase response = await knowledgeBasesClient.UpdateKnowledgeBaseAsync(request);

### UpdateKnowledgeBaseAsync(UpdateKnowledgeBaseRequest, CancellationToken)

    public virtual Task<KnowledgeBase> UpdateKnowledgeBaseAsync(UpdateKnowledgeBaseRequest request, CancellationToken cancellationToken)

Updates the specified knowledge base.

Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.UpdateKnowledgeBaseRequest` 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.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.KnowledgeBase` | A Task containing the RPC response. |

**Example**

    // Create client
    KnowledgeBasesClient knowledgeBasesClient = await KnowledgeBasesClient.CreateAsync();
    // Initialize request argument(s)
    UpdateKnowledgeBaseRequest request = new UpdateKnowledgeBaseRequest
    {
        KnowledgeBase = new KnowledgeBase(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    KnowledgeBase response = await knowledgeBasesClient.UpdateKnowledgeBaseAsync(request);