Class: AWSCDK::Chatbot::CfnCustomAction::CustomActionAttachmentProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
chatbot/cfn_custom_action.rb

Overview

AWS Chatbot is now . Learn more > > Type attribute values remain unchanged.

Defines when a custom action button should be attached to a notification.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(button_text: nil, criteria: nil, notification_type: nil, variables: nil) ⇒ CustomActionAttachmentProperty

Returns a new instance of CustomActionAttachmentProperty.

Parameters:



634
635
636
637
638
639
640
641
642
643
# File 'chatbot/cfn_custom_action.rb', line 634

def initialize(button_text: nil, criteria: nil, notification_type: nil, variables: nil)
  @button_text = button_text
  Jsii::Type.check_type(@button_text, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "buttonText") unless @button_text.nil?
  @criteria = criteria
  Jsii::Type.check_type(@criteria, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2hhdGJvdC5DZm5DdXN0b21BY3Rpb24uQ3VzdG9tQWN0aW9uQXR0YWNobWVudENyaXRlcmlhUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "criteria") unless @criteria.nil?
  @notification_type = notification_type
  Jsii::Type.check_type(@notification_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "notificationType") unless @notification_type.nil?
  @variables = variables
  Jsii::Type.check_type(@variables, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsicHJpbWl0aXZlIjoic3RyaW5nIn0sImtpbmQiOiJtYXAifX1dfX0=")), "variables") unless @variables.nil?
end

Instance Attribute Details

#button_textString? (readonly)

The text of the button that appears on the notification.



649
650
651
# File 'chatbot/cfn_custom_action.rb', line 649

def button_text
  @button_text
end

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

The criteria for when a button should be shown based on values in the notification.



654
655
656
# File 'chatbot/cfn_custom_action.rb', line 654

def criteria
  @criteria
end

#notification_typeString? (readonly)

The type of notification that the custom action should be attached to.



659
660
661
# File 'chatbot/cfn_custom_action.rb', line 659

def notification_type
  @notification_type
end

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

The variables to extract from the notification.



664
665
666
# File 'chatbot/cfn_custom_action.rb', line 664

def variables
  @variables
end

Class Method Details

.jsii_propertiesObject



666
667
668
669
670
671
672
673
# File 'chatbot/cfn_custom_action.rb', line 666

def self.jsii_properties
  {
    :button_text => "buttonText",
    :criteria => "criteria",
    :notification_type => "notificationType",
    :variables => "variables",
  }
end

Instance Method Details

#to_jsiiObject



675
676
677
678
679
680
681
682
683
684
# File 'chatbot/cfn_custom_action.rb', line 675

def to_jsii
  result = {}
  result.merge!({
    "buttonText" => @button_text,
    "criteria" => @criteria,
    "notificationType" => @notification_type,
    "variables" => @variables,
  })
  result.compact
end