Class: AWSCDK::EventSchemas::CfnSchemaProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
event_schemas/cfn_schema_props.rb

Overview

Properties for defining a CfnSchema.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(content:, registry_name:, type:, description: nil, schema_name: nil, tags: nil) ⇒ CfnSchemaProps

Returns a new instance of CfnSchemaProps.

Parameters:

  • content (String)

    The source of the schema definition.

  • registry_name (String)

    The name of the schema registry.

  • type (String)

    The type of schema.

  • description (String, nil) (defaults to: nil)

    A description of the schema.

  • schema_name (String, nil) (defaults to: nil)

    The name of the schema.

  • tags (Array<AWSCDK::EventSchemas::CfnSchema::TagsEntryProperty>, nil) (defaults to: nil)

    Tags associated with the schema.



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 = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::EventSchemas::CfnSchema::TagsEntryProperty.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ldmVudHNjaGVtYXMuQ2ZuU2NoZW1hLlRhZ3NFbnRyeVByb3BlcnR5In0sImtpbmQiOiJhcnJheSJ9fQ==")), "tags") unless @tags.nil?
end

Instance Attribute Details

#contentString (readonly)

The source of the schema definition.



34
35
36
# File 'event_schemas/cfn_schema_props.rb', line 34

def content
  @content
end

#descriptionString? (readonly)

A description of the schema.



51
52
53
# File 'event_schemas/cfn_schema_props.rb', line 51

def description
  @description
end

#registry_nameString (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_nameString? (readonly)

The name of the schema.



56
57
58
# File 'event_schemas/cfn_schema_props.rb', line 56

def schema_name
  @schema_name
end

#tagsArray<AWSCDK::EventSchemas::CfnSchema::TagsEntryProperty>? (readonly)

Tags associated with the schema.



61
62
63
# File 'event_schemas/cfn_schema_props.rb', line 61

def tags
  @tags
end

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



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_jsiiObject



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