{-# 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.FraudDetector.GetDeleteEventsByEventTypeStatus
(
GetDeleteEventsByEventTypeStatus (..),
newGetDeleteEventsByEventTypeStatus,
getDeleteEventsByEventTypeStatus_eventTypeName,
GetDeleteEventsByEventTypeStatusResponse (..),
newGetDeleteEventsByEventTypeStatusResponse,
getDeleteEventsByEventTypeStatusResponse_eventTypeName,
getDeleteEventsByEventTypeStatusResponse_eventsDeletionStatus,
getDeleteEventsByEventTypeStatusResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.FraudDetector.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data GetDeleteEventsByEventTypeStatus = GetDeleteEventsByEventTypeStatus'
{
GetDeleteEventsByEventTypeStatus -> Text
eventTypeName :: Prelude.Text
}
deriving (GetDeleteEventsByEventTypeStatus
-> GetDeleteEventsByEventTypeStatus -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDeleteEventsByEventTypeStatus
-> GetDeleteEventsByEventTypeStatus -> Bool
$c/= :: GetDeleteEventsByEventTypeStatus
-> GetDeleteEventsByEventTypeStatus -> Bool
== :: GetDeleteEventsByEventTypeStatus
-> GetDeleteEventsByEventTypeStatus -> Bool
$c== :: GetDeleteEventsByEventTypeStatus
-> GetDeleteEventsByEventTypeStatus -> Bool
Prelude.Eq, ReadPrec [GetDeleteEventsByEventTypeStatus]
ReadPrec GetDeleteEventsByEventTypeStatus
Int -> ReadS GetDeleteEventsByEventTypeStatus
ReadS [GetDeleteEventsByEventTypeStatus]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDeleteEventsByEventTypeStatus]
$creadListPrec :: ReadPrec [GetDeleteEventsByEventTypeStatus]
readPrec :: ReadPrec GetDeleteEventsByEventTypeStatus
$creadPrec :: ReadPrec GetDeleteEventsByEventTypeStatus
readList :: ReadS [GetDeleteEventsByEventTypeStatus]
$creadList :: ReadS [GetDeleteEventsByEventTypeStatus]
readsPrec :: Int -> ReadS GetDeleteEventsByEventTypeStatus
$creadsPrec :: Int -> ReadS GetDeleteEventsByEventTypeStatus
Prelude.Read, Int -> GetDeleteEventsByEventTypeStatus -> ShowS
[GetDeleteEventsByEventTypeStatus] -> ShowS
GetDeleteEventsByEventTypeStatus -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDeleteEventsByEventTypeStatus] -> ShowS
$cshowList :: [GetDeleteEventsByEventTypeStatus] -> ShowS
show :: GetDeleteEventsByEventTypeStatus -> String
$cshow :: GetDeleteEventsByEventTypeStatus -> String
showsPrec :: Int -> GetDeleteEventsByEventTypeStatus -> ShowS
$cshowsPrec :: Int -> GetDeleteEventsByEventTypeStatus -> ShowS
Prelude.Show, forall x.
Rep GetDeleteEventsByEventTypeStatus x
-> GetDeleteEventsByEventTypeStatus
forall x.
GetDeleteEventsByEventTypeStatus
-> Rep GetDeleteEventsByEventTypeStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetDeleteEventsByEventTypeStatus x
-> GetDeleteEventsByEventTypeStatus
$cfrom :: forall x.
GetDeleteEventsByEventTypeStatus
-> Rep GetDeleteEventsByEventTypeStatus x
Prelude.Generic)
newGetDeleteEventsByEventTypeStatus ::
Prelude.Text ->
GetDeleteEventsByEventTypeStatus
newGetDeleteEventsByEventTypeStatus :: Text -> GetDeleteEventsByEventTypeStatus
newGetDeleteEventsByEventTypeStatus Text
pEventTypeName_ =
GetDeleteEventsByEventTypeStatus'
{ $sel:eventTypeName:GetDeleteEventsByEventTypeStatus' :: Text
eventTypeName =
Text
pEventTypeName_
}
getDeleteEventsByEventTypeStatus_eventTypeName :: Lens.Lens' GetDeleteEventsByEventTypeStatus Prelude.Text
getDeleteEventsByEventTypeStatus_eventTypeName :: Lens' GetDeleteEventsByEventTypeStatus Text
getDeleteEventsByEventTypeStatus_eventTypeName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeleteEventsByEventTypeStatus' {Text
eventTypeName :: Text
$sel:eventTypeName:GetDeleteEventsByEventTypeStatus' :: GetDeleteEventsByEventTypeStatus -> Text
eventTypeName} -> Text
eventTypeName) (\s :: GetDeleteEventsByEventTypeStatus
s@GetDeleteEventsByEventTypeStatus' {} Text
a -> GetDeleteEventsByEventTypeStatus
s {$sel:eventTypeName:GetDeleteEventsByEventTypeStatus' :: Text
eventTypeName = Text
a} :: GetDeleteEventsByEventTypeStatus)
instance
Core.AWSRequest
GetDeleteEventsByEventTypeStatus
where
type
AWSResponse GetDeleteEventsByEventTypeStatus =
GetDeleteEventsByEventTypeStatusResponse
request :: (Service -> Service)
-> GetDeleteEventsByEventTypeStatus
-> Request GetDeleteEventsByEventTypeStatus
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 GetDeleteEventsByEventTypeStatus
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse GetDeleteEventsByEventTypeStatus)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text
-> Maybe AsyncJobStatus
-> Int
-> GetDeleteEventsByEventTypeStatusResponse
GetDeleteEventsByEventTypeStatusResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"eventTypeName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"eventsDeletionStatus")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance
Prelude.Hashable
GetDeleteEventsByEventTypeStatus
where
hashWithSalt :: Int -> GetDeleteEventsByEventTypeStatus -> Int
hashWithSalt
Int
_salt
GetDeleteEventsByEventTypeStatus' {Text
eventTypeName :: Text
$sel:eventTypeName:GetDeleteEventsByEventTypeStatus' :: GetDeleteEventsByEventTypeStatus -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
eventTypeName
instance
Prelude.NFData
GetDeleteEventsByEventTypeStatus
where
rnf :: GetDeleteEventsByEventTypeStatus -> ()
rnf GetDeleteEventsByEventTypeStatus' {Text
eventTypeName :: Text
$sel:eventTypeName:GetDeleteEventsByEventTypeStatus' :: GetDeleteEventsByEventTypeStatus -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
eventTypeName
instance
Data.ToHeaders
GetDeleteEventsByEventTypeStatus
where
toHeaders :: GetDeleteEventsByEventTypeStatus -> ResponseHeaders
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 -> ResponseHeaders
Data.=# ( ByteString
"AWSHawksNestServiceFacade.GetDeleteEventsByEventTypeStatus" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON GetDeleteEventsByEventTypeStatus where
toJSON :: GetDeleteEventsByEventTypeStatus -> Value
toJSON GetDeleteEventsByEventTypeStatus' {Text
eventTypeName :: Text
$sel:eventTypeName:GetDeleteEventsByEventTypeStatus' :: GetDeleteEventsByEventTypeStatus -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
(Key
"eventTypeName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
eventTypeName)
]
)
instance Data.ToPath GetDeleteEventsByEventTypeStatus where
toPath :: GetDeleteEventsByEventTypeStatus -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Data.ToQuery
GetDeleteEventsByEventTypeStatus
where
toQuery :: GetDeleteEventsByEventTypeStatus -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data GetDeleteEventsByEventTypeStatusResponse = GetDeleteEventsByEventTypeStatusResponse'
{
GetDeleteEventsByEventTypeStatusResponse -> Maybe Text
eventTypeName :: Prelude.Maybe Prelude.Text,
GetDeleteEventsByEventTypeStatusResponse -> Maybe AsyncJobStatus
eventsDeletionStatus :: Prelude.Maybe AsyncJobStatus,
GetDeleteEventsByEventTypeStatusResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetDeleteEventsByEventTypeStatusResponse
-> GetDeleteEventsByEventTypeStatusResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDeleteEventsByEventTypeStatusResponse
-> GetDeleteEventsByEventTypeStatusResponse -> Bool
$c/= :: GetDeleteEventsByEventTypeStatusResponse
-> GetDeleteEventsByEventTypeStatusResponse -> Bool
== :: GetDeleteEventsByEventTypeStatusResponse
-> GetDeleteEventsByEventTypeStatusResponse -> Bool
$c== :: GetDeleteEventsByEventTypeStatusResponse
-> GetDeleteEventsByEventTypeStatusResponse -> Bool
Prelude.Eq, ReadPrec [GetDeleteEventsByEventTypeStatusResponse]
ReadPrec GetDeleteEventsByEventTypeStatusResponse
Int -> ReadS GetDeleteEventsByEventTypeStatusResponse
ReadS [GetDeleteEventsByEventTypeStatusResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDeleteEventsByEventTypeStatusResponse]
$creadListPrec :: ReadPrec [GetDeleteEventsByEventTypeStatusResponse]
readPrec :: ReadPrec GetDeleteEventsByEventTypeStatusResponse
$creadPrec :: ReadPrec GetDeleteEventsByEventTypeStatusResponse
readList :: ReadS [GetDeleteEventsByEventTypeStatusResponse]
$creadList :: ReadS [GetDeleteEventsByEventTypeStatusResponse]
readsPrec :: Int -> ReadS GetDeleteEventsByEventTypeStatusResponse
$creadsPrec :: Int -> ReadS GetDeleteEventsByEventTypeStatusResponse
Prelude.Read, Int -> GetDeleteEventsByEventTypeStatusResponse -> ShowS
[GetDeleteEventsByEventTypeStatusResponse] -> ShowS
GetDeleteEventsByEventTypeStatusResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDeleteEventsByEventTypeStatusResponse] -> ShowS
$cshowList :: [GetDeleteEventsByEventTypeStatusResponse] -> ShowS
show :: GetDeleteEventsByEventTypeStatusResponse -> String
$cshow :: GetDeleteEventsByEventTypeStatusResponse -> String
showsPrec :: Int -> GetDeleteEventsByEventTypeStatusResponse -> ShowS
$cshowsPrec :: Int -> GetDeleteEventsByEventTypeStatusResponse -> ShowS
Prelude.Show, forall x.
Rep GetDeleteEventsByEventTypeStatusResponse x
-> GetDeleteEventsByEventTypeStatusResponse
forall x.
GetDeleteEventsByEventTypeStatusResponse
-> Rep GetDeleteEventsByEventTypeStatusResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetDeleteEventsByEventTypeStatusResponse x
-> GetDeleteEventsByEventTypeStatusResponse
$cfrom :: forall x.
GetDeleteEventsByEventTypeStatusResponse
-> Rep GetDeleteEventsByEventTypeStatusResponse x
Prelude.Generic)
newGetDeleteEventsByEventTypeStatusResponse ::
Prelude.Int ->
GetDeleteEventsByEventTypeStatusResponse
newGetDeleteEventsByEventTypeStatusResponse :: Int -> GetDeleteEventsByEventTypeStatusResponse
newGetDeleteEventsByEventTypeStatusResponse
Int
pHttpStatus_ =
GetDeleteEventsByEventTypeStatusResponse'
{ $sel:eventTypeName:GetDeleteEventsByEventTypeStatusResponse' :: Maybe Text
eventTypeName =
forall a. Maybe a
Prelude.Nothing,
$sel:eventsDeletionStatus:GetDeleteEventsByEventTypeStatusResponse' :: Maybe AsyncJobStatus
eventsDeletionStatus =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetDeleteEventsByEventTypeStatusResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getDeleteEventsByEventTypeStatusResponse_eventTypeName :: Lens.Lens' GetDeleteEventsByEventTypeStatusResponse (Prelude.Maybe Prelude.Text)
getDeleteEventsByEventTypeStatusResponse_eventTypeName :: Lens' GetDeleteEventsByEventTypeStatusResponse (Maybe Text)
getDeleteEventsByEventTypeStatusResponse_eventTypeName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeleteEventsByEventTypeStatusResponse' {Maybe Text
eventTypeName :: Maybe Text
$sel:eventTypeName:GetDeleteEventsByEventTypeStatusResponse' :: GetDeleteEventsByEventTypeStatusResponse -> Maybe Text
eventTypeName} -> Maybe Text
eventTypeName) (\s :: GetDeleteEventsByEventTypeStatusResponse
s@GetDeleteEventsByEventTypeStatusResponse' {} Maybe Text
a -> GetDeleteEventsByEventTypeStatusResponse
s {$sel:eventTypeName:GetDeleteEventsByEventTypeStatusResponse' :: Maybe Text
eventTypeName = Maybe Text
a} :: GetDeleteEventsByEventTypeStatusResponse)
getDeleteEventsByEventTypeStatusResponse_eventsDeletionStatus :: Lens.Lens' GetDeleteEventsByEventTypeStatusResponse (Prelude.Maybe AsyncJobStatus)
getDeleteEventsByEventTypeStatusResponse_eventsDeletionStatus :: Lens'
GetDeleteEventsByEventTypeStatusResponse (Maybe AsyncJobStatus)
getDeleteEventsByEventTypeStatusResponse_eventsDeletionStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeleteEventsByEventTypeStatusResponse' {Maybe AsyncJobStatus
eventsDeletionStatus :: Maybe AsyncJobStatus
$sel:eventsDeletionStatus:GetDeleteEventsByEventTypeStatusResponse' :: GetDeleteEventsByEventTypeStatusResponse -> Maybe AsyncJobStatus
eventsDeletionStatus} -> Maybe AsyncJobStatus
eventsDeletionStatus) (\s :: GetDeleteEventsByEventTypeStatusResponse
s@GetDeleteEventsByEventTypeStatusResponse' {} Maybe AsyncJobStatus
a -> GetDeleteEventsByEventTypeStatusResponse
s {$sel:eventsDeletionStatus:GetDeleteEventsByEventTypeStatusResponse' :: Maybe AsyncJobStatus
eventsDeletionStatus = Maybe AsyncJobStatus
a} :: GetDeleteEventsByEventTypeStatusResponse)
getDeleteEventsByEventTypeStatusResponse_httpStatus :: Lens.Lens' GetDeleteEventsByEventTypeStatusResponse Prelude.Int
getDeleteEventsByEventTypeStatusResponse_httpStatus :: Lens' GetDeleteEventsByEventTypeStatusResponse Int
getDeleteEventsByEventTypeStatusResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeleteEventsByEventTypeStatusResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetDeleteEventsByEventTypeStatusResponse' :: GetDeleteEventsByEventTypeStatusResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetDeleteEventsByEventTypeStatusResponse
s@GetDeleteEventsByEventTypeStatusResponse' {} Int
a -> GetDeleteEventsByEventTypeStatusResponse
s {$sel:httpStatus:GetDeleteEventsByEventTypeStatusResponse' :: Int
httpStatus = Int
a} :: GetDeleteEventsByEventTypeStatusResponse)
instance
Prelude.NFData
GetDeleteEventsByEventTypeStatusResponse
where
rnf :: GetDeleteEventsByEventTypeStatusResponse -> ()
rnf GetDeleteEventsByEventTypeStatusResponse' {Int
Maybe Text
Maybe AsyncJobStatus
httpStatus :: Int
eventsDeletionStatus :: Maybe AsyncJobStatus
eventTypeName :: Maybe Text
$sel:httpStatus:GetDeleteEventsByEventTypeStatusResponse' :: GetDeleteEventsByEventTypeStatusResponse -> Int
$sel:eventsDeletionStatus:GetDeleteEventsByEventTypeStatusResponse' :: GetDeleteEventsByEventTypeStatusResponse -> Maybe AsyncJobStatus
$sel:eventTypeName:GetDeleteEventsByEventTypeStatusResponse' :: GetDeleteEventsByEventTypeStatusResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
eventTypeName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AsyncJobStatus
eventsDeletionStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus