Skip to content

Commit 7dcd7d0

Browse files
authored
feat(aws-android-sdk-rekognition): update models to latest (#2396)
1 parent 891b68b commit 7dcd7d0

File tree

520 files changed

+2545
-557
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

520 files changed

+2545
-557
lines changed

aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/AmazonRekognition.java

Lines changed: 99 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2010-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
* Copyright 2010-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License").
55
* You may not use this file except in compliance with the License.
@@ -90,11 +90,22 @@ public interface AmazonRekognition {
9090
* Compares a face in the <i>source</i> input image with each of the 100
9191
* largest faces detected in the <i>target</i> input image.
9292
* </p>
93-
* <note>
9493
* <p>
9594
* If the source image contains multiple faces, the service detects the
9695
* largest face and compares it with each face detected in the target image.
9796
* </p>
97+
* <note>
98+
* <p>
99+
* CompareFaces uses machine learning algorithms, which are probabilistic. A
100+
* false negative is an incorrect prediction that a face in the target image
101+
* has a low similarity confidence score when compared to the face in the
102+
* source image. To reduce the probability of false negatives, we recommend
103+
* that you compare the target image against multiple source images. If you
104+
* plan to use <code>CompareFaces</code> to make a decision that impacts an
105+
* individual's rights, privacy, or access to services, we recommend that
106+
* you pass the result to a human for review and further validation before
107+
* taking action.
108+
* </p>
98109
* </note>
99110
* <p>
100111
* You pass the input and target images either as base64-encoded image bytes
@@ -215,6 +226,7 @@ CompareFacesResult compareFaces(CompareFacesRequest compareFacesRequest)
215226
* @throws ThrottlingException
216227
* @throws ProvisionedThroughputExceededException
217228
* @throws ResourceAlreadyExistsException
229+
* @throws ServiceQuotaExceededException
218230
* @throws AmazonClientException If any internal errors are encountered
219231
* inside the client while attempting to make the request or
220232
* handle the response. For example if a network connection is
@@ -296,6 +308,7 @@ CreateProjectResult createProject(CreateProjectRequest createProjectRequest)
296308
* @throws InternalServerErrorException
297309
* @throws ThrottlingException
298310
* @throws ProvisionedThroughputExceededException
311+
* @throws ServiceQuotaExceededException
299312
* @throws AmazonClientException If any internal errors are encountered
300313
* inside the client while attempting to make the request or
301314
* handle the response. For example if a network connection is
@@ -345,6 +358,7 @@ CreateProjectVersionResult createProjectVersion(
345358
* @throws LimitExceededException
346359
* @throws ResourceInUseException
347360
* @throws ProvisionedThroughputExceededException
361+
* @throws ServiceQuotaExceededException
348362
* @throws AmazonClientException If any internal errors are encountered
349363
* inside the client while attempting to make the request or
350364
* handle the response. For example if a network connection is
@@ -1983,6 +1997,34 @@ ListStreamProcessorsResult listStreamProcessors(
19831997
ListStreamProcessorsRequest listStreamProcessorsRequest) throws AmazonClientException,
19841998
AmazonServiceException;
19851999

2000+
/**
2001+
* <p>
2002+
* Returns a list of tags in an Amazon Rekognition collection, stream
2003+
* processor, or Custom Labels model.
2004+
* </p>
2005+
*
2006+
* @param listTagsForResourceRequest
2007+
* @return listTagsForResourceResult The response from the
2008+
* ListTagsForResource service method, as returned by Amazon
2009+
* Rekognition.
2010+
* @throws ResourceNotFoundException
2011+
* @throws InvalidParameterException
2012+
* @throws AccessDeniedException
2013+
* @throws InternalServerErrorException
2014+
* @throws ThrottlingException
2015+
* @throws ProvisionedThroughputExceededException
2016+
* @throws AmazonClientException If any internal errors are encountered
2017+
* inside the client while attempting to make the request or
2018+
* handle the response. For example if a network connection is
2019+
* not available.
2020+
* @throws AmazonServiceException If an error response is returned by Amazon
2021+
* Rekognition indicating either a problem with the data in the
2022+
* request, or a server side issue.
2023+
*/
2024+
ListTagsForResourceResult listTagsForResource(
2025+
ListTagsForResourceRequest listTagsForResourceRequest) throws AmazonClientException,
2026+
AmazonServiceException;
2027+
19862028
/**
19872029
* <p>
19882030
* Returns an array of celebrities recognized in the input image. For more
@@ -2709,6 +2751,61 @@ StopStreamProcessorResult stopStreamProcessor(
27092751
StopStreamProcessorRequest stopStreamProcessorRequest) throws AmazonClientException,
27102752
AmazonServiceException;
27112753

2754+
/**
2755+
* <p>
2756+
* Adds one or more key-value tags to an Amazon Rekognition collection,
2757+
* stream processor, or Custom Labels model. For more information, see <a
2758+
* href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">
2759+
* Tagging AWS Resources</a>.
2760+
* </p>
2761+
*
2762+
* @param tagResourceRequest
2763+
* @return tagResourceResult The response from the TagResource service
2764+
* method, as returned by Amazon Rekognition.
2765+
* @throws ResourceNotFoundException
2766+
* @throws InvalidParameterException
2767+
* @throws ServiceQuotaExceededException
2768+
* @throws AccessDeniedException
2769+
* @throws InternalServerErrorException
2770+
* @throws ThrottlingException
2771+
* @throws ProvisionedThroughputExceededException
2772+
* @throws AmazonClientException If any internal errors are encountered
2773+
* inside the client while attempting to make the request or
2774+
* handle the response. For example if a network connection is
2775+
* not available.
2776+
* @throws AmazonServiceException If an error response is returned by Amazon
2777+
* Rekognition indicating either a problem with the data in the
2778+
* request, or a server side issue.
2779+
*/
2780+
TagResourceResult tagResource(TagResourceRequest tagResourceRequest)
2781+
throws AmazonClientException, AmazonServiceException;
2782+
2783+
/**
2784+
* <p>
2785+
* Removes one or more tags from an Amazon Rekognition collection, stream
2786+
* processor, or Custom Labels model.
2787+
* </p>
2788+
*
2789+
* @param untagResourceRequest
2790+
* @return untagResourceResult The response from the UntagResource service
2791+
* method, as returned by Amazon Rekognition.
2792+
* @throws ResourceNotFoundException
2793+
* @throws InvalidParameterException
2794+
* @throws AccessDeniedException
2795+
* @throws InternalServerErrorException
2796+
* @throws ThrottlingException
2797+
* @throws ProvisionedThroughputExceededException
2798+
* @throws AmazonClientException If any internal errors are encountered
2799+
* inside the client while attempting to make the request or
2800+
* handle the response. For example if a network connection is
2801+
* not available.
2802+
* @throws AmazonServiceException If an error response is returned by Amazon
2803+
* Rekognition indicating either a problem with the data in the
2804+
* request, or a server side issue.
2805+
*/
2806+
UntagResourceResult untagResource(UntagResourceRequest untagResourceRequest)
2807+
throws AmazonClientException, AmazonServiceException;
2808+
27122809
/**
27132810
* Shuts down this client object, releasing any resources that might be held
27142811
* open. This is an optional method, and callers are not expected to call

aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/AmazonRekognitionClient.java

Lines changed: 178 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2010-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
* Copyright 2010-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License").
55
* You may not use this file except in compliance with the License.
@@ -366,11 +366,22 @@ private static ClientConfiguration adjustClientConfiguration(ClientConfiguration
366366
* Compares a face in the <i>source</i> input image with each of the 100
367367
* largest faces detected in the <i>target</i> input image.
368368
* </p>
369-
* <note>
370369
* <p>
371370
* If the source image contains multiple faces, the service detects the
372371
* largest face and compares it with each face detected in the target image.
373372
* </p>
373+
* <note>
374+
* <p>
375+
* CompareFaces uses machine learning algorithms, which are probabilistic. A
376+
* false negative is an incorrect prediction that a face in the target image
377+
* has a low similarity confidence score when compared to the face in the
378+
* source image. To reduce the probability of false negatives, we recommend
379+
* that you compare the target image against multiple source images. If you
380+
* plan to use <code>CompareFaces</code> to make a decision that impacts an
381+
* individual's rights, privacy, or access to services, we recommend that
382+
* you pass the result to a human for review and further validation before
383+
* taking action.
384+
* </p>
374385
* </note>
375386
* <p>
376387
* You pass the input and target images either as base64-encoded image bytes
@@ -517,6 +528,7 @@ public CompareFacesResult compareFaces(CompareFacesRequest compareFacesRequest)
517528
* @throws ThrottlingException
518529
* @throws ProvisionedThroughputExceededException
519530
* @throws ResourceAlreadyExistsException
531+
* @throws ServiceQuotaExceededException
520532
* @throws AmazonClientException If any internal errors are encountered
521533
* inside the client while attempting to make the request or
522534
* handle the response. For example if a network connection is
@@ -650,6 +662,7 @@ public CreateProjectResult createProject(CreateProjectRequest createProjectReque
650662
* @throws InternalServerErrorException
651663
* @throws ThrottlingException
652664
* @throws ProvisionedThroughputExceededException
665+
* @throws ServiceQuotaExceededException
653666
* @throws AmazonClientException If any internal errors are encountered
654667
* inside the client while attempting to make the request or
655668
* handle the response. For example if a network connection is
@@ -726,6 +739,7 @@ public CreateProjectVersionResult createProjectVersion(
726739
* @throws LimitExceededException
727740
* @throws ResourceInUseException
728741
* @throws ProvisionedThroughputExceededException
742+
* @throws ServiceQuotaExceededException
729743
* @throws AmazonClientException If any internal errors are encountered
730744
* inside the client while attempting to make the request or
731745
* handle the response. For example if a network connection is
@@ -3137,6 +3151,61 @@ public ListStreamProcessorsResult listStreamProcessors(
31373151
}
31383152
}
31393153

3154+
/**
3155+
* <p>
3156+
* Returns a list of tags in an Amazon Rekognition collection, stream
3157+
* processor, or Custom Labels model.
3158+
* </p>
3159+
*
3160+
* @param listTagsForResourceRequest
3161+
* @return listTagsForResourceResult The response from the
3162+
* ListTagsForResource service method, as returned by Amazon
3163+
* Rekognition.
3164+
* @throws ResourceNotFoundException
3165+
* @throws InvalidParameterException
3166+
* @throws AccessDeniedException
3167+
* @throws InternalServerErrorException
3168+
* @throws ThrottlingException
3169+
* @throws ProvisionedThroughputExceededException
3170+
* @throws AmazonClientException If any internal errors are encountered
3171+
* inside the client while attempting to make the request or
3172+
* handle the response. For example if a network connection is
3173+
* not available.
3174+
* @throws AmazonServiceException If an error response is returned by Amazon
3175+
* Rekognition indicating either a problem with the data in the
3176+
* request, or a server side issue.
3177+
*/
3178+
public ListTagsForResourceResult listTagsForResource(
3179+
ListTagsForResourceRequest listTagsForResourceRequest)
3180+
throws AmazonServiceException, AmazonClientException {
3181+
ExecutionContext executionContext = createExecutionContext(listTagsForResourceRequest);
3182+
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
3183+
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
3184+
Request<ListTagsForResourceRequest> request = null;
3185+
Response<ListTagsForResourceResult> response = null;
3186+
try {
3187+
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
3188+
try {
3189+
request = new ListTagsForResourceRequestMarshaller()
3190+
.marshall(listTagsForResourceRequest);
3191+
// Binds the request metrics to the current request.
3192+
request.setAWSRequestMetrics(awsRequestMetrics);
3193+
} finally {
3194+
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
3195+
}
3196+
Unmarshaller<ListTagsForResourceResult, JsonUnmarshallerContext> unmarshaller = new ListTagsForResourceResultJsonUnmarshaller();
3197+
JsonResponseHandler<ListTagsForResourceResult> responseHandler = new JsonResponseHandler<ListTagsForResourceResult>(
3198+
unmarshaller);
3199+
3200+
response = invoke(request, responseHandler, executionContext);
3201+
3202+
return response.getAwsResponse();
3203+
} finally {
3204+
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
3205+
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
3206+
}
3207+
}
3208+
31403209
/**
31413210
* <p>
31423211
* Returns an array of celebrities recognized in the input image. For more
@@ -4270,6 +4339,113 @@ public StopStreamProcessorResult stopStreamProcessor(
42704339
}
42714340
}
42724341

4342+
/**
4343+
* <p>
4344+
* Adds one or more key-value tags to an Amazon Rekognition collection,
4345+
* stream processor, or Custom Labels model. For more information, see <a
4346+
* href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">
4347+
* Tagging AWS Resources</a>.
4348+
* </p>
4349+
*
4350+
* @param tagResourceRequest
4351+
* @return tagResourceResult The response from the TagResource service
4352+
* method, as returned by Amazon Rekognition.
4353+
* @throws ResourceNotFoundException
4354+
* @throws InvalidParameterException
4355+
* @throws ServiceQuotaExceededException
4356+
* @throws AccessDeniedException
4357+
* @throws InternalServerErrorException
4358+
* @throws ThrottlingException
4359+
* @throws ProvisionedThroughputExceededException
4360+
* @throws AmazonClientException If any internal errors are encountered
4361+
* inside the client while attempting to make the request or
4362+
* handle the response. For example if a network connection is
4363+
* not available.
4364+
* @throws AmazonServiceException If an error response is returned by Amazon
4365+
* Rekognition indicating either a problem with the data in the
4366+
* request, or a server side issue.
4367+
*/
4368+
public TagResourceResult tagResource(TagResourceRequest tagResourceRequest)
4369+
throws AmazonServiceException, AmazonClientException {
4370+
ExecutionContext executionContext = createExecutionContext(tagResourceRequest);
4371+
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
4372+
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
4373+
Request<TagResourceRequest> request = null;
4374+
Response<TagResourceResult> response = null;
4375+
try {
4376+
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
4377+
try {
4378+
request = new TagResourceRequestMarshaller().marshall(tagResourceRequest);
4379+
// Binds the request metrics to the current request.
4380+
request.setAWSRequestMetrics(awsRequestMetrics);
4381+
} finally {
4382+
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
4383+
}
4384+
Unmarshaller<TagResourceResult, JsonUnmarshallerContext> unmarshaller = new TagResourceResultJsonUnmarshaller();
4385+
JsonResponseHandler<TagResourceResult> responseHandler = new JsonResponseHandler<TagResourceResult>(
4386+
unmarshaller);
4387+
4388+
response = invoke(request, responseHandler, executionContext);
4389+
4390+
return response.getAwsResponse();
4391+
} finally {
4392+
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
4393+
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
4394+
}
4395+
}
4396+
4397+
/**
4398+
* <p>
4399+
* Removes one or more tags from an Amazon Rekognition collection, stream
4400+
* processor, or Custom Labels model.
4401+
* </p>
4402+
*
4403+
* @param untagResourceRequest
4404+
* @return untagResourceResult The response from the UntagResource service
4405+
* method, as returned by Amazon Rekognition.
4406+
* @throws ResourceNotFoundException
4407+
* @throws InvalidParameterException
4408+
* @throws AccessDeniedException
4409+
* @throws InternalServerErrorException
4410+
* @throws ThrottlingException
4411+
* @throws ProvisionedThroughputExceededException
4412+
* @throws AmazonClientException If any internal errors are encountered
4413+
* inside the client while attempting to make the request or
4414+
* handle the response. For example if a network connection is
4415+
* not available.
4416+
* @throws AmazonServiceException If an error response is returned by Amazon
4417+
* Rekognition indicating either a problem with the data in the
4418+
* request, or a server side issue.
4419+
*/
4420+
public UntagResourceResult untagResource(UntagResourceRequest untagResourceRequest)
4421+
throws AmazonServiceException, AmazonClientException {
4422+
ExecutionContext executionContext = createExecutionContext(untagResourceRequest);
4423+
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
4424+
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
4425+
Request<UntagResourceRequest> request = null;
4426+
Response<UntagResourceResult> response = null;
4427+
try {
4428+
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
4429+
try {
4430+
request = new UntagResourceRequestMarshaller().marshall(untagResourceRequest);
4431+
// Binds the request metrics to the current request.
4432+
request.setAWSRequestMetrics(awsRequestMetrics);
4433+
} finally {
4434+
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
4435+
}
4436+
Unmarshaller<UntagResourceResult, JsonUnmarshallerContext> unmarshaller = new UntagResourceResultJsonUnmarshaller();
4437+
JsonResponseHandler<UntagResourceResult> responseHandler = new JsonResponseHandler<UntagResourceResult>(
4438+
unmarshaller);
4439+
4440+
response = invoke(request, responseHandler, executionContext);
4441+
4442+
return response.getAwsResponse();
4443+
} finally {
4444+
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
4445+
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
4446+
}
4447+
}
4448+
42734449
/**
42744450
* Returns additional metadata for a previously executed successful,
42754451
* request, typically used for debugging issues where a service isn't acting

aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/model/AccessDeniedException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2010-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
* Copyright 2010-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License").
55
* You may not use this file except in compliance with the License.

aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/model/AgeRange.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2010-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
* Copyright 2010-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License").
55
* You may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)