Reference documentation and code samples for the Dialogflow CX V3 API class Google::Cloud::Dialogflow::CX::V3::Flows::Rest::Client.
REST client for the Flows service.
Service for managing Flows.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all Flows clients ::Google::Cloud::Dialogflow::CX::V3::Flows::Rest::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the Flows Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#create_flow
def create_flow(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::Flow
def create_flow(parent: nil, flow: nil, language_code: nil) -> ::Google::Cloud::Dialogflow::CX::V3::Flow
Creates a flow in the specified agent.
Note: You should always train a flow prior to sending it queries. See the training documentation.
def create_flow(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::Flow
create_flow
via a request object, either of type
CreateFlowRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::CX::V3::CreateFlowRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_flow(parent: nil, flow: nil, language_code: nil) -> ::Google::Cloud::Dialogflow::CX::V3::Flow
create_flow
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The agent to create a flow for.
Format:
projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>
. - flow (::Google::Cloud::Dialogflow::CX::V3::Flow, ::Hash) — Required. The flow to create.
-
language_code (::String) — The language of the following fields in
flow
:-
Flow.event_handlers.trigger_fulfillment.messages
-
Flow.event_handlers.trigger_fulfillment.conditional_cases
-
Flow.transition_routes.trigger_fulfillment.messages
-
Flow.transition_routes.trigger_fulfillment.conditional_cases
If not specified, the agent's default language is used. Many languages are supported. Note: languages must be enabled in the agent before they can be used.
-
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dialogflow::CX::V3::Flow)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dialogflow/cx/v3" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dialogflow::CX::V3::Flows::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::CX::V3::CreateFlowRequest.new # Call the create_flow method. result = client.create_flow request # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Flow. p result
#delete_flow
def delete_flow(request, options = nil) -> ::Google::Protobuf::Empty
def delete_flow(name: nil, force: nil) -> ::Google::Protobuf::Empty
Deletes a specified flow.
def delete_flow(request, options = nil) -> ::Google::Protobuf::Empty
delete_flow
via a request object, either of type
DeleteFlowRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::CX::V3::DeleteFlowRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_flow(name: nil, force: nil) -> ::Google::Protobuf::Empty
delete_flow
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The name of the flow to delete.
Format:
projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>
. -
force (::Boolean) —
This field has no effect for flows with no incoming transitions. For flows with incoming transitions:
- If
force
is set to false, an error will be returned with message indicating the incoming transitions. - If
force
is set to true, Dialogflow will remove the flow, as well as any transitions to the flow (i.e. [Target flow][EventHandler.target_flow] in event handlers or [Target flow][TransitionRoute.target_flow] in transition routes that point to this flow will be cleared).
- If
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dialogflow/cx/v3" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dialogflow::CX::V3::Flows::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::CX::V3::DeleteFlowRequest.new # Call the delete_flow method. result = client.delete_flow request # The returned object is of type Google::Protobuf::Empty. p result
#export_flow
def export_flow(request, options = nil) -> ::Gapic::Operation
def export_flow(name: nil, flow_uri: nil, include_referenced_flows: nil) -> ::Gapic::Operation
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
Note that resources (e.g. intents, entities, webhooks) that the flow references will also be exported.
def export_flow(request, options = nil) -> ::Gapic::Operation
export_flow
via a request object, either of type
ExportFlowRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::CX::V3::ExportFlowRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def export_flow(name: nil, flow_uri: nil, include_referenced_flows: nil) -> ::Gapic::Operation
export_flow
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The name of the flow to export.
Format:
projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>
. -
flow_uri (::String) — Optional. The Google Cloud
Storage URI to export the flow to.
The format of this URI must be
gs://<bucket-name>/<object-name>
. If left unspecified, the serialized flow is returned inline.Dialogflow performs a write operation for the Cloud Storage object on the caller's behalf, so your request authentication must have write permissions for the object. For more information, see Dialogflow access control.
- include_referenced_flows (::Boolean) — Optional. Whether to export flows referenced by the specified flow.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dialogflow/cx/v3" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dialogflow::CX::V3::Flows::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::CX::V3::ExportFlowRequest.new # Call the export_flow method. result = client.export_flow request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#get_flow
def get_flow(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::Flow
def get_flow(name: nil, language_code: nil) -> ::Google::Cloud::Dialogflow::CX::V3::Flow
Retrieves the specified flow.
def get_flow(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::Flow
get_flow
via a request object, either of type
GetFlowRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::CX::V3::GetFlowRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_flow(name: nil, language_code: nil) -> ::Google::Cloud::Dialogflow::CX::V3::Flow
get_flow
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The name of the flow to get.
Format:
projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>
. -
language_code (::String) — The language to retrieve the flow for. The following fields are language
dependent:
-
Flow.event_handlers.trigger_fulfillment.messages
-
Flow.event_handlers.trigger_fulfillment.conditional_cases
-
Flow.transition_routes.trigger_fulfillment.messages
-
Flow.transition_routes.trigger_fulfillment.conditional_cases
If not specified, the agent's default language is used. Many languages are supported. Note: languages must be enabled in the agent before they can be used.
-
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dialogflow::CX::V3::Flow)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dialogflow/cx/v3" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dialogflow::CX::V3::Flows::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::CX::V3::GetFlowRequest.new # Call the get_flow method. result = client.get_flow request # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Flow. p result
#get_flow_validation_result
def get_flow_validation_result(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::FlowValidationResult
def get_flow_validation_result(name: nil, language_code: nil) -> ::Google::Cloud::Dialogflow::CX::V3::FlowValidationResult
Gets the latest flow validation result. Flow validation is performed when ValidateFlow is called.
def get_flow_validation_result(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::FlowValidationResult
get_flow_validation_result
via a request object, either of type
GetFlowValidationResultRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::CX::V3::GetFlowValidationResultRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_flow_validation_result(name: nil, language_code: nil) -> ::Google::Cloud::Dialogflow::CX::V3::FlowValidationResult
get_flow_validation_result
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The flow name.
Format:
projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>/validationResult
. - language_code (::String) — If not specified, the agent's default language is used.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dialogflow::CX::V3::FlowValidationResult)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dialogflow/cx/v3" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dialogflow::CX::V3::Flows::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::CX::V3::GetFlowValidationResultRequest.new # Call the get_flow_validation_result method. result = client.get_flow_validation_result request # The returned object is of type Google::Cloud::Dialogflow::CX::V3::FlowValidationResult. p result
#import_flow
def import_flow(request, options = nil) -> ::Gapic::Operation
def import_flow(parent: nil, flow_uri: nil, flow_content: nil, import_option: nil, flow_import_strategy: nil) -> ::Gapic::Operation
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
Note: You should always train a flow prior to sending it queries. See the training documentation.
def import_flow(request, options = nil) -> ::Gapic::Operation
import_flow
via a request object, either of type
ImportFlowRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::CX::V3::ImportFlowRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def import_flow(parent: nil, flow_uri: nil, flow_content: nil, import_option: nil, flow_import_strategy: nil) -> ::Gapic::Operation
import_flow
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The agent to import the flow into.
Format:
projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>
. -
flow_uri (::String) — The Google Cloud Storage URI
to import flow from. The format of this URI must be
gs://<bucket-name>/<object-name>
.Dialogflow performs a read operation for the Cloud Storage object on the caller's behalf, so your request authentication must have read permissions for the object. For more information, see Dialogflow access control.
- flow_content (::String) — Uncompressed raw byte content for flow.
-
import_option (::Google::Cloud::Dialogflow::CX::V3::ImportFlowRequest::ImportOption) — Flow import mode. If not specified,
KEEP
is assumed. - flow_import_strategy (::Google::Cloud::Dialogflow::CX::V3::FlowImportStrategy, ::Hash) — Optional. Specifies the import strategy used when resolving resource conflicts.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dialogflow/cx/v3" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dialogflow::CX::V3::Flows::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::CX::V3::ImportFlowRequest.new # Call the import_flow method. result = client.import_flow request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#initialize
def initialize() { |config| ... } -> Client
Create a new Flows REST client object.
- (config) — Configure the Flows client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Dialogflow::CX::V3::Flows::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Dialogflow::CX::V3::Flows::Rest::Client.new do |config| config.timeout = 10.0 end
#list_flows
def list_flows(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Flow>
def list_flows(parent: nil, page_size: nil, page_token: nil, language_code: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Flow>
Returns the list of all flows in the specified agent.
def list_flows(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Flow>
list_flows
via a request object, either of type
ListFlowsRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::CX::V3::ListFlowsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_flows(parent: nil, page_size: nil, page_token: nil, language_code: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Flow>
list_flows
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The agent containing the flows.
Format:
projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>
. - page_size (::Integer) — The maximum number of items to return in a single page. By default 100 and at most 1000.
- page_token (::String) — The next_page_token value returned from a previous list request.
-
language_code (::String) — The language to list flows for. The following fields are language
dependent:
-
Flow.event_handlers.trigger_fulfillment.messages
-
Flow.event_handlers.trigger_fulfillment.conditional_cases
-
Flow.transition_routes.trigger_fulfillment.messages
-
Flow.transition_routes.trigger_fulfillment.conditional_cases
If not specified, the agent's default language is used. Many languages are supported. Note: languages must be enabled in the agent before they can be used.
-
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Flow>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Flow>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dialogflow/cx/v3" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dialogflow::CX::V3::Flows::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::CX::V3::ListFlowsRequest.new # Call the list_flows method. result = client.list_flows request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::Dialogflow::CX::V3::Flow. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Rest::Client
Get the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Rest::Client)
#operations_client
def operations_client() -> ::Google::Cloud::Dialogflow::CX::V3::Flows::Rest::Operations
Get the associated client for long-running operations.
#train_flow
def train_flow(request, options = nil) -> ::Gapic::Operation
def train_flow(name: nil) -> ::Gapic::Operation
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.
def train_flow(request, options = nil) -> ::Gapic::Operation
train_flow
via a request object, either of type
TrainFlowRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::CX::V3::TrainFlowRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def train_flow(name: nil) -> ::Gapic::Operation
train_flow
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The flow to train.
Format:
projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>
.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dialogflow/cx/v3" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dialogflow::CX::V3::Flows::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::CX::V3::TrainFlowRequest.new # Call the train_flow method. result = client.train_flow request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#update_flow
def update_flow(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::Flow
def update_flow(flow: nil, update_mask: nil, language_code: nil) -> ::Google::Cloud::Dialogflow::CX::V3::Flow
Updates the specified flow.
Note: You should always train a flow prior to sending it queries. See the training documentation.
def update_flow(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::Flow
update_flow
via a request object, either of type
UpdateFlowRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::CX::V3::UpdateFlowRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_flow(flow: nil, update_mask: nil, language_code: nil) -> ::Google::Cloud::Dialogflow::CX::V3::Flow
update_flow
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- flow (::Google::Cloud::Dialogflow::CX::V3::Flow, ::Hash) — Required. The flow to update.
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — The mask to control which fields get updated. If the mask is not present, all fields will be updated.
-
language_code (::String) — The language of the following fields in
flow
:-
Flow.event_handlers.trigger_fulfillment.messages
-
Flow.event_handlers.trigger_fulfillment.conditional_cases
-
Flow.transition_routes.trigger_fulfillment.messages
-
Flow.transition_routes.trigger_fulfillment.conditional_cases
If not specified, the agent's default language is used. Many languages are supported. Note: languages must be enabled in the agent before they can be used.
-
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dialogflow::CX::V3::Flow)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dialogflow/cx/v3" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dialogflow::CX::V3::Flows::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::CX::V3::UpdateFlowRequest.new # Call the update_flow method. result = client.update_flow request # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Flow. p result
#validate_flow
def validate_flow(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::FlowValidationResult
def validate_flow(name: nil, language_code: nil) -> ::Google::Cloud::Dialogflow::CX::V3::FlowValidationResult
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.
def validate_flow(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::FlowValidationResult
validate_flow
via a request object, either of type
ValidateFlowRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::CX::V3::ValidateFlowRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def validate_flow(name: nil, language_code: nil) -> ::Google::Cloud::Dialogflow::CX::V3::FlowValidationResult
validate_flow
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The flow to validate.
Format:
projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>
. - language_code (::String) — If not specified, the agent's default language is used.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dialogflow::CX::V3::FlowValidationResult)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dialogflow/cx/v3" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dialogflow::CX::V3::Flows::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::CX::V3::ValidateFlowRequest.new # Call the validate_flow method. result = client.validate_flow request # The returned object is of type Google::Cloud::Dialogflow::CX::V3::FlowValidationResult. p result