{-# 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.SetVisibleToAllUsers
(
SetVisibleToAllUsers (..),
newSetVisibleToAllUsers,
setVisibleToAllUsers_jobFlowIds,
setVisibleToAllUsers_visibleToAllUsers,
SetVisibleToAllUsersResponse (..),
newSetVisibleToAllUsersResponse,
)
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 SetVisibleToAllUsers = SetVisibleToAllUsers'
{
SetVisibleToAllUsers -> [Text]
jobFlowIds :: [Prelude.Text],
SetVisibleToAllUsers -> Bool
visibleToAllUsers :: Prelude.Bool
}
deriving (SetVisibleToAllUsers -> SetVisibleToAllUsers -> Bool
(SetVisibleToAllUsers -> SetVisibleToAllUsers -> Bool)
-> (SetVisibleToAllUsers -> SetVisibleToAllUsers -> Bool)
-> Eq SetVisibleToAllUsers
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SetVisibleToAllUsers -> SetVisibleToAllUsers -> Bool
$c/= :: SetVisibleToAllUsers -> SetVisibleToAllUsers -> Bool
== :: SetVisibleToAllUsers -> SetVisibleToAllUsers -> Bool
$c== :: SetVisibleToAllUsers -> SetVisibleToAllUsers -> Bool
Prelude.Eq, ReadPrec [SetVisibleToAllUsers]
ReadPrec SetVisibleToAllUsers
Int -> ReadS SetVisibleToAllUsers
ReadS [SetVisibleToAllUsers]
(Int -> ReadS SetVisibleToAllUsers)
-> ReadS [SetVisibleToAllUsers]
-> ReadPrec SetVisibleToAllUsers
-> ReadPrec [SetVisibleToAllUsers]
-> Read SetVisibleToAllUsers
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SetVisibleToAllUsers]
$creadListPrec :: ReadPrec [SetVisibleToAllUsers]
readPrec :: ReadPrec SetVisibleToAllUsers
$creadPrec :: ReadPrec SetVisibleToAllUsers
readList :: ReadS [SetVisibleToAllUsers]
$creadList :: ReadS [SetVisibleToAllUsers]
readsPrec :: Int -> ReadS SetVisibleToAllUsers
$creadsPrec :: Int -> ReadS SetVisibleToAllUsers
Prelude.Read, Int -> SetVisibleToAllUsers -> ShowS
[SetVisibleToAllUsers] -> ShowS
SetVisibleToAllUsers -> String
(Int -> SetVisibleToAllUsers -> ShowS)
-> (SetVisibleToAllUsers -> String)
-> ([SetVisibleToAllUsers] -> ShowS)
-> Show SetVisibleToAllUsers
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SetVisibleToAllUsers] -> ShowS
$cshowList :: [SetVisibleToAllUsers] -> ShowS
show :: SetVisibleToAllUsers -> String
$cshow :: SetVisibleToAllUsers -> String
showsPrec :: Int -> SetVisibleToAllUsers -> ShowS
$cshowsPrec :: Int -> SetVisibleToAllUsers -> ShowS
Prelude.Show, (forall x. SetVisibleToAllUsers -> Rep SetVisibleToAllUsers x)
-> (forall x. Rep SetVisibleToAllUsers x -> SetVisibleToAllUsers)
-> Generic SetVisibleToAllUsers
forall x. Rep SetVisibleToAllUsers x -> SetVisibleToAllUsers
forall x. SetVisibleToAllUsers -> Rep SetVisibleToAllUsers x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SetVisibleToAllUsers x -> SetVisibleToAllUsers
$cfrom :: forall x. SetVisibleToAllUsers -> Rep SetVisibleToAllUsers x
Prelude.Generic)
newSetVisibleToAllUsers ::
Prelude.Bool ->
SetVisibleToAllUsers
newSetVisibleToAllUsers :: Bool -> SetVisibleToAllUsers
newSetVisibleToAllUsers Bool
pVisibleToAllUsers_ =
SetVisibleToAllUsers' :: [Text] -> Bool -> SetVisibleToAllUsers
SetVisibleToAllUsers'
{ $sel:jobFlowIds:SetVisibleToAllUsers' :: [Text]
jobFlowIds = [Text]
forall a. Monoid a => a
Prelude.mempty,
$sel:visibleToAllUsers:SetVisibleToAllUsers' :: Bool
visibleToAllUsers = Bool
pVisibleToAllUsers_
}
setVisibleToAllUsers_jobFlowIds :: Lens.Lens' SetVisibleToAllUsers [Prelude.Text]
setVisibleToAllUsers_jobFlowIds :: ([Text] -> f [Text])
-> SetVisibleToAllUsers -> f SetVisibleToAllUsers
setVisibleToAllUsers_jobFlowIds = (SetVisibleToAllUsers -> [Text])
-> (SetVisibleToAllUsers -> [Text] -> SetVisibleToAllUsers)
-> Lens SetVisibleToAllUsers SetVisibleToAllUsers [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetVisibleToAllUsers' {[Text]
jobFlowIds :: [Text]
$sel:jobFlowIds:SetVisibleToAllUsers' :: SetVisibleToAllUsers -> [Text]
jobFlowIds} -> [Text]
jobFlowIds) (\s :: SetVisibleToAllUsers
s@SetVisibleToAllUsers' {} [Text]
a -> SetVisibleToAllUsers
s {$sel:jobFlowIds:SetVisibleToAllUsers' :: [Text]
jobFlowIds = [Text]
a} :: SetVisibleToAllUsers) (([Text] -> f [Text])
-> SetVisibleToAllUsers -> f SetVisibleToAllUsers)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> SetVisibleToAllUsers
-> f SetVisibleToAllUsers
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
setVisibleToAllUsers_visibleToAllUsers :: Lens.Lens' SetVisibleToAllUsers Prelude.Bool
setVisibleToAllUsers_visibleToAllUsers :: (Bool -> f Bool) -> SetVisibleToAllUsers -> f SetVisibleToAllUsers
setVisibleToAllUsers_visibleToAllUsers = (SetVisibleToAllUsers -> Bool)
-> (SetVisibleToAllUsers -> Bool -> SetVisibleToAllUsers)
-> Lens SetVisibleToAllUsers SetVisibleToAllUsers Bool Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetVisibleToAllUsers' {Bool
visibleToAllUsers :: Bool
$sel:visibleToAllUsers:SetVisibleToAllUsers' :: SetVisibleToAllUsers -> Bool
visibleToAllUsers} -> Bool
visibleToAllUsers) (\s :: SetVisibleToAllUsers
s@SetVisibleToAllUsers' {} Bool
a -> SetVisibleToAllUsers
s {$sel:visibleToAllUsers:SetVisibleToAllUsers' :: Bool
visibleToAllUsers = Bool
a} :: SetVisibleToAllUsers)
instance Core.AWSRequest SetVisibleToAllUsers where
type
AWSResponse SetVisibleToAllUsers =
SetVisibleToAllUsersResponse
request :: SetVisibleToAllUsers -> Request SetVisibleToAllUsers
request = Service -> SetVisibleToAllUsers -> Request SetVisibleToAllUsers
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy SetVisibleToAllUsers
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse SetVisibleToAllUsers)))
response =
AWSResponse SetVisibleToAllUsers
-> Logger
-> Service
-> Proxy SetVisibleToAllUsers
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse SetVisibleToAllUsers)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse SetVisibleToAllUsers
SetVisibleToAllUsersResponse
SetVisibleToAllUsersResponse'
instance Prelude.Hashable SetVisibleToAllUsers
instance Prelude.NFData SetVisibleToAllUsers
instance Core.ToHeaders SetVisibleToAllUsers where
toHeaders :: SetVisibleToAllUsers -> [Header]
toHeaders =
[Header] -> SetVisibleToAllUsers -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"ElasticMapReduce.SetVisibleToAllUsers" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON SetVisibleToAllUsers where
toJSON :: SetVisibleToAllUsers -> Value
toJSON SetVisibleToAllUsers' {Bool
[Text]
visibleToAllUsers :: Bool
jobFlowIds :: [Text]
$sel:visibleToAllUsers:SetVisibleToAllUsers' :: SetVisibleToAllUsers -> Bool
$sel:jobFlowIds:SetVisibleToAllUsers' :: SetVisibleToAllUsers -> [Text]
..} =
[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
"JobFlowIds" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Text]
jobFlowIds),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"VisibleToAllUsers" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Bool
visibleToAllUsers)
]
)
instance Core.ToPath SetVisibleToAllUsers where
toPath :: SetVisibleToAllUsers -> ByteString
toPath = ByteString -> SetVisibleToAllUsers -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery SetVisibleToAllUsers where
toQuery :: SetVisibleToAllUsers -> QueryString
toQuery = QueryString -> SetVisibleToAllUsers -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data SetVisibleToAllUsersResponse = SetVisibleToAllUsersResponse'
{
}
deriving (SetVisibleToAllUsersResponse
-> SetVisibleToAllUsersResponse -> Bool
(SetVisibleToAllUsersResponse
-> SetVisibleToAllUsersResponse -> Bool)
-> (SetVisibleToAllUsersResponse
-> SetVisibleToAllUsersResponse -> Bool)
-> Eq SetVisibleToAllUsersResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SetVisibleToAllUsersResponse
-> SetVisibleToAllUsersResponse -> Bool
$c/= :: SetVisibleToAllUsersResponse
-> SetVisibleToAllUsersResponse -> Bool
== :: SetVisibleToAllUsersResponse
-> SetVisibleToAllUsersResponse -> Bool
$c== :: SetVisibleToAllUsersResponse
-> SetVisibleToAllUsersResponse -> Bool
Prelude.Eq, ReadPrec [SetVisibleToAllUsersResponse]
ReadPrec SetVisibleToAllUsersResponse
Int -> ReadS SetVisibleToAllUsersResponse
ReadS [SetVisibleToAllUsersResponse]
(Int -> ReadS SetVisibleToAllUsersResponse)
-> ReadS [SetVisibleToAllUsersResponse]
-> ReadPrec SetVisibleToAllUsersResponse
-> ReadPrec [SetVisibleToAllUsersResponse]
-> Read SetVisibleToAllUsersResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SetVisibleToAllUsersResponse]
$creadListPrec :: ReadPrec [SetVisibleToAllUsersResponse]
readPrec :: ReadPrec SetVisibleToAllUsersResponse
$creadPrec :: ReadPrec SetVisibleToAllUsersResponse
readList :: ReadS [SetVisibleToAllUsersResponse]
$creadList :: ReadS [SetVisibleToAllUsersResponse]
readsPrec :: Int -> ReadS SetVisibleToAllUsersResponse
$creadsPrec :: Int -> ReadS SetVisibleToAllUsersResponse
Prelude.Read, Int -> SetVisibleToAllUsersResponse -> ShowS
[SetVisibleToAllUsersResponse] -> ShowS
SetVisibleToAllUsersResponse -> String
(Int -> SetVisibleToAllUsersResponse -> ShowS)
-> (SetVisibleToAllUsersResponse -> String)
-> ([SetVisibleToAllUsersResponse] -> ShowS)
-> Show SetVisibleToAllUsersResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SetVisibleToAllUsersResponse] -> ShowS
$cshowList :: [SetVisibleToAllUsersResponse] -> ShowS
show :: SetVisibleToAllUsersResponse -> String
$cshow :: SetVisibleToAllUsersResponse -> String
showsPrec :: Int -> SetVisibleToAllUsersResponse -> ShowS
$cshowsPrec :: Int -> SetVisibleToAllUsersResponse -> ShowS
Prelude.Show, (forall x.
SetVisibleToAllUsersResponse -> Rep SetVisibleToAllUsersResponse x)
-> (forall x.
Rep SetVisibleToAllUsersResponse x -> SetVisibleToAllUsersResponse)
-> Generic SetVisibleToAllUsersResponse
forall x.
Rep SetVisibleToAllUsersResponse x -> SetVisibleToAllUsersResponse
forall x.
SetVisibleToAllUsersResponse -> Rep SetVisibleToAllUsersResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SetVisibleToAllUsersResponse x -> SetVisibleToAllUsersResponse
$cfrom :: forall x.
SetVisibleToAllUsersResponse -> Rep SetVisibleToAllUsersResponse x
Prelude.Generic)
newSetVisibleToAllUsersResponse ::
SetVisibleToAllUsersResponse
newSetVisibleToAllUsersResponse :: SetVisibleToAllUsersResponse
newSetVisibleToAllUsersResponse =
SetVisibleToAllUsersResponse
SetVisibleToAllUsersResponse'
instance Prelude.NFData SetVisibleToAllUsersResponse