{-# 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.Wisdom.DeleteAssistant
(
DeleteAssistant (..),
newDeleteAssistant,
deleteAssistant_assistantId,
DeleteAssistantResponse (..),
newDeleteAssistantResponse,
deleteAssistantResponse_httpStatus,
)
where
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
import Amazonka.Wisdom.Types
data DeleteAssistant = DeleteAssistant'
{
DeleteAssistant -> Text
assistantId :: Prelude.Text
}
deriving (DeleteAssistant -> DeleteAssistant -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteAssistant -> DeleteAssistant -> Bool
$c/= :: DeleteAssistant -> DeleteAssistant -> Bool
== :: DeleteAssistant -> DeleteAssistant -> Bool
$c== :: DeleteAssistant -> DeleteAssistant -> Bool
Prelude.Eq, ReadPrec [DeleteAssistant]
ReadPrec DeleteAssistant
Int -> ReadS DeleteAssistant
ReadS [DeleteAssistant]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteAssistant]
$creadListPrec :: ReadPrec [DeleteAssistant]
readPrec :: ReadPrec DeleteAssistant
$creadPrec :: ReadPrec DeleteAssistant
readList :: ReadS [DeleteAssistant]
$creadList :: ReadS [DeleteAssistant]
readsPrec :: Int -> ReadS DeleteAssistant
$creadsPrec :: Int -> ReadS DeleteAssistant
Prelude.Read, Int -> DeleteAssistant -> ShowS
[DeleteAssistant] -> ShowS
DeleteAssistant -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteAssistant] -> ShowS
$cshowList :: [DeleteAssistant] -> ShowS
show :: DeleteAssistant -> String
$cshow :: DeleteAssistant -> String
showsPrec :: Int -> DeleteAssistant -> ShowS
$cshowsPrec :: Int -> DeleteAssistant -> ShowS
Prelude.Show, forall x. Rep DeleteAssistant x -> DeleteAssistant
forall x. DeleteAssistant -> Rep DeleteAssistant x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteAssistant x -> DeleteAssistant
$cfrom :: forall x. DeleteAssistant -> Rep DeleteAssistant x
Prelude.Generic)
newDeleteAssistant ::
Prelude.Text ->
DeleteAssistant
newDeleteAssistant :: Text -> DeleteAssistant
newDeleteAssistant Text
pAssistantId_ =
DeleteAssistant' {$sel:assistantId:DeleteAssistant' :: Text
assistantId = Text
pAssistantId_}
deleteAssistant_assistantId :: Lens.Lens' DeleteAssistant Prelude.Text
deleteAssistant_assistantId :: Lens' DeleteAssistant Text
deleteAssistant_assistantId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteAssistant' {Text
assistantId :: Text
$sel:assistantId:DeleteAssistant' :: DeleteAssistant -> Text
assistantId} -> Text
assistantId) (\s :: DeleteAssistant
s@DeleteAssistant' {} Text
a -> DeleteAssistant
s {$sel:assistantId:DeleteAssistant' :: Text
assistantId = Text
a} :: DeleteAssistant)
instance Core.AWSRequest DeleteAssistant where
type
AWSResponse DeleteAssistant =
DeleteAssistantResponse
request :: (Service -> Service) -> DeleteAssistant -> Request DeleteAssistant
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 DeleteAssistant
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteAssistant)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DeleteAssistantResponse
DeleteAssistantResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable DeleteAssistant where
hashWithSalt :: Int -> DeleteAssistant -> Int
hashWithSalt Int
_salt DeleteAssistant' {Text
assistantId :: Text
$sel:assistantId:DeleteAssistant' :: DeleteAssistant -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
assistantId
instance Prelude.NFData DeleteAssistant where
rnf :: DeleteAssistant -> ()
rnf DeleteAssistant' {Text
assistantId :: Text
$sel:assistantId:DeleteAssistant' :: DeleteAssistant -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
assistantId
instance Data.ToHeaders DeleteAssistant where
toHeaders :: DeleteAssistant -> ResponseHeaders
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 -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToPath DeleteAssistant where
toPath :: DeleteAssistant -> ByteString
toPath DeleteAssistant' {Text
assistantId :: Text
$sel:assistantId:DeleteAssistant' :: DeleteAssistant -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/assistants/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
assistantId]
instance Data.ToQuery DeleteAssistant where
toQuery :: DeleteAssistant -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteAssistantResponse = DeleteAssistantResponse'
{
DeleteAssistantResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteAssistantResponse -> DeleteAssistantResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteAssistantResponse -> DeleteAssistantResponse -> Bool
$c/= :: DeleteAssistantResponse -> DeleteAssistantResponse -> Bool
== :: DeleteAssistantResponse -> DeleteAssistantResponse -> Bool
$c== :: DeleteAssistantResponse -> DeleteAssistantResponse -> Bool
Prelude.Eq, ReadPrec [DeleteAssistantResponse]
ReadPrec DeleteAssistantResponse
Int -> ReadS DeleteAssistantResponse
ReadS [DeleteAssistantResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteAssistantResponse]
$creadListPrec :: ReadPrec [DeleteAssistantResponse]
readPrec :: ReadPrec DeleteAssistantResponse
$creadPrec :: ReadPrec DeleteAssistantResponse
readList :: ReadS [DeleteAssistantResponse]
$creadList :: ReadS [DeleteAssistantResponse]
readsPrec :: Int -> ReadS DeleteAssistantResponse
$creadsPrec :: Int -> ReadS DeleteAssistantResponse
Prelude.Read, Int -> DeleteAssistantResponse -> ShowS
[DeleteAssistantResponse] -> ShowS
DeleteAssistantResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteAssistantResponse] -> ShowS
$cshowList :: [DeleteAssistantResponse] -> ShowS
show :: DeleteAssistantResponse -> String
$cshow :: DeleteAssistantResponse -> String
showsPrec :: Int -> DeleteAssistantResponse -> ShowS
$cshowsPrec :: Int -> DeleteAssistantResponse -> ShowS
Prelude.Show, forall x. Rep DeleteAssistantResponse x -> DeleteAssistantResponse
forall x. DeleteAssistantResponse -> Rep DeleteAssistantResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteAssistantResponse x -> DeleteAssistantResponse
$cfrom :: forall x. DeleteAssistantResponse -> Rep DeleteAssistantResponse x
Prelude.Generic)
newDeleteAssistantResponse ::
Prelude.Int ->
DeleteAssistantResponse
newDeleteAssistantResponse :: Int -> DeleteAssistantResponse
newDeleteAssistantResponse Int
pHttpStatus_ =
DeleteAssistantResponse' {$sel:httpStatus:DeleteAssistantResponse' :: Int
httpStatus = Int
pHttpStatus_}
deleteAssistantResponse_httpStatus :: Lens.Lens' DeleteAssistantResponse Prelude.Int
deleteAssistantResponse_httpStatus :: Lens' DeleteAssistantResponse Int
deleteAssistantResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteAssistantResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteAssistantResponse' :: DeleteAssistantResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteAssistantResponse
s@DeleteAssistantResponse' {} Int
a -> DeleteAssistantResponse
s {$sel:httpStatus:DeleteAssistantResponse' :: Int
httpStatus = Int
a} :: DeleteAssistantResponse)
instance Prelude.NFData DeleteAssistantResponse where
rnf :: DeleteAssistantResponse -> ()
rnf DeleteAssistantResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteAssistantResponse' :: DeleteAssistantResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus