@@ -155,6 +155,31 @@ public class CreateDocumentClassifierRequest extends AmazonWebServiceRequest imp
155155 */
156156 private String mode ;
157157
158+ /**
159+ * <p>
160+ * ID for the AWS Key Management Service (KMS) key that Amazon Comprehend
161+ * uses to encrypt trained custom models. The ModelKmsKeyId can be either of
162+ * the following formats:
163+ * </p>
164+ * <ul>
165+ * <li>
166+ * <p>
167+ * KMS Key ID: <code>"1234abcd-12ab-34cd-56ef-1234567890ab"</code>
168+ * </p>
169+ * </li>
170+ * <li>
171+ * <p>
172+ * Amazon Resource Name (ARN) of a KMS Key:
173+ * <code>"arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"</code>
174+ * </p>
175+ * </li>
176+ * </ul>
177+ * <p>
178+ * <b>Constraints:</b><br/>
179+ * <b>Length: </b> - 2048<br/>
180+ */
181+ private String modelKmsKeyId ;
182+
158183 /**
159184 * <p>
160185 * The name of the document classifier.
@@ -1048,6 +1073,152 @@ public CreateDocumentClassifierRequest withMode(DocumentClassifierMode mode) {
10481073 return this ;
10491074 }
10501075
1076+ /**
1077+ * <p>
1078+ * ID for the AWS Key Management Service (KMS) key that Amazon Comprehend
1079+ * uses to encrypt trained custom models. The ModelKmsKeyId can be either of
1080+ * the following formats:
1081+ * </p>
1082+ * <ul>
1083+ * <li>
1084+ * <p>
1085+ * KMS Key ID: <code>"1234abcd-12ab-34cd-56ef-1234567890ab"</code>
1086+ * </p>
1087+ * </li>
1088+ * <li>
1089+ * <p>
1090+ * Amazon Resource Name (ARN) of a KMS Key:
1091+ * <code>"arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"</code>
1092+ * </p>
1093+ * </li>
1094+ * </ul>
1095+ * <p>
1096+ * <b>Constraints:</b><br/>
1097+ * <b>Length: </b> - 2048<br/>
1098+ *
1099+ * @return <p>
1100+ * ID for the AWS Key Management Service (KMS) key that Amazon
1101+ * Comprehend uses to encrypt trained custom models. The
1102+ * ModelKmsKeyId can be either of the following formats:
1103+ * </p>
1104+ * <ul>
1105+ * <li>
1106+ * <p>
1107+ * KMS Key ID: <code>"1234abcd-12ab-34cd-56ef-1234567890ab"</code>
1108+ * </p>
1109+ * </li>
1110+ * <li>
1111+ * <p>
1112+ * Amazon Resource Name (ARN) of a KMS Key:
1113+ * <code>"arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"</code>
1114+ * </p>
1115+ * </li>
1116+ * </ul>
1117+ */
1118+ public String getModelKmsKeyId () {
1119+ return modelKmsKeyId ;
1120+ }
1121+
1122+ /**
1123+ * <p>
1124+ * ID for the AWS Key Management Service (KMS) key that Amazon Comprehend
1125+ * uses to encrypt trained custom models. The ModelKmsKeyId can be either of
1126+ * the following formats:
1127+ * </p>
1128+ * <ul>
1129+ * <li>
1130+ * <p>
1131+ * KMS Key ID: <code>"1234abcd-12ab-34cd-56ef-1234567890ab"</code>
1132+ * </p>
1133+ * </li>
1134+ * <li>
1135+ * <p>
1136+ * Amazon Resource Name (ARN) of a KMS Key:
1137+ * <code>"arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"</code>
1138+ * </p>
1139+ * </li>
1140+ * </ul>
1141+ * <p>
1142+ * <b>Constraints:</b><br/>
1143+ * <b>Length: </b> - 2048<br/>
1144+ *
1145+ * @param modelKmsKeyId <p>
1146+ * ID for the AWS Key Management Service (KMS) key that Amazon
1147+ * Comprehend uses to encrypt trained custom models. The
1148+ * ModelKmsKeyId can be either of the following formats:
1149+ * </p>
1150+ * <ul>
1151+ * <li>
1152+ * <p>
1153+ * KMS Key ID:
1154+ * <code>"1234abcd-12ab-34cd-56ef-1234567890ab"</code>
1155+ * </p>
1156+ * </li>
1157+ * <li>
1158+ * <p>
1159+ * Amazon Resource Name (ARN) of a KMS Key:
1160+ * <code>"arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"</code>
1161+ * </p>
1162+ * </li>
1163+ * </ul>
1164+ */
1165+ public void setModelKmsKeyId (String modelKmsKeyId ) {
1166+ this .modelKmsKeyId = modelKmsKeyId ;
1167+ }
1168+
1169+ /**
1170+ * <p>
1171+ * ID for the AWS Key Management Service (KMS) key that Amazon Comprehend
1172+ * uses to encrypt trained custom models. The ModelKmsKeyId can be either of
1173+ * the following formats:
1174+ * </p>
1175+ * <ul>
1176+ * <li>
1177+ * <p>
1178+ * KMS Key ID: <code>"1234abcd-12ab-34cd-56ef-1234567890ab"</code>
1179+ * </p>
1180+ * </li>
1181+ * <li>
1182+ * <p>
1183+ * Amazon Resource Name (ARN) of a KMS Key:
1184+ * <code>"arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"</code>
1185+ * </p>
1186+ * </li>
1187+ * </ul>
1188+ * <p>
1189+ * Returns a reference to this object so that method calls can be chained
1190+ * together.
1191+ * <p>
1192+ * <b>Constraints:</b><br/>
1193+ * <b>Length: </b> - 2048<br/>
1194+ *
1195+ * @param modelKmsKeyId <p>
1196+ * ID for the AWS Key Management Service (KMS) key that Amazon
1197+ * Comprehend uses to encrypt trained custom models. The
1198+ * ModelKmsKeyId can be either of the following formats:
1199+ * </p>
1200+ * <ul>
1201+ * <li>
1202+ * <p>
1203+ * KMS Key ID:
1204+ * <code>"1234abcd-12ab-34cd-56ef-1234567890ab"</code>
1205+ * </p>
1206+ * </li>
1207+ * <li>
1208+ * <p>
1209+ * Amazon Resource Name (ARN) of a KMS Key:
1210+ * <code>"arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"</code>
1211+ * </p>
1212+ * </li>
1213+ * </ul>
1214+ * @return A reference to this updated object so that method calls can be
1215+ * chained together.
1216+ */
1217+ public CreateDocumentClassifierRequest withModelKmsKeyId (String modelKmsKeyId ) {
1218+ this .modelKmsKeyId = modelKmsKeyId ;
1219+ return this ;
1220+ }
1221+
10511222 /**
10521223 * Returns a string representation of this object; useful for testing and
10531224 * debugging.
@@ -1078,7 +1249,9 @@ public String toString() {
10781249 if (getVpcConfig () != null )
10791250 sb .append ("VpcConfig: " + getVpcConfig () + "," );
10801251 if (getMode () != null )
1081- sb .append ("Mode: " + getMode ());
1252+ sb .append ("Mode: " + getMode () + "," );
1253+ if (getModelKmsKeyId () != null )
1254+ sb .append ("ModelKmsKeyId: " + getModelKmsKeyId ());
10821255 sb .append ("}" );
10831256 return sb .toString ();
10841257 }
@@ -1107,6 +1280,8 @@ public int hashCode() {
11071280 + ((getVolumeKmsKeyId () == null ) ? 0 : getVolumeKmsKeyId ().hashCode ());
11081281 hashCode = prime * hashCode + ((getVpcConfig () == null ) ? 0 : getVpcConfig ().hashCode ());
11091282 hashCode = prime * hashCode + ((getMode () == null ) ? 0 : getMode ().hashCode ());
1283+ hashCode = prime * hashCode
1284+ + ((getModelKmsKeyId () == null ) ? 0 : getModelKmsKeyId ().hashCode ());
11101285 return hashCode ;
11111286 }
11121287
@@ -1169,6 +1344,11 @@ public boolean equals(Object obj) {
11691344 return false ;
11701345 if (other .getMode () != null && other .getMode ().equals (this .getMode ()) == false )
11711346 return false ;
1347+ if (other .getModelKmsKeyId () == null ^ this .getModelKmsKeyId () == null )
1348+ return false ;
1349+ if (other .getModelKmsKeyId () != null
1350+ && other .getModelKmsKeyId ().equals (this .getModelKmsKeyId ()) == false )
1351+ return false ;
11721352 return true ;
11731353 }
11741354}
0 commit comments