{-# 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
(CreateConfigurationSetTrackingOptions
-> CreateConfigurationSetTrackingOptions -> Bool)
-> (CreateConfigurationSetTrackingOptions
-> CreateConfigurationSetTrackingOptions -> Bool)
-> Eq CreateConfigurationSetTrackingOptions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CreateConfigurationSetTrackingOptions
-> CreateConfigurationSetTrackingOptions -> Bool
== :: CreateConfigurationSetTrackingOptions
-> CreateConfigurationSetTrackingOptions -> Bool
$c/= :: CreateConfigurationSetTrackingOptions
-> CreateConfigurationSetTrackingOptions -> Bool
/= :: 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
$creadsPrec :: Int -> ReadS CreateConfigurationSetTrackingOptions
readsPrec :: Int -> ReadS CreateConfigurationSetTrackingOptions
$creadList :: ReadS [CreateConfigurationSetTrackingOptions]
readList :: ReadS [CreateConfigurationSetTrackingOptions]
$creadPrec :: ReadPrec CreateConfigurationSetTrackingOptions
readPrec :: ReadPrec CreateConfigurationSetTrackingOptions
$creadListPrec :: ReadPrec [CreateConfigurationSetTrackingOptions]
readListPrec :: ReadPrec [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
$cshowsPrec :: Int -> CreateConfigurationSetTrackingOptions -> ShowS
showsPrec :: Int -> CreateConfigurationSetTrackingOptions -> ShowS
$cshow :: CreateConfigurationSetTrackingOptions -> String
show :: CreateConfigurationSetTrackingOptions -> String
$cshowList :: [CreateConfigurationSetTrackingOptions] -> ShowS
showList :: [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
$cfrom :: forall x.
CreateConfigurationSetTrackingOptions
-> Rep CreateConfigurationSetTrackingOptions x
from :: forall x.
CreateConfigurationSetTrackingOptions
-> Rep CreateConfigurationSetTrackingOptions x
$cto :: forall x.
Rep CreateConfigurationSetTrackingOptions x
-> CreateConfigurationSetTrackingOptions
to :: forall x.
Rep CreateConfigurationSetTrackingOptions x
-> CreateConfigurationSetTrackingOptions
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 = (CreateConfigurationSetTrackingOptions -> Text)
-> (CreateConfigurationSetTrackingOptions
-> Text -> CreateConfigurationSetTrackingOptions)
-> Lens' CreateConfigurationSetTrackingOptions Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConfigurationSetTrackingOptions' {Text
$sel:configurationSetName:CreateConfigurationSetTrackingOptions' :: CreateConfigurationSetTrackingOptions -> Text
configurationSetName :: Text
configurationSetName} -> Text
configurationSetName) (\s :: CreateConfigurationSetTrackingOptions
s@CreateConfigurationSetTrackingOptions' {} Text
a -> CreateConfigurationSetTrackingOptions
s {configurationSetName = a} :: CreateConfigurationSetTrackingOptions)
createConfigurationSetTrackingOptions_trackingOptions :: Lens.Lens' CreateConfigurationSetTrackingOptions TrackingOptions
createConfigurationSetTrackingOptions_trackingOptions :: Lens' CreateConfigurationSetTrackingOptions TrackingOptions
createConfigurationSetTrackingOptions_trackingOptions = (CreateConfigurationSetTrackingOptions -> TrackingOptions)
-> (CreateConfigurationSetTrackingOptions
-> TrackingOptions -> CreateConfigurationSetTrackingOptions)
-> Lens' CreateConfigurationSetTrackingOptions TrackingOptions
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConfigurationSetTrackingOptions' {TrackingOptions
$sel:trackingOptions:CreateConfigurationSetTrackingOptions' :: CreateConfigurationSetTrackingOptions -> TrackingOptions
trackingOptions :: TrackingOptions
trackingOptions} -> TrackingOptions
trackingOptions) (\s :: CreateConfigurationSetTrackingOptions
s@CreateConfigurationSetTrackingOptions' {} TrackingOptions
a -> CreateConfigurationSetTrackingOptions
s {trackingOptions = a} :: CreateConfigurationSetTrackingOptions)
instance
Core.AWSRequest
CreateConfigurationSetTrackingOptions
where
type
AWSResponse
CreateConfigurationSetTrackingOptions =
CreateConfigurationSetTrackingOptionsResponse
request :: (Service -> Service)
-> CreateConfigurationSetTrackingOptions
-> Request CreateConfigurationSetTrackingOptions
request Service -> Service
overrides =
Service
-> CreateConfigurationSetTrackingOptions
-> Request CreateConfigurationSetTrackingOptions
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 =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either
String (AWSResponse CreateConfigurationSetTrackingOptions))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateConfigurationSetTrackingOptions
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse CreateConfigurationSetTrackingOptions)))
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'
(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 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
CreateConfigurationSetTrackingOptions
where
hashWithSalt :: Int -> CreateConfigurationSetTrackingOptions -> Int
hashWithSalt
Int
_salt
CreateConfigurationSetTrackingOptions' {Text
TrackingOptions
$sel:configurationSetName:CreateConfigurationSetTrackingOptions' :: CreateConfigurationSetTrackingOptions -> Text
$sel:trackingOptions:CreateConfigurationSetTrackingOptions' :: CreateConfigurationSetTrackingOptions -> TrackingOptions
configurationSetName :: Text
trackingOptions :: TrackingOptions
..} =
Int
_salt
Int -> Text -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
configurationSetName
Int -> TrackingOptions -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` TrackingOptions
trackingOptions
instance
Prelude.NFData
CreateConfigurationSetTrackingOptions
where
rnf :: CreateConfigurationSetTrackingOptions -> ()
rnf CreateConfigurationSetTrackingOptions' {Text
TrackingOptions
$sel:configurationSetName:CreateConfigurationSetTrackingOptions' :: CreateConfigurationSetTrackingOptions -> Text
$sel:trackingOptions:CreateConfigurationSetTrackingOptions' :: CreateConfigurationSetTrackingOptions -> TrackingOptions
configurationSetName :: Text
trackingOptions :: TrackingOptions
..} =
Text -> ()
forall a. NFData a => a -> ()
Prelude.rnf Text
configurationSetName
() -> () -> ()
forall a b. a -> b -> b
`Prelude.seq` TrackingOptions -> ()
forall a. NFData a => a -> ()
Prelude.rnf TrackingOptions
trackingOptions
instance
Data.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
Data.ToPath
CreateConfigurationSetTrackingOptions
where
toPath :: CreateConfigurationSetTrackingOptions -> ByteString
toPath = ByteString -> CreateConfigurationSetTrackingOptions -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Data.ToQuery
CreateConfigurationSetTrackingOptions
where
toQuery :: CreateConfigurationSetTrackingOptions -> QueryString
toQuery CreateConfigurationSetTrackingOptions' {Text
TrackingOptions
$sel:configurationSetName:CreateConfigurationSetTrackingOptions' :: CreateConfigurationSetTrackingOptions -> Text
$sel:trackingOptions:CreateConfigurationSetTrackingOptions' :: CreateConfigurationSetTrackingOptions -> TrackingOptions
configurationSetName :: Text
trackingOptions :: TrackingOptions
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ( ByteString
"CreateConfigurationSetTrackingOptions" ::
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
"TrackingOptions" ByteString -> TrackingOptions -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: 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
$c== :: CreateConfigurationSetTrackingOptionsResponse
-> CreateConfigurationSetTrackingOptionsResponse -> Bool
== :: CreateConfigurationSetTrackingOptionsResponse
-> CreateConfigurationSetTrackingOptionsResponse -> Bool
$c/= :: CreateConfigurationSetTrackingOptionsResponse
-> CreateConfigurationSetTrackingOptionsResponse -> Bool
/= :: 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
$creadsPrec :: Int -> ReadS CreateConfigurationSetTrackingOptionsResponse
readsPrec :: Int -> ReadS CreateConfigurationSetTrackingOptionsResponse
$creadList :: ReadS [CreateConfigurationSetTrackingOptionsResponse]
readList :: ReadS [CreateConfigurationSetTrackingOptionsResponse]
$creadPrec :: ReadPrec CreateConfigurationSetTrackingOptionsResponse
readPrec :: ReadPrec CreateConfigurationSetTrackingOptionsResponse
$creadListPrec :: ReadPrec [CreateConfigurationSetTrackingOptionsResponse]
readListPrec :: ReadPrec [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
$cshowsPrec :: Int -> CreateConfigurationSetTrackingOptionsResponse -> ShowS
showsPrec :: Int -> CreateConfigurationSetTrackingOptionsResponse -> ShowS
$cshow :: CreateConfigurationSetTrackingOptionsResponse -> String
show :: CreateConfigurationSetTrackingOptionsResponse -> String
$cshowList :: [CreateConfigurationSetTrackingOptionsResponse] -> ShowS
showList :: [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
$cfrom :: forall x.
CreateConfigurationSetTrackingOptionsResponse
-> Rep CreateConfigurationSetTrackingOptionsResponse x
from :: forall x.
CreateConfigurationSetTrackingOptionsResponse
-> Rep CreateConfigurationSetTrackingOptionsResponse x
$cto :: forall x.
Rep CreateConfigurationSetTrackingOptionsResponse x
-> CreateConfigurationSetTrackingOptionsResponse
to :: forall x.
Rep CreateConfigurationSetTrackingOptionsResponse x
-> CreateConfigurationSetTrackingOptionsResponse
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 = (CreateConfigurationSetTrackingOptionsResponse -> Int)
-> (CreateConfigurationSetTrackingOptionsResponse
-> Int -> CreateConfigurationSetTrackingOptionsResponse)
-> Lens' CreateConfigurationSetTrackingOptionsResponse Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConfigurationSetTrackingOptionsResponse' {Int
$sel:httpStatus:CreateConfigurationSetTrackingOptionsResponse' :: CreateConfigurationSetTrackingOptionsResponse -> Int
httpStatus :: Int
httpStatus} -> Int
httpStatus) (\s :: CreateConfigurationSetTrackingOptionsResponse
s@CreateConfigurationSetTrackingOptionsResponse' {} Int
a -> CreateConfigurationSetTrackingOptionsResponse
s {httpStatus = a} :: CreateConfigurationSetTrackingOptionsResponse)
instance
Prelude.NFData
CreateConfigurationSetTrackingOptionsResponse
where
rnf :: CreateConfigurationSetTrackingOptionsResponse -> ()
rnf
CreateConfigurationSetTrackingOptionsResponse' {Int
$sel:httpStatus:CreateConfigurationSetTrackingOptionsResponse' :: CreateConfigurationSetTrackingOptionsResponse -> Int
httpStatus :: Int
..} =
Int -> ()
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus