Class: AWSCDK::Chatbot::CfnCustomAction::CustomActionAttachmentProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Chatbot::CfnCustomAction::CustomActionAttachmentProperty
- Defined in:
- chatbot/cfn_custom_action.rb
Overview
AWS Chatbot is now . Learn more > >
Typeattribute values remain unchanged.
Defines when a custom action button should be attached to a notification.
Instance Attribute Summary collapse
-
#button_text ⇒ String?
readonly
The text of the button that appears on the notification.
-
#criteria ⇒ AWSCDK::IResolvable, ...
readonly
The criteria for when a button should be shown based on values in the notification.
-
#notification_type ⇒ String?
readonly
The type of notification that the custom action should be attached to.
-
#variables ⇒ AWSCDK::IResolvable, ...
readonly
The variables to extract from the notification.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(button_text: nil, criteria: nil, notification_type: nil, variables: nil) ⇒ CustomActionAttachmentProperty
constructor
A new instance of CustomActionAttachmentProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(button_text: nil, criteria: nil, notification_type: nil, variables: nil) ⇒ CustomActionAttachmentProperty
Returns a new instance of CustomActionAttachmentProperty.
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 = 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_text ⇒ String? (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 end |
#criteria ⇒ AWSCDK::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_type ⇒ String? (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 |
#variables ⇒ AWSCDK::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_properties ⇒ Object
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_jsii ⇒ Object
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 |