public abstract class FlowsClient
Reference documentation and code samples for the Dialogflow v3 API class FlowsClient.
Flows client wrapper, for convenient use.
Derived Types
Namespace
GoogleCloudGoogle.Cloud.DialogflowGoogle.Cloud.Dialogflow.CxV3Assembly
Google.Cloud.Dialogflow.Cx.V3.dll
Remarks
Service for managing [Flows][google.cloud.dialogflow.cx.v3.Flow].
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the Flows service, which is a host of "dialogflow.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
string |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default Flows scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyListstring |
The default Flows scopes are:
ExportFlowOperationsClient
public virtual OperationsClient ExportFlowOperationsClient { get; }
The long-running operations client for ExportFlow
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
GrpcClient
public virtual Flows.FlowsClient GrpcClient { get; }
The underlying gRPC Flows client
Property Value | |
---|---|
Type | Description |
FlowsFlowsClient |
ImportFlowOperationsClient
public virtual OperationsClient ImportFlowOperationsClient { get; }
The long-running operations client for ImportFlow
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
LocationsClient
public virtual LocationsClient LocationsClient { get; }
The LocationsClient associated with this client.
Property Value | |
---|---|
Type | Description |
LocationsClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
TrainFlowOperationsClient
public virtual OperationsClient TrainFlowOperationsClient { get; }
The long-running operations client for TrainFlow
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
Methods
Create()
public static FlowsClient Create()
Synchronously creates a FlowsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use FlowsClientBuilder.
Returns | |
---|---|
Type | Description |
FlowsClient | The created FlowsClient. |
CreateAsync(CancellationToken)
public static Task<FlowsClient> CreateAsync(CancellationToken cancellationToken = default)
Asynchronously creates a FlowsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use FlowsClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
TaskFlowsClient | The task representing the created FlowsClient. |
CreateFlow(AgentName, Flow, CallSettings)
public virtual Flow CreateFlow(AgentName parent, Flow flow, CallSettings callSettings = null)
Creates a flow in the specified agent.
Note: You should always train a flow prior to sending it queries. See the training documentation.
Parameters | |
---|---|
Name | Description |
parent | AgentName Required. The agent to create a flow for.
Format: |
flow | Flow Required. The flow to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Flow | The RPC response. |
// Create client
FlowsClient flowsClient = FlowsClient.Create();
// Initialize request argument(s)
AgentName parent = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]");
Flow flow = new Flow();
// Make the request
Flow response = flowsClient.CreateFlow(parent, flow);
CreateFlow(CreateFlowRequest, CallSettings)
public virtual Flow CreateFlow(CreateFlowRequest request, CallSettings callSettings = null)
Creates a flow in the specified agent.
Note: You should always train a flow prior to sending it queries. See the training documentation.
Parameters | |
---|---|
Name | Description |
request | CreateFlowRequest 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 |
Flow | The RPC response. |
// Create client
FlowsClient flowsClient = FlowsClient.Create();
// Initialize request argument(s)
CreateFlowRequest request = new CreateFlowRequest
{
ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
Flow = new Flow(),
LanguageCode = "",
};
// Make the request
Flow response = flowsClient.CreateFlow(request);
CreateFlow(string, Flow, CallSettings)
public virtual Flow CreateFlow(string parent, Flow flow, CallSettings callSettings = null)
Creates a flow in the specified agent.
Note: You should always train a flow prior to sending it queries. See the training documentation.
Parameters | |
---|---|
Name | Description |
parent | string Required. The agent to create a flow for.
Format: |
flow | Flow Required. The flow to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Flow | The RPC response. |
// Create client
FlowsClient flowsClient = FlowsClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]";
Flow flow = new Flow();
// Make the request
Flow response = flowsClient.CreateFlow(parent, flow);
CreateFlowAsync(AgentName, Flow, CallSettings)
public virtual Task<Flow> CreateFlowAsync(AgentName parent, Flow flow, CallSettings callSettings = null)
Creates a flow in the specified agent.
Note: You should always train a flow prior to sending it queries. See the training documentation.
Parameters | |
---|---|
Name | Description |
parent | AgentName Required. The agent to create a flow for.
Format: |
flow | Flow Required. The flow to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskFlow | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]");
Flow flow = new Flow();
// Make the request
Flow response = await flowsClient.CreateFlowAsync(parent, flow);
CreateFlowAsync(AgentName, Flow, CancellationToken)
public virtual Task<Flow> CreateFlowAsync(AgentName parent, Flow flow, CancellationToken cancellationToken)
Creates a flow in the specified agent.
Note: You should always train a flow prior to sending it queries. See the training documentation.
Parameters | |
---|---|
Name | Description |
parent | AgentName Required. The agent to create a flow for.
Format: |
flow | Flow Required. The flow to create. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskFlow | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]");
Flow flow = new Flow();
// Make the request
Flow response = await flowsClient.CreateFlowAsync(parent, flow);
CreateFlowAsync(CreateFlowRequest, CallSettings)
public virtual Task<Flow> CreateFlowAsync(CreateFlowRequest request, CallSettings callSettings = null)
Creates a flow in the specified agent.
Note: You should always train a flow prior to sending it queries. See the training documentation.
Parameters | |
---|---|
Name | Description |
request | CreateFlowRequest 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 |
TaskFlow | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
CreateFlowRequest request = new CreateFlowRequest
{
ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
Flow = new Flow(),
LanguageCode = "",
};
// Make the request
Flow response = await flowsClient.CreateFlowAsync(request);
CreateFlowAsync(CreateFlowRequest, CancellationToken)
public virtual Task<Flow> CreateFlowAsync(CreateFlowRequest request, CancellationToken cancellationToken)
Creates a flow in the specified agent.
Note: You should always train a flow prior to sending it queries. See the training documentation.
Parameters | |
---|---|
Name | Description |
request | CreateFlowRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskFlow | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
CreateFlowRequest request = new CreateFlowRequest
{
ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
Flow = new Flow(),
LanguageCode = "",
};
// Make the request
Flow response = await flowsClient.CreateFlowAsync(request);
CreateFlowAsync(string, Flow, CallSettings)
public virtual Task<Flow> CreateFlowAsync(string parent, Flow flow, CallSettings callSettings = null)
Creates a flow in the specified agent.
Note: You should always train a flow prior to sending it queries. See the training documentation.
Parameters | |
---|---|
Name | Description |
parent | string Required. The agent to create a flow for.
Format: |
flow | Flow Required. The flow to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskFlow | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]";
Flow flow = new Flow();
// Make the request
Flow response = await flowsClient.CreateFlowAsync(parent, flow);
CreateFlowAsync(string, Flow, CancellationToken)
public virtual Task<Flow> CreateFlowAsync(string parent, Flow flow, CancellationToken cancellationToken)
Creates a flow in the specified agent.
Note: You should always train a flow prior to sending it queries. See the training documentation.
Parameters | |
---|---|
Name | Description |
parent | string Required. The agent to create a flow for.
Format: |
flow | Flow Required. The flow to create. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskFlow | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]";
Flow flow = new Flow();
// Make the request
Flow response = await flowsClient.CreateFlowAsync(parent, flow);
DeleteFlow(DeleteFlowRequest, CallSettings)
public virtual void DeleteFlow(DeleteFlowRequest request, CallSettings callSettings = null)
Deletes a specified flow.
Parameters | |
---|---|
Name | Description |
request | DeleteFlowRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
FlowsClient flowsClient = FlowsClient.Create();
// Initialize request argument(s)
DeleteFlowRequest request = new DeleteFlowRequest
{
FlowName = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"),
Force = false,
};
// Make the request
flowsClient.DeleteFlow(request);
DeleteFlow(FlowName, CallSettings)
public virtual void DeleteFlow(FlowName name, CallSettings callSettings = null)
Deletes a specified flow.
Parameters | |
---|---|
Name | Description |
name | FlowName Required. The name of the flow to delete.
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
FlowsClient flowsClient = FlowsClient.Create();
// Initialize request argument(s)
FlowName name = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
// Make the request
flowsClient.DeleteFlow(name);
DeleteFlow(string, CallSettings)
public virtual void DeleteFlow(string name, CallSettings callSettings = null)
Deletes a specified flow.
Parameters | |
---|---|
Name | Description |
name | string Required. The name of the flow to delete.
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
FlowsClient flowsClient = FlowsClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/flows/[FLOW]";
// Make the request
flowsClient.DeleteFlow(name);
DeleteFlowAsync(DeleteFlowRequest, CallSettings)
public virtual Task DeleteFlowAsync(DeleteFlowRequest request, CallSettings callSettings = null)
Deletes a specified flow.
Parameters | |
---|---|
Name | Description |
request | DeleteFlowRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
DeleteFlowRequest request = new DeleteFlowRequest
{
FlowName = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"),
Force = false,
};
// Make the request
await flowsClient.DeleteFlowAsync(request);
DeleteFlowAsync(DeleteFlowRequest, CancellationToken)
public virtual Task DeleteFlowAsync(DeleteFlowRequest request, CancellationToken cancellationToken)
Deletes a specified flow.
Parameters | |
---|---|
Name | Description |
request | DeleteFlowRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
DeleteFlowRequest request = new DeleteFlowRequest
{
FlowName = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"),
Force = false,
};
// Make the request
await flowsClient.DeleteFlowAsync(request);
DeleteFlowAsync(FlowName, CallSettings)
public virtual Task DeleteFlowAsync(FlowName name, CallSettings callSettings = null)
Deletes a specified flow.
Parameters | |
---|---|
Name | Description |
name | FlowName Required. The name of the flow to delete.
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
FlowName name = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
// Make the request
await flowsClient.DeleteFlowAsync(name);
DeleteFlowAsync(FlowName, CancellationToken)
public virtual Task DeleteFlowAsync(FlowName name, CancellationToken cancellationToken)
Deletes a specified flow.
Parameters | |
---|---|
Name | Description |
name | FlowName Required. The name of the flow to delete.
Format: |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
FlowName name = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
// Make the request
await flowsClient.DeleteFlowAsync(name);
DeleteFlowAsync(string, CallSettings)
public virtual Task DeleteFlowAsync(string name, CallSettings callSettings = null)
Deletes a specified flow.
Parameters | |
---|---|
Name | Description |
name | string Required. The name of the flow to delete.
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/flows/[FLOW]";
// Make the request
await flowsClient.DeleteFlowAsync(name);
DeleteFlowAsync(string, CancellationToken)
public virtual Task DeleteFlowAsync(string name, CancellationToken cancellationToken)
Deletes a specified flow.
Parameters | |
---|---|
Name | Description |
name | string Required. The name of the flow to delete.
Format: |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/flows/[FLOW]";
// Make the request
await flowsClient.DeleteFlowAsync(name);
ExportFlow(ExportFlowRequest, CallSettings)
public virtual Operation<ExportFlowResponse, Struct> ExportFlow(ExportFlowRequest request, CallSettings callSettings = null)
Exports the specified flow to a binary file.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: [ExportFlowResponse][google.cloud.dialogflow.cx.v3.ExportFlowResponse]
Note that resources (e.g. intents, entities, webhooks) that the flow references will also be exported.
Parameters | |
---|---|
Name | Description |
request | ExportFlowRequest 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 |
OperationExportFlowResponseStruct | The RPC response. |
// Create client
FlowsClient flowsClient = FlowsClient.Create();
// Initialize request argument(s)
ExportFlowRequest request = new ExportFlowRequest
{
FlowName = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"),
FlowUri = "",
IncludeReferencedFlows = false,
};
// Make the request
Operation<ExportFlowResponse, Struct> response = flowsClient.ExportFlow(request);
// Poll until the returned long-running operation is complete
Operation<ExportFlowResponse, Struct> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ExportFlowResponse 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<ExportFlowResponse, Struct> retrievedResponse = flowsClient.PollOnceExportFlow(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ExportFlowResponse retrievedResult = retrievedResponse.Result;
}
ExportFlowAsync(ExportFlowRequest, CallSettings)
public virtual Task<Operation<ExportFlowResponse, Struct>> ExportFlowAsync(ExportFlowRequest request, CallSettings callSettings = null)
Exports the specified flow to a binary file.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: [ExportFlowResponse][google.cloud.dialogflow.cx.v3.ExportFlowResponse]
Note that resources (e.g. intents, entities, webhooks) that the flow references will also be exported.
Parameters | |
---|---|
Name | Description |
request | ExportFlowRequest 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 |
TaskOperationExportFlowResponseStruct | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
ExportFlowRequest request = new ExportFlowRequest
{
FlowName = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"),
FlowUri = "",
IncludeReferencedFlows = false,
};
// Make the request
Operation<ExportFlowResponse, Struct> response = await flowsClient.ExportFlowAsync(request);
// Poll until the returned long-running operation is complete
Operation<ExportFlowResponse, Struct> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ExportFlowResponse 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<ExportFlowResponse, Struct> retrievedResponse = await flowsClient.PollOnceExportFlowAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ExportFlowResponse retrievedResult = retrievedResponse.Result;
}
ExportFlowAsync(ExportFlowRequest, CancellationToken)
public virtual Task<Operation<ExportFlowResponse, Struct>> ExportFlowAsync(ExportFlowRequest request, CancellationToken cancellationToken)
Exports the specified flow to a binary file.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: [ExportFlowResponse][google.cloud.dialogflow.cx.v3.ExportFlowResponse]
Note that resources (e.g. intents, entities, webhooks) that the flow references will also be exported.
Parameters | |
---|---|
Name | Description |
request | ExportFlowRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationExportFlowResponseStruct | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
ExportFlowRequest request = new ExportFlowRequest
{
FlowName = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"),
FlowUri = "",
IncludeReferencedFlows = false,
};
// Make the request
Operation<ExportFlowResponse, Struct> response = await flowsClient.ExportFlowAsync(request);
// Poll until the returned long-running operation is complete
Operation<ExportFlowResponse, Struct> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ExportFlowResponse 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<ExportFlowResponse, Struct> retrievedResponse = await flowsClient.PollOnceExportFlowAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ExportFlowResponse retrievedResult = retrievedResponse.Result;
}
GetFlow(FlowName, CallSettings)
public virtual Flow GetFlow(FlowName name, CallSettings callSettings = null)
Retrieves the specified flow.
Parameters | |
---|---|
Name | Description |
name | FlowName Required. The name of the flow to get.
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Flow | The RPC response. |
// Create client
FlowsClient flowsClient = FlowsClient.Create();
// Initialize request argument(s)
FlowName name = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
// Make the request
Flow response = flowsClient.GetFlow(name);
GetFlow(GetFlowRequest, CallSettings)
public virtual Flow GetFlow(GetFlowRequest request, CallSettings callSettings = null)
Retrieves the specified flow.
Parameters | |
---|---|
Name | Description |
request | GetFlowRequest 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 |
Flow | The RPC response. |
// Create client
FlowsClient flowsClient = FlowsClient.Create();
// Initialize request argument(s)
GetFlowRequest request = new GetFlowRequest
{
FlowName = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"),
LanguageCode = "",
};
// Make the request
Flow response = flowsClient.GetFlow(request);
GetFlow(string, CallSettings)
public virtual Flow GetFlow(string name, CallSettings callSettings = null)
Retrieves the specified flow.
Parameters | |
---|---|
Name | Description |
name | string Required. The name of the flow to get.
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Flow | The RPC response. |
// Create client
FlowsClient flowsClient = FlowsClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/flows/[FLOW]";
// Make the request
Flow response = flowsClient.GetFlow(name);
GetFlowAsync(FlowName, CallSettings)
public virtual Task<Flow> GetFlowAsync(FlowName name, CallSettings callSettings = null)
Retrieves the specified flow.
Parameters | |
---|---|
Name | Description |
name | FlowName Required. The name of the flow to get.
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskFlow | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
FlowName name = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
// Make the request
Flow response = await flowsClient.GetFlowAsync(name);
GetFlowAsync(FlowName, CancellationToken)
public virtual Task<Flow> GetFlowAsync(FlowName name, CancellationToken cancellationToken)
Retrieves the specified flow.
Parameters | |
---|---|
Name | Description |
name | FlowName Required. The name of the flow to get.
Format: |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskFlow | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
FlowName name = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
// Make the request
Flow response = await flowsClient.GetFlowAsync(name);
GetFlowAsync(GetFlowRequest, CallSettings)
public virtual Task<Flow> GetFlowAsync(GetFlowRequest request, CallSettings callSettings = null)
Retrieves the specified flow.
Parameters | |
---|---|
Name | Description |
request | GetFlowRequest 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 |
TaskFlow | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
GetFlowRequest request = new GetFlowRequest
{
FlowName = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"),
LanguageCode = "",
};
// Make the request
Flow response = await flowsClient.GetFlowAsync(request);
GetFlowAsync(GetFlowRequest, CancellationToken)
public virtual Task<Flow> GetFlowAsync(GetFlowRequest request, CancellationToken cancellationToken)
Retrieves the specified flow.
Parameters | |
---|---|
Name | Description |
request | GetFlowRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskFlow | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
GetFlowRequest request = new GetFlowRequest
{
FlowName = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"),
LanguageCode = "",
};
// Make the request
Flow response = await flowsClient.GetFlowAsync(request);
GetFlowAsync(string, CallSettings)
public virtual Task<Flow> GetFlowAsync(string name, CallSettings callSettings = null)
Retrieves the specified flow.
Parameters | |
---|---|
Name | Description |
name | string Required. The name of the flow to get.
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskFlow | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/flows/[FLOW]";
// Make the request
Flow response = await flowsClient.GetFlowAsync(name);
GetFlowAsync(string, CancellationToken)
public virtual Task<Flow> GetFlowAsync(string name, CancellationToken cancellationToken)
Retrieves the specified flow.
Parameters | |
---|---|
Name | Description |
name | string Required. The name of the flow to get.
Format: |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskFlow | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/flows/[FLOW]";
// Make the request
Flow response = await flowsClient.GetFlowAsync(name);
GetFlowValidationResult(FlowValidationResultName, CallSettings)
public virtual FlowValidationResult GetFlowValidationResult(FlowValidationResultName name, CallSettings callSettings = null)
Gets the latest flow validation result. Flow validation is performed when ValidateFlow is called.
Parameters | |
---|---|
Name | Description |
name | FlowValidationResultName Required. The flow name.
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
FlowValidationResult | The RPC response. |
// Create client
FlowsClient flowsClient = FlowsClient.Create();
// Initialize request argument(s)
FlowValidationResultName name = FlowValidationResultName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
// Make the request
FlowValidationResult response = flowsClient.GetFlowValidationResult(name);
GetFlowValidationResult(GetFlowValidationResultRequest, CallSettings)
public virtual FlowValidationResult GetFlowValidationResult(GetFlowValidationResultRequest request, CallSettings callSettings = null)
Gets the latest flow validation result. Flow validation is performed when ValidateFlow is called.
Parameters | |
---|---|
Name | Description |
request | GetFlowValidationResultRequest 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 |
FlowValidationResult | The RPC response. |
// Create client
FlowsClient flowsClient = FlowsClient.Create();
// Initialize request argument(s)
GetFlowValidationResultRequest request = new GetFlowValidationResultRequest
{
FlowValidationResultName = FlowValidationResultName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"),
LanguageCode = "",
};
// Make the request
FlowValidationResult response = flowsClient.GetFlowValidationResult(request);
GetFlowValidationResult(string, CallSettings)
public virtual FlowValidationResult GetFlowValidationResult(string name, CallSettings callSettings = null)
Gets the latest flow validation result. Flow validation is performed when ValidateFlow is called.
Parameters | |
---|---|
Name | Description |
name | string Required. The flow name.
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
FlowValidationResult | The RPC response. |
// Create client
FlowsClient flowsClient = FlowsClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/flows/[FLOW]/validationResult";
// Make the request
FlowValidationResult response = flowsClient.GetFlowValidationResult(name);
GetFlowValidationResultAsync(FlowValidationResultName, CallSettings)
public virtual Task<FlowValidationResult> GetFlowValidationResultAsync(FlowValidationResultName name, CallSettings callSettings = null)
Gets the latest flow validation result. Flow validation is performed when ValidateFlow is called.
Parameters | |
---|---|
Name | Description |
name | FlowValidationResultName Required. The flow name.
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskFlowValidationResult | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
FlowValidationResultName name = FlowValidationResultName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
// Make the request
FlowValidationResult response = await flowsClient.GetFlowValidationResultAsync(name);
GetFlowValidationResultAsync(FlowValidationResultName, CancellationToken)
public virtual Task<FlowValidationResult> GetFlowValidationResultAsync(FlowValidationResultName name, CancellationToken cancellationToken)
Gets the latest flow validation result. Flow validation is performed when ValidateFlow is called.
Parameters | |
---|---|
Name | Description |
name | FlowValidationResultName Required. The flow name.
Format: |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskFlowValidationResult | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
FlowValidationResultName name = FlowValidationResultName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
// Make the request
FlowValidationResult response = await flowsClient.GetFlowValidationResultAsync(name);
GetFlowValidationResultAsync(GetFlowValidationResultRequest, CallSettings)
public virtual Task<FlowValidationResult> GetFlowValidationResultAsync(GetFlowValidationResultRequest request, CallSettings callSettings = null)
Gets the latest flow validation result. Flow validation is performed when ValidateFlow is called.
Parameters | |
---|---|
Name | Description |
request | GetFlowValidationResultRequest 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 |
TaskFlowValidationResult | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
GetFlowValidationResultRequest request = new GetFlowValidationResultRequest
{
FlowValidationResultName = FlowValidationResultName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"),
LanguageCode = "",
};
// Make the request
FlowValidationResult response = await flowsClient.GetFlowValidationResultAsync(request);
GetFlowValidationResultAsync(GetFlowValidationResultRequest, CancellationToken)
public virtual Task<FlowValidationResult> GetFlowValidationResultAsync(GetFlowValidationResultRequest request, CancellationToken cancellationToken)
Gets the latest flow validation result. Flow validation is performed when ValidateFlow is called.
Parameters | |
---|---|
Name | Description |
request | GetFlowValidationResultRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskFlowValidationResult | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
GetFlowValidationResultRequest request = new GetFlowValidationResultRequest
{
FlowValidationResultName = FlowValidationResultName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"),
LanguageCode = "",
};
// Make the request
FlowValidationResult response = await flowsClient.GetFlowValidationResultAsync(request);
GetFlowValidationResultAsync(string, CallSettings)
public virtual Task<FlowValidationResult> GetFlowValidationResultAsync(string name, CallSettings callSettings = null)
Gets the latest flow validation result. Flow validation is performed when ValidateFlow is called.
Parameters | |
---|---|
Name | Description |
name | string Required. The flow name.
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskFlowValidationResult | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/flows/[FLOW]/validationResult";
// Make the request
FlowValidationResult response = await flowsClient.GetFlowValidationResultAsync(name);
GetFlowValidationResultAsync(string, CancellationToken)
public virtual Task<FlowValidationResult> GetFlowValidationResultAsync(string name, CancellationToken cancellationToken)
Gets the latest flow validation result. Flow validation is performed when ValidateFlow is called.
Parameters | |
---|---|
Name | Description |
name | string Required. The flow name.
Format: |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskFlowValidationResult | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/flows/[FLOW]/validationResult";
// Make the request
FlowValidationResult response = await flowsClient.GetFlowValidationResultAsync(name);
ImportFlow(ImportFlowRequest, CallSettings)
public virtual Operation<ImportFlowResponse, Struct> ImportFlow(ImportFlowRequest request, CallSettings callSettings = null)
Imports the specified flow to the specified agent from a binary file.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: [ImportFlowResponse][google.cloud.dialogflow.cx.v3.ImportFlowResponse]
Note: You should always train a flow prior to sending it queries. See the training documentation.
Parameters | |
---|---|
Name | Description |
request | ImportFlowRequest 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 |
OperationImportFlowResponseStruct | The RPC response. |
// Create client
FlowsClient flowsClient = FlowsClient.Create();
// Initialize request argument(s)
ImportFlowRequest request = new ImportFlowRequest
{
ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
FlowUri = "",
ImportOption = ImportFlowRequest.Types.ImportOption.Unspecified,
};
// Make the request
Operation<ImportFlowResponse, Struct> response = flowsClient.ImportFlow(request);
// Poll until the returned long-running operation is complete
Operation<ImportFlowResponse, Struct> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ImportFlowResponse 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<ImportFlowResponse, Struct> retrievedResponse = flowsClient.PollOnceImportFlow(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ImportFlowResponse retrievedResult = retrievedResponse.Result;
}
ImportFlowAsync(ImportFlowRequest, CallSettings)
public virtual Task<Operation<ImportFlowResponse, Struct>> ImportFlowAsync(ImportFlowRequest request, CallSettings callSettings = null)
Imports the specified flow to the specified agent from a binary file.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: [ImportFlowResponse][google.cloud.dialogflow.cx.v3.ImportFlowResponse]
Note: You should always train a flow prior to sending it queries. See the training documentation.
Parameters | |
---|---|
Name | Description |
request | ImportFlowRequest 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 |
TaskOperationImportFlowResponseStruct | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
ImportFlowRequest request = new ImportFlowRequest
{
ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
FlowUri = "",
ImportOption = ImportFlowRequest.Types.ImportOption.Unspecified,
};
// Make the request
Operation<ImportFlowResponse, Struct> response = await flowsClient.ImportFlowAsync(request);
// Poll until the returned long-running operation is complete
Operation<ImportFlowResponse, Struct> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ImportFlowResponse 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<ImportFlowResponse, Struct> retrievedResponse = await flowsClient.PollOnceImportFlowAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ImportFlowResponse retrievedResult = retrievedResponse.Result;
}
ImportFlowAsync(ImportFlowRequest, CancellationToken)
public virtual Task<Operation<ImportFlowResponse, Struct>> ImportFlowAsync(ImportFlowRequest request, CancellationToken cancellationToken)
Imports the specified flow to the specified agent from a binary file.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: [ImportFlowResponse][google.cloud.dialogflow.cx.v3.ImportFlowResponse]
Note: You should always train a flow prior to sending it queries. See the training documentation.
Parameters | |
---|---|
Name | Description |
request | ImportFlowRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationImportFlowResponseStruct | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
ImportFlowRequest request = new ImportFlowRequest
{
ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
FlowUri = "",
ImportOption = ImportFlowRequest.Types.ImportOption.Unspecified,
};
// Make the request
Operation<ImportFlowResponse, Struct> response = await flowsClient.ImportFlowAsync(request);
// Poll until the returned long-running operation is complete
Operation<ImportFlowResponse, Struct> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ImportFlowResponse 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<ImportFlowResponse, Struct> retrievedResponse = await flowsClient.PollOnceImportFlowAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ImportFlowResponse retrievedResult = retrievedResponse.Result;
}
ListFlows(AgentName, string, int?, CallSettings)
public virtual PagedEnumerable<ListFlowsResponse, Flow> ListFlows(AgentName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Returns the list of all flows in the specified agent.
Parameters | |
---|---|
Name | Description |
parent | AgentName Required. The agent containing the flows.
Format: |
pageToken | string The token returned from the previous request. A value of |
pageSize | int 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 |
PagedEnumerableListFlowsResponseFlow | A pageable sequence of Flow resources. |
// Create client
FlowsClient flowsClient = FlowsClient.Create();
// Initialize request argument(s)
AgentName parent = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]");
// Make the request
PagedEnumerable<ListFlowsResponse, Flow> response = flowsClient.ListFlows(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Flow 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 (ListFlowsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Flow 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<Flow> 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 (Flow 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;
ListFlows(ListFlowsRequest, CallSettings)
public virtual PagedEnumerable<ListFlowsResponse, Flow> ListFlows(ListFlowsRequest request, CallSettings callSettings = null)
Returns the list of all flows in the specified agent.
Parameters | |
---|---|
Name | Description |
request | ListFlowsRequest 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 |
PagedEnumerableListFlowsResponseFlow | A pageable sequence of Flow resources. |
// Create client
FlowsClient flowsClient = FlowsClient.Create();
// Initialize request argument(s)
ListFlowsRequest request = new ListFlowsRequest
{
ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
LanguageCode = "",
};
// Make the request
PagedEnumerable<ListFlowsResponse, Flow> response = flowsClient.ListFlows(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Flow 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 (ListFlowsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Flow 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<Flow> 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 (Flow 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;
ListFlows(string, string, int?, CallSettings)
public virtual PagedEnumerable<ListFlowsResponse, Flow> ListFlows(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Returns the list of all flows in the specified agent.
Parameters | |
---|---|
Name | Description |
parent | string Required. The agent containing the flows.
Format: |
pageToken | string The token returned from the previous request. A value of |
pageSize | int 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 |
PagedEnumerableListFlowsResponseFlow | A pageable sequence of Flow resources. |
// Create client
FlowsClient flowsClient = FlowsClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]";
// Make the request
PagedEnumerable<ListFlowsResponse, Flow> response = flowsClient.ListFlows(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Flow 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 (ListFlowsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Flow 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<Flow> 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 (Flow 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;
ListFlowsAsync(AgentName, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListFlowsResponse, Flow> ListFlowsAsync(AgentName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Returns the list of all flows in the specified agent.
Parameters | |
---|---|
Name | Description |
parent | AgentName Required. The agent containing the flows.
Format: |
pageToken | string The token returned from the previous request. A value of |
pageSize | int 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 |
PagedAsyncEnumerableListFlowsResponseFlow | A pageable asynchronous sequence of Flow resources. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]");
// Make the request
PagedAsyncEnumerable<ListFlowsResponse, Flow> response = flowsClient.ListFlowsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Flow 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((ListFlowsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Flow 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<Flow> 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 (Flow 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;
ListFlowsAsync(ListFlowsRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListFlowsResponse, Flow> ListFlowsAsync(ListFlowsRequest request, CallSettings callSettings = null)
Returns the list of all flows in the specified agent.
Parameters | |
---|---|
Name | Description |
request | ListFlowsRequest 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 |
PagedAsyncEnumerableListFlowsResponseFlow | A pageable asynchronous sequence of Flow resources. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
ListFlowsRequest request = new ListFlowsRequest
{
ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
LanguageCode = "",
};
// Make the request
PagedAsyncEnumerable<ListFlowsResponse, Flow> response = flowsClient.ListFlowsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Flow 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((ListFlowsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Flow 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<Flow> 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 (Flow 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;
ListFlowsAsync(string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListFlowsResponse, Flow> ListFlowsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Returns the list of all flows in the specified agent.
Parameters | |
---|---|
Name | Description |
parent | string Required. The agent containing the flows.
Format: |
pageToken | string The token returned from the previous request. A value of |
pageSize | int 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 |
PagedAsyncEnumerableListFlowsResponseFlow | A pageable asynchronous sequence of Flow resources. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]";
// Make the request
PagedAsyncEnumerable<ListFlowsResponse, Flow> response = flowsClient.ListFlowsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Flow 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((ListFlowsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Flow 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<Flow> 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 (Flow 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;
PollOnceExportFlow(string, CallSettings)
public virtual Operation<ExportFlowResponse, Struct> PollOnceExportFlow(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of ExportFlow
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationExportFlowResponseStruct | The result of polling the operation. |
PollOnceExportFlowAsync(string, CallSettings)
public virtual Task<Operation<ExportFlowResponse, Struct>> PollOnceExportFlowAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
ExportFlow
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationExportFlowResponseStruct | A task representing the result of polling the operation. |
PollOnceImportFlow(string, CallSettings)
public virtual Operation<ImportFlowResponse, Struct> PollOnceImportFlow(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of ImportFlow
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationImportFlowResponseStruct | The result of polling the operation. |
PollOnceImportFlowAsync(string, CallSettings)
public virtual Task<Operation<ImportFlowResponse, Struct>> PollOnceImportFlowAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
ImportFlow
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationImportFlowResponseStruct | A task representing the result of polling the operation. |
PollOnceTrainFlow(string, CallSettings)
public virtual Operation<Empty, Struct> PollOnceTrainFlow(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of TrainFlow
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyStruct | The result of polling the operation. |
PollOnceTrainFlowAsync(string, CallSettings)
public virtual Task<Operation<Empty, Struct>> PollOnceTrainFlowAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
TrainFlow
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyStruct | A task representing the result of polling the operation. |
ShutdownDefaultChannelsAsync()
public static Task ShutdownDefaultChannelsAsync()
Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Returns | |
---|---|
Type | Description |
Task | A task representing the asynchronous shutdown operation. |
After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.
TrainFlow(FlowName, CallSettings)
public virtual Operation<Empty, Struct> TrainFlow(FlowName name, CallSettings callSettings = null)
Trains the specified flow. Note that only the flow in 'draft' environment is trained.
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 a flow prior to sending it queries. See the training documentation.
Parameters | |
---|---|
Name | Description |
name | FlowName Required. The flow to train.
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyStruct | The RPC response. |
// Create client
FlowsClient flowsClient = FlowsClient.Create();
// Initialize request argument(s)
FlowName name = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
// Make the request
Operation<Empty, Struct> response = flowsClient.TrainFlow(name);
// 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 = flowsClient.PollOnceTrainFlow(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;
}
TrainFlow(TrainFlowRequest, CallSettings)
public virtual Operation<Empty, Struct> TrainFlow(TrainFlowRequest request, CallSettings callSettings = null)
Trains the specified flow. Note that only the flow in 'draft' environment is trained.
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 a flow prior to sending it queries. See the training documentation.
Parameters | |
---|---|
Name | Description |
request | TrainFlowRequest 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 |
OperationEmptyStruct | The RPC response. |
// Create client
FlowsClient flowsClient = FlowsClient.Create();
// Initialize request argument(s)
TrainFlowRequest request = new TrainFlowRequest
{
FlowName = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"),
};
// Make the request
Operation<Empty, Struct> response = flowsClient.TrainFlow(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 = flowsClient.PollOnceTrainFlow(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;
}
TrainFlow(string, CallSettings)
public virtual Operation<Empty, Struct> TrainFlow(string name, CallSettings callSettings = null)
Trains the specified flow. Note that only the flow in 'draft' environment is trained.
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 a flow prior to sending it queries. See the training documentation.
Parameters | |
---|---|
Name | Description |
name | string Required. The flow to train.
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyStruct | The RPC response. |
// Create client
FlowsClient flowsClient = FlowsClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/flows/[FLOW]";
// Make the request
Operation<Empty, Struct> response = flowsClient.TrainFlow(name);
// 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 = flowsClient.PollOnceTrainFlow(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;
}
TrainFlowAsync(FlowName, CallSettings)
public virtual Task<Operation<Empty, Struct>> TrainFlowAsync(FlowName name, CallSettings callSettings = null)
Trains the specified flow. Note that only the flow in 'draft' environment is trained.
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 a flow prior to sending it queries. See the training documentation.
Parameters | |
---|---|
Name | Description |
name | FlowName Required. The flow to train.
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyStruct | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
FlowName name = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
// Make the request
Operation<Empty, Struct> response = await flowsClient.TrainFlowAsync(name);
// 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 flowsClient.PollOnceTrainFlowAsync(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;
}
TrainFlowAsync(FlowName, CancellationToken)
public virtual Task<Operation<Empty, Struct>> TrainFlowAsync(FlowName name, CancellationToken cancellationToken)
Trains the specified flow. Note that only the flow in 'draft' environment is trained.
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 a flow prior to sending it queries. See the training documentation.
Parameters | |
---|---|
Name | Description |
name | FlowName Required. The flow to train.
Format: |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyStruct | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
FlowName name = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
// Make the request
Operation<Empty, Struct> response = await flowsClient.TrainFlowAsync(name);
// 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 flowsClient.PollOnceTrainFlowAsync(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;
}
TrainFlowAsync(TrainFlowRequest, CallSettings)
public virtual Task<Operation<Empty, Struct>> TrainFlowAsync(TrainFlowRequest request, CallSettings callSettings = null)
Trains the specified flow. Note that only the flow in 'draft' environment is trained.
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 a flow prior to sending it queries. See the training documentation.
Parameters | |
---|---|
Name | Description |
request | TrainFlowRequest 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 |
TaskOperationEmptyStruct | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
TrainFlowRequest request = new TrainFlowRequest
{
FlowName = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"),
};
// Make the request
Operation<Empty, Struct> response = await flowsClient.TrainFlowAsync(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 flowsClient.PollOnceTrainFlowAsync(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;
}
TrainFlowAsync(TrainFlowRequest, CancellationToken)
public virtual Task<Operation<Empty, Struct>> TrainFlowAsync(TrainFlowRequest request, CancellationToken cancellationToken)
Trains the specified flow. Note that only the flow in 'draft' environment is trained.
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 a flow prior to sending it queries. See the training documentation.
Parameters | |
---|---|
Name | Description |
request | TrainFlowRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyStruct | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
TrainFlowRequest request = new TrainFlowRequest
{
FlowName = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"),
};
// Make the request
Operation<Empty, Struct> response = await flowsClient.TrainFlowAsync(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 flowsClient.PollOnceTrainFlowAsync(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;
}
TrainFlowAsync(string, CallSettings)
public virtual Task<Operation<Empty, Struct>> TrainFlowAsync(string name, CallSettings callSettings = null)
Trains the specified flow. Note that only the flow in 'draft' environment is trained.
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 a flow prior to sending it queries. See the training documentation.
Parameters | |
---|---|
Name | Description |
name | string Required. The flow to train.
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyStruct | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/flows/[FLOW]";
// Make the request
Operation<Empty, Struct> response = await flowsClient.TrainFlowAsync(name);
// 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 flowsClient.PollOnceTrainFlowAsync(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;
}
TrainFlowAsync(string, CancellationToken)
public virtual Task<Operation<Empty, Struct>> TrainFlowAsync(string name, CancellationToken cancellationToken)
Trains the specified flow. Note that only the flow in 'draft' environment is trained.
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 a flow prior to sending it queries. See the training documentation.
Parameters | |
---|---|
Name | Description |
name | string Required. The flow to train.
Format: |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyStruct | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/flows/[FLOW]";
// Make the request
Operation<Empty, Struct> response = await flowsClient.TrainFlowAsync(name);
// 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 flowsClient.PollOnceTrainFlowAsync(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;
}
UpdateFlow(Flow, FieldMask, CallSettings)
public virtual Flow UpdateFlow(Flow flow, FieldMask updateMask, CallSettings callSettings = null)
Updates the specified flow.
Note: You should always train a flow prior to sending it queries. See the training documentation.
Parameters | |
---|---|
Name | Description |
flow | Flow Required. The flow to update. |
updateMask | FieldMask The mask to control which fields get updated. If the mask is not present, all fields will be updated. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Flow | The RPC response. |
// Create client
FlowsClient flowsClient = FlowsClient.Create();
// Initialize request argument(s)
Flow flow = new Flow();
FieldMask updateMask = new FieldMask();
// Make the request
Flow response = flowsClient.UpdateFlow(flow, updateMask);
UpdateFlow(UpdateFlowRequest, CallSettings)
public virtual Flow UpdateFlow(UpdateFlowRequest request, CallSettings callSettings = null)
Updates the specified flow.
Note: You should always train a flow prior to sending it queries. See the training documentation.
Parameters | |
---|---|
Name | Description |
request | UpdateFlowRequest 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 |
Flow | The RPC response. |
// Create client
FlowsClient flowsClient = FlowsClient.Create();
// Initialize request argument(s)
UpdateFlowRequest request = new UpdateFlowRequest
{
Flow = new Flow(),
UpdateMask = new FieldMask(),
LanguageCode = "",
};
// Make the request
Flow response = flowsClient.UpdateFlow(request);
UpdateFlowAsync(Flow, FieldMask, CallSettings)
public virtual Task<Flow> UpdateFlowAsync(Flow flow, FieldMask updateMask, CallSettings callSettings = null)
Updates the specified flow.
Note: You should always train a flow prior to sending it queries. See the training documentation.
Parameters | |
---|---|
Name | Description |
flow | Flow Required. The flow to update. |
updateMask | FieldMask The mask to control which fields get updated. If the mask is not present, all fields will be updated. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskFlow | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
Flow flow = new Flow();
FieldMask updateMask = new FieldMask();
// Make the request
Flow response = await flowsClient.UpdateFlowAsync(flow, updateMask);
UpdateFlowAsync(Flow, FieldMask, CancellationToken)
public virtual Task<Flow> UpdateFlowAsync(Flow flow, FieldMask updateMask, CancellationToken cancellationToken)
Updates the specified flow.
Note: You should always train a flow prior to sending it queries. See the training documentation.
Parameters | |
---|---|
Name | Description |
flow | Flow Required. The flow to update. |
updateMask | FieldMask The mask to control which fields get updated. If the mask is not present, all fields will be updated. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskFlow | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
Flow flow = new Flow();
FieldMask updateMask = new FieldMask();
// Make the request
Flow response = await flowsClient.UpdateFlowAsync(flow, updateMask);
UpdateFlowAsync(UpdateFlowRequest, CallSettings)
public virtual Task<Flow> UpdateFlowAsync(UpdateFlowRequest request, CallSettings callSettings = null)
Updates the specified flow.
Note: You should always train a flow prior to sending it queries. See the training documentation.
Parameters | |
---|---|
Name | Description |
request | UpdateFlowRequest 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 |
TaskFlow | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
UpdateFlowRequest request = new UpdateFlowRequest
{
Flow = new Flow(),
UpdateMask = new FieldMask(),
LanguageCode = "",
};
// Make the request
Flow response = await flowsClient.UpdateFlowAsync(request);
UpdateFlowAsync(UpdateFlowRequest, CancellationToken)
public virtual Task<Flow> UpdateFlowAsync(UpdateFlowRequest request, CancellationToken cancellationToken)
Updates the specified flow.
Note: You should always train a flow prior to sending it queries. See the training documentation.
Parameters | |
---|---|
Name | Description |
request | UpdateFlowRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskFlow | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
UpdateFlowRequest request = new UpdateFlowRequest
{
Flow = new Flow(),
UpdateMask = new FieldMask(),
LanguageCode = "",
};
// Make the request
Flow response = await flowsClient.UpdateFlowAsync(request);
ValidateFlow(ValidateFlowRequest, CallSettings)
public virtual FlowValidationResult ValidateFlow(ValidateFlowRequest request, CallSettings callSettings = null)
Validates the specified flow and creates or updates validation results. Please call this API after the training is completed to get the complete validation results.
Parameters | |
---|---|
Name | Description |
request | ValidateFlowRequest 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 |
FlowValidationResult | The RPC response. |
// Create client
FlowsClient flowsClient = FlowsClient.Create();
// Initialize request argument(s)
ValidateFlowRequest request = new ValidateFlowRequest
{
FlowName = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"),
LanguageCode = "",
};
// Make the request
FlowValidationResult response = flowsClient.ValidateFlow(request);
ValidateFlowAsync(ValidateFlowRequest, CallSettings)
public virtual Task<FlowValidationResult> ValidateFlowAsync(ValidateFlowRequest request, CallSettings callSettings = null)
Validates the specified flow and creates or updates validation results. Please call this API after the training is completed to get the complete validation results.
Parameters | |
---|---|
Name | Description |
request | ValidateFlowRequest 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 |
TaskFlowValidationResult | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
ValidateFlowRequest request = new ValidateFlowRequest
{
FlowName = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"),
LanguageCode = "",
};
// Make the request
FlowValidationResult response = await flowsClient.ValidateFlowAsync(request);
ValidateFlowAsync(ValidateFlowRequest, CancellationToken)
public virtual Task<FlowValidationResult> ValidateFlowAsync(ValidateFlowRequest request, CancellationToken cancellationToken)
Validates the specified flow and creates or updates validation results. Please call this API after the training is completed to get the complete validation results.
Parameters | |
---|---|
Name | Description |
request | ValidateFlowRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskFlowValidationResult | A Task containing the RPC response. |
// Create client
FlowsClient flowsClient = await FlowsClient.CreateAsync();
// Initialize request argument(s)
ValidateFlowRequest request = new ValidateFlowRequest
{
FlowName = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"),
LanguageCode = "",
};
// Make the request
FlowValidationResult response = await flowsClient.ValidateFlowAsync(request);