{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.WorkSpaces.Types.SelfservicePermissions where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.WorkSpaces.Types.ReconnectEnum
data SelfservicePermissions = SelfservicePermissions'
{
SelfservicePermissions -> Maybe ReconnectEnum
restartWorkspace :: Prelude.Maybe ReconnectEnum,
SelfservicePermissions -> Maybe ReconnectEnum
changeComputeType :: Prelude.Maybe ReconnectEnum,
SelfservicePermissions -> Maybe ReconnectEnum
switchRunningMode :: Prelude.Maybe ReconnectEnum,
SelfservicePermissions -> Maybe ReconnectEnum
rebuildWorkspace :: Prelude.Maybe ReconnectEnum,
SelfservicePermissions -> Maybe ReconnectEnum
increaseVolumeSize :: Prelude.Maybe ReconnectEnum
}
deriving (SelfservicePermissions -> SelfservicePermissions -> Bool
(SelfservicePermissions -> SelfservicePermissions -> Bool)
-> (SelfservicePermissions -> SelfservicePermissions -> Bool)
-> Eq SelfservicePermissions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SelfservicePermissions -> SelfservicePermissions -> Bool
$c/= :: SelfservicePermissions -> SelfservicePermissions -> Bool
== :: SelfservicePermissions -> SelfservicePermissions -> Bool
$c== :: SelfservicePermissions -> SelfservicePermissions -> Bool
Prelude.Eq, ReadPrec [SelfservicePermissions]
ReadPrec SelfservicePermissions
Int -> ReadS SelfservicePermissions
ReadS [SelfservicePermissions]
(Int -> ReadS SelfservicePermissions)
-> ReadS [SelfservicePermissions]
-> ReadPrec SelfservicePermissions
-> ReadPrec [SelfservicePermissions]
-> Read SelfservicePermissions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SelfservicePermissions]
$creadListPrec :: ReadPrec [SelfservicePermissions]
readPrec :: ReadPrec SelfservicePermissions
$creadPrec :: ReadPrec SelfservicePermissions
readList :: ReadS [SelfservicePermissions]
$creadList :: ReadS [SelfservicePermissions]
readsPrec :: Int -> ReadS SelfservicePermissions
$creadsPrec :: Int -> ReadS SelfservicePermissions
Prelude.Read, Int -> SelfservicePermissions -> ShowS
[SelfservicePermissions] -> ShowS
SelfservicePermissions -> String
(Int -> SelfservicePermissions -> ShowS)
-> (SelfservicePermissions -> String)
-> ([SelfservicePermissions] -> ShowS)
-> Show SelfservicePermissions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SelfservicePermissions] -> ShowS
$cshowList :: [SelfservicePermissions] -> ShowS
show :: SelfservicePermissions -> String
$cshow :: SelfservicePermissions -> String
showsPrec :: Int -> SelfservicePermissions -> ShowS
$cshowsPrec :: Int -> SelfservicePermissions -> ShowS
Prelude.Show, (forall x. SelfservicePermissions -> Rep SelfservicePermissions x)
-> (forall x.
Rep SelfservicePermissions x -> SelfservicePermissions)
-> Generic SelfservicePermissions
forall x. Rep SelfservicePermissions x -> SelfservicePermissions
forall x. SelfservicePermissions -> Rep SelfservicePermissions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SelfservicePermissions x -> SelfservicePermissions
$cfrom :: forall x. SelfservicePermissions -> Rep SelfservicePermissions x
Prelude.Generic)
newSelfservicePermissions ::
SelfservicePermissions
newSelfservicePermissions :: SelfservicePermissions
newSelfservicePermissions =
SelfservicePermissions' :: Maybe ReconnectEnum
-> Maybe ReconnectEnum
-> Maybe ReconnectEnum
-> Maybe ReconnectEnum
-> Maybe ReconnectEnum
-> SelfservicePermissions
SelfservicePermissions'
{ $sel:restartWorkspace:SelfservicePermissions' :: Maybe ReconnectEnum
restartWorkspace =
Maybe ReconnectEnum
forall a. Maybe a
Prelude.Nothing,
$sel:changeComputeType:SelfservicePermissions' :: Maybe ReconnectEnum
changeComputeType = Maybe ReconnectEnum
forall a. Maybe a
Prelude.Nothing,
$sel:switchRunningMode:SelfservicePermissions' :: Maybe ReconnectEnum
switchRunningMode = Maybe ReconnectEnum
forall a. Maybe a
Prelude.Nothing,
$sel:rebuildWorkspace:SelfservicePermissions' :: Maybe ReconnectEnum
rebuildWorkspace = Maybe ReconnectEnum
forall a. Maybe a
Prelude.Nothing,
$sel:increaseVolumeSize:SelfservicePermissions' :: Maybe ReconnectEnum
increaseVolumeSize = Maybe ReconnectEnum
forall a. Maybe a
Prelude.Nothing
}
selfservicePermissions_restartWorkspace :: Lens.Lens' SelfservicePermissions (Prelude.Maybe ReconnectEnum)
selfservicePermissions_restartWorkspace :: (Maybe ReconnectEnum -> f (Maybe ReconnectEnum))
-> SelfservicePermissions -> f SelfservicePermissions
selfservicePermissions_restartWorkspace = (SelfservicePermissions -> Maybe ReconnectEnum)
-> (SelfservicePermissions
-> Maybe ReconnectEnum -> SelfservicePermissions)
-> Lens
SelfservicePermissions
SelfservicePermissions
(Maybe ReconnectEnum)
(Maybe ReconnectEnum)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SelfservicePermissions' {Maybe ReconnectEnum
restartWorkspace :: Maybe ReconnectEnum
$sel:restartWorkspace:SelfservicePermissions' :: SelfservicePermissions -> Maybe ReconnectEnum
restartWorkspace} -> Maybe ReconnectEnum
restartWorkspace) (\s :: SelfservicePermissions
s@SelfservicePermissions' {} Maybe ReconnectEnum
a -> SelfservicePermissions
s {$sel:restartWorkspace:SelfservicePermissions' :: Maybe ReconnectEnum
restartWorkspace = Maybe ReconnectEnum
a} :: SelfservicePermissions)
selfservicePermissions_changeComputeType :: Lens.Lens' SelfservicePermissions (Prelude.Maybe ReconnectEnum)
selfservicePermissions_changeComputeType :: (Maybe ReconnectEnum -> f (Maybe ReconnectEnum))
-> SelfservicePermissions -> f SelfservicePermissions
selfservicePermissions_changeComputeType = (SelfservicePermissions -> Maybe ReconnectEnum)
-> (SelfservicePermissions
-> Maybe ReconnectEnum -> SelfservicePermissions)
-> Lens
SelfservicePermissions
SelfservicePermissions
(Maybe ReconnectEnum)
(Maybe ReconnectEnum)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SelfservicePermissions' {Maybe ReconnectEnum
changeComputeType :: Maybe ReconnectEnum
$sel:changeComputeType:SelfservicePermissions' :: SelfservicePermissions -> Maybe ReconnectEnum
changeComputeType} -> Maybe ReconnectEnum
changeComputeType) (\s :: SelfservicePermissions
s@SelfservicePermissions' {} Maybe ReconnectEnum
a -> SelfservicePermissions
s {$sel:changeComputeType:SelfservicePermissions' :: Maybe ReconnectEnum
changeComputeType = Maybe ReconnectEnum
a} :: SelfservicePermissions)
selfservicePermissions_switchRunningMode :: Lens.Lens' SelfservicePermissions (Prelude.Maybe ReconnectEnum)
selfservicePermissions_switchRunningMode :: (Maybe ReconnectEnum -> f (Maybe ReconnectEnum))
-> SelfservicePermissions -> f SelfservicePermissions
selfservicePermissions_switchRunningMode = (SelfservicePermissions -> Maybe ReconnectEnum)
-> (SelfservicePermissions
-> Maybe ReconnectEnum -> SelfservicePermissions)
-> Lens
SelfservicePermissions
SelfservicePermissions
(Maybe ReconnectEnum)
(Maybe ReconnectEnum)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SelfservicePermissions' {Maybe ReconnectEnum
switchRunningMode :: Maybe ReconnectEnum
$sel:switchRunningMode:SelfservicePermissions' :: SelfservicePermissions -> Maybe ReconnectEnum
switchRunningMode} -> Maybe ReconnectEnum
switchRunningMode) (\s :: SelfservicePermissions
s@SelfservicePermissions' {} Maybe ReconnectEnum
a -> SelfservicePermissions
s {$sel:switchRunningMode:SelfservicePermissions' :: Maybe ReconnectEnum
switchRunningMode = Maybe ReconnectEnum
a} :: SelfservicePermissions)
selfservicePermissions_rebuildWorkspace :: Lens.Lens' SelfservicePermissions (Prelude.Maybe ReconnectEnum)
selfservicePermissions_rebuildWorkspace :: (Maybe ReconnectEnum -> f (Maybe ReconnectEnum))
-> SelfservicePermissions -> f SelfservicePermissions
selfservicePermissions_rebuildWorkspace = (SelfservicePermissions -> Maybe ReconnectEnum)
-> (SelfservicePermissions
-> Maybe ReconnectEnum -> SelfservicePermissions)
-> Lens
SelfservicePermissions
SelfservicePermissions
(Maybe ReconnectEnum)
(Maybe ReconnectEnum)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SelfservicePermissions' {Maybe ReconnectEnum
rebuildWorkspace :: Maybe ReconnectEnum
$sel:rebuildWorkspace:SelfservicePermissions' :: SelfservicePermissions -> Maybe ReconnectEnum
rebuildWorkspace} -> Maybe ReconnectEnum
rebuildWorkspace) (\s :: SelfservicePermissions
s@SelfservicePermissions' {} Maybe ReconnectEnum
a -> SelfservicePermissions
s {$sel:rebuildWorkspace:SelfservicePermissions' :: Maybe ReconnectEnum
rebuildWorkspace = Maybe ReconnectEnum
a} :: SelfservicePermissions)
selfservicePermissions_increaseVolumeSize :: Lens.Lens' SelfservicePermissions (Prelude.Maybe ReconnectEnum)
selfservicePermissions_increaseVolumeSize :: (Maybe ReconnectEnum -> f (Maybe ReconnectEnum))
-> SelfservicePermissions -> f SelfservicePermissions
selfservicePermissions_increaseVolumeSize = (SelfservicePermissions -> Maybe ReconnectEnum)
-> (SelfservicePermissions
-> Maybe ReconnectEnum -> SelfservicePermissions)
-> Lens
SelfservicePermissions
SelfservicePermissions
(Maybe ReconnectEnum)
(Maybe ReconnectEnum)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SelfservicePermissions' {Maybe ReconnectEnum
increaseVolumeSize :: Maybe ReconnectEnum
$sel:increaseVolumeSize:SelfservicePermissions' :: SelfservicePermissions -> Maybe ReconnectEnum
increaseVolumeSize} -> Maybe ReconnectEnum
increaseVolumeSize) (\s :: SelfservicePermissions
s@SelfservicePermissions' {} Maybe ReconnectEnum
a -> SelfservicePermissions
s {$sel:increaseVolumeSize:SelfservicePermissions' :: Maybe ReconnectEnum
increaseVolumeSize = Maybe ReconnectEnum
a} :: SelfservicePermissions)
instance Core.FromJSON SelfservicePermissions where
parseJSON :: Value -> Parser SelfservicePermissions
parseJSON =
String
-> (Object -> Parser SelfservicePermissions)
-> Value
-> Parser SelfservicePermissions
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SelfservicePermissions"
( \Object
x ->
Maybe ReconnectEnum
-> Maybe ReconnectEnum
-> Maybe ReconnectEnum
-> Maybe ReconnectEnum
-> Maybe ReconnectEnum
-> SelfservicePermissions
SelfservicePermissions'
(Maybe ReconnectEnum
-> Maybe ReconnectEnum
-> Maybe ReconnectEnum
-> Maybe ReconnectEnum
-> Maybe ReconnectEnum
-> SelfservicePermissions)
-> Parser (Maybe ReconnectEnum)
-> Parser
(Maybe ReconnectEnum
-> Maybe ReconnectEnum
-> Maybe ReconnectEnum
-> Maybe ReconnectEnum
-> SelfservicePermissions)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ReconnectEnum)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RestartWorkspace")
Parser
(Maybe ReconnectEnum
-> Maybe ReconnectEnum
-> Maybe ReconnectEnum
-> Maybe ReconnectEnum
-> SelfservicePermissions)
-> Parser (Maybe ReconnectEnum)
-> Parser
(Maybe ReconnectEnum
-> Maybe ReconnectEnum
-> Maybe ReconnectEnum
-> SelfservicePermissions)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ReconnectEnum)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ChangeComputeType")
Parser
(Maybe ReconnectEnum
-> Maybe ReconnectEnum
-> Maybe ReconnectEnum
-> SelfservicePermissions)
-> Parser (Maybe ReconnectEnum)
-> Parser
(Maybe ReconnectEnum
-> Maybe ReconnectEnum -> SelfservicePermissions)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ReconnectEnum)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SwitchRunningMode")
Parser
(Maybe ReconnectEnum
-> Maybe ReconnectEnum -> SelfservicePermissions)
-> Parser (Maybe ReconnectEnum)
-> Parser (Maybe ReconnectEnum -> SelfservicePermissions)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ReconnectEnum)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RebuildWorkspace")
Parser (Maybe ReconnectEnum -> SelfservicePermissions)
-> Parser (Maybe ReconnectEnum) -> Parser SelfservicePermissions
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ReconnectEnum)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IncreaseVolumeSize")
)
instance Prelude.Hashable SelfservicePermissions
instance Prelude.NFData SelfservicePermissions
instance Core.ToJSON SelfservicePermissions where
toJSON :: SelfservicePermissions -> Value
toJSON SelfservicePermissions' {Maybe ReconnectEnum
increaseVolumeSize :: Maybe ReconnectEnum
rebuildWorkspace :: Maybe ReconnectEnum
switchRunningMode :: Maybe ReconnectEnum
changeComputeType :: Maybe ReconnectEnum
restartWorkspace :: Maybe ReconnectEnum
$sel:increaseVolumeSize:SelfservicePermissions' :: SelfservicePermissions -> Maybe ReconnectEnum
$sel:rebuildWorkspace:SelfservicePermissions' :: SelfservicePermissions -> Maybe ReconnectEnum
$sel:switchRunningMode:SelfservicePermissions' :: SelfservicePermissions -> Maybe ReconnectEnum
$sel:changeComputeType:SelfservicePermissions' :: SelfservicePermissions -> Maybe ReconnectEnum
$sel:restartWorkspace:SelfservicePermissions' :: SelfservicePermissions -> Maybe ReconnectEnum
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"RestartWorkspace" Text -> ReconnectEnum -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ReconnectEnum -> Pair) -> Maybe ReconnectEnum -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ReconnectEnum
restartWorkspace,
(Text
"ChangeComputeType" Text -> ReconnectEnum -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ReconnectEnum -> Pair) -> Maybe ReconnectEnum -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ReconnectEnum
changeComputeType,
(Text
"SwitchRunningMode" Text -> ReconnectEnum -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ReconnectEnum -> Pair) -> Maybe ReconnectEnum -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ReconnectEnum
switchRunningMode,
(Text
"RebuildWorkspace" Text -> ReconnectEnum -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ReconnectEnum -> Pair) -> Maybe ReconnectEnum -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ReconnectEnum
rebuildWorkspace,
(Text
"IncreaseVolumeSize" Text -> ReconnectEnum -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ReconnectEnum -> Pair) -> Maybe ReconnectEnum -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ReconnectEnum
increaseVolumeSize
]
)