Dialogflow CX V3 API - Class Google::Cloud::Dialogflow::CX::V3::Environments::Rest::Client (v0.15.0)

Reference documentation and code samples for the Dialogflow CX V3 API class Google::Cloud::Dialogflow::CX::V3::Environments::Rest::Client.

REST client for the Environments service.

Service for managing Environments.

Inherits

  • Object

Methods

.configure

def self.configure() { |config| ... } -> Client::Configuration

Configure the Environments Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all Environments clients
::Google::Cloud::Dialogflow::CX::V3::Environments::Rest::Client.configure do |config|
  config.timeout = 10.0
end

#configure

def configure() { |config| ... } -> Client::Configuration

Configure the Environments 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.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#create_environment

def create_environment(request, options = nil) -> ::Gapic::Operation
def create_environment(parent: nil, environment: nil) -> ::Gapic::Operation

Creates an Environment in the specified Agent.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

Overloads
def create_environment(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_environment via a request object, either of type CreateEnvironmentRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dialogflow::CX::V3::CreateEnvironmentRequest, ::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_environment(parent: nil, environment: nil) -> ::Gapic::Operation
Pass arguments to create_environment 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).
Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#delete_environment

def delete_environment(request, options = nil) -> ::Google::Protobuf::Empty
def delete_environment(name: nil) -> ::Google::Protobuf::Empty

Deletes the specified Environment.

Overloads
def delete_environment(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_environment via a request object, either of type DeleteEnvironmentRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dialogflow::CX::V3::DeleteEnvironmentRequest, ::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_environment(name: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_environment 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).
Parameter
  • name (::String) — Required. The name of the Environment to delete. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment ID>.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#deploy_flow

def deploy_flow(request, options = nil) -> ::Gapic::Operation
def deploy_flow(environment: nil, flow_version: nil) -> ::Gapic::Operation

Deploys a flow to the specified Environment.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

Overloads
def deploy_flow(request, options = nil) -> ::Gapic::Operation
Pass arguments to deploy_flow via a request object, either of type DeployFlowRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dialogflow::CX::V3::DeployFlowRequest, ::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 deploy_flow(environment: nil, flow_version: nil) -> ::Gapic::Operation
Pass arguments to deploy_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).
Parameters
  • environment (::String) — Required. The environment to deploy the flow to. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/ environments/<Environment ID>.
  • flow_version (::String) — Required. The flow version to deploy. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/ flows/<Flow ID>/versions/<Version ID>.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#get_environment

def get_environment(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::Environment
def get_environment(name: nil) -> ::Google::Cloud::Dialogflow::CX::V3::Environment

Retrieves the specified Environment.

Overloads
def get_environment(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::Environment
Pass arguments to get_environment via a request object, either of type GetEnvironmentRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dialogflow::CX::V3::GetEnvironmentRequest, ::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_environment(name: nil) -> ::Google::Cloud::Dialogflow::CX::V3::Environment
Pass arguments to get_environment 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).
Parameter
  • name (::String) — Required. The name of the Environment. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment ID>.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#initialize

def initialize() { |config| ... } -> Client

Create a new Environments REST client object.

Yields
  • (config) — Configure the Environments client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::Dialogflow::CX::V3::Environments::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::Dialogflow::CX::V3::Environments::Rest::Client.new do |config|
  config.timeout = 10.0
end

#list_continuous_test_results

def list_continuous_test_results(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::ContinuousTestResult>
def list_continuous_test_results(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::ContinuousTestResult>

Fetches a list of continuous test results for a given environment.

Overloads
def list_continuous_test_results(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::ContinuousTestResult>
Pass arguments to list_continuous_test_results via a request object, either of type ListContinuousTestResultsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dialogflow::CX::V3::ListContinuousTestResultsRequest, ::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_continuous_test_results(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::ContinuousTestResult>
Pass arguments to list_continuous_test_results 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).
Parameters
  • parent (::String) — Required. The environment to list results for. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/ environments/<Environment 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.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#list_environments

def list_environments(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Environment>
def list_environments(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Environment>

Returns the list of all environments in the specified Agent.

Overloads
def list_environments(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Environment>
Pass arguments to list_environments via a request object, either of type ListEnvironmentsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dialogflow::CX::V3::ListEnvironmentsRequest, ::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_environments(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Environment>
Pass arguments to list_environments 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).
Parameters
  • parent (::String) — Required. The Agent to list all environments for. 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 20 and at most 100.
  • page_token (::String) — The next_page_token value returned from a previous list request.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#location_client

def location_client() -> Google::Cloud::Location::Locations::Rest::Client

Get the associated client for mix-in of the Locations.

Returns
  • (Google::Cloud::Location::Locations::Rest::Client)

#lookup_environment_history

def lookup_environment_history(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Environment>
def lookup_environment_history(name: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Environment>

Looks up the history of the specified Environment.

Overloads
def lookup_environment_history(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Environment>
Pass arguments to lookup_environment_history via a request object, either of type LookupEnvironmentHistoryRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dialogflow::CX::V3::LookupEnvironmentHistoryRequest, ::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 lookup_environment_history(name: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Environment>
Pass arguments to lookup_environment_history 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).
Parameters
  • name (::String) — Required. Resource name of the environment to look up the history for. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment 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.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#operations_client

def operations_client() -> ::Google::Cloud::Dialogflow::CX::V3::Environments::Rest::Operations

Get the associated client for long-running operations.

#run_continuous_test

def run_continuous_test(request, options = nil) -> ::Gapic::Operation
def run_continuous_test(environment: nil) -> ::Gapic::Operation

Kicks off a continuous test under the specified Environment.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

Overloads
def run_continuous_test(request, options = nil) -> ::Gapic::Operation
Pass arguments to run_continuous_test via a request object, either of type RunContinuousTestRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dialogflow::CX::V3::RunContinuousTestRequest, ::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 run_continuous_test(environment: nil) -> ::Gapic::Operation
Pass arguments to run_continuous_test 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).
Parameter
  • environment (::String) — Required. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment ID>.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#update_environment

def update_environment(request, options = nil) -> ::Gapic::Operation
def update_environment(environment: nil, update_mask: nil) -> ::Gapic::Operation

Updates the specified Environment.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

Overloads
def update_environment(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_environment via a request object, either of type UpdateEnvironmentRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dialogflow::CX::V3::UpdateEnvironmentRequest, ::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_environment(environment: nil, update_mask: nil) -> ::Gapic::Operation
Pass arguments to update_environment 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).
Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.