diff --git a/data-prepper-plugins/dissect-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/dissect/DissectProcessorConfig.java b/data-prepper-plugins/dissect-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/dissect/DissectProcessorConfig.java index bd1ca0d910..bc8ef4705a 100644 --- a/data-prepper-plugins/dissect-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/dissect/DissectProcessorConfig.java +++ b/data-prepper-plugins/dissect-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/dissect/DissectProcessorConfig.java @@ -1,6 +1,7 @@ package org.opensearch.dataprepper.plugins.processor.dissect; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; import jakarta.validation.constraints.NotNull; import org.opensearch.dataprepper.plugins.processor.mutateevent.TargetType; @@ -9,10 +10,17 @@ public class DissectProcessorConfig { @NotNull @JsonProperty("map") + @JsonPropertyDescription("Defines the `dissect` patterns for specific keys. For details on how to define fields " + + "in the `dissect` pattern, see [Field notations](#field-notations).") private Map map; @JsonProperty("target_types") + @JsonPropertyDescription("Specifies the data types for extract fields. Valid options are `integer`, " + + "`double`, `string`, and `boolean`. By default, all fields are of the `string` type.") private Map targetTypes; @JsonProperty("dissect_when") + @JsonPropertyDescription("Specifies a condition for performing the `dissect` operation using a " + + "[Data Prepper expression]({{site.url}}{{site.baseurl}}/data-prepper/pipelines/expression-syntax/). " + + "If specified, the `dissect` operation will only run when the expression evaluates to true.") private String dissectWhen; public String getDissectWhen(){ diff --git a/data-prepper-plugins/flatten-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/flatten/FlattenProcessorConfig.java b/data-prepper-plugins/flatten-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/flatten/FlattenProcessorConfig.java index c1208f5f40..783f73a9da 100644 --- a/data-prepper-plugins/flatten-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/flatten/FlattenProcessorConfig.java +++ b/data-prepper-plugins/flatten-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/flatten/FlattenProcessorConfig.java @@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; import jakarta.validation.constraints.AssertTrue; import jakarta.validation.constraints.NotNull; @@ -19,28 +20,43 @@ public class FlattenProcessorConfig { @NotNull @JsonProperty("source") + @JsonPropertyDescription("The source key on which to perform the operation. If set to an empty string (`\"\"`), " + + "then the processor uses the root of the event as the source.") private String source; @NotNull @JsonProperty("target") + @JsonPropertyDescription("The target key to put into the flattened fields. If set to an empty string (`\"\"`), " + + "then the processor uses the root of the event as the target.") private String target; @JsonProperty("remove_processed_fields") + @JsonPropertyDescription("When `true`, the processor removes all processed fields from the source. Default is `false`.") private boolean removeProcessedFields = false; @JsonProperty("remove_list_indices") + @JsonPropertyDescription("When `true`, the processor converts the fields from the source map into lists and " + + "puts the lists into the target field. Default is `false`.") private boolean removeListIndices = false; @JsonProperty("remove_brackets") + @JsonPropertyDescription("When `true`, the processor also removes brackets around the indices. Can only be " + + "set to `true` when `remove_list_indices` is `true`.") private boolean removeBrackets = false; @JsonProperty("exclude_keys") + @JsonPropertyDescription("The keys from the source field that should be excluded from processing. " + + "Default is an empty list (`[]`).") private List excludeKeys = DEFAULT_EXCLUDE_KEYS; @JsonProperty("flatten_when") + @JsonPropertyDescription("A [conditional expression](https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/), " + + "such as `/some-key == \"test\"'`, that determines whether the `flatten` processor will be run on the " + + "event. Default is `null`, which means that all events will be processed unless otherwise stated.") private String flattenWhen; @JsonProperty("tags_on_failure") + @JsonPropertyDescription("A list of tags to add to the event metadata when the event fails to process.") private List tagsOnFailure; public String getSource() { diff --git a/data-prepper-plugins/mutate-event-processors/src/main/java/org/opensearch/dataprepper/plugins/processor/mutateevent/CopyValueProcessorConfig.java b/data-prepper-plugins/mutate-event-processors/src/main/java/org/opensearch/dataprepper/plugins/processor/mutateevent/CopyValueProcessorConfig.java index b6aee5c7ba..1d24198d84 100644 --- a/data-prepper-plugins/mutate-event-processors/src/main/java/org/opensearch/dataprepper/plugins/processor/mutateevent/CopyValueProcessorConfig.java +++ b/data-prepper-plugins/mutate-event-processors/src/main/java/org/opensearch/dataprepper/plugins/processor/mutateevent/CopyValueProcessorConfig.java @@ -6,6 +6,7 @@ package org.opensearch.dataprepper.plugins.processor.mutateevent; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; import jakarta.validation.Valid; import jakarta.validation.constraints.AssertTrue; import jakarta.validation.constraints.NotEmpty; @@ -18,17 +19,23 @@ public static class Entry { @NotEmpty @NotNull @JsonProperty("from_key") + @JsonPropertyDescription("The key of the entry to be copied.") private String fromKey; @NotEmpty @NotNull @JsonProperty("to_key") + @JsonPropertyDescription("The key of the new entry to be added.") private String toKey; @JsonProperty("copy_when") + @JsonPropertyDescription("A [conditional expression](https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/), " + + "such as `/some-key == \"test\"'`, that will be evaluated to determine whether the processor will be run on the event.") private String copyWhen; @JsonProperty("overwrite_if_to_key_exists") + @JsonPropertyDescription("When set to `true`, the existing value is overwritten if `key` already exists in " + + "the event. The default value is `false`.") private boolean overwriteIfToKeyExists = false; public String getFromKey() { @@ -60,15 +67,19 @@ public Entry() { @NotEmpty @NotNull @Valid + @JsonPropertyDescription("A list of entries to be copied in an event.") private List entries; @JsonProperty("from_list") + @JsonPropertyDescription("The source list to copy values from.") private String fromList; @JsonProperty("to_list") + @JsonPropertyDescription("The target list to copy values to.") private String toList; @JsonProperty("overwrite_if_to_list_exists") + @JsonPropertyDescription("When set to `true`, the existing value is overwritten if `key` already exists in the event. The default value is `false`.") private boolean overwriteIfToListExists = false; @AssertTrue(message = "Both from_list and to_list should be specified when copying entries between lists.") diff --git a/data-prepper-plugins/translate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/translate/FileParameterConfig.java b/data-prepper-plugins/translate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/translate/FileParameterConfig.java index 8d5cc674f1..83dc30952e 100644 --- a/data-prepper-plugins/translate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/translate/FileParameterConfig.java +++ b/data-prepper-plugins/translate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/translate/FileParameterConfig.java @@ -6,6 +6,7 @@ package org.opensearch.dataprepper.plugins.processor.translate; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; import jakarta.validation.Valid; import jakarta.validation.constraints.NotNull; import java.util.List; @@ -13,10 +14,12 @@ public class FileParameterConfig { @JsonProperty("name") + @JsonPropertyDescription("The full path to a local file or key name for an S3 object.") @NotNull private String fileName; @JsonProperty("aws") + @JsonPropertyDescription("The AWS configuration when the file is an S3 object. ") @Valid private S3ObjectConfig awsConfig; diff --git a/data-prepper-plugins/translate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/translate/MappingsParameterConfig.java b/data-prepper-plugins/translate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/translate/MappingsParameterConfig.java index 7146f62a4c..1bcb14c7a8 100644 --- a/data-prepper-plugins/translate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/translate/MappingsParameterConfig.java +++ b/data-prepper-plugins/translate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/translate/MappingsParameterConfig.java @@ -1,6 +1,7 @@ package org.opensearch.dataprepper.plugins.processor.translate; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; import jakarta.validation.Valid; import jakarta.validation.constraints.AssertTrue; import jakarta.validation.constraints.NotNull; @@ -12,10 +13,12 @@ public class MappingsParameterConfig { @JsonProperty("source") + @JsonPropertyDescription("The source field to translate. Can be a string or a list of strings.") @NotNull private Object source; @JsonProperty("targets") + @JsonPropertyDescription("A list of target field configurations, such as the target field key or translation maps.") @Valid private List targetsParameterConfigs = new ArrayList<>(); diff --git a/data-prepper-plugins/translate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/translate/S3ObjectConfig.java b/data-prepper-plugins/translate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/translate/S3ObjectConfig.java index 56e7aacf27..34dd421994 100644 --- a/data-prepper-plugins/translate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/translate/S3ObjectConfig.java +++ b/data-prepper-plugins/translate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/translate/S3ObjectConfig.java @@ -6,19 +6,23 @@ package org.opensearch.dataprepper.plugins.processor.translate; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; import jakarta.validation.constraints.NotNull; public class S3ObjectConfig { @JsonProperty("bucket") + @JsonPropertyDescription("The Amazon S3 bucket name.") @NotNull private String bucket; @JsonProperty("region") + @JsonPropertyDescription("The AWS Region to use for credentials.") @NotNull private String region; @JsonProperty("sts_role_arn") + @JsonPropertyDescription("The AWS Security Token Service (AWS STS) role to assume for requests to Amazon S3.") @NotNull private String stsRoleArn; diff --git a/data-prepper-plugins/translate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/translate/TargetsParameterConfig.java b/data-prepper-plugins/translate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/translate/TargetsParameterConfig.java index 53a250ee37..18e796b593 100644 --- a/data-prepper-plugins/translate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/translate/TargetsParameterConfig.java +++ b/data-prepper-plugins/translate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/translate/TargetsParameterConfig.java @@ -1,6 +1,7 @@ package org.opensearch.dataprepper.plugins.processor.translate; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; import jakarta.validation.constraints.AssertTrue; import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotNull; @@ -22,18 +23,28 @@ public class TargetsParameterConfig { private final Map individualMappings = new HashMap<>(); private final Map compiledPatterns = new HashMap<>(); @JsonProperty("target") + @JsonPropertyDescription("The key that specifies the field in the output in which the translated value will be placed.") @NotNull @NotEmpty private String target; @JsonProperty("map") + @JsonPropertyDescription("A list of key-value pairs that define the translations. Each key represents a possible " + + "value in the source field, and the corresponding value represents what it should be translated to. " + + "For examples, see [map option](#map-option). At least one of `map` and `regex` should be configured.") private Map map; @JsonProperty("translate_when") + @JsonPropertyDescription("Uses a [Data Prepper expression]({{site.url}}{{site.baseurl}}/data-prepper/pipelines/expression-syntax/) " + + "to specify a condition for performing the translation. When specified, the expression will only translate when the condition is met.") private String translateWhen; @JsonProperty("regex") + @JsonPropertyDescription("A map of keys that defines the translation map. For more options, see [regex option](#regex-option). " + + "At least one of `map` and `regex` should be configured.") private RegexParameterConfiguration regexParameterConfig; @JsonProperty("default") + @JsonPropertyDescription("The default value to use when no match is found during translation.") private String defaultValue; @JsonProperty("type") + @JsonPropertyDescription("Specifies the data type for the target value.") private TargetType targetType = TargetType.STRING; public TargetsParameterConfig(){ diff --git a/data-prepper-plugins/translate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/translate/TranslateProcessorConfig.java b/data-prepper-plugins/translate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/translate/TranslateProcessorConfig.java index 70744f683a..de0949a31c 100644 --- a/data-prepper-plugins/translate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/translate/TranslateProcessorConfig.java +++ b/data-prepper-plugins/translate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/translate/TranslateProcessorConfig.java @@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; import jakarta.validation.Valid; import jakarta.validation.constraints.AssertTrue; @@ -19,10 +20,12 @@ public class TranslateProcessorConfig { @JsonProperty("file") + @JsonPropertyDescription("Points to the file that contains mapping configurations. For more information, see [file](#file).") @Valid private FileParameterConfig fileParameterConfig; @JsonProperty("mappings") + @JsonPropertyDescription("Defines inline mappings. For more information, see [mappings](#mappings).") @Valid private List mappingsParameterConfigs = new ArrayList<>();