Class: AWSCDK::EventSchemas::CfnSchemaProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EventSchemas::CfnSchemaProps
- Defined in:
- event_schemas/cfn_schema_props.rb
Overview
Properties for defining a CfnSchema.
Instance Attribute Summary collapse
-
#content ⇒ String
readonly
The source of the schema definition.
-
#description ⇒ String?
readonly
A description of the schema.
-
#registry_name ⇒ String
readonly
The name of the schema registry.
-
#schema_name ⇒ String?
readonly
The name of the schema.
-
#tags ⇒ Array<AWSCDK::EventSchemas::CfnSchema::TagsEntryProperty>?
readonly
Tags associated with the schema.
-
#type ⇒ String
readonly
The type of schema.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(content:, registry_name:, type:, description: nil, schema_name: nil, tags: nil) ⇒ CfnSchemaProps
constructor
A new instance of CfnSchemaProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(content:, registry_name:, type:, description: nil, schema_name: nil, tags: nil) ⇒ CfnSchemaProps
Returns a new instance of CfnSchemaProps.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'event_schemas/cfn_schema_props.rb', line 15 def initialize(content:, registry_name:, type:, description: nil, schema_name: nil, tags: nil) @content = content Jsii::Type.check_type(@content, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "content") @registry_name = registry_name Jsii::Type.check_type(@registry_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "registryName") @type = type Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type") @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @schema_name = schema_name Jsii::Type.check_type(@schema_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "schemaName") unless @schema_name.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::EventSchemas::CfnSchema::TagsEntryProperty.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ldmVudHNjaGVtYXMuQ2ZuU2NoZW1hLlRhZ3NFbnRyeVByb3BlcnR5In0sImtpbmQiOiJhcnJheSJ9fQ==")), "tags") unless @tags.nil? end |
Instance Attribute Details
#content ⇒ String (readonly)
The source of the schema definition.
34 35 36 |
# File 'event_schemas/cfn_schema_props.rb', line 34 def content @content end |
#description ⇒ String? (readonly)
A description of the schema.
51 52 53 |
# File 'event_schemas/cfn_schema_props.rb', line 51 def description @description end |
#registry_name ⇒ String (readonly)
The name of the schema registry.
39 40 41 |
# File 'event_schemas/cfn_schema_props.rb', line 39 def registry_name @registry_name end |
#schema_name ⇒ String? (readonly)
The name of the schema.
56 57 58 |
# File 'event_schemas/cfn_schema_props.rb', line 56 def schema_name @schema_name end |
#tags ⇒ Array<AWSCDK::EventSchemas::CfnSchema::TagsEntryProperty>? (readonly)
Tags associated with the schema.
61 62 63 |
# File 'event_schemas/cfn_schema_props.rb', line 61 def @tags end |
#type ⇒ String (readonly)
The type of schema.
Valid types include OpenApi3 and JSONSchemaDraft4 .
46 47 48 |
# File 'event_schemas/cfn_schema_props.rb', line 46 def type @type end |
Class Method Details
.jsii_properties ⇒ Object
63 64 65 66 67 68 69 70 71 72 |
# File 'event_schemas/cfn_schema_props.rb', line 63 def self.jsii_properties { :content => "content", :registry_name => "registryName", :type => "type", :description => "description", :schema_name => "schemaName", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'event_schemas/cfn_schema_props.rb', line 74 def to_jsii result = {} result.merge!({ "content" => @content, "registryName" => @registry_name, "type" => @type, "description" => @description, "schemaName" => @schema_name, "tags" => @tags, }) result.compact end |