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