Class FlowsClient (0.8.0)

FlowsClient(*, credentials: Optional[google.auth.credentials.Credentials] = None, transport: Optional[Union[str, google.cloud.dialogflowcx_v3.services.flows.transports.base.FlowsTransport]] = None, client_options: Optional[google.api_core.client_options.ClientOptions] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)

Service for managing [Flows][google.cloud.dialogflow.cx.v3.Flow].

Inheritance

builtins.object > FlowsClient

Properties

transport

Returns the transport used by the client instance.

Returns
TypeDescription
FlowsTransportThe transport used by the client instance.

Methods

common_billing_account_path

common_billing_account_path(billing_account: str)

Returns a fully-qualified billing_account string.

Parameter
NameDescription
billing_account

common_folder_path

common_folder_path(folder: str)

Returns a fully-qualified folder string.

Parameter
NameDescription
folder

common_location_path

common_location_path(project: str, location: str)

Returns a fully-qualified location string.

Parameters
NameDescription
project
location

common_organization_path

common_organization_path(organization: str)

Returns a fully-qualified organization string.

Parameter
NameDescription
organization

common_project_path

common_project_path(project: str)

Returns a fully-qualified project string.

Parameter
NameDescription
project

create_flow

create_flow(request: Optional[google.cloud.dialogflowcx_v3.types.flow.CreateFlowRequest] = None, *, parent: Optional[str] = None, flow: Optional[google.cloud.dialogflowcx_v3.types.flow.Flow] = None, retry: google.api_core.retry.Retry = <object object>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Creates a flow in the specified agent.

Note: You should always train a flow prior to sending it queries. See the training documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>;__.

Parameter
NameDescription
request google.cloud.dialogflowcx_v3.types.CreateFlowRequest

The request object. The request message for [Flows.CreateFlow][google.cloud.dialogflow.cx.v3.Flows.CreateFlow].

Returns
TypeDescription
google.cloud.dialogflowcx_v3.types.FlowFlows represents the conversation flows when you build your chatbot agent. A flow consists of many pages connected by the transition routes. Conversations always start with the built-in Start Flow (with an all-0 ID). Transition routes can direct the conversation session from the current flow (parent flow) to another flow (sub flow). When the sub flow is finished, Dialogflow will bring the session back to the parent flow, where the sub flow is started. Usually, when a transition route is followed by a matched intent, the intent will be "consumed". This means the intent won't activate more transition routes. However, when the followed transition route moves the conversation session into a different flow, the matched intent can be carried over and to be consumed in the target flow.

delete_flow

delete_flow(request: Optional[google.cloud.dialogflowcx_v3.types.flow.DeleteFlowRequest] = None, *, name: Optional[str] = None, retry: google.api_core.retry.Retry = <object object>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Deletes a specified flow.

Parameter
NameDescription
request google.cloud.dialogflowcx_v3.types.DeleteFlowRequest

The request object. The request message for [Flows.DeleteFlow][google.cloud.dialogflow.cx.v3.Flows.DeleteFlow].

export_flow

export_flow(request: Optional[google.cloud.dialogflowcx_v3.types.flow.ExportFlowRequest] = None, *, retry: google.api_core.retry.Retry = <object object>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Exports the specified flow to a binary file. Note that resources (e.g. intents, entities, webhooks) that the flow references will also be exported.

Parameter
NameDescription
request google.cloud.dialogflowcx_v3.types.ExportFlowRequest

The request object. The request message for [Flows.ExportFlow][google.cloud.dialogflow.cx.v3.Flows.ExportFlow].

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be

flow_path

flow_path(project: str, location: str, agent: str, flow: str)

Returns a fully-qualified flow string.

Parameters
NameDescription
project
location
agent
flow

flow_validation_result_path

flow_validation_result_path(project: str, location: str, agent: str, flow: str)

Returns a fully-qualified flow_validation_result string.

Parameters
NameDescription
project
location
agent
flow

from_service_account_file

from_service_account_file(filename: str, *args, **kwargs)

Creates an instance of this client using the provided credentials file.

Parameters
NameDescription
filename str

The path to the service account private key json file.

args

Additional arguments to pass to the constructor.

kwargs

Additional arguments to pass to the constructor.

Returns
TypeDescription
FlowsClientThe constructed client.

from_service_account_info

from_service_account_info(info: dict, *args, **kwargs)

Creates an instance of this client using the provided credentials info.

Parameters
NameDescription
info dict

The service account private key info.

args

Additional arguments to pass to the constructor.

kwargs

Additional arguments to pass to the constructor.

Returns
TypeDescription
FlowsClientThe constructed client.

from_service_account_json

from_service_account_json(filename: str, *args, **kwargs)

Creates an instance of this client using the provided credentials file.

Parameters
NameDescription
filename str

The path to the service account private key json file.

args

Additional arguments to pass to the constructor.

kwargs

Additional arguments to pass to the constructor.

Returns
TypeDescription
FlowsClientThe constructed client.

get_flow

get_flow(request: Optional[google.cloud.dialogflowcx_v3.types.flow.GetFlowRequest] = None, *, name: Optional[str] = None, retry: google.api_core.retry.Retry = <object object>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Retrieves the specified flow.

Parameter
NameDescription
request google.cloud.dialogflowcx_v3.types.GetFlowRequest

The request object. The response message for [Flows.GetFlow][google.cloud.dialogflow.cx.v3.Flows.GetFlow].

Returns
TypeDescription
google.cloud.dialogflowcx_v3.types.FlowFlows represents the conversation flows when you build your chatbot agent. A flow consists of many pages connected by the transition routes. Conversations always start with the built-in Start Flow (with an all-0 ID). Transition routes can direct the conversation session from the current flow (parent flow) to another flow (sub flow). When the sub flow is finished, Dialogflow will bring the session back to the parent flow, where the sub flow is started. Usually, when a transition route is followed by a matched intent, the intent will be "consumed". This means the intent won't activate more transition routes. However, when the followed transition route moves the conversation session into a different flow, the matched intent can be carried over and to be consumed in the target flow.

get_flow_validation_result

get_flow_validation_result(request: Optional[google.cloud.dialogflowcx_v3.types.flow.GetFlowValidationResultRequest] = None, *, name: Optional[str] = None, retry: google.api_core.retry.Retry = <object object>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Gets the latest flow validation result. Flow validation is performed when ValidateFlow is called.

Parameter
NameDescription
request google.cloud.dialogflowcx_v3.types.GetFlowValidationResultRequest

The request object. The request message for [Flows.GetFlowValidationResult][google.cloud.dialogflow.cx.v3.Flows.GetFlowValidationResult].

Returns
TypeDescription
google.cloud.dialogflowcx_v3.types.FlowValidationResultThe response message for [Flows.GetFlowValidationResult][google.cloud.dialogflow.cx.v3.Flows.GetFlowValidationResult].

import_flow

import_flow(request: Optional[google.cloud.dialogflowcx_v3.types.flow.ImportFlowRequest] = None, *, retry: google.api_core.retry.Retry = <object object>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Imports the specified flow to the specified agent from a binary file.

Note: You should always train a flow prior to sending it queries. See the training documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>;__.

Parameter
NameDescription
request google.cloud.dialogflowcx_v3.types.ImportFlowRequest

The request object. The request message for [Flows.ImportFlow][google.cloud.dialogflow.cx.v3.Flows.ImportFlow].

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be

intent_path

intent_path(project: str, location: str, agent: str, intent: str)

Returns a fully-qualified intent string.

Parameters
NameDescription
project
location
agent
intent

list_flows

list_flows(request: Optional[google.cloud.dialogflowcx_v3.types.flow.ListFlowsRequest] = None, *, parent: Optional[str] = None, retry: google.api_core.retry.Retry = <object object>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Returns the list of all flows in the specified agent.

Parameter
NameDescription
request google.cloud.dialogflowcx_v3.types.ListFlowsRequest

The request object. The request message for [Flows.ListFlows][google.cloud.dialogflow.cx.v3.Flows.ListFlows].

Returns
TypeDescription
google.cloud.dialogflowcx_v3.services.flows.pagers.ListFlowsPagerThe response message for [Flows.ListFlows][google.cloud.dialogflow.cx.v3.Flows.ListFlows]. Iterating over this object will yield results and resolve additional pages automatically.

page_path

page_path(project: str, location: str, agent: str, flow: str, page: str)

Returns a fully-qualified page string.

Parameters
NameDescription
project
location
agent
flow
page

parse_common_billing_account_path

parse_common_billing_account_path(path: str)

Parse a billing_account path into its component segments.

Parameter
NameDescription
path

parse_common_folder_path

parse_common_folder_path(path: str)

Parse a folder path into its component segments.

Parameter
NameDescription
path

parse_common_location_path

parse_common_location_path(path: str)

Parse a location path into its component segments.

Parameter
NameDescription
path

parse_common_organization_path

parse_common_organization_path(path: str)

Parse a organization path into its component segments.

Parameter
NameDescription
path

parse_common_project_path

parse_common_project_path(path: str)

Parse a project path into its component segments.

Parameter
NameDescription
path

parse_flow_path

parse_flow_path(path: str)

Parses a flow path into its component segments.

Parameter
NameDescription
path

parse_flow_validation_result_path

parse_flow_validation_result_path(path: str)

Parses a flow_validation_result path into its component segments.

Parameter
NameDescription
path

parse_intent_path

parse_intent_path(path: str)

Parses a intent path into its component segments.

Parameter
NameDescription
path

parse_page_path

parse_page_path(path: str)

Parses a page path into its component segments.

Parameter
NameDescription
path

parse_transition_route_group_path

parse_transition_route_group_path(path: str)

Parses a transition_route_group path into its component segments.

Parameter
NameDescription
path

parse_webhook_path

parse_webhook_path(path: str)

Parses a webhook path into its component segments.

Parameter
NameDescription
path

train_flow

train_flow(request: Optional[google.cloud.dialogflowcx_v3.types.flow.TrainFlowRequest] = None, *, name: Optional[str] = None, retry: google.api_core.retry.Retry = <object object>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Trains the specified flow. Note that only the flow in 'draft' environment is trained.

Note: You should always train a flow prior to sending it queries. See the training documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>;__.

Parameter
NameDescription
request google.cloud.dialogflowcx_v3.types.TrainFlowRequest

The request object. The request message for [Flows.TrainFlow][google.cloud.dialogflow.cx.v3.Flows.TrainFlow].

Returns
TypeDescription
google.api_core.operation.OperationAn object representing a long-running operation. The result type for the operation will be

transition_route_group_path

transition_route_group_path(project: str, location: str, agent: str, flow: str, transition_route_group: str)

Returns a fully-qualified transition_route_group string.

Parameters
NameDescription
project
location
agent
flow
transition_route_group

update_flow

update_flow(request: Optional[google.cloud.dialogflowcx_v3.types.flow.UpdateFlowRequest] = None, *, flow: Optional[google.cloud.dialogflowcx_v3.types.flow.Flow] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: google.api_core.retry.Retry = <object object>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

Updates the specified flow.

Note: You should always train a flow prior to sending it queries. See the training documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>;__.

Parameter
NameDescription
request google.cloud.dialogflowcx_v3.types.UpdateFlowRequest

The request object. The request message for [Flows.UpdateFlow][google.cloud.dialogflow.cx.v3.Flows.UpdateFlow].

Returns
TypeDescription
google.cloud.dialogflowcx_v3.types.FlowFlows represents the conversation flows when you build your chatbot agent. A flow consists of many pages connected by the transition routes. Conversations always start with the built-in Start Flow (with an all-0 ID). Transition routes can direct the conversation session from the current flow (parent flow) to another flow (sub flow). When the sub flow is finished, Dialogflow will bring the session back to the parent flow, where the sub flow is started. Usually, when a transition route is followed by a matched intent, the intent will be "consumed". This means the intent won't activate more transition routes. However, when the followed transition route moves the conversation session into a different flow, the matched intent can be carried over and to be consumed in the target flow.

validate_flow

validate_flow(request: Optional[google.cloud.dialogflowcx_v3.types.flow.ValidateFlowRequest] = None, *, retry: google.api_core.retry.Retry = <object object>, timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = ())

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.

Parameter
NameDescription
request google.cloud.dialogflowcx_v3.types.ValidateFlowRequest

The request object. The request message for [Flows.ValidateFlow][google.cloud.dialogflow.cx.v3.Flows.ValidateFlow].

Returns
TypeDescription
google.cloud.dialogflowcx_v3.types.FlowValidationResultThe response message for [Flows.GetFlowValidationResult][google.cloud.dialogflow.cx.v3.Flows.GetFlowValidationResult].

webhook_path

webhook_path(project: str, location: str, agent: str, webhook: str)

Returns a fully-qualified webhook string.

Parameters
NameDescription
project
location
agent
webhook