{-# 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.PutBlockPublicAccessConfiguration
(
PutBlockPublicAccessConfiguration (..),
newPutBlockPublicAccessConfiguration,
putBlockPublicAccessConfiguration_blockPublicAccessConfiguration,
PutBlockPublicAccessConfigurationResponse (..),
newPutBlockPublicAccessConfigurationResponse,
putBlockPublicAccessConfigurationResponse_httpStatus,
)
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 PutBlockPublicAccessConfiguration = PutBlockPublicAccessConfiguration'
{
PutBlockPublicAccessConfiguration -> BlockPublicAccessConfiguration
blockPublicAccessConfiguration :: BlockPublicAccessConfiguration
}
deriving (PutBlockPublicAccessConfiguration
-> PutBlockPublicAccessConfiguration -> Bool
(PutBlockPublicAccessConfiguration
-> PutBlockPublicAccessConfiguration -> Bool)
-> (PutBlockPublicAccessConfiguration
-> PutBlockPublicAccessConfiguration -> Bool)
-> Eq PutBlockPublicAccessConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutBlockPublicAccessConfiguration
-> PutBlockPublicAccessConfiguration -> Bool
$c/= :: PutBlockPublicAccessConfiguration
-> PutBlockPublicAccessConfiguration -> Bool
== :: PutBlockPublicAccessConfiguration
-> PutBlockPublicAccessConfiguration -> Bool
$c== :: PutBlockPublicAccessConfiguration
-> PutBlockPublicAccessConfiguration -> Bool
Prelude.Eq, ReadPrec [PutBlockPublicAccessConfiguration]
ReadPrec PutBlockPublicAccessConfiguration
Int -> ReadS PutBlockPublicAccessConfiguration
ReadS [PutBlockPublicAccessConfiguration]
(Int -> ReadS PutBlockPublicAccessConfiguration)
-> ReadS [PutBlockPublicAccessConfiguration]
-> ReadPrec PutBlockPublicAccessConfiguration
-> ReadPrec [PutBlockPublicAccessConfiguration]
-> Read PutBlockPublicAccessConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutBlockPublicAccessConfiguration]
$creadListPrec :: ReadPrec [PutBlockPublicAccessConfiguration]
readPrec :: ReadPrec PutBlockPublicAccessConfiguration
$creadPrec :: ReadPrec PutBlockPublicAccessConfiguration
readList :: ReadS [PutBlockPublicAccessConfiguration]
$creadList :: ReadS [PutBlockPublicAccessConfiguration]
readsPrec :: Int -> ReadS PutBlockPublicAccessConfiguration
$creadsPrec :: Int -> ReadS PutBlockPublicAccessConfiguration
Prelude.Read, Int -> PutBlockPublicAccessConfiguration -> ShowS
[PutBlockPublicAccessConfiguration] -> ShowS
PutBlockPublicAccessConfiguration -> String
(Int -> PutBlockPublicAccessConfiguration -> ShowS)
-> (PutBlockPublicAccessConfiguration -> String)
-> ([PutBlockPublicAccessConfiguration] -> ShowS)
-> Show PutBlockPublicAccessConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutBlockPublicAccessConfiguration] -> ShowS
$cshowList :: [PutBlockPublicAccessConfiguration] -> ShowS
show :: PutBlockPublicAccessConfiguration -> String
$cshow :: PutBlockPublicAccessConfiguration -> String
showsPrec :: Int -> PutBlockPublicAccessConfiguration -> ShowS
$cshowsPrec :: Int -> PutBlockPublicAccessConfiguration -> ShowS
Prelude.Show, (forall x.
PutBlockPublicAccessConfiguration
-> Rep PutBlockPublicAccessConfiguration x)
-> (forall x.
Rep PutBlockPublicAccessConfiguration x
-> PutBlockPublicAccessConfiguration)
-> Generic PutBlockPublicAccessConfiguration
forall x.
Rep PutBlockPublicAccessConfiguration x
-> PutBlockPublicAccessConfiguration
forall x.
PutBlockPublicAccessConfiguration
-> Rep PutBlockPublicAccessConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PutBlockPublicAccessConfiguration x
-> PutBlockPublicAccessConfiguration
$cfrom :: forall x.
PutBlockPublicAccessConfiguration
-> Rep PutBlockPublicAccessConfiguration x
Prelude.Generic)
newPutBlockPublicAccessConfiguration ::
BlockPublicAccessConfiguration ->
PutBlockPublicAccessConfiguration
newPutBlockPublicAccessConfiguration :: BlockPublicAccessConfiguration -> PutBlockPublicAccessConfiguration
newPutBlockPublicAccessConfiguration
BlockPublicAccessConfiguration
pBlockPublicAccessConfiguration_ =
PutBlockPublicAccessConfiguration' :: BlockPublicAccessConfiguration -> PutBlockPublicAccessConfiguration
PutBlockPublicAccessConfiguration'
{ $sel:blockPublicAccessConfiguration:PutBlockPublicAccessConfiguration' :: BlockPublicAccessConfiguration
blockPublicAccessConfiguration =
BlockPublicAccessConfiguration
pBlockPublicAccessConfiguration_
}
putBlockPublicAccessConfiguration_blockPublicAccessConfiguration :: Lens.Lens' PutBlockPublicAccessConfiguration BlockPublicAccessConfiguration
putBlockPublicAccessConfiguration_blockPublicAccessConfiguration :: (BlockPublicAccessConfiguration
-> f BlockPublicAccessConfiguration)
-> PutBlockPublicAccessConfiguration
-> f PutBlockPublicAccessConfiguration
putBlockPublicAccessConfiguration_blockPublicAccessConfiguration = (PutBlockPublicAccessConfiguration
-> BlockPublicAccessConfiguration)
-> (PutBlockPublicAccessConfiguration
-> BlockPublicAccessConfiguration
-> PutBlockPublicAccessConfiguration)
-> Lens
PutBlockPublicAccessConfiguration
PutBlockPublicAccessConfiguration
BlockPublicAccessConfiguration
BlockPublicAccessConfiguration
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBlockPublicAccessConfiguration' {BlockPublicAccessConfiguration
blockPublicAccessConfiguration :: BlockPublicAccessConfiguration
$sel:blockPublicAccessConfiguration:PutBlockPublicAccessConfiguration' :: PutBlockPublicAccessConfiguration -> BlockPublicAccessConfiguration
blockPublicAccessConfiguration} -> BlockPublicAccessConfiguration
blockPublicAccessConfiguration) (\s :: PutBlockPublicAccessConfiguration
s@PutBlockPublicAccessConfiguration' {} BlockPublicAccessConfiguration
a -> PutBlockPublicAccessConfiguration
s {$sel:blockPublicAccessConfiguration:PutBlockPublicAccessConfiguration' :: BlockPublicAccessConfiguration
blockPublicAccessConfiguration = BlockPublicAccessConfiguration
a} :: PutBlockPublicAccessConfiguration)
instance
Core.AWSRequest
PutBlockPublicAccessConfiguration
where
type
AWSResponse PutBlockPublicAccessConfiguration =
PutBlockPublicAccessConfigurationResponse
request :: PutBlockPublicAccessConfiguration
-> Request PutBlockPublicAccessConfiguration
request = Service
-> PutBlockPublicAccessConfiguration
-> Request PutBlockPublicAccessConfiguration
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy PutBlockPublicAccessConfiguration
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse PutBlockPublicAccessConfiguration)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse PutBlockPublicAccessConfiguration))
-> Logger
-> Service
-> Proxy PutBlockPublicAccessConfiguration
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse PutBlockPublicAccessConfiguration)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> PutBlockPublicAccessConfigurationResponse
PutBlockPublicAccessConfigurationResponse'
(Int -> PutBlockPublicAccessConfigurationResponse)
-> Either String Int
-> Either String PutBlockPublicAccessConfigurationResponse
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))
)
instance
Prelude.Hashable
PutBlockPublicAccessConfiguration
instance
Prelude.NFData
PutBlockPublicAccessConfiguration
instance
Core.ToHeaders
PutBlockPublicAccessConfiguration
where
toHeaders :: PutBlockPublicAccessConfiguration -> ResponseHeaders
toHeaders =
ResponseHeaders
-> PutBlockPublicAccessConfiguration -> 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.PutBlockPublicAccessConfiguration" ::
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
PutBlockPublicAccessConfiguration
where
toJSON :: PutBlockPublicAccessConfiguration -> Value
toJSON PutBlockPublicAccessConfiguration' {BlockPublicAccessConfiguration
blockPublicAccessConfiguration :: BlockPublicAccessConfiguration
$sel:blockPublicAccessConfiguration:PutBlockPublicAccessConfiguration' :: PutBlockPublicAccessConfiguration -> BlockPublicAccessConfiguration
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"BlockPublicAccessConfiguration"
Text -> BlockPublicAccessConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= BlockPublicAccessConfiguration
blockPublicAccessConfiguration
)
]
)
instance
Core.ToPath
PutBlockPublicAccessConfiguration
where
toPath :: PutBlockPublicAccessConfiguration -> ByteString
toPath = ByteString -> PutBlockPublicAccessConfiguration -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
PutBlockPublicAccessConfiguration
where
toQuery :: PutBlockPublicAccessConfiguration -> QueryString
toQuery = QueryString -> PutBlockPublicAccessConfiguration -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data PutBlockPublicAccessConfigurationResponse = PutBlockPublicAccessConfigurationResponse'
{
PutBlockPublicAccessConfigurationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (PutBlockPublicAccessConfigurationResponse
-> PutBlockPublicAccessConfigurationResponse -> Bool
(PutBlockPublicAccessConfigurationResponse
-> PutBlockPublicAccessConfigurationResponse -> Bool)
-> (PutBlockPublicAccessConfigurationResponse
-> PutBlockPublicAccessConfigurationResponse -> Bool)
-> Eq PutBlockPublicAccessConfigurationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutBlockPublicAccessConfigurationResponse
-> PutBlockPublicAccessConfigurationResponse -> Bool
$c/= :: PutBlockPublicAccessConfigurationResponse
-> PutBlockPublicAccessConfigurationResponse -> Bool
== :: PutBlockPublicAccessConfigurationResponse
-> PutBlockPublicAccessConfigurationResponse -> Bool
$c== :: PutBlockPublicAccessConfigurationResponse
-> PutBlockPublicAccessConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [PutBlockPublicAccessConfigurationResponse]
ReadPrec PutBlockPublicAccessConfigurationResponse
Int -> ReadS PutBlockPublicAccessConfigurationResponse
ReadS [PutBlockPublicAccessConfigurationResponse]
(Int -> ReadS PutBlockPublicAccessConfigurationResponse)
-> ReadS [PutBlockPublicAccessConfigurationResponse]
-> ReadPrec PutBlockPublicAccessConfigurationResponse
-> ReadPrec [PutBlockPublicAccessConfigurationResponse]
-> Read PutBlockPublicAccessConfigurationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutBlockPublicAccessConfigurationResponse]
$creadListPrec :: ReadPrec [PutBlockPublicAccessConfigurationResponse]
readPrec :: ReadPrec PutBlockPublicAccessConfigurationResponse
$creadPrec :: ReadPrec PutBlockPublicAccessConfigurationResponse
readList :: ReadS [PutBlockPublicAccessConfigurationResponse]
$creadList :: ReadS [PutBlockPublicAccessConfigurationResponse]
readsPrec :: Int -> ReadS PutBlockPublicAccessConfigurationResponse
$creadsPrec :: Int -> ReadS PutBlockPublicAccessConfigurationResponse
Prelude.Read, Int -> PutBlockPublicAccessConfigurationResponse -> ShowS
[PutBlockPublicAccessConfigurationResponse] -> ShowS
PutBlockPublicAccessConfigurationResponse -> String
(Int -> PutBlockPublicAccessConfigurationResponse -> ShowS)
-> (PutBlockPublicAccessConfigurationResponse -> String)
-> ([PutBlockPublicAccessConfigurationResponse] -> ShowS)
-> Show PutBlockPublicAccessConfigurationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutBlockPublicAccessConfigurationResponse] -> ShowS
$cshowList :: [PutBlockPublicAccessConfigurationResponse] -> ShowS
show :: PutBlockPublicAccessConfigurationResponse -> String
$cshow :: PutBlockPublicAccessConfigurationResponse -> String
showsPrec :: Int -> PutBlockPublicAccessConfigurationResponse -> ShowS
$cshowsPrec :: Int -> PutBlockPublicAccessConfigurationResponse -> ShowS
Prelude.Show, (forall x.
PutBlockPublicAccessConfigurationResponse
-> Rep PutBlockPublicAccessConfigurationResponse x)
-> (forall x.
Rep PutBlockPublicAccessConfigurationResponse x
-> PutBlockPublicAccessConfigurationResponse)
-> Generic PutBlockPublicAccessConfigurationResponse
forall x.
Rep PutBlockPublicAccessConfigurationResponse x
-> PutBlockPublicAccessConfigurationResponse
forall x.
PutBlockPublicAccessConfigurationResponse
-> Rep PutBlockPublicAccessConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PutBlockPublicAccessConfigurationResponse x
-> PutBlockPublicAccessConfigurationResponse
$cfrom :: forall x.
PutBlockPublicAccessConfigurationResponse
-> Rep PutBlockPublicAccessConfigurationResponse x
Prelude.Generic)
newPutBlockPublicAccessConfigurationResponse ::
Prelude.Int ->
PutBlockPublicAccessConfigurationResponse
newPutBlockPublicAccessConfigurationResponse :: Int -> PutBlockPublicAccessConfigurationResponse
newPutBlockPublicAccessConfigurationResponse
Int
pHttpStatus_ =
PutBlockPublicAccessConfigurationResponse' :: Int -> PutBlockPublicAccessConfigurationResponse
PutBlockPublicAccessConfigurationResponse'
{ $sel:httpStatus:PutBlockPublicAccessConfigurationResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
putBlockPublicAccessConfigurationResponse_httpStatus :: Lens.Lens' PutBlockPublicAccessConfigurationResponse Prelude.Int
putBlockPublicAccessConfigurationResponse_httpStatus :: (Int -> f Int)
-> PutBlockPublicAccessConfigurationResponse
-> f PutBlockPublicAccessConfigurationResponse
putBlockPublicAccessConfigurationResponse_httpStatus = (PutBlockPublicAccessConfigurationResponse -> Int)
-> (PutBlockPublicAccessConfigurationResponse
-> Int -> PutBlockPublicAccessConfigurationResponse)
-> Lens
PutBlockPublicAccessConfigurationResponse
PutBlockPublicAccessConfigurationResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBlockPublicAccessConfigurationResponse' {Int
httpStatus :: Int
$sel:httpStatus:PutBlockPublicAccessConfigurationResponse' :: PutBlockPublicAccessConfigurationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: PutBlockPublicAccessConfigurationResponse
s@PutBlockPublicAccessConfigurationResponse' {} Int
a -> PutBlockPublicAccessConfigurationResponse
s {$sel:httpStatus:PutBlockPublicAccessConfigurationResponse' :: Int
httpStatus = Int
a} :: PutBlockPublicAccessConfigurationResponse)
instance
Prelude.NFData
PutBlockPublicAccessConfigurationResponse