{-# 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.DeleteBotAlias
(
DeleteBotAlias (..),
newDeleteBotAlias,
deleteBotAlias_name,
deleteBotAlias_botName,
DeleteBotAliasResponse (..),
newDeleteBotAliasResponse,
)
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 DeleteBotAlias = DeleteBotAlias'
{
DeleteBotAlias -> Text
name :: Prelude.Text,
DeleteBotAlias -> Text
botName :: Prelude.Text
}
deriving (DeleteBotAlias -> DeleteBotAlias -> Bool
(DeleteBotAlias -> DeleteBotAlias -> Bool)
-> (DeleteBotAlias -> DeleteBotAlias -> Bool) -> Eq DeleteBotAlias
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteBotAlias -> DeleteBotAlias -> Bool
$c/= :: DeleteBotAlias -> DeleteBotAlias -> Bool
== :: DeleteBotAlias -> DeleteBotAlias -> Bool
$c== :: DeleteBotAlias -> DeleteBotAlias -> Bool
Prelude.Eq, ReadPrec [DeleteBotAlias]
ReadPrec DeleteBotAlias
Int -> ReadS DeleteBotAlias
ReadS [DeleteBotAlias]
(Int -> ReadS DeleteBotAlias)
-> ReadS [DeleteBotAlias]
-> ReadPrec DeleteBotAlias
-> ReadPrec [DeleteBotAlias]
-> Read DeleteBotAlias
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteBotAlias]
$creadListPrec :: ReadPrec [DeleteBotAlias]
readPrec :: ReadPrec DeleteBotAlias
$creadPrec :: ReadPrec DeleteBotAlias
readList :: ReadS [DeleteBotAlias]
$creadList :: ReadS [DeleteBotAlias]
readsPrec :: Int -> ReadS DeleteBotAlias
$creadsPrec :: Int -> ReadS DeleteBotAlias
Prelude.Read, Int -> DeleteBotAlias -> ShowS
[DeleteBotAlias] -> ShowS
DeleteBotAlias -> String
(Int -> DeleteBotAlias -> ShowS)
-> (DeleteBotAlias -> String)
-> ([DeleteBotAlias] -> ShowS)
-> Show DeleteBotAlias
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteBotAlias] -> ShowS
$cshowList :: [DeleteBotAlias] -> ShowS
show :: DeleteBotAlias -> String
$cshow :: DeleteBotAlias -> String
showsPrec :: Int -> DeleteBotAlias -> ShowS
$cshowsPrec :: Int -> DeleteBotAlias -> ShowS
Prelude.Show, (forall x. DeleteBotAlias -> Rep DeleteBotAlias x)
-> (forall x. Rep DeleteBotAlias x -> DeleteBotAlias)
-> Generic DeleteBotAlias
forall x. Rep DeleteBotAlias x -> DeleteBotAlias
forall x. DeleteBotAlias -> Rep DeleteBotAlias x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteBotAlias x -> DeleteBotAlias
$cfrom :: forall x. DeleteBotAlias -> Rep DeleteBotAlias x
Prelude.Generic)
newDeleteBotAlias ::
Prelude.Text ->
Prelude.Text ->
DeleteBotAlias
newDeleteBotAlias :: Text -> Text -> DeleteBotAlias
newDeleteBotAlias Text
pName_ Text
pBotName_ =
DeleteBotAlias' :: Text -> Text -> DeleteBotAlias
DeleteBotAlias' {$sel:name:DeleteBotAlias' :: Text
name = Text
pName_, $sel:botName:DeleteBotAlias' :: Text
botName = Text
pBotName_}
deleteBotAlias_name :: Lens.Lens' DeleteBotAlias Prelude.Text
deleteBotAlias_name :: (Text -> f Text) -> DeleteBotAlias -> f DeleteBotAlias
deleteBotAlias_name = (DeleteBotAlias -> Text)
-> (DeleteBotAlias -> Text -> DeleteBotAlias)
-> Lens DeleteBotAlias DeleteBotAlias Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteBotAlias' {Text
name :: Text
$sel:name:DeleteBotAlias' :: DeleteBotAlias -> Text
name} -> Text
name) (\s :: DeleteBotAlias
s@DeleteBotAlias' {} Text
a -> DeleteBotAlias
s {$sel:name:DeleteBotAlias' :: Text
name = Text
a} :: DeleteBotAlias)
deleteBotAlias_botName :: Lens.Lens' DeleteBotAlias Prelude.Text
deleteBotAlias_botName :: (Text -> f Text) -> DeleteBotAlias -> f DeleteBotAlias
deleteBotAlias_botName = (DeleteBotAlias -> Text)
-> (DeleteBotAlias -> Text -> DeleteBotAlias)
-> Lens DeleteBotAlias DeleteBotAlias Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteBotAlias' {Text
botName :: Text
$sel:botName:DeleteBotAlias' :: DeleteBotAlias -> Text
botName} -> Text
botName) (\s :: DeleteBotAlias
s@DeleteBotAlias' {} Text
a -> DeleteBotAlias
s {$sel:botName:DeleteBotAlias' :: Text
botName = Text
a} :: DeleteBotAlias)
instance Core.AWSRequest DeleteBotAlias where
type
AWSResponse DeleteBotAlias =
DeleteBotAliasResponse
request :: DeleteBotAlias -> Request DeleteBotAlias
request = Service -> DeleteBotAlias -> Request DeleteBotAlias
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteBotAlias
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteBotAlias)))
response =
AWSResponse DeleteBotAlias
-> Logger
-> Service
-> Proxy DeleteBotAlias
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteBotAlias)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse DeleteBotAlias
DeleteBotAliasResponse
DeleteBotAliasResponse'
instance Prelude.Hashable DeleteBotAlias
instance Prelude.NFData DeleteBotAlias
instance Core.ToHeaders DeleteBotAlias where
toHeaders :: DeleteBotAlias -> [Header]
toHeaders =
[Header] -> DeleteBotAlias -> [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 DeleteBotAlias where
toPath :: DeleteBotAlias -> ByteString
toPath DeleteBotAlias' {Text
botName :: Text
name :: Text
$sel:botName:DeleteBotAlias' :: DeleteBotAlias -> Text
$sel:name:DeleteBotAlias' :: DeleteBotAlias -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/bots/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
botName,
ByteString
"/aliases/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
name
]
instance Core.ToQuery DeleteBotAlias where
toQuery :: DeleteBotAlias -> QueryString
toQuery = QueryString -> DeleteBotAlias -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteBotAliasResponse = DeleteBotAliasResponse'
{
}
deriving (DeleteBotAliasResponse -> DeleteBotAliasResponse -> Bool
(DeleteBotAliasResponse -> DeleteBotAliasResponse -> Bool)
-> (DeleteBotAliasResponse -> DeleteBotAliasResponse -> Bool)
-> Eq DeleteBotAliasResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteBotAliasResponse -> DeleteBotAliasResponse -> Bool
$c/= :: DeleteBotAliasResponse -> DeleteBotAliasResponse -> Bool
== :: DeleteBotAliasResponse -> DeleteBotAliasResponse -> Bool
$c== :: DeleteBotAliasResponse -> DeleteBotAliasResponse -> Bool
Prelude.Eq, ReadPrec [DeleteBotAliasResponse]
ReadPrec DeleteBotAliasResponse
Int -> ReadS DeleteBotAliasResponse
ReadS [DeleteBotAliasResponse]
(Int -> ReadS DeleteBotAliasResponse)
-> ReadS [DeleteBotAliasResponse]
-> ReadPrec DeleteBotAliasResponse
-> ReadPrec [DeleteBotAliasResponse]
-> Read DeleteBotAliasResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteBotAliasResponse]
$creadListPrec :: ReadPrec [DeleteBotAliasResponse]
readPrec :: ReadPrec DeleteBotAliasResponse
$creadPrec :: ReadPrec DeleteBotAliasResponse
readList :: ReadS [DeleteBotAliasResponse]
$creadList :: ReadS [DeleteBotAliasResponse]
readsPrec :: Int -> ReadS DeleteBotAliasResponse
$creadsPrec :: Int -> ReadS DeleteBotAliasResponse
Prelude.Read, Int -> DeleteBotAliasResponse -> ShowS
[DeleteBotAliasResponse] -> ShowS
DeleteBotAliasResponse -> String
(Int -> DeleteBotAliasResponse -> ShowS)
-> (DeleteBotAliasResponse -> String)
-> ([DeleteBotAliasResponse] -> ShowS)
-> Show DeleteBotAliasResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteBotAliasResponse] -> ShowS
$cshowList :: [DeleteBotAliasResponse] -> ShowS
show :: DeleteBotAliasResponse -> String
$cshow :: DeleteBotAliasResponse -> String
showsPrec :: Int -> DeleteBotAliasResponse -> ShowS
$cshowsPrec :: Int -> DeleteBotAliasResponse -> ShowS
Prelude.Show, (forall x. DeleteBotAliasResponse -> Rep DeleteBotAliasResponse x)
-> (forall x.
Rep DeleteBotAliasResponse x -> DeleteBotAliasResponse)
-> Generic DeleteBotAliasResponse
forall x. Rep DeleteBotAliasResponse x -> DeleteBotAliasResponse
forall x. DeleteBotAliasResponse -> Rep DeleteBotAliasResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteBotAliasResponse x -> DeleteBotAliasResponse
$cfrom :: forall x. DeleteBotAliasResponse -> Rep DeleteBotAliasResponse x
Prelude.Generic)
newDeleteBotAliasResponse ::
DeleteBotAliasResponse
newDeleteBotAliasResponse :: DeleteBotAliasResponse
newDeleteBotAliasResponse = DeleteBotAliasResponse
DeleteBotAliasResponse'
instance Prelude.NFData DeleteBotAliasResponse