{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SageMakerA2IRuntime.Types.HumanLoopDataAttributes 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.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
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]
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
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. 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'
    { $sel:contentClassifiers:HumanLoopDataAttributes' :: [ContentClassifier]
contentClassifiers =
        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 :: Lens' HumanLoopDataAttributes [ContentClassifier]
humanLoopDataAttributes_contentClassifiers = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Prelude.Hashable HumanLoopDataAttributes where
  hashWithSalt :: Int -> HumanLoopDataAttributes -> Int
hashWithSalt Int
_salt HumanLoopDataAttributes' {[ContentClassifier]
contentClassifiers :: [ContentClassifier]
$sel:contentClassifiers:HumanLoopDataAttributes' :: HumanLoopDataAttributes -> [ContentClassifier]
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [ContentClassifier]
contentClassifiers

instance Prelude.NFData HumanLoopDataAttributes where
  rnf :: HumanLoopDataAttributes -> ()
rnf HumanLoopDataAttributes' {[ContentClassifier]
contentClassifiers :: [ContentClassifier]
$sel:contentClassifiers:HumanLoopDataAttributes' :: HumanLoopDataAttributes -> [ContentClassifier]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf [ContentClassifier]
contentClassifiers

instance Data.ToJSON HumanLoopDataAttributes where
  toJSON :: HumanLoopDataAttributes -> Value
toJSON HumanLoopDataAttributes' {[ContentClassifier]
contentClassifiers :: [ContentClassifier]
$sel:contentClassifiers:HumanLoopDataAttributes' :: HumanLoopDataAttributes -> [ContentClassifier]
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ forall a. a -> Maybe a
Prelude.Just
              (Key
"ContentClassifiers" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= [ContentClassifier]
contentClassifiers)
          ]
      )