{-# 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.WorkspaceCreationProperties where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data WorkspaceCreationProperties = WorkspaceCreationProperties'
{
WorkspaceCreationProperties -> Maybe Text
customSecurityGroupId :: Prelude.Maybe Prelude.Text,
WorkspaceCreationProperties -> Maybe Bool
userEnabledAsLocalAdministrator :: Prelude.Maybe Prelude.Bool,
WorkspaceCreationProperties -> Maybe Bool
enableWorkDocs :: Prelude.Maybe Prelude.Bool,
WorkspaceCreationProperties -> Maybe Bool
enableMaintenanceMode :: Prelude.Maybe Prelude.Bool,
WorkspaceCreationProperties -> Maybe Bool
enableInternetAccess :: Prelude.Maybe Prelude.Bool,
WorkspaceCreationProperties -> Maybe Text
defaultOu :: Prelude.Maybe Prelude.Text
}
deriving (WorkspaceCreationProperties -> WorkspaceCreationProperties -> Bool
(WorkspaceCreationProperties
-> WorkspaceCreationProperties -> Bool)
-> (WorkspaceCreationProperties
-> WorkspaceCreationProperties -> Bool)
-> Eq WorkspaceCreationProperties
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WorkspaceCreationProperties -> WorkspaceCreationProperties -> Bool
$c/= :: WorkspaceCreationProperties -> WorkspaceCreationProperties -> Bool
== :: WorkspaceCreationProperties -> WorkspaceCreationProperties -> Bool
$c== :: WorkspaceCreationProperties -> WorkspaceCreationProperties -> Bool
Prelude.Eq, ReadPrec [WorkspaceCreationProperties]
ReadPrec WorkspaceCreationProperties
Int -> ReadS WorkspaceCreationProperties
ReadS [WorkspaceCreationProperties]
(Int -> ReadS WorkspaceCreationProperties)
-> ReadS [WorkspaceCreationProperties]
-> ReadPrec WorkspaceCreationProperties
-> ReadPrec [WorkspaceCreationProperties]
-> Read WorkspaceCreationProperties
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [WorkspaceCreationProperties]
$creadListPrec :: ReadPrec [WorkspaceCreationProperties]
readPrec :: ReadPrec WorkspaceCreationProperties
$creadPrec :: ReadPrec WorkspaceCreationProperties
readList :: ReadS [WorkspaceCreationProperties]
$creadList :: ReadS [WorkspaceCreationProperties]
readsPrec :: Int -> ReadS WorkspaceCreationProperties
$creadsPrec :: Int -> ReadS WorkspaceCreationProperties
Prelude.Read, Int -> WorkspaceCreationProperties -> ShowS
[WorkspaceCreationProperties] -> ShowS
WorkspaceCreationProperties -> String
(Int -> WorkspaceCreationProperties -> ShowS)
-> (WorkspaceCreationProperties -> String)
-> ([WorkspaceCreationProperties] -> ShowS)
-> Show WorkspaceCreationProperties
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WorkspaceCreationProperties] -> ShowS
$cshowList :: [WorkspaceCreationProperties] -> ShowS
show :: WorkspaceCreationProperties -> String
$cshow :: WorkspaceCreationProperties -> String
showsPrec :: Int -> WorkspaceCreationProperties -> ShowS
$cshowsPrec :: Int -> WorkspaceCreationProperties -> ShowS
Prelude.Show, (forall x.
WorkspaceCreationProperties -> Rep WorkspaceCreationProperties x)
-> (forall x.
Rep WorkspaceCreationProperties x -> WorkspaceCreationProperties)
-> Generic WorkspaceCreationProperties
forall x.
Rep WorkspaceCreationProperties x -> WorkspaceCreationProperties
forall x.
WorkspaceCreationProperties -> Rep WorkspaceCreationProperties x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep WorkspaceCreationProperties x -> WorkspaceCreationProperties
$cfrom :: forall x.
WorkspaceCreationProperties -> Rep WorkspaceCreationProperties x
Prelude.Generic)
newWorkspaceCreationProperties ::
WorkspaceCreationProperties
newWorkspaceCreationProperties :: WorkspaceCreationProperties
newWorkspaceCreationProperties =
WorkspaceCreationProperties' :: Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> WorkspaceCreationProperties
WorkspaceCreationProperties'
{ $sel:customSecurityGroupId:WorkspaceCreationProperties' :: Maybe Text
customSecurityGroupId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:userEnabledAsLocalAdministrator:WorkspaceCreationProperties' :: Maybe Bool
userEnabledAsLocalAdministrator =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:enableWorkDocs:WorkspaceCreationProperties' :: Maybe Bool
enableWorkDocs = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:enableMaintenanceMode:WorkspaceCreationProperties' :: Maybe Bool
enableMaintenanceMode = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:enableInternetAccess:WorkspaceCreationProperties' :: Maybe Bool
enableInternetAccess = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:defaultOu:WorkspaceCreationProperties' :: Maybe Text
defaultOu = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
workspaceCreationProperties_customSecurityGroupId :: Lens.Lens' WorkspaceCreationProperties (Prelude.Maybe Prelude.Text)
workspaceCreationProperties_customSecurityGroupId :: (Maybe Text -> f (Maybe Text))
-> WorkspaceCreationProperties -> f WorkspaceCreationProperties
workspaceCreationProperties_customSecurityGroupId = (WorkspaceCreationProperties -> Maybe Text)
-> (WorkspaceCreationProperties
-> Maybe Text -> WorkspaceCreationProperties)
-> Lens
WorkspaceCreationProperties
WorkspaceCreationProperties
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceCreationProperties' {Maybe Text
customSecurityGroupId :: Maybe Text
$sel:customSecurityGroupId:WorkspaceCreationProperties' :: WorkspaceCreationProperties -> Maybe Text
customSecurityGroupId} -> Maybe Text
customSecurityGroupId) (\s :: WorkspaceCreationProperties
s@WorkspaceCreationProperties' {} Maybe Text
a -> WorkspaceCreationProperties
s {$sel:customSecurityGroupId:WorkspaceCreationProperties' :: Maybe Text
customSecurityGroupId = Maybe Text
a} :: WorkspaceCreationProperties)
workspaceCreationProperties_userEnabledAsLocalAdministrator :: Lens.Lens' WorkspaceCreationProperties (Prelude.Maybe Prelude.Bool)
workspaceCreationProperties_userEnabledAsLocalAdministrator :: (Maybe Bool -> f (Maybe Bool))
-> WorkspaceCreationProperties -> f WorkspaceCreationProperties
workspaceCreationProperties_userEnabledAsLocalAdministrator = (WorkspaceCreationProperties -> Maybe Bool)
-> (WorkspaceCreationProperties
-> Maybe Bool -> WorkspaceCreationProperties)
-> Lens
WorkspaceCreationProperties
WorkspaceCreationProperties
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceCreationProperties' {Maybe Bool
userEnabledAsLocalAdministrator :: Maybe Bool
$sel:userEnabledAsLocalAdministrator:WorkspaceCreationProperties' :: WorkspaceCreationProperties -> Maybe Bool
userEnabledAsLocalAdministrator} -> Maybe Bool
userEnabledAsLocalAdministrator) (\s :: WorkspaceCreationProperties
s@WorkspaceCreationProperties' {} Maybe Bool
a -> WorkspaceCreationProperties
s {$sel:userEnabledAsLocalAdministrator:WorkspaceCreationProperties' :: Maybe Bool
userEnabledAsLocalAdministrator = Maybe Bool
a} :: WorkspaceCreationProperties)
workspaceCreationProperties_enableWorkDocs :: Lens.Lens' WorkspaceCreationProperties (Prelude.Maybe Prelude.Bool)
workspaceCreationProperties_enableWorkDocs :: (Maybe Bool -> f (Maybe Bool))
-> WorkspaceCreationProperties -> f WorkspaceCreationProperties
workspaceCreationProperties_enableWorkDocs = (WorkspaceCreationProperties -> Maybe Bool)
-> (WorkspaceCreationProperties
-> Maybe Bool -> WorkspaceCreationProperties)
-> Lens
WorkspaceCreationProperties
WorkspaceCreationProperties
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceCreationProperties' {Maybe Bool
enableWorkDocs :: Maybe Bool
$sel:enableWorkDocs:WorkspaceCreationProperties' :: WorkspaceCreationProperties -> Maybe Bool
enableWorkDocs} -> Maybe Bool
enableWorkDocs) (\s :: WorkspaceCreationProperties
s@WorkspaceCreationProperties' {} Maybe Bool
a -> WorkspaceCreationProperties
s {$sel:enableWorkDocs:WorkspaceCreationProperties' :: Maybe Bool
enableWorkDocs = Maybe Bool
a} :: WorkspaceCreationProperties)
workspaceCreationProperties_enableMaintenanceMode :: Lens.Lens' WorkspaceCreationProperties (Prelude.Maybe Prelude.Bool)
workspaceCreationProperties_enableMaintenanceMode :: (Maybe Bool -> f (Maybe Bool))
-> WorkspaceCreationProperties -> f WorkspaceCreationProperties
workspaceCreationProperties_enableMaintenanceMode = (WorkspaceCreationProperties -> Maybe Bool)
-> (WorkspaceCreationProperties
-> Maybe Bool -> WorkspaceCreationProperties)
-> Lens
WorkspaceCreationProperties
WorkspaceCreationProperties
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceCreationProperties' {Maybe Bool
enableMaintenanceMode :: Maybe Bool
$sel:enableMaintenanceMode:WorkspaceCreationProperties' :: WorkspaceCreationProperties -> Maybe Bool
enableMaintenanceMode} -> Maybe Bool
enableMaintenanceMode) (\s :: WorkspaceCreationProperties
s@WorkspaceCreationProperties' {} Maybe Bool
a -> WorkspaceCreationProperties
s {$sel:enableMaintenanceMode:WorkspaceCreationProperties' :: Maybe Bool
enableMaintenanceMode = Maybe Bool
a} :: WorkspaceCreationProperties)
workspaceCreationProperties_enableInternetAccess :: Lens.Lens' WorkspaceCreationProperties (Prelude.Maybe Prelude.Bool)
workspaceCreationProperties_enableInternetAccess :: (Maybe Bool -> f (Maybe Bool))
-> WorkspaceCreationProperties -> f WorkspaceCreationProperties
workspaceCreationProperties_enableInternetAccess = (WorkspaceCreationProperties -> Maybe Bool)
-> (WorkspaceCreationProperties
-> Maybe Bool -> WorkspaceCreationProperties)
-> Lens
WorkspaceCreationProperties
WorkspaceCreationProperties
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceCreationProperties' {Maybe Bool
enableInternetAccess :: Maybe Bool
$sel:enableInternetAccess:WorkspaceCreationProperties' :: WorkspaceCreationProperties -> Maybe Bool
enableInternetAccess} -> Maybe Bool
enableInternetAccess) (\s :: WorkspaceCreationProperties
s@WorkspaceCreationProperties' {} Maybe Bool
a -> WorkspaceCreationProperties
s {$sel:enableInternetAccess:WorkspaceCreationProperties' :: Maybe Bool
enableInternetAccess = Maybe Bool
a} :: WorkspaceCreationProperties)
workspaceCreationProperties_defaultOu :: Lens.Lens' WorkspaceCreationProperties (Prelude.Maybe Prelude.Text)
workspaceCreationProperties_defaultOu :: (Maybe Text -> f (Maybe Text))
-> WorkspaceCreationProperties -> f WorkspaceCreationProperties
workspaceCreationProperties_defaultOu = (WorkspaceCreationProperties -> Maybe Text)
-> (WorkspaceCreationProperties
-> Maybe Text -> WorkspaceCreationProperties)
-> Lens
WorkspaceCreationProperties
WorkspaceCreationProperties
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceCreationProperties' {Maybe Text
defaultOu :: Maybe Text
$sel:defaultOu:WorkspaceCreationProperties' :: WorkspaceCreationProperties -> Maybe Text
defaultOu} -> Maybe Text
defaultOu) (\s :: WorkspaceCreationProperties
s@WorkspaceCreationProperties' {} Maybe Text
a -> WorkspaceCreationProperties
s {$sel:defaultOu:WorkspaceCreationProperties' :: Maybe Text
defaultOu = Maybe Text
a} :: WorkspaceCreationProperties)
instance Prelude.Hashable WorkspaceCreationProperties
instance Prelude.NFData WorkspaceCreationProperties
instance Core.ToJSON WorkspaceCreationProperties where
toJSON :: WorkspaceCreationProperties -> Value
toJSON WorkspaceCreationProperties' {Maybe Bool
Maybe Text
defaultOu :: Maybe Text
enableInternetAccess :: Maybe Bool
enableMaintenanceMode :: Maybe Bool
enableWorkDocs :: Maybe Bool
userEnabledAsLocalAdministrator :: Maybe Bool
customSecurityGroupId :: Maybe Text
$sel:defaultOu:WorkspaceCreationProperties' :: WorkspaceCreationProperties -> Maybe Text
$sel:enableInternetAccess:WorkspaceCreationProperties' :: WorkspaceCreationProperties -> Maybe Bool
$sel:enableMaintenanceMode:WorkspaceCreationProperties' :: WorkspaceCreationProperties -> Maybe Bool
$sel:enableWorkDocs:WorkspaceCreationProperties' :: WorkspaceCreationProperties -> Maybe Bool
$sel:userEnabledAsLocalAdministrator:WorkspaceCreationProperties' :: WorkspaceCreationProperties -> Maybe Bool
$sel:customSecurityGroupId:WorkspaceCreationProperties' :: WorkspaceCreationProperties -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"CustomSecurityGroupId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
customSecurityGroupId,
(Text
"UserEnabledAsLocalAdministrator" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
userEnabledAsLocalAdministrator,
(Text
"EnableWorkDocs" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enableWorkDocs,
(Text
"EnableMaintenanceMode" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enableMaintenanceMode,
(Text
"EnableInternetAccess" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enableInternetAccess,
(Text
"DefaultOu" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
defaultOu
]
)