{-# 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.SageMakerA2IRuntime.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.SageMakerA2IRuntime.Types.HumanLoopDataAttributes where

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

-- | Attributes of the data specified by the customer. Use these to describe
-- the data to be labeled.
--
-- /See:/ 'newHumanLoopDataAttributes' smart constructor.
data HumanLoopDataAttributes = HumanLoopDataAttributes'
  { -- | Declares that your content is free of personally identifiable
    -- information or adult content.
    --
    -- Amazon SageMaker can restrict the Amazon Mechanical Turk workers who can
    -- view your task based on this information.
    HumanLoopDataAttributes -> [ContentClassifier]
contentClassifiers :: [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' - Declares that your content is free of personally identifiable
-- information or adult content.
--
-- Amazon SageMaker can restrict the Amazon Mechanical Turk workers who can
-- view your task based on this information.
newHumanLoopDataAttributes ::
  HumanLoopDataAttributes
newHumanLoopDataAttributes :: HumanLoopDataAttributes
newHumanLoopDataAttributes =
  HumanLoopDataAttributes' :: [ContentClassifier] -> HumanLoopDataAttributes
HumanLoopDataAttributes'
    { $sel:contentClassifiers:HumanLoopDataAttributes' :: [ContentClassifier]
contentClassifiers =
        [ContentClassifier]
forall a. Monoid a => a
Prelude.mempty
    }

-- | Declares that your content is free of personally identifiable
-- information or adult content.
--
-- Amazon SageMaker can restrict the Amazon Mechanical Turk workers who can
-- view your task based on this information.
humanLoopDataAttributes_contentClassifiers :: Lens.Lens' HumanLoopDataAttributes [ContentClassifier]
humanLoopDataAttributes_contentClassifiers :: ([ContentClassifier] -> f [ContentClassifier])
-> HumanLoopDataAttributes -> f HumanLoopDataAttributes
humanLoopDataAttributes_contentClassifiers = (HumanLoopDataAttributes -> [ContentClassifier])
-> (HumanLoopDataAttributes
    -> [ContentClassifier] -> HumanLoopDataAttributes)
-> Lens
     HumanLoopDataAttributes
     HumanLoopDataAttributes
     [ContentClassifier]
     [ContentClassifier]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HumanLoopDataAttributes' {[ContentClassifier]
contentClassifiers :: [ContentClassifier]
$sel:contentClassifiers:HumanLoopDataAttributes' :: HumanLoopDataAttributes -> [ContentClassifier]
contentClassifiers} -> [ContentClassifier]
contentClassifiers) (\s :: HumanLoopDataAttributes
s@HumanLoopDataAttributes' {} [ContentClassifier]
a -> HumanLoopDataAttributes
s {$sel:contentClassifiers:HumanLoopDataAttributes' :: [ContentClassifier]
contentClassifiers = [ContentClassifier]
a} :: HumanLoopDataAttributes) (([ContentClassifier] -> f [ContentClassifier])
 -> HumanLoopDataAttributes -> f HumanLoopDataAttributes)
-> (([ContentClassifier] -> f [ContentClassifier])
    -> [ContentClassifier] -> f [ContentClassifier])
-> ([ContentClassifier] -> f [ContentClassifier])
-> HumanLoopDataAttributes
-> f HumanLoopDataAttributes
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ContentClassifier] -> f [ContentClassifier])
-> [ContentClassifier] -> f [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' {[ContentClassifier]
contentClassifiers :: [ContentClassifier]
$sel:contentClassifiers:HumanLoopDataAttributes' :: HumanLoopDataAttributes -> [ContentClassifier]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"ContentClassifiers" Text -> [ContentClassifier] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [ContentClassifier]
contentClassifiers)
          ]
      )