Class: AWSCDK::Lex::CfnBot::FulfillmentCodeHookSettingProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
lex/cfn_bot.rb

Overview

Determines if a Lambda function should be invoked for a specific intent.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(enabled:, fulfillment_updates_specification: nil, is_active: nil, post_fulfillment_status_specification: nil) ⇒ FulfillmentCodeHookSettingProperty

Returns a new instance of FulfillmentCodeHookSettingProperty.

Parameters:



2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
# File 'lex/cfn_bot.rb', line 2676

def initialize(enabled:, fulfillment_updates_specification: nil, is_active: nil, post_fulfillment_status_specification: nil)
  @enabled = enabled
  Jsii::Type.check_type(@enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enabled")
  @fulfillment_updates_specification = fulfillment_updates_specification.is_a?(Hash) ? ::AWSCDK::Lex::CfnBot::FulfillmentUpdatesSpecificationProperty.new(**fulfillment_updates_specification.transform_keys(&:to_sym)) : fulfillment_updates_specification
  Jsii::Type.check_type(@fulfillment_updates_specification, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sZXguQ2ZuQm90LkZ1bGZpbGxtZW50VXBkYXRlc1NwZWNpZmljYXRpb25Qcm9wZXJ0eSJ9XX19")), "fulfillmentUpdatesSpecification") unless @fulfillment_updates_specification.nil?
  @is_active = is_active
  Jsii::Type.check_type(@is_active, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "isActive") unless @is_active.nil?
  @post_fulfillment_status_specification = post_fulfillment_status_specification.is_a?(Hash) ? ::AWSCDK::Lex::CfnBot::PostFulfillmentStatusSpecificationProperty.new(**post_fulfillment_status_specification.transform_keys(&:to_sym)) : post_fulfillment_status_specification
  Jsii::Type.check_type(@post_fulfillment_status_specification, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sZXguQ2ZuQm90LlBvc3RGdWxmaWxsbWVudFN0YXR1c1NwZWNpZmljYXRpb25Qcm9wZXJ0eSJ9XX19")), "postFulfillmentStatusSpecification") unless @post_fulfillment_status_specification.nil?
end

Instance Attribute Details

#enabledBoolean, AWSCDK::IResolvable (readonly)

Indicates whether a Lambda function should be invoked to fulfill a specific intent.



2691
2692
2693
# File 'lex/cfn_bot.rb', line 2691

def enabled
  @enabled
end

#fulfillment_updates_specificationAWSCDK::IResolvable, ... (readonly)

Provides settings for update messages sent to the user for long-running Lambda fulfillment functions.

Fulfillment updates can be used only with streaming conversations.



2698
2699
2700
# File 'lex/cfn_bot.rb', line 2698

def fulfillment_updates_specification
  @fulfillment_updates_specification
end

#is_activeBoolean, ... (readonly)

Determines whether the fulfillment code hook is used.

When active is false, the code hook doesn't run.



2705
2706
2707
# File 'lex/cfn_bot.rb', line 2705

def is_active
  @is_active
end

#post_fulfillment_status_specificationAWSCDK::IResolvable, ... (readonly)

Provides settings for messages sent to the user for after the Lambda fulfillment function completes.

Post-fulfillment messages can be sent for both streaming and non-streaming conversations.



2712
2713
2714
# File 'lex/cfn_bot.rb', line 2712

def post_fulfillment_status_specification
  @post_fulfillment_status_specification
end

Class Method Details

.jsii_propertiesObject



2714
2715
2716
2717
2718
2719
2720
2721
# File 'lex/cfn_bot.rb', line 2714

def self.jsii_properties
  {
    :enabled => "enabled",
    :fulfillment_updates_specification => "fulfillmentUpdatesSpecification",
    :is_active => "isActive",
    :post_fulfillment_status_specification => "postFulfillmentStatusSpecification",
  }
end

Instance Method Details

#to_jsiiObject



2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
# File 'lex/cfn_bot.rb', line 2723

def to_jsii
  result = {}
  result.merge!({
    "enabled" => @enabled,
    "fulfillmentUpdatesSpecification" => @fulfillment_updates_specification,
    "isActive" => @is_active,
    "postFulfillmentStatusSpecification" => @post_fulfillment_status_specification,
  })
  result.compact
end