Class: Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Fulfillment

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

Overview

By default, your agent responds to a matched intent with a static response. As an alternative, you can provide a more dynamic response by using fulfillment. When you enable fulfillment for an intent, Dialogflow responds to that intent by calling a service that you define. For example, if an end-user wants to schedule a haircut on Friday, your service can check your database and respond to the end-user with availability information for Friday. For more information, see the fulfillment guide.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowV2Fulfillment

Returns a new instance of GoogleCloudDialogflowV2Fulfillment.



5565
5566
5567
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 5565

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

Instance Attribute Details

#display_nameString

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

Returns:

  • (String)


5536
5537
5538
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 5536

def display_name
  @display_name
end

#enabledBoolean Also known as: enabled?

Optional. Whether fulfillment is enabled. Corresponds to the JSON property enabled

Returns:

  • (Boolean)


5541
5542
5543
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 5541

def enabled
  @enabled
end

#featuresArray<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2FulfillmentFeature>

Optional. The field defines whether the fulfillment is enabled for certain features. Corresponds to the JSON property features



5548
5549
5550
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 5548

def features
  @features
end

#generic_web_serviceGoogle::Apis::DialogflowV2::GoogleCloudDialogflowV2FulfillmentGenericWebService

Represents configuration for a generic web service. Dialogflow supports two mechanisms for authentications: - Basic authentication with username and password. - Authentication with additional authentication headers. More information could be found at: https://cloud.google.com/dialogflow/docs/ fulfillment-configure. Corresponds to the JSON property genericWebService



5557
5558
5559
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 5557

def generic_web_service
  @generic_web_service
end

#nameString

Required. The unique identifier of the fulfillment. Format: projects//agent/ fulfillment. Corresponds to the JSON property name

Returns:

  • (String)


5563
5564
5565
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 5563

def name
  @name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5570
5571
5572
5573
5574
5575
5576
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 5570

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