{-# 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.Firehose.Types.KinesisStreamSourceConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data KinesisStreamSourceConfiguration = KinesisStreamSourceConfiguration'
{
KinesisStreamSourceConfiguration -> Text
kinesisStreamARN :: Prelude.Text,
KinesisStreamSourceConfiguration -> Text
roleARN :: Prelude.Text
}
deriving (KinesisStreamSourceConfiguration
-> KinesisStreamSourceConfiguration -> Bool
(KinesisStreamSourceConfiguration
-> KinesisStreamSourceConfiguration -> Bool)
-> (KinesisStreamSourceConfiguration
-> KinesisStreamSourceConfiguration -> Bool)
-> Eq KinesisStreamSourceConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: KinesisStreamSourceConfiguration
-> KinesisStreamSourceConfiguration -> Bool
$c/= :: KinesisStreamSourceConfiguration
-> KinesisStreamSourceConfiguration -> Bool
== :: KinesisStreamSourceConfiguration
-> KinesisStreamSourceConfiguration -> Bool
$c== :: KinesisStreamSourceConfiguration
-> KinesisStreamSourceConfiguration -> Bool
Prelude.Eq, ReadPrec [KinesisStreamSourceConfiguration]
ReadPrec KinesisStreamSourceConfiguration
Int -> ReadS KinesisStreamSourceConfiguration
ReadS [KinesisStreamSourceConfiguration]
(Int -> ReadS KinesisStreamSourceConfiguration)
-> ReadS [KinesisStreamSourceConfiguration]
-> ReadPrec KinesisStreamSourceConfiguration
-> ReadPrec [KinesisStreamSourceConfiguration]
-> Read KinesisStreamSourceConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [KinesisStreamSourceConfiguration]
$creadListPrec :: ReadPrec [KinesisStreamSourceConfiguration]
readPrec :: ReadPrec KinesisStreamSourceConfiguration
$creadPrec :: ReadPrec KinesisStreamSourceConfiguration
readList :: ReadS [KinesisStreamSourceConfiguration]
$creadList :: ReadS [KinesisStreamSourceConfiguration]
readsPrec :: Int -> ReadS KinesisStreamSourceConfiguration
$creadsPrec :: Int -> ReadS KinesisStreamSourceConfiguration
Prelude.Read, Int -> KinesisStreamSourceConfiguration -> ShowS
[KinesisStreamSourceConfiguration] -> ShowS
KinesisStreamSourceConfiguration -> String
(Int -> KinesisStreamSourceConfiguration -> ShowS)
-> (KinesisStreamSourceConfiguration -> String)
-> ([KinesisStreamSourceConfiguration] -> ShowS)
-> Show KinesisStreamSourceConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [KinesisStreamSourceConfiguration] -> ShowS
$cshowList :: [KinesisStreamSourceConfiguration] -> ShowS
show :: KinesisStreamSourceConfiguration -> String
$cshow :: KinesisStreamSourceConfiguration -> String
showsPrec :: Int -> KinesisStreamSourceConfiguration -> ShowS
$cshowsPrec :: Int -> KinesisStreamSourceConfiguration -> ShowS
Prelude.Show, (forall x.
KinesisStreamSourceConfiguration
-> Rep KinesisStreamSourceConfiguration x)
-> (forall x.
Rep KinesisStreamSourceConfiguration x
-> KinesisStreamSourceConfiguration)
-> Generic KinesisStreamSourceConfiguration
forall x.
Rep KinesisStreamSourceConfiguration x
-> KinesisStreamSourceConfiguration
forall x.
KinesisStreamSourceConfiguration
-> Rep KinesisStreamSourceConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep KinesisStreamSourceConfiguration x
-> KinesisStreamSourceConfiguration
$cfrom :: forall x.
KinesisStreamSourceConfiguration
-> Rep KinesisStreamSourceConfiguration x
Prelude.Generic)
newKinesisStreamSourceConfiguration ::
Prelude.Text ->
Prelude.Text ->
KinesisStreamSourceConfiguration
newKinesisStreamSourceConfiguration :: Text -> Text -> KinesisStreamSourceConfiguration
newKinesisStreamSourceConfiguration
Text
pKinesisStreamARN_
Text
pRoleARN_ =
KinesisStreamSourceConfiguration' :: Text -> Text -> KinesisStreamSourceConfiguration
KinesisStreamSourceConfiguration'
{ $sel:kinesisStreamARN:KinesisStreamSourceConfiguration' :: Text
kinesisStreamARN =
Text
pKinesisStreamARN_,
$sel:roleARN:KinesisStreamSourceConfiguration' :: Text
roleARN = Text
pRoleARN_
}
kinesisStreamSourceConfiguration_kinesisStreamARN :: Lens.Lens' KinesisStreamSourceConfiguration Prelude.Text
kinesisStreamSourceConfiguration_kinesisStreamARN :: (Text -> f Text)
-> KinesisStreamSourceConfiguration
-> f KinesisStreamSourceConfiguration
kinesisStreamSourceConfiguration_kinesisStreamARN = (KinesisStreamSourceConfiguration -> Text)
-> (KinesisStreamSourceConfiguration
-> Text -> KinesisStreamSourceConfiguration)
-> Lens
KinesisStreamSourceConfiguration
KinesisStreamSourceConfiguration
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KinesisStreamSourceConfiguration' {Text
kinesisStreamARN :: Text
$sel:kinesisStreamARN:KinesisStreamSourceConfiguration' :: KinesisStreamSourceConfiguration -> Text
kinesisStreamARN} -> Text
kinesisStreamARN) (\s :: KinesisStreamSourceConfiguration
s@KinesisStreamSourceConfiguration' {} Text
a -> KinesisStreamSourceConfiguration
s {$sel:kinesisStreamARN:KinesisStreamSourceConfiguration' :: Text
kinesisStreamARN = Text
a} :: KinesisStreamSourceConfiguration)
kinesisStreamSourceConfiguration_roleARN :: Lens.Lens' KinesisStreamSourceConfiguration Prelude.Text
kinesisStreamSourceConfiguration_roleARN :: (Text -> f Text)
-> KinesisStreamSourceConfiguration
-> f KinesisStreamSourceConfiguration
kinesisStreamSourceConfiguration_roleARN = (KinesisStreamSourceConfiguration -> Text)
-> (KinesisStreamSourceConfiguration
-> Text -> KinesisStreamSourceConfiguration)
-> Lens
KinesisStreamSourceConfiguration
KinesisStreamSourceConfiguration
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KinesisStreamSourceConfiguration' {Text
roleARN :: Text
$sel:roleARN:KinesisStreamSourceConfiguration' :: KinesisStreamSourceConfiguration -> Text
roleARN} -> Text
roleARN) (\s :: KinesisStreamSourceConfiguration
s@KinesisStreamSourceConfiguration' {} Text
a -> KinesisStreamSourceConfiguration
s {$sel:roleARN:KinesisStreamSourceConfiguration' :: Text
roleARN = Text
a} :: KinesisStreamSourceConfiguration)
instance
Prelude.Hashable
KinesisStreamSourceConfiguration
instance
Prelude.NFData
KinesisStreamSourceConfiguration
instance Core.ToJSON KinesisStreamSourceConfiguration where
toJSON :: KinesisStreamSourceConfiguration -> Value
toJSON KinesisStreamSourceConfiguration' {Text
roleARN :: Text
kinesisStreamARN :: Text
$sel:roleARN:KinesisStreamSourceConfiguration' :: KinesisStreamSourceConfiguration -> Text
$sel:kinesisStreamARN:KinesisStreamSourceConfiguration' :: KinesisStreamSourceConfiguration -> Text
..} =
[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
"KinesisStreamARN" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
kinesisStreamARN),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"RoleARN" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
roleARN)
]
)