{-# 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.CreateConfigurationSetTrackingOptions
(
CreateConfigurationSetTrackingOptions (..),
newCreateConfigurationSetTrackingOptions,
createConfigurationSetTrackingOptions_configurationSetName,
createConfigurationSetTrackingOptions_trackingOptions,
CreateConfigurationSetTrackingOptionsResponse (..),
newCreateConfigurationSetTrackingOptionsResponse,
createConfigurationSetTrackingOptionsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SES.Types
data CreateConfigurationSetTrackingOptions = CreateConfigurationSetTrackingOptions'
{
CreateConfigurationSetTrackingOptions -> Text
configurationSetName :: Prelude.Text,
CreateConfigurationSetTrackingOptions -> TrackingOptions
trackingOptions :: TrackingOptions
}
deriving (CreateConfigurationSetTrackingOptions
-> CreateConfigurationSetTrackingOptions -> Bool
(CreateConfigurationSetTrackingOptions
-> CreateConfigurationSetTrackingOptions -> Bool)
-> (CreateConfigurationSetTrackingOptions
-> CreateConfigurationSetTrackingOptions -> Bool)
-> Eq CreateConfigurationSetTrackingOptions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateConfigurationSetTrackingOptions
-> CreateConfigurationSetTrackingOptions -> Bool
$c/= :: CreateConfigurationSetTrackingOptions
-> CreateConfigurationSetTrackingOptions -> Bool
== :: CreateConfigurationSetTrackingOptions
-> CreateConfigurationSetTrackingOptions -> Bool
$c== :: CreateConfigurationSetTrackingOptions
-> CreateConfigurationSetTrackingOptions -> Bool
Prelude.Eq, ReadPrec [CreateConfigurationSetTrackingOptions]
ReadPrec CreateConfigurationSetTrackingOptions
Int -> ReadS CreateConfigurationSetTrackingOptions
ReadS [CreateConfigurationSetTrackingOptions]
(Int -> ReadS CreateConfigurationSetTrackingOptions)
-> ReadS [CreateConfigurationSetTrackingOptions]
-> ReadPrec CreateConfigurationSetTrackingOptions
-> ReadPrec [CreateConfigurationSetTrackingOptions]
-> Read CreateConfigurationSetTrackingOptions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateConfigurationSetTrackingOptions]
$creadListPrec :: ReadPrec [CreateConfigurationSetTrackingOptions]
readPrec :: ReadPrec CreateConfigurationSetTrackingOptions
$creadPrec :: ReadPrec CreateConfigurationSetTrackingOptions
readList :: ReadS [CreateConfigurationSetTrackingOptions]
$creadList :: ReadS [CreateConfigurationSetTrackingOptions]
readsPrec :: Int -> ReadS CreateConfigurationSetTrackingOptions
$creadsPrec :: Int -> ReadS CreateConfigurationSetTrackingOptions
Prelude.Read, Int -> CreateConfigurationSetTrackingOptions -> ShowS
[CreateConfigurationSetTrackingOptions] -> ShowS
CreateConfigurationSetTrackingOptions -> String
(Int -> CreateConfigurationSetTrackingOptions -> ShowS)
-> (CreateConfigurationSetTrackingOptions -> String)
-> ([CreateConfigurationSetTrackingOptions] -> ShowS)
-> Show CreateConfigurationSetTrackingOptions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateConfigurationSetTrackingOptions] -> ShowS
$cshowList :: [CreateConfigurationSetTrackingOptions] -> ShowS
show :: CreateConfigurationSetTrackingOptions -> String
$cshow :: CreateConfigurationSetTrackingOptions -> String
showsPrec :: Int -> CreateConfigurationSetTrackingOptions -> ShowS
$cshowsPrec :: Int -> CreateConfigurationSetTrackingOptions -> ShowS
Prelude.Show, (forall x.
CreateConfigurationSetTrackingOptions
-> Rep CreateConfigurationSetTrackingOptions x)
-> (forall x.
Rep CreateConfigurationSetTrackingOptions x
-> CreateConfigurationSetTrackingOptions)
-> Generic CreateConfigurationSetTrackingOptions
forall x.
Rep CreateConfigurationSetTrackingOptions x
-> CreateConfigurationSetTrackingOptions
forall x.
CreateConfigurationSetTrackingOptions
-> Rep CreateConfigurationSetTrackingOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateConfigurationSetTrackingOptions x
-> CreateConfigurationSetTrackingOptions
$cfrom :: forall x.
CreateConfigurationSetTrackingOptions
-> Rep CreateConfigurationSetTrackingOptions x
Prelude.Generic)
newCreateConfigurationSetTrackingOptions ::
Prelude.Text ->
TrackingOptions ->
CreateConfigurationSetTrackingOptions
newCreateConfigurationSetTrackingOptions :: Text -> TrackingOptions -> CreateConfigurationSetTrackingOptions
newCreateConfigurationSetTrackingOptions
Text
pConfigurationSetName_
TrackingOptions
pTrackingOptions_ =
CreateConfigurationSetTrackingOptions' :: Text -> TrackingOptions -> CreateConfigurationSetTrackingOptions
CreateConfigurationSetTrackingOptions'
{ $sel:configurationSetName:CreateConfigurationSetTrackingOptions' :: Text
configurationSetName =
Text
pConfigurationSetName_,
$sel:trackingOptions:CreateConfigurationSetTrackingOptions' :: TrackingOptions
trackingOptions = TrackingOptions
pTrackingOptions_
}
createConfigurationSetTrackingOptions_configurationSetName :: Lens.Lens' CreateConfigurationSetTrackingOptions Prelude.Text
createConfigurationSetTrackingOptions_configurationSetName :: (Text -> f Text)
-> CreateConfigurationSetTrackingOptions
-> f CreateConfigurationSetTrackingOptions
createConfigurationSetTrackingOptions_configurationSetName = (CreateConfigurationSetTrackingOptions -> Text)
-> (CreateConfigurationSetTrackingOptions
-> Text -> CreateConfigurationSetTrackingOptions)
-> Lens
CreateConfigurationSetTrackingOptions
CreateConfigurationSetTrackingOptions
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConfigurationSetTrackingOptions' {Text
configurationSetName :: Text
$sel:configurationSetName:CreateConfigurationSetTrackingOptions' :: CreateConfigurationSetTrackingOptions -> Text
configurationSetName} -> Text
configurationSetName) (\s :: CreateConfigurationSetTrackingOptions
s@CreateConfigurationSetTrackingOptions' {} Text
a -> CreateConfigurationSetTrackingOptions
s {$sel:configurationSetName:CreateConfigurationSetTrackingOptions' :: Text
configurationSetName = Text
a} :: CreateConfigurationSetTrackingOptions)
createConfigurationSetTrackingOptions_trackingOptions :: Lens.Lens' CreateConfigurationSetTrackingOptions TrackingOptions
createConfigurationSetTrackingOptions_trackingOptions :: (TrackingOptions -> f TrackingOptions)
-> CreateConfigurationSetTrackingOptions
-> f CreateConfigurationSetTrackingOptions
createConfigurationSetTrackingOptions_trackingOptions = (CreateConfigurationSetTrackingOptions -> TrackingOptions)
-> (CreateConfigurationSetTrackingOptions
-> TrackingOptions -> CreateConfigurationSetTrackingOptions)
-> Lens
CreateConfigurationSetTrackingOptions
CreateConfigurationSetTrackingOptions
TrackingOptions
TrackingOptions
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConfigurationSetTrackingOptions' {TrackingOptions
trackingOptions :: TrackingOptions
$sel:trackingOptions:CreateConfigurationSetTrackingOptions' :: CreateConfigurationSetTrackingOptions -> TrackingOptions
trackingOptions} -> TrackingOptions
trackingOptions) (\s :: CreateConfigurationSetTrackingOptions
s@CreateConfigurationSetTrackingOptions' {} TrackingOptions
a -> CreateConfigurationSetTrackingOptions
s {$sel:trackingOptions:CreateConfigurationSetTrackingOptions' :: TrackingOptions
trackingOptions = TrackingOptions
a} :: CreateConfigurationSetTrackingOptions)
instance
Core.AWSRequest
CreateConfigurationSetTrackingOptions
where
type
AWSResponse
CreateConfigurationSetTrackingOptions =
CreateConfigurationSetTrackingOptionsResponse
request :: CreateConfigurationSetTrackingOptions
-> Request CreateConfigurationSetTrackingOptions
request = Service
-> CreateConfigurationSetTrackingOptions
-> Request CreateConfigurationSetTrackingOptions
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy CreateConfigurationSetTrackingOptions
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse CreateConfigurationSetTrackingOptions)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either
String (AWSResponse CreateConfigurationSetTrackingOptions))
-> Logger
-> Service
-> Proxy CreateConfigurationSetTrackingOptions
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse CreateConfigurationSetTrackingOptions)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"CreateConfigurationSetTrackingOptionsResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Int -> CreateConfigurationSetTrackingOptionsResponse
CreateConfigurationSetTrackingOptionsResponse'
(Int -> CreateConfigurationSetTrackingOptionsResponse)
-> Either String Int
-> Either String CreateConfigurationSetTrackingOptionsResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
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
CreateConfigurationSetTrackingOptions
instance
Prelude.NFData
CreateConfigurationSetTrackingOptions
instance
Core.ToHeaders
CreateConfigurationSetTrackingOptions
where
toHeaders :: CreateConfigurationSetTrackingOptions -> ResponseHeaders
toHeaders = ResponseHeaders
-> CreateConfigurationSetTrackingOptions -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance
Core.ToPath
CreateConfigurationSetTrackingOptions
where
toPath :: CreateConfigurationSetTrackingOptions -> ByteString
toPath = ByteString -> CreateConfigurationSetTrackingOptions -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
CreateConfigurationSetTrackingOptions
where
toQuery :: CreateConfigurationSetTrackingOptions -> QueryString
toQuery CreateConfigurationSetTrackingOptions' {Text
TrackingOptions
trackingOptions :: TrackingOptions
configurationSetName :: Text
$sel:trackingOptions:CreateConfigurationSetTrackingOptions' :: CreateConfigurationSetTrackingOptions -> TrackingOptions
$sel:configurationSetName:CreateConfigurationSetTrackingOptions' :: CreateConfigurationSetTrackingOptions -> Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ( ByteString
"CreateConfigurationSetTrackingOptions" ::
Prelude.ByteString
),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-12-01" :: Prelude.ByteString),
ByteString
"ConfigurationSetName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
configurationSetName,
ByteString
"TrackingOptions" ByteString -> TrackingOptions -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: TrackingOptions
trackingOptions
]
data CreateConfigurationSetTrackingOptionsResponse = CreateConfigurationSetTrackingOptionsResponse'
{
CreateConfigurationSetTrackingOptionsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateConfigurationSetTrackingOptionsResponse
-> CreateConfigurationSetTrackingOptionsResponse -> Bool
(CreateConfigurationSetTrackingOptionsResponse
-> CreateConfigurationSetTrackingOptionsResponse -> Bool)
-> (CreateConfigurationSetTrackingOptionsResponse
-> CreateConfigurationSetTrackingOptionsResponse -> Bool)
-> Eq CreateConfigurationSetTrackingOptionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateConfigurationSetTrackingOptionsResponse
-> CreateConfigurationSetTrackingOptionsResponse -> Bool
$c/= :: CreateConfigurationSetTrackingOptionsResponse
-> CreateConfigurationSetTrackingOptionsResponse -> Bool
== :: CreateConfigurationSetTrackingOptionsResponse
-> CreateConfigurationSetTrackingOptionsResponse -> Bool
$c== :: CreateConfigurationSetTrackingOptionsResponse
-> CreateConfigurationSetTrackingOptionsResponse -> Bool
Prelude.Eq, ReadPrec [CreateConfigurationSetTrackingOptionsResponse]
ReadPrec CreateConfigurationSetTrackingOptionsResponse
Int -> ReadS CreateConfigurationSetTrackingOptionsResponse
ReadS [CreateConfigurationSetTrackingOptionsResponse]
(Int -> ReadS CreateConfigurationSetTrackingOptionsResponse)
-> ReadS [CreateConfigurationSetTrackingOptionsResponse]
-> ReadPrec CreateConfigurationSetTrackingOptionsResponse
-> ReadPrec [CreateConfigurationSetTrackingOptionsResponse]
-> Read CreateConfigurationSetTrackingOptionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateConfigurationSetTrackingOptionsResponse]
$creadListPrec :: ReadPrec [CreateConfigurationSetTrackingOptionsResponse]
readPrec :: ReadPrec CreateConfigurationSetTrackingOptionsResponse
$creadPrec :: ReadPrec CreateConfigurationSetTrackingOptionsResponse
readList :: ReadS [CreateConfigurationSetTrackingOptionsResponse]
$creadList :: ReadS [CreateConfigurationSetTrackingOptionsResponse]
readsPrec :: Int -> ReadS CreateConfigurationSetTrackingOptionsResponse
$creadsPrec :: Int -> ReadS CreateConfigurationSetTrackingOptionsResponse
Prelude.Read, Int -> CreateConfigurationSetTrackingOptionsResponse -> ShowS
[CreateConfigurationSetTrackingOptionsResponse] -> ShowS
CreateConfigurationSetTrackingOptionsResponse -> String
(Int -> CreateConfigurationSetTrackingOptionsResponse -> ShowS)
-> (CreateConfigurationSetTrackingOptionsResponse -> String)
-> ([CreateConfigurationSetTrackingOptionsResponse] -> ShowS)
-> Show CreateConfigurationSetTrackingOptionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateConfigurationSetTrackingOptionsResponse] -> ShowS
$cshowList :: [CreateConfigurationSetTrackingOptionsResponse] -> ShowS
show :: CreateConfigurationSetTrackingOptionsResponse -> String
$cshow :: CreateConfigurationSetTrackingOptionsResponse -> String
showsPrec :: Int -> CreateConfigurationSetTrackingOptionsResponse -> ShowS
$cshowsPrec :: Int -> CreateConfigurationSetTrackingOptionsResponse -> ShowS
Prelude.Show, (forall x.
CreateConfigurationSetTrackingOptionsResponse
-> Rep CreateConfigurationSetTrackingOptionsResponse x)
-> (forall x.
Rep CreateConfigurationSetTrackingOptionsResponse x
-> CreateConfigurationSetTrackingOptionsResponse)
-> Generic CreateConfigurationSetTrackingOptionsResponse
forall x.
Rep CreateConfigurationSetTrackingOptionsResponse x
-> CreateConfigurationSetTrackingOptionsResponse
forall x.
CreateConfigurationSetTrackingOptionsResponse
-> Rep CreateConfigurationSetTrackingOptionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateConfigurationSetTrackingOptionsResponse x
-> CreateConfigurationSetTrackingOptionsResponse
$cfrom :: forall x.
CreateConfigurationSetTrackingOptionsResponse
-> Rep CreateConfigurationSetTrackingOptionsResponse x
Prelude.Generic)
newCreateConfigurationSetTrackingOptionsResponse ::
Prelude.Int ->
CreateConfigurationSetTrackingOptionsResponse
newCreateConfigurationSetTrackingOptionsResponse :: Int -> CreateConfigurationSetTrackingOptionsResponse
newCreateConfigurationSetTrackingOptionsResponse
Int
pHttpStatus_ =
CreateConfigurationSetTrackingOptionsResponse' :: Int -> CreateConfigurationSetTrackingOptionsResponse
CreateConfigurationSetTrackingOptionsResponse'
{ $sel:httpStatus:CreateConfigurationSetTrackingOptionsResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
createConfigurationSetTrackingOptionsResponse_httpStatus :: Lens.Lens' CreateConfigurationSetTrackingOptionsResponse Prelude.Int
createConfigurationSetTrackingOptionsResponse_httpStatus :: (Int -> f Int)
-> CreateConfigurationSetTrackingOptionsResponse
-> f CreateConfigurationSetTrackingOptionsResponse
createConfigurationSetTrackingOptionsResponse_httpStatus = (CreateConfigurationSetTrackingOptionsResponse -> Int)
-> (CreateConfigurationSetTrackingOptionsResponse
-> Int -> CreateConfigurationSetTrackingOptionsResponse)
-> Lens
CreateConfigurationSetTrackingOptionsResponse
CreateConfigurationSetTrackingOptionsResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConfigurationSetTrackingOptionsResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateConfigurationSetTrackingOptionsResponse' :: CreateConfigurationSetTrackingOptionsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateConfigurationSetTrackingOptionsResponse
s@CreateConfigurationSetTrackingOptionsResponse' {} Int
a -> CreateConfigurationSetTrackingOptionsResponse
s {$sel:httpStatus:CreateConfigurationSetTrackingOptionsResponse' :: Int
httpStatus = Int
a} :: CreateConfigurationSetTrackingOptionsResponse)
instance
Prelude.NFData
CreateConfigurationSetTrackingOptionsResponse