Class IntentsClient
Intents client wrapper, for convenient use.
Namespace: Google.Cloud.Dialogflow.V2
Assembly: Google.Cloud.Dialogflow.V2.dll
Syntax
public abstract class IntentsClient
Remarks
Service for managing [Intents][google.cloud.dialogflow.v2.Intent].
Properties
BatchDeleteIntentsOperationsClient
The long-running operations client for BatchDeleteIntents
.
Declaration
public virtual OperationsClient BatchDeleteIntentsOperationsClient { get; }
Property Value
Type | Description |
---|---|
OperationsClient |
BatchUpdateIntentsOperationsClient
The long-running operations client for BatchUpdateIntents
.
Declaration
public virtual OperationsClient BatchUpdateIntentsOperationsClient { get; }
Property Value
Type | Description |
---|---|
OperationsClient |
DefaultEndpoint
The default endpoint for the Intents service, which is a host of "dialogflow.googleapis.com" and a port of 443.
Declaration
public static string DefaultEndpoint { get; }
Property Value
Type | Description |
---|---|
string |
DefaultScopes
The default Intents scopes.
Declaration
public static IReadOnlyList<string> DefaultScopes { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<string> |
Remarks
The default Intents scopes are:
- https://www.googleapis.com/auth/cloud-platform
- https://www.googleapis.com/auth/dialogflow
GrpcClient
The underlying gRPC Intents client
Declaration
public virtual Intents.IntentsClient GrpcClient { get; }
Property Value
Type | Description |
---|---|
Intents.IntentsClient |
LocationsClient
The Google.Cloud.Location.LocationsClient associated with this client.
Declaration
public virtual LocationsClient LocationsClient { get; }
Property Value
Type | Description |
---|---|
LocationsClient |
ServiceMetadata
The service metadata associated with this client type.
Declaration
public static ServiceMetadata ServiceMetadata { get; }
Property Value
Type | Description |
---|---|
ServiceMetadata |
Methods
BatchDeleteIntents(AgentName, IEnumerable<Intent>, CallSettings)
Deletes intents in the specified agent.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Operation<Empty, Struct> BatchDeleteIntents(AgentName parent, IEnumerable<Intent> intents, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The name of the agent to delete all entities types for. Format:
|
IEnumerable<Intent> | intents | Required. The collection of intents to delete. Only intent |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, Struct> | The RPC response. |
Sample code
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
AgentName parent = AgentName.FromProject("[PROJECT]");
IEnumerable<Intent> intents = new Intent[] { new Intent(), };
// Make the request
Operation<Empty, Struct> response = intentsClient.BatchDeleteIntents(parent, intents);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, Struct> retrievedResponse = intentsClient.PollOnceBatchDeleteIntents(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
BatchDeleteIntents(BatchDeleteIntentsRequest, CallSettings)
Deletes intents in the specified agent.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Operation<Empty, Struct> BatchDeleteIntents(BatchDeleteIntentsRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
BatchDeleteIntentsRequest | request | 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 |
---|---|
Operation<Empty, Struct> | The RPC response. |
Sample code
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
BatchDeleteIntentsRequest request = new BatchDeleteIntentsRequest
{
ParentAsAgentName = AgentName.FromProject("[PROJECT]"),
Intents = { new Intent(), },
};
// Make the request
Operation<Empty, Struct> response = intentsClient.BatchDeleteIntents(request);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, Struct> retrievedResponse = intentsClient.PollOnceBatchDeleteIntents(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
BatchDeleteIntents(string, IEnumerable<Intent>, CallSettings)
Deletes intents in the specified agent.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Operation<Empty, Struct> BatchDeleteIntents(string parent, IEnumerable<Intent> intents, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the agent to delete all entities types for. Format:
|
IEnumerable<Intent> | intents | Required. The collection of intents to delete. Only intent |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, Struct> | The RPC response. |
Sample code
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
IEnumerable<Intent> intents = new Intent[] { new Intent(), };
// Make the request
Operation<Empty, Struct> response = intentsClient.BatchDeleteIntents(parent, intents);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, Struct> retrievedResponse = intentsClient.PollOnceBatchDeleteIntents(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
BatchDeleteIntentsAsync(AgentName, IEnumerable<Intent>, CallSettings)
Deletes intents in the specified agent.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchDeleteIntentsAsync(AgentName parent, IEnumerable<Intent> intents, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The name of the agent to delete all entities types for. Format:
|
IEnumerable<Intent> | intents | Required. The collection of intents to delete. Only intent |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProject("[PROJECT]");
IEnumerable<Intent> intents = new Intent[] { new Intent(), };
// Make the request
Operation<Empty, Struct> response = await intentsClient.BatchDeleteIntentsAsync(parent, intents);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, Struct> retrievedResponse = await intentsClient.PollOnceBatchDeleteIntentsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
BatchDeleteIntentsAsync(AgentName, IEnumerable<Intent>, CancellationToken)
Deletes intents in the specified agent.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchDeleteIntentsAsync(AgentName parent, IEnumerable<Intent> intents, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The name of the agent to delete all entities types for. Format:
|
IEnumerable<Intent> | intents | Required. The collection of intents to delete. Only intent |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProject("[PROJECT]");
IEnumerable<Intent> intents = new Intent[] { new Intent(), };
// Make the request
Operation<Empty, Struct> response = await intentsClient.BatchDeleteIntentsAsync(parent, intents);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, Struct> retrievedResponse = await intentsClient.PollOnceBatchDeleteIntentsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
BatchDeleteIntentsAsync(BatchDeleteIntentsRequest, CallSettings)
Deletes intents in the specified agent.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchDeleteIntentsAsync(BatchDeleteIntentsRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
BatchDeleteIntentsRequest | request | 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<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
BatchDeleteIntentsRequest request = new BatchDeleteIntentsRequest
{
ParentAsAgentName = AgentName.FromProject("[PROJECT]"),
Intents = { new Intent(), },
};
// Make the request
Operation<Empty, Struct> response = await intentsClient.BatchDeleteIntentsAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, Struct> retrievedResponse = await intentsClient.PollOnceBatchDeleteIntentsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
BatchDeleteIntentsAsync(BatchDeleteIntentsRequest, CancellationToken)
Deletes intents in the specified agent.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchDeleteIntentsAsync(BatchDeleteIntentsRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
BatchDeleteIntentsRequest | request | 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<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
BatchDeleteIntentsRequest request = new BatchDeleteIntentsRequest
{
ParentAsAgentName = AgentName.FromProject("[PROJECT]"),
Intents = { new Intent(), },
};
// Make the request
Operation<Empty, Struct> response = await intentsClient.BatchDeleteIntentsAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, Struct> retrievedResponse = await intentsClient.PollOnceBatchDeleteIntentsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
BatchDeleteIntentsAsync(string, IEnumerable<Intent>, CallSettings)
Deletes intents in the specified agent.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchDeleteIntentsAsync(string parent, IEnumerable<Intent> intents, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the agent to delete all entities types for. Format:
|
IEnumerable<Intent> | intents | Required. The collection of intents to delete. Only intent |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
IEnumerable<Intent> intents = new Intent[] { new Intent(), };
// Make the request
Operation<Empty, Struct> response = await intentsClient.BatchDeleteIntentsAsync(parent, intents);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, Struct> retrievedResponse = await intentsClient.PollOnceBatchDeleteIntentsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
BatchDeleteIntentsAsync(string, IEnumerable<Intent>, CancellationToken)
Deletes intents in the specified agent.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchDeleteIntentsAsync(string parent, IEnumerable<Intent> intents, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the agent to delete all entities types for. Format:
|
IEnumerable<Intent> | intents | Required. The collection of intents to delete. Only intent |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
IEnumerable<Intent> intents = new Intent[] { new Intent(), };
// Make the request
Operation<Empty, Struct> response = await intentsClient.BatchDeleteIntentsAsync(parent, intents);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, Struct> retrievedResponse = await intentsClient.PollOnceBatchDeleteIntentsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
BatchUpdateIntents(AgentName, IntentBatch, CallSettings)
Updates/Creates multiple intents in the specified agent.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2.BatchUpdateIntentsResponse]
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Operation<BatchUpdateIntentsResponse, Struct> BatchUpdateIntents(AgentName parent, IntentBatch intentBatchInline, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The name of the agent to update or create intents in.
Format: |
IntentBatch | intentBatchInline | The collection of intents to update or create. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<BatchUpdateIntentsResponse, Struct> | The RPC response. |
Sample code
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
AgentName parent = AgentName.FromProject("[PROJECT]");
IntentBatch intentBatchInline = new IntentBatch();
// Make the request
Operation<BatchUpdateIntentsResponse, Struct> response = intentsClient.BatchUpdateIntents(parent, intentBatchInline);
// Poll until the returned long-running operation is complete
Operation<BatchUpdateIntentsResponse, Struct> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
BatchUpdateIntentsResponse result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<BatchUpdateIntentsResponse, Struct> retrievedResponse = intentsClient.PollOnceBatchUpdateIntents(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchUpdateIntentsResponse retrievedResult = retrievedResponse.Result;
}
BatchUpdateIntents(AgentName, string, CallSettings)
Updates/Creates multiple intents in the specified agent.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2.BatchUpdateIntentsResponse]
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Operation<BatchUpdateIntentsResponse, Struct> BatchUpdateIntents(AgentName parent, string intentBatchUri, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The name of the agent to update or create intents in.
Format: |
string | intentBatchUri | The URI to a Google Cloud Storage file containing intents to update or create. The file format can either be a serialized proto (of IntentBatch type) or JSON object. Note: The URI must start with "gs://". |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<BatchUpdateIntentsResponse, Struct> | The RPC response. |
Sample code
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
AgentName parent = AgentName.FromProject("[PROJECT]");
string intentBatchUri = "";
// Make the request
Operation<BatchUpdateIntentsResponse, Struct> response = intentsClient.BatchUpdateIntents(parent, intentBatchUri);
// Poll until the returned long-running operation is complete
Operation<BatchUpdateIntentsResponse, Struct> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
BatchUpdateIntentsResponse result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<BatchUpdateIntentsResponse, Struct> retrievedResponse = intentsClient.PollOnceBatchUpdateIntents(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchUpdateIntentsResponse retrievedResult = retrievedResponse.Result;
}
BatchUpdateIntents(BatchUpdateIntentsRequest, CallSettings)
Updates/Creates multiple intents in the specified agent.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2.BatchUpdateIntentsResponse]
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Operation<BatchUpdateIntentsResponse, Struct> BatchUpdateIntents(BatchUpdateIntentsRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
BatchUpdateIntentsRequest | request | 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 |
---|---|
Operation<BatchUpdateIntentsResponse, Struct> | The RPC response. |
Sample code
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
BatchUpdateIntentsRequest request = new BatchUpdateIntentsRequest
{
ParentAsAgentName = AgentName.FromProject("[PROJECT]"),
IntentBatchUri = "",
LanguageCode = "",
UpdateMask = new FieldMask(),
IntentView = IntentView.Unspecified,
};
// Make the request
Operation<BatchUpdateIntentsResponse, Struct> response = intentsClient.BatchUpdateIntents(request);
// Poll until the returned long-running operation is complete
Operation<BatchUpdateIntentsResponse, Struct> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
BatchUpdateIntentsResponse result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<BatchUpdateIntentsResponse, Struct> retrievedResponse = intentsClient.PollOnceBatchUpdateIntents(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchUpdateIntentsResponse retrievedResult = retrievedResponse.Result;
}
BatchUpdateIntents(string, IntentBatch, CallSettings)
Updates/Creates multiple intents in the specified agent.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2.BatchUpdateIntentsResponse]
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Operation<BatchUpdateIntentsResponse, Struct> BatchUpdateIntents(string parent, IntentBatch intentBatchInline, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the agent to update or create intents in.
Format: |
IntentBatch | intentBatchInline | The collection of intents to update or create. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<BatchUpdateIntentsResponse, Struct> | The RPC response. |
Sample code
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
IntentBatch intentBatchInline = new IntentBatch();
// Make the request
Operation<BatchUpdateIntentsResponse, Struct> response = intentsClient.BatchUpdateIntents(parent, intentBatchInline);
// Poll until the returned long-running operation is complete
Operation<BatchUpdateIntentsResponse, Struct> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
BatchUpdateIntentsResponse result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<BatchUpdateIntentsResponse, Struct> retrievedResponse = intentsClient.PollOnceBatchUpdateIntents(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchUpdateIntentsResponse retrievedResult = retrievedResponse.Result;
}
BatchUpdateIntents(string, string, CallSettings)
Updates/Creates multiple intents in the specified agent.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2.BatchUpdateIntentsResponse]
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Operation<BatchUpdateIntentsResponse, Struct> BatchUpdateIntents(string parent, string intentBatchUri, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the agent to update or create intents in.
Format: |
string | intentBatchUri | The URI to a Google Cloud Storage file containing intents to update or create. The file format can either be a serialized proto (of IntentBatch type) or JSON object. Note: The URI must start with "gs://". |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<BatchUpdateIntentsResponse, Struct> | The RPC response. |
Sample code
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
string intentBatchUri = "";
// Make the request
Operation<BatchUpdateIntentsResponse, Struct> response = intentsClient.BatchUpdateIntents(parent, intentBatchUri);
// Poll until the returned long-running operation is complete
Operation<BatchUpdateIntentsResponse, Struct> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
BatchUpdateIntentsResponse result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<BatchUpdateIntentsResponse, Struct> retrievedResponse = intentsClient.PollOnceBatchUpdateIntents(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchUpdateIntentsResponse retrievedResult = retrievedResponse.Result;
}
BatchUpdateIntentsAsync(AgentName, IntentBatch, CallSettings)
Updates/Creates multiple intents in the specified agent.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2.BatchUpdateIntentsResponse]
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<BatchUpdateIntentsResponse, Struct>> BatchUpdateIntentsAsync(AgentName parent, IntentBatch intentBatchInline, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The name of the agent to update or create intents in.
Format: |
IntentBatch | intentBatchInline | The collection of intents to update or create. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<BatchUpdateIntentsResponse, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProject("[PROJECT]");
IntentBatch intentBatchInline = new IntentBatch();
// Make the request
Operation<BatchUpdateIntentsResponse, Struct> response = await intentsClient.BatchUpdateIntentsAsync(parent, intentBatchInline);
// Poll until the returned long-running operation is complete
Operation<BatchUpdateIntentsResponse, Struct> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchUpdateIntentsResponse result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<BatchUpdateIntentsResponse, Struct> retrievedResponse = await intentsClient.PollOnceBatchUpdateIntentsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchUpdateIntentsResponse retrievedResult = retrievedResponse.Result;
}
BatchUpdateIntentsAsync(AgentName, IntentBatch, CancellationToken)
Updates/Creates multiple intents in the specified agent.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2.BatchUpdateIntentsResponse]
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<BatchUpdateIntentsResponse, Struct>> BatchUpdateIntentsAsync(AgentName parent, IntentBatch intentBatchInline, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The name of the agent to update or create intents in.
Format: |
IntentBatch | intentBatchInline | The collection of intents to update or create. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Operation<BatchUpdateIntentsResponse, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProject("[PROJECT]");
IntentBatch intentBatchInline = new IntentBatch();
// Make the request
Operation<BatchUpdateIntentsResponse, Struct> response = await intentsClient.BatchUpdateIntentsAsync(parent, intentBatchInline);
// Poll until the returned long-running operation is complete
Operation<BatchUpdateIntentsResponse, Struct> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchUpdateIntentsResponse result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<BatchUpdateIntentsResponse, Struct> retrievedResponse = await intentsClient.PollOnceBatchUpdateIntentsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchUpdateIntentsResponse retrievedResult = retrievedResponse.Result;
}
BatchUpdateIntentsAsync(AgentName, string, CallSettings)
Updates/Creates multiple intents in the specified agent.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2.BatchUpdateIntentsResponse]
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<BatchUpdateIntentsResponse, Struct>> BatchUpdateIntentsAsync(AgentName parent, string intentBatchUri, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The name of the agent to update or create intents in.
Format: |
string | intentBatchUri | The URI to a Google Cloud Storage file containing intents to update or create. The file format can either be a serialized proto (of IntentBatch type) or JSON object. Note: The URI must start with "gs://". |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<BatchUpdateIntentsResponse, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProject("[PROJECT]");
string intentBatchUri = "";
// Make the request
Operation<BatchUpdateIntentsResponse, Struct> response = await intentsClient.BatchUpdateIntentsAsync(parent, intentBatchUri);
// Poll until the returned long-running operation is complete
Operation<BatchUpdateIntentsResponse, Struct> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchUpdateIntentsResponse result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<BatchUpdateIntentsResponse, Struct> retrievedResponse = await intentsClient.PollOnceBatchUpdateIntentsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchUpdateIntentsResponse retrievedResult = retrievedResponse.Result;
}
BatchUpdateIntentsAsync(AgentName, string, CancellationToken)
Updates/Creates multiple intents in the specified agent.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2.BatchUpdateIntentsResponse]
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<BatchUpdateIntentsResponse, Struct>> BatchUpdateIntentsAsync(AgentName parent, string intentBatchUri, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The name of the agent to update or create intents in.
Format: |
string | intentBatchUri | The URI to a Google Cloud Storage file containing intents to update or create. The file format can either be a serialized proto (of IntentBatch type) or JSON object. Note: The URI must start with "gs://". |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Operation<BatchUpdateIntentsResponse, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProject("[PROJECT]");
string intentBatchUri = "";
// Make the request
Operation<BatchUpdateIntentsResponse, Struct> response = await intentsClient.BatchUpdateIntentsAsync(parent, intentBatchUri);
// Poll until the returned long-running operation is complete
Operation<BatchUpdateIntentsResponse, Struct> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchUpdateIntentsResponse result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<BatchUpdateIntentsResponse, Struct> retrievedResponse = await intentsClient.PollOnceBatchUpdateIntentsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchUpdateIntentsResponse retrievedResult = retrievedResponse.Result;
}
BatchUpdateIntentsAsync(BatchUpdateIntentsRequest, CallSettings)
Updates/Creates multiple intents in the specified agent.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2.BatchUpdateIntentsResponse]
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<BatchUpdateIntentsResponse, Struct>> BatchUpdateIntentsAsync(BatchUpdateIntentsRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
BatchUpdateIntentsRequest | request | 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<Operation<BatchUpdateIntentsResponse, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
BatchUpdateIntentsRequest request = new BatchUpdateIntentsRequest
{
ParentAsAgentName = AgentName.FromProject("[PROJECT]"),
IntentBatchUri = "",
LanguageCode = "",
UpdateMask = new FieldMask(),
IntentView = IntentView.Unspecified,
};
// Make the request
Operation<BatchUpdateIntentsResponse, Struct> response = await intentsClient.BatchUpdateIntentsAsync(request);
// Poll until the returned long-running operation is complete
Operation<BatchUpdateIntentsResponse, Struct> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchUpdateIntentsResponse result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<BatchUpdateIntentsResponse, Struct> retrievedResponse = await intentsClient.PollOnceBatchUpdateIntentsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchUpdateIntentsResponse retrievedResult = retrievedResponse.Result;
}
BatchUpdateIntentsAsync(BatchUpdateIntentsRequest, CancellationToken)
Updates/Creates multiple intents in the specified agent.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2.BatchUpdateIntentsResponse]
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<BatchUpdateIntentsResponse, Struct>> BatchUpdateIntentsAsync(BatchUpdateIntentsRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
BatchUpdateIntentsRequest | request | 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<Operation<BatchUpdateIntentsResponse, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
BatchUpdateIntentsRequest request = new BatchUpdateIntentsRequest
{
ParentAsAgentName = AgentName.FromProject("[PROJECT]"),
IntentBatchUri = "",
LanguageCode = "",
UpdateMask = new FieldMask(),
IntentView = IntentView.Unspecified,
};
// Make the request
Operation<BatchUpdateIntentsResponse, Struct> response = await intentsClient.BatchUpdateIntentsAsync(request);
// Poll until the returned long-running operation is complete
Operation<BatchUpdateIntentsResponse, Struct> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchUpdateIntentsResponse result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<BatchUpdateIntentsResponse, Struct> retrievedResponse = await intentsClient.PollOnceBatchUpdateIntentsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchUpdateIntentsResponse retrievedResult = retrievedResponse.Result;
}
BatchUpdateIntentsAsync(string, IntentBatch, CallSettings)
Updates/Creates multiple intents in the specified agent.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2.BatchUpdateIntentsResponse]
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<BatchUpdateIntentsResponse, Struct>> BatchUpdateIntentsAsync(string parent, IntentBatch intentBatchInline, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the agent to update or create intents in.
Format: |
IntentBatch | intentBatchInline | The collection of intents to update or create. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<BatchUpdateIntentsResponse, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
IntentBatch intentBatchInline = new IntentBatch();
// Make the request
Operation<BatchUpdateIntentsResponse, Struct> response = await intentsClient.BatchUpdateIntentsAsync(parent, intentBatchInline);
// Poll until the returned long-running operation is complete
Operation<BatchUpdateIntentsResponse, Struct> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchUpdateIntentsResponse result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<BatchUpdateIntentsResponse, Struct> retrievedResponse = await intentsClient.PollOnceBatchUpdateIntentsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchUpdateIntentsResponse retrievedResult = retrievedResponse.Result;
}
BatchUpdateIntentsAsync(string, IntentBatch, CancellationToken)
Updates/Creates multiple intents in the specified agent.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2.BatchUpdateIntentsResponse]
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<BatchUpdateIntentsResponse, Struct>> BatchUpdateIntentsAsync(string parent, IntentBatch intentBatchInline, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the agent to update or create intents in.
Format: |
IntentBatch | intentBatchInline | The collection of intents to update or create. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Operation<BatchUpdateIntentsResponse, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
IntentBatch intentBatchInline = new IntentBatch();
// Make the request
Operation<BatchUpdateIntentsResponse, Struct> response = await intentsClient.BatchUpdateIntentsAsync(parent, intentBatchInline);
// Poll until the returned long-running operation is complete
Operation<BatchUpdateIntentsResponse, Struct> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchUpdateIntentsResponse result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<BatchUpdateIntentsResponse, Struct> retrievedResponse = await intentsClient.PollOnceBatchUpdateIntentsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchUpdateIntentsResponse retrievedResult = retrievedResponse.Result;
}
BatchUpdateIntentsAsync(string, string, CallSettings)
Updates/Creates multiple intents in the specified agent.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2.BatchUpdateIntentsResponse]
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<BatchUpdateIntentsResponse, Struct>> BatchUpdateIntentsAsync(string parent, string intentBatchUri, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the agent to update or create intents in.
Format: |
string | intentBatchUri | The URI to a Google Cloud Storage file containing intents to update or create. The file format can either be a serialized proto (of IntentBatch type) or JSON object. Note: The URI must start with "gs://". |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<BatchUpdateIntentsResponse, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
string intentBatchUri = "";
// Make the request
Operation<BatchUpdateIntentsResponse, Struct> response = await intentsClient.BatchUpdateIntentsAsync(parent, intentBatchUri);
// Poll until the returned long-running operation is complete
Operation<BatchUpdateIntentsResponse, Struct> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchUpdateIntentsResponse result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<BatchUpdateIntentsResponse, Struct> retrievedResponse = await intentsClient.PollOnceBatchUpdateIntentsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchUpdateIntentsResponse retrievedResult = retrievedResponse.Result;
}
BatchUpdateIntentsAsync(string, string, CancellationToken)
Updates/Creates multiple intents in the specified agent.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2.BatchUpdateIntentsResponse]
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<BatchUpdateIntentsResponse, Struct>> BatchUpdateIntentsAsync(string parent, string intentBatchUri, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the agent to update or create intents in.
Format: |
string | intentBatchUri | The URI to a Google Cloud Storage file containing intents to update or create. The file format can either be a serialized proto (of IntentBatch type) or JSON object. Note: The URI must start with "gs://". |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Operation<BatchUpdateIntentsResponse, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
string intentBatchUri = "";
// Make the request
Operation<BatchUpdateIntentsResponse, Struct> response = await intentsClient.BatchUpdateIntentsAsync(parent, intentBatchUri);
// Poll until the returned long-running operation is complete
Operation<BatchUpdateIntentsResponse, Struct> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchUpdateIntentsResponse result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<BatchUpdateIntentsResponse, Struct> retrievedResponse = await intentsClient.PollOnceBatchUpdateIntentsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchUpdateIntentsResponse retrievedResult = retrievedResponse.Result;
}
Create()
Synchronously creates a IntentsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use IntentsClientBuilder.
Declaration
public static IntentsClient Create()
Returns
Type | Description |
---|---|
IntentsClient | The created IntentsClient. |
CreateAsync(CancellationToken)
Asynchronously creates a IntentsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use IntentsClientBuilder.
Declaration
public static Task<IntentsClient> CreateAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | The CancellationToken to use while creating the client. |
Returns
Type | Description |
---|---|
Task<IntentsClient> | The task representing the created IntentsClient. |
CreateIntent(AgentName, Intent, CallSettings)
Creates an intent in the specified agent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Intent CreateIntent(AgentName parent, Intent intent, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The agent to create a intent for.
Format: |
Intent | intent | Required. The intent to create. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Intent | The RPC response. |
Sample code
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
AgentName parent = AgentName.FromProject("[PROJECT]");
Intent intent = new Intent();
// Make the request
Intent response = intentsClient.CreateIntent(parent, intent);
CreateIntent(AgentName, Intent, string, CallSettings)
Creates an intent in the specified agent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Intent CreateIntent(AgentName parent, Intent intent, string languageCode, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The agent to create a intent for.
Format: |
Intent | intent | Required. The intent to create. |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Intent | The RPC response. |
Sample code
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
AgentName parent = AgentName.FromProject("[PROJECT]");
Intent intent = new Intent();
string languageCode = "";
// Make the request
Intent response = intentsClient.CreateIntent(parent, intent, languageCode);
CreateIntent(CreateIntentRequest, CallSettings)
Creates an intent in the specified agent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Intent CreateIntent(CreateIntentRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
CreateIntentRequest | request | 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 |
---|---|
Intent | The RPC response. |
Sample code
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
CreateIntentRequest request = new CreateIntentRequest
{
ParentAsAgentName = AgentName.FromProject("[PROJECT]"),
Intent = new Intent(),
LanguageCode = "",
IntentView = IntentView.Unspecified,
};
// Make the request
Intent response = intentsClient.CreateIntent(request);
CreateIntent(string, Intent, CallSettings)
Creates an intent in the specified agent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Intent CreateIntent(string parent, Intent intent, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The agent to create a intent for.
Format: |
Intent | intent | Required. The intent to create. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Intent | The RPC response. |
Sample code
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
Intent intent = new Intent();
// Make the request
Intent response = intentsClient.CreateIntent(parent, intent);
CreateIntent(string, Intent, string, CallSettings)
Creates an intent in the specified agent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Intent CreateIntent(string parent, Intent intent, string languageCode, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The agent to create a intent for.
Format: |
Intent | intent | Required. The intent to create. |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Intent | The RPC response. |
Sample code
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
Intent intent = new Intent();
string languageCode = "";
// Make the request
Intent response = intentsClient.CreateIntent(parent, intent, languageCode);
CreateIntentAsync(AgentName, Intent, CallSettings)
Creates an intent in the specified agent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Intent> CreateIntentAsync(AgentName parent, Intent intent, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The agent to create a intent for.
Format: |
Intent | intent | Required. The intent to create. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Intent> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProject("[PROJECT]");
Intent intent = new Intent();
// Make the request
Intent response = await intentsClient.CreateIntentAsync(parent, intent);
CreateIntentAsync(AgentName, Intent, string, CallSettings)
Creates an intent in the specified agent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Intent> CreateIntentAsync(AgentName parent, Intent intent, string languageCode, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The agent to create a intent for.
Format: |
Intent | intent | Required. The intent to create. |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Intent> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProject("[PROJECT]");
Intent intent = new Intent();
string languageCode = "";
// Make the request
Intent response = await intentsClient.CreateIntentAsync(parent, intent, languageCode);
CreateIntentAsync(AgentName, Intent, string, CancellationToken)
Creates an intent in the specified agent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Intent> CreateIntentAsync(AgentName parent, Intent intent, string languageCode, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The agent to create a intent for.
Format: |
Intent | intent | Required. The intent to create. |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Intent> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProject("[PROJECT]");
Intent intent = new Intent();
string languageCode = "";
// Make the request
Intent response = await intentsClient.CreateIntentAsync(parent, intent, languageCode);
CreateIntentAsync(AgentName, Intent, CancellationToken)
Creates an intent in the specified agent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Intent> CreateIntentAsync(AgentName parent, Intent intent, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The agent to create a intent for.
Format: |
Intent | intent | Required. The intent to create. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Intent> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProject("[PROJECT]");
Intent intent = new Intent();
// Make the request
Intent response = await intentsClient.CreateIntentAsync(parent, intent);
CreateIntentAsync(CreateIntentRequest, CallSettings)
Creates an intent in the specified agent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Intent> CreateIntentAsync(CreateIntentRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
CreateIntentRequest | request | 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<Intent> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
CreateIntentRequest request = new CreateIntentRequest
{
ParentAsAgentName = AgentName.FromProject("[PROJECT]"),
Intent = new Intent(),
LanguageCode = "",
IntentView = IntentView.Unspecified,
};
// Make the request
Intent response = await intentsClient.CreateIntentAsync(request);
CreateIntentAsync(CreateIntentRequest, CancellationToken)
Creates an intent in the specified agent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Intent> CreateIntentAsync(CreateIntentRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CreateIntentRequest | request | 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<Intent> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
CreateIntentRequest request = new CreateIntentRequest
{
ParentAsAgentName = AgentName.FromProject("[PROJECT]"),
Intent = new Intent(),
LanguageCode = "",
IntentView = IntentView.Unspecified,
};
// Make the request
Intent response = await intentsClient.CreateIntentAsync(request);
CreateIntentAsync(string, Intent, CallSettings)
Creates an intent in the specified agent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Intent> CreateIntentAsync(string parent, Intent intent, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The agent to create a intent for.
Format: |
Intent | intent | Required. The intent to create. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Intent> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
Intent intent = new Intent();
// Make the request
Intent response = await intentsClient.CreateIntentAsync(parent, intent);
CreateIntentAsync(string, Intent, string, CallSettings)
Creates an intent in the specified agent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Intent> CreateIntentAsync(string parent, Intent intent, string languageCode, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The agent to create a intent for.
Format: |
Intent | intent | Required. The intent to create. |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Intent> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
Intent intent = new Intent();
string languageCode = "";
// Make the request
Intent response = await intentsClient.CreateIntentAsync(parent, intent, languageCode);
CreateIntentAsync(string, Intent, string, CancellationToken)
Creates an intent in the specified agent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Intent> CreateIntentAsync(string parent, Intent intent, string languageCode, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The agent to create a intent for.
Format: |
Intent | intent | Required. The intent to create. |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Intent> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
Intent intent = new Intent();
string languageCode = "";
// Make the request
Intent response = await intentsClient.CreateIntentAsync(parent, intent, languageCode);
CreateIntentAsync(string, Intent, CancellationToken)
Creates an intent in the specified agent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Intent> CreateIntentAsync(string parent, Intent intent, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The agent to create a intent for.
Format: |
Intent | intent | Required. The intent to create. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Intent> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
Intent intent = new Intent();
// Make the request
Intent response = await intentsClient.CreateIntentAsync(parent, intent);
DeleteIntent(DeleteIntentRequest, CallSettings)
Deletes the specified intent and its direct or indirect followup intents.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual void DeleteIntent(DeleteIntentRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
DeleteIntentRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Sample code
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
DeleteIntentRequest request = new DeleteIntentRequest
{
IntentName = IntentName.FromProjectIntent("[PROJECT]", "[INTENT]"),
};
// Make the request
intentsClient.DeleteIntent(request);
DeleteIntent(IntentName, CallSettings)
Deletes the specified intent and its direct or indirect followup intents.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual void DeleteIntent(IntentName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
IntentName | name | Required. The name of the intent to delete. If this intent has direct or
indirect followup intents, we also delete them.
Format: |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Sample code
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
IntentName name = IntentName.FromProjectIntent("[PROJECT]", "[INTENT]");
// Make the request
intentsClient.DeleteIntent(name);
DeleteIntent(string, CallSettings)
Deletes the specified intent and its direct or indirect followup intents.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual void DeleteIntent(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the intent to delete. If this intent has direct or
indirect followup intents, we also delete them.
Format: |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Sample code
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/agent/intents/[INTENT]";
// Make the request
intentsClient.DeleteIntent(name);
DeleteIntentAsync(DeleteIntentRequest, CallSettings)
Deletes the specified intent and its direct or indirect followup intents.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task DeleteIntentAsync(DeleteIntentRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
DeleteIntentRequest | request | 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. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
DeleteIntentRequest request = new DeleteIntentRequest
{
IntentName = IntentName.FromProjectIntent("[PROJECT]", "[INTENT]"),
};
// Make the request
await intentsClient.DeleteIntentAsync(request);
DeleteIntentAsync(DeleteIntentRequest, CancellationToken)
Deletes the specified intent and its direct or indirect followup intents.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task DeleteIntentAsync(DeleteIntentRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
DeleteIntentRequest | request | 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. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
DeleteIntentRequest request = new DeleteIntentRequest
{
IntentName = IntentName.FromProjectIntent("[PROJECT]", "[INTENT]"),
};
// Make the request
await intentsClient.DeleteIntentAsync(request);
DeleteIntentAsync(IntentName, CallSettings)
Deletes the specified intent and its direct or indirect followup intents.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task DeleteIntentAsync(IntentName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
IntentName | name | Required. The name of the intent to delete. If this intent has direct or
indirect followup intents, we also delete them.
Format: |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
IntentName name = IntentName.FromProjectIntent("[PROJECT]", "[INTENT]");
// Make the request
await intentsClient.DeleteIntentAsync(name);
DeleteIntentAsync(IntentName, CancellationToken)
Deletes the specified intent and its direct or indirect followup intents.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task DeleteIntentAsync(IntentName name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IntentName | name | Required. The name of the intent to delete. If this intent has direct or
indirect followup intents, we also delete them.
Format: |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
IntentName name = IntentName.FromProjectIntent("[PROJECT]", "[INTENT]");
// Make the request
await intentsClient.DeleteIntentAsync(name);
DeleteIntentAsync(string, CallSettings)
Deletes the specified intent and its direct or indirect followup intents.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task DeleteIntentAsync(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the intent to delete. If this intent has direct or
indirect followup intents, we also delete them.
Format: |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/agent/intents/[INTENT]";
// Make the request
await intentsClient.DeleteIntentAsync(name);
DeleteIntentAsync(string, CancellationToken)
Deletes the specified intent and its direct or indirect followup intents.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task DeleteIntentAsync(string name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the intent to delete. If this intent has direct or
indirect followup intents, we also delete them.
Format: |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/agent/intents/[INTENT]";
// Make the request
await intentsClient.DeleteIntentAsync(name);
GetIntent(GetIntentRequest, CallSettings)
Retrieves the specified intent.
Declaration
public virtual Intent GetIntent(GetIntentRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
GetIntentRequest | request | 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 |
---|---|
Intent | The RPC response. |
Sample code
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
GetIntentRequest request = new GetIntentRequest
{
IntentName = IntentName.FromProjectIntent("[PROJECT]", "[INTENT]"),
LanguageCode = "",
IntentView = IntentView.Unspecified,
};
// Make the request
Intent response = intentsClient.GetIntent(request);
GetIntent(IntentName, CallSettings)
Retrieves the specified intent.
Declaration
public virtual Intent GetIntent(IntentName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
IntentName | name | Required. The name of the intent.
Format: |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Intent | The RPC response. |
Sample code
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
IntentName name = IntentName.FromProjectIntent("[PROJECT]", "[INTENT]");
// Make the request
Intent response = intentsClient.GetIntent(name);
GetIntent(IntentName, string, CallSettings)
Retrieves the specified intent.
Declaration
public virtual Intent GetIntent(IntentName name, string languageCode, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
IntentName | name | Required. The name of the intent.
Format: |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Intent | The RPC response. |
Sample code
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
IntentName name = IntentName.FromProjectIntent("[PROJECT]", "[INTENT]");
string languageCode = "";
// Make the request
Intent response = intentsClient.GetIntent(name, languageCode);
GetIntent(string, CallSettings)
Retrieves the specified intent.
Declaration
public virtual Intent GetIntent(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the intent.
Format: |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Intent | The RPC response. |
Sample code
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/agent/intents/[INTENT]";
// Make the request
Intent response = intentsClient.GetIntent(name);
GetIntent(string, string, CallSettings)
Retrieves the specified intent.
Declaration
public virtual Intent GetIntent(string name, string languageCode, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the intent.
Format: |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Intent | The RPC response. |
Sample code
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/agent/intents/[INTENT]";
string languageCode = "";
// Make the request
Intent response = intentsClient.GetIntent(name, languageCode);
GetIntentAsync(GetIntentRequest, CallSettings)
Retrieves the specified intent.
Declaration
public virtual Task<Intent> GetIntentAsync(GetIntentRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
GetIntentRequest | request | 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<Intent> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
GetIntentRequest request = new GetIntentRequest
{
IntentName = IntentName.FromProjectIntent("[PROJECT]", "[INTENT]"),
LanguageCode = "",
IntentView = IntentView.Unspecified,
};
// Make the request
Intent response = await intentsClient.GetIntentAsync(request);
GetIntentAsync(GetIntentRequest, CancellationToken)
Retrieves the specified intent.
Declaration
public virtual Task<Intent> GetIntentAsync(GetIntentRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
GetIntentRequest | request | 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<Intent> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
GetIntentRequest request = new GetIntentRequest
{
IntentName = IntentName.FromProjectIntent("[PROJECT]", "[INTENT]"),
LanguageCode = "",
IntentView = IntentView.Unspecified,
};
// Make the request
Intent response = await intentsClient.GetIntentAsync(request);
GetIntentAsync(IntentName, CallSettings)
Retrieves the specified intent.
Declaration
public virtual Task<Intent> GetIntentAsync(IntentName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
IntentName | name | Required. The name of the intent.
Format: |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Intent> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
IntentName name = IntentName.FromProjectIntent("[PROJECT]", "[INTENT]");
// Make the request
Intent response = await intentsClient.GetIntentAsync(name);
GetIntentAsync(IntentName, string, CallSettings)
Retrieves the specified intent.
Declaration
public virtual Task<Intent> GetIntentAsync(IntentName name, string languageCode, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
IntentName | name | Required. The name of the intent.
Format: |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Intent> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
IntentName name = IntentName.FromProjectIntent("[PROJECT]", "[INTENT]");
string languageCode = "";
// Make the request
Intent response = await intentsClient.GetIntentAsync(name, languageCode);
GetIntentAsync(IntentName, string, CancellationToken)
Retrieves the specified intent.
Declaration
public virtual Task<Intent> GetIntentAsync(IntentName name, string languageCode, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IntentName | name | Required. The name of the intent.
Format: |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Intent> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
IntentName name = IntentName.FromProjectIntent("[PROJECT]", "[INTENT]");
string languageCode = "";
// Make the request
Intent response = await intentsClient.GetIntentAsync(name, languageCode);
GetIntentAsync(IntentName, CancellationToken)
Retrieves the specified intent.
Declaration
public virtual Task<Intent> GetIntentAsync(IntentName name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IntentName | name | Required. The name of the intent.
Format: |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Intent> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
IntentName name = IntentName.FromProjectIntent("[PROJECT]", "[INTENT]");
// Make the request
Intent response = await intentsClient.GetIntentAsync(name);
GetIntentAsync(string, CallSettings)
Retrieves the specified intent.
Declaration
public virtual Task<Intent> GetIntentAsync(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the intent.
Format: |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Intent> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/agent/intents/[INTENT]";
// Make the request
Intent response = await intentsClient.GetIntentAsync(name);
GetIntentAsync(string, string, CallSettings)
Retrieves the specified intent.
Declaration
public virtual Task<Intent> GetIntentAsync(string name, string languageCode, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the intent.
Format: |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Intent> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/agent/intents/[INTENT]";
string languageCode = "";
// Make the request
Intent response = await intentsClient.GetIntentAsync(name, languageCode);
GetIntentAsync(string, string, CancellationToken)
Retrieves the specified intent.
Declaration
public virtual Task<Intent> GetIntentAsync(string name, string languageCode, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the intent.
Format: |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Intent> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/agent/intents/[INTENT]";
string languageCode = "";
// Make the request
Intent response = await intentsClient.GetIntentAsync(name, languageCode);
GetIntentAsync(string, CancellationToken)
Retrieves the specified intent.
Declaration
public virtual Task<Intent> GetIntentAsync(string name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the intent.
Format: |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Intent> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/agent/intents/[INTENT]";
// Make the request
Intent response = await intentsClient.GetIntentAsync(name);
ListIntents(AgentName, string, int?, CallSettings)
Returns the list of all intents in the specified agent.
Declaration
public virtual PagedEnumerable<ListIntentsResponse, Intent> ListIntents(AgentName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The agent to list all intents from.
Format: Alternatively, you can specify the environment to list intents for.
Format: |
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | 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<ListIntentsResponse, Intent> | A pageable sequence of Intent resources. |
Sample code
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
AgentName parent = AgentName.FromProject("[PROJECT]");
// Make the request
PagedEnumerable<ListIntentsResponse, Intent> response = intentsClient.ListIntents(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Intent 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 (ListIntentsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Intent 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<Intent> 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 (Intent 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;
ListIntents(AgentName, string, string, int?, CallSettings)
Returns the list of all intents in the specified agent.
Declaration
public virtual PagedEnumerable<ListIntentsResponse, Intent> ListIntents(AgentName parent, string languageCode, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The agent to list all intents from.
Format: Alternatively, you can specify the environment to list intents for.
Format: |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | 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<ListIntentsResponse, Intent> | A pageable sequence of Intent resources. |
Sample code
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
AgentName parent = AgentName.FromProject("[PROJECT]");
string languageCode = "";
// Make the request
PagedEnumerable<ListIntentsResponse, Intent> response = intentsClient.ListIntents(parent, languageCode: languageCode);
// Iterate over all response items, lazily performing RPCs as required
foreach (Intent 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 (ListIntentsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Intent 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<Intent> 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 (Intent 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;
ListIntents(ListIntentsRequest, CallSettings)
Returns the list of all intents in the specified agent.
Declaration
public virtual PagedEnumerable<ListIntentsResponse, Intent> ListIntents(ListIntentsRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ListIntentsRequest | request | 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<ListIntentsResponse, Intent> | A pageable sequence of Intent resources. |
Sample code
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
ListIntentsRequest request = new ListIntentsRequest
{
ParentAsAgentName = AgentName.FromProject("[PROJECT]"),
LanguageCode = "",
IntentView = IntentView.Unspecified,
};
// Make the request
PagedEnumerable<ListIntentsResponse, Intent> response = intentsClient.ListIntents(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Intent 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 (ListIntentsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Intent 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<Intent> 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 (Intent 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;
ListIntents(string, string, int?, CallSettings)
Returns the list of all intents in the specified agent.
Declaration
public virtual PagedEnumerable<ListIntentsResponse, Intent> ListIntents(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The agent to list all intents from.
Format: Alternatively, you can specify the environment to list intents for.
Format: |
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | 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<ListIntentsResponse, Intent> | A pageable sequence of Intent resources. |
Sample code
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
// Make the request
PagedEnumerable<ListIntentsResponse, Intent> response = intentsClient.ListIntents(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Intent 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 (ListIntentsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Intent 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<Intent> 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 (Intent 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;
ListIntents(string, string, string, int?, CallSettings)
Returns the list of all intents in the specified agent.
Declaration
public virtual PagedEnumerable<ListIntentsResponse, Intent> ListIntents(string parent, string languageCode, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The agent to list all intents from.
Format: Alternatively, you can specify the environment to list intents for.
Format: |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | 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<ListIntentsResponse, Intent> | A pageable sequence of Intent resources. |
Sample code
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
string languageCode = "";
// Make the request
PagedEnumerable<ListIntentsResponse, Intent> response = intentsClient.ListIntents(parent, languageCode: languageCode);
// Iterate over all response items, lazily performing RPCs as required
foreach (Intent 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 (ListIntentsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Intent 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<Intent> 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 (Intent 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;
ListIntentsAsync(AgentName, string, int?, CallSettings)
Returns the list of all intents in the specified agent.
Declaration
public virtual PagedAsyncEnumerable<ListIntentsResponse, Intent> ListIntentsAsync(AgentName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The agent to list all intents from.
Format: Alternatively, you can specify the environment to list intents for.
Format: |
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | 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<ListIntentsResponse, Intent> | A pageable asynchronous sequence of Intent resources. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProject("[PROJECT]");
// Make the request
PagedAsyncEnumerable<ListIntentsResponse, Intent> response = intentsClient.ListIntentsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Intent 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((ListIntentsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Intent 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<Intent> 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 (Intent 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;
ListIntentsAsync(AgentName, string, string, int?, CallSettings)
Returns the list of all intents in the specified agent.
Declaration
public virtual PagedAsyncEnumerable<ListIntentsResponse, Intent> ListIntentsAsync(AgentName parent, string languageCode, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The agent to list all intents from.
Format: Alternatively, you can specify the environment to list intents for.
Format: |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | 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<ListIntentsResponse, Intent> | A pageable asynchronous sequence of Intent resources. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProject("[PROJECT]");
string languageCode = "";
// Make the request
PagedAsyncEnumerable<ListIntentsResponse, Intent> response = intentsClient.ListIntentsAsync(parent, languageCode: languageCode);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Intent 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((ListIntentsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Intent 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<Intent> 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 (Intent 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;
ListIntentsAsync(ListIntentsRequest, CallSettings)
Returns the list of all intents in the specified agent.
Declaration
public virtual PagedAsyncEnumerable<ListIntentsResponse, Intent> ListIntentsAsync(ListIntentsRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ListIntentsRequest | request | 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<ListIntentsResponse, Intent> | A pageable asynchronous sequence of Intent resources. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
ListIntentsRequest request = new ListIntentsRequest
{
ParentAsAgentName = AgentName.FromProject("[PROJECT]"),
LanguageCode = "",
IntentView = IntentView.Unspecified,
};
// Make the request
PagedAsyncEnumerable<ListIntentsResponse, Intent> response = intentsClient.ListIntentsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Intent 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((ListIntentsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Intent 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<Intent> 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 (Intent 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;
ListIntentsAsync(string, string, int?, CallSettings)
Returns the list of all intents in the specified agent.
Declaration
public virtual PagedAsyncEnumerable<ListIntentsResponse, Intent> ListIntentsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The agent to list all intents from.
Format: Alternatively, you can specify the environment to list intents for.
Format: |
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | 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<ListIntentsResponse, Intent> | A pageable asynchronous sequence of Intent resources. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
// Make the request
PagedAsyncEnumerable<ListIntentsResponse, Intent> response = intentsClient.ListIntentsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Intent 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((ListIntentsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Intent 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<Intent> 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 (Intent 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;
ListIntentsAsync(string, string, string, int?, CallSettings)
Returns the list of all intents in the specified agent.
Declaration
public virtual PagedAsyncEnumerable<ListIntentsResponse, Intent> ListIntentsAsync(string parent, string languageCode, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The agent to list all intents from.
Format: Alternatively, you can specify the environment to list intents for.
Format: |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | 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<ListIntentsResponse, Intent> | A pageable asynchronous sequence of Intent resources. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
string languageCode = "";
// Make the request
PagedAsyncEnumerable<ListIntentsResponse, Intent> response = intentsClient.ListIntentsAsync(parent, languageCode: languageCode);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Intent 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((ListIntentsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Intent 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<Intent> 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 (Intent 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;
PollOnceBatchDeleteIntents(string, CallSettings)
Poll an operation once, using an operationName
from a previous invocation of BatchDeleteIntents
.
Declaration
public virtual Operation<Empty, Struct> PollOnceBatchDeleteIntents(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, Struct> | The result of polling the operation. |
PollOnceBatchDeleteIntentsAsync(string, CallSettings)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
BatchDeleteIntents
.
Declaration
public virtual Task<Operation<Empty, Struct>> PollOnceBatchDeleteIntentsAsync(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A task representing the result of polling the operation. |
PollOnceBatchUpdateIntents(string, CallSettings)
Poll an operation once, using an operationName
from a previous invocation of BatchUpdateIntents
.
Declaration
public virtual Operation<BatchUpdateIntentsResponse, Struct> PollOnceBatchUpdateIntents(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<BatchUpdateIntentsResponse, Struct> | The result of polling the operation. |
PollOnceBatchUpdateIntentsAsync(string, CallSettings)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
BatchUpdateIntents
.
Declaration
public virtual Task<Operation<BatchUpdateIntentsResponse, Struct>> PollOnceBatchUpdateIntentsAsync(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<BatchUpdateIntentsResponse, Struct>> | A task representing the result of polling the operation. |
ShutdownDefaultChannelsAsync()
Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Declaration
public static Task ShutdownDefaultChannelsAsync()
Returns
Type | Description |
---|---|
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.
UpdateIntent(Intent, string, CallSettings)
Updates the specified intent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Intent UpdateIntent(Intent intent, string languageCode, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
Intent | intent | Required. The intent to update. |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Intent | The RPC response. |
Sample code
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
Intent intent = new Intent();
string languageCode = "";
// Make the request
Intent response = intentsClient.UpdateIntent(intent, languageCode);
UpdateIntent(Intent, string, FieldMask, CallSettings)
Updates the specified intent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Intent UpdateIntent(Intent intent, string languageCode, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
Intent | intent | Required. The intent to update. |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
FieldMask | updateMask | Optional. The mask to control which fields get updated. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Intent | The RPC response. |
Sample code
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
Intent intent = new Intent();
string languageCode = "";
FieldMask updateMask = new FieldMask();
// Make the request
Intent response = intentsClient.UpdateIntent(intent, languageCode, updateMask);
UpdateIntent(UpdateIntentRequest, CallSettings)
Updates the specified intent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Intent UpdateIntent(UpdateIntentRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
UpdateIntentRequest | request | 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 |
---|---|
Intent | The RPC response. |
Sample code
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
UpdateIntentRequest request = new UpdateIntentRequest
{
Intent = new Intent(),
LanguageCode = "",
UpdateMask = new FieldMask(),
IntentView = IntentView.Unspecified,
};
// Make the request
Intent response = intentsClient.UpdateIntent(request);
UpdateIntentAsync(Intent, string, CallSettings)
Updates the specified intent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Intent> UpdateIntentAsync(Intent intent, string languageCode, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
Intent | intent | Required. The intent to update. |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Intent> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
Intent intent = new Intent();
string languageCode = "";
// Make the request
Intent response = await intentsClient.UpdateIntentAsync(intent, languageCode);
UpdateIntentAsync(Intent, string, FieldMask, CallSettings)
Updates the specified intent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Intent> UpdateIntentAsync(Intent intent, string languageCode, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
Intent | intent | Required. The intent to update. |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
FieldMask | updateMask | Optional. The mask to control which fields get updated. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Intent> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
Intent intent = new Intent();
string languageCode = "";
FieldMask updateMask = new FieldMask();
// Make the request
Intent response = await intentsClient.UpdateIntentAsync(intent, languageCode, updateMask);
UpdateIntentAsync(Intent, string, FieldMask, CancellationToken)
Updates the specified intent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Intent> UpdateIntentAsync(Intent intent, string languageCode, FieldMask updateMask, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
Intent | intent | Required. The intent to update. |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
FieldMask | updateMask | Optional. The mask to control which fields get updated. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Intent> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
Intent intent = new Intent();
string languageCode = "";
FieldMask updateMask = new FieldMask();
// Make the request
Intent response = await intentsClient.UpdateIntentAsync(intent, languageCode, updateMask);
UpdateIntentAsync(Intent, string, CancellationToken)
Updates the specified intent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Intent> UpdateIntentAsync(Intent intent, string languageCode, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
Intent | intent | Required. The intent to update. |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Intent> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
Intent intent = new Intent();
string languageCode = "";
// Make the request
Intent response = await intentsClient.UpdateIntentAsync(intent, languageCode);
UpdateIntentAsync(UpdateIntentRequest, CallSettings)
Updates the specified intent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Intent> UpdateIntentAsync(UpdateIntentRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
UpdateIntentRequest | request | 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<Intent> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
UpdateIntentRequest request = new UpdateIntentRequest
{
Intent = new Intent(),
LanguageCode = "",
UpdateMask = new FieldMask(),
IntentView = IntentView.Unspecified,
};
// Make the request
Intent response = await intentsClient.UpdateIntentAsync(request);
UpdateIntentAsync(UpdateIntentRequest, CancellationToken)
Updates the specified intent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Intent> UpdateIntentAsync(UpdateIntentRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
UpdateIntentRequest | request | 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<Intent> | A Task containing the RPC response. |
Sample code
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
UpdateIntentRequest request = new UpdateIntentRequest
{
Intent = new Intent(),
LanguageCode = "",
UpdateMask = new FieldMask(),
IntentView = IntentView.Unspecified,
};
// Make the request
Intent response = await intentsClient.UpdateIntentAsync(request);