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