{-# 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.StreamProcessorNotificationChannel 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 StreamProcessorNotificationChannel = StreamProcessorNotificationChannel'
{
StreamProcessorNotificationChannel -> Text
sNSTopicArn :: Prelude.Text
}
deriving (StreamProcessorNotificationChannel
-> StreamProcessorNotificationChannel -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StreamProcessorNotificationChannel
-> StreamProcessorNotificationChannel -> Bool
$c/= :: StreamProcessorNotificationChannel
-> StreamProcessorNotificationChannel -> Bool
== :: StreamProcessorNotificationChannel
-> StreamProcessorNotificationChannel -> Bool
$c== :: StreamProcessorNotificationChannel
-> StreamProcessorNotificationChannel -> Bool
Prelude.Eq, ReadPrec [StreamProcessorNotificationChannel]
ReadPrec StreamProcessorNotificationChannel
Int -> ReadS StreamProcessorNotificationChannel
ReadS [StreamProcessorNotificationChannel]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StreamProcessorNotificationChannel]
$creadListPrec :: ReadPrec [StreamProcessorNotificationChannel]
readPrec :: ReadPrec StreamProcessorNotificationChannel
$creadPrec :: ReadPrec StreamProcessorNotificationChannel
readList :: ReadS [StreamProcessorNotificationChannel]
$creadList :: ReadS [StreamProcessorNotificationChannel]
readsPrec :: Int -> ReadS StreamProcessorNotificationChannel
$creadsPrec :: Int -> ReadS StreamProcessorNotificationChannel
Prelude.Read, Int -> StreamProcessorNotificationChannel -> ShowS
[StreamProcessorNotificationChannel] -> ShowS
StreamProcessorNotificationChannel -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StreamProcessorNotificationChannel] -> ShowS
$cshowList :: [StreamProcessorNotificationChannel] -> ShowS
show :: StreamProcessorNotificationChannel -> String
$cshow :: StreamProcessorNotificationChannel -> String
showsPrec :: Int -> StreamProcessorNotificationChannel -> ShowS
$cshowsPrec :: Int -> StreamProcessorNotificationChannel -> ShowS
Prelude.Show, forall x.
Rep StreamProcessorNotificationChannel x
-> StreamProcessorNotificationChannel
forall x.
StreamProcessorNotificationChannel
-> Rep StreamProcessorNotificationChannel x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StreamProcessorNotificationChannel x
-> StreamProcessorNotificationChannel
$cfrom :: forall x.
StreamProcessorNotificationChannel
-> Rep StreamProcessorNotificationChannel x
Prelude.Generic)
newStreamProcessorNotificationChannel ::
Prelude.Text ->
StreamProcessorNotificationChannel
newStreamProcessorNotificationChannel :: Text -> StreamProcessorNotificationChannel
newStreamProcessorNotificationChannel Text
pSNSTopicArn_ =
StreamProcessorNotificationChannel'
{ $sel:sNSTopicArn:StreamProcessorNotificationChannel' :: Text
sNSTopicArn =
Text
pSNSTopicArn_
}
streamProcessorNotificationChannel_sNSTopicArn :: Lens.Lens' StreamProcessorNotificationChannel Prelude.Text
streamProcessorNotificationChannel_sNSTopicArn :: Lens' StreamProcessorNotificationChannel Text
streamProcessorNotificationChannel_sNSTopicArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamProcessorNotificationChannel' {Text
sNSTopicArn :: Text
$sel:sNSTopicArn:StreamProcessorNotificationChannel' :: StreamProcessorNotificationChannel -> Text
sNSTopicArn} -> Text
sNSTopicArn) (\s :: StreamProcessorNotificationChannel
s@StreamProcessorNotificationChannel' {} Text
a -> StreamProcessorNotificationChannel
s {$sel:sNSTopicArn:StreamProcessorNotificationChannel' :: Text
sNSTopicArn = Text
a} :: StreamProcessorNotificationChannel)
instance
Data.FromJSON
StreamProcessorNotificationChannel
where
parseJSON :: Value -> Parser StreamProcessorNotificationChannel
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"StreamProcessorNotificationChannel"
( \Object
x ->
Text -> StreamProcessorNotificationChannel
StreamProcessorNotificationChannel'
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
StreamProcessorNotificationChannel
where
hashWithSalt :: Int -> StreamProcessorNotificationChannel -> Int
hashWithSalt
Int
_salt
StreamProcessorNotificationChannel' {Text
sNSTopicArn :: Text
$sel:sNSTopicArn:StreamProcessorNotificationChannel' :: StreamProcessorNotificationChannel -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
sNSTopicArn
instance
Prelude.NFData
StreamProcessorNotificationChannel
where
rnf :: StreamProcessorNotificationChannel -> ()
rnf StreamProcessorNotificationChannel' {Text
sNSTopicArn :: Text
$sel:sNSTopicArn:StreamProcessorNotificationChannel' :: StreamProcessorNotificationChannel -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
sNSTopicArn
instance
Data.ToJSON
StreamProcessorNotificationChannel
where
toJSON :: StreamProcessorNotificationChannel -> Value
toJSON StreamProcessorNotificationChannel' {Text
sNSTopicArn :: Text
$sel:sNSTopicArn:StreamProcessorNotificationChannel' :: StreamProcessorNotificationChannel -> 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)]
)