Reference documentation and code samples for the Dialogflow CX V3 API class Google::Cloud::Dialogflow::CX::V3::Pages::Rest::Client.
REST client for the Pages service.
Service for managing Pages.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all Pages clients ::Google::Cloud::Dialogflow::CX::V3::Pages::Rest::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the Pages 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_page
def create_page(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::Page
def create_page(parent: nil, page: nil, language_code: nil) -> ::Google::Cloud::Dialogflow::CX::V3::Page
Creates a page in the specified flow.
Note: You should always train a flow prior to sending it queries. See the training documentation.
def create_page(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::Page
create_page
via a request object, either of type
CreatePageRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::CX::V3::CreatePageRequest, ::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_page(parent: nil, page: nil, language_code: nil) -> ::Google::Cloud::Dialogflow::CX::V3::Page
create_page
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 flow to create a page for.
Format:
projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>
. - page (::Google::Cloud::Dialogflow::CX::V3::Page, ::Hash) — Required. The page to create.
-
language_code (::String) — The language of the following fields in
page
:-
Page.entry_fulfillment.messages
-
Page.entry_fulfillment.conditional_cases
-
Page.event_handlers.trigger_fulfillment.messages
-
Page.event_handlers.trigger_fulfillment.conditional_cases
-
Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages
*Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases
-
Page.form.parameters.fill_behavior.reprompt_event_handlers.messages
*Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases
-
Page.transition_routes.trigger_fulfillment.messages
-
Page.transition_routes.trigger_fulfillment.conditional_cases
If not specified, the agent's default language is used. Many languages are supported. Note: languages must be enabled in the agent before they can be used.
-
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dialogflow::CX::V3::Page)
- 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::Pages::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::CX::V3::CreatePageRequest.new # Call the create_page method. result = client.create_page request # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Page. p result
#delete_page
def delete_page(request, options = nil) -> ::Google::Protobuf::Empty
def delete_page(name: nil, force: nil) -> ::Google::Protobuf::Empty
Deletes the specified page.
Note: You should always train a flow prior to sending it queries. See the training documentation.
def delete_page(request, options = nil) -> ::Google::Protobuf::Empty
delete_page
via a request object, either of type
DeletePageRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::CX::V3::DeletePageRequest, ::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_page(name: nil, force: nil) -> ::Google::Protobuf::Empty
delete_page
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 page to delete.
Format:
projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/Flows/<flowID>/pages/<PageID>
. -
force (::Boolean) —
This field has no effect for pages with no incoming transitions. For pages with incoming transitions:
- If
force
is set to false, an error will be returned with message indicating the incoming transitions. - If
force
is set to true, Dialogflow will remove the page, as well as any transitions to the page (i.e. [Target page][EventHandler.target_page] in event handlers or [Target page][TransitionRoute.target_page] in transition routes that point to this page will be cleared).
- If
- (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::Pages::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::CX::V3::DeletePageRequest.new # Call the delete_page method. result = client.delete_page request # The returned object is of type Google::Protobuf::Empty. p result
#get_page
def get_page(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::Page
def get_page(name: nil, language_code: nil) -> ::Google::Cloud::Dialogflow::CX::V3::Page
Retrieves the specified page.
def get_page(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::Page
get_page
via a request object, either of type
GetPageRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::CX::V3::GetPageRequest, ::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_page(name: nil, language_code: nil) -> ::Google::Cloud::Dialogflow::CX::V3::Page
get_page
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 page.
Format:
projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/pages/<PageID>
. -
language_code (::String) — The language to retrieve the page for. The following fields are language
dependent:
-
Page.entry_fulfillment.messages
-
Page.entry_fulfillment.conditional_cases
-
Page.event_handlers.trigger_fulfillment.messages
-
Page.event_handlers.trigger_fulfillment.conditional_cases
-
Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages
*Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases
-
Page.form.parameters.fill_behavior.reprompt_event_handlers.messages
*Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases
-
Page.transition_routes.trigger_fulfillment.messages
-
Page.transition_routes.trigger_fulfillment.conditional_cases
If not specified, the agent's default language is used. Many languages are supported. Note: languages must be enabled in the agent before they can be used.
-
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dialogflow::CX::V3::Page)
- 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::Pages::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::CX::V3::GetPageRequest.new # Call the get_page method. result = client.get_page request # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Page. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new Pages REST client object.
- (config) — Configure the Pages client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Dialogflow::CX::V3::Pages::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Dialogflow::CX::V3::Pages::Rest::Client.new do |config| config.timeout = 10.0 end
#list_pages
def list_pages(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Page>
def list_pages(parent: nil, language_code: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Page>
Returns the list of all pages in the specified flow.
def list_pages(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Page>
list_pages
via a request object, either of type
ListPagesRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::CX::V3::ListPagesRequest, ::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_pages(parent: nil, language_code: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Page>
list_pages
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 flow to list all pages for.
Format:
projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>
. -
language_code (::String) — The language to list pages for. The following fields are language
dependent:
-
Page.entry_fulfillment.messages
-
Page.entry_fulfillment.conditional_cases
-
Page.event_handlers.trigger_fulfillment.messages
-
Page.event_handlers.trigger_fulfillment.conditional_cases
-
Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages
*Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases
-
Page.form.parameters.fill_behavior.reprompt_event_handlers.messages
*Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases
-
Page.transition_routes.trigger_fulfillment.messages
-
Page.transition_routes.trigger_fulfillment.conditional_cases
If not specified, the agent's default language is used. Many languages are supported. Note: languages must be enabled in the agent before they can be used.
-
- 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::Page>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Page>)
- (::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::Pages::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::CX::V3::ListPagesRequest.new # Call the list_pages method. result = client.list_pages 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::Page. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Rest::Client
Get the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Rest::Client)
#logger
def logger() -> Logger
The logger used for request/response debug logging.
- (Logger)
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)
#update_page
def update_page(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::Page
def update_page(page: nil, language_code: nil, update_mask: nil) -> ::Google::Cloud::Dialogflow::CX::V3::Page
Updates the specified page.
Note: You should always train a flow prior to sending it queries. See the training documentation.
def update_page(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::Page
update_page
via a request object, either of type
UpdatePageRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::CX::V3::UpdatePageRequest, ::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_page(page: nil, language_code: nil, update_mask: nil) -> ::Google::Cloud::Dialogflow::CX::V3::Page
update_page
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).
- page (::Google::Cloud::Dialogflow::CX::V3::Page, ::Hash) — Required. The page to update.
-
language_code (::String) — The language of the following fields in
page
:-
Page.entry_fulfillment.messages
-
Page.entry_fulfillment.conditional_cases
-
Page.event_handlers.trigger_fulfillment.messages
-
Page.event_handlers.trigger_fulfillment.conditional_cases
-
Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages
*Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases
-
Page.form.parameters.fill_behavior.reprompt_event_handlers.messages
*Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases
-
Page.transition_routes.trigger_fulfillment.messages
-
Page.transition_routes.trigger_fulfillment.conditional_cases
If not specified, the agent's default language is used. Many languages are supported. Note: languages must be enabled in the agent before they can be used.
-
- 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::Page)
- 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::Pages::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::CX::V3::UpdatePageRequest.new # Call the update_page method. result = client.update_page request # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Page. p result