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::ConfigurationConfigure the Playbooks Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# 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::ConfigurationConfigure 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.
- (config) — Configure the Client client.
- config (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::PlaybookCreates a playbook in a specified agent.
def create_playbook(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::Playbookcreate_playbook via a request object, either of type
CreatePlaybookRequest or an equivalent Hash.
- 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::Playbookcreate_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).
-
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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dialogflow::CX::V3::Playbook)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::PlaybookVersionCreates a version for the specified Playbook.
def create_playbook_version(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::PlaybookVersioncreate_playbook_version via a request object, either of type
CreatePlaybookVersionRequest or an equivalent Hash.
- 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::PlaybookVersioncreate_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).
-
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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dialogflow::CX::V3::PlaybookVersion)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::EmptyDeletes a specified playbook.
def delete_playbook(request, options = nil) -> ::Google::Protobuf::Emptydelete_playbook via a request object, either of type
DeletePlaybookRequest or an equivalent Hash.
- 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::Emptydelete_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).
-
name (::String) — Required. The name of the playbook to delete.
Format:
projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::EmptyDeletes the specified version of the Playbook.
def delete_playbook_version(request, options = nil) -> ::Google::Protobuf::Emptydelete_playbook_version via a request object, either of type
DeletePlaybookVersionRequest or an equivalent Hash.
- 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::Emptydelete_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).
-
name (::String) — Required. The name of the playbook version to delete.
Format:
projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::OperationExports the specified playbook to a binary file.
Note that resources (e.g. examples, tools) that the playbook references will also be exported.
def export_playbook(request, options = nil) -> ::Gapic::Operationexport_playbook via a request object, either of type
ExportPlaybookRequest or an equivalent Hash.
- 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::Operationexport_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).
-
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,
BLOBis assumed.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::PlaybookRetrieves the specified Playbook.
def get_playbook(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::Playbookget_playbook via a request object, either of type
GetPlaybookRequest or an equivalent Hash.
- 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::Playbookget_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).
-
name (::String) — Required. The name of the playbook.
Format:
projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dialogflow::CX::V3::Playbook)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::PlaybookVersionRetrieves the specified version of the Playbook.
def get_playbook_version(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::PlaybookVersionget_playbook_version via a request object, either of type
GetPlaybookVersionRequest or an equivalent Hash.
- 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::PlaybookVersionget_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).
-
name (::String) — Required. The name of the playbook version.
Format:
projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dialogflow::CX::V3::PlaybookVersion)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::OperationImports the specified playbook to the specified agent from a binary file.
def import_playbook(request, options = nil) -> ::Gapic::Operationimport_playbook via a request object, either of type
ImportPlaybookRequest or an equivalent Hash.
- 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::Operationimport_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).
-
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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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| ... } -> ClientCreate a new Playbooks REST client object.
- (config) — Configure the Playbooks client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# 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.
def list_playbook_versions(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::PlaybookVersion>list_playbook_versions via a request object, either of type
ListPlaybookVersionsRequest or an equivalent Hash.
- 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>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).
-
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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::PlaybookVersion>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::PlaybookVersion>)
- (::Google::Cloud::Error) — if the REST call is aborted.
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.
def list_playbooks(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Playbook>list_playbooks via a request object, either of type
ListPlaybooksRequest or an equivalent Hash.
- 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>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).
-
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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Playbook>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Playbook>)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::ClientGet the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Rest::Client)
#logger
def logger() -> LoggerThe logger used for request/response debug logging.
- (Logger)
#operations_client
def operations_client() -> ::Google::Cloud::Dialogflow::CX::V3::Playbooks::Rest::OperationsGet 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::RestorePlaybookVersionResponseRetrieves the specified version of the Playbook and stores it as the current playbook draft, returning the playbook with resources updated.
def restore_playbook_version(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::RestorePlaybookVersionResponserestore_playbook_version via a request object, either of type
RestorePlaybookVersionRequest or an equivalent Hash.
- 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::RestorePlaybookVersionResponserestore_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).
-
name (::String) — Required. The name of the playbook version.
Format:
projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/versions/<VersionID>.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dialogflow::CX::V3::RestorePlaybookVersionResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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() -> StringThe effective universe domain
- (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::PlaybookUpdates the specified Playbook.
def update_playbook(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::Playbookupdate_playbook via a request object, either of type
UpdatePlaybookRequest or an equivalent Hash.
- 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::Playbookupdate_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).
- playbook (::Google::Cloud::Dialogflow::CX::V3::Playbook, ::Hash) — Required. The playbook to update.
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — The mask to control which fields get updated. If the mask is not present, all fields will be updated.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dialogflow::CX::V3::Playbook)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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