Class: Google::Apis::DialogflowV2::GoogleCloudDialogflowCxV3Webhook

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/dialogflow_v2/classes.rb,
lib/google/apis/dialogflow_v2/representations.rb,
lib/google/apis/dialogflow_v2/representations.rb

Overview

Webhooks host the developer's business logic. During a session, webhooks allow the developer to use the data extracted by Dialogflow's natural language processing to generate dynamic responses, validate collected data, or trigger actions on the backend.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowCxV3Webhook

Returns a new instance of GoogleCloudDialogflowCxV3Webhook.



3190
3191
3192
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 3190

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#disabledBoolean Also known as: disabled?

Indicates whether the webhook is disabled. Corresponds to the JSON property disabled

Returns:

  • (Boolean)


3157
3158
3159
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 3157

def disabled
  @disabled
end

#display_nameString

Required. The human-readable name of the webhook, unique within the agent. Corresponds to the JSON property displayName

Returns:

  • (String)


3163
3164
3165
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 3163

def display_name
  @display_name
end

#generic_web_serviceGoogle::Apis::DialogflowV2::GoogleCloudDialogflowCxV3WebhookGenericWebService

Represents configuration for a generic web service. Corresponds to the JSON property genericWebService



3168
3169
3170
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 3168

def generic_web_service
  @generic_web_service
end

#nameString

The unique identifier of the webhook. Required for the Webhooks.UpdateWebhook method. Webhooks.CreateWebhook populates the name automatically. Format: projects//locations//agents//webhooks/. Corresponds to the JSON property name

Returns:

  • (String)


3175
3176
3177
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 3175

def name
  @name
end

#service_directoryGoogle::Apis::DialogflowV2::GoogleCloudDialogflowCxV3WebhookServiceDirectoryConfig

Represents configuration for a Service Directory service. Corresponds to the JSON property serviceDirectory



3181
3182
3183
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 3181

def service_directory
  @service_directory
end

#timeoutString

Webhook execution timeout. Execution is considered failed if Dialogflow doesn' t receive a response from webhook at the end of the timeout period. Defaults to 5 seconds, maximum allowed timeout is 30 seconds. Corresponds to the JSON property timeout

Returns:

  • (String)


3188
3189
3190
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 3188

def timeout
  @timeout
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3195
3196
3197
3198
3199
3200
3201
3202
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 3195

def update!(**args)
  @disabled = args[:disabled] if args.key?(:disabled)
  @display_name = args[:display_name] if args.key?(:display_name)
  @generic_web_service = args[:generic_web_service] if args.key?(:generic_web_service)
  @name = args[:name] if args.key?(:name)
  @service_directory = args[:service_directory] if args.key?(:service_directory)
  @timeout = args[:timeout] if args.key?(:timeout)
end