Class: AWSCDK::Wisdom::CfnAIGuardrail::GuardrailTopicConfigProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Wisdom::CfnAIGuardrail::GuardrailTopicConfigProperty
- Defined in:
- wisdom/cfn_ai_guardrail.rb
Overview
Topic configuration in topic policy.
Instance Attribute Summary collapse
-
#definition ⇒ String
readonly
Definition of topic in topic policy.
-
#examples ⇒ Array<String>?
readonly
Text example in topic policy.
-
#name ⇒ String
readonly
Name of topic in topic policy.
-
#type ⇒ String
readonly
Type of topic in a policy.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(definition:, name:, type:, examples: nil) ⇒ GuardrailTopicConfigProperty
constructor
A new instance of GuardrailTopicConfigProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(definition:, name:, type:, examples: nil) ⇒ GuardrailTopicConfigProperty
Returns a new instance of GuardrailTopicConfigProperty.
1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 |
# File 'wisdom/cfn_ai_guardrail.rb', line 1238 def initialize(definition:, name:, type:, examples: nil) @definition = definition Jsii::Type.check_type(@definition, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "definition") @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") @type = type Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type") @examples = examples Jsii::Type.check_type(@examples, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "examples") unless @examples.nil? end |
Instance Attribute Details
#definition ⇒ String (readonly)
Definition of topic in topic policy.
1253 1254 1255 |
# File 'wisdom/cfn_ai_guardrail.rb', line 1253 def definition @definition end |
#examples ⇒ Array<String>? (readonly)
Text example in topic policy.
1268 1269 1270 |
# File 'wisdom/cfn_ai_guardrail.rb', line 1268 def examples @examples end |
#name ⇒ String (readonly)
Name of topic in topic policy.
1258 1259 1260 |
# File 'wisdom/cfn_ai_guardrail.rb', line 1258 def name @name end |
#type ⇒ String (readonly)
Type of topic in a policy.
1263 1264 1265 |
# File 'wisdom/cfn_ai_guardrail.rb', line 1263 def type @type end |
Class Method Details
.jsii_properties ⇒ Object
1270 1271 1272 1273 1274 1275 1276 1277 |
# File 'wisdom/cfn_ai_guardrail.rb', line 1270 def self.jsii_properties { :definition => "definition", :name => "name", :type => "type", :examples => "examples", } end |
Instance Method Details
#to_jsii ⇒ Object
1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 |
# File 'wisdom/cfn_ai_guardrail.rb', line 1279 def to_jsii result = {} result.merge!({ "definition" => @definition, "name" => @name, "type" => @type, "examples" => @examples, }) result.compact end |