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