{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Rekognition.DetectProtectiveEquipment
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Detects Personal Protective Equipment (PPE) worn by people detected in
-- an image. Amazon Rekognition can detect the following types of PPE.
--
-- -   Face cover
--
-- -   Hand cover
--
-- -   Head cover
--
-- You pass the input image as base64-encoded image bytes or as a reference
-- to an image in an Amazon S3 bucket. The image must be either a PNG or
-- JPG formatted file.
--
-- @DetectProtectiveEquipment@ detects PPE worn by up to 15 persons
-- detected in an image.
--
-- For each person detected in the image the API returns an array of body
-- parts (face, head, left-hand, right-hand). For each body part, an array
-- of detected items of PPE is returned, including an indicator of whether
-- or not the PPE covers the body part. The API returns the confidence it
-- has in each detection (person, PPE, body part and body part coverage).
-- It also returns a bounding box (BoundingBox) for each detected person
-- and each detected item of PPE.
--
-- You can optionally request a summary of detected PPE items with the
-- @SummarizationAttributes@ input parameter. The summary provides the
-- following information.
--
-- -   The persons detected as wearing all of the types of PPE that you
--     specify.
--
-- -   The persons detected as not wearing all of the types PPE that you
--     specify.
--
-- -   The persons detected where PPE adornment could not be determined.
--
-- This is a stateless API operation. That is, the operation does not
-- persist any data.
--
-- This operation requires permissions to perform the
-- @rekognition:DetectProtectiveEquipment@ action.
module Amazonka.Rekognition.DetectProtectiveEquipment
  ( -- * Creating a Request
    DetectProtectiveEquipment (..),
    newDetectProtectiveEquipment,

    -- * Request Lenses
    detectProtectiveEquipment_summarizationAttributes,
    detectProtectiveEquipment_image,

    -- * Destructuring the Response
    DetectProtectiveEquipmentResponse (..),
    newDetectProtectiveEquipmentResponse,

    -- * Response Lenses
    detectProtectiveEquipmentResponse_persons,
    detectProtectiveEquipmentResponse_protectiveEquipmentModelVersion,
    detectProtectiveEquipmentResponse_summary,
    detectProtectiveEquipmentResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.Rekognition.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newDetectProtectiveEquipment' smart constructor.
data DetectProtectiveEquipment = DetectProtectiveEquipment'
  { -- | An array of PPE types that you want to summarize.
    DetectProtectiveEquipment
-> Maybe ProtectiveEquipmentSummarizationAttributes
summarizationAttributes :: Prelude.Maybe ProtectiveEquipmentSummarizationAttributes,
    -- | The image in which you want to detect PPE on detected persons. The image
    -- can be passed as image bytes or you can reference an image stored in an
    -- Amazon S3 bucket.
    DetectProtectiveEquipment -> Image
image :: Image
  }
  deriving (DetectProtectiveEquipment -> DetectProtectiveEquipment -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DetectProtectiveEquipment -> DetectProtectiveEquipment -> Bool
$c/= :: DetectProtectiveEquipment -> DetectProtectiveEquipment -> Bool
== :: DetectProtectiveEquipment -> DetectProtectiveEquipment -> Bool
$c== :: DetectProtectiveEquipment -> DetectProtectiveEquipment -> Bool
Prelude.Eq, ReadPrec [DetectProtectiveEquipment]
ReadPrec DetectProtectiveEquipment
Int -> ReadS DetectProtectiveEquipment
ReadS [DetectProtectiveEquipment]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DetectProtectiveEquipment]
$creadListPrec :: ReadPrec [DetectProtectiveEquipment]
readPrec :: ReadPrec DetectProtectiveEquipment
$creadPrec :: ReadPrec DetectProtectiveEquipment
readList :: ReadS [DetectProtectiveEquipment]
$creadList :: ReadS [DetectProtectiveEquipment]
readsPrec :: Int -> ReadS DetectProtectiveEquipment
$creadsPrec :: Int -> ReadS DetectProtectiveEquipment
Prelude.Read, Int -> DetectProtectiveEquipment -> ShowS
[DetectProtectiveEquipment] -> ShowS
DetectProtectiveEquipment -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DetectProtectiveEquipment] -> ShowS
$cshowList :: [DetectProtectiveEquipment] -> ShowS
show :: DetectProtectiveEquipment -> String
$cshow :: DetectProtectiveEquipment -> String
showsPrec :: Int -> DetectProtectiveEquipment -> ShowS
$cshowsPrec :: Int -> DetectProtectiveEquipment -> ShowS
Prelude.Show, forall x.
Rep DetectProtectiveEquipment x -> DetectProtectiveEquipment
forall x.
DetectProtectiveEquipment -> Rep DetectProtectiveEquipment x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DetectProtectiveEquipment x -> DetectProtectiveEquipment
$cfrom :: forall x.
DetectProtectiveEquipment -> Rep DetectProtectiveEquipment x
Prelude.Generic)

-- |
-- Create a value of 'DetectProtectiveEquipment' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'summarizationAttributes', 'detectProtectiveEquipment_summarizationAttributes' - An array of PPE types that you want to summarize.
--
-- 'image', 'detectProtectiveEquipment_image' - The image in which you want to detect PPE on detected persons. The image
-- can be passed as image bytes or you can reference an image stored in an
-- Amazon S3 bucket.
newDetectProtectiveEquipment ::
  -- | 'image'
  Image ->
  DetectProtectiveEquipment
newDetectProtectiveEquipment :: Image -> DetectProtectiveEquipment
newDetectProtectiveEquipment Image
pImage_ =
  DetectProtectiveEquipment'
    { $sel:summarizationAttributes:DetectProtectiveEquipment' :: Maybe ProtectiveEquipmentSummarizationAttributes
summarizationAttributes =
        forall a. Maybe a
Prelude.Nothing,
      $sel:image:DetectProtectiveEquipment' :: Image
image = Image
pImage_
    }

-- | An array of PPE types that you want to summarize.
detectProtectiveEquipment_summarizationAttributes :: Lens.Lens' DetectProtectiveEquipment (Prelude.Maybe ProtectiveEquipmentSummarizationAttributes)
detectProtectiveEquipment_summarizationAttributes :: Lens'
  DetectProtectiveEquipment
  (Maybe ProtectiveEquipmentSummarizationAttributes)
detectProtectiveEquipment_summarizationAttributes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectProtectiveEquipment' {Maybe ProtectiveEquipmentSummarizationAttributes
summarizationAttributes :: Maybe ProtectiveEquipmentSummarizationAttributes
$sel:summarizationAttributes:DetectProtectiveEquipment' :: DetectProtectiveEquipment
-> Maybe ProtectiveEquipmentSummarizationAttributes
summarizationAttributes} -> Maybe ProtectiveEquipmentSummarizationAttributes
summarizationAttributes) (\s :: DetectProtectiveEquipment
s@DetectProtectiveEquipment' {} Maybe ProtectiveEquipmentSummarizationAttributes
a -> DetectProtectiveEquipment
s {$sel:summarizationAttributes:DetectProtectiveEquipment' :: Maybe ProtectiveEquipmentSummarizationAttributes
summarizationAttributes = Maybe ProtectiveEquipmentSummarizationAttributes
a} :: DetectProtectiveEquipment)

-- | The image in which you want to detect PPE on detected persons. The image
-- can be passed as image bytes or you can reference an image stored in an
-- Amazon S3 bucket.
detectProtectiveEquipment_image :: Lens.Lens' DetectProtectiveEquipment Image
detectProtectiveEquipment_image :: Lens' DetectProtectiveEquipment Image
detectProtectiveEquipment_image = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectProtectiveEquipment' {Image
image :: Image
$sel:image:DetectProtectiveEquipment' :: DetectProtectiveEquipment -> Image
image} -> Image
image) (\s :: DetectProtectiveEquipment
s@DetectProtectiveEquipment' {} Image
a -> DetectProtectiveEquipment
s {$sel:image:DetectProtectiveEquipment' :: Image
image = Image
a} :: DetectProtectiveEquipment)

instance Core.AWSRequest DetectProtectiveEquipment where
  type
    AWSResponse DetectProtectiveEquipment =
      DetectProtectiveEquipmentResponse
  request :: (Service -> Service)
-> DetectProtectiveEquipment -> Request DetectProtectiveEquipment
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DetectProtectiveEquipment
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DetectProtectiveEquipment)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [ProtectiveEquipmentPerson]
-> Maybe Text
-> Maybe ProtectiveEquipmentSummary
-> Int
-> DetectProtectiveEquipmentResponse
DetectProtectiveEquipmentResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Persons" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ProtectiveEquipmentModelVersion")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Summary")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DetectProtectiveEquipment where
  hashWithSalt :: Int -> DetectProtectiveEquipment -> Int
hashWithSalt Int
_salt DetectProtectiveEquipment' {Maybe ProtectiveEquipmentSummarizationAttributes
Image
image :: Image
summarizationAttributes :: Maybe ProtectiveEquipmentSummarizationAttributes
$sel:image:DetectProtectiveEquipment' :: DetectProtectiveEquipment -> Image
$sel:summarizationAttributes:DetectProtectiveEquipment' :: DetectProtectiveEquipment
-> Maybe ProtectiveEquipmentSummarizationAttributes
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ProtectiveEquipmentSummarizationAttributes
summarizationAttributes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Image
image

instance Prelude.NFData DetectProtectiveEquipment where
  rnf :: DetectProtectiveEquipment -> ()
rnf DetectProtectiveEquipment' {Maybe ProtectiveEquipmentSummarizationAttributes
Image
image :: Image
summarizationAttributes :: Maybe ProtectiveEquipmentSummarizationAttributes
$sel:image:DetectProtectiveEquipment' :: DetectProtectiveEquipment -> Image
$sel:summarizationAttributes:DetectProtectiveEquipment' :: DetectProtectiveEquipment
-> Maybe ProtectiveEquipmentSummarizationAttributes
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe ProtectiveEquipmentSummarizationAttributes
summarizationAttributes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Image
image

instance Data.ToHeaders DetectProtectiveEquipment where
  toHeaders :: DetectProtectiveEquipment -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"RekognitionService.DetectProtectiveEquipment" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON DetectProtectiveEquipment where
  toJSON :: DetectProtectiveEquipment -> Value
toJSON DetectProtectiveEquipment' {Maybe ProtectiveEquipmentSummarizationAttributes
Image
image :: Image
summarizationAttributes :: Maybe ProtectiveEquipmentSummarizationAttributes
$sel:image:DetectProtectiveEquipment' :: DetectProtectiveEquipment -> Image
$sel:summarizationAttributes:DetectProtectiveEquipment' :: DetectProtectiveEquipment
-> Maybe ProtectiveEquipmentSummarizationAttributes
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"SummarizationAttributes" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProtectiveEquipmentSummarizationAttributes
summarizationAttributes,
            forall a. a -> Maybe a
Prelude.Just (Key
"Image" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Image
image)
          ]
      )

instance Data.ToPath DetectProtectiveEquipment where
  toPath :: DetectProtectiveEquipment -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Data.ToQuery DetectProtectiveEquipment where
  toQuery :: DetectProtectiveEquipment -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newDetectProtectiveEquipmentResponse' smart constructor.
data DetectProtectiveEquipmentResponse = DetectProtectiveEquipmentResponse'
  { -- | An array of persons detected in the image (including persons not wearing
    -- PPE).
    DetectProtectiveEquipmentResponse
-> Maybe [ProtectiveEquipmentPerson]
persons :: Prelude.Maybe [ProtectiveEquipmentPerson],
    -- | The version number of the PPE detection model used to detect PPE in the
    -- image.
    DetectProtectiveEquipmentResponse -> Maybe Text
protectiveEquipmentModelVersion :: Prelude.Maybe Prelude.Text,
    -- | Summary information for the types of PPE specified in the
    -- @SummarizationAttributes@ input parameter.
    DetectProtectiveEquipmentResponse
-> Maybe ProtectiveEquipmentSummary
summary :: Prelude.Maybe ProtectiveEquipmentSummary,
    -- | The response's http status code.
    DetectProtectiveEquipmentResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DetectProtectiveEquipmentResponse
-> DetectProtectiveEquipmentResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DetectProtectiveEquipmentResponse
-> DetectProtectiveEquipmentResponse -> Bool
$c/= :: DetectProtectiveEquipmentResponse
-> DetectProtectiveEquipmentResponse -> Bool
== :: DetectProtectiveEquipmentResponse
-> DetectProtectiveEquipmentResponse -> Bool
$c== :: DetectProtectiveEquipmentResponse
-> DetectProtectiveEquipmentResponse -> Bool
Prelude.Eq, ReadPrec [DetectProtectiveEquipmentResponse]
ReadPrec DetectProtectiveEquipmentResponse
Int -> ReadS DetectProtectiveEquipmentResponse
ReadS [DetectProtectiveEquipmentResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DetectProtectiveEquipmentResponse]
$creadListPrec :: ReadPrec [DetectProtectiveEquipmentResponse]
readPrec :: ReadPrec DetectProtectiveEquipmentResponse
$creadPrec :: ReadPrec DetectProtectiveEquipmentResponse
readList :: ReadS [DetectProtectiveEquipmentResponse]
$creadList :: ReadS [DetectProtectiveEquipmentResponse]
readsPrec :: Int -> ReadS DetectProtectiveEquipmentResponse
$creadsPrec :: Int -> ReadS DetectProtectiveEquipmentResponse
Prelude.Read, Int -> DetectProtectiveEquipmentResponse -> ShowS
[DetectProtectiveEquipmentResponse] -> ShowS
DetectProtectiveEquipmentResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DetectProtectiveEquipmentResponse] -> ShowS
$cshowList :: [DetectProtectiveEquipmentResponse] -> ShowS
show :: DetectProtectiveEquipmentResponse -> String
$cshow :: DetectProtectiveEquipmentResponse -> String
showsPrec :: Int -> DetectProtectiveEquipmentResponse -> ShowS
$cshowsPrec :: Int -> DetectProtectiveEquipmentResponse -> ShowS
Prelude.Show, forall x.
Rep DetectProtectiveEquipmentResponse x
-> DetectProtectiveEquipmentResponse
forall x.
DetectProtectiveEquipmentResponse
-> Rep DetectProtectiveEquipmentResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DetectProtectiveEquipmentResponse x
-> DetectProtectiveEquipmentResponse
$cfrom :: forall x.
DetectProtectiveEquipmentResponse
-> Rep DetectProtectiveEquipmentResponse x
Prelude.Generic)

-- |
-- Create a value of 'DetectProtectiveEquipmentResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'persons', 'detectProtectiveEquipmentResponse_persons' - An array of persons detected in the image (including persons not wearing
-- PPE).
--
-- 'protectiveEquipmentModelVersion', 'detectProtectiveEquipmentResponse_protectiveEquipmentModelVersion' - The version number of the PPE detection model used to detect PPE in the
-- image.
--
-- 'summary', 'detectProtectiveEquipmentResponse_summary' - Summary information for the types of PPE specified in the
-- @SummarizationAttributes@ input parameter.
--
-- 'httpStatus', 'detectProtectiveEquipmentResponse_httpStatus' - The response's http status code.
newDetectProtectiveEquipmentResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DetectProtectiveEquipmentResponse
newDetectProtectiveEquipmentResponse :: Int -> DetectProtectiveEquipmentResponse
newDetectProtectiveEquipmentResponse Int
pHttpStatus_ =
  DetectProtectiveEquipmentResponse'
    { $sel:persons:DetectProtectiveEquipmentResponse' :: Maybe [ProtectiveEquipmentPerson]
persons =
        forall a. Maybe a
Prelude.Nothing,
      $sel:protectiveEquipmentModelVersion:DetectProtectiveEquipmentResponse' :: Maybe Text
protectiveEquipmentModelVersion =
        forall a. Maybe a
Prelude.Nothing,
      $sel:summary:DetectProtectiveEquipmentResponse' :: Maybe ProtectiveEquipmentSummary
summary = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DetectProtectiveEquipmentResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An array of persons detected in the image (including persons not wearing
-- PPE).
detectProtectiveEquipmentResponse_persons :: Lens.Lens' DetectProtectiveEquipmentResponse (Prelude.Maybe [ProtectiveEquipmentPerson])
detectProtectiveEquipmentResponse_persons :: Lens'
  DetectProtectiveEquipmentResponse
  (Maybe [ProtectiveEquipmentPerson])
detectProtectiveEquipmentResponse_persons = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectProtectiveEquipmentResponse' {Maybe [ProtectiveEquipmentPerson]
persons :: Maybe [ProtectiveEquipmentPerson]
$sel:persons:DetectProtectiveEquipmentResponse' :: DetectProtectiveEquipmentResponse
-> Maybe [ProtectiveEquipmentPerson]
persons} -> Maybe [ProtectiveEquipmentPerson]
persons) (\s :: DetectProtectiveEquipmentResponse
s@DetectProtectiveEquipmentResponse' {} Maybe [ProtectiveEquipmentPerson]
a -> DetectProtectiveEquipmentResponse
s {$sel:persons:DetectProtectiveEquipmentResponse' :: Maybe [ProtectiveEquipmentPerson]
persons = Maybe [ProtectiveEquipmentPerson]
a} :: DetectProtectiveEquipmentResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The version number of the PPE detection model used to detect PPE in the
-- image.
detectProtectiveEquipmentResponse_protectiveEquipmentModelVersion :: Lens.Lens' DetectProtectiveEquipmentResponse (Prelude.Maybe Prelude.Text)
detectProtectiveEquipmentResponse_protectiveEquipmentModelVersion :: Lens' DetectProtectiveEquipmentResponse (Maybe Text)
detectProtectiveEquipmentResponse_protectiveEquipmentModelVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectProtectiveEquipmentResponse' {Maybe Text
protectiveEquipmentModelVersion :: Maybe Text
$sel:protectiveEquipmentModelVersion:DetectProtectiveEquipmentResponse' :: DetectProtectiveEquipmentResponse -> Maybe Text
protectiveEquipmentModelVersion} -> Maybe Text
protectiveEquipmentModelVersion) (\s :: DetectProtectiveEquipmentResponse
s@DetectProtectiveEquipmentResponse' {} Maybe Text
a -> DetectProtectiveEquipmentResponse
s {$sel:protectiveEquipmentModelVersion:DetectProtectiveEquipmentResponse' :: Maybe Text
protectiveEquipmentModelVersion = Maybe Text
a} :: DetectProtectiveEquipmentResponse)

-- | Summary information for the types of PPE specified in the
-- @SummarizationAttributes@ input parameter.
detectProtectiveEquipmentResponse_summary :: Lens.Lens' DetectProtectiveEquipmentResponse (Prelude.Maybe ProtectiveEquipmentSummary)
detectProtectiveEquipmentResponse_summary :: Lens'
  DetectProtectiveEquipmentResponse
  (Maybe ProtectiveEquipmentSummary)
detectProtectiveEquipmentResponse_summary = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectProtectiveEquipmentResponse' {Maybe ProtectiveEquipmentSummary
summary :: Maybe ProtectiveEquipmentSummary
$sel:summary:DetectProtectiveEquipmentResponse' :: DetectProtectiveEquipmentResponse
-> Maybe ProtectiveEquipmentSummary
summary} -> Maybe ProtectiveEquipmentSummary
summary) (\s :: DetectProtectiveEquipmentResponse
s@DetectProtectiveEquipmentResponse' {} Maybe ProtectiveEquipmentSummary
a -> DetectProtectiveEquipmentResponse
s {$sel:summary:DetectProtectiveEquipmentResponse' :: Maybe ProtectiveEquipmentSummary
summary = Maybe ProtectiveEquipmentSummary
a} :: DetectProtectiveEquipmentResponse)

-- | The response's http status code.
detectProtectiveEquipmentResponse_httpStatus :: Lens.Lens' DetectProtectiveEquipmentResponse Prelude.Int
detectProtectiveEquipmentResponse_httpStatus :: Lens' DetectProtectiveEquipmentResponse Int
detectProtectiveEquipmentResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectProtectiveEquipmentResponse' {Int
httpStatus :: Int
$sel:httpStatus:DetectProtectiveEquipmentResponse' :: DetectProtectiveEquipmentResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DetectProtectiveEquipmentResponse
s@DetectProtectiveEquipmentResponse' {} Int
a -> DetectProtectiveEquipmentResponse
s {$sel:httpStatus:DetectProtectiveEquipmentResponse' :: Int
httpStatus = Int
a} :: DetectProtectiveEquipmentResponse)

instance
  Prelude.NFData
    DetectProtectiveEquipmentResponse
  where
  rnf :: DetectProtectiveEquipmentResponse -> ()
rnf DetectProtectiveEquipmentResponse' {Int
Maybe [ProtectiveEquipmentPerson]
Maybe Text
Maybe ProtectiveEquipmentSummary
httpStatus :: Int
summary :: Maybe ProtectiveEquipmentSummary
protectiveEquipmentModelVersion :: Maybe Text
persons :: Maybe [ProtectiveEquipmentPerson]
$sel:httpStatus:DetectProtectiveEquipmentResponse' :: DetectProtectiveEquipmentResponse -> Int
$sel:summary:DetectProtectiveEquipmentResponse' :: DetectProtectiveEquipmentResponse
-> Maybe ProtectiveEquipmentSummary
$sel:protectiveEquipmentModelVersion:DetectProtectiveEquipmentResponse' :: DetectProtectiveEquipmentResponse -> Maybe Text
$sel:persons:DetectProtectiveEquipmentResponse' :: DetectProtectiveEquipmentResponse
-> Maybe [ProtectiveEquipmentPerson]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [ProtectiveEquipmentPerson]
persons
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
protectiveEquipmentModelVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ProtectiveEquipmentSummary
summary
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus