Class: AWSCDK::Logs::JsonMutatorProps
- Inherits:
-
BaseProcessorProps
- Object
- BaseProcessorProps
- AWSCDK::Logs::JsonMutatorProps
- Defined in:
- logs/json_mutator_props.rb
Overview
Properties for creating JSON mutator processors.
Instance Attribute Summary collapse
-
#add_keys_options ⇒ AWSCDK::Logs::AddKeysProperty?
readonly
Options for adding keys.
-
#copy_value_options ⇒ AWSCDK::Logs::CopyValueProperty?
readonly
Options for copying values.
-
#delete_keys_options ⇒ AWSCDK::Logs::ProcessorDeleteKeysProperty?
readonly
Keys to delete.
-
#list_to_map_options ⇒ AWSCDK::Logs::ListToMapProperty?
readonly
Options for converting lists to maps.
-
#move_keys_options ⇒ AWSCDK::Logs::MoveKeysProperty?
readonly
Options for moving keys.
-
#rename_keys_options ⇒ AWSCDK::Logs::RenameKeysProperty?
readonly
Options for renaming keys.
-
#type ⇒ AWSCDK::Logs::JsonMutatorType
readonly
The type of JSON mutation operation.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type:, add_keys_options: nil, copy_value_options: nil, delete_keys_options: nil, list_to_map_options: nil, move_keys_options: nil, rename_keys_options: nil) ⇒ JsonMutatorProps
constructor
A new instance of JsonMutatorProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(type:, add_keys_options: nil, copy_value_options: nil, delete_keys_options: nil, list_to_map_options: nil, move_keys_options: nil, rename_keys_options: nil) ⇒ JsonMutatorProps
Returns a new instance of JsonMutatorProps.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'logs/json_mutator_props.rb', line 14 def initialize(type:, add_keys_options: nil, copy_value_options: nil, delete_keys_options: nil, list_to_map_options: nil, move_keys_options: nil, rename_keys_options: nil) @type = type Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbG9ncy5Kc29uTXV0YXRvclR5cGUifQ==")), "type") @add_keys_options = .is_a?(Hash) ? ::AWSCDK::Logs::AddKeysProperty.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(@add_keys_options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbG9ncy5BZGRLZXlzUHJvcGVydHkifQ==")), "addKeysOptions") unless @add_keys_options.nil? @copy_value_options = .is_a?(Hash) ? ::AWSCDK::Logs::CopyValueProperty.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(@copy_value_options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbG9ncy5Db3B5VmFsdWVQcm9wZXJ0eSJ9")), "copyValueOptions") unless @copy_value_options.nil? @delete_keys_options = .is_a?(Hash) ? ::AWSCDK::Logs::ProcessorDeleteKeysProperty.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(@delete_keys_options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbG9ncy5Qcm9jZXNzb3JEZWxldGVLZXlzUHJvcGVydHkifQ==")), "deleteKeysOptions") unless @delete_keys_options.nil? @list_to_map_options = .is_a?(Hash) ? ::AWSCDK::Logs::ListToMapProperty.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(@list_to_map_options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbG9ncy5MaXN0VG9NYXBQcm9wZXJ0eSJ9")), "listToMapOptions") unless @list_to_map_options.nil? @move_keys_options = .is_a?(Hash) ? ::AWSCDK::Logs::MoveKeysProperty.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(@move_keys_options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbG9ncy5Nb3ZlS2V5c1Byb3BlcnR5In0=")), "moveKeysOptions") unless @move_keys_options.nil? @rename_keys_options = .is_a?(Hash) ? ::AWSCDK::Logs::RenameKeysProperty.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(@rename_keys_options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbG9ncy5SZW5hbWVLZXlzUHJvcGVydHkifQ==")), "renameKeysOptions") unless @rename_keys_options.nil? end |
Instance Attribute Details
#add_keys_options ⇒ AWSCDK::Logs::AddKeysProperty? (readonly)
Default: - No adding keys processor is created if props not set
Options for adding keys.
Required when type is ADD_KEYS.
41 42 43 |
# File 'logs/json_mutator_props.rb', line 41 def @add_keys_options end |
#copy_value_options ⇒ AWSCDK::Logs::CopyValueProperty? (readonly)
Default: - No copy value processor is created if props not set
Options for copying values.
Required when type is COPY_VALUE.
48 49 50 |
# File 'logs/json_mutator_props.rb', line 48 def @copy_value_options end |
#delete_keys_options ⇒ AWSCDK::Logs::ProcessorDeleteKeysProperty? (readonly)
Default: - No delete key processor is created if props not set
Keys to delete.
Required when type is DELETE_KEYS.
55 56 57 |
# File 'logs/json_mutator_props.rb', line 55 def @delete_keys_options end |
#list_to_map_options ⇒ AWSCDK::Logs::ListToMapProperty? (readonly)
Default: - No list-to-map processor is created if props not set
Options for converting lists to maps.
Required when type is LIST_TO_MAP.
62 63 64 |
# File 'logs/json_mutator_props.rb', line 62 def @list_to_map_options end |
#move_keys_options ⇒ AWSCDK::Logs::MoveKeysProperty? (readonly)
Default: - No move key processor is created if props not set
Options for moving keys.
Required when type is MOVE_KEYS.
69 70 71 |
# File 'logs/json_mutator_props.rb', line 69 def @move_keys_options end |
#rename_keys_options ⇒ AWSCDK::Logs::RenameKeysProperty? (readonly)
Default: - No rename key processor is created if props not set
Options for renaming keys.
Required when type is RENAME_KEYS.
76 77 78 |
# File 'logs/json_mutator_props.rb', line 76 def @rename_keys_options end |
#type ⇒ AWSCDK::Logs::JsonMutatorType (readonly)
The type of JSON mutation operation.
34 35 36 |
# File 'logs/json_mutator_props.rb', line 34 def type @type end |
Class Method Details
.jsii_properties ⇒ Object
78 79 80 81 82 83 84 85 86 87 88 |
# File 'logs/json_mutator_props.rb', line 78 def self.jsii_properties { :type => "type", :add_keys_options => "addKeysOptions", :copy_value_options => "copyValueOptions", :delete_keys_options => "deleteKeysOptions", :list_to_map_options => "listToMapOptions", :move_keys_options => "moveKeysOptions", :rename_keys_options => "renameKeysOptions", } end |
Instance Method Details
#to_jsii ⇒ Object
90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'logs/json_mutator_props.rb', line 90 def to_jsii result = {} result.merge!(super) result.merge!({ "type" => @type, "addKeysOptions" => @add_keys_options, "copyValueOptions" => @copy_value_options, "deleteKeysOptions" => @delete_keys_options, "listToMapOptions" => @list_to_map_options, "moveKeysOptions" => @move_keys_options, "renameKeysOptions" => @rename_keys_options, }) result.compact end |