Class KnowledgeBasesClient (3.9.0)

public abstract class KnowledgeBasesClient

KnowledgeBases client wrapper, for convenient use.

Inheritance

Object > KnowledgeBasesClient

Derived Types

Namespace

Google.Cloud.Dialogflow.V2

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
IReadOnlyList<String>
Remarks

GrpcClient

public virtual KnowledgeBases.KnowledgeBasesClient GrpcClient { get; }

The underlying gRPC KnowledgeBases client

Property Value
TypeDescription
KnowledgeBases.KnowledgeBasesClient

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(CancellationToken))

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
Task<KnowledgeBasesClient>

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
Task<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.

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
Task<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.

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
Task<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.

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
Task<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.

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
Task<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.

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
Task<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.

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
Task<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.

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
Task<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.

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&amp;gt;/knowledgeBases/&amp;lt;Knowledge Base ID&amp;gt;.

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&amp;gt;/knowledgeBases/&amp;lt;Knowledge Base ID&amp;gt;.

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&amp;gt;/knowledgeBases/&amp;lt;Knowledge Base ID&amp;gt;.

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&amp;gt;/knowledgeBases/&amp;lt;Knowledge Base ID&amp;gt;.

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&amp;gt;/knowledgeBases/&amp;lt;Knowledge Base ID&amp;gt;.

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&amp;gt;/knowledgeBases/&amp;lt;Knowledge Base ID&amp;gt;.

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&amp;gt;/knowledgeBases/&amp;lt;Knowledge Base ID&amp;gt;.

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&amp;gt;/knowledgeBases/&amp;lt;Knowledge Base ID&amp;gt;.

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
Task<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.

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
Task<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.

Parameters
NameDescription
nameKnowledgeBaseName

Required. The name of the knowledge base to retrieve. Format projects/{Project ID}/locations/{Location ID&amp;gt;/knowledgeBases/&amp;lt;Knowledge Base ID&amp;gt;.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

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

Parameters
NameDescription
nameKnowledgeBaseName

Required. The name of the knowledge base to retrieve. Format projects/{Project ID}/locations/{Location ID&amp;gt;/knowledgeBases/&amp;lt;Knowledge Base ID&amp;gt;.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

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

Parameters
NameDescription
nameString

Required. The name of the knowledge base to retrieve. Format projects/{Project ID}/locations/{Location ID&amp;gt;/knowledgeBases/&amp;lt;Knowledge Base ID&amp;gt;.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

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

Parameters
NameDescription
nameString

Required. The name of the knowledge base to retrieve. Format projects/{Project ID}/locations/{Location ID&amp;gt;/knowledgeBases/&amp;lt;Knowledge Base ID&amp;gt;.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListKnowledgeBasesResponse, KnowledgeBase> ListKnowledgeBases(LocationName parent, string pageToken = null, int? pageSize = default(int? ), 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.

pageSizeNullable<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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListKnowledgeBasesResponse, KnowledgeBase>

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, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListKnowledgeBasesResponse, KnowledgeBase> ListKnowledgeBases(ProjectName parent, string pageToken = null, int? pageSize = default(int? ), 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.

pageSizeNullable<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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListKnowledgeBasesResponse, KnowledgeBase>

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
PagedEnumerable<ListKnowledgeBasesResponse, KnowledgeBase>

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, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListKnowledgeBasesResponse, KnowledgeBase> ListKnowledgeBases(string parent, string pageToken = null, int? pageSize = default(int? ), 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.

pageSizeNullable<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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListKnowledgeBasesResponse, KnowledgeBase>

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, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListKnowledgeBasesResponse, KnowledgeBase> ListKnowledgeBasesAsync(LocationName parent, string pageToken = null, int? pageSize = default(int? ), 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.

pageSizeNullable<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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListKnowledgeBasesResponse, KnowledgeBase>

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, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListKnowledgeBasesResponse, KnowledgeBase> ListKnowledgeBasesAsync(ProjectName parent, string pageToken = null, int? pageSize = default(int? ), 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.

pageSizeNullable<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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListKnowledgeBasesResponse, KnowledgeBase>

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
PagedAsyncEnumerable<ListKnowledgeBasesResponse, KnowledgeBase>

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, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListKnowledgeBasesResponse, KnowledgeBase> ListKnowledgeBasesAsync(string parent, string pageToken = null, int? pageSize = default(int? ), 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.

pageSizeNullable<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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListKnowledgeBasesResponse, KnowledgeBase>

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
Task<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.

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
Task<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(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
Task<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.

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