module Stratosphere.SageMaker.Space.SpaceAppLifecycleManagementProperty (
        module Exports, SpaceAppLifecycleManagementProperty(..),
        mkSpaceAppLifecycleManagementProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.SageMaker.Space.SpaceIdleSettingsProperty as Exports
import Stratosphere.ResourceProperties
data SpaceAppLifecycleManagementProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-space-spaceapplifecyclemanagement.html>
    SpaceAppLifecycleManagementProperty {SpaceAppLifecycleManagementProperty -> ()
haddock_workaround_ :: (),
                                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-space-spaceapplifecyclemanagement.html#cfn-sagemaker-space-spaceapplifecyclemanagement-idlesettings>
                                         SpaceAppLifecycleManagementProperty
-> Maybe SpaceIdleSettingsProperty
idleSettings :: (Prelude.Maybe SpaceIdleSettingsProperty)}
  deriving stock (SpaceAppLifecycleManagementProperty
-> SpaceAppLifecycleManagementProperty -> Bool
(SpaceAppLifecycleManagementProperty
 -> SpaceAppLifecycleManagementProperty -> Bool)
-> (SpaceAppLifecycleManagementProperty
    -> SpaceAppLifecycleManagementProperty -> Bool)
-> Eq SpaceAppLifecycleManagementProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SpaceAppLifecycleManagementProperty
-> SpaceAppLifecycleManagementProperty -> Bool
== :: SpaceAppLifecycleManagementProperty
-> SpaceAppLifecycleManagementProperty -> Bool
$c/= :: SpaceAppLifecycleManagementProperty
-> SpaceAppLifecycleManagementProperty -> Bool
/= :: SpaceAppLifecycleManagementProperty
-> SpaceAppLifecycleManagementProperty -> Bool
Prelude.Eq, Int -> SpaceAppLifecycleManagementProperty -> ShowS
[SpaceAppLifecycleManagementProperty] -> ShowS
SpaceAppLifecycleManagementProperty -> String
(Int -> SpaceAppLifecycleManagementProperty -> ShowS)
-> (SpaceAppLifecycleManagementProperty -> String)
-> ([SpaceAppLifecycleManagementProperty] -> ShowS)
-> Show SpaceAppLifecycleManagementProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SpaceAppLifecycleManagementProperty -> ShowS
showsPrec :: Int -> SpaceAppLifecycleManagementProperty -> ShowS
$cshow :: SpaceAppLifecycleManagementProperty -> String
show :: SpaceAppLifecycleManagementProperty -> String
$cshowList :: [SpaceAppLifecycleManagementProperty] -> ShowS
showList :: [SpaceAppLifecycleManagementProperty] -> ShowS
Prelude.Show)
mkSpaceAppLifecycleManagementProperty ::
  SpaceAppLifecycleManagementProperty
mkSpaceAppLifecycleManagementProperty :: SpaceAppLifecycleManagementProperty
mkSpaceAppLifecycleManagementProperty
  = SpaceAppLifecycleManagementProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), idleSettings :: Maybe SpaceIdleSettingsProperty
idleSettings = Maybe SpaceIdleSettingsProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SpaceAppLifecycleManagementProperty where
  toResourceProperties :: SpaceAppLifecycleManagementProperty -> ResourceProperties
toResourceProperties SpaceAppLifecycleManagementProperty {Maybe SpaceIdleSettingsProperty
()
haddock_workaround_ :: SpaceAppLifecycleManagementProperty -> ()
idleSettings :: SpaceAppLifecycleManagementProperty
-> Maybe SpaceIdleSettingsProperty
haddock_workaround_ :: ()
idleSettings :: Maybe SpaceIdleSettingsProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SageMaker::Space.SpaceAppLifecycleManagement",
         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 -> SpaceIdleSettingsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"IdleSettings" (SpaceIdleSettingsProperty -> (Key, Value))
-> Maybe SpaceIdleSettingsProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SpaceIdleSettingsProperty
idleSettings])}
instance JSON.ToJSON SpaceAppLifecycleManagementProperty where
  toJSON :: SpaceAppLifecycleManagementProperty -> Value
toJSON SpaceAppLifecycleManagementProperty {Maybe SpaceIdleSettingsProperty
()
haddock_workaround_ :: SpaceAppLifecycleManagementProperty -> ()
idleSettings :: SpaceAppLifecycleManagementProperty
-> Maybe SpaceIdleSettingsProperty
haddock_workaround_ :: ()
idleSettings :: Maybe SpaceIdleSettingsProperty
..}
    = [(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 -> SpaceIdleSettingsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"IdleSettings" (SpaceIdleSettingsProperty -> (Key, Value))
-> Maybe SpaceIdleSettingsProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SpaceIdleSettingsProperty
idleSettings]))
instance Property "IdleSettings" SpaceAppLifecycleManagementProperty where
  type PropertyType "IdleSettings" SpaceAppLifecycleManagementProperty = SpaceIdleSettingsProperty
  set :: PropertyType "IdleSettings" SpaceAppLifecycleManagementProperty
-> SpaceAppLifecycleManagementProperty
-> SpaceAppLifecycleManagementProperty
set PropertyType "IdleSettings" SpaceAppLifecycleManagementProperty
newValue SpaceAppLifecycleManagementProperty {Maybe SpaceIdleSettingsProperty
()
haddock_workaround_ :: SpaceAppLifecycleManagementProperty -> ()
idleSettings :: SpaceAppLifecycleManagementProperty
-> Maybe SpaceIdleSettingsProperty
haddock_workaround_ :: ()
idleSettings :: Maybe SpaceIdleSettingsProperty
..}
    = SpaceAppLifecycleManagementProperty
        {idleSettings :: Maybe SpaceIdleSettingsProperty
idleSettings = SpaceIdleSettingsProperty -> Maybe SpaceIdleSettingsProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "IdleSettings" SpaceAppLifecycleManagementProperty
SpaceIdleSettingsProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}