Dialogflow CX V3 API - Class Google::Cloud::Dialogflow::CX::V3::Playbooks::Rest::Client (v1.11.0)

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

REST client for the Playbooks service.

Service for managing Playbooks.

Inherits

  • Object

Methods

.configure

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

Configure the Playbooks Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all Playbooks clients
::Google::Cloud::Dialogflow::CX::V3::Playbooks::Rest::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.

See Configuration for a description of the configuration fields.

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

#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 or an equivalent Hash.
Parameters
  • request (::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, ::Hash) — Required. The playbook to create.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

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

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dialogflow::CX::V3::Playbooks::Rest::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 or an equivalent Hash.
Parameters
  • request (::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, ::Hash) — Required. The playbook version to create.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

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

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dialogflow::CX::V3::Playbooks::Rest::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 or an equivalent Hash.
Parameters
  • request (::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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

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

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dialogflow::CX::V3::Playbooks::Rest::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 or an equivalent Hash.
Parameters
  • request (::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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

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

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dialogflow::CX::V3::Playbooks::Rest::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.

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 or an equivalent Hash.
Parameters
  • request (::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 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.

  • data_format (::Google::Cloud::Dialogflow::CX::V3::ExportPlaybookRequest::DataFormat) — Optional. The data format of the exported agent. If not specified, BLOB is assumed.
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

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::Rest::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 or an equivalent Hash.
Parameters
  • request (::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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

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

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dialogflow::CX::V3::Playbooks::Rest::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 or an equivalent Hash.
Parameters
  • request (::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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

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

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dialogflow::CX::V3::Playbooks::Rest::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 or an equivalent Hash.
Parameters
  • request (::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.

    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, ::Hash) — Optional. Specifies the import strategy used when resolving resource conflicts.
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

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::Rest::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 REST client object.

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

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

#list_playbook_versions

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

Lists versions for the specified Playbook.

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

Basic example

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

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dialogflow::CX::V3::Playbooks::Rest::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::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Playbook>
def list_playbooks(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Playbook>

Returns a list of playbooks in the specified agent.

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

Basic example

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

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dialogflow::CX::V3::Playbooks::Rest::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::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)

#operations_client

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

Get the associated client for long-running 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 or an equivalent Hash.
Parameters
  • request (::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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

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

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dialogflow::CX::V3::Playbooks::Rest::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 or an equivalent Hash.
Parameters
  • request (::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
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

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

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dialogflow::CX::V3::Playbooks::Rest::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