{-# 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.EMR.GetBlockPublicAccessConfiguration
(
GetBlockPublicAccessConfiguration (..),
newGetBlockPublicAccessConfiguration,
GetBlockPublicAccessConfigurationResponse (..),
newGetBlockPublicAccessConfigurationResponse,
getBlockPublicAccessConfigurationResponse_httpStatus,
getBlockPublicAccessConfigurationResponse_blockPublicAccessConfiguration,
getBlockPublicAccessConfigurationResponse_blockPublicAccessConfigurationMetadata,
)
where
import qualified Amazonka.Core as Core
import Amazonka.EMR.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 GetBlockPublicAccessConfiguration = GetBlockPublicAccessConfiguration'
{
}
deriving (GetBlockPublicAccessConfiguration
-> GetBlockPublicAccessConfiguration -> Bool
(GetBlockPublicAccessConfiguration
-> GetBlockPublicAccessConfiguration -> Bool)
-> (GetBlockPublicAccessConfiguration
-> GetBlockPublicAccessConfiguration -> Bool)
-> Eq GetBlockPublicAccessConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetBlockPublicAccessConfiguration
-> GetBlockPublicAccessConfiguration -> Bool
$c/= :: GetBlockPublicAccessConfiguration
-> GetBlockPublicAccessConfiguration -> Bool
== :: GetBlockPublicAccessConfiguration
-> GetBlockPublicAccessConfiguration -> Bool
$c== :: GetBlockPublicAccessConfiguration
-> GetBlockPublicAccessConfiguration -> Bool
Prelude.Eq, ReadPrec [GetBlockPublicAccessConfiguration]
ReadPrec GetBlockPublicAccessConfiguration
Int -> ReadS GetBlockPublicAccessConfiguration
ReadS [GetBlockPublicAccessConfiguration]
(Int -> ReadS GetBlockPublicAccessConfiguration)
-> ReadS [GetBlockPublicAccessConfiguration]
-> ReadPrec GetBlockPublicAccessConfiguration
-> ReadPrec [GetBlockPublicAccessConfiguration]
-> Read GetBlockPublicAccessConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetBlockPublicAccessConfiguration]
$creadListPrec :: ReadPrec [GetBlockPublicAccessConfiguration]
readPrec :: ReadPrec GetBlockPublicAccessConfiguration
$creadPrec :: ReadPrec GetBlockPublicAccessConfiguration
readList :: ReadS [GetBlockPublicAccessConfiguration]
$creadList :: ReadS [GetBlockPublicAccessConfiguration]
readsPrec :: Int -> ReadS GetBlockPublicAccessConfiguration
$creadsPrec :: Int -> ReadS GetBlockPublicAccessConfiguration
Prelude.Read, Int -> GetBlockPublicAccessConfiguration -> ShowS
[GetBlockPublicAccessConfiguration] -> ShowS
GetBlockPublicAccessConfiguration -> String
(Int -> GetBlockPublicAccessConfiguration -> ShowS)
-> (GetBlockPublicAccessConfiguration -> String)
-> ([GetBlockPublicAccessConfiguration] -> ShowS)
-> Show GetBlockPublicAccessConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetBlockPublicAccessConfiguration] -> ShowS
$cshowList :: [GetBlockPublicAccessConfiguration] -> ShowS
show :: GetBlockPublicAccessConfiguration -> String
$cshow :: GetBlockPublicAccessConfiguration -> String
showsPrec :: Int -> GetBlockPublicAccessConfiguration -> ShowS
$cshowsPrec :: Int -> GetBlockPublicAccessConfiguration -> ShowS
Prelude.Show, (forall x.
GetBlockPublicAccessConfiguration
-> Rep GetBlockPublicAccessConfiguration x)
-> (forall x.
Rep GetBlockPublicAccessConfiguration x
-> GetBlockPublicAccessConfiguration)
-> Generic GetBlockPublicAccessConfiguration
forall x.
Rep GetBlockPublicAccessConfiguration x
-> GetBlockPublicAccessConfiguration
forall x.
GetBlockPublicAccessConfiguration
-> Rep GetBlockPublicAccessConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetBlockPublicAccessConfiguration x
-> GetBlockPublicAccessConfiguration
$cfrom :: forall x.
GetBlockPublicAccessConfiguration
-> Rep GetBlockPublicAccessConfiguration x
Prelude.Generic)
newGetBlockPublicAccessConfiguration ::
GetBlockPublicAccessConfiguration
newGetBlockPublicAccessConfiguration :: GetBlockPublicAccessConfiguration
newGetBlockPublicAccessConfiguration =
GetBlockPublicAccessConfiguration
GetBlockPublicAccessConfiguration'
instance
Core.AWSRequest
GetBlockPublicAccessConfiguration
where
type
AWSResponse GetBlockPublicAccessConfiguration =
GetBlockPublicAccessConfigurationResponse
request :: GetBlockPublicAccessConfiguration
-> Request GetBlockPublicAccessConfiguration
request = Service
-> GetBlockPublicAccessConfiguration
-> Request GetBlockPublicAccessConfiguration
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy GetBlockPublicAccessConfiguration
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse GetBlockPublicAccessConfiguration)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetBlockPublicAccessConfiguration))
-> Logger
-> Service
-> Proxy GetBlockPublicAccessConfiguration
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse GetBlockPublicAccessConfiguration)))
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 ->
Int
-> BlockPublicAccessConfiguration
-> BlockPublicAccessConfigurationMetadata
-> GetBlockPublicAccessConfigurationResponse
GetBlockPublicAccessConfigurationResponse'
(Int
-> BlockPublicAccessConfiguration
-> BlockPublicAccessConfigurationMetadata
-> GetBlockPublicAccessConfigurationResponse)
-> Either String Int
-> Either
String
(BlockPublicAccessConfiguration
-> BlockPublicAccessConfigurationMetadata
-> GetBlockPublicAccessConfigurationResponse)
forall (f :: * -> *) a b. Functor 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))
Either
String
(BlockPublicAccessConfiguration
-> BlockPublicAccessConfigurationMetadata
-> GetBlockPublicAccessConfigurationResponse)
-> Either String BlockPublicAccessConfiguration
-> Either
String
(BlockPublicAccessConfigurationMetadata
-> GetBlockPublicAccessConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Key -> Either String BlockPublicAccessConfiguration
forall a. FromJSON a => Object -> Key -> Either String a
Core..:> Key
"BlockPublicAccessConfiguration")
Either
String
(BlockPublicAccessConfigurationMetadata
-> GetBlockPublicAccessConfigurationResponse)
-> Either String BlockPublicAccessConfigurationMetadata
-> Either String GetBlockPublicAccessConfigurationResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
Object
-> Key -> Either String BlockPublicAccessConfigurationMetadata
forall a. FromJSON a => Object -> Key -> Either String a
Core..:> Key
"BlockPublicAccessConfigurationMetadata"
)
)
instance
Prelude.Hashable
GetBlockPublicAccessConfiguration
instance
Prelude.NFData
GetBlockPublicAccessConfiguration
instance
Core.ToHeaders
GetBlockPublicAccessConfiguration
where
toHeaders :: GetBlockPublicAccessConfiguration -> ResponseHeaders
toHeaders =
ResponseHeaders
-> GetBlockPublicAccessConfiguration -> 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
"ElasticMapReduce.GetBlockPublicAccessConfiguration" ::
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
GetBlockPublicAccessConfiguration
where
toJSON :: GetBlockPublicAccessConfiguration -> Value
toJSON = Value -> GetBlockPublicAccessConfiguration -> Value
forall a b. a -> b -> a
Prelude.const (Object -> Value
Core.Object Object
forall a. Monoid a => a
Prelude.mempty)
instance
Core.ToPath
GetBlockPublicAccessConfiguration
where
toPath :: GetBlockPublicAccessConfiguration -> ByteString
toPath = ByteString -> GetBlockPublicAccessConfiguration -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
GetBlockPublicAccessConfiguration
where
toQuery :: GetBlockPublicAccessConfiguration -> QueryString
toQuery = QueryString -> GetBlockPublicAccessConfiguration -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetBlockPublicAccessConfigurationResponse = GetBlockPublicAccessConfigurationResponse'
{
GetBlockPublicAccessConfigurationResponse -> Int
httpStatus :: Prelude.Int,
GetBlockPublicAccessConfigurationResponse
-> BlockPublicAccessConfiguration
blockPublicAccessConfiguration :: BlockPublicAccessConfiguration,
GetBlockPublicAccessConfigurationResponse
-> BlockPublicAccessConfigurationMetadata
blockPublicAccessConfigurationMetadata :: BlockPublicAccessConfigurationMetadata
}
deriving (GetBlockPublicAccessConfigurationResponse
-> GetBlockPublicAccessConfigurationResponse -> Bool
(GetBlockPublicAccessConfigurationResponse
-> GetBlockPublicAccessConfigurationResponse -> Bool)
-> (GetBlockPublicAccessConfigurationResponse
-> GetBlockPublicAccessConfigurationResponse -> Bool)
-> Eq GetBlockPublicAccessConfigurationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetBlockPublicAccessConfigurationResponse
-> GetBlockPublicAccessConfigurationResponse -> Bool
$c/= :: GetBlockPublicAccessConfigurationResponse
-> GetBlockPublicAccessConfigurationResponse -> Bool
== :: GetBlockPublicAccessConfigurationResponse
-> GetBlockPublicAccessConfigurationResponse -> Bool
$c== :: GetBlockPublicAccessConfigurationResponse
-> GetBlockPublicAccessConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [GetBlockPublicAccessConfigurationResponse]
ReadPrec GetBlockPublicAccessConfigurationResponse
Int -> ReadS GetBlockPublicAccessConfigurationResponse
ReadS [GetBlockPublicAccessConfigurationResponse]
(Int -> ReadS GetBlockPublicAccessConfigurationResponse)
-> ReadS [GetBlockPublicAccessConfigurationResponse]
-> ReadPrec GetBlockPublicAccessConfigurationResponse
-> ReadPrec [GetBlockPublicAccessConfigurationResponse]
-> Read GetBlockPublicAccessConfigurationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetBlockPublicAccessConfigurationResponse]
$creadListPrec :: ReadPrec [GetBlockPublicAccessConfigurationResponse]
readPrec :: ReadPrec GetBlockPublicAccessConfigurationResponse
$creadPrec :: ReadPrec GetBlockPublicAccessConfigurationResponse
readList :: ReadS [GetBlockPublicAccessConfigurationResponse]
$creadList :: ReadS [GetBlockPublicAccessConfigurationResponse]
readsPrec :: Int -> ReadS GetBlockPublicAccessConfigurationResponse
$creadsPrec :: Int -> ReadS GetBlockPublicAccessConfigurationResponse
Prelude.Read, Int -> GetBlockPublicAccessConfigurationResponse -> ShowS
[GetBlockPublicAccessConfigurationResponse] -> ShowS
GetBlockPublicAccessConfigurationResponse -> String
(Int -> GetBlockPublicAccessConfigurationResponse -> ShowS)
-> (GetBlockPublicAccessConfigurationResponse -> String)
-> ([GetBlockPublicAccessConfigurationResponse] -> ShowS)
-> Show GetBlockPublicAccessConfigurationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetBlockPublicAccessConfigurationResponse] -> ShowS
$cshowList :: [GetBlockPublicAccessConfigurationResponse] -> ShowS
show :: GetBlockPublicAccessConfigurationResponse -> String
$cshow :: GetBlockPublicAccessConfigurationResponse -> String
showsPrec :: Int -> GetBlockPublicAccessConfigurationResponse -> ShowS
$cshowsPrec :: Int -> GetBlockPublicAccessConfigurationResponse -> ShowS
Prelude.Show, (forall x.
GetBlockPublicAccessConfigurationResponse
-> Rep GetBlockPublicAccessConfigurationResponse x)
-> (forall x.
Rep GetBlockPublicAccessConfigurationResponse x
-> GetBlockPublicAccessConfigurationResponse)
-> Generic GetBlockPublicAccessConfigurationResponse
forall x.
Rep GetBlockPublicAccessConfigurationResponse x
-> GetBlockPublicAccessConfigurationResponse
forall x.
GetBlockPublicAccessConfigurationResponse
-> Rep GetBlockPublicAccessConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetBlockPublicAccessConfigurationResponse x
-> GetBlockPublicAccessConfigurationResponse
$cfrom :: forall x.
GetBlockPublicAccessConfigurationResponse
-> Rep GetBlockPublicAccessConfigurationResponse x
Prelude.Generic)
newGetBlockPublicAccessConfigurationResponse ::
Prelude.Int ->
BlockPublicAccessConfiguration ->
BlockPublicAccessConfigurationMetadata ->
GetBlockPublicAccessConfigurationResponse
newGetBlockPublicAccessConfigurationResponse :: Int
-> BlockPublicAccessConfiguration
-> BlockPublicAccessConfigurationMetadata
-> GetBlockPublicAccessConfigurationResponse
newGetBlockPublicAccessConfigurationResponse
Int
pHttpStatus_
BlockPublicAccessConfiguration
pBlockPublicAccessConfiguration_
BlockPublicAccessConfigurationMetadata
pBlockPublicAccessConfigurationMetadata_ =
GetBlockPublicAccessConfigurationResponse' :: Int
-> BlockPublicAccessConfiguration
-> BlockPublicAccessConfigurationMetadata
-> GetBlockPublicAccessConfigurationResponse
GetBlockPublicAccessConfigurationResponse'
{ $sel:httpStatus:GetBlockPublicAccessConfigurationResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:blockPublicAccessConfiguration:GetBlockPublicAccessConfigurationResponse' :: BlockPublicAccessConfiguration
blockPublicAccessConfiguration =
BlockPublicAccessConfiguration
pBlockPublicAccessConfiguration_,
$sel:blockPublicAccessConfigurationMetadata:GetBlockPublicAccessConfigurationResponse' :: BlockPublicAccessConfigurationMetadata
blockPublicAccessConfigurationMetadata =
BlockPublicAccessConfigurationMetadata
pBlockPublicAccessConfigurationMetadata_
}
getBlockPublicAccessConfigurationResponse_httpStatus :: Lens.Lens' GetBlockPublicAccessConfigurationResponse Prelude.Int
getBlockPublicAccessConfigurationResponse_httpStatus :: (Int -> f Int)
-> GetBlockPublicAccessConfigurationResponse
-> f GetBlockPublicAccessConfigurationResponse
getBlockPublicAccessConfigurationResponse_httpStatus = (GetBlockPublicAccessConfigurationResponse -> Int)
-> (GetBlockPublicAccessConfigurationResponse
-> Int -> GetBlockPublicAccessConfigurationResponse)
-> Lens
GetBlockPublicAccessConfigurationResponse
GetBlockPublicAccessConfigurationResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBlockPublicAccessConfigurationResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetBlockPublicAccessConfigurationResponse' :: GetBlockPublicAccessConfigurationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetBlockPublicAccessConfigurationResponse
s@GetBlockPublicAccessConfigurationResponse' {} Int
a -> GetBlockPublicAccessConfigurationResponse
s {$sel:httpStatus:GetBlockPublicAccessConfigurationResponse' :: Int
httpStatus = Int
a} :: GetBlockPublicAccessConfigurationResponse)
getBlockPublicAccessConfigurationResponse_blockPublicAccessConfiguration :: Lens.Lens' GetBlockPublicAccessConfigurationResponse BlockPublicAccessConfiguration
getBlockPublicAccessConfigurationResponse_blockPublicAccessConfiguration :: (BlockPublicAccessConfiguration
-> f BlockPublicAccessConfiguration)
-> GetBlockPublicAccessConfigurationResponse
-> f GetBlockPublicAccessConfigurationResponse
getBlockPublicAccessConfigurationResponse_blockPublicAccessConfiguration = (GetBlockPublicAccessConfigurationResponse
-> BlockPublicAccessConfiguration)
-> (GetBlockPublicAccessConfigurationResponse
-> BlockPublicAccessConfiguration
-> GetBlockPublicAccessConfigurationResponse)
-> Lens
GetBlockPublicAccessConfigurationResponse
GetBlockPublicAccessConfigurationResponse
BlockPublicAccessConfiguration
BlockPublicAccessConfiguration
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBlockPublicAccessConfigurationResponse' {BlockPublicAccessConfiguration
blockPublicAccessConfiguration :: BlockPublicAccessConfiguration
$sel:blockPublicAccessConfiguration:GetBlockPublicAccessConfigurationResponse' :: GetBlockPublicAccessConfigurationResponse
-> BlockPublicAccessConfiguration
blockPublicAccessConfiguration} -> BlockPublicAccessConfiguration
blockPublicAccessConfiguration) (\s :: GetBlockPublicAccessConfigurationResponse
s@GetBlockPublicAccessConfigurationResponse' {} BlockPublicAccessConfiguration
a -> GetBlockPublicAccessConfigurationResponse
s {$sel:blockPublicAccessConfiguration:GetBlockPublicAccessConfigurationResponse' :: BlockPublicAccessConfiguration
blockPublicAccessConfiguration = BlockPublicAccessConfiguration
a} :: GetBlockPublicAccessConfigurationResponse)
getBlockPublicAccessConfigurationResponse_blockPublicAccessConfigurationMetadata :: Lens.Lens' GetBlockPublicAccessConfigurationResponse BlockPublicAccessConfigurationMetadata
getBlockPublicAccessConfigurationResponse_blockPublicAccessConfigurationMetadata :: (BlockPublicAccessConfigurationMetadata
-> f BlockPublicAccessConfigurationMetadata)
-> GetBlockPublicAccessConfigurationResponse
-> f GetBlockPublicAccessConfigurationResponse
getBlockPublicAccessConfigurationResponse_blockPublicAccessConfigurationMetadata = (GetBlockPublicAccessConfigurationResponse
-> BlockPublicAccessConfigurationMetadata)
-> (GetBlockPublicAccessConfigurationResponse
-> BlockPublicAccessConfigurationMetadata
-> GetBlockPublicAccessConfigurationResponse)
-> Lens
GetBlockPublicAccessConfigurationResponse
GetBlockPublicAccessConfigurationResponse
BlockPublicAccessConfigurationMetadata
BlockPublicAccessConfigurationMetadata
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBlockPublicAccessConfigurationResponse' {BlockPublicAccessConfigurationMetadata
blockPublicAccessConfigurationMetadata :: BlockPublicAccessConfigurationMetadata
$sel:blockPublicAccessConfigurationMetadata:GetBlockPublicAccessConfigurationResponse' :: GetBlockPublicAccessConfigurationResponse
-> BlockPublicAccessConfigurationMetadata
blockPublicAccessConfigurationMetadata} -> BlockPublicAccessConfigurationMetadata
blockPublicAccessConfigurationMetadata) (\s :: GetBlockPublicAccessConfigurationResponse
s@GetBlockPublicAccessConfigurationResponse' {} BlockPublicAccessConfigurationMetadata
a -> GetBlockPublicAccessConfigurationResponse
s {$sel:blockPublicAccessConfigurationMetadata:GetBlockPublicAccessConfigurationResponse' :: BlockPublicAccessConfigurationMetadata
blockPublicAccessConfigurationMetadata = BlockPublicAccessConfigurationMetadata
a} :: GetBlockPublicAccessConfigurationResponse)
instance
Prelude.NFData
GetBlockPublicAccessConfigurationResponse