{-# 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.DeleteAssistantAssociation
(
DeleteAssistantAssociation (..),
newDeleteAssistantAssociation,
deleteAssistantAssociation_assistantAssociationId,
deleteAssistantAssociation_assistantId,
DeleteAssistantAssociationResponse (..),
newDeleteAssistantAssociationResponse,
deleteAssistantAssociationResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.Wisdom.Types
data DeleteAssistantAssociation = DeleteAssistantAssociation'
{
DeleteAssistantAssociation -> Text
assistantAssociationId :: Prelude.Text,
DeleteAssistantAssociation -> Text
assistantId :: Prelude.Text
}
deriving (DeleteAssistantAssociation -> DeleteAssistantAssociation -> Bool
(DeleteAssistantAssociation -> DeleteAssistantAssociation -> Bool)
-> (DeleteAssistantAssociation
-> DeleteAssistantAssociation -> Bool)
-> Eq DeleteAssistantAssociation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteAssistantAssociation -> DeleteAssistantAssociation -> Bool
$c/= :: DeleteAssistantAssociation -> DeleteAssistantAssociation -> Bool
== :: DeleteAssistantAssociation -> DeleteAssistantAssociation -> Bool
$c== :: DeleteAssistantAssociation -> DeleteAssistantAssociation -> Bool
Prelude.Eq, ReadPrec [DeleteAssistantAssociation]
ReadPrec DeleteAssistantAssociation
Int -> ReadS DeleteAssistantAssociation
ReadS [DeleteAssistantAssociation]
(Int -> ReadS DeleteAssistantAssociation)
-> ReadS [DeleteAssistantAssociation]
-> ReadPrec DeleteAssistantAssociation
-> ReadPrec [DeleteAssistantAssociation]
-> Read DeleteAssistantAssociation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteAssistantAssociation]
$creadListPrec :: ReadPrec [DeleteAssistantAssociation]
readPrec :: ReadPrec DeleteAssistantAssociation
$creadPrec :: ReadPrec DeleteAssistantAssociation
readList :: ReadS [DeleteAssistantAssociation]
$creadList :: ReadS [DeleteAssistantAssociation]
readsPrec :: Int -> ReadS DeleteAssistantAssociation
$creadsPrec :: Int -> ReadS DeleteAssistantAssociation
Prelude.Read, Int -> DeleteAssistantAssociation -> ShowS
[DeleteAssistantAssociation] -> ShowS
DeleteAssistantAssociation -> String
(Int -> DeleteAssistantAssociation -> ShowS)
-> (DeleteAssistantAssociation -> String)
-> ([DeleteAssistantAssociation] -> ShowS)
-> Show DeleteAssistantAssociation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteAssistantAssociation] -> ShowS
$cshowList :: [DeleteAssistantAssociation] -> ShowS
show :: DeleteAssistantAssociation -> String
$cshow :: DeleteAssistantAssociation -> String
showsPrec :: Int -> DeleteAssistantAssociation -> ShowS
$cshowsPrec :: Int -> DeleteAssistantAssociation -> ShowS
Prelude.Show, (forall x.
DeleteAssistantAssociation -> Rep DeleteAssistantAssociation x)
-> (forall x.
Rep DeleteAssistantAssociation x -> DeleteAssistantAssociation)
-> Generic DeleteAssistantAssociation
forall x.
Rep DeleteAssistantAssociation x -> DeleteAssistantAssociation
forall x.
DeleteAssistantAssociation -> Rep DeleteAssistantAssociation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteAssistantAssociation x -> DeleteAssistantAssociation
$cfrom :: forall x.
DeleteAssistantAssociation -> Rep DeleteAssistantAssociation x
Prelude.Generic)
newDeleteAssistantAssociation ::
Prelude.Text ->
Prelude.Text ->
DeleteAssistantAssociation
newDeleteAssistantAssociation :: Text -> Text -> DeleteAssistantAssociation
newDeleteAssistantAssociation
Text
pAssistantAssociationId_
Text
pAssistantId_ =
DeleteAssistantAssociation' :: Text -> Text -> DeleteAssistantAssociation
DeleteAssistantAssociation'
{ $sel:assistantAssociationId:DeleteAssistantAssociation' :: Text
assistantAssociationId =
Text
pAssistantAssociationId_,
$sel:assistantId:DeleteAssistantAssociation' :: Text
assistantId = Text
pAssistantId_
}
deleteAssistantAssociation_assistantAssociationId :: Lens.Lens' DeleteAssistantAssociation Prelude.Text
deleteAssistantAssociation_assistantAssociationId :: (Text -> f Text)
-> DeleteAssistantAssociation -> f DeleteAssistantAssociation
deleteAssistantAssociation_assistantAssociationId = (DeleteAssistantAssociation -> Text)
-> (DeleteAssistantAssociation
-> Text -> DeleteAssistantAssociation)
-> Lens
DeleteAssistantAssociation DeleteAssistantAssociation Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteAssistantAssociation' {Text
assistantAssociationId :: Text
$sel:assistantAssociationId:DeleteAssistantAssociation' :: DeleteAssistantAssociation -> Text
assistantAssociationId} -> Text
assistantAssociationId) (\s :: DeleteAssistantAssociation
s@DeleteAssistantAssociation' {} Text
a -> DeleteAssistantAssociation
s {$sel:assistantAssociationId:DeleteAssistantAssociation' :: Text
assistantAssociationId = Text
a} :: DeleteAssistantAssociation)
deleteAssistantAssociation_assistantId :: Lens.Lens' DeleteAssistantAssociation Prelude.Text
deleteAssistantAssociation_assistantId :: (Text -> f Text)
-> DeleteAssistantAssociation -> f DeleteAssistantAssociation
deleteAssistantAssociation_assistantId = (DeleteAssistantAssociation -> Text)
-> (DeleteAssistantAssociation
-> Text -> DeleteAssistantAssociation)
-> Lens
DeleteAssistantAssociation DeleteAssistantAssociation Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteAssistantAssociation' {Text
assistantId :: Text
$sel:assistantId:DeleteAssistantAssociation' :: DeleteAssistantAssociation -> Text
assistantId} -> Text
assistantId) (\s :: DeleteAssistantAssociation
s@DeleteAssistantAssociation' {} Text
a -> DeleteAssistantAssociation
s {$sel:assistantId:DeleteAssistantAssociation' :: Text
assistantId = Text
a} :: DeleteAssistantAssociation)
instance Core.AWSRequest DeleteAssistantAssociation where
type
AWSResponse DeleteAssistantAssociation =
DeleteAssistantAssociationResponse
request :: DeleteAssistantAssociation -> Request DeleteAssistantAssociation
request = Service
-> DeleteAssistantAssociation -> Request DeleteAssistantAssociation
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteAssistantAssociation
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteAssistantAssociation)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DeleteAssistantAssociation))
-> Logger
-> Service
-> Proxy DeleteAssistantAssociation
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteAssistantAssociation)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DeleteAssistantAssociationResponse
DeleteAssistantAssociationResponse'
(Int -> DeleteAssistantAssociationResponse)
-> Either String Int
-> Either String DeleteAssistantAssociationResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable DeleteAssistantAssociation
instance Prelude.NFData DeleteAssistantAssociation
instance Core.ToHeaders DeleteAssistantAssociation where
toHeaders :: DeleteAssistantAssociation -> ResponseHeaders
toHeaders =
ResponseHeaders -> DeleteAssistantAssociation -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToPath DeleteAssistantAssociation where
toPath :: DeleteAssistantAssociation -> ByteString
toPath DeleteAssistantAssociation' {Text
assistantId :: Text
assistantAssociationId :: Text
$sel:assistantId:DeleteAssistantAssociation' :: DeleteAssistantAssociation -> Text
$sel:assistantAssociationId:DeleteAssistantAssociation' :: DeleteAssistantAssociation -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/assistants/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
assistantId,
ByteString
"/associations/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
assistantAssociationId
]
instance Core.ToQuery DeleteAssistantAssociation where
toQuery :: DeleteAssistantAssociation -> QueryString
toQuery = QueryString -> DeleteAssistantAssociation -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteAssistantAssociationResponse = DeleteAssistantAssociationResponse'
{
DeleteAssistantAssociationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteAssistantAssociationResponse
-> DeleteAssistantAssociationResponse -> Bool
(DeleteAssistantAssociationResponse
-> DeleteAssistantAssociationResponse -> Bool)
-> (DeleteAssistantAssociationResponse
-> DeleteAssistantAssociationResponse -> Bool)
-> Eq DeleteAssistantAssociationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteAssistantAssociationResponse
-> DeleteAssistantAssociationResponse -> Bool
$c/= :: DeleteAssistantAssociationResponse
-> DeleteAssistantAssociationResponse -> Bool
== :: DeleteAssistantAssociationResponse
-> DeleteAssistantAssociationResponse -> Bool
$c== :: DeleteAssistantAssociationResponse
-> DeleteAssistantAssociationResponse -> Bool
Prelude.Eq, ReadPrec [DeleteAssistantAssociationResponse]
ReadPrec DeleteAssistantAssociationResponse
Int -> ReadS DeleteAssistantAssociationResponse
ReadS [DeleteAssistantAssociationResponse]
(Int -> ReadS DeleteAssistantAssociationResponse)
-> ReadS [DeleteAssistantAssociationResponse]
-> ReadPrec DeleteAssistantAssociationResponse
-> ReadPrec [DeleteAssistantAssociationResponse]
-> Read DeleteAssistantAssociationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteAssistantAssociationResponse]
$creadListPrec :: ReadPrec [DeleteAssistantAssociationResponse]
readPrec :: ReadPrec DeleteAssistantAssociationResponse
$creadPrec :: ReadPrec DeleteAssistantAssociationResponse
readList :: ReadS [DeleteAssistantAssociationResponse]
$creadList :: ReadS [DeleteAssistantAssociationResponse]
readsPrec :: Int -> ReadS DeleteAssistantAssociationResponse
$creadsPrec :: Int -> ReadS DeleteAssistantAssociationResponse
Prelude.Read, Int -> DeleteAssistantAssociationResponse -> ShowS
[DeleteAssistantAssociationResponse] -> ShowS
DeleteAssistantAssociationResponse -> String
(Int -> DeleteAssistantAssociationResponse -> ShowS)
-> (DeleteAssistantAssociationResponse -> String)
-> ([DeleteAssistantAssociationResponse] -> ShowS)
-> Show DeleteAssistantAssociationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteAssistantAssociationResponse] -> ShowS
$cshowList :: [DeleteAssistantAssociationResponse] -> ShowS
show :: DeleteAssistantAssociationResponse -> String
$cshow :: DeleteAssistantAssociationResponse -> String
showsPrec :: Int -> DeleteAssistantAssociationResponse -> ShowS
$cshowsPrec :: Int -> DeleteAssistantAssociationResponse -> ShowS
Prelude.Show, (forall x.
DeleteAssistantAssociationResponse
-> Rep DeleteAssistantAssociationResponse x)
-> (forall x.
Rep DeleteAssistantAssociationResponse x
-> DeleteAssistantAssociationResponse)
-> Generic DeleteAssistantAssociationResponse
forall x.
Rep DeleteAssistantAssociationResponse x
-> DeleteAssistantAssociationResponse
forall x.
DeleteAssistantAssociationResponse
-> Rep DeleteAssistantAssociationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteAssistantAssociationResponse x
-> DeleteAssistantAssociationResponse
$cfrom :: forall x.
DeleteAssistantAssociationResponse
-> Rep DeleteAssistantAssociationResponse x
Prelude.Generic)
newDeleteAssistantAssociationResponse ::
Prelude.Int ->
DeleteAssistantAssociationResponse
newDeleteAssistantAssociationResponse :: Int -> DeleteAssistantAssociationResponse
newDeleteAssistantAssociationResponse Int
pHttpStatus_ =
DeleteAssistantAssociationResponse' :: Int -> DeleteAssistantAssociationResponse
DeleteAssistantAssociationResponse'
{ $sel:httpStatus:DeleteAssistantAssociationResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteAssistantAssociationResponse_httpStatus :: Lens.Lens' DeleteAssistantAssociationResponse Prelude.Int
deleteAssistantAssociationResponse_httpStatus :: (Int -> f Int)
-> DeleteAssistantAssociationResponse
-> f DeleteAssistantAssociationResponse
deleteAssistantAssociationResponse_httpStatus = (DeleteAssistantAssociationResponse -> Int)
-> (DeleteAssistantAssociationResponse
-> Int -> DeleteAssistantAssociationResponse)
-> Lens
DeleteAssistantAssociationResponse
DeleteAssistantAssociationResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteAssistantAssociationResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteAssistantAssociationResponse' :: DeleteAssistantAssociationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteAssistantAssociationResponse
s@DeleteAssistantAssociationResponse' {} Int
a -> DeleteAssistantAssociationResponse
s {$sel:httpStatus:DeleteAssistantAssociationResponse' :: Int
httpStatus = Int
a} :: DeleteAssistantAssociationResponse)
instance
Prelude.NFData
DeleteAssistantAssociationResponse