1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/comprehend/Comprehend_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSVector.h>
9 #include <aws/comprehend/model/PiiEntitiesDetectionMaskMode.h>
10 #include <aws/core/utils/memory/stl/AWSString.h>
11 #include <aws/comprehend/model/PiiEntityType.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace Utils
17 {
18 namespace Json
19 {
20   class JsonValue;
21   class JsonView;
22 } // namespace Json
23 } // namespace Utils
24 namespace Comprehend
25 {
26 namespace Model
27 {
28 
29   /**
30    * <p>Provides configuration parameters for PII entity redaction.</p><p><h3>See
31    * Also:</h3>   <a
32    * href="http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/RedactionConfig">AWS
33    * API Reference</a></p>
34    */
35   class AWS_COMPREHEND_API RedactionConfig
36   {
37   public:
38     RedactionConfig();
39     RedactionConfig(Aws::Utils::Json::JsonView jsonValue);
40     RedactionConfig& operator=(Aws::Utils::Json::JsonView jsonValue);
41     Aws::Utils::Json::JsonValue Jsonize() const;
42 
43 
44     /**
45      * <p>An array of the types of PII entities that Amazon Comprehend detects in the
46      * input text for your request.</p>
47      */
GetPiiEntityTypes()48     inline const Aws::Vector<PiiEntityType>& GetPiiEntityTypes() const{ return m_piiEntityTypes; }
49 
50     /**
51      * <p>An array of the types of PII entities that Amazon Comprehend detects in the
52      * input text for your request.</p>
53      */
PiiEntityTypesHasBeenSet()54     inline bool PiiEntityTypesHasBeenSet() const { return m_piiEntityTypesHasBeenSet; }
55 
56     /**
57      * <p>An array of the types of PII entities that Amazon Comprehend detects in the
58      * input text for your request.</p>
59      */
SetPiiEntityTypes(const Aws::Vector<PiiEntityType> & value)60     inline void SetPiiEntityTypes(const Aws::Vector<PiiEntityType>& value) { m_piiEntityTypesHasBeenSet = true; m_piiEntityTypes = value; }
61 
62     /**
63      * <p>An array of the types of PII entities that Amazon Comprehend detects in the
64      * input text for your request.</p>
65      */
SetPiiEntityTypes(Aws::Vector<PiiEntityType> && value)66     inline void SetPiiEntityTypes(Aws::Vector<PiiEntityType>&& value) { m_piiEntityTypesHasBeenSet = true; m_piiEntityTypes = std::move(value); }
67 
68     /**
69      * <p>An array of the types of PII entities that Amazon Comprehend detects in the
70      * input text for your request.</p>
71      */
WithPiiEntityTypes(const Aws::Vector<PiiEntityType> & value)72     inline RedactionConfig& WithPiiEntityTypes(const Aws::Vector<PiiEntityType>& value) { SetPiiEntityTypes(value); return *this;}
73 
74     /**
75      * <p>An array of the types of PII entities that Amazon Comprehend detects in the
76      * input text for your request.</p>
77      */
WithPiiEntityTypes(Aws::Vector<PiiEntityType> && value)78     inline RedactionConfig& WithPiiEntityTypes(Aws::Vector<PiiEntityType>&& value) { SetPiiEntityTypes(std::move(value)); return *this;}
79 
80     /**
81      * <p>An array of the types of PII entities that Amazon Comprehend detects in the
82      * input text for your request.</p>
83      */
AddPiiEntityTypes(const PiiEntityType & value)84     inline RedactionConfig& AddPiiEntityTypes(const PiiEntityType& value) { m_piiEntityTypesHasBeenSet = true; m_piiEntityTypes.push_back(value); return *this; }
85 
86     /**
87      * <p>An array of the types of PII entities that Amazon Comprehend detects in the
88      * input text for your request.</p>
89      */
AddPiiEntityTypes(PiiEntityType && value)90     inline RedactionConfig& AddPiiEntityTypes(PiiEntityType&& value) { m_piiEntityTypesHasBeenSet = true; m_piiEntityTypes.push_back(std::move(value)); return *this; }
91 
92 
93     /**
94      * <p>Specifies whether the PII entity is redacted with the mask character or the
95      * entity type.</p>
96      */
GetMaskMode()97     inline const PiiEntitiesDetectionMaskMode& GetMaskMode() const{ return m_maskMode; }
98 
99     /**
100      * <p>Specifies whether the PII entity is redacted with the mask character or the
101      * entity type.</p>
102      */
MaskModeHasBeenSet()103     inline bool MaskModeHasBeenSet() const { return m_maskModeHasBeenSet; }
104 
105     /**
106      * <p>Specifies whether the PII entity is redacted with the mask character or the
107      * entity type.</p>
108      */
SetMaskMode(const PiiEntitiesDetectionMaskMode & value)109     inline void SetMaskMode(const PiiEntitiesDetectionMaskMode& value) { m_maskModeHasBeenSet = true; m_maskMode = value; }
110 
111     /**
112      * <p>Specifies whether the PII entity is redacted with the mask character or the
113      * entity type.</p>
114      */
SetMaskMode(PiiEntitiesDetectionMaskMode && value)115     inline void SetMaskMode(PiiEntitiesDetectionMaskMode&& value) { m_maskModeHasBeenSet = true; m_maskMode = std::move(value); }
116 
117     /**
118      * <p>Specifies whether the PII entity is redacted with the mask character or the
119      * entity type.</p>
120      */
WithMaskMode(const PiiEntitiesDetectionMaskMode & value)121     inline RedactionConfig& WithMaskMode(const PiiEntitiesDetectionMaskMode& value) { SetMaskMode(value); return *this;}
122 
123     /**
124      * <p>Specifies whether the PII entity is redacted with the mask character or the
125      * entity type.</p>
126      */
WithMaskMode(PiiEntitiesDetectionMaskMode && value)127     inline RedactionConfig& WithMaskMode(PiiEntitiesDetectionMaskMode&& value) { SetMaskMode(std::move(value)); return *this;}
128 
129 
130     /**
131      * <p>A character that replaces each character in the redacted PII entity.</p>
132      */
GetMaskCharacter()133     inline const Aws::String& GetMaskCharacter() const{ return m_maskCharacter; }
134 
135     /**
136      * <p>A character that replaces each character in the redacted PII entity.</p>
137      */
MaskCharacterHasBeenSet()138     inline bool MaskCharacterHasBeenSet() const { return m_maskCharacterHasBeenSet; }
139 
140     /**
141      * <p>A character that replaces each character in the redacted PII entity.</p>
142      */
SetMaskCharacter(const Aws::String & value)143     inline void SetMaskCharacter(const Aws::String& value) { m_maskCharacterHasBeenSet = true; m_maskCharacter = value; }
144 
145     /**
146      * <p>A character that replaces each character in the redacted PII entity.</p>
147      */
SetMaskCharacter(Aws::String && value)148     inline void SetMaskCharacter(Aws::String&& value) { m_maskCharacterHasBeenSet = true; m_maskCharacter = std::move(value); }
149 
150     /**
151      * <p>A character that replaces each character in the redacted PII entity.</p>
152      */
SetMaskCharacter(const char * value)153     inline void SetMaskCharacter(const char* value) { m_maskCharacterHasBeenSet = true; m_maskCharacter.assign(value); }
154 
155     /**
156      * <p>A character that replaces each character in the redacted PII entity.</p>
157      */
WithMaskCharacter(const Aws::String & value)158     inline RedactionConfig& WithMaskCharacter(const Aws::String& value) { SetMaskCharacter(value); return *this;}
159 
160     /**
161      * <p>A character that replaces each character in the redacted PII entity.</p>
162      */
WithMaskCharacter(Aws::String && value)163     inline RedactionConfig& WithMaskCharacter(Aws::String&& value) { SetMaskCharacter(std::move(value)); return *this;}
164 
165     /**
166      * <p>A character that replaces each character in the redacted PII entity.</p>
167      */
WithMaskCharacter(const char * value)168     inline RedactionConfig& WithMaskCharacter(const char* value) { SetMaskCharacter(value); return *this;}
169 
170   private:
171 
172     Aws::Vector<PiiEntityType> m_piiEntityTypes;
173     bool m_piiEntityTypesHasBeenSet;
174 
175     PiiEntitiesDetectionMaskMode m_maskMode;
176     bool m_maskModeHasBeenSet;
177 
178     Aws::String m_maskCharacter;
179     bool m_maskCharacterHasBeenSet;
180   };
181 
182 } // namespace Model
183 } // namespace Comprehend
184 } // namespace Aws
185