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