{-# 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.GetRevealConfiguration
(
GetRevealConfiguration (..),
newGetRevealConfiguration,
GetRevealConfigurationResponse (..),
newGetRevealConfigurationResponse,
getRevealConfigurationResponse_configuration,
getRevealConfigurationResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MacieV2.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data GetRevealConfiguration = GetRevealConfiguration'
{
}
deriving (GetRevealConfiguration -> GetRevealConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetRevealConfiguration -> GetRevealConfiguration -> Bool
$c/= :: GetRevealConfiguration -> GetRevealConfiguration -> Bool
== :: GetRevealConfiguration -> GetRevealConfiguration -> Bool
$c== :: GetRevealConfiguration -> GetRevealConfiguration -> Bool
Prelude.Eq, ReadPrec [GetRevealConfiguration]
ReadPrec GetRevealConfiguration
Int -> ReadS GetRevealConfiguration
ReadS [GetRevealConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetRevealConfiguration]
$creadListPrec :: ReadPrec [GetRevealConfiguration]
readPrec :: ReadPrec GetRevealConfiguration
$creadPrec :: ReadPrec GetRevealConfiguration
readList :: ReadS [GetRevealConfiguration]
$creadList :: ReadS [GetRevealConfiguration]
readsPrec :: Int -> ReadS GetRevealConfiguration
$creadsPrec :: Int -> ReadS GetRevealConfiguration
Prelude.Read, Int -> GetRevealConfiguration -> ShowS
[GetRevealConfiguration] -> ShowS
GetRevealConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetRevealConfiguration] -> ShowS
$cshowList :: [GetRevealConfiguration] -> ShowS
show :: GetRevealConfiguration -> String
$cshow :: GetRevealConfiguration -> String
showsPrec :: Int -> GetRevealConfiguration -> ShowS
$cshowsPrec :: Int -> GetRevealConfiguration -> ShowS
Prelude.Show, forall x. Rep GetRevealConfiguration x -> GetRevealConfiguration
forall x. GetRevealConfiguration -> Rep GetRevealConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetRevealConfiguration x -> GetRevealConfiguration
$cfrom :: forall x. GetRevealConfiguration -> Rep GetRevealConfiguration x
Prelude.Generic)
newGetRevealConfiguration ::
GetRevealConfiguration
newGetRevealConfiguration :: GetRevealConfiguration
newGetRevealConfiguration = GetRevealConfiguration
GetRevealConfiguration'
instance Core.AWSRequest GetRevealConfiguration where
type
AWSResponse GetRevealConfiguration =
GetRevealConfigurationResponse
request :: (Service -> Service)
-> GetRevealConfiguration -> Request GetRevealConfiguration
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetRevealConfiguration
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetRevealConfiguration)))
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 RevealConfiguration -> Int -> GetRevealConfigurationResponse
GetRevealConfigurationResponse'
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
"configuration")
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 GetRevealConfiguration where
hashWithSalt :: Int -> GetRevealConfiguration -> Int
hashWithSalt Int
_salt GetRevealConfiguration
_ =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ()
instance Prelude.NFData GetRevealConfiguration where
rnf :: GetRevealConfiguration -> ()
rnf GetRevealConfiguration
_ = ()
instance Data.ToHeaders GetRevealConfiguration where
toHeaders :: GetRevealConfiguration -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToPath GetRevealConfiguration where
toPath :: GetRevealConfiguration -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/reveal-configuration"
instance Data.ToQuery GetRevealConfiguration where
toQuery :: GetRevealConfiguration -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data GetRevealConfigurationResponse = GetRevealConfigurationResponse'
{
GetRevealConfigurationResponse -> Maybe RevealConfiguration
configuration :: Prelude.Maybe RevealConfiguration,
GetRevealConfigurationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetRevealConfigurationResponse
-> GetRevealConfigurationResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetRevealConfigurationResponse
-> GetRevealConfigurationResponse -> Bool
$c/= :: GetRevealConfigurationResponse
-> GetRevealConfigurationResponse -> Bool
== :: GetRevealConfigurationResponse
-> GetRevealConfigurationResponse -> Bool
$c== :: GetRevealConfigurationResponse
-> GetRevealConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [GetRevealConfigurationResponse]
ReadPrec GetRevealConfigurationResponse
Int -> ReadS GetRevealConfigurationResponse
ReadS [GetRevealConfigurationResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetRevealConfigurationResponse]
$creadListPrec :: ReadPrec [GetRevealConfigurationResponse]
readPrec :: ReadPrec GetRevealConfigurationResponse
$creadPrec :: ReadPrec GetRevealConfigurationResponse
readList :: ReadS [GetRevealConfigurationResponse]
$creadList :: ReadS [GetRevealConfigurationResponse]
readsPrec :: Int -> ReadS GetRevealConfigurationResponse
$creadsPrec :: Int -> ReadS GetRevealConfigurationResponse
Prelude.Read, Int -> GetRevealConfigurationResponse -> ShowS
[GetRevealConfigurationResponse] -> ShowS
GetRevealConfigurationResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetRevealConfigurationResponse] -> ShowS
$cshowList :: [GetRevealConfigurationResponse] -> ShowS
show :: GetRevealConfigurationResponse -> String
$cshow :: GetRevealConfigurationResponse -> String
showsPrec :: Int -> GetRevealConfigurationResponse -> ShowS
$cshowsPrec :: Int -> GetRevealConfigurationResponse -> ShowS
Prelude.Show, forall x.
Rep GetRevealConfigurationResponse x
-> GetRevealConfigurationResponse
forall x.
GetRevealConfigurationResponse
-> Rep GetRevealConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetRevealConfigurationResponse x
-> GetRevealConfigurationResponse
$cfrom :: forall x.
GetRevealConfigurationResponse
-> Rep GetRevealConfigurationResponse x
Prelude.Generic)
newGetRevealConfigurationResponse ::
Prelude.Int ->
GetRevealConfigurationResponse
newGetRevealConfigurationResponse :: Int -> GetRevealConfigurationResponse
newGetRevealConfigurationResponse Int
pHttpStatus_ =
GetRevealConfigurationResponse'
{ $sel:configuration:GetRevealConfigurationResponse' :: Maybe RevealConfiguration
configuration =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetRevealConfigurationResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getRevealConfigurationResponse_configuration :: Lens.Lens' GetRevealConfigurationResponse (Prelude.Maybe RevealConfiguration)
getRevealConfigurationResponse_configuration :: Lens' GetRevealConfigurationResponse (Maybe RevealConfiguration)
getRevealConfigurationResponse_configuration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRevealConfigurationResponse' {Maybe RevealConfiguration
configuration :: Maybe RevealConfiguration
$sel:configuration:GetRevealConfigurationResponse' :: GetRevealConfigurationResponse -> Maybe RevealConfiguration
configuration} -> Maybe RevealConfiguration
configuration) (\s :: GetRevealConfigurationResponse
s@GetRevealConfigurationResponse' {} Maybe RevealConfiguration
a -> GetRevealConfigurationResponse
s {$sel:configuration:GetRevealConfigurationResponse' :: Maybe RevealConfiguration
configuration = Maybe RevealConfiguration
a} :: GetRevealConfigurationResponse)
getRevealConfigurationResponse_httpStatus :: Lens.Lens' GetRevealConfigurationResponse Prelude.Int
getRevealConfigurationResponse_httpStatus :: Lens' GetRevealConfigurationResponse Int
getRevealConfigurationResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRevealConfigurationResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetRevealConfigurationResponse' :: GetRevealConfigurationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetRevealConfigurationResponse
s@GetRevealConfigurationResponse' {} Int
a -> GetRevealConfigurationResponse
s {$sel:httpStatus:GetRevealConfigurationResponse' :: Int
httpStatus = Int
a} :: GetRevealConfigurationResponse)
instance
Prelude.NFData
GetRevealConfigurationResponse
where
rnf :: GetRevealConfigurationResponse -> ()
rnf GetRevealConfigurationResponse' {Int
Maybe RevealConfiguration
httpStatus :: Int
configuration :: Maybe RevealConfiguration
$sel:httpStatus:GetRevealConfigurationResponse' :: GetRevealConfigurationResponse -> Int
$sel:configuration:GetRevealConfigurationResponse' :: GetRevealConfigurationResponse -> Maybe RevealConfiguration
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe RevealConfiguration
configuration
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus