{-# 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.ConnectCampaigns.ResumeCampaign
(
ResumeCampaign (..),
newResumeCampaign,
resumeCampaign_id,
ResumeCampaignResponse (..),
newResumeCampaignResponse,
)
where
import Amazonka.ConnectCampaigns.Types
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
data ResumeCampaign = ResumeCampaign'
{ ResumeCampaign -> Text
id :: Prelude.Text
}
deriving (ResumeCampaign -> ResumeCampaign -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResumeCampaign -> ResumeCampaign -> Bool
$c/= :: ResumeCampaign -> ResumeCampaign -> Bool
== :: ResumeCampaign -> ResumeCampaign -> Bool
$c== :: ResumeCampaign -> ResumeCampaign -> Bool
Prelude.Eq, ReadPrec [ResumeCampaign]
ReadPrec ResumeCampaign
Int -> ReadS ResumeCampaign
ReadS [ResumeCampaign]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResumeCampaign]
$creadListPrec :: ReadPrec [ResumeCampaign]
readPrec :: ReadPrec ResumeCampaign
$creadPrec :: ReadPrec ResumeCampaign
readList :: ReadS [ResumeCampaign]
$creadList :: ReadS [ResumeCampaign]
readsPrec :: Int -> ReadS ResumeCampaign
$creadsPrec :: Int -> ReadS ResumeCampaign
Prelude.Read, Int -> ResumeCampaign -> ShowS
[ResumeCampaign] -> ShowS
ResumeCampaign -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResumeCampaign] -> ShowS
$cshowList :: [ResumeCampaign] -> ShowS
show :: ResumeCampaign -> String
$cshow :: ResumeCampaign -> String
showsPrec :: Int -> ResumeCampaign -> ShowS
$cshowsPrec :: Int -> ResumeCampaign -> ShowS
Prelude.Show, forall x. Rep ResumeCampaign x -> ResumeCampaign
forall x. ResumeCampaign -> Rep ResumeCampaign x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ResumeCampaign x -> ResumeCampaign
$cfrom :: forall x. ResumeCampaign -> Rep ResumeCampaign x
Prelude.Generic)
newResumeCampaign ::
Prelude.Text ->
ResumeCampaign
newResumeCampaign :: Text -> ResumeCampaign
newResumeCampaign Text
pId_ = ResumeCampaign' {$sel:id:ResumeCampaign' :: Text
id = Text
pId_}
resumeCampaign_id :: Lens.Lens' ResumeCampaign Prelude.Text
resumeCampaign_id :: Lens' ResumeCampaign Text
resumeCampaign_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResumeCampaign' {Text
id :: Text
$sel:id:ResumeCampaign' :: ResumeCampaign -> Text
id} -> Text
id) (\s :: ResumeCampaign
s@ResumeCampaign' {} Text
a -> ResumeCampaign
s {$sel:id:ResumeCampaign' :: Text
id = Text
a} :: ResumeCampaign)
instance Core.AWSRequest ResumeCampaign where
type
AWSResponse ResumeCampaign =
ResumeCampaignResponse
request :: (Service -> Service) -> ResumeCampaign -> Request ResumeCampaign
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ResumeCampaign
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ResumeCampaign)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull ResumeCampaignResponse
ResumeCampaignResponse'
instance Prelude.Hashable ResumeCampaign where
hashWithSalt :: Int -> ResumeCampaign -> Int
hashWithSalt Int
_salt ResumeCampaign' {Text
id :: Text
$sel:id:ResumeCampaign' :: ResumeCampaign -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
id
instance Prelude.NFData ResumeCampaign where
rnf :: ResumeCampaign -> ()
rnf ResumeCampaign' {Text
id :: Text
$sel:id:ResumeCampaign' :: ResumeCampaign -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
id
instance Data.ToHeaders ResumeCampaign where
toHeaders :: ResumeCampaign -> [Header]
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> [Header]
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON ResumeCampaign where
toJSON :: ResumeCampaign -> Value
toJSON = forall a b. a -> b -> a
Prelude.const (Object -> Value
Data.Object forall a. Monoid a => a
Prelude.mempty)
instance Data.ToPath ResumeCampaign where
toPath :: ResumeCampaign -> ByteString
toPath ResumeCampaign' {Text
id :: Text
$sel:id:ResumeCampaign' :: ResumeCampaign -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/campaigns/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
id, ByteString
"/resume"]
instance Data.ToQuery ResumeCampaign where
toQuery :: ResumeCampaign -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data ResumeCampaignResponse = ResumeCampaignResponse'
{
}
deriving (ResumeCampaignResponse -> ResumeCampaignResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResumeCampaignResponse -> ResumeCampaignResponse -> Bool
$c/= :: ResumeCampaignResponse -> ResumeCampaignResponse -> Bool
== :: ResumeCampaignResponse -> ResumeCampaignResponse -> Bool
$c== :: ResumeCampaignResponse -> ResumeCampaignResponse -> Bool
Prelude.Eq, ReadPrec [ResumeCampaignResponse]
ReadPrec ResumeCampaignResponse
Int -> ReadS ResumeCampaignResponse
ReadS [ResumeCampaignResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResumeCampaignResponse]
$creadListPrec :: ReadPrec [ResumeCampaignResponse]
readPrec :: ReadPrec ResumeCampaignResponse
$creadPrec :: ReadPrec ResumeCampaignResponse
readList :: ReadS [ResumeCampaignResponse]
$creadList :: ReadS [ResumeCampaignResponse]
readsPrec :: Int -> ReadS ResumeCampaignResponse
$creadsPrec :: Int -> ReadS ResumeCampaignResponse
Prelude.Read, Int -> ResumeCampaignResponse -> ShowS
[ResumeCampaignResponse] -> ShowS
ResumeCampaignResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResumeCampaignResponse] -> ShowS
$cshowList :: [ResumeCampaignResponse] -> ShowS
show :: ResumeCampaignResponse -> String
$cshow :: ResumeCampaignResponse -> String
showsPrec :: Int -> ResumeCampaignResponse -> ShowS
$cshowsPrec :: Int -> ResumeCampaignResponse -> ShowS
Prelude.Show, forall x. Rep ResumeCampaignResponse x -> ResumeCampaignResponse
forall x. ResumeCampaignResponse -> Rep ResumeCampaignResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ResumeCampaignResponse x -> ResumeCampaignResponse
$cfrom :: forall x. ResumeCampaignResponse -> Rep ResumeCampaignResponse x
Prelude.Generic)
newResumeCampaignResponse ::
ResumeCampaignResponse
newResumeCampaignResponse :: ResumeCampaignResponse
newResumeCampaignResponse = ResumeCampaignResponse
ResumeCampaignResponse'
instance Prelude.NFData ResumeCampaignResponse where
rnf :: ResumeCampaignResponse -> ()
rnf ResumeCampaignResponse
_ = ()