Reference documentation and code samples for the Dialogflow CX V3 API class Google::Cloud::Dialogflow::CX::V3::Webhooks::Client.
Client for the Webhooks service.
Service for managing Webhooks.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the Webhooks Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all Webhooks clients ::Google::Cloud::Dialogflow::CX::V3::Webhooks::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the Webhooks 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_webhook
def create_webhook(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::Webhook
def create_webhook(parent: nil, webhook: nil) -> ::Google::Cloud::Dialogflow::CX::V3::Webhook
Creates a webhook in the specified agent.
def create_webhook(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::Webhook
create_webhook
via a request object, either of type
CreateWebhookRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::CX::V3::CreateWebhookRequest, ::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_webhook(parent: nil, webhook: nil) -> ::Google::Cloud::Dialogflow::CX::V3::Webhook
create_webhook
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 webhook for.
Format:
projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>
. - webhook (::Google::Cloud::Dialogflow::CX::V3::Webhook, ::Hash) — Required. The webhook to create.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Dialogflow::CX::V3::Webhook)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::Webhooks::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::CX::V3::CreateWebhookRequest.new # Call the create_webhook method. result = client.create_webhook request # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Webhook. p result
#delete_webhook
def delete_webhook(request, options = nil) -> ::Google::Protobuf::Empty
def delete_webhook(name: nil, force: nil) -> ::Google::Protobuf::Empty
Deletes the specified webhook.
def delete_webhook(request, options = nil) -> ::Google::Protobuf::Empty
delete_webhook
via a request object, either of type
DeleteWebhookRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::CX::V3::DeleteWebhookRequest, ::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_webhook(name: nil, force: nil) -> ::Google::Protobuf::Empty
delete_webhook
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 webhook to delete.
Format:
projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/webhooks/<Webhook ID>
. -
force (::Boolean) —
This field has no effect for webhook not being used. For webhooks that are used by pages/flows/transition route groups:
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Protobuf::Empty)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::Webhooks::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::CX::V3::DeleteWebhookRequest.new # Call the delete_webhook method. result = client.delete_webhook request # The returned object is of type Google::Protobuf::Empty. p result
#get_webhook
def get_webhook(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::Webhook
def get_webhook(name: nil) -> ::Google::Cloud::Dialogflow::CX::V3::Webhook
Retrieves the specified webhook.
def get_webhook(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::Webhook
get_webhook
via a request object, either of type
GetWebhookRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::CX::V3::GetWebhookRequest, ::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_webhook(name: nil) -> ::Google::Cloud::Dialogflow::CX::V3::Webhook
get_webhook
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 webhook.
Format:
projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/webhooks/<Webhook ID>
.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Dialogflow::CX::V3::Webhook)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::Webhooks::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::CX::V3::GetWebhookRequest.new # Call the get_webhook method. result = client.get_webhook request # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Webhook. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new Webhooks client object.
- (config) — Configure the Webhooks client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Dialogflow::CX::V3::Webhooks::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Dialogflow::CX::V3::Webhooks::Client.new do |config| config.timeout = 10.0 end
#list_webhooks
def list_webhooks(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Webhook>
def list_webhooks(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Webhook>
Returns the list of all webhooks in the specified agent.
def list_webhooks(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Webhook>
list_webhooks
via a request object, either of type
ListWebhooksRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::CX::V3::ListWebhooksRequest, ::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_webhooks(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Webhook>
list_webhooks
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 all webhooks for.
Format:
projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>
. - 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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Webhook>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Webhook>)
- (::Google::Cloud::Error) — if the RPC 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::Webhooks::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::CX::V3::ListWebhooksRequest.new # Call the list_webhooks method. result = client.list_webhooks 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::Webhook. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Client
Get the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Client)
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)
#update_webhook
def update_webhook(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::Webhook
def update_webhook(webhook: nil, update_mask: nil) -> ::Google::Cloud::Dialogflow::CX::V3::Webhook
Updates the specified webhook.
def update_webhook(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::Webhook
update_webhook
via a request object, either of type
UpdateWebhookRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::CX::V3::UpdateWebhookRequest, ::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_webhook(webhook: nil, update_mask: nil) -> ::Google::Cloud::Dialogflow::CX::V3::Webhook
update_webhook
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).
- webhook (::Google::Cloud::Dialogflow::CX::V3::Webhook, ::Hash) — Required. The webhook 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.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Dialogflow::CX::V3::Webhook)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::Webhooks::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::CX::V3::UpdateWebhookRequest.new # Call the update_webhook method. result = client.update_webhook request # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Webhook. p result