Class: AWSCDK::Logs::JsonMutatorProps

Inherits:
BaseProcessorProps
  • Object
show all
Defined in:
logs/json_mutator_props.rb

Overview

Properties for creating JSON mutator processors.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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.

Parameters:



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 = add_keys_options.is_a?(Hash) ? ::AWSCDK::Logs::AddKeysProperty.new(**add_keys_options.transform_keys(&:to_sym)) : add_keys_options
  Jsii::Type.check_type(@add_keys_options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbG9ncy5BZGRLZXlzUHJvcGVydHkifQ==")), "addKeysOptions") unless @add_keys_options.nil?
  @copy_value_options = copy_value_options.is_a?(Hash) ? ::AWSCDK::Logs::CopyValueProperty.new(**copy_value_options.transform_keys(&:to_sym)) : copy_value_options
  Jsii::Type.check_type(@copy_value_options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbG9ncy5Db3B5VmFsdWVQcm9wZXJ0eSJ9")), "copyValueOptions") unless @copy_value_options.nil?
  @delete_keys_options = delete_keys_options.is_a?(Hash) ? ::AWSCDK::Logs::ProcessorDeleteKeysProperty.new(**delete_keys_options.transform_keys(&:to_sym)) : delete_keys_options
  Jsii::Type.check_type(@delete_keys_options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbG9ncy5Qcm9jZXNzb3JEZWxldGVLZXlzUHJvcGVydHkifQ==")), "deleteKeysOptions") unless @delete_keys_options.nil?
  @list_to_map_options = list_to_map_options.is_a?(Hash) ? ::AWSCDK::Logs::ListToMapProperty.new(**list_to_map_options.transform_keys(&:to_sym)) : list_to_map_options
  Jsii::Type.check_type(@list_to_map_options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbG9ncy5MaXN0VG9NYXBQcm9wZXJ0eSJ9")), "listToMapOptions") unless @list_to_map_options.nil?
  @move_keys_options = move_keys_options.is_a?(Hash) ? ::AWSCDK::Logs::MoveKeysProperty.new(**move_keys_options.transform_keys(&:to_sym)) : move_keys_options
  Jsii::Type.check_type(@move_keys_options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbG9ncy5Nb3ZlS2V5c1Byb3BlcnR5In0=")), "moveKeysOptions") unless @move_keys_options.nil?
  @rename_keys_options = rename_keys_options.is_a?(Hash) ? ::AWSCDK::Logs::RenameKeysProperty.new(**rename_keys_options.transform_keys(&:to_sym)) : rename_keys_options
  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_optionsAWSCDK::Logs::AddKeysProperty? (readonly)

Note:

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
  @add_keys_options
end

#copy_value_optionsAWSCDK::Logs::CopyValueProperty? (readonly)

Note:

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
  @copy_value_options
end

#delete_keys_optionsAWSCDK::Logs::ProcessorDeleteKeysProperty? (readonly)

Note:

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
  @delete_keys_options
end

#list_to_map_optionsAWSCDK::Logs::ListToMapProperty? (readonly)

Note:

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
  @list_to_map_options
end

#move_keys_optionsAWSCDK::Logs::MoveKeysProperty? (readonly)

Note:

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
  @move_keys_options
end

#rename_keys_optionsAWSCDK::Logs::RenameKeysProperty? (readonly)

Note:

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
  @rename_keys_options
end

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



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_jsiiObject



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