Skip to content

Commit 707b7b4

Browse files
feat(aws-android-sdk-comprehend): update models to latest (#2409)
Co-authored-by: Richard McClellan <[email protected]>
1 parent d4e68a4 commit 707b7b4

15 files changed

+953
-6
lines changed

aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/CreateDocumentClassifierRequest.java

Lines changed: 181 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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
}

aws-android-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/CreateEndpointRequest.java

Lines changed: 95 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,19 @@ public class CreateEndpointRequest extends AmazonWebServiceRequest implements Se
8888
*/
8989
private java.util.List<Tag> tags;
9090

91+
/**
92+
* <p>
93+
* The Amazon Resource Name (ARN) of the AWS identity and Access Management
94+
* (IAM) role that grants Amazon Comprehend read access to trained custom
95+
* models encrypted with a customer managed key (ModelKmsKeyId).
96+
* </p>
97+
* <p>
98+
* <b>Constraints:</b><br/>
99+
* <b>Length: </b>20 - 2048<br/>
100+
* <b>Pattern: </b>arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+<br/>
101+
*/
102+
private String dataAccessRoleArn;
103+
91104
/**
92105
* <p>
93106
* This is the descriptive suffix that becomes part of the
@@ -461,6 +474,78 @@ public CreateEndpointRequest withTags(java.util.Collection<Tag> tags) {
461474
return this;
462475
}
463476

477+
/**
478+
* <p>
479+
* The Amazon Resource Name (ARN) of the AWS identity and Access Management
480+
* (IAM) role that grants Amazon Comprehend read access to trained custom
481+
* models encrypted with a customer managed key (ModelKmsKeyId).
482+
* </p>
483+
* <p>
484+
* <b>Constraints:</b><br/>
485+
* <b>Length: </b>20 - 2048<br/>
486+
* <b>Pattern: </b>arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+<br/>
487+
*
488+
* @return <p>
489+
* The Amazon Resource Name (ARN) of the AWS identity and Access
490+
* Management (IAM) role that grants Amazon Comprehend read access
491+
* to trained custom models encrypted with a customer managed key
492+
* (ModelKmsKeyId).
493+
* </p>
494+
*/
495+
public String getDataAccessRoleArn() {
496+
return dataAccessRoleArn;
497+
}
498+
499+
/**
500+
* <p>
501+
* The Amazon Resource Name (ARN) of the AWS identity and Access Management
502+
* (IAM) role that grants Amazon Comprehend read access to trained custom
503+
* models encrypted with a customer managed key (ModelKmsKeyId).
504+
* </p>
505+
* <p>
506+
* <b>Constraints:</b><br/>
507+
* <b>Length: </b>20 - 2048<br/>
508+
* <b>Pattern: </b>arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+<br/>
509+
*
510+
* @param dataAccessRoleArn <p>
511+
* The Amazon Resource Name (ARN) of the AWS identity and Access
512+
* Management (IAM) role that grants Amazon Comprehend read
513+
* access to trained custom models encrypted with a customer
514+
* managed key (ModelKmsKeyId).
515+
* </p>
516+
*/
517+
public void setDataAccessRoleArn(String dataAccessRoleArn) {
518+
this.dataAccessRoleArn = dataAccessRoleArn;
519+
}
520+
521+
/**
522+
* <p>
523+
* The Amazon Resource Name (ARN) of the AWS identity and Access Management
524+
* (IAM) role that grants Amazon Comprehend read access to trained custom
525+
* models encrypted with a customer managed key (ModelKmsKeyId).
526+
* </p>
527+
* <p>
528+
* Returns a reference to this object so that method calls can be chained
529+
* together.
530+
* <p>
531+
* <b>Constraints:</b><br/>
532+
* <b>Length: </b>20 - 2048<br/>
533+
* <b>Pattern: </b>arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+<br/>
534+
*
535+
* @param dataAccessRoleArn <p>
536+
* The Amazon Resource Name (ARN) of the AWS identity and Access
537+
* Management (IAM) role that grants Amazon Comprehend read
538+
* access to trained custom models encrypted with a customer
539+
* managed key (ModelKmsKeyId).
540+
* </p>
541+
* @return A reference to this updated object so that method calls can be
542+
* chained together.
543+
*/
544+
public CreateEndpointRequest withDataAccessRoleArn(String dataAccessRoleArn) {
545+
this.dataAccessRoleArn = dataAccessRoleArn;
546+
return this;
547+
}
548+
464549
/**
465550
* Returns a string representation of this object; useful for testing and
466551
* debugging.
@@ -481,7 +566,9 @@ public String toString() {
481566
if (getClientRequestToken() != null)
482567
sb.append("ClientRequestToken: " + getClientRequestToken() + ",");
483568
if (getTags() != null)
484-
sb.append("Tags: " + getTags());
569+
sb.append("Tags: " + getTags() + ",");
570+
if (getDataAccessRoleArn() != null)
571+
sb.append("DataAccessRoleArn: " + getDataAccessRoleArn());
485572
sb.append("}");
486573
return sb.toString();
487574
}
@@ -500,6 +587,8 @@ public int hashCode() {
500587
hashCode = prime * hashCode
501588
+ ((getClientRequestToken() == null) ? 0 : getClientRequestToken().hashCode());
502589
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
590+
hashCode = prime * hashCode
591+
+ ((getDataAccessRoleArn() == null) ? 0 : getDataAccessRoleArn().hashCode());
503592
return hashCode;
504593
}
505594

@@ -537,6 +626,11 @@ public boolean equals(Object obj) {
537626
return false;
538627
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
539628
return false;
629+
if (other.getDataAccessRoleArn() == null ^ this.getDataAccessRoleArn() == null)
630+
return false;
631+
if (other.getDataAccessRoleArn() != null
632+
&& other.getDataAccessRoleArn().equals(this.getDataAccessRoleArn()) == false)
633+
return false;
540634
return true;
541635
}
542636
}

0 commit comments

Comments
 (0)