Class: AWSCDK::Codecommit::CodeConfig

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
codecommit/code_config.rb

Overview

Represents the structure to pass into the underlying CfnRepository class.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code:) ⇒ CodeConfig

Returns a new instance of CodeConfig.

Parameters:



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

#codeAWSCDK::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_propertiesObject



18
19
20
21
22
# File 'codecommit/code_config.rb', line 18

def self.jsii_properties
  {
    :code => "code",
  }
end

Instance Method Details

#to_jsiiObject



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