Class: AWSCDK::Wisdom::CfnAIGuardrail::GuardrailTopicConfigProperty

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

Overview

Topic configuration in topic policy.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(definition:, name:, type:, examples: nil) ⇒ GuardrailTopicConfigProperty

Returns a new instance of GuardrailTopicConfigProperty.

Parameters:

  • definition (String)

    Definition of topic in topic policy.

  • name (String)

    Name of topic in topic policy.

  • type (String)

    Type of topic in a policy.

  • examples (Array<String>, nil) (defaults to: nil)

    Text example in topic policy.



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

#definitionString (readonly)

Definition of topic in topic policy.



1253
1254
1255
# File 'wisdom/cfn_ai_guardrail.rb', line 1253

def definition
  @definition
end

#examplesArray<String>? (readonly)

Text example in topic policy.



1268
1269
1270
# File 'wisdom/cfn_ai_guardrail.rb', line 1268

def examples
  @examples
end

#nameString (readonly)

Name of topic in topic policy.



1258
1259
1260
# File 'wisdom/cfn_ai_guardrail.rb', line 1258

def name
  @name
end

#typeString (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_propertiesObject



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_jsiiObject



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