module Stratosphere.SageMaker.Cluster.EnvironmentConfigProperty (
        module Exports, EnvironmentConfigProperty(..),
        mkEnvironmentConfigProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.SageMaker.Cluster.FSxLustreConfigProperty as Exports
import Stratosphere.ResourceProperties
data EnvironmentConfigProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-cluster-environmentconfig.html>
    EnvironmentConfigProperty {EnvironmentConfigProperty -> ()
haddock_workaround_ :: (),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-cluster-environmentconfig.html#cfn-sagemaker-cluster-environmentconfig-fsxlustreconfig>
                               EnvironmentConfigProperty -> Maybe FSxLustreConfigProperty
fSxLustreConfig :: (Prelude.Maybe FSxLustreConfigProperty)}
  deriving stock (EnvironmentConfigProperty -> EnvironmentConfigProperty -> Bool
(EnvironmentConfigProperty -> EnvironmentConfigProperty -> Bool)
-> (EnvironmentConfigProperty -> EnvironmentConfigProperty -> Bool)
-> Eq EnvironmentConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EnvironmentConfigProperty -> EnvironmentConfigProperty -> Bool
== :: EnvironmentConfigProperty -> EnvironmentConfigProperty -> Bool
$c/= :: EnvironmentConfigProperty -> EnvironmentConfigProperty -> Bool
/= :: EnvironmentConfigProperty -> EnvironmentConfigProperty -> Bool
Prelude.Eq, Int -> EnvironmentConfigProperty -> ShowS
[EnvironmentConfigProperty] -> ShowS
EnvironmentConfigProperty -> String
(Int -> EnvironmentConfigProperty -> ShowS)
-> (EnvironmentConfigProperty -> String)
-> ([EnvironmentConfigProperty] -> ShowS)
-> Show EnvironmentConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EnvironmentConfigProperty -> ShowS
showsPrec :: Int -> EnvironmentConfigProperty -> ShowS
$cshow :: EnvironmentConfigProperty -> String
show :: EnvironmentConfigProperty -> String
$cshowList :: [EnvironmentConfigProperty] -> ShowS
showList :: [EnvironmentConfigProperty] -> ShowS
Prelude.Show)
mkEnvironmentConfigProperty :: EnvironmentConfigProperty
mkEnvironmentConfigProperty :: EnvironmentConfigProperty
mkEnvironmentConfigProperty
  = EnvironmentConfigProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), fSxLustreConfig :: Maybe FSxLustreConfigProperty
fSxLustreConfig = Maybe FSxLustreConfigProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties EnvironmentConfigProperty where
  toResourceProperties :: EnvironmentConfigProperty -> ResourceProperties
toResourceProperties EnvironmentConfigProperty {Maybe FSxLustreConfigProperty
()
haddock_workaround_ :: EnvironmentConfigProperty -> ()
fSxLustreConfig :: EnvironmentConfigProperty -> Maybe FSxLustreConfigProperty
haddock_workaround_ :: ()
fSxLustreConfig :: Maybe FSxLustreConfigProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SageMaker::Cluster.EnvironmentConfig",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                           [Key -> FSxLustreConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"FSxLustreConfig" (FSxLustreConfigProperty -> (Key, Value))
-> Maybe FSxLustreConfigProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FSxLustreConfigProperty
fSxLustreConfig])}
instance JSON.ToJSON EnvironmentConfigProperty where
  toJSON :: EnvironmentConfigProperty -> Value
toJSON EnvironmentConfigProperty {Maybe FSxLustreConfigProperty
()
haddock_workaround_ :: EnvironmentConfigProperty -> ()
fSxLustreConfig :: EnvironmentConfigProperty -> Maybe FSxLustreConfigProperty
haddock_workaround_ :: ()
fSxLustreConfig :: Maybe FSxLustreConfigProperty
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
              [Key -> FSxLustreConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"FSxLustreConfig" (FSxLustreConfigProperty -> (Key, Value))
-> Maybe FSxLustreConfigProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FSxLustreConfigProperty
fSxLustreConfig]))
instance Property "FSxLustreConfig" EnvironmentConfigProperty where
  type PropertyType "FSxLustreConfig" EnvironmentConfigProperty = FSxLustreConfigProperty
  set :: PropertyType "FSxLustreConfig" EnvironmentConfigProperty
-> EnvironmentConfigProperty -> EnvironmentConfigProperty
set PropertyType "FSxLustreConfig" EnvironmentConfigProperty
newValue EnvironmentConfigProperty {Maybe FSxLustreConfigProperty
()
haddock_workaround_ :: EnvironmentConfigProperty -> ()
fSxLustreConfig :: EnvironmentConfigProperty -> Maybe FSxLustreConfigProperty
haddock_workaround_ :: ()
fSxLustreConfig :: Maybe FSxLustreConfigProperty
..}
    = EnvironmentConfigProperty
        {fSxLustreConfig :: Maybe FSxLustreConfigProperty
fSxLustreConfig = FSxLustreConfigProperty -> Maybe FSxLustreConfigProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "FSxLustreConfig" EnvironmentConfigProperty
FSxLustreConfigProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}