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