{-# 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.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 CreateConfigurationSetTrackingOptions = CreateConfigurationSetTrackingOptions'
{
CreateConfigurationSetTrackingOptions -> Text
configurationSetName :: Prelude.Text,
CreateConfigurationSetTrackingOptions -> TrackingOptions
trackingOptions :: TrackingOptions
}
deriving (CreateConfigurationSetTrackingOptions
-> CreateConfigurationSetTrackingOptions -> Bool
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]
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
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.
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'
{ $sel:configurationSetName:CreateConfigurationSetTrackingOptions' :: Text
configurationSetName =
Text
pConfigurationSetName_,
$sel:trackingOptions:CreateConfigurationSetTrackingOptions' :: TrackingOptions
trackingOptions = TrackingOptions
pTrackingOptions_
}
createConfigurationSetTrackingOptions_configurationSetName :: Lens.Lens' CreateConfigurationSetTrackingOptions Prelude.Text
createConfigurationSetTrackingOptions_configurationSetName :: Lens' CreateConfigurationSetTrackingOptions Text
createConfigurationSetTrackingOptions_configurationSetName = 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 :: Lens' CreateConfigurationSetTrackingOptions TrackingOptions
createConfigurationSetTrackingOptions_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 :: (Service -> Service)
-> CreateConfigurationSetTrackingOptions
-> Request CreateConfigurationSetTrackingOptions
request Service -> Service
overrides =
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 CreateConfigurationSetTrackingOptions
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse CreateConfigurationSetTrackingOptions)))
response =
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
"CreateConfigurationSetTrackingOptionsResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Int -> CreateConfigurationSetTrackingOptionsResponse
CreateConfigurationSetTrackingOptionsResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance
Prelude.Hashable
CreateConfigurationSetTrackingOptions
where
hashWithSalt :: Int -> CreateConfigurationSetTrackingOptions -> Int
hashWithSalt
Int
_salt
CreateConfigurationSetTrackingOptions' {Text
TrackingOptions
trackingOptions :: TrackingOptions
configurationSetName :: Text
$sel:trackingOptions:CreateConfigurationSetTrackingOptions' :: CreateConfigurationSetTrackingOptions -> TrackingOptions
$sel:configurationSetName:CreateConfigurationSetTrackingOptions' :: CreateConfigurationSetTrackingOptions -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
configurationSetName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` TrackingOptions
trackingOptions
instance
Prelude.NFData
CreateConfigurationSetTrackingOptions
where
rnf :: CreateConfigurationSetTrackingOptions -> ()
rnf CreateConfigurationSetTrackingOptions' {Text
TrackingOptions
trackingOptions :: TrackingOptions
configurationSetName :: Text
$sel:trackingOptions:CreateConfigurationSetTrackingOptions' :: CreateConfigurationSetTrackingOptions -> TrackingOptions
$sel:configurationSetName:CreateConfigurationSetTrackingOptions' :: CreateConfigurationSetTrackingOptions -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
configurationSetName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf TrackingOptions
trackingOptions
instance
Data.ToHeaders
CreateConfigurationSetTrackingOptions
where
toHeaders :: CreateConfigurationSetTrackingOptions -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance
Data.ToPath
CreateConfigurationSetTrackingOptions
where
toPath :: CreateConfigurationSetTrackingOptions -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Data.ToQuery
CreateConfigurationSetTrackingOptions
where
toQuery :: CreateConfigurationSetTrackingOptions -> QueryString
toQuery CreateConfigurationSetTrackingOptions' {Text
TrackingOptions
trackingOptions :: TrackingOptions
configurationSetName :: Text
$sel:trackingOptions:CreateConfigurationSetTrackingOptions' :: CreateConfigurationSetTrackingOptions -> TrackingOptions
$sel:configurationSetName:CreateConfigurationSetTrackingOptions' :: CreateConfigurationSetTrackingOptions -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ( ByteString
"CreateConfigurationSetTrackingOptions" ::
Prelude.ByteString
),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-12-01" :: Prelude.ByteString),
ByteString
"ConfigurationSetName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
configurationSetName,
ByteString
"TrackingOptions" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: TrackingOptions
trackingOptions
]
data CreateConfigurationSetTrackingOptionsResponse = CreateConfigurationSetTrackingOptionsResponse'
{
CreateConfigurationSetTrackingOptionsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateConfigurationSetTrackingOptionsResponse
-> CreateConfigurationSetTrackingOptionsResponse -> Bool
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]
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
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.
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'
{ $sel:httpStatus:CreateConfigurationSetTrackingOptionsResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
createConfigurationSetTrackingOptionsResponse_httpStatus :: Lens.Lens' CreateConfigurationSetTrackingOptionsResponse Prelude.Int
createConfigurationSetTrackingOptionsResponse_httpStatus :: Lens' CreateConfigurationSetTrackingOptionsResponse Int
createConfigurationSetTrackingOptionsResponse_httpStatus = 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
where
rnf :: CreateConfigurationSetTrackingOptionsResponse -> ()
rnf
CreateConfigurationSetTrackingOptionsResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateConfigurationSetTrackingOptionsResponse' :: CreateConfigurationSetTrackingOptionsResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus