{-# 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.ApiGatewayV2.DeleteDomainName
(
DeleteDomainName (..),
newDeleteDomainName,
deleteDomainName_domainName,
DeleteDomainNameResponse (..),
newDeleteDomainNameResponse,
)
where
import Amazonka.ApiGatewayV2.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 DeleteDomainName = DeleteDomainName'
{
DeleteDomainName -> Text
domainName :: Prelude.Text
}
deriving (DeleteDomainName -> DeleteDomainName -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteDomainName -> DeleteDomainName -> Bool
$c/= :: DeleteDomainName -> DeleteDomainName -> Bool
== :: DeleteDomainName -> DeleteDomainName -> Bool
$c== :: DeleteDomainName -> DeleteDomainName -> Bool
Prelude.Eq, ReadPrec [DeleteDomainName]
ReadPrec DeleteDomainName
Int -> ReadS DeleteDomainName
ReadS [DeleteDomainName]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteDomainName]
$creadListPrec :: ReadPrec [DeleteDomainName]
readPrec :: ReadPrec DeleteDomainName
$creadPrec :: ReadPrec DeleteDomainName
readList :: ReadS [DeleteDomainName]
$creadList :: ReadS [DeleteDomainName]
readsPrec :: Int -> ReadS DeleteDomainName
$creadsPrec :: Int -> ReadS DeleteDomainName
Prelude.Read, Int -> DeleteDomainName -> ShowS
[DeleteDomainName] -> ShowS
DeleteDomainName -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteDomainName] -> ShowS
$cshowList :: [DeleteDomainName] -> ShowS
show :: DeleteDomainName -> String
$cshow :: DeleteDomainName -> String
showsPrec :: Int -> DeleteDomainName -> ShowS
$cshowsPrec :: Int -> DeleteDomainName -> ShowS
Prelude.Show, forall x. Rep DeleteDomainName x -> DeleteDomainName
forall x. DeleteDomainName -> Rep DeleteDomainName x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteDomainName x -> DeleteDomainName
$cfrom :: forall x. DeleteDomainName -> Rep DeleteDomainName x
Prelude.Generic)
newDeleteDomainName ::
Prelude.Text ->
DeleteDomainName
newDeleteDomainName :: Text -> DeleteDomainName
newDeleteDomainName Text
pDomainName_ =
DeleteDomainName' {$sel:domainName:DeleteDomainName' :: Text
domainName = Text
pDomainName_}
deleteDomainName_domainName :: Lens.Lens' DeleteDomainName Prelude.Text
deleteDomainName_domainName :: Lens' DeleteDomainName Text
deleteDomainName_domainName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteDomainName' {Text
domainName :: Text
$sel:domainName:DeleteDomainName' :: DeleteDomainName -> Text
domainName} -> Text
domainName) (\s :: DeleteDomainName
s@DeleteDomainName' {} Text
a -> DeleteDomainName
s {$sel:domainName:DeleteDomainName' :: Text
domainName = Text
a} :: DeleteDomainName)
instance Core.AWSRequest DeleteDomainName where
type
AWSResponse DeleteDomainName =
DeleteDomainNameResponse
request :: (Service -> Service)
-> DeleteDomainName -> Request DeleteDomainName
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.delete (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeleteDomainName
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteDomainName)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull DeleteDomainNameResponse
DeleteDomainNameResponse'
instance Prelude.Hashable DeleteDomainName where
hashWithSalt :: Int -> DeleteDomainName -> Int
hashWithSalt Int
_salt DeleteDomainName' {Text
domainName :: Text
$sel:domainName:DeleteDomainName' :: DeleteDomainName -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
domainName
instance Prelude.NFData DeleteDomainName where
rnf :: DeleteDomainName -> ()
rnf DeleteDomainName' {Text
domainName :: Text
$sel:domainName:DeleteDomainName' :: DeleteDomainName -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
domainName
instance Data.ToHeaders DeleteDomainName where
toHeaders :: DeleteDomainName -> [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.ToPath DeleteDomainName where
toPath :: DeleteDomainName -> ByteString
toPath DeleteDomainName' {Text
domainName :: Text
$sel:domainName:DeleteDomainName' :: DeleteDomainName -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/v2/domainnames/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
domainName]
instance Data.ToQuery DeleteDomainName where
toQuery :: DeleteDomainName -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteDomainNameResponse = DeleteDomainNameResponse'
{
}
deriving (DeleteDomainNameResponse -> DeleteDomainNameResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteDomainNameResponse -> DeleteDomainNameResponse -> Bool
$c/= :: DeleteDomainNameResponse -> DeleteDomainNameResponse -> Bool
== :: DeleteDomainNameResponse -> DeleteDomainNameResponse -> Bool
$c== :: DeleteDomainNameResponse -> DeleteDomainNameResponse -> Bool
Prelude.Eq, ReadPrec [DeleteDomainNameResponse]
ReadPrec DeleteDomainNameResponse
Int -> ReadS DeleteDomainNameResponse
ReadS [DeleteDomainNameResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteDomainNameResponse]
$creadListPrec :: ReadPrec [DeleteDomainNameResponse]
readPrec :: ReadPrec DeleteDomainNameResponse
$creadPrec :: ReadPrec DeleteDomainNameResponse
readList :: ReadS [DeleteDomainNameResponse]
$creadList :: ReadS [DeleteDomainNameResponse]
readsPrec :: Int -> ReadS DeleteDomainNameResponse
$creadsPrec :: Int -> ReadS DeleteDomainNameResponse
Prelude.Read, Int -> DeleteDomainNameResponse -> ShowS
[DeleteDomainNameResponse] -> ShowS
DeleteDomainNameResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteDomainNameResponse] -> ShowS
$cshowList :: [DeleteDomainNameResponse] -> ShowS
show :: DeleteDomainNameResponse -> String
$cshow :: DeleteDomainNameResponse -> String
showsPrec :: Int -> DeleteDomainNameResponse -> ShowS
$cshowsPrec :: Int -> DeleteDomainNameResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteDomainNameResponse x -> DeleteDomainNameResponse
forall x.
DeleteDomainNameResponse -> Rep DeleteDomainNameResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteDomainNameResponse x -> DeleteDomainNameResponse
$cfrom :: forall x.
DeleteDomainNameResponse -> Rep DeleteDomainNameResponse x
Prelude.Generic)
newDeleteDomainNameResponse ::
DeleteDomainNameResponse
newDeleteDomainNameResponse :: DeleteDomainNameResponse
newDeleteDomainNameResponse =
DeleteDomainNameResponse
DeleteDomainNameResponse'
instance Prelude.NFData DeleteDomainNameResponse where
rnf :: DeleteDomainNameResponse -> ()
rnf DeleteDomainNameResponse
_ = ()