{-# 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.LexModels.DeleteBot
(
DeleteBot (..),
newDeleteBot,
deleteBot_name,
DeleteBotResponse (..),
newDeleteBotResponse,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.LexModels.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteBot = DeleteBot'
{
DeleteBot -> Text
name :: Prelude.Text
}
deriving (DeleteBot -> DeleteBot -> Bool
(DeleteBot -> DeleteBot -> Bool)
-> (DeleteBot -> DeleteBot -> Bool) -> Eq DeleteBot
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteBot -> DeleteBot -> Bool
$c/= :: DeleteBot -> DeleteBot -> Bool
== :: DeleteBot -> DeleteBot -> Bool
$c== :: DeleteBot -> DeleteBot -> Bool
Prelude.Eq, ReadPrec [DeleteBot]
ReadPrec DeleteBot
Int -> ReadS DeleteBot
ReadS [DeleteBot]
(Int -> ReadS DeleteBot)
-> ReadS [DeleteBot]
-> ReadPrec DeleteBot
-> ReadPrec [DeleteBot]
-> Read DeleteBot
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteBot]
$creadListPrec :: ReadPrec [DeleteBot]
readPrec :: ReadPrec DeleteBot
$creadPrec :: ReadPrec DeleteBot
readList :: ReadS [DeleteBot]
$creadList :: ReadS [DeleteBot]
readsPrec :: Int -> ReadS DeleteBot
$creadsPrec :: Int -> ReadS DeleteBot
Prelude.Read, Int -> DeleteBot -> ShowS
[DeleteBot] -> ShowS
DeleteBot -> String
(Int -> DeleteBot -> ShowS)
-> (DeleteBot -> String)
-> ([DeleteBot] -> ShowS)
-> Show DeleteBot
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteBot] -> ShowS
$cshowList :: [DeleteBot] -> ShowS
show :: DeleteBot -> String
$cshow :: DeleteBot -> String
showsPrec :: Int -> DeleteBot -> ShowS
$cshowsPrec :: Int -> DeleteBot -> ShowS
Prelude.Show, (forall x. DeleteBot -> Rep DeleteBot x)
-> (forall x. Rep DeleteBot x -> DeleteBot) -> Generic DeleteBot
forall x. Rep DeleteBot x -> DeleteBot
forall x. DeleteBot -> Rep DeleteBot x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteBot x -> DeleteBot
$cfrom :: forall x. DeleteBot -> Rep DeleteBot x
Prelude.Generic)
newDeleteBot ::
Prelude.Text ->
DeleteBot
newDeleteBot :: Text -> DeleteBot
newDeleteBot Text
pName_ = DeleteBot' :: Text -> DeleteBot
DeleteBot' {$sel:name:DeleteBot' :: Text
name = Text
pName_}
deleteBot_name :: Lens.Lens' DeleteBot Prelude.Text
deleteBot_name :: (Text -> f Text) -> DeleteBot -> f DeleteBot
deleteBot_name = (DeleteBot -> Text)
-> (DeleteBot -> Text -> DeleteBot)
-> Lens DeleteBot DeleteBot Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteBot' {Text
name :: Text
$sel:name:DeleteBot' :: DeleteBot -> Text
name} -> Text
name) (\s :: DeleteBot
s@DeleteBot' {} Text
a -> DeleteBot
s {$sel:name:DeleteBot' :: Text
name = Text
a} :: DeleteBot)
instance Core.AWSRequest DeleteBot where
type AWSResponse DeleteBot = DeleteBotResponse
request :: DeleteBot -> Request DeleteBot
request = Service -> DeleteBot -> Request DeleteBot
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteBot
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteBot)))
response = AWSResponse DeleteBot
-> Logger
-> Service
-> Proxy DeleteBot
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteBot)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse DeleteBot
DeleteBotResponse
DeleteBotResponse'
instance Prelude.Hashable DeleteBot
instance Prelude.NFData DeleteBot
instance Core.ToHeaders DeleteBot where
toHeaders :: DeleteBot -> [Header]
toHeaders =
[Header] -> DeleteBot -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToPath DeleteBot where
toPath :: DeleteBot -> ByteString
toPath DeleteBot' {Text
name :: Text
$sel:name:DeleteBot' :: DeleteBot -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"/bots/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
name]
instance Core.ToQuery DeleteBot where
toQuery :: DeleteBot -> QueryString
toQuery = QueryString -> DeleteBot -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteBotResponse = DeleteBotResponse'
{
}
deriving (DeleteBotResponse -> DeleteBotResponse -> Bool
(DeleteBotResponse -> DeleteBotResponse -> Bool)
-> (DeleteBotResponse -> DeleteBotResponse -> Bool)
-> Eq DeleteBotResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteBotResponse -> DeleteBotResponse -> Bool
$c/= :: DeleteBotResponse -> DeleteBotResponse -> Bool
== :: DeleteBotResponse -> DeleteBotResponse -> Bool
$c== :: DeleteBotResponse -> DeleteBotResponse -> Bool
Prelude.Eq, ReadPrec [DeleteBotResponse]
ReadPrec DeleteBotResponse
Int -> ReadS DeleteBotResponse
ReadS [DeleteBotResponse]
(Int -> ReadS DeleteBotResponse)
-> ReadS [DeleteBotResponse]
-> ReadPrec DeleteBotResponse
-> ReadPrec [DeleteBotResponse]
-> Read DeleteBotResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteBotResponse]
$creadListPrec :: ReadPrec [DeleteBotResponse]
readPrec :: ReadPrec DeleteBotResponse
$creadPrec :: ReadPrec DeleteBotResponse
readList :: ReadS [DeleteBotResponse]
$creadList :: ReadS [DeleteBotResponse]
readsPrec :: Int -> ReadS DeleteBotResponse
$creadsPrec :: Int -> ReadS DeleteBotResponse
Prelude.Read, Int -> DeleteBotResponse -> ShowS
[DeleteBotResponse] -> ShowS
DeleteBotResponse -> String
(Int -> DeleteBotResponse -> ShowS)
-> (DeleteBotResponse -> String)
-> ([DeleteBotResponse] -> ShowS)
-> Show DeleteBotResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteBotResponse] -> ShowS
$cshowList :: [DeleteBotResponse] -> ShowS
show :: DeleteBotResponse -> String
$cshow :: DeleteBotResponse -> String
showsPrec :: Int -> DeleteBotResponse -> ShowS
$cshowsPrec :: Int -> DeleteBotResponse -> ShowS
Prelude.Show, (forall x. DeleteBotResponse -> Rep DeleteBotResponse x)
-> (forall x. Rep DeleteBotResponse x -> DeleteBotResponse)
-> Generic DeleteBotResponse
forall x. Rep DeleteBotResponse x -> DeleteBotResponse
forall x. DeleteBotResponse -> Rep DeleteBotResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteBotResponse x -> DeleteBotResponse
$cfrom :: forall x. DeleteBotResponse -> Rep DeleteBotResponse x
Prelude.Generic)
newDeleteBotResponse ::
DeleteBotResponse
newDeleteBotResponse :: DeleteBotResponse
newDeleteBotResponse = DeleteBotResponse
DeleteBotResponse'
instance Prelude.NFData DeleteBotResponse