{-# 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.FMS.DeleteProtocolsList
(
DeleteProtocolsList (..),
newDeleteProtocolsList,
deleteProtocolsList_listId,
DeleteProtocolsListResponse (..),
newDeleteProtocolsListResponse,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.FMS.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteProtocolsList = DeleteProtocolsList'
{
DeleteProtocolsList -> Text
listId :: Prelude.Text
}
deriving (DeleteProtocolsList -> DeleteProtocolsList -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteProtocolsList -> DeleteProtocolsList -> Bool
$c/= :: DeleteProtocolsList -> DeleteProtocolsList -> Bool
== :: DeleteProtocolsList -> DeleteProtocolsList -> Bool
$c== :: DeleteProtocolsList -> DeleteProtocolsList -> Bool
Prelude.Eq, ReadPrec [DeleteProtocolsList]
ReadPrec DeleteProtocolsList
Int -> ReadS DeleteProtocolsList
ReadS [DeleteProtocolsList]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteProtocolsList]
$creadListPrec :: ReadPrec [DeleteProtocolsList]
readPrec :: ReadPrec DeleteProtocolsList
$creadPrec :: ReadPrec DeleteProtocolsList
readList :: ReadS [DeleteProtocolsList]
$creadList :: ReadS [DeleteProtocolsList]
readsPrec :: Int -> ReadS DeleteProtocolsList
$creadsPrec :: Int -> ReadS DeleteProtocolsList
Prelude.Read, Int -> DeleteProtocolsList -> ShowS
[DeleteProtocolsList] -> ShowS
DeleteProtocolsList -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteProtocolsList] -> ShowS
$cshowList :: [DeleteProtocolsList] -> ShowS
show :: DeleteProtocolsList -> String
$cshow :: DeleteProtocolsList -> String
showsPrec :: Int -> DeleteProtocolsList -> ShowS
$cshowsPrec :: Int -> DeleteProtocolsList -> ShowS
Prelude.Show, forall x. Rep DeleteProtocolsList x -> DeleteProtocolsList
forall x. DeleteProtocolsList -> Rep DeleteProtocolsList x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteProtocolsList x -> DeleteProtocolsList
$cfrom :: forall x. DeleteProtocolsList -> Rep DeleteProtocolsList x
Prelude.Generic)
newDeleteProtocolsList ::
Prelude.Text ->
DeleteProtocolsList
newDeleteProtocolsList :: Text -> DeleteProtocolsList
newDeleteProtocolsList Text
pListId_ =
DeleteProtocolsList' {$sel:listId:DeleteProtocolsList' :: Text
listId = Text
pListId_}
deleteProtocolsList_listId :: Lens.Lens' DeleteProtocolsList Prelude.Text
deleteProtocolsList_listId :: Lens' DeleteProtocolsList Text
deleteProtocolsList_listId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteProtocolsList' {Text
listId :: Text
$sel:listId:DeleteProtocolsList' :: DeleteProtocolsList -> Text
listId} -> Text
listId) (\s :: DeleteProtocolsList
s@DeleteProtocolsList' {} Text
a -> DeleteProtocolsList
s {$sel:listId:DeleteProtocolsList' :: Text
listId = Text
a} :: DeleteProtocolsList)
instance Core.AWSRequest DeleteProtocolsList where
type
AWSResponse DeleteProtocolsList =
DeleteProtocolsListResponse
request :: (Service -> Service)
-> DeleteProtocolsList -> Request DeleteProtocolsList
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeleteProtocolsList
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteProtocolsList)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull DeleteProtocolsListResponse
DeleteProtocolsListResponse'
instance Prelude.Hashable DeleteProtocolsList where
hashWithSalt :: Int -> DeleteProtocolsList -> Int
hashWithSalt Int
_salt DeleteProtocolsList' {Text
listId :: Text
$sel:listId:DeleteProtocolsList' :: DeleteProtocolsList -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
listId
instance Prelude.NFData DeleteProtocolsList where
rnf :: DeleteProtocolsList -> ()
rnf DeleteProtocolsList' {Text
listId :: Text
$sel:listId:DeleteProtocolsList' :: DeleteProtocolsList -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
listId
instance Data.ToHeaders DeleteProtocolsList where
toHeaders :: DeleteProtocolsList -> [Header]
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> [Header]
Data.=# ( ByteString
"AWSFMS_20180101.DeleteProtocolsList" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> [Header]
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON DeleteProtocolsList where
toJSON :: DeleteProtocolsList -> Value
toJSON DeleteProtocolsList' {Text
listId :: Text
$sel:listId:DeleteProtocolsList' :: DeleteProtocolsList -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"ListId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
listId)]
)
instance Data.ToPath DeleteProtocolsList where
toPath :: DeleteProtocolsList -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DeleteProtocolsList where
toQuery :: DeleteProtocolsList -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteProtocolsListResponse = DeleteProtocolsListResponse'
{
}
deriving (DeleteProtocolsListResponse -> DeleteProtocolsListResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteProtocolsListResponse -> DeleteProtocolsListResponse -> Bool
$c/= :: DeleteProtocolsListResponse -> DeleteProtocolsListResponse -> Bool
== :: DeleteProtocolsListResponse -> DeleteProtocolsListResponse -> Bool
$c== :: DeleteProtocolsListResponse -> DeleteProtocolsListResponse -> Bool
Prelude.Eq, ReadPrec [DeleteProtocolsListResponse]
ReadPrec DeleteProtocolsListResponse
Int -> ReadS DeleteProtocolsListResponse
ReadS [DeleteProtocolsListResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteProtocolsListResponse]
$creadListPrec :: ReadPrec [DeleteProtocolsListResponse]
readPrec :: ReadPrec DeleteProtocolsListResponse
$creadPrec :: ReadPrec DeleteProtocolsListResponse
readList :: ReadS [DeleteProtocolsListResponse]
$creadList :: ReadS [DeleteProtocolsListResponse]
readsPrec :: Int -> ReadS DeleteProtocolsListResponse
$creadsPrec :: Int -> ReadS DeleteProtocolsListResponse
Prelude.Read, Int -> DeleteProtocolsListResponse -> ShowS
[DeleteProtocolsListResponse] -> ShowS
DeleteProtocolsListResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteProtocolsListResponse] -> ShowS
$cshowList :: [DeleteProtocolsListResponse] -> ShowS
show :: DeleteProtocolsListResponse -> String
$cshow :: DeleteProtocolsListResponse -> String
showsPrec :: Int -> DeleteProtocolsListResponse -> ShowS
$cshowsPrec :: Int -> DeleteProtocolsListResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteProtocolsListResponse x -> DeleteProtocolsListResponse
forall x.
DeleteProtocolsListResponse -> Rep DeleteProtocolsListResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteProtocolsListResponse x -> DeleteProtocolsListResponse
$cfrom :: forall x.
DeleteProtocolsListResponse -> Rep DeleteProtocolsListResponse x
Prelude.Generic)
newDeleteProtocolsListResponse ::
DeleteProtocolsListResponse
newDeleteProtocolsListResponse :: DeleteProtocolsListResponse
newDeleteProtocolsListResponse =
DeleteProtocolsListResponse
DeleteProtocolsListResponse'
instance Prelude.NFData DeleteProtocolsListResponse where
rnf :: DeleteProtocolsListResponse -> ()
rnf DeleteProtocolsListResponse
_ = ()