Class: AWSCDK::Logs::StringMutatorProps
- Inherits:
-
BaseProcessorProps
- Object
- BaseProcessorProps
- AWSCDK::Logs::StringMutatorProps
- Defined in:
- logs/string_mutator_props.rb
Overview
Properties for creating string mutator processors.
Instance Attribute Summary collapse
-
#lower_case_keys ⇒ Array<String>?
readonly
Keys for strings to convert to lowercase.
-
#split_options ⇒ AWSCDK::Logs::SplitStringProperty?
readonly
Options for string splitting.
-
#substitute_options ⇒ AWSCDK::Logs::SubstituteStringProperty?
readonly
Options for string substitution.
-
#trim_keys ⇒ Array<String>?
readonly
Keys for strings to trim.
-
#type ⇒ AWSCDK::Logs::StringMutatorType
readonly
The type of string mutation operation.
-
#upper_case_keys ⇒ Array<String>?
readonly
Keys for strings to convert to uppercase.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type:, lower_case_keys: nil, split_options: nil, substitute_options: nil, trim_keys: nil, upper_case_keys: nil) ⇒ StringMutatorProps
constructor
A new instance of StringMutatorProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(type:, lower_case_keys: nil, split_options: nil, substitute_options: nil, trim_keys: nil, upper_case_keys: nil) ⇒ StringMutatorProps
Returns a new instance of StringMutatorProps.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'logs/string_mutator_props.rb', line 13 def initialize(type:, lower_case_keys: nil, split_options: nil, substitute_options: nil, trim_keys: nil, upper_case_keys: nil) @type = type Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbG9ncy5TdHJpbmdNdXRhdG9yVHlwZSJ9")), "type") @lower_case_keys = lower_case_keys Jsii::Type.check_type(@lower_case_keys, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "lowerCaseKeys") unless @lower_case_keys.nil? @split_options = .is_a?(Hash) ? ::AWSCDK::Logs::SplitStringProperty.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(@split_options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbG9ncy5TcGxpdFN0cmluZ1Byb3BlcnR5In0=")), "splitOptions") unless @split_options.nil? @substitute_options = .is_a?(Hash) ? ::AWSCDK::Logs::SubstituteStringProperty.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(@substitute_options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbG9ncy5TdWJzdGl0dXRlU3RyaW5nUHJvcGVydHkifQ==")), "substituteOptions") unless @substitute_options.nil? @trim_keys = trim_keys Jsii::Type.check_type(@trim_keys, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "trimKeys") unless @trim_keys.nil? @upper_case_keys = upper_case_keys Jsii::Type.check_type(@upper_case_keys, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "upperCaseKeys") unless @upper_case_keys.nil? end |
Instance Attribute Details
#lower_case_keys ⇒ Array<String>? (readonly)
Default: - No lowercase processor is created if props not set
Keys for strings to convert to lowercase.
Required when type is LOWER_CASE.
38 39 40 |
# File 'logs/string_mutator_props.rb', line 38 def lower_case_keys @lower_case_keys end |
#split_options ⇒ AWSCDK::Logs::SplitStringProperty? (readonly)
Default: - No string splitting processor is created if props not set
Options for string splitting.
Required when type is SPLIT.
45 46 47 |
# File 'logs/string_mutator_props.rb', line 45 def @split_options end |
#substitute_options ⇒ AWSCDK::Logs::SubstituteStringProperty? (readonly)
Default: - No string substitution processor is created if props not set
Options for string substitution.
Required when type is SUBSTITUTE.
52 53 54 |
# File 'logs/string_mutator_props.rb', line 52 def @substitute_options end |
#trim_keys ⇒ Array<String>? (readonly)
Default: - No trim processor is created if props not set
Keys for strings to trim.
Required when type is TRIM.
59 60 61 |
# File 'logs/string_mutator_props.rb', line 59 def trim_keys @trim_keys end |
#type ⇒ AWSCDK::Logs::StringMutatorType (readonly)
The type of string mutation operation.
31 32 33 |
# File 'logs/string_mutator_props.rb', line 31 def type @type end |
#upper_case_keys ⇒ Array<String>? (readonly)
Default: - No uppercase processor is created if props not set
Keys for strings to convert to uppercase.
Required when type is UPPER_CASE.
66 67 68 |
# File 'logs/string_mutator_props.rb', line 66 def upper_case_keys @upper_case_keys end |
Class Method Details
.jsii_properties ⇒ Object
68 69 70 71 72 73 74 75 76 77 |
# File 'logs/string_mutator_props.rb', line 68 def self.jsii_properties { :type => "type", :lower_case_keys => "lowerCaseKeys", :split_options => "splitOptions", :substitute_options => "substituteOptions", :trim_keys => "trimKeys", :upper_case_keys => "upperCaseKeys", } end |
Instance Method Details
#to_jsii ⇒ Object
79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'logs/string_mutator_props.rb', line 79 def to_jsii result = {} result.merge!(super) result.merge!({ "type" => @type, "lowerCaseKeys" => @lower_case_keys, "splitOptions" => @split_options, "substituteOptions" => @substitute_options, "trimKeys" => @trim_keys, "upperCaseKeys" => @upper_case_keys, }) result.compact end |