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

Client for the Playbooks service.


<br />

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

## Inherits

- Object

## Includes

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

## Methods

### .configure

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

Configure the Playbooks Client class.


<br />

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

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

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

### #configure

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

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

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

### #create_playbook

    def create_playbook(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::Playbook
    def create_playbook(parent: nil, playbook: nil) -> ::Google::Cloud::Dialogflow::CX::V3::Playbook

Creates a playbook in a specified agent.
**Overloads**

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

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

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

Pass arguments to `create_playbook` 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 create a playbook for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
- **playbook** ([::Google::Cloud::Dialogflow::CX::V3::Playbook](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Playbook), ::Hash) --- Required. The playbook to create.
**Yields**

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

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

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

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

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

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

### #create_playbook_version

    def create_playbook_version(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::PlaybookVersion
    def create_playbook_version(parent: nil, playbook_version: nil) -> ::Google::Cloud::Dialogflow::CX::V3::PlaybookVersion

Creates a version for the specified Playbook.
**Overloads**

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

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

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

Pass arguments to `create_playbook_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 playbook to create a version for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
- **playbook_version** ([::Google::Cloud::Dialogflow::CX::V3::PlaybookVersion](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-PlaybookVersion), ::Hash) --- Required. The playbook version to create.
**Yields**

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

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

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

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

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

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

### #delete_playbook

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

Deletes a specified playbook.
**Overloads**

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

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

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

Pass arguments to `delete_playbook` 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 playbook to delete. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
**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::Playbooks::Client.new

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

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

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

### #delete_playbook_version

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

Deletes the specified version of the Playbook.
**Overloads**

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

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

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

Pass arguments to `delete_playbook_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 playbook version to delete. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/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::Playbooks::Client.new

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

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

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

### #export_playbook

    def export_playbook(request, options = nil) -> ::Gapic::Operation
    def export_playbook(name: nil, playbook_uri: nil, data_format: nil) -> ::Gapic::Operation

Exports the specified playbook to a binary file.


<br />

Note that resources (e.g. examples, tools) that the playbook
references will also be exported.
**Overloads**

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

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

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

Pass arguments to `export_playbook` 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 name of the playbook to export. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
- **playbook_uri** (::String) --- Optional. The [Google Cloud
  Storage](https://cloud.google.com/storage/docs/) URI to export the playbook to. The format of this URI must be `gs://<bucket-name>/<object-name>`. If left unspecified, the serialized playbook 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](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
- **data_format** ([::Google::Cloud::Dialogflow::CX::V3::ExportPlaybookRequest::DataFormat](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-ExportPlaybookRequest-DataFormat)) --- Optional. The data format of the exported agent. If not specified, `BLOB` is assumed.
**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::Playbooks::Client.new

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

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

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

Retrieves the specified Playbook.
**Overloads**

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

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

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

Pass arguments to `get_playbook` 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 playbook. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
**Yields**

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

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

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

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

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

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

### #get_playbook_version

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

Retrieves the specified version of the Playbook.
**Overloads**

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

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

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

Pass arguments to `get_playbook_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 playbook version. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
**Yields**

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

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

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

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

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

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

### #import_playbook

    def import_playbook(request, options = nil) -> ::Gapic::Operation
    def import_playbook(parent: nil, playbook_uri: nil, playbook_content: nil, import_strategy: nil) -> ::Gapic::Operation

Imports the specified playbook to the specified agent from a binary file.
**Overloads**

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

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

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

Pass arguments to `import_playbook` 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 import the playbook into. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
- **playbook_uri** (::String) --- [Dialogflow access
  control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).


  Note: The following parameters are mutually exclusive: `playbook_uri`, `playbook_content`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one.
- **playbook_content** (::String) --- Uncompressed raw byte content for playbook.


  Note: The following parameters are mutually exclusive: `playbook_content`, `playbook_uri`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one.
- **import_strategy** ([::Google::Cloud::Dialogflow::CX::V3::PlaybookImportStrategy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-PlaybookImportStrategy), ::Hash) --- Optional. Specifies the import strategy used when resolving resource conflicts.
**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::Playbooks::Client.new

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

# Call the import_playbook method.
result = client.import_playbook 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 Playbooks client object.
**Yields**

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

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

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

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

### #list_playbook_versions

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

Lists versions for the specified Playbook.
**Overloads**

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

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

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

Pass arguments to `list_playbook_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 playbook to list versions for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
- **page_size** (::Integer) --- Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.
- **page_token** (::String) --- Optional. 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::PlaybookVersion](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-PlaybookVersion)\>)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::PagedEnumerable\<[::Google::Cloud::Dialogflow::CX::V3::PlaybookVersion](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-PlaybookVersion)\>)
**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::Playbooks::Client.new

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

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

### #list_playbooks

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

Returns a list of playbooks in the specified agent.
**Overloads**

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

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

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

Pass arguments to `list_playbooks` 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 playbooks from. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
- **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**

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

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

- (::Gapic::PagedEnumerable\<[::Google::Cloud::Dialogflow::CX::V3::Playbook](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Playbook)\>)
**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::Playbooks::Client.new

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

# Call the list_playbooks method.
result = client.list_playbooks 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::Playbook.
  p item
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::Playbooks::Operations

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

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

### #restore_playbook_version

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

Retrieves the specified version of the Playbook and stores it as the
current playbook draft, returning the playbook with resources updated.
**Overloads**

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

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

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

Pass arguments to `restore_playbook_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 playbook version. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>`.
**Yields**

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

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

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

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

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

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

### #universe_domain

    def universe_domain() -> String

The effective universe domain
**Returns**

- (String)

### #update_playbook

    def update_playbook(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::Playbook
    def update_playbook(playbook: nil, update_mask: nil) -> ::Google::Cloud::Dialogflow::CX::V3::Playbook

Updates the specified Playbook.
**Overloads**

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

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

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

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

- **playbook** ([::Google::Cloud::Dialogflow::CX::V3::Playbook](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Playbook), ::Hash) --- Required. The playbook 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) --- The mask to control which fields get updated. If the mask is not present, all fields will be updated.
**Yields**

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

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

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

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

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

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