Google Cloud Dialogflow v2 API - Class KnowledgeBasesClient (4.9.0)

public abstract class KnowledgeBasesClient

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

KnowledgeBases client wrapper, for convenient use.

Inheritance

object > KnowledgeBasesClient

Derived Types

Namespace

GoogleCloudGoogle.Cloud.DialogflowV2

Assembly

Google.Cloud.Dialogflow.V2.dll

Remarks

Service for managing [KnowledgeBases][google.cloud.dialogflow.v2.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
TypeDescription
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default KnowledgeBases scopes.

Property Value
TypeDescription
IReadOnlyListstring
Remarks

GrpcClient

public virtual KnowledgeBases.KnowledgeBasesClient GrpcClient { get; }

The underlying gRPC KnowledgeBases client

Property Value
TypeDescription
KnowledgeBasesKnowledgeBasesClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
TypeDescription
LocationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

Methods

Create()

public static KnowledgeBasesClient Create()

Synchronously creates a KnowledgeBasesClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use KnowledgeBasesClientBuilder.

Returns
TypeDescription
KnowledgeBasesClient

The created KnowledgeBasesClient.

CreateAsync(CancellationToken)

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

Asynchronously creates a KnowledgeBasesClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use KnowledgeBasesClientBuilder.

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
TaskKnowledgeBasesClient

The task representing the created KnowledgeBasesClient.

CreateKnowledgeBase(LocationName, KnowledgeBase, CallSettings)

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

Creates a knowledge base.

Parameters
NameDescription
parentLocationName

Required. The project to create a knowledge base for. Format: projects/<Project ID>/locations/<Location ID>.

knowledgeBaseKnowledgeBase

Required. The knowledge base to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.

Parameters
NameDescription
parentProjectName

Required. The project to create a knowledge base for. Format: projects/<Project ID>/locations/<Location ID>.

knowledgeBaseKnowledgeBase

Required. The knowledge base to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.

Parameters
NameDescription
requestCreateKnowledgeBaseRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.

Parameters
NameDescription
parentstring

Required. The project to create a knowledge base for. Format: projects/<Project ID>/locations/<Location ID>.

knowledgeBaseKnowledgeBase

Required. The knowledge base to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.

Parameters
NameDescription
parentLocationName

Required. The project to create a knowledge base for. Format: projects/<Project ID>/locations/<Location ID>.

knowledgeBaseKnowledgeBase

Required. The knowledge base to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskKnowledgeBase

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.

Parameters
NameDescription
parentLocationName

Required. The project to create a knowledge base for. Format: projects/<Project ID>/locations/<Location ID>.

knowledgeBaseKnowledgeBase

Required. The knowledge base to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskKnowledgeBase

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.

Parameters
NameDescription
parentProjectName

Required. The project to create a knowledge base for. Format: projects/<Project ID>/locations/<Location ID>.

knowledgeBaseKnowledgeBase

Required. The knowledge base to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskKnowledgeBase

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.

Parameters
NameDescription
parentProjectName

Required. The project to create a knowledge base for. Format: projects/<Project ID>/locations/<Location ID>.

knowledgeBaseKnowledgeBase

Required. The knowledge base to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskKnowledgeBase

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.

Parameters
NameDescription
requestCreateKnowledgeBaseRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskKnowledgeBase

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.

Parameters
NameDescription
requestCreateKnowledgeBaseRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskKnowledgeBase

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.

Parameters
NameDescription
parentstring

Required. The project to create a knowledge base for. Format: projects/<Project ID>/locations/<Location ID>.

knowledgeBaseKnowledgeBase

Required. The knowledge base to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskKnowledgeBase

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.

Parameters
NameDescription
parentstring

Required. The project to create a knowledge base for. Format: projects/<Project ID>/locations/<Location ID>.

knowledgeBaseKnowledgeBase

Required. The knowledge base to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskKnowledgeBase

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.

Parameters
NameDescription
requestDeleteKnowledgeBaseRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

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.

Parameters
NameDescription
nameKnowledgeBaseName

Required. The name of the knowledge base to delete. Format: projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>.

callSettingsCallSettings

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.

Parameters
NameDescription
namestring

Required. The name of the knowledge base to delete. Format: projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>.

callSettingsCallSettings

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.

Parameters
NameDescription
requestDeleteKnowledgeBaseRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.

Parameters
NameDescription
requestDeleteKnowledgeBaseRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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.

Parameters
NameDescription
nameKnowledgeBaseName

Required. The name of the knowledge base to delete. Format: projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.

Parameters
NameDescription
nameKnowledgeBaseName

Required. The name of the knowledge base to delete. Format: projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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.

Parameters
NameDescription
namestring

Required. The name of the knowledge base to delete. Format: projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.

Parameters
NameDescription
namestring

Required. The name of the knowledge base to delete. Format: projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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.

Parameters
NameDescription
requestGetKnowledgeBaseRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.

Parameters
NameDescription
nameKnowledgeBaseName

Required. The name of the knowledge base to retrieve. Format projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.

Parameters
NameDescription
namestring

Required. The name of the knowledge base to retrieve. Format projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.

Parameters
NameDescription
requestGetKnowledgeBaseRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskKnowledgeBase

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.

Parameters
NameDescription
requestGetKnowledgeBaseRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskKnowledgeBase

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.

Parameters
NameDescription
nameKnowledgeBaseName

Required. The name of the knowledge base to retrieve. Format projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskKnowledgeBase

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.

Parameters
NameDescription
nameKnowledgeBaseName

Required. The name of the knowledge base to retrieve. Format projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskKnowledgeBase

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.

Parameters
NameDescription
namestring

Required. The name of the knowledge base to retrieve. Format projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskKnowledgeBase

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.

Parameters
NameDescription
namestring

Required. The name of the knowledge base to retrieve. Format projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskKnowledgeBase

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.

Parameters
NameDescription
parentLocationName

Required. The project to list of knowledge bases for. Format: projects/<Project ID>/locations/<Location ID>.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListKnowledgeBasesResponseKnowledgeBase

A pageable sequence of 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.

Parameters
NameDescription
parentProjectName

Required. The project to list of knowledge bases for. Format: projects/<Project ID>/locations/<Location ID>.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListKnowledgeBasesResponseKnowledgeBase

A pageable sequence of 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.

Parameters
NameDescription
requestListKnowledgeBasesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListKnowledgeBasesResponseKnowledgeBase

A pageable sequence of 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.

Parameters
NameDescription
parentstring

Required. The project to list of knowledge bases for. Format: projects/<Project ID>/locations/<Location ID>.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListKnowledgeBasesResponseKnowledgeBase

A pageable sequence of 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.

Parameters
NameDescription
parentLocationName

Required. The project to list of knowledge bases for. Format: projects/<Project ID>/locations/<Location ID>.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListKnowledgeBasesResponseKnowledgeBase

A pageable asynchronous sequence of 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 response.ForEachAsync((KnowledgeBase item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListKnowledgeBasesResponse page) =>
{
    // 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.

Parameters
NameDescription
parentProjectName

Required. The project to list of knowledge bases for. Format: projects/<Project ID>/locations/<Location ID>.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListKnowledgeBasesResponseKnowledgeBase

A pageable asynchronous sequence of 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 response.ForEachAsync((KnowledgeBase item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListKnowledgeBasesResponse page) =>
{
    // 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.

Parameters
NameDescription
requestListKnowledgeBasesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListKnowledgeBasesResponseKnowledgeBase

A pageable asynchronous sequence of 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 response.ForEachAsync((KnowledgeBase item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListKnowledgeBasesResponse page) =>
{
    // 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.

Parameters
NameDescription
parentstring

Required. The project to list of knowledge bases for. Format: projects/<Project ID>/locations/<Location ID>.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListKnowledgeBasesResponseKnowledgeBase

A pageable asynchronous sequence of 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 response.ForEachAsync((KnowledgeBase item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListKnowledgeBasesResponse page) =>
{
    // 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() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.

UpdateKnowledgeBase(KnowledgeBase, FieldMask, CallSettings)

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

Updates the specified knowledge base.

Parameters
NameDescription
knowledgeBaseKnowledgeBase

Required. The knowledge base to update.

updateMaskFieldMask

Optional. Not specified means update all. Currently, only display_name can be updated, an InvalidArgument will be returned for attempting to update other fields.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.

Parameters
NameDescription
requestUpdateKnowledgeBaseRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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, FieldMask, CallSettings)

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

Updates the specified knowledge base.

Parameters
NameDescription
knowledgeBaseKnowledgeBase

Required. The knowledge base to update.

updateMaskFieldMask

Optional. Not specified means update all. Currently, only display_name can be updated, an InvalidArgument will be returned for attempting to update other fields.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskKnowledgeBase

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.

Parameters
NameDescription
knowledgeBaseKnowledgeBase

Required. The knowledge base to update.

updateMaskFieldMask

Optional. Not specified means update all. Currently, only display_name can be updated, an InvalidArgument will be returned for attempting to update other fields.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskKnowledgeBase

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(UpdateKnowledgeBaseRequest, CallSettings)

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

Updates the specified knowledge base.

Parameters
NameDescription
requestUpdateKnowledgeBaseRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskKnowledgeBase

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.

Parameters
NameDescription
requestUpdateKnowledgeBaseRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskKnowledgeBase

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);