{-# 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.Glue.GetDataCatalogEncryptionSettings
(
GetDataCatalogEncryptionSettings (..),
newGetDataCatalogEncryptionSettings,
getDataCatalogEncryptionSettings_catalogId,
GetDataCatalogEncryptionSettingsResponse (..),
newGetDataCatalogEncryptionSettingsResponse,
getDataCatalogEncryptionSettingsResponse_dataCatalogEncryptionSettings,
getDataCatalogEncryptionSettingsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.Glue.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data GetDataCatalogEncryptionSettings = GetDataCatalogEncryptionSettings'
{
GetDataCatalogEncryptionSettings -> Maybe Text
catalogId :: Prelude.Maybe Prelude.Text
}
deriving (GetDataCatalogEncryptionSettings
-> GetDataCatalogEncryptionSettings -> Bool
(GetDataCatalogEncryptionSettings
-> GetDataCatalogEncryptionSettings -> Bool)
-> (GetDataCatalogEncryptionSettings
-> GetDataCatalogEncryptionSettings -> Bool)
-> Eq GetDataCatalogEncryptionSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDataCatalogEncryptionSettings
-> GetDataCatalogEncryptionSettings -> Bool
$c/= :: GetDataCatalogEncryptionSettings
-> GetDataCatalogEncryptionSettings -> Bool
== :: GetDataCatalogEncryptionSettings
-> GetDataCatalogEncryptionSettings -> Bool
$c== :: GetDataCatalogEncryptionSettings
-> GetDataCatalogEncryptionSettings -> Bool
Prelude.Eq, ReadPrec [GetDataCatalogEncryptionSettings]
ReadPrec GetDataCatalogEncryptionSettings
Int -> ReadS GetDataCatalogEncryptionSettings
ReadS [GetDataCatalogEncryptionSettings]
(Int -> ReadS GetDataCatalogEncryptionSettings)
-> ReadS [GetDataCatalogEncryptionSettings]
-> ReadPrec GetDataCatalogEncryptionSettings
-> ReadPrec [GetDataCatalogEncryptionSettings]
-> Read GetDataCatalogEncryptionSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDataCatalogEncryptionSettings]
$creadListPrec :: ReadPrec [GetDataCatalogEncryptionSettings]
readPrec :: ReadPrec GetDataCatalogEncryptionSettings
$creadPrec :: ReadPrec GetDataCatalogEncryptionSettings
readList :: ReadS [GetDataCatalogEncryptionSettings]
$creadList :: ReadS [GetDataCatalogEncryptionSettings]
readsPrec :: Int -> ReadS GetDataCatalogEncryptionSettings
$creadsPrec :: Int -> ReadS GetDataCatalogEncryptionSettings
Prelude.Read, Int -> GetDataCatalogEncryptionSettings -> ShowS
[GetDataCatalogEncryptionSettings] -> ShowS
GetDataCatalogEncryptionSettings -> String
(Int -> GetDataCatalogEncryptionSettings -> ShowS)
-> (GetDataCatalogEncryptionSettings -> String)
-> ([GetDataCatalogEncryptionSettings] -> ShowS)
-> Show GetDataCatalogEncryptionSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDataCatalogEncryptionSettings] -> ShowS
$cshowList :: [GetDataCatalogEncryptionSettings] -> ShowS
show :: GetDataCatalogEncryptionSettings -> String
$cshow :: GetDataCatalogEncryptionSettings -> String
showsPrec :: Int -> GetDataCatalogEncryptionSettings -> ShowS
$cshowsPrec :: Int -> GetDataCatalogEncryptionSettings -> ShowS
Prelude.Show, (forall x.
GetDataCatalogEncryptionSettings
-> Rep GetDataCatalogEncryptionSettings x)
-> (forall x.
Rep GetDataCatalogEncryptionSettings x
-> GetDataCatalogEncryptionSettings)
-> Generic GetDataCatalogEncryptionSettings
forall x.
Rep GetDataCatalogEncryptionSettings x
-> GetDataCatalogEncryptionSettings
forall x.
GetDataCatalogEncryptionSettings
-> Rep GetDataCatalogEncryptionSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetDataCatalogEncryptionSettings x
-> GetDataCatalogEncryptionSettings
$cfrom :: forall x.
GetDataCatalogEncryptionSettings
-> Rep GetDataCatalogEncryptionSettings x
Prelude.Generic)
newGetDataCatalogEncryptionSettings ::
GetDataCatalogEncryptionSettings
newGetDataCatalogEncryptionSettings :: GetDataCatalogEncryptionSettings
newGetDataCatalogEncryptionSettings =
GetDataCatalogEncryptionSettings' :: Maybe Text -> GetDataCatalogEncryptionSettings
GetDataCatalogEncryptionSettings'
{ $sel:catalogId:GetDataCatalogEncryptionSettings' :: Maybe Text
catalogId =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
getDataCatalogEncryptionSettings_catalogId :: Lens.Lens' GetDataCatalogEncryptionSettings (Prelude.Maybe Prelude.Text)
getDataCatalogEncryptionSettings_catalogId :: (Maybe Text -> f (Maybe Text))
-> GetDataCatalogEncryptionSettings
-> f GetDataCatalogEncryptionSettings
getDataCatalogEncryptionSettings_catalogId = (GetDataCatalogEncryptionSettings -> Maybe Text)
-> (GetDataCatalogEncryptionSettings
-> Maybe Text -> GetDataCatalogEncryptionSettings)
-> Lens
GetDataCatalogEncryptionSettings
GetDataCatalogEncryptionSettings
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataCatalogEncryptionSettings' {Maybe Text
catalogId :: Maybe Text
$sel:catalogId:GetDataCatalogEncryptionSettings' :: GetDataCatalogEncryptionSettings -> Maybe Text
catalogId} -> Maybe Text
catalogId) (\s :: GetDataCatalogEncryptionSettings
s@GetDataCatalogEncryptionSettings' {} Maybe Text
a -> GetDataCatalogEncryptionSettings
s {$sel:catalogId:GetDataCatalogEncryptionSettings' :: Maybe Text
catalogId = Maybe Text
a} :: GetDataCatalogEncryptionSettings)
instance
Core.AWSRequest
GetDataCatalogEncryptionSettings
where
type
AWSResponse GetDataCatalogEncryptionSettings =
GetDataCatalogEncryptionSettingsResponse
request :: GetDataCatalogEncryptionSettings
-> Request GetDataCatalogEncryptionSettings
request = Service
-> GetDataCatalogEncryptionSettings
-> Request GetDataCatalogEncryptionSettings
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy GetDataCatalogEncryptionSettings
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse GetDataCatalogEncryptionSettings)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetDataCatalogEncryptionSettings))
-> Logger
-> Service
-> Proxy GetDataCatalogEncryptionSettings
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse GetDataCatalogEncryptionSettings)))
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 DataCatalogEncryptionSettings
-> Int -> GetDataCatalogEncryptionSettingsResponse
GetDataCatalogEncryptionSettingsResponse'
(Maybe DataCatalogEncryptionSettings
-> Int -> GetDataCatalogEncryptionSettingsResponse)
-> Either String (Maybe DataCatalogEncryptionSettings)
-> Either String (Int -> GetDataCatalogEncryptionSettingsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text -> Either String (Maybe DataCatalogEncryptionSettings)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DataCatalogEncryptionSettings")
Either String (Int -> GetDataCatalogEncryptionSettingsResponse)
-> Either String Int
-> Either String GetDataCatalogEncryptionSettingsResponse
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
GetDataCatalogEncryptionSettings
instance
Prelude.NFData
GetDataCatalogEncryptionSettings
instance
Core.ToHeaders
GetDataCatalogEncryptionSettings
where
toHeaders :: GetDataCatalogEncryptionSettings -> ResponseHeaders
toHeaders =
ResponseHeaders
-> GetDataCatalogEncryptionSettings -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AWSGlue.GetDataCatalogEncryptionSettings" ::
Prelude.ByteString
),
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.ToJSON GetDataCatalogEncryptionSettings where
toJSON :: GetDataCatalogEncryptionSettings -> Value
toJSON GetDataCatalogEncryptionSettings' {Maybe Text
catalogId :: Maybe Text
$sel:catalogId:GetDataCatalogEncryptionSettings' :: GetDataCatalogEncryptionSettings -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Text
"CatalogId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
catalogId]
)
instance Core.ToPath GetDataCatalogEncryptionSettings where
toPath :: GetDataCatalogEncryptionSettings -> ByteString
toPath = ByteString -> GetDataCatalogEncryptionSettings -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
GetDataCatalogEncryptionSettings
where
toQuery :: GetDataCatalogEncryptionSettings -> QueryString
toQuery = QueryString -> GetDataCatalogEncryptionSettings -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetDataCatalogEncryptionSettingsResponse = GetDataCatalogEncryptionSettingsResponse'
{
GetDataCatalogEncryptionSettingsResponse
-> Maybe DataCatalogEncryptionSettings
dataCatalogEncryptionSettings :: Prelude.Maybe DataCatalogEncryptionSettings,
GetDataCatalogEncryptionSettingsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetDataCatalogEncryptionSettingsResponse
-> GetDataCatalogEncryptionSettingsResponse -> Bool
(GetDataCatalogEncryptionSettingsResponse
-> GetDataCatalogEncryptionSettingsResponse -> Bool)
-> (GetDataCatalogEncryptionSettingsResponse
-> GetDataCatalogEncryptionSettingsResponse -> Bool)
-> Eq GetDataCatalogEncryptionSettingsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDataCatalogEncryptionSettingsResponse
-> GetDataCatalogEncryptionSettingsResponse -> Bool
$c/= :: GetDataCatalogEncryptionSettingsResponse
-> GetDataCatalogEncryptionSettingsResponse -> Bool
== :: GetDataCatalogEncryptionSettingsResponse
-> GetDataCatalogEncryptionSettingsResponse -> Bool
$c== :: GetDataCatalogEncryptionSettingsResponse
-> GetDataCatalogEncryptionSettingsResponse -> Bool
Prelude.Eq, ReadPrec [GetDataCatalogEncryptionSettingsResponse]
ReadPrec GetDataCatalogEncryptionSettingsResponse
Int -> ReadS GetDataCatalogEncryptionSettingsResponse
ReadS [GetDataCatalogEncryptionSettingsResponse]
(Int -> ReadS GetDataCatalogEncryptionSettingsResponse)
-> ReadS [GetDataCatalogEncryptionSettingsResponse]
-> ReadPrec GetDataCatalogEncryptionSettingsResponse
-> ReadPrec [GetDataCatalogEncryptionSettingsResponse]
-> Read GetDataCatalogEncryptionSettingsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDataCatalogEncryptionSettingsResponse]
$creadListPrec :: ReadPrec [GetDataCatalogEncryptionSettingsResponse]
readPrec :: ReadPrec GetDataCatalogEncryptionSettingsResponse
$creadPrec :: ReadPrec GetDataCatalogEncryptionSettingsResponse
readList :: ReadS [GetDataCatalogEncryptionSettingsResponse]
$creadList :: ReadS [GetDataCatalogEncryptionSettingsResponse]
readsPrec :: Int -> ReadS GetDataCatalogEncryptionSettingsResponse
$creadsPrec :: Int -> ReadS GetDataCatalogEncryptionSettingsResponse
Prelude.Read, Int -> GetDataCatalogEncryptionSettingsResponse -> ShowS
[GetDataCatalogEncryptionSettingsResponse] -> ShowS
GetDataCatalogEncryptionSettingsResponse -> String
(Int -> GetDataCatalogEncryptionSettingsResponse -> ShowS)
-> (GetDataCatalogEncryptionSettingsResponse -> String)
-> ([GetDataCatalogEncryptionSettingsResponse] -> ShowS)
-> Show GetDataCatalogEncryptionSettingsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDataCatalogEncryptionSettingsResponse] -> ShowS
$cshowList :: [GetDataCatalogEncryptionSettingsResponse] -> ShowS
show :: GetDataCatalogEncryptionSettingsResponse -> String
$cshow :: GetDataCatalogEncryptionSettingsResponse -> String
showsPrec :: Int -> GetDataCatalogEncryptionSettingsResponse -> ShowS
$cshowsPrec :: Int -> GetDataCatalogEncryptionSettingsResponse -> ShowS
Prelude.Show, (forall x.
GetDataCatalogEncryptionSettingsResponse
-> Rep GetDataCatalogEncryptionSettingsResponse x)
-> (forall x.
Rep GetDataCatalogEncryptionSettingsResponse x
-> GetDataCatalogEncryptionSettingsResponse)
-> Generic GetDataCatalogEncryptionSettingsResponse
forall x.
Rep GetDataCatalogEncryptionSettingsResponse x
-> GetDataCatalogEncryptionSettingsResponse
forall x.
GetDataCatalogEncryptionSettingsResponse
-> Rep GetDataCatalogEncryptionSettingsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetDataCatalogEncryptionSettingsResponse x
-> GetDataCatalogEncryptionSettingsResponse
$cfrom :: forall x.
GetDataCatalogEncryptionSettingsResponse
-> Rep GetDataCatalogEncryptionSettingsResponse x
Prelude.Generic)
newGetDataCatalogEncryptionSettingsResponse ::
Prelude.Int ->
GetDataCatalogEncryptionSettingsResponse
newGetDataCatalogEncryptionSettingsResponse :: Int -> GetDataCatalogEncryptionSettingsResponse
newGetDataCatalogEncryptionSettingsResponse
Int
pHttpStatus_ =
GetDataCatalogEncryptionSettingsResponse' :: Maybe DataCatalogEncryptionSettings
-> Int -> GetDataCatalogEncryptionSettingsResponse
GetDataCatalogEncryptionSettingsResponse'
{ $sel:dataCatalogEncryptionSettings:GetDataCatalogEncryptionSettingsResponse' :: Maybe DataCatalogEncryptionSettings
dataCatalogEncryptionSettings =
Maybe DataCatalogEncryptionSettings
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetDataCatalogEncryptionSettingsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getDataCatalogEncryptionSettingsResponse_dataCatalogEncryptionSettings :: Lens.Lens' GetDataCatalogEncryptionSettingsResponse (Prelude.Maybe DataCatalogEncryptionSettings)
getDataCatalogEncryptionSettingsResponse_dataCatalogEncryptionSettings :: (Maybe DataCatalogEncryptionSettings
-> f (Maybe DataCatalogEncryptionSettings))
-> GetDataCatalogEncryptionSettingsResponse
-> f GetDataCatalogEncryptionSettingsResponse
getDataCatalogEncryptionSettingsResponse_dataCatalogEncryptionSettings = (GetDataCatalogEncryptionSettingsResponse
-> Maybe DataCatalogEncryptionSettings)
-> (GetDataCatalogEncryptionSettingsResponse
-> Maybe DataCatalogEncryptionSettings
-> GetDataCatalogEncryptionSettingsResponse)
-> Lens
GetDataCatalogEncryptionSettingsResponse
GetDataCatalogEncryptionSettingsResponse
(Maybe DataCatalogEncryptionSettings)
(Maybe DataCatalogEncryptionSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataCatalogEncryptionSettingsResponse' {Maybe DataCatalogEncryptionSettings
dataCatalogEncryptionSettings :: Maybe DataCatalogEncryptionSettings
$sel:dataCatalogEncryptionSettings:GetDataCatalogEncryptionSettingsResponse' :: GetDataCatalogEncryptionSettingsResponse
-> Maybe DataCatalogEncryptionSettings
dataCatalogEncryptionSettings} -> Maybe DataCatalogEncryptionSettings
dataCatalogEncryptionSettings) (\s :: GetDataCatalogEncryptionSettingsResponse
s@GetDataCatalogEncryptionSettingsResponse' {} Maybe DataCatalogEncryptionSettings
a -> GetDataCatalogEncryptionSettingsResponse
s {$sel:dataCatalogEncryptionSettings:GetDataCatalogEncryptionSettingsResponse' :: Maybe DataCatalogEncryptionSettings
dataCatalogEncryptionSettings = Maybe DataCatalogEncryptionSettings
a} :: GetDataCatalogEncryptionSettingsResponse)
getDataCatalogEncryptionSettingsResponse_httpStatus :: Lens.Lens' GetDataCatalogEncryptionSettingsResponse Prelude.Int
getDataCatalogEncryptionSettingsResponse_httpStatus :: (Int -> f Int)
-> GetDataCatalogEncryptionSettingsResponse
-> f GetDataCatalogEncryptionSettingsResponse
getDataCatalogEncryptionSettingsResponse_httpStatus = (GetDataCatalogEncryptionSettingsResponse -> Int)
-> (GetDataCatalogEncryptionSettingsResponse
-> Int -> GetDataCatalogEncryptionSettingsResponse)
-> Lens
GetDataCatalogEncryptionSettingsResponse
GetDataCatalogEncryptionSettingsResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDataCatalogEncryptionSettingsResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetDataCatalogEncryptionSettingsResponse' :: GetDataCatalogEncryptionSettingsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetDataCatalogEncryptionSettingsResponse
s@GetDataCatalogEncryptionSettingsResponse' {} Int
a -> GetDataCatalogEncryptionSettingsResponse
s {$sel:httpStatus:GetDataCatalogEncryptionSettingsResponse' :: Int
httpStatus = Int
a} :: GetDataCatalogEncryptionSettingsResponse)
instance
Prelude.NFData
GetDataCatalogEncryptionSettingsResponse