Class: AWSCDK::Codecommit::CodeConfig
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Codecommit::CodeConfig
- Defined in:
- codecommit/code_config.rb
Overview
Represents the structure to pass into the underlying CfnRepository class.
Instance Attribute Summary collapse
-
#code ⇒ AWSCDK::Codecommit::CfnRepository::CodeProperty
readonly
represents the underlying code structure.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(code:) ⇒ CodeConfig
constructor
A new instance of CodeConfig.
- #to_jsii ⇒ Object
Constructor Details
#initialize(code:) ⇒ CodeConfig
Returns a new instance of CodeConfig.
8 9 10 11 |
# File 'codecommit/code_config.rb', line 8 def initialize(code:) @code = code.is_a?(Hash) ? ::AWSCDK::Codecommit::CfnRepository::CodeProperty.new(**code.transform_keys(&:to_sym)) : code Jsii::Type.check_type(@code, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZWNvbW1pdC5DZm5SZXBvc2l0b3J5LkNvZGVQcm9wZXJ0eSJ9")), "code") end |
Instance Attribute Details
#code ⇒ AWSCDK::Codecommit::CfnRepository::CodeProperty (readonly)
represents the underlying code structure.
16 17 18 |
# File 'codecommit/code_config.rb', line 16 def code @code end |
Class Method Details
.jsii_properties ⇒ Object
18 19 20 21 22 |
# File 'codecommit/code_config.rb', line 18 def self.jsii_properties { :code => "code", } end |
Instance Method Details
#to_jsii ⇒ Object
24 25 26 27 28 29 30 |
# File 'codecommit/code_config.rb', line 24 def to_jsii result = {} result.merge!({ "code" => @code, }) result.compact end |