{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.SES.UpdateConfigurationSetEventDestination
(
UpdateConfigurationSetEventDestination (..),
newUpdateConfigurationSetEventDestination,
updateConfigurationSetEventDestination_configurationSetName,
updateConfigurationSetEventDestination_eventDestination,
UpdateConfigurationSetEventDestinationResponse (..),
newUpdateConfigurationSetEventDestinationResponse,
updateConfigurationSetEventDestinationResponse_httpStatus,
)
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
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SES.Types
data UpdateConfigurationSetEventDestination = UpdateConfigurationSetEventDestination'
{
UpdateConfigurationSetEventDestination -> Text
configurationSetName :: Prelude.Text,
UpdateConfigurationSetEventDestination -> EventDestination
eventDestination :: EventDestination
}
deriving (UpdateConfigurationSetEventDestination
-> UpdateConfigurationSetEventDestination -> Bool
(UpdateConfigurationSetEventDestination
-> UpdateConfigurationSetEventDestination -> Bool)
-> (UpdateConfigurationSetEventDestination
-> UpdateConfigurationSetEventDestination -> Bool)
-> Eq UpdateConfigurationSetEventDestination
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: UpdateConfigurationSetEventDestination
-> UpdateConfigurationSetEventDestination -> Bool
== :: UpdateConfigurationSetEventDestination
-> UpdateConfigurationSetEventDestination -> Bool
$c/= :: UpdateConfigurationSetEventDestination
-> UpdateConfigurationSetEventDestination -> Bool
/= :: UpdateConfigurationSetEventDestination
-> UpdateConfigurationSetEventDestination -> Bool
Prelude.Eq, ReadPrec [UpdateConfigurationSetEventDestination]
ReadPrec UpdateConfigurationSetEventDestination
Int -> ReadS UpdateConfigurationSetEventDestination
ReadS [UpdateConfigurationSetEventDestination]
(Int -> ReadS UpdateConfigurationSetEventDestination)
-> ReadS [UpdateConfigurationSetEventDestination]
-> ReadPrec UpdateConfigurationSetEventDestination
-> ReadPrec [UpdateConfigurationSetEventDestination]
-> Read UpdateConfigurationSetEventDestination
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS UpdateConfigurationSetEventDestination
readsPrec :: Int -> ReadS UpdateConfigurationSetEventDestination
$creadList :: ReadS [UpdateConfigurationSetEventDestination]
readList :: ReadS [UpdateConfigurationSetEventDestination]
$creadPrec :: ReadPrec UpdateConfigurationSetEventDestination
readPrec :: ReadPrec UpdateConfigurationSetEventDestination
$creadListPrec :: ReadPrec [UpdateConfigurationSetEventDestination]
readListPrec :: ReadPrec [UpdateConfigurationSetEventDestination]
Prelude.Read, Int -> UpdateConfigurationSetEventDestination -> ShowS
[UpdateConfigurationSetEventDestination] -> ShowS
UpdateConfigurationSetEventDestination -> String
(Int -> UpdateConfigurationSetEventDestination -> ShowS)
-> (UpdateConfigurationSetEventDestination -> String)
-> ([UpdateConfigurationSetEventDestination] -> ShowS)
-> Show UpdateConfigurationSetEventDestination
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> UpdateConfigurationSetEventDestination -> ShowS
showsPrec :: Int -> UpdateConfigurationSetEventDestination -> ShowS
$cshow :: UpdateConfigurationSetEventDestination -> String
show :: UpdateConfigurationSetEventDestination -> String
$cshowList :: [UpdateConfigurationSetEventDestination] -> ShowS
showList :: [UpdateConfigurationSetEventDestination] -> ShowS
Prelude.Show, (forall x.
UpdateConfigurationSetEventDestination
-> Rep UpdateConfigurationSetEventDestination x)
-> (forall x.
Rep UpdateConfigurationSetEventDestination x
-> UpdateConfigurationSetEventDestination)
-> Generic UpdateConfigurationSetEventDestination
forall x.
Rep UpdateConfigurationSetEventDestination x
-> UpdateConfigurationSetEventDestination
forall x.
UpdateConfigurationSetEventDestination
-> Rep UpdateConfigurationSetEventDestination x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
UpdateConfigurationSetEventDestination
-> Rep UpdateConfigurationSetEventDestination x
from :: forall x.
UpdateConfigurationSetEventDestination
-> Rep UpdateConfigurationSetEventDestination x
$cto :: forall x.
Rep UpdateConfigurationSetEventDestination x
-> UpdateConfigurationSetEventDestination
to :: forall x.
Rep UpdateConfigurationSetEventDestination x
-> UpdateConfigurationSetEventDestination
Prelude.Generic)
newUpdateConfigurationSetEventDestination ::
Prelude.Text ->
EventDestination ->
UpdateConfigurationSetEventDestination
newUpdateConfigurationSetEventDestination :: Text -> EventDestination -> UpdateConfigurationSetEventDestination
newUpdateConfigurationSetEventDestination
Text
pConfigurationSetName_
EventDestination
pEventDestination_ =
UpdateConfigurationSetEventDestination'
{ $sel:configurationSetName:UpdateConfigurationSetEventDestination' :: Text
configurationSetName =
Text
pConfigurationSetName_,
$sel:eventDestination:UpdateConfigurationSetEventDestination' :: EventDestination
eventDestination =
EventDestination
pEventDestination_
}
updateConfigurationSetEventDestination_configurationSetName :: Lens.Lens' UpdateConfigurationSetEventDestination Prelude.Text
updateConfigurationSetEventDestination_configurationSetName :: Lens' UpdateConfigurationSetEventDestination Text
updateConfigurationSetEventDestination_configurationSetName = (UpdateConfigurationSetEventDestination -> Text)
-> (UpdateConfigurationSetEventDestination
-> Text -> UpdateConfigurationSetEventDestination)
-> Lens' UpdateConfigurationSetEventDestination Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateConfigurationSetEventDestination' {Text
$sel:configurationSetName:UpdateConfigurationSetEventDestination' :: UpdateConfigurationSetEventDestination -> Text
configurationSetName :: Text
configurationSetName} -> Text
configurationSetName) (\s :: UpdateConfigurationSetEventDestination
s@UpdateConfigurationSetEventDestination' {} Text
a -> UpdateConfigurationSetEventDestination
s {configurationSetName = a} :: UpdateConfigurationSetEventDestination)
updateConfigurationSetEventDestination_eventDestination :: Lens.Lens' UpdateConfigurationSetEventDestination EventDestination
updateConfigurationSetEventDestination_eventDestination :: Lens' UpdateConfigurationSetEventDestination EventDestination
updateConfigurationSetEventDestination_eventDestination = (UpdateConfigurationSetEventDestination -> EventDestination)
-> (UpdateConfigurationSetEventDestination
-> EventDestination -> UpdateConfigurationSetEventDestination)
-> Lens' UpdateConfigurationSetEventDestination EventDestination
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateConfigurationSetEventDestination' {EventDestination
$sel:eventDestination:UpdateConfigurationSetEventDestination' :: UpdateConfigurationSetEventDestination -> EventDestination
eventDestination :: EventDestination
eventDestination} -> EventDestination
eventDestination) (\s :: UpdateConfigurationSetEventDestination
s@UpdateConfigurationSetEventDestination' {} EventDestination
a -> UpdateConfigurationSetEventDestination
s {eventDestination = a} :: UpdateConfigurationSetEventDestination)
instance
Core.AWSRequest
UpdateConfigurationSetEventDestination
where
type
AWSResponse
UpdateConfigurationSetEventDestination =
UpdateConfigurationSetEventDestinationResponse
request :: (Service -> Service)
-> UpdateConfigurationSetEventDestination
-> Request UpdateConfigurationSetEventDestination
request Service -> Service
overrides =
Service
-> UpdateConfigurationSetEventDestination
-> Request UpdateConfigurationSetEventDestination
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateConfigurationSetEventDestination
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse UpdateConfigurationSetEventDestination)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either
String (AWSResponse UpdateConfigurationSetEventDestination))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateConfigurationSetEventDestination
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse UpdateConfigurationSetEventDestination)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"UpdateConfigurationSetEventDestinationResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Int -> UpdateConfigurationSetEventDestinationResponse
UpdateConfigurationSetEventDestinationResponse'
(Int -> UpdateConfigurationSetEventDestinationResponse)
-> Either String Int
-> Either String UpdateConfigurationSetEventDestinationResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall a. a -> Either String a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance
Prelude.Hashable
UpdateConfigurationSetEventDestination
where
hashWithSalt :: Int -> UpdateConfigurationSetEventDestination -> Int
hashWithSalt
Int
_salt
UpdateConfigurationSetEventDestination' {Text
EventDestination
$sel:configurationSetName:UpdateConfigurationSetEventDestination' :: UpdateConfigurationSetEventDestination -> Text
$sel:eventDestination:UpdateConfigurationSetEventDestination' :: UpdateConfigurationSetEventDestination -> EventDestination
configurationSetName :: Text
eventDestination :: EventDestination
..} =
Int
_salt
Int -> Text -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
configurationSetName
Int -> EventDestination -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` EventDestination
eventDestination
instance
Prelude.NFData
UpdateConfigurationSetEventDestination
where
rnf :: UpdateConfigurationSetEventDestination -> ()
rnf UpdateConfigurationSetEventDestination' {Text
EventDestination
$sel:configurationSetName:UpdateConfigurationSetEventDestination' :: UpdateConfigurationSetEventDestination -> Text
$sel:eventDestination:UpdateConfigurationSetEventDestination' :: UpdateConfigurationSetEventDestination -> EventDestination
configurationSetName :: Text
eventDestination :: EventDestination
..} =
Text -> ()
forall a. NFData a => a -> ()
Prelude.rnf Text
configurationSetName
() -> () -> ()
forall a b. a -> b -> b
`Prelude.seq` EventDestination -> ()
forall a. NFData a => a -> ()
Prelude.rnf EventDestination
eventDestination
instance
Data.ToHeaders
UpdateConfigurationSetEventDestination
where
toHeaders :: UpdateConfigurationSetEventDestination -> ResponseHeaders
toHeaders = ResponseHeaders
-> UpdateConfigurationSetEventDestination -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance
Data.ToPath
UpdateConfigurationSetEventDestination
where
toPath :: UpdateConfigurationSetEventDestination -> ByteString
toPath = ByteString -> UpdateConfigurationSetEventDestination -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Data.ToQuery
UpdateConfigurationSetEventDestination
where
toQuery :: UpdateConfigurationSetEventDestination -> QueryString
toQuery UpdateConfigurationSetEventDestination' {Text
EventDestination
$sel:configurationSetName:UpdateConfigurationSetEventDestination' :: UpdateConfigurationSetEventDestination -> Text
$sel:eventDestination:UpdateConfigurationSetEventDestination' :: UpdateConfigurationSetEventDestination -> EventDestination
configurationSetName :: Text
eventDestination :: EventDestination
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ( ByteString
"UpdateConfigurationSetEventDestination" ::
Prelude.ByteString
),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-12-01" :: Prelude.ByteString),
ByteString
"ConfigurationSetName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
configurationSetName,
ByteString
"EventDestination" ByteString -> EventDestination -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: EventDestination
eventDestination
]
data UpdateConfigurationSetEventDestinationResponse = UpdateConfigurationSetEventDestinationResponse'
{
UpdateConfigurationSetEventDestinationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (UpdateConfigurationSetEventDestinationResponse
-> UpdateConfigurationSetEventDestinationResponse -> Bool
(UpdateConfigurationSetEventDestinationResponse
-> UpdateConfigurationSetEventDestinationResponse -> Bool)
-> (UpdateConfigurationSetEventDestinationResponse
-> UpdateConfigurationSetEventDestinationResponse -> Bool)
-> Eq UpdateConfigurationSetEventDestinationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: UpdateConfigurationSetEventDestinationResponse
-> UpdateConfigurationSetEventDestinationResponse -> Bool
== :: UpdateConfigurationSetEventDestinationResponse
-> UpdateConfigurationSetEventDestinationResponse -> Bool
$c/= :: UpdateConfigurationSetEventDestinationResponse
-> UpdateConfigurationSetEventDestinationResponse -> Bool
/= :: UpdateConfigurationSetEventDestinationResponse
-> UpdateConfigurationSetEventDestinationResponse -> Bool
Prelude.Eq, ReadPrec [UpdateConfigurationSetEventDestinationResponse]
ReadPrec UpdateConfigurationSetEventDestinationResponse
Int -> ReadS UpdateConfigurationSetEventDestinationResponse
ReadS [UpdateConfigurationSetEventDestinationResponse]
(Int -> ReadS UpdateConfigurationSetEventDestinationResponse)
-> ReadS [UpdateConfigurationSetEventDestinationResponse]
-> ReadPrec UpdateConfigurationSetEventDestinationResponse
-> ReadPrec [UpdateConfigurationSetEventDestinationResponse]
-> Read UpdateConfigurationSetEventDestinationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS UpdateConfigurationSetEventDestinationResponse
readsPrec :: Int -> ReadS UpdateConfigurationSetEventDestinationResponse
$creadList :: ReadS [UpdateConfigurationSetEventDestinationResponse]
readList :: ReadS [UpdateConfigurationSetEventDestinationResponse]
$creadPrec :: ReadPrec UpdateConfigurationSetEventDestinationResponse
readPrec :: ReadPrec UpdateConfigurationSetEventDestinationResponse
$creadListPrec :: ReadPrec [UpdateConfigurationSetEventDestinationResponse]
readListPrec :: ReadPrec [UpdateConfigurationSetEventDestinationResponse]
Prelude.Read, Int -> UpdateConfigurationSetEventDestinationResponse -> ShowS
[UpdateConfigurationSetEventDestinationResponse] -> ShowS
UpdateConfigurationSetEventDestinationResponse -> String
(Int -> UpdateConfigurationSetEventDestinationResponse -> ShowS)
-> (UpdateConfigurationSetEventDestinationResponse -> String)
-> ([UpdateConfigurationSetEventDestinationResponse] -> ShowS)
-> Show UpdateConfigurationSetEventDestinationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> UpdateConfigurationSetEventDestinationResponse -> ShowS
showsPrec :: Int -> UpdateConfigurationSetEventDestinationResponse -> ShowS
$cshow :: UpdateConfigurationSetEventDestinationResponse -> String
show :: UpdateConfigurationSetEventDestinationResponse -> String
$cshowList :: [UpdateConfigurationSetEventDestinationResponse] -> ShowS
showList :: [UpdateConfigurationSetEventDestinationResponse] -> ShowS
Prelude.Show, (forall x.
UpdateConfigurationSetEventDestinationResponse
-> Rep UpdateConfigurationSetEventDestinationResponse x)
-> (forall x.
Rep UpdateConfigurationSetEventDestinationResponse x
-> UpdateConfigurationSetEventDestinationResponse)
-> Generic UpdateConfigurationSetEventDestinationResponse
forall x.
Rep UpdateConfigurationSetEventDestinationResponse x
-> UpdateConfigurationSetEventDestinationResponse
forall x.
UpdateConfigurationSetEventDestinationResponse
-> Rep UpdateConfigurationSetEventDestinationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
UpdateConfigurationSetEventDestinationResponse
-> Rep UpdateConfigurationSetEventDestinationResponse x
from :: forall x.
UpdateConfigurationSetEventDestinationResponse
-> Rep UpdateConfigurationSetEventDestinationResponse x
$cto :: forall x.
Rep UpdateConfigurationSetEventDestinationResponse x
-> UpdateConfigurationSetEventDestinationResponse
to :: forall x.
Rep UpdateConfigurationSetEventDestinationResponse x
-> UpdateConfigurationSetEventDestinationResponse
Prelude.Generic)
newUpdateConfigurationSetEventDestinationResponse ::
Prelude.Int ->
UpdateConfigurationSetEventDestinationResponse
newUpdateConfigurationSetEventDestinationResponse :: Int -> UpdateConfigurationSetEventDestinationResponse
newUpdateConfigurationSetEventDestinationResponse
Int
pHttpStatus_ =
UpdateConfigurationSetEventDestinationResponse'
{ $sel:httpStatus:UpdateConfigurationSetEventDestinationResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
updateConfigurationSetEventDestinationResponse_httpStatus :: Lens.Lens' UpdateConfigurationSetEventDestinationResponse Prelude.Int
updateConfigurationSetEventDestinationResponse_httpStatus :: Lens' UpdateConfigurationSetEventDestinationResponse Int
updateConfigurationSetEventDestinationResponse_httpStatus = (UpdateConfigurationSetEventDestinationResponse -> Int)
-> (UpdateConfigurationSetEventDestinationResponse
-> Int -> UpdateConfigurationSetEventDestinationResponse)
-> Lens' UpdateConfigurationSetEventDestinationResponse Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateConfigurationSetEventDestinationResponse' {Int
$sel:httpStatus:UpdateConfigurationSetEventDestinationResponse' :: UpdateConfigurationSetEventDestinationResponse -> Int
httpStatus :: Int
httpStatus} -> Int
httpStatus) (\s :: UpdateConfigurationSetEventDestinationResponse
s@UpdateConfigurationSetEventDestinationResponse' {} Int
a -> UpdateConfigurationSetEventDestinationResponse
s {httpStatus = a} :: UpdateConfigurationSetEventDestinationResponse)
instance
Prelude.NFData
UpdateConfigurationSetEventDestinationResponse
where
rnf :: UpdateConfigurationSetEventDestinationResponse -> ()
rnf
UpdateConfigurationSetEventDestinationResponse' {Int
$sel:httpStatus:UpdateConfigurationSetEventDestinationResponse' :: UpdateConfigurationSetEventDestinationResponse -> Int
httpStatus :: Int
..} =
Int -> ()
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus