{-# 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.SageMaker.Types.LabelingJobSnsDataSource 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
data LabelingJobSnsDataSource = LabelingJobSnsDataSource'
{
LabelingJobSnsDataSource -> Text
snsTopicArn :: Prelude.Text
}
deriving (LabelingJobSnsDataSource -> LabelingJobSnsDataSource -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LabelingJobSnsDataSource -> LabelingJobSnsDataSource -> Bool
$c/= :: LabelingJobSnsDataSource -> LabelingJobSnsDataSource -> Bool
== :: LabelingJobSnsDataSource -> LabelingJobSnsDataSource -> Bool
$c== :: LabelingJobSnsDataSource -> LabelingJobSnsDataSource -> Bool
Prelude.Eq, ReadPrec [LabelingJobSnsDataSource]
ReadPrec LabelingJobSnsDataSource
Int -> ReadS LabelingJobSnsDataSource
ReadS [LabelingJobSnsDataSource]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LabelingJobSnsDataSource]
$creadListPrec :: ReadPrec [LabelingJobSnsDataSource]
readPrec :: ReadPrec LabelingJobSnsDataSource
$creadPrec :: ReadPrec LabelingJobSnsDataSource
readList :: ReadS [LabelingJobSnsDataSource]
$creadList :: ReadS [LabelingJobSnsDataSource]
readsPrec :: Int -> ReadS LabelingJobSnsDataSource
$creadsPrec :: Int -> ReadS LabelingJobSnsDataSource
Prelude.Read, Int -> LabelingJobSnsDataSource -> ShowS
[LabelingJobSnsDataSource] -> ShowS
LabelingJobSnsDataSource -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LabelingJobSnsDataSource] -> ShowS
$cshowList :: [LabelingJobSnsDataSource] -> ShowS
show :: LabelingJobSnsDataSource -> String
$cshow :: LabelingJobSnsDataSource -> String
showsPrec :: Int -> LabelingJobSnsDataSource -> ShowS
$cshowsPrec :: Int -> LabelingJobSnsDataSource -> ShowS
Prelude.Show, forall x.
Rep LabelingJobSnsDataSource x -> LabelingJobSnsDataSource
forall x.
LabelingJobSnsDataSource -> Rep LabelingJobSnsDataSource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep LabelingJobSnsDataSource x -> LabelingJobSnsDataSource
$cfrom :: forall x.
LabelingJobSnsDataSource -> Rep LabelingJobSnsDataSource x
Prelude.Generic)
newLabelingJobSnsDataSource ::
Prelude.Text ->
LabelingJobSnsDataSource
newLabelingJobSnsDataSource :: Text -> LabelingJobSnsDataSource
newLabelingJobSnsDataSource Text
pSnsTopicArn_ =
LabelingJobSnsDataSource'
{ $sel:snsTopicArn:LabelingJobSnsDataSource' :: Text
snsTopicArn =
Text
pSnsTopicArn_
}
labelingJobSnsDataSource_snsTopicArn :: Lens.Lens' LabelingJobSnsDataSource Prelude.Text
labelingJobSnsDataSource_snsTopicArn :: Lens' LabelingJobSnsDataSource Text
labelingJobSnsDataSource_snsTopicArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LabelingJobSnsDataSource' {Text
snsTopicArn :: Text
$sel:snsTopicArn:LabelingJobSnsDataSource' :: LabelingJobSnsDataSource -> Text
snsTopicArn} -> Text
snsTopicArn) (\s :: LabelingJobSnsDataSource
s@LabelingJobSnsDataSource' {} Text
a -> LabelingJobSnsDataSource
s {$sel:snsTopicArn:LabelingJobSnsDataSource' :: Text
snsTopicArn = Text
a} :: LabelingJobSnsDataSource)
instance Data.FromJSON LabelingJobSnsDataSource where
parseJSON :: Value -> Parser LabelingJobSnsDataSource
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"LabelingJobSnsDataSource"
( \Object
x ->
Text -> LabelingJobSnsDataSource
LabelingJobSnsDataSource'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"SnsTopicArn")
)
instance Prelude.Hashable LabelingJobSnsDataSource where
hashWithSalt :: Int -> LabelingJobSnsDataSource -> Int
hashWithSalt Int
_salt LabelingJobSnsDataSource' {Text
snsTopicArn :: Text
$sel:snsTopicArn:LabelingJobSnsDataSource' :: LabelingJobSnsDataSource -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
snsTopicArn
instance Prelude.NFData LabelingJobSnsDataSource where
rnf :: LabelingJobSnsDataSource -> ()
rnf LabelingJobSnsDataSource' {Text
snsTopicArn :: Text
$sel:snsTopicArn:LabelingJobSnsDataSource' :: LabelingJobSnsDataSource -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
snsTopicArn
instance Data.ToJSON LabelingJobSnsDataSource where
toJSON :: LabelingJobSnsDataSource -> Value
toJSON LabelingJobSnsDataSource' {Text
snsTopicArn :: Text
$sel:snsTopicArn:LabelingJobSnsDataSource' :: LabelingJobSnsDataSource -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"SnsTopicArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
snsTopicArn)]
)