public abstract class KnowledgeBasesClient
KnowledgeBases client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Dialogflow.V2Assembly
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 | |
---|---|
Type | Description |
String |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default KnowledgeBases scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyList<String> |
The default KnowledgeBases scopes are:
GrpcClient
public virtual KnowledgeBases.KnowledgeBasesClient GrpcClient { get; }
The underlying gRPC KnowledgeBases client
Property Value | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
parent | LocationName Required. The project to create a knowledge base for.
Format: |
knowledgeBase | KnowledgeBase Required. The knowledge base to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
KnowledgeBase | The RPC response. |
// 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 | |
---|---|
Name | Description |
parent | ProjectName Required. The project to create a knowledge base for.
Format: |
knowledgeBase | KnowledgeBase Required. The knowledge base to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
KnowledgeBase | The RPC response. |
// 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 | |
---|---|
Name | Description |
request | CreateKnowledgeBaseRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
KnowledgeBase | The RPC response. |
// 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 | |
---|---|
Name | Description |
parent | String Required. The project to create a knowledge base for.
Format: |
knowledgeBase | KnowledgeBase Required. The knowledge base to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
KnowledgeBase | The RPC response. |
// 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 | |
---|---|
Name | Description |
parent | LocationName Required. The project to create a knowledge base for.
Format: |
knowledgeBase | KnowledgeBase Required. The knowledge base to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<KnowledgeBase> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | LocationName Required. The project to create a knowledge base for.
Format: |
knowledgeBase | KnowledgeBase Required. The knowledge base to create. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<KnowledgeBase> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | ProjectName Required. The project to create a knowledge base for.
Format: |
knowledgeBase | KnowledgeBase Required. The knowledge base to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<KnowledgeBase> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | ProjectName Required. The project to create a knowledge base for.
Format: |
knowledgeBase | KnowledgeBase Required. The knowledge base to create. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<KnowledgeBase> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | CreateKnowledgeBaseRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<KnowledgeBase> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | CreateKnowledgeBaseRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<KnowledgeBase> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | String Required. The project to create a knowledge base for.
Format: |
knowledgeBase | KnowledgeBase Required. The knowledge base to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<KnowledgeBase> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | String Required. The project to create a knowledge base for.
Format: |
knowledgeBase | KnowledgeBase Required. The knowledge base to create. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<KnowledgeBase> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | DeleteKnowledgeBaseRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// 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 | |
---|---|
Name | Description |
name | KnowledgeBaseName Required. The name of the knowledge base to delete.
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// 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 | |
---|---|
Name | Description |
name | String Required. The name of the knowledge base to delete.
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// 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 | |
---|---|
Name | Description |
request | DeleteKnowledgeBaseRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | DeleteKnowledgeBaseRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | KnowledgeBaseName Required. The name of the knowledge base to delete.
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | KnowledgeBaseName Required. The name of the knowledge base to delete.
Format: |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | String Required. The name of the knowledge base to delete.
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | String Required. The name of the knowledge base to delete.
Format: |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | GetKnowledgeBaseRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
KnowledgeBase | The RPC response. |
// 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 | |
---|---|
Name | Description |
name | KnowledgeBaseName Required. The name of the knowledge base to retrieve.
Format |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
KnowledgeBase | The RPC response. |
// 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 | |
---|---|
Name | Description |
name | String Required. The name of the knowledge base to retrieve.
Format |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
KnowledgeBase | The RPC response. |
// 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 | |
---|---|
Name | Description |
request | GetKnowledgeBaseRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<KnowledgeBase> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | GetKnowledgeBaseRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<KnowledgeBase> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | KnowledgeBaseName Required. The name of the knowledge base to retrieve.
Format |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<KnowledgeBase> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | KnowledgeBaseName Required. The name of the knowledge base to retrieve.
Format |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<KnowledgeBase> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | String Required. The name of the knowledge base to retrieve.
Format |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<KnowledgeBase> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | String Required. The name of the knowledge base to retrieve.
Format |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<KnowledgeBase> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | LocationName Required. The project to list of knowledge bases for.
Format: |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListKnowledgeBasesResponse, KnowledgeBase> | A pageable sequence of KnowledgeBase resources. |
// 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 | |
---|---|
Name | Description |
parent | ProjectName Required. The project to list of knowledge bases for.
Format: |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListKnowledgeBasesResponse, KnowledgeBase> | A pageable sequence of KnowledgeBase resources. |
// 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 | |
---|---|
Name | Description |
request | ListKnowledgeBasesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListKnowledgeBasesResponse, KnowledgeBase> | A pageable sequence of KnowledgeBase resources. |
// 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 | |
---|---|
Name | Description |
parent | String Required. The project to list of knowledge bases for.
Format: |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListKnowledgeBasesResponse, KnowledgeBase> | A pageable sequence of KnowledgeBase resources. |
// 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 | |
---|---|
Name | Description |
parent | LocationName Required. The project to list of knowledge bases for.
Format: |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListKnowledgeBasesResponse, KnowledgeBase> | A pageable asynchronous sequence of KnowledgeBase resources. |
// 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 | |
---|---|
Name | Description |
parent | ProjectName Required. The project to list of knowledge bases for.
Format: |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListKnowledgeBasesResponse, KnowledgeBase> | A pageable asynchronous sequence of KnowledgeBase resources. |
// 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 | |
---|---|
Name | Description |
request | ListKnowledgeBasesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListKnowledgeBasesResponse, KnowledgeBase> | A pageable asynchronous sequence of KnowledgeBase resources. |
// 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 | |
---|---|
Name | Description |
parent | String Required. The project to list of knowledge bases for.
Format: |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListKnowledgeBasesResponse, KnowledgeBase> | A pageable asynchronous sequence of KnowledgeBase resources. |
// 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 | |
---|---|
Type | Description |
Task | A task representing the asynchronous shutdown operation. |
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 | |
---|---|
Name | Description |
knowledgeBase | KnowledgeBase Required. The knowledge base to update. |
updateMask | FieldMask Optional. Not specified means |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
KnowledgeBase | The RPC response. |
// 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 | |
---|---|
Name | Description |
request | UpdateKnowledgeBaseRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
KnowledgeBase | The RPC response. |
// 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 | |
---|---|
Name | Description |
knowledgeBase | KnowledgeBase Required. The knowledge base to update. |
updateMask | FieldMask Optional. Not specified means |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<KnowledgeBase> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
knowledgeBase | KnowledgeBase Required. The knowledge base to update. |
updateMask | FieldMask Optional. Not specified means |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<KnowledgeBase> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | UpdateKnowledgeBaseRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<KnowledgeBase> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | UpdateKnowledgeBaseRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<KnowledgeBase> | A Task containing the RPC response. |
// 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);