Class: AWSCDK::Wisdom::CfnMessageTemplateProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
wisdom/cfn_message_template_props.rb

Overview

Properties for defining a CfnMessageTemplate.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(channel_subtype:, content:, knowledge_base_arn:, name:, default_attributes: nil, description: nil, grouping_configuration: nil, language: nil, message_template_attachments: nil, tags: nil) ⇒ CfnMessageTemplateProps

Returns a new instance of CfnMessageTemplateProps.

Parameters:



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'wisdom/cfn_message_template_props.rb', line 19

def initialize(channel_subtype:, content:, knowledge_base_arn:, name:, default_attributes: nil, description: nil, grouping_configuration: nil, language: nil, message_template_attachments: nil, tags: nil)
  @channel_subtype = channel_subtype
  Jsii::Type.check_type(@channel_subtype, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "channelSubtype")
  @content = content.is_a?(Hash) ? ::AWSCDK::Wisdom::CfnMessageTemplate::ContentProperty.new(**content.transform_keys(&:to_sym)) : content
  Jsii::Type.check_type(@content, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c193aXNkb20uQ2ZuTWVzc2FnZVRlbXBsYXRlLkNvbnRlbnRQcm9wZXJ0eSJ9XX19")), "content")
  @knowledge_base_arn = knowledge_base_arn
  Jsii::Type.check_type(@knowledge_base_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "knowledgeBaseArn")
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @default_attributes = default_attributes.is_a?(Hash) ? ::AWSCDK::Wisdom::CfnMessageTemplate::MessageTemplateAttributesProperty.new(**default_attributes.transform_keys(&:to_sym)) : default_attributes
  Jsii::Type.check_type(@default_attributes, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c193aXNkb20uQ2ZuTWVzc2FnZVRlbXBsYXRlLk1lc3NhZ2VUZW1wbGF0ZUF0dHJpYnV0ZXNQcm9wZXJ0eSJ9XX19")), "defaultAttributes") unless @default_attributes.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @grouping_configuration = grouping_configuration.is_a?(Hash) ? ::AWSCDK::Wisdom::CfnMessageTemplate::GroupingConfigurationProperty.new(**grouping_configuration.transform_keys(&:to_sym)) : grouping_configuration
  Jsii::Type.check_type(@grouping_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c193aXNkb20uQ2ZuTWVzc2FnZVRlbXBsYXRlLkdyb3VwaW5nQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "groupingConfiguration") unless @grouping_configuration.nil?
  @language = language
  Jsii::Type.check_type(@language, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "language") unless @language.nil?
  @message_template_attachments = message_template_attachments
  Jsii::Type.check_type(@message_template_attachments, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfd2lzZG9tLkNmbk1lc3NhZ2VUZW1wbGF0ZS5NZXNzYWdlVGVtcGxhdGVBdHRhY2htZW50UHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "messageTemplateAttachments") unless @message_template_attachments.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#channel_subtypeString (readonly)

The channel subtype this message template applies to.



46
47
48
# File 'wisdom/cfn_message_template_props.rb', line 46

def channel_subtype
  @channel_subtype
end

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

An object that specifies the default values to use for variables in the message template.

This object contains different categories of key-value pairs. Each key defines a variable or placeholder in the message template. The corresponding value defines the default value for that variable.



68
69
70
# File 'wisdom/cfn_message_template_props.rb', line 68

def default_attributes
  @default_attributes
end

#descriptionString? (readonly)

The description of the message template.



73
74
75
# File 'wisdom/cfn_message_template_props.rb', line 73

def description
  @description
end

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

The configuration information of the external data source.



78
79
80
# File 'wisdom/cfn_message_template_props.rb', line 78

def grouping_configuration
  @grouping_configuration
end

#knowledge_base_arnString (readonly)

The Amazon Resource Name (ARN) of the knowledge base.



56
57
58
# File 'wisdom/cfn_message_template_props.rb', line 56

def knowledge_base_arn
  @knowledge_base_arn
end

#languageString? (readonly)

The language code value for the language in which the quick response is written.

The supported language codes include de_DE , en_US , es_ES , fr_FR , id_ID , it_IT , ja_JP , ko_KR , pt_BR , zh_CN , zh_TW



85
86
87
# File 'wisdom/cfn_message_template_props.rb', line 85

def language
  @language
end

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

List of message template attachments.



90
91
92
# File 'wisdom/cfn_message_template_props.rb', line 90

def message_template_attachments
  @message_template_attachments
end

#nameString (readonly)

The name of the message template.



61
62
63
# File 'wisdom/cfn_message_template_props.rb', line 61

def name
  @name
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

The tags used to organize, track, or control access for this resource.



95
96
97
# File 'wisdom/cfn_message_template_props.rb', line 95

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'wisdom/cfn_message_template_props.rb', line 97

def self.jsii_properties
  {
    :channel_subtype => "channelSubtype",
    :content => "content",
    :knowledge_base_arn => "knowledgeBaseArn",
    :name => "name",
    :default_attributes => "defaultAttributes",
    :description => "description",
    :grouping_configuration => "groupingConfiguration",
    :language => "language",
    :message_template_attachments => "messageTemplateAttachments",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# File 'wisdom/cfn_message_template_props.rb', line 112

def to_jsii
  result = {}
  result.merge!({
    "channelSubtype" => @channel_subtype,
    "content" => @content,
    "knowledgeBaseArn" => @knowledge_base_arn,
    "name" => @name,
    "defaultAttributes" => @default_attributes,
    "description" => @description,
    "groupingConfiguration" => @grouping_configuration,
    "language" => @language,
    "messageTemplateAttachments" => @message_template_attachments,
    "tags" => @tags,
  })
  result.compact
end