{-# 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.GetClassificationExportConfiguration
(
GetClassificationExportConfiguration (..),
newGetClassificationExportConfiguration,
GetClassificationExportConfigurationResponse (..),
newGetClassificationExportConfigurationResponse,
getClassificationExportConfigurationResponse_configuration,
getClassificationExportConfigurationResponse_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 GetClassificationExportConfiguration = GetClassificationExportConfiguration'
{
}
deriving (GetClassificationExportConfiguration
-> GetClassificationExportConfiguration -> Bool
(GetClassificationExportConfiguration
-> GetClassificationExportConfiguration -> Bool)
-> (GetClassificationExportConfiguration
-> GetClassificationExportConfiguration -> Bool)
-> Eq GetClassificationExportConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetClassificationExportConfiguration
-> GetClassificationExportConfiguration -> Bool
$c/= :: GetClassificationExportConfiguration
-> GetClassificationExportConfiguration -> Bool
== :: GetClassificationExportConfiguration
-> GetClassificationExportConfiguration -> Bool
$c== :: GetClassificationExportConfiguration
-> GetClassificationExportConfiguration -> Bool
Prelude.Eq, ReadPrec [GetClassificationExportConfiguration]
ReadPrec GetClassificationExportConfiguration
Int -> ReadS GetClassificationExportConfiguration
ReadS [GetClassificationExportConfiguration]
(Int -> ReadS GetClassificationExportConfiguration)
-> ReadS [GetClassificationExportConfiguration]
-> ReadPrec GetClassificationExportConfiguration
-> ReadPrec [GetClassificationExportConfiguration]
-> Read GetClassificationExportConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetClassificationExportConfiguration]
$creadListPrec :: ReadPrec [GetClassificationExportConfiguration]
readPrec :: ReadPrec GetClassificationExportConfiguration
$creadPrec :: ReadPrec GetClassificationExportConfiguration
readList :: ReadS [GetClassificationExportConfiguration]
$creadList :: ReadS [GetClassificationExportConfiguration]
readsPrec :: Int -> ReadS GetClassificationExportConfiguration
$creadsPrec :: Int -> ReadS GetClassificationExportConfiguration
Prelude.Read, Int -> GetClassificationExportConfiguration -> ShowS
[GetClassificationExportConfiguration] -> ShowS
GetClassificationExportConfiguration -> String
(Int -> GetClassificationExportConfiguration -> ShowS)
-> (GetClassificationExportConfiguration -> String)
-> ([GetClassificationExportConfiguration] -> ShowS)
-> Show GetClassificationExportConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetClassificationExportConfiguration] -> ShowS
$cshowList :: [GetClassificationExportConfiguration] -> ShowS
show :: GetClassificationExportConfiguration -> String
$cshow :: GetClassificationExportConfiguration -> String
showsPrec :: Int -> GetClassificationExportConfiguration -> ShowS
$cshowsPrec :: Int -> GetClassificationExportConfiguration -> ShowS
Prelude.Show, (forall x.
GetClassificationExportConfiguration
-> Rep GetClassificationExportConfiguration x)
-> (forall x.
Rep GetClassificationExportConfiguration x
-> GetClassificationExportConfiguration)
-> Generic GetClassificationExportConfiguration
forall x.
Rep GetClassificationExportConfiguration x
-> GetClassificationExportConfiguration
forall x.
GetClassificationExportConfiguration
-> Rep GetClassificationExportConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetClassificationExportConfiguration x
-> GetClassificationExportConfiguration
$cfrom :: forall x.
GetClassificationExportConfiguration
-> Rep GetClassificationExportConfiguration x
Prelude.Generic)
newGetClassificationExportConfiguration ::
GetClassificationExportConfiguration
newGetClassificationExportConfiguration :: GetClassificationExportConfiguration
newGetClassificationExportConfiguration =
GetClassificationExportConfiguration
GetClassificationExportConfiguration'
instance
Core.AWSRequest
GetClassificationExportConfiguration
where
type
AWSResponse GetClassificationExportConfiguration =
GetClassificationExportConfigurationResponse
request :: GetClassificationExportConfiguration
-> Request GetClassificationExportConfiguration
request = Service
-> GetClassificationExportConfiguration
-> Request GetClassificationExportConfiguration
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy GetClassificationExportConfiguration
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse GetClassificationExportConfiguration)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either
String (AWSResponse GetClassificationExportConfiguration))
-> Logger
-> Service
-> Proxy GetClassificationExportConfiguration
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse GetClassificationExportConfiguration)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe ClassificationExportConfiguration
-> Int -> GetClassificationExportConfigurationResponse
GetClassificationExportConfigurationResponse'
(Maybe ClassificationExportConfiguration
-> Int -> GetClassificationExportConfigurationResponse)
-> Either String (Maybe ClassificationExportConfiguration)
-> Either
String (Int -> GetClassificationExportConfigurationResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Key -> Either String (Maybe ClassificationExportConfiguration)
forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Core..?> Key
"configuration")
Either String (Int -> GetClassificationExportConfigurationResponse)
-> Either String Int
-> Either String GetClassificationExportConfigurationResponse
forall (f :: * -> *) a b. Applicative f => 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
GetClassificationExportConfiguration
instance
Prelude.NFData
GetClassificationExportConfiguration
instance
Core.ToHeaders
GetClassificationExportConfiguration
where
toHeaders :: GetClassificationExportConfiguration -> ResponseHeaders
toHeaders =
ResponseHeaders
-> GetClassificationExportConfiguration -> 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
GetClassificationExportConfiguration
where
toPath :: GetClassificationExportConfiguration -> ByteString
toPath =
ByteString -> GetClassificationExportConfiguration -> ByteString
forall a b. a -> b -> a
Prelude.const
ByteString
"/classification-export-configuration"
instance
Core.ToQuery
GetClassificationExportConfiguration
where
toQuery :: GetClassificationExportConfiguration -> QueryString
toQuery = QueryString -> GetClassificationExportConfiguration -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetClassificationExportConfigurationResponse = GetClassificationExportConfigurationResponse'
{
GetClassificationExportConfigurationResponse
-> Maybe ClassificationExportConfiguration
configuration :: Prelude.Maybe ClassificationExportConfiguration,
GetClassificationExportConfigurationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetClassificationExportConfigurationResponse
-> GetClassificationExportConfigurationResponse -> Bool
(GetClassificationExportConfigurationResponse
-> GetClassificationExportConfigurationResponse -> Bool)
-> (GetClassificationExportConfigurationResponse
-> GetClassificationExportConfigurationResponse -> Bool)
-> Eq GetClassificationExportConfigurationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetClassificationExportConfigurationResponse
-> GetClassificationExportConfigurationResponse -> Bool
$c/= :: GetClassificationExportConfigurationResponse
-> GetClassificationExportConfigurationResponse -> Bool
== :: GetClassificationExportConfigurationResponse
-> GetClassificationExportConfigurationResponse -> Bool
$c== :: GetClassificationExportConfigurationResponse
-> GetClassificationExportConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [GetClassificationExportConfigurationResponse]
ReadPrec GetClassificationExportConfigurationResponse
Int -> ReadS GetClassificationExportConfigurationResponse
ReadS [GetClassificationExportConfigurationResponse]
(Int -> ReadS GetClassificationExportConfigurationResponse)
-> ReadS [GetClassificationExportConfigurationResponse]
-> ReadPrec GetClassificationExportConfigurationResponse
-> ReadPrec [GetClassificationExportConfigurationResponse]
-> Read GetClassificationExportConfigurationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetClassificationExportConfigurationResponse]
$creadListPrec :: ReadPrec [GetClassificationExportConfigurationResponse]
readPrec :: ReadPrec GetClassificationExportConfigurationResponse
$creadPrec :: ReadPrec GetClassificationExportConfigurationResponse
readList :: ReadS [GetClassificationExportConfigurationResponse]
$creadList :: ReadS [GetClassificationExportConfigurationResponse]
readsPrec :: Int -> ReadS GetClassificationExportConfigurationResponse
$creadsPrec :: Int -> ReadS GetClassificationExportConfigurationResponse
Prelude.Read, Int -> GetClassificationExportConfigurationResponse -> ShowS
[GetClassificationExportConfigurationResponse] -> ShowS
GetClassificationExportConfigurationResponse -> String
(Int -> GetClassificationExportConfigurationResponse -> ShowS)
-> (GetClassificationExportConfigurationResponse -> String)
-> ([GetClassificationExportConfigurationResponse] -> ShowS)
-> Show GetClassificationExportConfigurationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetClassificationExportConfigurationResponse] -> ShowS
$cshowList :: [GetClassificationExportConfigurationResponse] -> ShowS
show :: GetClassificationExportConfigurationResponse -> String
$cshow :: GetClassificationExportConfigurationResponse -> String
showsPrec :: Int -> GetClassificationExportConfigurationResponse -> ShowS
$cshowsPrec :: Int -> GetClassificationExportConfigurationResponse -> ShowS
Prelude.Show, (forall x.
GetClassificationExportConfigurationResponse
-> Rep GetClassificationExportConfigurationResponse x)
-> (forall x.
Rep GetClassificationExportConfigurationResponse x
-> GetClassificationExportConfigurationResponse)
-> Generic GetClassificationExportConfigurationResponse
forall x.
Rep GetClassificationExportConfigurationResponse x
-> GetClassificationExportConfigurationResponse
forall x.
GetClassificationExportConfigurationResponse
-> Rep GetClassificationExportConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetClassificationExportConfigurationResponse x
-> GetClassificationExportConfigurationResponse
$cfrom :: forall x.
GetClassificationExportConfigurationResponse
-> Rep GetClassificationExportConfigurationResponse x
Prelude.Generic)
newGetClassificationExportConfigurationResponse ::
Prelude.Int ->
GetClassificationExportConfigurationResponse
newGetClassificationExportConfigurationResponse :: Int -> GetClassificationExportConfigurationResponse
newGetClassificationExportConfigurationResponse
Int
pHttpStatus_ =
GetClassificationExportConfigurationResponse' :: Maybe ClassificationExportConfiguration
-> Int -> GetClassificationExportConfigurationResponse
GetClassificationExportConfigurationResponse'
{ $sel:configuration:GetClassificationExportConfigurationResponse' :: Maybe ClassificationExportConfiguration
configuration =
Maybe ClassificationExportConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetClassificationExportConfigurationResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getClassificationExportConfigurationResponse_configuration :: Lens.Lens' GetClassificationExportConfigurationResponse (Prelude.Maybe ClassificationExportConfiguration)
getClassificationExportConfigurationResponse_configuration :: (Maybe ClassificationExportConfiguration
-> f (Maybe ClassificationExportConfiguration))
-> GetClassificationExportConfigurationResponse
-> f GetClassificationExportConfigurationResponse
getClassificationExportConfigurationResponse_configuration = (GetClassificationExportConfigurationResponse
-> Maybe ClassificationExportConfiguration)
-> (GetClassificationExportConfigurationResponse
-> Maybe ClassificationExportConfiguration
-> GetClassificationExportConfigurationResponse)
-> Lens
GetClassificationExportConfigurationResponse
GetClassificationExportConfigurationResponse
(Maybe ClassificationExportConfiguration)
(Maybe ClassificationExportConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetClassificationExportConfigurationResponse' {Maybe ClassificationExportConfiguration
configuration :: Maybe ClassificationExportConfiguration
$sel:configuration:GetClassificationExportConfigurationResponse' :: GetClassificationExportConfigurationResponse
-> Maybe ClassificationExportConfiguration
configuration} -> Maybe ClassificationExportConfiguration
configuration) (\s :: GetClassificationExportConfigurationResponse
s@GetClassificationExportConfigurationResponse' {} Maybe ClassificationExportConfiguration
a -> GetClassificationExportConfigurationResponse
s {$sel:configuration:GetClassificationExportConfigurationResponse' :: Maybe ClassificationExportConfiguration
configuration = Maybe ClassificationExportConfiguration
a} :: GetClassificationExportConfigurationResponse)
getClassificationExportConfigurationResponse_httpStatus :: Lens.Lens' GetClassificationExportConfigurationResponse Prelude.Int
getClassificationExportConfigurationResponse_httpStatus :: (Int -> f Int)
-> GetClassificationExportConfigurationResponse
-> f GetClassificationExportConfigurationResponse
getClassificationExportConfigurationResponse_httpStatus = (GetClassificationExportConfigurationResponse -> Int)
-> (GetClassificationExportConfigurationResponse
-> Int -> GetClassificationExportConfigurationResponse)
-> Lens
GetClassificationExportConfigurationResponse
GetClassificationExportConfigurationResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetClassificationExportConfigurationResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetClassificationExportConfigurationResponse' :: GetClassificationExportConfigurationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetClassificationExportConfigurationResponse
s@GetClassificationExportConfigurationResponse' {} Int
a -> GetClassificationExportConfigurationResponse
s {$sel:httpStatus:GetClassificationExportConfigurationResponse' :: Int
httpStatus = Int
a} :: GetClassificationExportConfigurationResponse)
instance
Prelude.NFData
GetClassificationExportConfigurationResponse