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