{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Rekognition.Types.ProtectiveEquipmentSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ProtectiveEquipmentSummary = ProtectiveEquipmentSummary'
{
ProtectiveEquipmentSummary -> Maybe [Natural]
personsWithRequiredEquipment :: Prelude.Maybe [Prelude.Natural],
ProtectiveEquipmentSummary -> Maybe [Natural]
personsWithoutRequiredEquipment :: Prelude.Maybe [Prelude.Natural],
ProtectiveEquipmentSummary -> Maybe [Natural]
personsIndeterminate :: Prelude.Maybe [Prelude.Natural]
}
deriving (ProtectiveEquipmentSummary -> ProtectiveEquipmentSummary -> Bool
(ProtectiveEquipmentSummary -> ProtectiveEquipmentSummary -> Bool)
-> (ProtectiveEquipmentSummary
-> ProtectiveEquipmentSummary -> Bool)
-> Eq ProtectiveEquipmentSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProtectiveEquipmentSummary -> ProtectiveEquipmentSummary -> Bool
$c/= :: ProtectiveEquipmentSummary -> ProtectiveEquipmentSummary -> Bool
== :: ProtectiveEquipmentSummary -> ProtectiveEquipmentSummary -> Bool
$c== :: ProtectiveEquipmentSummary -> ProtectiveEquipmentSummary -> Bool
Prelude.Eq, ReadPrec [ProtectiveEquipmentSummary]
ReadPrec ProtectiveEquipmentSummary
Int -> ReadS ProtectiveEquipmentSummary
ReadS [ProtectiveEquipmentSummary]
(Int -> ReadS ProtectiveEquipmentSummary)
-> ReadS [ProtectiveEquipmentSummary]
-> ReadPrec ProtectiveEquipmentSummary
-> ReadPrec [ProtectiveEquipmentSummary]
-> Read ProtectiveEquipmentSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProtectiveEquipmentSummary]
$creadListPrec :: ReadPrec [ProtectiveEquipmentSummary]
readPrec :: ReadPrec ProtectiveEquipmentSummary
$creadPrec :: ReadPrec ProtectiveEquipmentSummary
readList :: ReadS [ProtectiveEquipmentSummary]
$creadList :: ReadS [ProtectiveEquipmentSummary]
readsPrec :: Int -> ReadS ProtectiveEquipmentSummary
$creadsPrec :: Int -> ReadS ProtectiveEquipmentSummary
Prelude.Read, Int -> ProtectiveEquipmentSummary -> ShowS
[ProtectiveEquipmentSummary] -> ShowS
ProtectiveEquipmentSummary -> String
(Int -> ProtectiveEquipmentSummary -> ShowS)
-> (ProtectiveEquipmentSummary -> String)
-> ([ProtectiveEquipmentSummary] -> ShowS)
-> Show ProtectiveEquipmentSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProtectiveEquipmentSummary] -> ShowS
$cshowList :: [ProtectiveEquipmentSummary] -> ShowS
show :: ProtectiveEquipmentSummary -> String
$cshow :: ProtectiveEquipmentSummary -> String
showsPrec :: Int -> ProtectiveEquipmentSummary -> ShowS
$cshowsPrec :: Int -> ProtectiveEquipmentSummary -> ShowS
Prelude.Show, (forall x.
ProtectiveEquipmentSummary -> Rep ProtectiveEquipmentSummary x)
-> (forall x.
Rep ProtectiveEquipmentSummary x -> ProtectiveEquipmentSummary)
-> Generic ProtectiveEquipmentSummary
forall x.
Rep ProtectiveEquipmentSummary x -> ProtectiveEquipmentSummary
forall x.
ProtectiveEquipmentSummary -> Rep ProtectiveEquipmentSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ProtectiveEquipmentSummary x -> ProtectiveEquipmentSummary
$cfrom :: forall x.
ProtectiveEquipmentSummary -> Rep ProtectiveEquipmentSummary x
Prelude.Generic)
newProtectiveEquipmentSummary ::
ProtectiveEquipmentSummary
newProtectiveEquipmentSummary :: ProtectiveEquipmentSummary
newProtectiveEquipmentSummary =
ProtectiveEquipmentSummary' :: Maybe [Natural]
-> Maybe [Natural] -> Maybe [Natural] -> ProtectiveEquipmentSummary
ProtectiveEquipmentSummary'
{ $sel:personsWithRequiredEquipment:ProtectiveEquipmentSummary' :: Maybe [Natural]
personsWithRequiredEquipment =
Maybe [Natural]
forall a. Maybe a
Prelude.Nothing,
$sel:personsWithoutRequiredEquipment:ProtectiveEquipmentSummary' :: Maybe [Natural]
personsWithoutRequiredEquipment =
Maybe [Natural]
forall a. Maybe a
Prelude.Nothing,
$sel:personsIndeterminate:ProtectiveEquipmentSummary' :: Maybe [Natural]
personsIndeterminate = Maybe [Natural]
forall a. Maybe a
Prelude.Nothing
}
protectiveEquipmentSummary_personsWithRequiredEquipment :: Lens.Lens' ProtectiveEquipmentSummary (Prelude.Maybe [Prelude.Natural])
protectiveEquipmentSummary_personsWithRequiredEquipment :: (Maybe [Natural] -> f (Maybe [Natural]))
-> ProtectiveEquipmentSummary -> f ProtectiveEquipmentSummary
protectiveEquipmentSummary_personsWithRequiredEquipment = (ProtectiveEquipmentSummary -> Maybe [Natural])
-> (ProtectiveEquipmentSummary
-> Maybe [Natural] -> ProtectiveEquipmentSummary)
-> Lens
ProtectiveEquipmentSummary
ProtectiveEquipmentSummary
(Maybe [Natural])
(Maybe [Natural])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProtectiveEquipmentSummary' {Maybe [Natural]
personsWithRequiredEquipment :: Maybe [Natural]
$sel:personsWithRequiredEquipment:ProtectiveEquipmentSummary' :: ProtectiveEquipmentSummary -> Maybe [Natural]
personsWithRequiredEquipment} -> Maybe [Natural]
personsWithRequiredEquipment) (\s :: ProtectiveEquipmentSummary
s@ProtectiveEquipmentSummary' {} Maybe [Natural]
a -> ProtectiveEquipmentSummary
s {$sel:personsWithRequiredEquipment:ProtectiveEquipmentSummary' :: Maybe [Natural]
personsWithRequiredEquipment = Maybe [Natural]
a} :: ProtectiveEquipmentSummary) ((Maybe [Natural] -> f (Maybe [Natural]))
-> ProtectiveEquipmentSummary -> f ProtectiveEquipmentSummary)
-> ((Maybe [Natural] -> f (Maybe [Natural]))
-> Maybe [Natural] -> f (Maybe [Natural]))
-> (Maybe [Natural] -> f (Maybe [Natural]))
-> ProtectiveEquipmentSummary
-> f ProtectiveEquipmentSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Natural] [Natural] [Natural] [Natural]
-> Iso
(Maybe [Natural])
(Maybe [Natural])
(Maybe [Natural])
(Maybe [Natural])
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 AnIso [Natural] [Natural] [Natural] [Natural]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
protectiveEquipmentSummary_personsWithoutRequiredEquipment :: Lens.Lens' ProtectiveEquipmentSummary (Prelude.Maybe [Prelude.Natural])
protectiveEquipmentSummary_personsWithoutRequiredEquipment :: (Maybe [Natural] -> f (Maybe [Natural]))
-> ProtectiveEquipmentSummary -> f ProtectiveEquipmentSummary
protectiveEquipmentSummary_personsWithoutRequiredEquipment = (ProtectiveEquipmentSummary -> Maybe [Natural])
-> (ProtectiveEquipmentSummary
-> Maybe [Natural] -> ProtectiveEquipmentSummary)
-> Lens
ProtectiveEquipmentSummary
ProtectiveEquipmentSummary
(Maybe [Natural])
(Maybe [Natural])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProtectiveEquipmentSummary' {Maybe [Natural]
personsWithoutRequiredEquipment :: Maybe [Natural]
$sel:personsWithoutRequiredEquipment:ProtectiveEquipmentSummary' :: ProtectiveEquipmentSummary -> Maybe [Natural]
personsWithoutRequiredEquipment} -> Maybe [Natural]
personsWithoutRequiredEquipment) (\s :: ProtectiveEquipmentSummary
s@ProtectiveEquipmentSummary' {} Maybe [Natural]
a -> ProtectiveEquipmentSummary
s {$sel:personsWithoutRequiredEquipment:ProtectiveEquipmentSummary' :: Maybe [Natural]
personsWithoutRequiredEquipment = Maybe [Natural]
a} :: ProtectiveEquipmentSummary) ((Maybe [Natural] -> f (Maybe [Natural]))
-> ProtectiveEquipmentSummary -> f ProtectiveEquipmentSummary)
-> ((Maybe [Natural] -> f (Maybe [Natural]))
-> Maybe [Natural] -> f (Maybe [Natural]))
-> (Maybe [Natural] -> f (Maybe [Natural]))
-> ProtectiveEquipmentSummary
-> f ProtectiveEquipmentSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Natural] [Natural] [Natural] [Natural]
-> Iso
(Maybe [Natural])
(Maybe [Natural])
(Maybe [Natural])
(Maybe [Natural])
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 AnIso [Natural] [Natural] [Natural] [Natural]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
protectiveEquipmentSummary_personsIndeterminate :: Lens.Lens' ProtectiveEquipmentSummary (Prelude.Maybe [Prelude.Natural])
protectiveEquipmentSummary_personsIndeterminate :: (Maybe [Natural] -> f (Maybe [Natural]))
-> ProtectiveEquipmentSummary -> f ProtectiveEquipmentSummary
protectiveEquipmentSummary_personsIndeterminate = (ProtectiveEquipmentSummary -> Maybe [Natural])
-> (ProtectiveEquipmentSummary
-> Maybe [Natural] -> ProtectiveEquipmentSummary)
-> Lens
ProtectiveEquipmentSummary
ProtectiveEquipmentSummary
(Maybe [Natural])
(Maybe [Natural])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProtectiveEquipmentSummary' {Maybe [Natural]
personsIndeterminate :: Maybe [Natural]
$sel:personsIndeterminate:ProtectiveEquipmentSummary' :: ProtectiveEquipmentSummary -> Maybe [Natural]
personsIndeterminate} -> Maybe [Natural]
personsIndeterminate) (\s :: ProtectiveEquipmentSummary
s@ProtectiveEquipmentSummary' {} Maybe [Natural]
a -> ProtectiveEquipmentSummary
s {$sel:personsIndeterminate:ProtectiveEquipmentSummary' :: Maybe [Natural]
personsIndeterminate = Maybe [Natural]
a} :: ProtectiveEquipmentSummary) ((Maybe [Natural] -> f (Maybe [Natural]))
-> ProtectiveEquipmentSummary -> f ProtectiveEquipmentSummary)
-> ((Maybe [Natural] -> f (Maybe [Natural]))
-> Maybe [Natural] -> f (Maybe [Natural]))
-> (Maybe [Natural] -> f (Maybe [Natural]))
-> ProtectiveEquipmentSummary
-> f ProtectiveEquipmentSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Natural] [Natural] [Natural] [Natural]
-> Iso
(Maybe [Natural])
(Maybe [Natural])
(Maybe [Natural])
(Maybe [Natural])
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 AnIso [Natural] [Natural] [Natural] [Natural]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON ProtectiveEquipmentSummary where
parseJSON :: Value -> Parser ProtectiveEquipmentSummary
parseJSON =
String
-> (Object -> Parser ProtectiveEquipmentSummary)
-> Value
-> Parser ProtectiveEquipmentSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ProtectiveEquipmentSummary"
( \Object
x ->
Maybe [Natural]
-> Maybe [Natural] -> Maybe [Natural] -> ProtectiveEquipmentSummary
ProtectiveEquipmentSummary'
(Maybe [Natural]
-> Maybe [Natural]
-> Maybe [Natural]
-> ProtectiveEquipmentSummary)
-> Parser (Maybe [Natural])
-> Parser
(Maybe [Natural] -> Maybe [Natural] -> ProtectiveEquipmentSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Natural]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PersonsWithRequiredEquipment"
Parser (Maybe (Maybe [Natural]))
-> Maybe [Natural] -> Parser (Maybe [Natural])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Natural]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe [Natural] -> Maybe [Natural] -> ProtectiveEquipmentSummary)
-> Parser (Maybe [Natural])
-> Parser (Maybe [Natural] -> ProtectiveEquipmentSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Natural]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PersonsWithoutRequiredEquipment"
Parser (Maybe (Maybe [Natural]))
-> Maybe [Natural] -> Parser (Maybe [Natural])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Natural]
forall a. Monoid a => a
Prelude.mempty
)
Parser (Maybe [Natural] -> ProtectiveEquipmentSummary)
-> Parser (Maybe [Natural]) -> Parser ProtectiveEquipmentSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Natural]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PersonsIndeterminate"
Parser (Maybe (Maybe [Natural]))
-> Maybe [Natural] -> Parser (Maybe [Natural])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Natural]
forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable ProtectiveEquipmentSummary
instance Prelude.NFData ProtectiveEquipmentSummary