{-# 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.SecurityLake.GetDatalakeAutoEnable
(
GetDatalakeAutoEnable (..),
newGetDatalakeAutoEnable,
GetDatalakeAutoEnableResponse (..),
newGetDatalakeAutoEnableResponse,
getDatalakeAutoEnableResponse_httpStatus,
getDatalakeAutoEnableResponse_autoEnableNewAccounts,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SecurityLake.Types
data GetDatalakeAutoEnable = GetDatalakeAutoEnable'
{
}
deriving (GetDatalakeAutoEnable -> GetDatalakeAutoEnable -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDatalakeAutoEnable -> GetDatalakeAutoEnable -> Bool
$c/= :: GetDatalakeAutoEnable -> GetDatalakeAutoEnable -> Bool
== :: GetDatalakeAutoEnable -> GetDatalakeAutoEnable -> Bool
$c== :: GetDatalakeAutoEnable -> GetDatalakeAutoEnable -> Bool
Prelude.Eq, ReadPrec [GetDatalakeAutoEnable]
ReadPrec GetDatalakeAutoEnable
Int -> ReadS GetDatalakeAutoEnable
ReadS [GetDatalakeAutoEnable]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDatalakeAutoEnable]
$creadListPrec :: ReadPrec [GetDatalakeAutoEnable]
readPrec :: ReadPrec GetDatalakeAutoEnable
$creadPrec :: ReadPrec GetDatalakeAutoEnable
readList :: ReadS [GetDatalakeAutoEnable]
$creadList :: ReadS [GetDatalakeAutoEnable]
readsPrec :: Int -> ReadS GetDatalakeAutoEnable
$creadsPrec :: Int -> ReadS GetDatalakeAutoEnable
Prelude.Read, Int -> GetDatalakeAutoEnable -> ShowS
[GetDatalakeAutoEnable] -> ShowS
GetDatalakeAutoEnable -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDatalakeAutoEnable] -> ShowS
$cshowList :: [GetDatalakeAutoEnable] -> ShowS
show :: GetDatalakeAutoEnable -> String
$cshow :: GetDatalakeAutoEnable -> String
showsPrec :: Int -> GetDatalakeAutoEnable -> ShowS
$cshowsPrec :: Int -> GetDatalakeAutoEnable -> ShowS
Prelude.Show, forall x. Rep GetDatalakeAutoEnable x -> GetDatalakeAutoEnable
forall x. GetDatalakeAutoEnable -> Rep GetDatalakeAutoEnable x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetDatalakeAutoEnable x -> GetDatalakeAutoEnable
$cfrom :: forall x. GetDatalakeAutoEnable -> Rep GetDatalakeAutoEnable x
Prelude.Generic)
newGetDatalakeAutoEnable ::
GetDatalakeAutoEnable
newGetDatalakeAutoEnable :: GetDatalakeAutoEnable
newGetDatalakeAutoEnable = GetDatalakeAutoEnable
GetDatalakeAutoEnable'
instance Core.AWSRequest GetDatalakeAutoEnable where
type
AWSResponse GetDatalakeAutoEnable =
GetDatalakeAutoEnableResponse
request :: (Service -> Service)
-> GetDatalakeAutoEnable -> Request GetDatalakeAutoEnable
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 GetDatalakeAutoEnable
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetDatalakeAutoEnable)))
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 ->
Int
-> [AutoEnableNewRegionConfiguration]
-> GetDatalakeAutoEnableResponse
GetDatalakeAutoEnableResponse'
forall (f :: * -> *) a b. Functor 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))
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
"autoEnableNewAccounts"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable GetDatalakeAutoEnable where
hashWithSalt :: Int -> GetDatalakeAutoEnable -> Int
hashWithSalt Int
_salt GetDatalakeAutoEnable
_ =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ()
instance Prelude.NFData GetDatalakeAutoEnable where
rnf :: GetDatalakeAutoEnable -> ()
rnf GetDatalakeAutoEnable
_ = ()
instance Data.ToHeaders GetDatalakeAutoEnable where
toHeaders :: GetDatalakeAutoEnable -> 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 GetDatalakeAutoEnable where
toPath :: GetDatalakeAutoEnable -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/v1/datalake/autoenable"
instance Data.ToQuery GetDatalakeAutoEnable where
toQuery :: GetDatalakeAutoEnable -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data GetDatalakeAutoEnableResponse = GetDatalakeAutoEnableResponse'
{
GetDatalakeAutoEnableResponse -> Int
httpStatus :: Prelude.Int,
GetDatalakeAutoEnableResponse -> [AutoEnableNewRegionConfiguration]
autoEnableNewAccounts :: [AutoEnableNewRegionConfiguration]
}
deriving (GetDatalakeAutoEnableResponse
-> GetDatalakeAutoEnableResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDatalakeAutoEnableResponse
-> GetDatalakeAutoEnableResponse -> Bool
$c/= :: GetDatalakeAutoEnableResponse
-> GetDatalakeAutoEnableResponse -> Bool
== :: GetDatalakeAutoEnableResponse
-> GetDatalakeAutoEnableResponse -> Bool
$c== :: GetDatalakeAutoEnableResponse
-> GetDatalakeAutoEnableResponse -> Bool
Prelude.Eq, ReadPrec [GetDatalakeAutoEnableResponse]
ReadPrec GetDatalakeAutoEnableResponse
Int -> ReadS GetDatalakeAutoEnableResponse
ReadS [GetDatalakeAutoEnableResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDatalakeAutoEnableResponse]
$creadListPrec :: ReadPrec [GetDatalakeAutoEnableResponse]
readPrec :: ReadPrec GetDatalakeAutoEnableResponse
$creadPrec :: ReadPrec GetDatalakeAutoEnableResponse
readList :: ReadS [GetDatalakeAutoEnableResponse]
$creadList :: ReadS [GetDatalakeAutoEnableResponse]
readsPrec :: Int -> ReadS GetDatalakeAutoEnableResponse
$creadsPrec :: Int -> ReadS GetDatalakeAutoEnableResponse
Prelude.Read, Int -> GetDatalakeAutoEnableResponse -> ShowS
[GetDatalakeAutoEnableResponse] -> ShowS
GetDatalakeAutoEnableResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDatalakeAutoEnableResponse] -> ShowS
$cshowList :: [GetDatalakeAutoEnableResponse] -> ShowS
show :: GetDatalakeAutoEnableResponse -> String
$cshow :: GetDatalakeAutoEnableResponse -> String
showsPrec :: Int -> GetDatalakeAutoEnableResponse -> ShowS
$cshowsPrec :: Int -> GetDatalakeAutoEnableResponse -> ShowS
Prelude.Show, forall x.
Rep GetDatalakeAutoEnableResponse x
-> GetDatalakeAutoEnableResponse
forall x.
GetDatalakeAutoEnableResponse
-> Rep GetDatalakeAutoEnableResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetDatalakeAutoEnableResponse x
-> GetDatalakeAutoEnableResponse
$cfrom :: forall x.
GetDatalakeAutoEnableResponse
-> Rep GetDatalakeAutoEnableResponse x
Prelude.Generic)
newGetDatalakeAutoEnableResponse ::
Prelude.Int ->
GetDatalakeAutoEnableResponse
newGetDatalakeAutoEnableResponse :: Int -> GetDatalakeAutoEnableResponse
newGetDatalakeAutoEnableResponse Int
pHttpStatus_ =
GetDatalakeAutoEnableResponse'
{ $sel:httpStatus:GetDatalakeAutoEnableResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:autoEnableNewAccounts:GetDatalakeAutoEnableResponse' :: [AutoEnableNewRegionConfiguration]
autoEnableNewAccounts = forall a. Monoid a => a
Prelude.mempty
}
getDatalakeAutoEnableResponse_httpStatus :: Lens.Lens' GetDatalakeAutoEnableResponse Prelude.Int
getDatalakeAutoEnableResponse_httpStatus :: Lens' GetDatalakeAutoEnableResponse Int
getDatalakeAutoEnableResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDatalakeAutoEnableResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetDatalakeAutoEnableResponse' :: GetDatalakeAutoEnableResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetDatalakeAutoEnableResponse
s@GetDatalakeAutoEnableResponse' {} Int
a -> GetDatalakeAutoEnableResponse
s {$sel:httpStatus:GetDatalakeAutoEnableResponse' :: Int
httpStatus = Int
a} :: GetDatalakeAutoEnableResponse)
getDatalakeAutoEnableResponse_autoEnableNewAccounts :: Lens.Lens' GetDatalakeAutoEnableResponse [AutoEnableNewRegionConfiguration]
getDatalakeAutoEnableResponse_autoEnableNewAccounts :: Lens'
GetDatalakeAutoEnableResponse [AutoEnableNewRegionConfiguration]
getDatalakeAutoEnableResponse_autoEnableNewAccounts = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDatalakeAutoEnableResponse' {[AutoEnableNewRegionConfiguration]
autoEnableNewAccounts :: [AutoEnableNewRegionConfiguration]
$sel:autoEnableNewAccounts:GetDatalakeAutoEnableResponse' :: GetDatalakeAutoEnableResponse -> [AutoEnableNewRegionConfiguration]
autoEnableNewAccounts} -> [AutoEnableNewRegionConfiguration]
autoEnableNewAccounts) (\s :: GetDatalakeAutoEnableResponse
s@GetDatalakeAutoEnableResponse' {} [AutoEnableNewRegionConfiguration]
a -> GetDatalakeAutoEnableResponse
s {$sel:autoEnableNewAccounts:GetDatalakeAutoEnableResponse' :: [AutoEnableNewRegionConfiguration]
autoEnableNewAccounts = [AutoEnableNewRegionConfiguration]
a} :: GetDatalakeAutoEnableResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Prelude.NFData GetDatalakeAutoEnableResponse where
rnf :: GetDatalakeAutoEnableResponse -> ()
rnf GetDatalakeAutoEnableResponse' {Int
[AutoEnableNewRegionConfiguration]
autoEnableNewAccounts :: [AutoEnableNewRegionConfiguration]
httpStatus :: Int
$sel:autoEnableNewAccounts:GetDatalakeAutoEnableResponse' :: GetDatalakeAutoEnableResponse -> [AutoEnableNewRegionConfiguration]
$sel:httpStatus:GetDatalakeAutoEnableResponse' :: GetDatalakeAutoEnableResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [AutoEnableNewRegionConfiguration]
autoEnableNewAccounts