/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.macie2.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateCustomDataIdentifierRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* A unique, case-sensitive token that you provide to ensure the idempotency of the request. *
*/ private String clientToken; /** ** A custom description of the custom data identifier. The description can contain as many as 512 characters. *
** We strongly recommend that you avoid including any sensitive data in the description of a custom data identifier. * Other users of your account might be able to see this description, depending on the actions that they're allowed * to perform in Amazon Macie. *
*/ private String description; /** ** An array that lists specific character sequences (ignore words) to exclude from the results. If the text * matched by the regular expression contains any string in this array, Amazon Macie ignores it. The array can * contain as many as 10 ignore words. Each ignore word can contain 4-90 UTF-8 characters. Ignore words are case * sensitive. *
*/ private java.util.List* An array that lists specific character sequences (keywords), one of which must precede and be within * proximity (maximumMatchDistance) of the regular expression to match. The array can contain as many as 50 * keywords. Each keyword can contain 3-90 UTF-8 characters. Keywords aren't case sensitive. *
*/ private java.util.List* The maximum number of characters that can exist between the end of at least one complete character sequence * specified by the keywords array and the end of the text that matches the regex pattern. If a complete keyword * precedes all the text that matches the pattern and the keyword is within the specified distance, Amazon Macie * includes the result. The distance can be 1-300 characters. The default value is 50. *
*/ private Integer maximumMatchDistance; /** ** A custom name for the custom data identifier. The name can contain as many as 128 characters. *
** We strongly recommend that you avoid including any sensitive data in the name of a custom data identifier. Other * users of your account might be able to see this name, depending on the actions that they're allowed to perform in * Amazon Macie. *
*/ private String name; /** ** The regular expression (regex) that defines the pattern to match. The expression can contain as many as * 512 characters. *
*/ private String regex; /** ** The severity to assign to findings that the custom data identifier produces, based on the number of occurrences * of text that match the custom data identifier's detection criteria. You can specify as many as three * SeverityLevel objects in this array, one for each severity: LOW, MEDIUM, or HIGH. If you specify more than one, * the occurrences thresholds must be in ascending order by severity, moving from LOW to HIGH. For example, 1 for * LOW, 50 for MEDIUM, and 100 for HIGH. If an S3 object contains fewer occurrences than the lowest specified * threshold, Amazon Macie doesn't create a finding. *
** If you don't specify any values for this array, Macie creates findings for S3 objects that contain at least one * occurrence of text that matches the detection criteria, and Macie assigns the MEDIUM severity to those findings. *
*/ private java.util.List* A map of key-value pairs that specifies the tags to associate with the custom data identifier. *
** A custom data identifier can have a maximum of 50 tags. Each tag consists of a tag key and an associated tag * value. The maximum length of a tag key is 128 characters. The maximum length of a tag value is 256 characters. *
*/ private java.util.Map* A unique, case-sensitive token that you provide to ensure the idempotency of the request. *
* * @param clientToken * A unique, case-sensitive token that you provide to ensure the idempotency of the request. */ public void setClientToken(String clientToken) { this.clientToken = clientToken; } /** ** A unique, case-sensitive token that you provide to ensure the idempotency of the request. *
* * @return A unique, case-sensitive token that you provide to ensure the idempotency of the request. */ public String getClientToken() { return this.clientToken; } /** ** A unique, case-sensitive token that you provide to ensure the idempotency of the request. *
* * @param clientToken * A unique, case-sensitive token that you provide to ensure the idempotency of the request. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCustomDataIdentifierRequest withClientToken(String clientToken) { setClientToken(clientToken); return this; } /** ** A custom description of the custom data identifier. The description can contain as many as 512 characters. *
** We strongly recommend that you avoid including any sensitive data in the description of a custom data identifier. * Other users of your account might be able to see this description, depending on the actions that they're allowed * to perform in Amazon Macie. *
* * @param description * A custom description of the custom data identifier. The description can contain as many as 512 * characters. ** We strongly recommend that you avoid including any sensitive data in the description of a custom data * identifier. Other users of your account might be able to see this description, depending on the actions * that they're allowed to perform in Amazon Macie. */ public void setDescription(String description) { this.description = description; } /** *
* A custom description of the custom data identifier. The description can contain as many as 512 characters. *
** We strongly recommend that you avoid including any sensitive data in the description of a custom data identifier. * Other users of your account might be able to see this description, depending on the actions that they're allowed * to perform in Amazon Macie. *
* * @return A custom description of the custom data identifier. The description can contain as many as 512 * characters. ** We strongly recommend that you avoid including any sensitive data in the description of a custom data * identifier. Other users of your account might be able to see this description, depending on the actions * that they're allowed to perform in Amazon Macie. */ public String getDescription() { return this.description; } /** *
* A custom description of the custom data identifier. The description can contain as many as 512 characters. *
** We strongly recommend that you avoid including any sensitive data in the description of a custom data identifier. * Other users of your account might be able to see this description, depending on the actions that they're allowed * to perform in Amazon Macie. *
* * @param description * A custom description of the custom data identifier. The description can contain as many as 512 * characters. ** We strongly recommend that you avoid including any sensitive data in the description of a custom data * identifier. Other users of your account might be able to see this description, depending on the actions * that they're allowed to perform in Amazon Macie. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCustomDataIdentifierRequest withDescription(String description) { setDescription(description); return this; } /** *
* An array that lists specific character sequences (ignore words) to exclude from the results. If the text * matched by the regular expression contains any string in this array, Amazon Macie ignores it. The array can * contain as many as 10 ignore words. Each ignore word can contain 4-90 UTF-8 characters. Ignore words are case * sensitive. *
* * @return An array that lists specific character sequences (ignore words) to exclude from the results. If * the text matched by the regular expression contains any string in this array, Amazon Macie ignores it. * The array can contain as many as 10 ignore words. Each ignore word can contain 4-90 UTF-8 characters. * Ignore words are case sensitive. */ public java.util.List* An array that lists specific character sequences (ignore words) to exclude from the results. If the text * matched by the regular expression contains any string in this array, Amazon Macie ignores it. The array can * contain as many as 10 ignore words. Each ignore word can contain 4-90 UTF-8 characters. Ignore words are case * sensitive. *
* * @param ignoreWords * An array that lists specific character sequences (ignore words) to exclude from the results. If the * text matched by the regular expression contains any string in this array, Amazon Macie ignores it. The * array can contain as many as 10 ignore words. Each ignore word can contain 4-90 UTF-8 characters. Ignore * words are case sensitive. */ public void setIgnoreWords(java.util.Collection* An array that lists specific character sequences (ignore words) to exclude from the results. If the text * matched by the regular expression contains any string in this array, Amazon Macie ignores it. The array can * contain as many as 10 ignore words. Each ignore word can contain 4-90 UTF-8 characters. Ignore words are case * sensitive. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setIgnoreWords(java.util.Collection)} or {@link #withIgnoreWords(java.util.Collection)} if you want to * override the existing values. *
* * @param ignoreWords * An array that lists specific character sequences (ignore words) to exclude from the results. If the * text matched by the regular expression contains any string in this array, Amazon Macie ignores it. The * array can contain as many as 10 ignore words. Each ignore word can contain 4-90 UTF-8 characters. Ignore * words are case sensitive. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCustomDataIdentifierRequest withIgnoreWords(String... ignoreWords) { if (this.ignoreWords == null) { setIgnoreWords(new java.util.ArrayList* An array that lists specific character sequences (ignore words) to exclude from the results. If the text * matched by the regular expression contains any string in this array, Amazon Macie ignores it. The array can * contain as many as 10 ignore words. Each ignore word can contain 4-90 UTF-8 characters. Ignore words are case * sensitive. *
* * @param ignoreWords * An array that lists specific character sequences (ignore words) to exclude from the results. If the * text matched by the regular expression contains any string in this array, Amazon Macie ignores it. The * array can contain as many as 10 ignore words. Each ignore word can contain 4-90 UTF-8 characters. Ignore * words are case sensitive. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCustomDataIdentifierRequest withIgnoreWords(java.util.Collection* An array that lists specific character sequences (keywords), one of which must precede and be within * proximity (maximumMatchDistance) of the regular expression to match. The array can contain as many as 50 * keywords. Each keyword can contain 3-90 UTF-8 characters. Keywords aren't case sensitive. *
* * @return An array that lists specific character sequences (keywords), one of which must precede and be * within proximity (maximumMatchDistance) of the regular expression to match. The array can contain as many * as 50 keywords. Each keyword can contain 3-90 UTF-8 characters. Keywords aren't case sensitive. */ public java.util.List* An array that lists specific character sequences (keywords), one of which must precede and be within * proximity (maximumMatchDistance) of the regular expression to match. The array can contain as many as 50 * keywords. Each keyword can contain 3-90 UTF-8 characters. Keywords aren't case sensitive. *
* * @param keywords * An array that lists specific character sequences (keywords), one of which must precede and be * within proximity (maximumMatchDistance) of the regular expression to match. The array can contain as many * as 50 keywords. Each keyword can contain 3-90 UTF-8 characters. Keywords aren't case sensitive. */ public void setKeywords(java.util.Collection* An array that lists specific character sequences (keywords), one of which must precede and be within * proximity (maximumMatchDistance) of the regular expression to match. The array can contain as many as 50 * keywords. Each keyword can contain 3-90 UTF-8 characters. Keywords aren't case sensitive. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setKeywords(java.util.Collection)} or {@link #withKeywords(java.util.Collection)} if you want to override * the existing values. *
* * @param keywords * An array that lists specific character sequences (keywords), one of which must precede and be * within proximity (maximumMatchDistance) of the regular expression to match. The array can contain as many * as 50 keywords. Each keyword can contain 3-90 UTF-8 characters. Keywords aren't case sensitive. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCustomDataIdentifierRequest withKeywords(String... keywords) { if (this.keywords == null) { setKeywords(new java.util.ArrayList* An array that lists specific character sequences (keywords), one of which must precede and be within * proximity (maximumMatchDistance) of the regular expression to match. The array can contain as many as 50 * keywords. Each keyword can contain 3-90 UTF-8 characters. Keywords aren't case sensitive. *
* * @param keywords * An array that lists specific character sequences (keywords), one of which must precede and be * within proximity (maximumMatchDistance) of the regular expression to match. The array can contain as many * as 50 keywords. Each keyword can contain 3-90 UTF-8 characters. Keywords aren't case sensitive. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCustomDataIdentifierRequest withKeywords(java.util.Collection* The maximum number of characters that can exist between the end of at least one complete character sequence * specified by the keywords array and the end of the text that matches the regex pattern. If a complete keyword * precedes all the text that matches the pattern and the keyword is within the specified distance, Amazon Macie * includes the result. The distance can be 1-300 characters. The default value is 50. *
* * @param maximumMatchDistance * The maximum number of characters that can exist between the end of at least one complete character * sequence specified by the keywords array and the end of the text that matches the regex pattern. If a * complete keyword precedes all the text that matches the pattern and the keyword is within the specified * distance, Amazon Macie includes the result. The distance can be 1-300 characters. The default value is 50. */ public void setMaximumMatchDistance(Integer maximumMatchDistance) { this.maximumMatchDistance = maximumMatchDistance; } /** ** The maximum number of characters that can exist between the end of at least one complete character sequence * specified by the keywords array and the end of the text that matches the regex pattern. If a complete keyword * precedes all the text that matches the pattern and the keyword is within the specified distance, Amazon Macie * includes the result. The distance can be 1-300 characters. The default value is 50. *
* * @return The maximum number of characters that can exist between the end of at least one complete character * sequence specified by the keywords array and the end of the text that matches the regex pattern. If a * complete keyword precedes all the text that matches the pattern and the keyword is within the specified * distance, Amazon Macie includes the result. The distance can be 1-300 characters. The default value is * 50. */ public Integer getMaximumMatchDistance() { return this.maximumMatchDistance; } /** ** The maximum number of characters that can exist between the end of at least one complete character sequence * specified by the keywords array and the end of the text that matches the regex pattern. If a complete keyword * precedes all the text that matches the pattern and the keyword is within the specified distance, Amazon Macie * includes the result. The distance can be 1-300 characters. The default value is 50. *
* * @param maximumMatchDistance * The maximum number of characters that can exist between the end of at least one complete character * sequence specified by the keywords array and the end of the text that matches the regex pattern. If a * complete keyword precedes all the text that matches the pattern and the keyword is within the specified * distance, Amazon Macie includes the result. The distance can be 1-300 characters. The default value is 50. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCustomDataIdentifierRequest withMaximumMatchDistance(Integer maximumMatchDistance) { setMaximumMatchDistance(maximumMatchDistance); return this; } /** ** A custom name for the custom data identifier. The name can contain as many as 128 characters. *
** We strongly recommend that you avoid including any sensitive data in the name of a custom data identifier. Other * users of your account might be able to see this name, depending on the actions that they're allowed to perform in * Amazon Macie. *
* * @param name * A custom name for the custom data identifier. The name can contain as many as 128 characters. ** We strongly recommend that you avoid including any sensitive data in the name of a custom data identifier. * Other users of your account might be able to see this name, depending on the actions that they're allowed * to perform in Amazon Macie. */ public void setName(String name) { this.name = name; } /** *
* A custom name for the custom data identifier. The name can contain as many as 128 characters. *
** We strongly recommend that you avoid including any sensitive data in the name of a custom data identifier. Other * users of your account might be able to see this name, depending on the actions that they're allowed to perform in * Amazon Macie. *
* * @return A custom name for the custom data identifier. The name can contain as many as 128 characters. ** We strongly recommend that you avoid including any sensitive data in the name of a custom data * identifier. Other users of your account might be able to see this name, depending on the actions that * they're allowed to perform in Amazon Macie. */ public String getName() { return this.name; } /** *
* A custom name for the custom data identifier. The name can contain as many as 128 characters. *
** We strongly recommend that you avoid including any sensitive data in the name of a custom data identifier. Other * users of your account might be able to see this name, depending on the actions that they're allowed to perform in * Amazon Macie. *
* * @param name * A custom name for the custom data identifier. The name can contain as many as 128 characters. ** We strongly recommend that you avoid including any sensitive data in the name of a custom data identifier. * Other users of your account might be able to see this name, depending on the actions that they're allowed * to perform in Amazon Macie. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCustomDataIdentifierRequest withName(String name) { setName(name); return this; } /** *
* The regular expression (regex) that defines the pattern to match. The expression can contain as many as * 512 characters. *
* * @param regex * The regular expression (regex) that defines the pattern to match. The expression can contain as * many as 512 characters. */ public void setRegex(String regex) { this.regex = regex; } /** ** The regular expression (regex) that defines the pattern to match. The expression can contain as many as * 512 characters. *
* * @return The regular expression (regex) that defines the pattern to match. The expression can contain as * many as 512 characters. */ public String getRegex() { return this.regex; } /** ** The regular expression (regex) that defines the pattern to match. The expression can contain as many as * 512 characters. *
* * @param regex * The regular expression (regex) that defines the pattern to match. The expression can contain as * many as 512 characters. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCustomDataIdentifierRequest withRegex(String regex) { setRegex(regex); return this; } /** ** The severity to assign to findings that the custom data identifier produces, based on the number of occurrences * of text that match the custom data identifier's detection criteria. You can specify as many as three * SeverityLevel objects in this array, one for each severity: LOW, MEDIUM, or HIGH. If you specify more than one, * the occurrences thresholds must be in ascending order by severity, moving from LOW to HIGH. For example, 1 for * LOW, 50 for MEDIUM, and 100 for HIGH. If an S3 object contains fewer occurrences than the lowest specified * threshold, Amazon Macie doesn't create a finding. *
** If you don't specify any values for this array, Macie creates findings for S3 objects that contain at least one * occurrence of text that matches the detection criteria, and Macie assigns the MEDIUM severity to those findings. *
* * @return The severity to assign to findings that the custom data identifier produces, based on the number of * occurrences of text that match the custom data identifier's detection criteria. You can specify as many * as three SeverityLevel objects in this array, one for each severity: LOW, MEDIUM, or HIGH. If you specify * more than one, the occurrences thresholds must be in ascending order by severity, moving from LOW to * HIGH. For example, 1 for LOW, 50 for MEDIUM, and 100 for HIGH. If an S3 object contains fewer occurrences * than the lowest specified threshold, Amazon Macie doesn't create a finding. *
* If you don't specify any values for this array, Macie creates findings for S3 objects that contain at
* least one occurrence of text that matches the detection criteria, and Macie assigns the MEDIUM severity
* to those findings.
*/
public java.util.List
* The severity to assign to findings that the custom data identifier produces, based on the number of occurrences
* of text that match the custom data identifier's detection criteria. You can specify as many as three
* SeverityLevel objects in this array, one for each severity: LOW, MEDIUM, or HIGH. If you specify more than one,
* the occurrences thresholds must be in ascending order by severity, moving from LOW to HIGH. For example, 1 for
* LOW, 50 for MEDIUM, and 100 for HIGH. If an S3 object contains fewer occurrences than the lowest specified
* threshold, Amazon Macie doesn't create a finding.
*
* If you don't specify any values for this array, Macie creates findings for S3 objects that contain at least one
* occurrence of text that matches the detection criteria, and Macie assigns the MEDIUM severity to those findings.
*
* If you don't specify any values for this array, Macie creates findings for S3 objects that contain at
* least one occurrence of text that matches the detection criteria, and Macie assigns the MEDIUM severity to
* those findings.
*/
public void setSeverityLevels(java.util.Collection
* The severity to assign to findings that the custom data identifier produces, based on the number of occurrences
* of text that match the custom data identifier's detection criteria. You can specify as many as three
* SeverityLevel objects in this array, one for each severity: LOW, MEDIUM, or HIGH. If you specify more than one,
* the occurrences thresholds must be in ascending order by severity, moving from LOW to HIGH. For example, 1 for
* LOW, 50 for MEDIUM, and 100 for HIGH. If an S3 object contains fewer occurrences than the lowest specified
* threshold, Amazon Macie doesn't create a finding.
*
* If you don't specify any values for this array, Macie creates findings for S3 objects that contain at least one
* occurrence of text that matches the detection criteria, and Macie assigns the MEDIUM severity to those findings.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setSeverityLevels(java.util.Collection)} or {@link #withSeverityLevels(java.util.Collection)} if you want
* to override the existing values.
*
* If you don't specify any values for this array, Macie creates findings for S3 objects that contain at
* least one occurrence of text that matches the detection criteria, and Macie assigns the MEDIUM severity to
* those findings.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateCustomDataIdentifierRequest withSeverityLevels(SeverityLevel... severityLevels) {
if (this.severityLevels == null) {
setSeverityLevels(new java.util.ArrayList
* The severity to assign to findings that the custom data identifier produces, based on the number of occurrences
* of text that match the custom data identifier's detection criteria. You can specify as many as three
* SeverityLevel objects in this array, one for each severity: LOW, MEDIUM, or HIGH. If you specify more than one,
* the occurrences thresholds must be in ascending order by severity, moving from LOW to HIGH. For example, 1 for
* LOW, 50 for MEDIUM, and 100 for HIGH. If an S3 object contains fewer occurrences than the lowest specified
* threshold, Amazon Macie doesn't create a finding.
*
* If you don't specify any values for this array, Macie creates findings for S3 objects that contain at least one
* occurrence of text that matches the detection criteria, and Macie assigns the MEDIUM severity to those findings.
*
* If you don't specify any values for this array, Macie creates findings for S3 objects that contain at
* least one occurrence of text that matches the detection criteria, and Macie assigns the MEDIUM severity to
* those findings.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateCustomDataIdentifierRequest withSeverityLevels(java.util.Collection
* A map of key-value pairs that specifies the tags to associate with the custom data identifier.
*
* A custom data identifier can have a maximum of 50 tags. Each tag consists of a tag key and an associated tag
* value. The maximum length of a tag key is 128 characters. The maximum length of a tag value is 256 characters.
*
* A custom data identifier can have a maximum of 50 tags. Each tag consists of a tag key and an associated
* tag value. The maximum length of a tag key is 128 characters. The maximum length of a tag value is 256
* characters.
*/
public java.util.Map
* A map of key-value pairs that specifies the tags to associate with the custom data identifier.
*
* A custom data identifier can have a maximum of 50 tags. Each tag consists of a tag key and an associated tag
* value. The maximum length of a tag key is 128 characters. The maximum length of a tag value is 256 characters.
*
* A custom data identifier can have a maximum of 50 tags. Each tag consists of a tag key and an associated
* tag value. The maximum length of a tag key is 128 characters. The maximum length of a tag value is 256
* characters.
*/
public void setTags(java.util.Map
* A map of key-value pairs that specifies the tags to associate with the custom data identifier.
*
* A custom data identifier can have a maximum of 50 tags. Each tag consists of a tag key and an associated tag
* value. The maximum length of a tag key is 128 characters. The maximum length of a tag value is 256 characters.
*
* A custom data identifier can have a maximum of 50 tags. Each tag consists of a tag key and an associated
* tag value. The maximum length of a tag key is 128 characters. The maximum length of a tag value is 256
* characters.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateCustomDataIdentifierRequest withTags(java.util.Map