# Dialogflow CX V3 API - Class Google::Cloud::Dialogflow::CX::V3::Environments::Rest::Client (v1.12.1)

1.12.1 (latest) 1.12.0 1.11.0 1.10.1 1.9.0 1.8.0 1.7.0 1.6.1 1.5.0 1.4.0 1.3.0 1.2.0 1.1.1 1.0.0 0.26.0 0.25.0 0.24.2 0.23.0 0.22.0 0.21.0 0.20.0 0.19.0 0.18.0 0.17.0 0.16.0 0.15.1 0.14.0 0.13.0 0.12.0 0.11.0 0.10.2 0.9.0 0.8.1 0.7.1 0.6.0 0.5.0 0.4.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.


<br />

Service for managing
[Environments](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Environment "Google::Cloud::Dialogflow::CX::V3::Environment (class)").

## Inherits

- Object

## Includes

- [Google::Cloud::Dialogflow::CX::V3::Environments::Paths](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Environments-Paths)

## Methods

### .configure

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

Configure the Environments Client class.


<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Environments-Rest-Client-Configuration "Google::Cloud::Dialogflow::CX::V3::Environments::Rest::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Environments-Rest-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Environments-Rest-Client-Configuration))
**Example**

```ruby
# 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Environments-Rest-Client#Google__Cloud__Dialogflow__CX__V3__Environments__Rest__Client_configure_class_ "Google::Cloud::Dialogflow::CX::V3::Environments::Rest::Client.configure (method)").

<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Environments-Rest-Client-Configuration "Google::Cloud::Dialogflow::CX::V3::Environments::Rest::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Environments-Rest-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Environments-Rest-Client-Configuration))

### #create_environment

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

Creates an [Environment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Environment "Google::Cloud::Dialogflow::CX::V3::Environment (class)") in the
specified [Agent](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Agent "Google::Cloud::Dialogflow::CX::V3::Agent (class)").

This method is a [long-running
operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
The returned `Operation` type has the following method-specific fields:

- `metadata`: An empty [Struct
  message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
- `response`: [Environment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Environment "Google::Cloud::Dialogflow::CX::V3::Environment (class)")
**Overloads**

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

Pass arguments to `create_environment` via a request object, either of type [CreateEnvironmentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-CreateEnvironmentRequest "Google::Cloud::Dialogflow::CX::V3::CreateEnvironmentRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dialogflow::CX::V3::CreateEnvironmentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/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**

- **parent** (::String) --- Required. The [Agent](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Agent "Google::Cloud::Dialogflow::CX::V3::Agent (class)") to create an [Environment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Environment "Google::Cloud::Dialogflow::CX::V3::Environment (class)") for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
- **environment** ([::Google::Cloud::Dialogflow::CX::V3::Environment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Environment), ::Hash) --- Required. The environment to create.
**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.
**Example**

Basic example

```ruby
require "google/cloud/dialogflow/cx/v3"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dialogflow::CX::V3::Environments::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dialogflow::CX::V3::CreateEnvironmentRequest.new

# Call the create_environment method.
result = client.create_environment 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
```

### #delete_environment

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

Deletes the specified
[Environment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Environment "Google::Cloud::Dialogflow::CX::V3::Environment (class)").
**Overloads**

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

Pass arguments to `delete_environment` via a request object, either of type [DeleteEnvironmentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-DeleteEnvironmentRequest "Google::Cloud::Dialogflow::CX::V3::DeleteEnvironmentRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dialogflow::CX::V3::DeleteEnvironmentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Environment "Google::Cloud::Dialogflow::CX::V3::Environment (class)") to delete. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>`.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Protobuf::Empty](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Protobuf-Empty))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Protobuf::Empty](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Protobuf-Empty))
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

```ruby
require "google/cloud/dialogflow/cx/v3"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dialogflow::CX::V3::Environments::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dialogflow::CX::V3::DeleteEnvironmentRequest.new

# Call the delete_environment method.
result = client.delete_environment request

# The returned object is of type Google::Protobuf::Empty.
p result
```

### #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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Environment "Google::Cloud::Dialogflow::CX::V3::Environment (class)").

This method is a [long-running
operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
The returned `Operation` type has the following method-specific fields:

- `metadata`: [DeployFlowMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-DeployFlowMetadata "Google::Cloud::Dialogflow::CX::V3::DeployFlowMetadata (class)")
- `response`: [DeployFlowResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-DeployFlowResponse "Google::Cloud::Dialogflow::CX::V3::DeployFlowResponse (class)")
**Overloads**

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

Pass arguments to `deploy_flow` via a request object, either of type [DeployFlowRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-DeployFlowRequest "Google::Cloud::Dialogflow::CX::V3::DeployFlowRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dialogflow::CX::V3::DeployFlowRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/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/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>`.
- **flow_version** (::String) --- Required. The flow version to deploy. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/versions/<VersionID>`.
**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.
**Example**

Basic example

```ruby
require "google/cloud/dialogflow/cx/v3"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dialogflow::CX::V3::Environments::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dialogflow::CX::V3::DeployFlowRequest.new

# Call the deploy_flow method.
result = client.deploy_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_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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Environment "Google::Cloud::Dialogflow::CX::V3::Environment (class)").
**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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-GetEnvironmentRequest "Google::Cloud::Dialogflow::CX::V3::GetEnvironmentRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dialogflow::CX::V3::GetEnvironmentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Environment "Google::Cloud::Dialogflow::CX::V3::Environment (class)"). Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>`.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::Dialogflow::CX::V3::Environment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Environment))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::Dialogflow::CX::V3::Environment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Environment))
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

```ruby
require "google/cloud/dialogflow/cx/v3"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dialogflow::CX::V3::Environments::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dialogflow::CX::V3::GetEnvironmentRequest.new

# Call the get_environment method.
result = client.get_environment request

# The returned object is of type Google::Cloud::Dialogflow::CX::V3::Environment.
p result
```

### #initialize

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

Create a new Environments REST client object.
**Yields**

- (config) --- Configure the Environments client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Environments-Rest-Client-Configuration))
**Returns**

- ([Client](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Environments-Rest-Client)) --- a new instance of Client
**Example**

```ruby
# 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-ListContinuousTestResultsRequest "Google::Cloud::Dialogflow::CX::V3::ListContinuousTestResultsRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dialogflow::CX::V3::ListContinuousTestResultsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/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/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>`.
- **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**

- **result** (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::Dialogflow::CX::V3::ContinuousTestResult](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-ContinuousTestResult)\>)
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::Dialogflow::CX::V3::ContinuousTestResult](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-ContinuousTestResult)\>)
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

```ruby
require "google/cloud/dialogflow/cx/v3"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dialogflow::CX::V3::Environments::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dialogflow::CX::V3::ListContinuousTestResultsRequest.new

# Call the list_continuous_test_results method.
result = client.list_continuous_test_results 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::ContinuousTestResult.
  p item
end
```

### #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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Agent "Google::Cloud::Dialogflow::CX::V3::Agent (class)").
**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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-ListEnvironmentsRequest "Google::Cloud::Dialogflow::CX::V3::ListEnvironmentsRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dialogflow::CX::V3::ListEnvironmentsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Agent "Google::Cloud::Dialogflow::CX::V3::Agent (class)") to list all environments for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
- **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**

- **result** (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::Dialogflow::CX::V3::Environment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Environment)\>)
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::Dialogflow::CX::V3::Environment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Environment)\>)
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

```ruby
require "google/cloud/dialogflow/cx/v3"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dialogflow::CX::V3::Environments::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dialogflow::CX::V3::ListEnvironmentsRequest.new

# Call the list_environments method.
result = client.list_environments 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::Environment.
  p item
end
```

### #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)

### #logger

    def logger() -> Logger

The logger used for request/response debug logging.
**Returns**

- (Logger)

### #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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Environment "Google::Cloud::Dialogflow::CX::V3::Environment (class)").
**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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-LookupEnvironmentHistoryRequest "Google::Cloud::Dialogflow::CX::V3::LookupEnvironmentHistoryRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dialogflow::CX::V3::LookupEnvironmentHistoryRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/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/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>`.
- **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**

- **result** (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::Dialogflow::CX::V3::Environment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Environment)\>)
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::Dialogflow::CX::V3::Environment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Environment)\>)
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

```ruby
require "google/cloud/dialogflow/cx/v3"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dialogflow::CX::V3::Environments::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dialogflow::CX::V3::LookupEnvironmentHistoryRequest.new

# Call the lookup_environment_history method.
result = client.lookup_environment_history 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::Environment.
  p item
end
```

### #operations_client

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

Get the associated client for long-running operations.
**Returns**

- ([::Google::Cloud::Dialogflow::CX::V3::Environments::Rest::Operations](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Environments-Rest-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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Environment "Google::Cloud::Dialogflow::CX::V3::Environment (class)").

This method is a [long-running
operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
The returned `Operation` type has the following method-specific fields:

- `metadata`: [RunContinuousTestMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-RunContinuousTestMetadata "Google::Cloud::Dialogflow::CX::V3::RunContinuousTestMetadata (class)")
- `response`: [RunContinuousTestResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-RunContinuousTestResponse "Google::Cloud::Dialogflow::CX::V3::RunContinuousTestResponse (class)")
**Overloads**

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

Pass arguments to `run_continuous_test` via a request object, either of type [RunContinuousTestRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-RunContinuousTestRequest "Google::Cloud::Dialogflow::CX::V3::RunContinuousTestRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dialogflow::CX::V3::RunContinuousTestRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/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/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>`.
**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.
**Example**

Basic example

```ruby
require "google/cloud/dialogflow/cx/v3"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dialogflow::CX::V3::Environments::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dialogflow::CX::V3::RunContinuousTestRequest.new

# Call the run_continuous_test method.
result = client.run_continuous_test 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
```

### #universe_domain

    def universe_domain() -> String

The effective universe domain
**Returns**

- (String)

### #update_environment

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

Updates the specified
[Environment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Environment "Google::Cloud::Dialogflow::CX::V3::Environment (class)").

This method is a [long-running
operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
The returned `Operation` type has the following method-specific fields:

- `metadata`: An empty [Struct
  message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
- `response`: [Environment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Environment "Google::Cloud::Dialogflow::CX::V3::Environment (class)")
**Overloads**

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

Pass arguments to `update_environment` via a request object, either of type [UpdateEnvironmentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-UpdateEnvironmentRequest "Google::Cloud::Dialogflow::CX::V3::UpdateEnvironmentRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dialogflow::CX::V3::UpdateEnvironmentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/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**

- **environment** ([::Google::Cloud::Dialogflow::CX::V3::Environment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Environment), ::Hash) --- Required. The environment to update.
- **update_mask** ([::Google::Protobuf::FieldMask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Protobuf-FieldMask), ::Hash) --- Required. The mask to control which fields get updated.
**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.
**Example**

Basic example

```ruby
require "google/cloud/dialogflow/cx/v3"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dialogflow::CX::V3::Environments::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dialogflow::CX::V3::UpdateEnvironmentRequest.new

# Call the update_environment method.
result = client.update_environment 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
```