@@ -19,6 +19,9 @@ public class ScanTextRequest {
1919 @ JsonProperty ("policyUUIDs" )
2020 private List <UUID > policyUUIDs ;
2121
22+ @ JsonProperty ("violation" )
23+ private ViolationConfig violationConfig ;
24+
2225 /**
2326 * Create a request to scan the provided <code>payload</code> against the provided scanning
2427 * <code>policy</code>.
@@ -31,6 +34,20 @@ public ScanTextRequest(List<String> payload, ScanTextConfig policy) {
3134 this .policy = policy ;
3235 }
3336
37+ /**
38+ * Create a request to scan the provided <code>payload</code> against the provided scanning
39+ * <code>policy</code>.
40+ *
41+ * @param payload the content to scan
42+ * @param policy the configuration to use to scan the content
43+ * @param violationConfig the violation configuration to use on the scanned content
44+ */
45+ public ScanTextRequest (List <String > payload , ScanTextConfig policy , ViolationConfig violationConfig ) {
46+ this .payload = payload ;
47+ this .policy = policy ;
48+ this .violationConfig = violationConfig ;
49+ }
50+
3451 /**
3552 * Create a request to scan the provided <code>payload</code> against the provided
3653 * <code>policyUUIDs</code>.
@@ -43,6 +60,20 @@ public ScanTextRequest(List<String> payload, List<UUID> policyUUIDs) {
4360 this .policyUUIDs = policyUUIDs ;
4461 }
4562
63+ /**
64+ * Create a request to scan the provided <code>payload</code> against the provided
65+ * <code>policyUUIDs</code>.
66+ *
67+ * @param payload the content to scan
68+ * @param policyUUIDs a list of UUIDs referring to pre-created policies to-be-used when scanning. Maximum 1.
69+ * @param violationConfig the violation configuration to use on the scanned content
70+ */
71+ public ScanTextRequest (List <String > payload , List <UUID > policyUUIDs , ViolationConfig violationConfig ) {
72+ this .payload = payload ;
73+ this .policyUUIDs = policyUUIDs ;
74+ this .violationConfig = violationConfig ;
75+ }
76+
4677 /**
4778 * Get the request payload.
4879 *
@@ -122,4 +153,22 @@ public List<UUID> getPolicyUUIDs() {
122153 public void setPolicyUUIDs (List <UUID > policyUUIDs ) {
123154 this .policyUUIDs = policyUUIDs ;
124155 }
156+
157+ /**
158+ * Get the violation config to use when performing a scan.
159+ *
160+ * @return the violation config.
161+ */
162+ public ViolationConfig getViolationConfig () {
163+ return violationConfig ;
164+ }
165+
166+ /**
167+ * Set the violation config to use when performing a scan.
168+ *
169+ * @param violationConfig the violation config.
170+ */
171+ public void setViolationConfig (ViolationConfig violationConfig ) {
172+ this .violationConfig = violationConfig ;
173+ }
125174}
0 commit comments