{-# 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.MacieV2.DeleteFindingsFilter
(
DeleteFindingsFilter (..),
newDeleteFindingsFilter,
deleteFindingsFilter_id,
DeleteFindingsFilterResponse (..),
newDeleteFindingsFilterResponse,
deleteFindingsFilterResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MacieV2.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteFindingsFilter = DeleteFindingsFilter'
{
DeleteFindingsFilter -> Text
id :: Prelude.Text
}
deriving (DeleteFindingsFilter -> DeleteFindingsFilter -> Bool
(DeleteFindingsFilter -> DeleteFindingsFilter -> Bool)
-> (DeleteFindingsFilter -> DeleteFindingsFilter -> Bool)
-> Eq DeleteFindingsFilter
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteFindingsFilter -> DeleteFindingsFilter -> Bool
$c/= :: DeleteFindingsFilter -> DeleteFindingsFilter -> Bool
== :: DeleteFindingsFilter -> DeleteFindingsFilter -> Bool
$c== :: DeleteFindingsFilter -> DeleteFindingsFilter -> Bool
Prelude.Eq, ReadPrec [DeleteFindingsFilter]
ReadPrec DeleteFindingsFilter
Int -> ReadS DeleteFindingsFilter
ReadS [DeleteFindingsFilter]
(Int -> ReadS DeleteFindingsFilter)
-> ReadS [DeleteFindingsFilter]
-> ReadPrec DeleteFindingsFilter
-> ReadPrec [DeleteFindingsFilter]
-> Read DeleteFindingsFilter
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteFindingsFilter]
$creadListPrec :: ReadPrec [DeleteFindingsFilter]
readPrec :: ReadPrec DeleteFindingsFilter
$creadPrec :: ReadPrec DeleteFindingsFilter
readList :: ReadS [DeleteFindingsFilter]
$creadList :: ReadS [DeleteFindingsFilter]
readsPrec :: Int -> ReadS DeleteFindingsFilter
$creadsPrec :: Int -> ReadS DeleteFindingsFilter
Prelude.Read, Int -> DeleteFindingsFilter -> ShowS
[DeleteFindingsFilter] -> ShowS
DeleteFindingsFilter -> String
(Int -> DeleteFindingsFilter -> ShowS)
-> (DeleteFindingsFilter -> String)
-> ([DeleteFindingsFilter] -> ShowS)
-> Show DeleteFindingsFilter
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteFindingsFilter] -> ShowS
$cshowList :: [DeleteFindingsFilter] -> ShowS
show :: DeleteFindingsFilter -> String
$cshow :: DeleteFindingsFilter -> String
showsPrec :: Int -> DeleteFindingsFilter -> ShowS
$cshowsPrec :: Int -> DeleteFindingsFilter -> ShowS
Prelude.Show, (forall x. DeleteFindingsFilter -> Rep DeleteFindingsFilter x)
-> (forall x. Rep DeleteFindingsFilter x -> DeleteFindingsFilter)
-> Generic DeleteFindingsFilter
forall x. Rep DeleteFindingsFilter x -> DeleteFindingsFilter
forall x. DeleteFindingsFilter -> Rep DeleteFindingsFilter x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteFindingsFilter x -> DeleteFindingsFilter
$cfrom :: forall x. DeleteFindingsFilter -> Rep DeleteFindingsFilter x
Prelude.Generic)
newDeleteFindingsFilter ::
Prelude.Text ->
DeleteFindingsFilter
newDeleteFindingsFilter :: Text -> DeleteFindingsFilter
newDeleteFindingsFilter Text
pId_ =
DeleteFindingsFilter' :: Text -> DeleteFindingsFilter
DeleteFindingsFilter' {$sel:id:DeleteFindingsFilter' :: Text
id = Text
pId_}
deleteFindingsFilter_id :: Lens.Lens' DeleteFindingsFilter Prelude.Text
deleteFindingsFilter_id :: (Text -> f Text) -> DeleteFindingsFilter -> f DeleteFindingsFilter
deleteFindingsFilter_id = (DeleteFindingsFilter -> Text)
-> (DeleteFindingsFilter -> Text -> DeleteFindingsFilter)
-> Lens DeleteFindingsFilter DeleteFindingsFilter Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteFindingsFilter' {Text
id :: Text
$sel:id:DeleteFindingsFilter' :: DeleteFindingsFilter -> Text
id} -> Text
id) (\s :: DeleteFindingsFilter
s@DeleteFindingsFilter' {} Text
a -> DeleteFindingsFilter
s {$sel:id:DeleteFindingsFilter' :: Text
id = Text
a} :: DeleteFindingsFilter)
instance Core.AWSRequest DeleteFindingsFilter where
type
AWSResponse DeleteFindingsFilter =
DeleteFindingsFilterResponse
request :: DeleteFindingsFilter -> Request DeleteFindingsFilter
request = Service -> DeleteFindingsFilter -> Request DeleteFindingsFilter
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteFindingsFilter
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteFindingsFilter)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DeleteFindingsFilter))
-> Logger
-> Service
-> Proxy DeleteFindingsFilter
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteFindingsFilter)))
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 -> DeleteFindingsFilterResponse
DeleteFindingsFilterResponse'
(Int -> DeleteFindingsFilterResponse)
-> Either String Int -> Either String DeleteFindingsFilterResponse
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 DeleteFindingsFilter
instance Prelude.NFData DeleteFindingsFilter
instance Core.ToHeaders DeleteFindingsFilter where
toHeaders :: DeleteFindingsFilter -> ResponseHeaders
toHeaders =
ResponseHeaders -> DeleteFindingsFilter -> 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 DeleteFindingsFilter where
toPath :: DeleteFindingsFilter -> ByteString
toPath DeleteFindingsFilter' {Text
id :: Text
$sel:id:DeleteFindingsFilter' :: DeleteFindingsFilter -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"/findingsfilters/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
id]
instance Core.ToQuery DeleteFindingsFilter where
toQuery :: DeleteFindingsFilter -> QueryString
toQuery = QueryString -> DeleteFindingsFilter -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteFindingsFilterResponse = DeleteFindingsFilterResponse'
{
DeleteFindingsFilterResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteFindingsFilterResponse
-> DeleteFindingsFilterResponse -> Bool
(DeleteFindingsFilterResponse
-> DeleteFindingsFilterResponse -> Bool)
-> (DeleteFindingsFilterResponse
-> DeleteFindingsFilterResponse -> Bool)
-> Eq DeleteFindingsFilterResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteFindingsFilterResponse
-> DeleteFindingsFilterResponse -> Bool
$c/= :: DeleteFindingsFilterResponse
-> DeleteFindingsFilterResponse -> Bool
== :: DeleteFindingsFilterResponse
-> DeleteFindingsFilterResponse -> Bool
$c== :: DeleteFindingsFilterResponse
-> DeleteFindingsFilterResponse -> Bool
Prelude.Eq, ReadPrec [DeleteFindingsFilterResponse]
ReadPrec DeleteFindingsFilterResponse
Int -> ReadS DeleteFindingsFilterResponse
ReadS [DeleteFindingsFilterResponse]
(Int -> ReadS DeleteFindingsFilterResponse)
-> ReadS [DeleteFindingsFilterResponse]
-> ReadPrec DeleteFindingsFilterResponse
-> ReadPrec [DeleteFindingsFilterResponse]
-> Read DeleteFindingsFilterResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteFindingsFilterResponse]
$creadListPrec :: ReadPrec [DeleteFindingsFilterResponse]
readPrec :: ReadPrec DeleteFindingsFilterResponse
$creadPrec :: ReadPrec DeleteFindingsFilterResponse
readList :: ReadS [DeleteFindingsFilterResponse]
$creadList :: ReadS [DeleteFindingsFilterResponse]
readsPrec :: Int -> ReadS DeleteFindingsFilterResponse
$creadsPrec :: Int -> ReadS DeleteFindingsFilterResponse
Prelude.Read, Int -> DeleteFindingsFilterResponse -> ShowS
[DeleteFindingsFilterResponse] -> ShowS
DeleteFindingsFilterResponse -> String
(Int -> DeleteFindingsFilterResponse -> ShowS)
-> (DeleteFindingsFilterResponse -> String)
-> ([DeleteFindingsFilterResponse] -> ShowS)
-> Show DeleteFindingsFilterResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteFindingsFilterResponse] -> ShowS
$cshowList :: [DeleteFindingsFilterResponse] -> ShowS
show :: DeleteFindingsFilterResponse -> String
$cshow :: DeleteFindingsFilterResponse -> String
showsPrec :: Int -> DeleteFindingsFilterResponse -> ShowS
$cshowsPrec :: Int -> DeleteFindingsFilterResponse -> ShowS
Prelude.Show, (forall x.
DeleteFindingsFilterResponse -> Rep DeleteFindingsFilterResponse x)
-> (forall x.
Rep DeleteFindingsFilterResponse x -> DeleteFindingsFilterResponse)
-> Generic DeleteFindingsFilterResponse
forall x.
Rep DeleteFindingsFilterResponse x -> DeleteFindingsFilterResponse
forall x.
DeleteFindingsFilterResponse -> Rep DeleteFindingsFilterResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteFindingsFilterResponse x -> DeleteFindingsFilterResponse
$cfrom :: forall x.
DeleteFindingsFilterResponse -> Rep DeleteFindingsFilterResponse x
Prelude.Generic)
newDeleteFindingsFilterResponse ::
Prelude.Int ->
DeleteFindingsFilterResponse
newDeleteFindingsFilterResponse :: Int -> DeleteFindingsFilterResponse
newDeleteFindingsFilterResponse Int
pHttpStatus_ =
DeleteFindingsFilterResponse' :: Int -> DeleteFindingsFilterResponse
DeleteFindingsFilterResponse'
{ $sel:httpStatus:DeleteFindingsFilterResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteFindingsFilterResponse_httpStatus :: Lens.Lens' DeleteFindingsFilterResponse Prelude.Int
deleteFindingsFilterResponse_httpStatus :: (Int -> f Int)
-> DeleteFindingsFilterResponse -> f DeleteFindingsFilterResponse
deleteFindingsFilterResponse_httpStatus = (DeleteFindingsFilterResponse -> Int)
-> (DeleteFindingsFilterResponse
-> Int -> DeleteFindingsFilterResponse)
-> Lens
DeleteFindingsFilterResponse DeleteFindingsFilterResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteFindingsFilterResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteFindingsFilterResponse' :: DeleteFindingsFilterResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteFindingsFilterResponse
s@DeleteFindingsFilterResponse' {} Int
a -> DeleteFindingsFilterResponse
s {$sel:httpStatus:DeleteFindingsFilterResponse' :: Int
httpStatus = Int
a} :: DeleteFindingsFilterResponse)
instance Prelude.NFData DeleteFindingsFilterResponse