Class ListToMapProperty.Builder
java.lang.Object
software.amazon.awscdk.services.logs.ListToMapProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ListToMapProperty>
- Enclosing interface:
ListToMapProperty
@Stability(Stable)
public static final class ListToMapProperty.Builder
extends Object
implements software.amazon.jsii.Builder<ListToMapProperty>
A builder for
ListToMapProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofListToMapProperty.getFlatten()flattenedElement(String flattenedElement) Sets the value ofListToMapProperty.getFlattenedElement()Sets the value ofListToMapProperty.getKey()Sets the value ofListToMapProperty.getSource()Sets the value ofListToMapProperty.getTarget()Sets the value ofListToMapProperty.getValueKey()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
key
Sets the value ofListToMapProperty.getKey()- Parameters:
key- The key of the field to be extracted as keys in the generated map. This parameter is required.- Returns:
this
-
source
Sets the value ofListToMapProperty.getSource()- Parameters:
source- The key in the log event that has a list of objects that will be converted to a map. This parameter is required.- Returns:
this
-
flatten
Sets the value ofListToMapProperty.getFlatten()- Parameters:
flatten- A Boolean value to indicate whether the list will be flattened into single items.- Returns:
this
-
flattenedElement
Sets the value ofListToMapProperty.getFlattenedElement()- Parameters:
flattenedElement- If you set flatten to true, use flattenedElement to specify which element, first or last, to keep. You must specify this parameter if flatten is true.- Returns:
this
-
target
Sets the value ofListToMapProperty.getTarget()- Parameters:
target- The key of the field that will hold the generated map.- Returns:
this
-
valueKey
Sets the value ofListToMapProperty.getValueKey()- Parameters:
valueKey- If this is specified, the values that you specify in this parameter will be extracted from the source objects and put into the values of the generated map.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ListToMapProperty>- Returns:
- a new instance of
ListToMapProperty - Throws:
NullPointerException- if any required attribute was not provided
-