# Dialogflow CX V3 API - Class Google::Cloud::Dialogflow::CX::V3::Versions::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::Versions::Client.

Client for the Versions service.


<br />

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

## Inherits

- Object

## Includes

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

## Methods

### .configure

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

Configure the Versions Client class.


<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Versions-Client-Configuration "Google::Cloud::Dialogflow::CX::V3::Versions::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-Versions-Client-Configuration))
**Returns**

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

```ruby
# Modify the configuration for all Versions clients
::Google::Cloud::Dialogflow::CX::V3::Versions::Client.configure do |config|
  config.timeout = 10.0
end
```

### #compare_versions

    def compare_versions(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::CompareVersionsResponse
    def compare_versions(base_version: nil, target_version: nil, language_code: nil) -> ::Google::Cloud::Dialogflow::CX::V3::CompareVersionsResponse

Compares the specified base version with target version.
**Overloads**

    def compare_versions(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::CompareVersionsResponse

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

- **request** ([::Google::Cloud::Dialogflow::CX::V3::CompareVersionsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-CompareVersionsRequest), ::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 compare_versions(base_version: nil, target_version: nil, language_code: nil) -> ::Google::Cloud::Dialogflow::CX::V3::CompareVersionsResponse

Pass arguments to `compare_versions` 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**

- **base_version** (::String) --- Required. Name of the base flow version to compare with the target version. Use version ID `0` to indicate the draft version of the specified flow.


  Format:
  `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/versions/<VersionID>`.
- **target_version** (::String) --- Required. Name of the target flow version to compare with the base version. Use version ID `0` to indicate the draft version of the specified flow. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/versions/<VersionID>`.
- **language_code** (::String) --- The language to compare the flow versions for.


  If not specified, the agent's default language is used.
  [Many
  languages](https://cloud.google.com/dialogflow/docs/reference/language) are
  supported. Note: languages must be enabled in the agent before they can be
  used.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::Dialogflow::CX::V3::CompareVersionsResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-CompareVersionsResponse))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

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

- (::Google::Cloud::Error) --- if the RPC 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::Versions::Client.new

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

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

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

### #configure

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

Configure the Versions 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-Versions-Client#Google__Cloud__Dialogflow__CX__V3__Versions__Client_configure_class_ "Google::Cloud::Dialogflow::CX::V3::Versions::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-Versions-Client-Configuration "Google::Cloud::Dialogflow::CX::V3::Versions::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-Versions-Client-Configuration))
**Returns**

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

### #create_version

    def create_version(request, options = nil) -> ::Gapic::Operation
    def create_version(parent: nil, version: nil) -> ::Gapic::Operation

Creates a [Version](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Version "Google::Cloud::Dialogflow::CX::V3::Version (class)") in the specified
[Flow](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Flow "Google::Cloud::Dialogflow::CX::V3::Flow (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`: [CreateVersionOperationMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-CreateVersionOperationMetadata "Google::Cloud::Dialogflow::CX::V3::CreateVersionOperationMetadata (class)")
- `response`: [Version](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Version "Google::Cloud::Dialogflow::CX::V3::Version (class)")
**Overloads**

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

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

- **request** ([::Google::Cloud::Dialogflow::CX::V3::CreateVersionRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-CreateVersionRequest), ::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_version(parent: nil, version: nil) -> ::Gapic::Operation

Pass arguments to `create_version` 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 [Flow](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Flow "Google::Cloud::Dialogflow::CX::V3::Flow (class)") to create an [Version](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Version "Google::Cloud::Dialogflow::CX::V3::Version (class)") for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`.
- **version** ([::Google::Cloud::Dialogflow::CX::V3::Version](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Version), ::Hash) --- Required. The version to create.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::Operation)
**Raises**

- (::Google::Cloud::Error) --- if the RPC 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::Versions::Client.new

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

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

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

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

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

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

- **request** ([::Google::Cloud::Dialogflow::CX::V3::DeleteVersionRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-DeleteVersionRequest), ::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_version(name: nil) -> ::Google::Protobuf::Empty

Pass arguments to `delete_version` 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 [Version](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Version "Google::Cloud::Dialogflow::CX::V3::Version (class)") to delete. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/versions/<VersionID>`.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Protobuf::Empty](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Protobuf-Empty))
- **operation** (::GRPC::ActiveCall::Operation)
**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 RPC 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::Versions::Client.new

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

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

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

### #get_version

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

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

    def get_version(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::Version

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

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

Pass arguments to `get_version` 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 [Version](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Version "Google::Cloud::Dialogflow::CX::V3::Version (class)"). Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/versions/<VersionID>`.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::Dialogflow::CX::V3::Version](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Version))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

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

- (::Google::Cloud::Error) --- if the RPC 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::Versions::Client.new

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

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

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

### #initialize

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

Create a new Versions client object.
**Yields**

- (config) --- Configure the Versions 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-Versions-Client-Configuration))
**Returns**

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

```ruby
# Create a client using the default configuration
client = ::Google::Cloud::Dialogflow::CX::V3::Versions::Client.new

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

### #list_versions

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

Returns the list of all versions in the specified
[Flow](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Flow "Google::Cloud::Dialogflow::CX::V3::Flow (class)").
**Overloads**

    def list_versions(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Version>

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

- **request** ([::Google::Cloud::Dialogflow::CX::V3::ListVersionsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-ListVersionsRequest), ::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_versions(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Version>

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

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::PagedEnumerable\<[::Google::Cloud::Dialogflow::CX::V3::Version](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Version)\>)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

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

- (::Google::Cloud::Error) --- if the RPC 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::Versions::Client.new

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

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

### #load_version

    def load_version(request, options = nil) -> ::Gapic::Operation
    def load_version(name: nil, allow_override_agent_resources: nil) -> ::Gapic::Operation

Loads resources in the specified version to the draft flow.

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`: An [Empty
  message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
**Overloads**

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

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

- **request** ([::Google::Cloud::Dialogflow::CX::V3::LoadVersionRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-LoadVersionRequest), ::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 load_version(name: nil, allow_override_agent_resources: nil) -> ::Gapic::Operation

Pass arguments to `load_version` 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. The [Version](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Version "Google::Cloud::Dialogflow::CX::V3::Version (class)") to be loaded to draft flow. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/versions/<VersionID>`.
- **allow_override_agent_resources** (::Boolean) --- This field is used to prevent accidental overwrite of other agent resources, which can potentially impact other flow's behavior. If `allow_override_agent_resources` is false, conflicted agent-level resources will not be overridden (i.e. intents, entities, webhooks).
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::Operation)
**Raises**

- (::Google::Cloud::Error) --- if the RPC 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::Versions::Client.new

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

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

### #location_client

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

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

- (Google::Cloud::Location::Locations::Client)

### #logger

    def logger() -> Logger

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

- (Logger)

### #operations_client

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

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

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

### #universe_domain

    def universe_domain() -> String

The effective universe domain
**Returns**

- (String)

### #update_version

    def update_version(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::Version
    def update_version(version: nil, update_mask: nil) -> ::Google::Cloud::Dialogflow::CX::V3::Version

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

    def update_version(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::Version

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

- **request** ([::Google::Cloud::Dialogflow::CX::V3::UpdateVersionRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-UpdateVersionRequest), ::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_version(version: nil, update_mask: nil) -> ::Google::Cloud::Dialogflow::CX::V3::Version

Pass arguments to `update_version` 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**

- **version** ([::Google::Cloud::Dialogflow::CX::V3::Version](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Version), ::Hash) --- Required. The version 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. Currently only `description` and `display_name` can be updated.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::Dialogflow::CX::V3::Version](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Version))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

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

- (::Google::Cloud::Error) --- if the RPC 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::Versions::Client.new

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

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

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