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