{-# 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.Nimble.Types.StudioComponentConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Nimble.Types.ActiveDirectoryConfiguration
import Amazonka.Nimble.Types.ComputeFarmConfiguration
import Amazonka.Nimble.Types.LicenseServiceConfiguration
import Amazonka.Nimble.Types.SharedFileSystemConfiguration
import qualified Amazonka.Prelude as Prelude
data StudioComponentConfiguration = StudioComponentConfiguration'
{
StudioComponentConfiguration -> Maybe ActiveDirectoryConfiguration
activeDirectoryConfiguration :: Prelude.Maybe ActiveDirectoryConfiguration,
StudioComponentConfiguration -> Maybe LicenseServiceConfiguration
licenseServiceConfiguration :: Prelude.Maybe LicenseServiceConfiguration,
StudioComponentConfiguration -> Maybe SharedFileSystemConfiguration
sharedFileSystemConfiguration :: Prelude.Maybe SharedFileSystemConfiguration,
StudioComponentConfiguration -> Maybe ComputeFarmConfiguration
computeFarmConfiguration :: Prelude.Maybe ComputeFarmConfiguration
}
deriving (StudioComponentConfiguration
-> StudioComponentConfiguration -> Bool
(StudioComponentConfiguration
-> StudioComponentConfiguration -> Bool)
-> (StudioComponentConfiguration
-> StudioComponentConfiguration -> Bool)
-> Eq StudioComponentConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StudioComponentConfiguration
-> StudioComponentConfiguration -> Bool
$c/= :: StudioComponentConfiguration
-> StudioComponentConfiguration -> Bool
== :: StudioComponentConfiguration
-> StudioComponentConfiguration -> Bool
$c== :: StudioComponentConfiguration
-> StudioComponentConfiguration -> Bool
Prelude.Eq, ReadPrec [StudioComponentConfiguration]
ReadPrec StudioComponentConfiguration
Int -> ReadS StudioComponentConfiguration
ReadS [StudioComponentConfiguration]
(Int -> ReadS StudioComponentConfiguration)
-> ReadS [StudioComponentConfiguration]
-> ReadPrec StudioComponentConfiguration
-> ReadPrec [StudioComponentConfiguration]
-> Read StudioComponentConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StudioComponentConfiguration]
$creadListPrec :: ReadPrec [StudioComponentConfiguration]
readPrec :: ReadPrec StudioComponentConfiguration
$creadPrec :: ReadPrec StudioComponentConfiguration
readList :: ReadS [StudioComponentConfiguration]
$creadList :: ReadS [StudioComponentConfiguration]
readsPrec :: Int -> ReadS StudioComponentConfiguration
$creadsPrec :: Int -> ReadS StudioComponentConfiguration
Prelude.Read, Int -> StudioComponentConfiguration -> ShowS
[StudioComponentConfiguration] -> ShowS
StudioComponentConfiguration -> String
(Int -> StudioComponentConfiguration -> ShowS)
-> (StudioComponentConfiguration -> String)
-> ([StudioComponentConfiguration] -> ShowS)
-> Show StudioComponentConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StudioComponentConfiguration] -> ShowS
$cshowList :: [StudioComponentConfiguration] -> ShowS
show :: StudioComponentConfiguration -> String
$cshow :: StudioComponentConfiguration -> String
showsPrec :: Int -> StudioComponentConfiguration -> ShowS
$cshowsPrec :: Int -> StudioComponentConfiguration -> ShowS
Prelude.Show, (forall x.
StudioComponentConfiguration -> Rep StudioComponentConfiguration x)
-> (forall x.
Rep StudioComponentConfiguration x -> StudioComponentConfiguration)
-> Generic StudioComponentConfiguration
forall x.
Rep StudioComponentConfiguration x -> StudioComponentConfiguration
forall x.
StudioComponentConfiguration -> Rep StudioComponentConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StudioComponentConfiguration x -> StudioComponentConfiguration
$cfrom :: forall x.
StudioComponentConfiguration -> Rep StudioComponentConfiguration x
Prelude.Generic)
newStudioComponentConfiguration ::
StudioComponentConfiguration
newStudioComponentConfiguration :: StudioComponentConfiguration
newStudioComponentConfiguration =
StudioComponentConfiguration' :: Maybe ActiveDirectoryConfiguration
-> Maybe LicenseServiceConfiguration
-> Maybe SharedFileSystemConfiguration
-> Maybe ComputeFarmConfiguration
-> StudioComponentConfiguration
StudioComponentConfiguration'
{ $sel:activeDirectoryConfiguration:StudioComponentConfiguration' :: Maybe ActiveDirectoryConfiguration
activeDirectoryConfiguration =
Maybe ActiveDirectoryConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:licenseServiceConfiguration:StudioComponentConfiguration' :: Maybe LicenseServiceConfiguration
licenseServiceConfiguration = Maybe LicenseServiceConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:sharedFileSystemConfiguration:StudioComponentConfiguration' :: Maybe SharedFileSystemConfiguration
sharedFileSystemConfiguration =
Maybe SharedFileSystemConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:computeFarmConfiguration:StudioComponentConfiguration' :: Maybe ComputeFarmConfiguration
computeFarmConfiguration = Maybe ComputeFarmConfiguration
forall a. Maybe a
Prelude.Nothing
}
studioComponentConfiguration_activeDirectoryConfiguration :: Lens.Lens' StudioComponentConfiguration (Prelude.Maybe ActiveDirectoryConfiguration)
studioComponentConfiguration_activeDirectoryConfiguration :: (Maybe ActiveDirectoryConfiguration
-> f (Maybe ActiveDirectoryConfiguration))
-> StudioComponentConfiguration -> f StudioComponentConfiguration
studioComponentConfiguration_activeDirectoryConfiguration = (StudioComponentConfiguration
-> Maybe ActiveDirectoryConfiguration)
-> (StudioComponentConfiguration
-> Maybe ActiveDirectoryConfiguration
-> StudioComponentConfiguration)
-> Lens
StudioComponentConfiguration
StudioComponentConfiguration
(Maybe ActiveDirectoryConfiguration)
(Maybe ActiveDirectoryConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StudioComponentConfiguration' {Maybe ActiveDirectoryConfiguration
activeDirectoryConfiguration :: Maybe ActiveDirectoryConfiguration
$sel:activeDirectoryConfiguration:StudioComponentConfiguration' :: StudioComponentConfiguration -> Maybe ActiveDirectoryConfiguration
activeDirectoryConfiguration} -> Maybe ActiveDirectoryConfiguration
activeDirectoryConfiguration) (\s :: StudioComponentConfiguration
s@StudioComponentConfiguration' {} Maybe ActiveDirectoryConfiguration
a -> StudioComponentConfiguration
s {$sel:activeDirectoryConfiguration:StudioComponentConfiguration' :: Maybe ActiveDirectoryConfiguration
activeDirectoryConfiguration = Maybe ActiveDirectoryConfiguration
a} :: StudioComponentConfiguration)
studioComponentConfiguration_licenseServiceConfiguration :: Lens.Lens' StudioComponentConfiguration (Prelude.Maybe LicenseServiceConfiguration)
studioComponentConfiguration_licenseServiceConfiguration :: (Maybe LicenseServiceConfiguration
-> f (Maybe LicenseServiceConfiguration))
-> StudioComponentConfiguration -> f StudioComponentConfiguration
studioComponentConfiguration_licenseServiceConfiguration = (StudioComponentConfiguration -> Maybe LicenseServiceConfiguration)
-> (StudioComponentConfiguration
-> Maybe LicenseServiceConfiguration
-> StudioComponentConfiguration)
-> Lens
StudioComponentConfiguration
StudioComponentConfiguration
(Maybe LicenseServiceConfiguration)
(Maybe LicenseServiceConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StudioComponentConfiguration' {Maybe LicenseServiceConfiguration
licenseServiceConfiguration :: Maybe LicenseServiceConfiguration
$sel:licenseServiceConfiguration:StudioComponentConfiguration' :: StudioComponentConfiguration -> Maybe LicenseServiceConfiguration
licenseServiceConfiguration} -> Maybe LicenseServiceConfiguration
licenseServiceConfiguration) (\s :: StudioComponentConfiguration
s@StudioComponentConfiguration' {} Maybe LicenseServiceConfiguration
a -> StudioComponentConfiguration
s {$sel:licenseServiceConfiguration:StudioComponentConfiguration' :: Maybe LicenseServiceConfiguration
licenseServiceConfiguration = Maybe LicenseServiceConfiguration
a} :: StudioComponentConfiguration)
studioComponentConfiguration_sharedFileSystemConfiguration :: Lens.Lens' StudioComponentConfiguration (Prelude.Maybe SharedFileSystemConfiguration)
studioComponentConfiguration_sharedFileSystemConfiguration :: (Maybe SharedFileSystemConfiguration
-> f (Maybe SharedFileSystemConfiguration))
-> StudioComponentConfiguration -> f StudioComponentConfiguration
studioComponentConfiguration_sharedFileSystemConfiguration = (StudioComponentConfiguration
-> Maybe SharedFileSystemConfiguration)
-> (StudioComponentConfiguration
-> Maybe SharedFileSystemConfiguration
-> StudioComponentConfiguration)
-> Lens
StudioComponentConfiguration
StudioComponentConfiguration
(Maybe SharedFileSystemConfiguration)
(Maybe SharedFileSystemConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StudioComponentConfiguration' {Maybe SharedFileSystemConfiguration
sharedFileSystemConfiguration :: Maybe SharedFileSystemConfiguration
$sel:sharedFileSystemConfiguration:StudioComponentConfiguration' :: StudioComponentConfiguration -> Maybe SharedFileSystemConfiguration
sharedFileSystemConfiguration} -> Maybe SharedFileSystemConfiguration
sharedFileSystemConfiguration) (\s :: StudioComponentConfiguration
s@StudioComponentConfiguration' {} Maybe SharedFileSystemConfiguration
a -> StudioComponentConfiguration
s {$sel:sharedFileSystemConfiguration:StudioComponentConfiguration' :: Maybe SharedFileSystemConfiguration
sharedFileSystemConfiguration = Maybe SharedFileSystemConfiguration
a} :: StudioComponentConfiguration)
studioComponentConfiguration_computeFarmConfiguration :: Lens.Lens' StudioComponentConfiguration (Prelude.Maybe ComputeFarmConfiguration)
studioComponentConfiguration_computeFarmConfiguration :: (Maybe ComputeFarmConfiguration
-> f (Maybe ComputeFarmConfiguration))
-> StudioComponentConfiguration -> f StudioComponentConfiguration
studioComponentConfiguration_computeFarmConfiguration = (StudioComponentConfiguration -> Maybe ComputeFarmConfiguration)
-> (StudioComponentConfiguration
-> Maybe ComputeFarmConfiguration -> StudioComponentConfiguration)
-> Lens
StudioComponentConfiguration
StudioComponentConfiguration
(Maybe ComputeFarmConfiguration)
(Maybe ComputeFarmConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StudioComponentConfiguration' {Maybe ComputeFarmConfiguration
computeFarmConfiguration :: Maybe ComputeFarmConfiguration
$sel:computeFarmConfiguration:StudioComponentConfiguration' :: StudioComponentConfiguration -> Maybe ComputeFarmConfiguration
computeFarmConfiguration} -> Maybe ComputeFarmConfiguration
computeFarmConfiguration) (\s :: StudioComponentConfiguration
s@StudioComponentConfiguration' {} Maybe ComputeFarmConfiguration
a -> StudioComponentConfiguration
s {$sel:computeFarmConfiguration:StudioComponentConfiguration' :: Maybe ComputeFarmConfiguration
computeFarmConfiguration = Maybe ComputeFarmConfiguration
a} :: StudioComponentConfiguration)
instance Core.FromJSON StudioComponentConfiguration where
parseJSON :: Value -> Parser StudioComponentConfiguration
parseJSON =
String
-> (Object -> Parser StudioComponentConfiguration)
-> Value
-> Parser StudioComponentConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"StudioComponentConfiguration"
( \Object
x ->
Maybe ActiveDirectoryConfiguration
-> Maybe LicenseServiceConfiguration
-> Maybe SharedFileSystemConfiguration
-> Maybe ComputeFarmConfiguration
-> StudioComponentConfiguration
StudioComponentConfiguration'
(Maybe ActiveDirectoryConfiguration
-> Maybe LicenseServiceConfiguration
-> Maybe SharedFileSystemConfiguration
-> Maybe ComputeFarmConfiguration
-> StudioComponentConfiguration)
-> Parser (Maybe ActiveDirectoryConfiguration)
-> Parser
(Maybe LicenseServiceConfiguration
-> Maybe SharedFileSystemConfiguration
-> Maybe ComputeFarmConfiguration
-> StudioComponentConfiguration)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ActiveDirectoryConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"activeDirectoryConfiguration")
Parser
(Maybe LicenseServiceConfiguration
-> Maybe SharedFileSystemConfiguration
-> Maybe ComputeFarmConfiguration
-> StudioComponentConfiguration)
-> Parser (Maybe LicenseServiceConfiguration)
-> Parser
(Maybe SharedFileSystemConfiguration
-> Maybe ComputeFarmConfiguration -> StudioComponentConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LicenseServiceConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"licenseServiceConfiguration")
Parser
(Maybe SharedFileSystemConfiguration
-> Maybe ComputeFarmConfiguration -> StudioComponentConfiguration)
-> Parser (Maybe SharedFileSystemConfiguration)
-> Parser
(Maybe ComputeFarmConfiguration -> StudioComponentConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SharedFileSystemConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"sharedFileSystemConfiguration")
Parser
(Maybe ComputeFarmConfiguration -> StudioComponentConfiguration)
-> Parser (Maybe ComputeFarmConfiguration)
-> Parser StudioComponentConfiguration
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ComputeFarmConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"computeFarmConfiguration")
)
instance
Prelude.Hashable
StudioComponentConfiguration
instance Prelude.NFData StudioComponentConfiguration
instance Core.ToJSON StudioComponentConfiguration where
toJSON :: StudioComponentConfiguration -> Value
toJSON StudioComponentConfiguration' {Maybe ActiveDirectoryConfiguration
Maybe ComputeFarmConfiguration
Maybe LicenseServiceConfiguration
Maybe SharedFileSystemConfiguration
computeFarmConfiguration :: Maybe ComputeFarmConfiguration
sharedFileSystemConfiguration :: Maybe SharedFileSystemConfiguration
licenseServiceConfiguration :: Maybe LicenseServiceConfiguration
activeDirectoryConfiguration :: Maybe ActiveDirectoryConfiguration
$sel:computeFarmConfiguration:StudioComponentConfiguration' :: StudioComponentConfiguration -> Maybe ComputeFarmConfiguration
$sel:sharedFileSystemConfiguration:StudioComponentConfiguration' :: StudioComponentConfiguration -> Maybe SharedFileSystemConfiguration
$sel:licenseServiceConfiguration:StudioComponentConfiguration' :: StudioComponentConfiguration -> Maybe LicenseServiceConfiguration
$sel:activeDirectoryConfiguration:StudioComponentConfiguration' :: StudioComponentConfiguration -> Maybe ActiveDirectoryConfiguration
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"activeDirectoryConfiguration" Text -> ActiveDirectoryConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ActiveDirectoryConfiguration -> Pair)
-> Maybe ActiveDirectoryConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ActiveDirectoryConfiguration
activeDirectoryConfiguration,
(Text
"licenseServiceConfiguration" Text -> LicenseServiceConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(LicenseServiceConfiguration -> Pair)
-> Maybe LicenseServiceConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LicenseServiceConfiguration
licenseServiceConfiguration,
(Text
"sharedFileSystemConfiguration" Text -> SharedFileSystemConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(SharedFileSystemConfiguration -> Pair)
-> Maybe SharedFileSystemConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SharedFileSystemConfiguration
sharedFileSystemConfiguration,
(Text
"computeFarmConfiguration" Text -> ComputeFarmConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ComputeFarmConfiguration -> Pair)
-> Maybe ComputeFarmConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ComputeFarmConfiguration
computeFarmConfiguration
]
)