{-# 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 #-}

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

-- |
-- Module      : Amazonka.Rekognition.Types.HumanLoopDataAttributes
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Rekognition.Types.HumanLoopDataAttributes where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Rekognition.Types.ContentClassifier

-- | Allows you to set attributes of the image. Currently, you can declare an
-- image as free of personally identifiable information.
--
-- /See:/ 'newHumanLoopDataAttributes' smart constructor.
data HumanLoopDataAttributes = HumanLoopDataAttributes'
  { -- | Sets whether the input image is free of personally identifiable
    -- information.
    HumanLoopDataAttributes -> Maybe [ContentClassifier]
contentClassifiers :: Prelude.Maybe [ContentClassifier]
  }
  deriving (HumanLoopDataAttributes -> HumanLoopDataAttributes -> Bool
(HumanLoopDataAttributes -> HumanLoopDataAttributes -> Bool)
-> (HumanLoopDataAttributes -> HumanLoopDataAttributes -> Bool)
-> Eq HumanLoopDataAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HumanLoopDataAttributes -> HumanLoopDataAttributes -> Bool
$c/= :: HumanLoopDataAttributes -> HumanLoopDataAttributes -> Bool
== :: HumanLoopDataAttributes -> HumanLoopDataAttributes -> Bool
$c== :: HumanLoopDataAttributes -> HumanLoopDataAttributes -> Bool
Prelude.Eq, ReadPrec [HumanLoopDataAttributes]
ReadPrec HumanLoopDataAttributes
Int -> ReadS HumanLoopDataAttributes
ReadS [HumanLoopDataAttributes]
(Int -> ReadS HumanLoopDataAttributes)
-> ReadS [HumanLoopDataAttributes]
-> ReadPrec HumanLoopDataAttributes
-> ReadPrec [HumanLoopDataAttributes]
-> Read HumanLoopDataAttributes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HumanLoopDataAttributes]
$creadListPrec :: ReadPrec [HumanLoopDataAttributes]
readPrec :: ReadPrec HumanLoopDataAttributes
$creadPrec :: ReadPrec HumanLoopDataAttributes
readList :: ReadS [HumanLoopDataAttributes]
$creadList :: ReadS [HumanLoopDataAttributes]
readsPrec :: Int -> ReadS HumanLoopDataAttributes
$creadsPrec :: Int -> ReadS HumanLoopDataAttributes
Prelude.Read, Int -> HumanLoopDataAttributes -> ShowS
[HumanLoopDataAttributes] -> ShowS
HumanLoopDataAttributes -> String
(Int -> HumanLoopDataAttributes -> ShowS)
-> (HumanLoopDataAttributes -> String)
-> ([HumanLoopDataAttributes] -> ShowS)
-> Show HumanLoopDataAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HumanLoopDataAttributes] -> ShowS
$cshowList :: [HumanLoopDataAttributes] -> ShowS
show :: HumanLoopDataAttributes -> String
$cshow :: HumanLoopDataAttributes -> String
showsPrec :: Int -> HumanLoopDataAttributes -> ShowS
$cshowsPrec :: Int -> HumanLoopDataAttributes -> ShowS
Prelude.Show, (forall x.
 HumanLoopDataAttributes -> Rep HumanLoopDataAttributes x)
-> (forall x.
    Rep HumanLoopDataAttributes x -> HumanLoopDataAttributes)
-> Generic HumanLoopDataAttributes
forall x. Rep HumanLoopDataAttributes x -> HumanLoopDataAttributes
forall x. HumanLoopDataAttributes -> Rep HumanLoopDataAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep HumanLoopDataAttributes x -> HumanLoopDataAttributes
$cfrom :: forall x. HumanLoopDataAttributes -> Rep HumanLoopDataAttributes x
Prelude.Generic)

-- |
-- Create a value of 'HumanLoopDataAttributes' 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:
--
-- 'contentClassifiers', 'humanLoopDataAttributes_contentClassifiers' - Sets whether the input image is free of personally identifiable
-- information.
newHumanLoopDataAttributes ::
  HumanLoopDataAttributes
newHumanLoopDataAttributes :: HumanLoopDataAttributes
newHumanLoopDataAttributes =
  HumanLoopDataAttributes' :: Maybe [ContentClassifier] -> HumanLoopDataAttributes
HumanLoopDataAttributes'
    { $sel:contentClassifiers:HumanLoopDataAttributes' :: Maybe [ContentClassifier]
contentClassifiers =
        Maybe [ContentClassifier]
forall a. Maybe a
Prelude.Nothing
    }

-- | Sets whether the input image is free of personally identifiable
-- information.
humanLoopDataAttributes_contentClassifiers :: Lens.Lens' HumanLoopDataAttributes (Prelude.Maybe [ContentClassifier])
humanLoopDataAttributes_contentClassifiers :: (Maybe [ContentClassifier] -> f (Maybe [ContentClassifier]))
-> HumanLoopDataAttributes -> f HumanLoopDataAttributes
humanLoopDataAttributes_contentClassifiers = (HumanLoopDataAttributes -> Maybe [ContentClassifier])
-> (HumanLoopDataAttributes
    -> Maybe [ContentClassifier] -> HumanLoopDataAttributes)
-> Lens
     HumanLoopDataAttributes
     HumanLoopDataAttributes
     (Maybe [ContentClassifier])
     (Maybe [ContentClassifier])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HumanLoopDataAttributes' {Maybe [ContentClassifier]
contentClassifiers :: Maybe [ContentClassifier]
$sel:contentClassifiers:HumanLoopDataAttributes' :: HumanLoopDataAttributes -> Maybe [ContentClassifier]
contentClassifiers} -> Maybe [ContentClassifier]
contentClassifiers) (\s :: HumanLoopDataAttributes
s@HumanLoopDataAttributes' {} Maybe [ContentClassifier]
a -> HumanLoopDataAttributes
s {$sel:contentClassifiers:HumanLoopDataAttributes' :: Maybe [ContentClassifier]
contentClassifiers = Maybe [ContentClassifier]
a} :: HumanLoopDataAttributes) ((Maybe [ContentClassifier] -> f (Maybe [ContentClassifier]))
 -> HumanLoopDataAttributes -> f HumanLoopDataAttributes)
-> ((Maybe [ContentClassifier] -> f (Maybe [ContentClassifier]))
    -> Maybe [ContentClassifier] -> f (Maybe [ContentClassifier]))
-> (Maybe [ContentClassifier] -> f (Maybe [ContentClassifier]))
-> HumanLoopDataAttributes
-> f HumanLoopDataAttributes
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ContentClassifier]
  [ContentClassifier]
  [ContentClassifier]
  [ContentClassifier]
-> Iso
     (Maybe [ContentClassifier])
     (Maybe [ContentClassifier])
     (Maybe [ContentClassifier])
     (Maybe [ContentClassifier])
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
  [ContentClassifier]
  [ContentClassifier]
  [ContentClassifier]
  [ContentClassifier]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Prelude.Hashable HumanLoopDataAttributes

instance Prelude.NFData HumanLoopDataAttributes

instance Core.ToJSON HumanLoopDataAttributes where
  toJSON :: HumanLoopDataAttributes -> Value
toJSON HumanLoopDataAttributes' {Maybe [ContentClassifier]
contentClassifiers :: Maybe [ContentClassifier]
$sel:contentClassifiers:HumanLoopDataAttributes' :: HumanLoopDataAttributes -> Maybe [ContentClassifier]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"ContentClassifiers" Text -> [ContentClassifier] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([ContentClassifier] -> Pair)
-> Maybe [ContentClassifier] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ContentClassifier]
contentClassifiers
          ]
      )