{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.WorkSpaces.Types.WorkspaceRequest
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.WorkSpaces.Types.WorkspaceRequest where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.WorkSpaces.Types.Tag
import Amazonka.WorkSpaces.Types.WorkspaceProperties

-- | Describes the information used to create a WorkSpace.
--
-- /See:/ 'newWorkspaceRequest' smart constructor.
data WorkspaceRequest = WorkspaceRequest'
  { -- | Indicates whether the data stored on the root volume is encrypted.
    WorkspaceRequest -> Maybe Bool
rootVolumeEncryptionEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The tags for the WorkSpace.
    WorkspaceRequest -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | Indicates whether the data stored on the user volume is encrypted.
    WorkspaceRequest -> Maybe Bool
userVolumeEncryptionEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The symmetric KMS key used to encrypt data stored on your WorkSpace.
    -- Amazon WorkSpaces does not support asymmetric KMS keys.
    WorkspaceRequest -> Maybe Text
volumeEncryptionKey :: Prelude.Maybe Prelude.Text,
    -- | The WorkSpace properties.
    WorkspaceRequest -> Maybe WorkspaceProperties
workspaceProperties :: Prelude.Maybe WorkspaceProperties,
    -- | The identifier of the Directory Service directory for the WorkSpace. You
    -- can use DescribeWorkspaceDirectories to list the available directories.
    WorkspaceRequest -> Text
directoryId :: Prelude.Text,
    -- | The user name of the user for the WorkSpace. This user name must exist
    -- in the Directory Service directory for the WorkSpace.
    WorkspaceRequest -> Text
userName :: Prelude.Text,
    -- | The identifier of the bundle for the WorkSpace. You can use
    -- DescribeWorkspaceBundles to list the available bundles.
    WorkspaceRequest -> Text
bundleId :: Prelude.Text
  }
  deriving (WorkspaceRequest -> WorkspaceRequest -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WorkspaceRequest -> WorkspaceRequest -> Bool
$c/= :: WorkspaceRequest -> WorkspaceRequest -> Bool
== :: WorkspaceRequest -> WorkspaceRequest -> Bool
$c== :: WorkspaceRequest -> WorkspaceRequest -> Bool
Prelude.Eq, ReadPrec [WorkspaceRequest]
ReadPrec WorkspaceRequest
Int -> ReadS WorkspaceRequest
ReadS [WorkspaceRequest]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [WorkspaceRequest]
$creadListPrec :: ReadPrec [WorkspaceRequest]
readPrec :: ReadPrec WorkspaceRequest
$creadPrec :: ReadPrec WorkspaceRequest
readList :: ReadS [WorkspaceRequest]
$creadList :: ReadS [WorkspaceRequest]
readsPrec :: Int -> ReadS WorkspaceRequest
$creadsPrec :: Int -> ReadS WorkspaceRequest
Prelude.Read, Int -> WorkspaceRequest -> ShowS
[WorkspaceRequest] -> ShowS
WorkspaceRequest -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WorkspaceRequest] -> ShowS
$cshowList :: [WorkspaceRequest] -> ShowS
show :: WorkspaceRequest -> String
$cshow :: WorkspaceRequest -> String
showsPrec :: Int -> WorkspaceRequest -> ShowS
$cshowsPrec :: Int -> WorkspaceRequest -> ShowS
Prelude.Show, forall x. Rep WorkspaceRequest x -> WorkspaceRequest
forall x. WorkspaceRequest -> Rep WorkspaceRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep WorkspaceRequest x -> WorkspaceRequest
$cfrom :: forall x. WorkspaceRequest -> Rep WorkspaceRequest x
Prelude.Generic)

-- |
-- Create a value of 'WorkspaceRequest' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'rootVolumeEncryptionEnabled', 'workspaceRequest_rootVolumeEncryptionEnabled' - Indicates whether the data stored on the root volume is encrypted.
--
-- 'tags', 'workspaceRequest_tags' - The tags for the WorkSpace.
--
-- 'userVolumeEncryptionEnabled', 'workspaceRequest_userVolumeEncryptionEnabled' - Indicates whether the data stored on the user volume is encrypted.
--
-- 'volumeEncryptionKey', 'workspaceRequest_volumeEncryptionKey' - The symmetric KMS key used to encrypt data stored on your WorkSpace.
-- Amazon WorkSpaces does not support asymmetric KMS keys.
--
-- 'workspaceProperties', 'workspaceRequest_workspaceProperties' - The WorkSpace properties.
--
-- 'directoryId', 'workspaceRequest_directoryId' - The identifier of the Directory Service directory for the WorkSpace. You
-- can use DescribeWorkspaceDirectories to list the available directories.
--
-- 'userName', 'workspaceRequest_userName' - The user name of the user for the WorkSpace. This user name must exist
-- in the Directory Service directory for the WorkSpace.
--
-- 'bundleId', 'workspaceRequest_bundleId' - The identifier of the bundle for the WorkSpace. You can use
-- DescribeWorkspaceBundles to list the available bundles.
newWorkspaceRequest ::
  -- | 'directoryId'
  Prelude.Text ->
  -- | 'userName'
  Prelude.Text ->
  -- | 'bundleId'
  Prelude.Text ->
  WorkspaceRequest
newWorkspaceRequest :: Text -> Text -> Text -> WorkspaceRequest
newWorkspaceRequest
  Text
pDirectoryId_
  Text
pUserName_
  Text
pBundleId_ =
    WorkspaceRequest'
      { $sel:rootVolumeEncryptionEnabled:WorkspaceRequest' :: Maybe Bool
rootVolumeEncryptionEnabled =
          forall a. Maybe a
Prelude.Nothing,
        $sel:tags:WorkspaceRequest' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
        $sel:userVolumeEncryptionEnabled:WorkspaceRequest' :: Maybe Bool
userVolumeEncryptionEnabled = forall a. Maybe a
Prelude.Nothing,
        $sel:volumeEncryptionKey:WorkspaceRequest' :: Maybe Text
volumeEncryptionKey = forall a. Maybe a
Prelude.Nothing,
        $sel:workspaceProperties:WorkspaceRequest' :: Maybe WorkspaceProperties
workspaceProperties = forall a. Maybe a
Prelude.Nothing,
        $sel:directoryId:WorkspaceRequest' :: Text
directoryId = Text
pDirectoryId_,
        $sel:userName:WorkspaceRequest' :: Text
userName = Text
pUserName_,
        $sel:bundleId:WorkspaceRequest' :: Text
bundleId = Text
pBundleId_
      }

-- | Indicates whether the data stored on the root volume is encrypted.
workspaceRequest_rootVolumeEncryptionEnabled :: Lens.Lens' WorkspaceRequest (Prelude.Maybe Prelude.Bool)
workspaceRequest_rootVolumeEncryptionEnabled :: Lens' WorkspaceRequest (Maybe Bool)
workspaceRequest_rootVolumeEncryptionEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceRequest' {Maybe Bool
rootVolumeEncryptionEnabled :: Maybe Bool
$sel:rootVolumeEncryptionEnabled:WorkspaceRequest' :: WorkspaceRequest -> Maybe Bool
rootVolumeEncryptionEnabled} -> Maybe Bool
rootVolumeEncryptionEnabled) (\s :: WorkspaceRequest
s@WorkspaceRequest' {} Maybe Bool
a -> WorkspaceRequest
s {$sel:rootVolumeEncryptionEnabled:WorkspaceRequest' :: Maybe Bool
rootVolumeEncryptionEnabled = Maybe Bool
a} :: WorkspaceRequest)

-- | The tags for the WorkSpace.
workspaceRequest_tags :: Lens.Lens' WorkspaceRequest (Prelude.Maybe [Tag])
workspaceRequest_tags :: Lens' WorkspaceRequest (Maybe [Tag])
workspaceRequest_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceRequest' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:WorkspaceRequest' :: WorkspaceRequest -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: WorkspaceRequest
s@WorkspaceRequest' {} Maybe [Tag]
a -> WorkspaceRequest
s {$sel:tags:WorkspaceRequest' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: WorkspaceRequest) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Indicates whether the data stored on the user volume is encrypted.
workspaceRequest_userVolumeEncryptionEnabled :: Lens.Lens' WorkspaceRequest (Prelude.Maybe Prelude.Bool)
workspaceRequest_userVolumeEncryptionEnabled :: Lens' WorkspaceRequest (Maybe Bool)
workspaceRequest_userVolumeEncryptionEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceRequest' {Maybe Bool
userVolumeEncryptionEnabled :: Maybe Bool
$sel:userVolumeEncryptionEnabled:WorkspaceRequest' :: WorkspaceRequest -> Maybe Bool
userVolumeEncryptionEnabled} -> Maybe Bool
userVolumeEncryptionEnabled) (\s :: WorkspaceRequest
s@WorkspaceRequest' {} Maybe Bool
a -> WorkspaceRequest
s {$sel:userVolumeEncryptionEnabled:WorkspaceRequest' :: Maybe Bool
userVolumeEncryptionEnabled = Maybe Bool
a} :: WorkspaceRequest)

-- | The symmetric KMS key used to encrypt data stored on your WorkSpace.
-- Amazon WorkSpaces does not support asymmetric KMS keys.
workspaceRequest_volumeEncryptionKey :: Lens.Lens' WorkspaceRequest (Prelude.Maybe Prelude.Text)
workspaceRequest_volumeEncryptionKey :: Lens' WorkspaceRequest (Maybe Text)
workspaceRequest_volumeEncryptionKey = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceRequest' {Maybe Text
volumeEncryptionKey :: Maybe Text
$sel:volumeEncryptionKey:WorkspaceRequest' :: WorkspaceRequest -> Maybe Text
volumeEncryptionKey} -> Maybe Text
volumeEncryptionKey) (\s :: WorkspaceRequest
s@WorkspaceRequest' {} Maybe Text
a -> WorkspaceRequest
s {$sel:volumeEncryptionKey:WorkspaceRequest' :: Maybe Text
volumeEncryptionKey = Maybe Text
a} :: WorkspaceRequest)

-- | The WorkSpace properties.
workspaceRequest_workspaceProperties :: Lens.Lens' WorkspaceRequest (Prelude.Maybe WorkspaceProperties)
workspaceRequest_workspaceProperties :: Lens' WorkspaceRequest (Maybe WorkspaceProperties)
workspaceRequest_workspaceProperties = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceRequest' {Maybe WorkspaceProperties
workspaceProperties :: Maybe WorkspaceProperties
$sel:workspaceProperties:WorkspaceRequest' :: WorkspaceRequest -> Maybe WorkspaceProperties
workspaceProperties} -> Maybe WorkspaceProperties
workspaceProperties) (\s :: WorkspaceRequest
s@WorkspaceRequest' {} Maybe WorkspaceProperties
a -> WorkspaceRequest
s {$sel:workspaceProperties:WorkspaceRequest' :: Maybe WorkspaceProperties
workspaceProperties = Maybe WorkspaceProperties
a} :: WorkspaceRequest)

-- | The identifier of the Directory Service directory for the WorkSpace. You
-- can use DescribeWorkspaceDirectories to list the available directories.
workspaceRequest_directoryId :: Lens.Lens' WorkspaceRequest Prelude.Text
workspaceRequest_directoryId :: Lens' WorkspaceRequest Text
workspaceRequest_directoryId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceRequest' {Text
directoryId :: Text
$sel:directoryId:WorkspaceRequest' :: WorkspaceRequest -> Text
directoryId} -> Text
directoryId) (\s :: WorkspaceRequest
s@WorkspaceRequest' {} Text
a -> WorkspaceRequest
s {$sel:directoryId:WorkspaceRequest' :: Text
directoryId = Text
a} :: WorkspaceRequest)

-- | The user name of the user for the WorkSpace. This user name must exist
-- in the Directory Service directory for the WorkSpace.
workspaceRequest_userName :: Lens.Lens' WorkspaceRequest Prelude.Text
workspaceRequest_userName :: Lens' WorkspaceRequest Text
workspaceRequest_userName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceRequest' {Text
userName :: Text
$sel:userName:WorkspaceRequest' :: WorkspaceRequest -> Text
userName} -> Text
userName) (\s :: WorkspaceRequest
s@WorkspaceRequest' {} Text
a -> WorkspaceRequest
s {$sel:userName:WorkspaceRequest' :: Text
userName = Text
a} :: WorkspaceRequest)

-- | The identifier of the bundle for the WorkSpace. You can use
-- DescribeWorkspaceBundles to list the available bundles.
workspaceRequest_bundleId :: Lens.Lens' WorkspaceRequest Prelude.Text
workspaceRequest_bundleId :: Lens' WorkspaceRequest Text
workspaceRequest_bundleId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceRequest' {Text
bundleId :: Text
$sel:bundleId:WorkspaceRequest' :: WorkspaceRequest -> Text
bundleId} -> Text
bundleId) (\s :: WorkspaceRequest
s@WorkspaceRequest' {} Text
a -> WorkspaceRequest
s {$sel:bundleId:WorkspaceRequest' :: Text
bundleId = Text
a} :: WorkspaceRequest)

instance Data.FromJSON WorkspaceRequest where
  parseJSON :: Value -> Parser WorkspaceRequest
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"WorkspaceRequest"
      ( \Object
x ->
          Maybe Bool
-> Maybe [Tag]
-> Maybe Bool
-> Maybe Text
-> Maybe WorkspaceProperties
-> Text
-> Text
-> Text
-> WorkspaceRequest
WorkspaceRequest'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"RootVolumeEncryptionEnabled")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Tags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"UserVolumeEncryptionEnabled")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"VolumeEncryptionKey")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"WorkspaceProperties")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"DirectoryId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"UserName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"BundleId")
      )

instance Prelude.Hashable WorkspaceRequest where
  hashWithSalt :: Int -> WorkspaceRequest -> Int
hashWithSalt Int
_salt WorkspaceRequest' {Maybe Bool
Maybe [Tag]
Maybe Text
Maybe WorkspaceProperties
Text
bundleId :: Text
userName :: Text
directoryId :: Text
workspaceProperties :: Maybe WorkspaceProperties
volumeEncryptionKey :: Maybe Text
userVolumeEncryptionEnabled :: Maybe Bool
tags :: Maybe [Tag]
rootVolumeEncryptionEnabled :: Maybe Bool
$sel:bundleId:WorkspaceRequest' :: WorkspaceRequest -> Text
$sel:userName:WorkspaceRequest' :: WorkspaceRequest -> Text
$sel:directoryId:WorkspaceRequest' :: WorkspaceRequest -> Text
$sel:workspaceProperties:WorkspaceRequest' :: WorkspaceRequest -> Maybe WorkspaceProperties
$sel:volumeEncryptionKey:WorkspaceRequest' :: WorkspaceRequest -> Maybe Text
$sel:userVolumeEncryptionEnabled:WorkspaceRequest' :: WorkspaceRequest -> Maybe Bool
$sel:tags:WorkspaceRequest' :: WorkspaceRequest -> Maybe [Tag]
$sel:rootVolumeEncryptionEnabled:WorkspaceRequest' :: WorkspaceRequest -> Maybe Bool
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
rootVolumeEncryptionEnabled
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
userVolumeEncryptionEnabled
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
volumeEncryptionKey
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe WorkspaceProperties
workspaceProperties
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
directoryId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
userName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
bundleId

instance Prelude.NFData WorkspaceRequest where
  rnf :: WorkspaceRequest -> ()
rnf WorkspaceRequest' {Maybe Bool
Maybe [Tag]
Maybe Text
Maybe WorkspaceProperties
Text
bundleId :: Text
userName :: Text
directoryId :: Text
workspaceProperties :: Maybe WorkspaceProperties
volumeEncryptionKey :: Maybe Text
userVolumeEncryptionEnabled :: Maybe Bool
tags :: Maybe [Tag]
rootVolumeEncryptionEnabled :: Maybe Bool
$sel:bundleId:WorkspaceRequest' :: WorkspaceRequest -> Text
$sel:userName:WorkspaceRequest' :: WorkspaceRequest -> Text
$sel:directoryId:WorkspaceRequest' :: WorkspaceRequest -> Text
$sel:workspaceProperties:WorkspaceRequest' :: WorkspaceRequest -> Maybe WorkspaceProperties
$sel:volumeEncryptionKey:WorkspaceRequest' :: WorkspaceRequest -> Maybe Text
$sel:userVolumeEncryptionEnabled:WorkspaceRequest' :: WorkspaceRequest -> Maybe Bool
$sel:tags:WorkspaceRequest' :: WorkspaceRequest -> Maybe [Tag]
$sel:rootVolumeEncryptionEnabled:WorkspaceRequest' :: WorkspaceRequest -> Maybe Bool
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
rootVolumeEncryptionEnabled
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
userVolumeEncryptionEnabled
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
volumeEncryptionKey
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe WorkspaceProperties
workspaceProperties
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
directoryId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
userName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
bundleId

instance Data.ToJSON WorkspaceRequest where
  toJSON :: WorkspaceRequest -> Value
toJSON WorkspaceRequest' {Maybe Bool
Maybe [Tag]
Maybe Text
Maybe WorkspaceProperties
Text
bundleId :: Text
userName :: Text
directoryId :: Text
workspaceProperties :: Maybe WorkspaceProperties
volumeEncryptionKey :: Maybe Text
userVolumeEncryptionEnabled :: Maybe Bool
tags :: Maybe [Tag]
rootVolumeEncryptionEnabled :: Maybe Bool
$sel:bundleId:WorkspaceRequest' :: WorkspaceRequest -> Text
$sel:userName:WorkspaceRequest' :: WorkspaceRequest -> Text
$sel:directoryId:WorkspaceRequest' :: WorkspaceRequest -> Text
$sel:workspaceProperties:WorkspaceRequest' :: WorkspaceRequest -> Maybe WorkspaceProperties
$sel:volumeEncryptionKey:WorkspaceRequest' :: WorkspaceRequest -> Maybe Text
$sel:userVolumeEncryptionEnabled:WorkspaceRequest' :: WorkspaceRequest -> Maybe Bool
$sel:tags:WorkspaceRequest' :: WorkspaceRequest -> Maybe [Tag]
$sel:rootVolumeEncryptionEnabled:WorkspaceRequest' :: WorkspaceRequest -> Maybe Bool
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"RootVolumeEncryptionEnabled" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
rootVolumeEncryptionEnabled,
            (Key
"Tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
            (Key
"UserVolumeEncryptionEnabled" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
userVolumeEncryptionEnabled,
            (Key
"VolumeEncryptionKey" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
volumeEncryptionKey,
            (Key
"WorkspaceProperties" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe WorkspaceProperties
workspaceProperties,
            forall a. a -> Maybe a
Prelude.Just (Key
"DirectoryId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
directoryId),
            forall a. a -> Maybe a
Prelude.Just (Key
"UserName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
userName),
            forall a. a -> Maybe a
Prelude.Just (Key
"BundleId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
bundleId)
          ]
      )