{-# 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.SWF.DeprecateDomain
(
DeprecateDomain (..),
newDeprecateDomain,
deprecateDomain_name,
DeprecateDomainResponse (..),
newDeprecateDomainResponse,
)
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.SWF.Types
data DeprecateDomain = DeprecateDomain'
{
DeprecateDomain -> Text
name :: Prelude.Text
}
deriving (DeprecateDomain -> DeprecateDomain -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeprecateDomain -> DeprecateDomain -> Bool
$c/= :: DeprecateDomain -> DeprecateDomain -> Bool
== :: DeprecateDomain -> DeprecateDomain -> Bool
$c== :: DeprecateDomain -> DeprecateDomain -> Bool
Prelude.Eq, ReadPrec [DeprecateDomain]
ReadPrec DeprecateDomain
Int -> ReadS DeprecateDomain
ReadS [DeprecateDomain]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeprecateDomain]
$creadListPrec :: ReadPrec [DeprecateDomain]
readPrec :: ReadPrec DeprecateDomain
$creadPrec :: ReadPrec DeprecateDomain
readList :: ReadS [DeprecateDomain]
$creadList :: ReadS [DeprecateDomain]
readsPrec :: Int -> ReadS DeprecateDomain
$creadsPrec :: Int -> ReadS DeprecateDomain
Prelude.Read, Int -> DeprecateDomain -> ShowS
[DeprecateDomain] -> ShowS
DeprecateDomain -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeprecateDomain] -> ShowS
$cshowList :: [DeprecateDomain] -> ShowS
show :: DeprecateDomain -> String
$cshow :: DeprecateDomain -> String
showsPrec :: Int -> DeprecateDomain -> ShowS
$cshowsPrec :: Int -> DeprecateDomain -> ShowS
Prelude.Show, forall x. Rep DeprecateDomain x -> DeprecateDomain
forall x. DeprecateDomain -> Rep DeprecateDomain x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeprecateDomain x -> DeprecateDomain
$cfrom :: forall x. DeprecateDomain -> Rep DeprecateDomain x
Prelude.Generic)
newDeprecateDomain ::
Prelude.Text ->
DeprecateDomain
newDeprecateDomain :: Text -> DeprecateDomain
newDeprecateDomain Text
pName_ =
DeprecateDomain' {$sel:name:DeprecateDomain' :: Text
name = Text
pName_}
deprecateDomain_name :: Lens.Lens' DeprecateDomain Prelude.Text
deprecateDomain_name :: Lens' DeprecateDomain Text
deprecateDomain_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeprecateDomain' {Text
name :: Text
$sel:name:DeprecateDomain' :: DeprecateDomain -> Text
name} -> Text
name) (\s :: DeprecateDomain
s@DeprecateDomain' {} Text
a -> DeprecateDomain
s {$sel:name:DeprecateDomain' :: Text
name = Text
a} :: DeprecateDomain)
instance Core.AWSRequest DeprecateDomain where
type
AWSResponse DeprecateDomain =
DeprecateDomainResponse
request :: (Service -> Service) -> DeprecateDomain -> Request DeprecateDomain
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 DeprecateDomain
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeprecateDomain)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull DeprecateDomainResponse
DeprecateDomainResponse'
instance Prelude.Hashable DeprecateDomain where
hashWithSalt :: Int -> DeprecateDomain -> Int
hashWithSalt Int
_salt DeprecateDomain' {Text
name :: Text
$sel:name:DeprecateDomain' :: DeprecateDomain -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
instance Prelude.NFData DeprecateDomain where
rnf :: DeprecateDomain -> ()
rnf DeprecateDomain' {Text
name :: Text
$sel:name:DeprecateDomain' :: DeprecateDomain -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
name
instance Data.ToHeaders DeprecateDomain where
toHeaders :: DeprecateDomain -> [Header]
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> [Header]
Data.=# ( ByteString
"SimpleWorkflowService.DeprecateDomain" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> [Header]
Data.=# ( ByteString
"application/x-amz-json-1.0" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON DeprecateDomain where
toJSON :: DeprecateDomain -> Value
toJSON DeprecateDomain' {Text
name :: Text
$sel:name:DeprecateDomain' :: DeprecateDomain -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name)]
)
instance Data.ToPath DeprecateDomain where
toPath :: DeprecateDomain -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DeprecateDomain where
toQuery :: DeprecateDomain -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeprecateDomainResponse = DeprecateDomainResponse'
{
}
deriving (DeprecateDomainResponse -> DeprecateDomainResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeprecateDomainResponse -> DeprecateDomainResponse -> Bool
$c/= :: DeprecateDomainResponse -> DeprecateDomainResponse -> Bool
== :: DeprecateDomainResponse -> DeprecateDomainResponse -> Bool
$c== :: DeprecateDomainResponse -> DeprecateDomainResponse -> Bool
Prelude.Eq, ReadPrec [DeprecateDomainResponse]
ReadPrec DeprecateDomainResponse
Int -> ReadS DeprecateDomainResponse
ReadS [DeprecateDomainResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeprecateDomainResponse]
$creadListPrec :: ReadPrec [DeprecateDomainResponse]
readPrec :: ReadPrec DeprecateDomainResponse
$creadPrec :: ReadPrec DeprecateDomainResponse
readList :: ReadS [DeprecateDomainResponse]
$creadList :: ReadS [DeprecateDomainResponse]
readsPrec :: Int -> ReadS DeprecateDomainResponse
$creadsPrec :: Int -> ReadS DeprecateDomainResponse
Prelude.Read, Int -> DeprecateDomainResponse -> ShowS
[DeprecateDomainResponse] -> ShowS
DeprecateDomainResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeprecateDomainResponse] -> ShowS
$cshowList :: [DeprecateDomainResponse] -> ShowS
show :: DeprecateDomainResponse -> String
$cshow :: DeprecateDomainResponse -> String
showsPrec :: Int -> DeprecateDomainResponse -> ShowS
$cshowsPrec :: Int -> DeprecateDomainResponse -> ShowS
Prelude.Show, forall x. Rep DeprecateDomainResponse x -> DeprecateDomainResponse
forall x. DeprecateDomainResponse -> Rep DeprecateDomainResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeprecateDomainResponse x -> DeprecateDomainResponse
$cfrom :: forall x. DeprecateDomainResponse -> Rep DeprecateDomainResponse x
Prelude.Generic)
newDeprecateDomainResponse ::
DeprecateDomainResponse
newDeprecateDomainResponse :: DeprecateDomainResponse
newDeprecateDomainResponse = DeprecateDomainResponse
DeprecateDomainResponse'
instance Prelude.NFData DeprecateDomainResponse where
rnf :: DeprecateDomainResponse -> ()
rnf DeprecateDomainResponse
_ = ()