{-# 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.SES.Types.KinesisFirehoseDestination where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data KinesisFirehoseDestination = KinesisFirehoseDestination'
{
KinesisFirehoseDestination -> Text
iAMRoleARN :: Prelude.Text,
KinesisFirehoseDestination -> Text
deliveryStreamARN :: Prelude.Text
}
deriving (KinesisFirehoseDestination -> KinesisFirehoseDestination -> Bool
(KinesisFirehoseDestination -> KinesisFirehoseDestination -> Bool)
-> (KinesisFirehoseDestination
-> KinesisFirehoseDestination -> Bool)
-> Eq KinesisFirehoseDestination
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: KinesisFirehoseDestination -> KinesisFirehoseDestination -> Bool
$c/= :: KinesisFirehoseDestination -> KinesisFirehoseDestination -> Bool
== :: KinesisFirehoseDestination -> KinesisFirehoseDestination -> Bool
$c== :: KinesisFirehoseDestination -> KinesisFirehoseDestination -> Bool
Prelude.Eq, ReadPrec [KinesisFirehoseDestination]
ReadPrec KinesisFirehoseDestination
Int -> ReadS KinesisFirehoseDestination
ReadS [KinesisFirehoseDestination]
(Int -> ReadS KinesisFirehoseDestination)
-> ReadS [KinesisFirehoseDestination]
-> ReadPrec KinesisFirehoseDestination
-> ReadPrec [KinesisFirehoseDestination]
-> Read KinesisFirehoseDestination
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [KinesisFirehoseDestination]
$creadListPrec :: ReadPrec [KinesisFirehoseDestination]
readPrec :: ReadPrec KinesisFirehoseDestination
$creadPrec :: ReadPrec KinesisFirehoseDestination
readList :: ReadS [KinesisFirehoseDestination]
$creadList :: ReadS [KinesisFirehoseDestination]
readsPrec :: Int -> ReadS KinesisFirehoseDestination
$creadsPrec :: Int -> ReadS KinesisFirehoseDestination
Prelude.Read, Int -> KinesisFirehoseDestination -> ShowS
[KinesisFirehoseDestination] -> ShowS
KinesisFirehoseDestination -> String
(Int -> KinesisFirehoseDestination -> ShowS)
-> (KinesisFirehoseDestination -> String)
-> ([KinesisFirehoseDestination] -> ShowS)
-> Show KinesisFirehoseDestination
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [KinesisFirehoseDestination] -> ShowS
$cshowList :: [KinesisFirehoseDestination] -> ShowS
show :: KinesisFirehoseDestination -> String
$cshow :: KinesisFirehoseDestination -> String
showsPrec :: Int -> KinesisFirehoseDestination -> ShowS
$cshowsPrec :: Int -> KinesisFirehoseDestination -> ShowS
Prelude.Show, (forall x.
KinesisFirehoseDestination -> Rep KinesisFirehoseDestination x)
-> (forall x.
Rep KinesisFirehoseDestination x -> KinesisFirehoseDestination)
-> Generic KinesisFirehoseDestination
forall x.
Rep KinesisFirehoseDestination x -> KinesisFirehoseDestination
forall x.
KinesisFirehoseDestination -> Rep KinesisFirehoseDestination x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep KinesisFirehoseDestination x -> KinesisFirehoseDestination
$cfrom :: forall x.
KinesisFirehoseDestination -> Rep KinesisFirehoseDestination x
Prelude.Generic)
newKinesisFirehoseDestination ::
Prelude.Text ->
Prelude.Text ->
KinesisFirehoseDestination
newKinesisFirehoseDestination :: Text -> Text -> KinesisFirehoseDestination
newKinesisFirehoseDestination
Text
pIAMRoleARN_
Text
pDeliveryStreamARN_ =
KinesisFirehoseDestination' :: Text -> Text -> KinesisFirehoseDestination
KinesisFirehoseDestination'
{ $sel:iAMRoleARN:KinesisFirehoseDestination' :: Text
iAMRoleARN =
Text
pIAMRoleARN_,
$sel:deliveryStreamARN:KinesisFirehoseDestination' :: Text
deliveryStreamARN = Text
pDeliveryStreamARN_
}
kinesisFirehoseDestination_iAMRoleARN :: Lens.Lens' KinesisFirehoseDestination Prelude.Text
kinesisFirehoseDestination_iAMRoleARN :: (Text -> f Text)
-> KinesisFirehoseDestination -> f KinesisFirehoseDestination
kinesisFirehoseDestination_iAMRoleARN = (KinesisFirehoseDestination -> Text)
-> (KinesisFirehoseDestination
-> Text -> KinesisFirehoseDestination)
-> Lens
KinesisFirehoseDestination KinesisFirehoseDestination Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KinesisFirehoseDestination' {Text
iAMRoleARN :: Text
$sel:iAMRoleARN:KinesisFirehoseDestination' :: KinesisFirehoseDestination -> Text
iAMRoleARN} -> Text
iAMRoleARN) (\s :: KinesisFirehoseDestination
s@KinesisFirehoseDestination' {} Text
a -> KinesisFirehoseDestination
s {$sel:iAMRoleARN:KinesisFirehoseDestination' :: Text
iAMRoleARN = Text
a} :: KinesisFirehoseDestination)
kinesisFirehoseDestination_deliveryStreamARN :: Lens.Lens' KinesisFirehoseDestination Prelude.Text
kinesisFirehoseDestination_deliveryStreamARN :: (Text -> f Text)
-> KinesisFirehoseDestination -> f KinesisFirehoseDestination
kinesisFirehoseDestination_deliveryStreamARN = (KinesisFirehoseDestination -> Text)
-> (KinesisFirehoseDestination
-> Text -> KinesisFirehoseDestination)
-> Lens
KinesisFirehoseDestination KinesisFirehoseDestination Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KinesisFirehoseDestination' {Text
deliveryStreamARN :: Text
$sel:deliveryStreamARN:KinesisFirehoseDestination' :: KinesisFirehoseDestination -> Text
deliveryStreamARN} -> Text
deliveryStreamARN) (\s :: KinesisFirehoseDestination
s@KinesisFirehoseDestination' {} Text
a -> KinesisFirehoseDestination
s {$sel:deliveryStreamARN:KinesisFirehoseDestination' :: Text
deliveryStreamARN = Text
a} :: KinesisFirehoseDestination)
instance Core.FromXML KinesisFirehoseDestination where
parseXML :: [Node] -> Either String KinesisFirehoseDestination
parseXML [Node]
x =
Text -> Text -> KinesisFirehoseDestination
KinesisFirehoseDestination'
(Text -> Text -> KinesisFirehoseDestination)
-> Either String Text
-> Either String (Text -> KinesisFirehoseDestination)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"IAMRoleARN")
Either String (Text -> KinesisFirehoseDestination)
-> Either String Text -> Either String KinesisFirehoseDestination
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"DeliveryStreamARN")
instance Prelude.Hashable KinesisFirehoseDestination
instance Prelude.NFData KinesisFirehoseDestination
instance Core.ToQuery KinesisFirehoseDestination where
toQuery :: KinesisFirehoseDestination -> QueryString
toQuery KinesisFirehoseDestination' {Text
deliveryStreamARN :: Text
iAMRoleARN :: Text
$sel:deliveryStreamARN:KinesisFirehoseDestination' :: KinesisFirehoseDestination -> Text
$sel:iAMRoleARN:KinesisFirehoseDestination' :: KinesisFirehoseDestination -> Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"IAMRoleARN" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
iAMRoleARN,
ByteString
"DeliveryStreamARN" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
deliveryStreamARN
]