@@ -339,6 +339,7 @@ private void init() {
339339 jsonErrorUnmarshallers .add (new ResourceInUseExceptionUnmarshaller ());
340340 jsonErrorUnmarshallers .add (new ResourceNotFoundExceptionUnmarshaller ());
341341 jsonErrorUnmarshallers .add (new ResourceNotReadyExceptionUnmarshaller ());
342+ jsonErrorUnmarshallers .add (new ServiceQuotaExceededExceptionUnmarshaller ());
342343 jsonErrorUnmarshallers .add (new ThrottlingExceptionUnmarshaller ());
343344 jsonErrorUnmarshallers .add (new VideoTooLargeExceptionUnmarshaller ());
344345 jsonErrorUnmarshallers .add (new JsonErrorUnmarshaller ());
@@ -1700,6 +1701,129 @@ public DetectModerationLabelsResult detectModerationLabels(
17001701 }
17011702 }
17021703
1704+ /**
1705+ * <p>
1706+ * Detects Personal Protective Equipment (PPE) worn by people detected in an
1707+ * image. Amazon Rekognition can detect the following types of PPE.
1708+ * </p>
1709+ * <ul>
1710+ * <li>
1711+ * <p>
1712+ * Face cover
1713+ * </p>
1714+ * </li>
1715+ * <li>
1716+ * <p>
1717+ * Hand cover
1718+ * </p>
1719+ * </li>
1720+ * <li>
1721+ * <p>
1722+ * Head cover
1723+ * </p>
1724+ * </li>
1725+ * </ul>
1726+ * <p>
1727+ * You pass the input image as base64-encoded image bytes or as a reference
1728+ * to an image in an Amazon S3 bucket. The image must be either a PNG or JPG
1729+ * formatted file.
1730+ * </p>
1731+ * <p>
1732+ * <code>DetectProtectiveEquipment</code> detects PPE worn by up to 15
1733+ * persons detected in an image.
1734+ * </p>
1735+ * <p>
1736+ * For each person detected in the image the API returns an array of body
1737+ * parts (face, head, left-hand, right-hand). For each body part, an array
1738+ * of detected items of PPE is returned, including an indicator of whether
1739+ * or not the PPE covers the body part. The API returns the confidence it
1740+ * has in each detection (person, PPE, body part and body part coverage). It
1741+ * also returns a bounding box (<a>BoundingBox</a>) for each detected person
1742+ * and each detected item of PPE.
1743+ * </p>
1744+ * <p>
1745+ * You can optionally request a summary of detected PPE items with the
1746+ * <code>SummarizationAttributes</code> input parameter. The summary
1747+ * provides the following information.
1748+ * </p>
1749+ * <ul>
1750+ * <li>
1751+ * <p>
1752+ * The persons detected as wearing all of the types of PPE that you specify.
1753+ * </p>
1754+ * </li>
1755+ * <li>
1756+ * <p>
1757+ * The persons detected as not wearing all of the types PPE that you
1758+ * specify.
1759+ * </p>
1760+ * </li>
1761+ * <li>
1762+ * <p>
1763+ * The persons detected where PPE adornment could not be determined.
1764+ * </p>
1765+ * </li>
1766+ * </ul>
1767+ * <p>
1768+ * This is a stateless API operation. That is, the operation does not
1769+ * persist any data.
1770+ * </p>
1771+ * <p>
1772+ * This operation requires permissions to perform the
1773+ * <code>rekognition:DetectProtectiveEquipment</code> action.
1774+ * </p>
1775+ *
1776+ * @param detectProtectiveEquipmentRequest
1777+ * @return detectProtectiveEquipmentResult The response from the
1778+ * DetectProtectiveEquipment service method, as returned by Amazon
1779+ * Rekognition.
1780+ * @throws InvalidS3ObjectException
1781+ * @throws InvalidParameterException
1782+ * @throws ImageTooLargeException
1783+ * @throws AccessDeniedException
1784+ * @throws InternalServerErrorException
1785+ * @throws ThrottlingException
1786+ * @throws ProvisionedThroughputExceededException
1787+ * @throws InvalidImageFormatException
1788+ * @throws AmazonClientException If any internal errors are encountered
1789+ * inside the client while attempting to make the request or
1790+ * handle the response. For example if a network connection is
1791+ * not available.
1792+ * @throws AmazonServiceException If an error response is returned by Amazon
1793+ * Rekognition indicating either a problem with the data in the
1794+ * request, or a server side issue.
1795+ */
1796+ public DetectProtectiveEquipmentResult detectProtectiveEquipment (
1797+ DetectProtectiveEquipmentRequest detectProtectiveEquipmentRequest )
1798+ throws AmazonServiceException , AmazonClientException {
1799+ ExecutionContext executionContext = createExecutionContext (detectProtectiveEquipmentRequest );
1800+ AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics ();
1801+ awsRequestMetrics .startEvent (Field .ClientExecuteTime );
1802+ Request <DetectProtectiveEquipmentRequest > request = null ;
1803+ Response <DetectProtectiveEquipmentResult > response = null ;
1804+ try {
1805+ awsRequestMetrics .startEvent (Field .RequestMarshallTime );
1806+ try {
1807+ request = new DetectProtectiveEquipmentRequestMarshaller ()
1808+ .marshall (detectProtectiveEquipmentRequest );
1809+ // Binds the request metrics to the current request.
1810+ request .setAWSRequestMetrics (awsRequestMetrics );
1811+ } finally {
1812+ awsRequestMetrics .endEvent (Field .RequestMarshallTime );
1813+ }
1814+ Unmarshaller <DetectProtectiveEquipmentResult , JsonUnmarshallerContext > unmarshaller = new DetectProtectiveEquipmentResultJsonUnmarshaller ();
1815+ JsonResponseHandler <DetectProtectiveEquipmentResult > responseHandler = new JsonResponseHandler <DetectProtectiveEquipmentResult >(
1816+ unmarshaller );
1817+
1818+ response = invoke (request , responseHandler , executionContext );
1819+
1820+ return response .getAwsResponse ();
1821+ } finally {
1822+ awsRequestMetrics .endEvent (Field .ClientExecuteTime );
1823+ endClientExecution (awsRequestMetrics , request , response , LOGGING_AWS_REQUEST_METRIC );
1824+ }
1825+ }
1826+
17031827 /**
17041828 * <p>
17051829 * Detects text in the input image and converts it into machine-readable
@@ -2798,6 +2922,7 @@ public GetTextDetectionResult getTextDetection(GetTextDetectionRequest getTextDe
27982922 * @throws ProvisionedThroughputExceededException
27992923 * @throws ResourceNotFoundException
28002924 * @throws InvalidImageFormatException
2925+ * @throws ServiceQuotaExceededException
28012926 * @throws AmazonClientException If any internal errors are encountered
28022927 * inside the client while attempting to make the request or
28032928 * handle the response. For example if a network connection is
0 commit comments