module Stratosphere.SageMaker.NotebookInstanceLifecycleConfig (
        module Exports, NotebookInstanceLifecycleConfig(..),
        mkNotebookInstanceLifecycleConfig
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.SageMaker.NotebookInstanceLifecycleConfig.NotebookInstanceLifecycleHookProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data NotebookInstanceLifecycleConfig
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-notebookinstancelifecycleconfig.html>
    NotebookInstanceLifecycleConfig {NotebookInstanceLifecycleConfig -> ()
haddock_workaround_ :: (),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-notebookinstancelifecycleconfig.html#cfn-sagemaker-notebookinstancelifecycleconfig-notebookinstancelifecycleconfigname>
                                     NotebookInstanceLifecycleConfig -> Maybe (Value Text)
notebookInstanceLifecycleConfigName :: (Prelude.Maybe (Value Prelude.Text)),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-notebookinstancelifecycleconfig.html#cfn-sagemaker-notebookinstancelifecycleconfig-oncreate>
                                     NotebookInstanceLifecycleConfig
-> Maybe [NotebookInstanceLifecycleHookProperty]
onCreate :: (Prelude.Maybe [NotebookInstanceLifecycleHookProperty]),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-notebookinstancelifecycleconfig.html#cfn-sagemaker-notebookinstancelifecycleconfig-onstart>
                                     NotebookInstanceLifecycleConfig
-> Maybe [NotebookInstanceLifecycleHookProperty]
onStart :: (Prelude.Maybe [NotebookInstanceLifecycleHookProperty])}
  deriving stock (NotebookInstanceLifecycleConfig
-> NotebookInstanceLifecycleConfig -> Bool
(NotebookInstanceLifecycleConfig
 -> NotebookInstanceLifecycleConfig -> Bool)
-> (NotebookInstanceLifecycleConfig
    -> NotebookInstanceLifecycleConfig -> Bool)
-> Eq NotebookInstanceLifecycleConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: NotebookInstanceLifecycleConfig
-> NotebookInstanceLifecycleConfig -> Bool
== :: NotebookInstanceLifecycleConfig
-> NotebookInstanceLifecycleConfig -> Bool
$c/= :: NotebookInstanceLifecycleConfig
-> NotebookInstanceLifecycleConfig -> Bool
/= :: NotebookInstanceLifecycleConfig
-> NotebookInstanceLifecycleConfig -> Bool
Prelude.Eq, Int -> NotebookInstanceLifecycleConfig -> ShowS
[NotebookInstanceLifecycleConfig] -> ShowS
NotebookInstanceLifecycleConfig -> String
(Int -> NotebookInstanceLifecycleConfig -> ShowS)
-> (NotebookInstanceLifecycleConfig -> String)
-> ([NotebookInstanceLifecycleConfig] -> ShowS)
-> Show NotebookInstanceLifecycleConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> NotebookInstanceLifecycleConfig -> ShowS
showsPrec :: Int -> NotebookInstanceLifecycleConfig -> ShowS
$cshow :: NotebookInstanceLifecycleConfig -> String
show :: NotebookInstanceLifecycleConfig -> String
$cshowList :: [NotebookInstanceLifecycleConfig] -> ShowS
showList :: [NotebookInstanceLifecycleConfig] -> ShowS
Prelude.Show)
mkNotebookInstanceLifecycleConfig ::
  NotebookInstanceLifecycleConfig
mkNotebookInstanceLifecycleConfig :: NotebookInstanceLifecycleConfig
mkNotebookInstanceLifecycleConfig
  = NotebookInstanceLifecycleConfig
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       notebookInstanceLifecycleConfigName :: Maybe (Value Text)
notebookInstanceLifecycleConfigName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       onCreate :: Maybe [NotebookInstanceLifecycleHookProperty]
onCreate = Maybe [NotebookInstanceLifecycleHookProperty]
forall a. Maybe a
Prelude.Nothing, onStart :: Maybe [NotebookInstanceLifecycleHookProperty]
onStart = Maybe [NotebookInstanceLifecycleHookProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties NotebookInstanceLifecycleConfig where
  toResourceProperties :: NotebookInstanceLifecycleConfig -> ResourceProperties
toResourceProperties NotebookInstanceLifecycleConfig {Maybe [NotebookInstanceLifecycleHookProperty]
Maybe (Value Text)
()
haddock_workaround_ :: NotebookInstanceLifecycleConfig -> ()
notebookInstanceLifecycleConfigName :: NotebookInstanceLifecycleConfig -> Maybe (Value Text)
onCreate :: NotebookInstanceLifecycleConfig
-> Maybe [NotebookInstanceLifecycleHookProperty]
onStart :: NotebookInstanceLifecycleConfig
-> Maybe [NotebookInstanceLifecycleHookProperty]
haddock_workaround_ :: ()
notebookInstanceLifecycleConfigName :: Maybe (Value Text)
onCreate :: Maybe [NotebookInstanceLifecycleHookProperty]
onStart :: Maybe [NotebookInstanceLifecycleHookProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SageMaker::NotebookInstanceLifecycleConfig",
         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 -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"NotebookInstanceLifecycleConfigName"
                              (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
notebookInstanceLifecycleConfigName,
                            Key -> [NotebookInstanceLifecycleHookProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"OnCreate" ([NotebookInstanceLifecycleHookProperty] -> (Key, Value))
-> Maybe [NotebookInstanceLifecycleHookProperty]
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [NotebookInstanceLifecycleHookProperty]
onCreate,
                            Key -> [NotebookInstanceLifecycleHookProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"OnStart" ([NotebookInstanceLifecycleHookProperty] -> (Key, Value))
-> Maybe [NotebookInstanceLifecycleHookProperty]
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [NotebookInstanceLifecycleHookProperty]
onStart])}
instance JSON.ToJSON NotebookInstanceLifecycleConfig where
  toJSON :: NotebookInstanceLifecycleConfig -> Value
toJSON NotebookInstanceLifecycleConfig {Maybe [NotebookInstanceLifecycleHookProperty]
Maybe (Value Text)
()
haddock_workaround_ :: NotebookInstanceLifecycleConfig -> ()
notebookInstanceLifecycleConfigName :: NotebookInstanceLifecycleConfig -> Maybe (Value Text)
onCreate :: NotebookInstanceLifecycleConfig
-> Maybe [NotebookInstanceLifecycleHookProperty]
onStart :: NotebookInstanceLifecycleConfig
-> Maybe [NotebookInstanceLifecycleHookProperty]
haddock_workaround_ :: ()
notebookInstanceLifecycleConfigName :: Maybe (Value Text)
onCreate :: Maybe [NotebookInstanceLifecycleHookProperty]
onStart :: Maybe [NotebookInstanceLifecycleHookProperty]
..}
    = [(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 -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"NotebookInstanceLifecycleConfigName"
                 (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
notebookInstanceLifecycleConfigName,
               Key -> [NotebookInstanceLifecycleHookProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"OnCreate" ([NotebookInstanceLifecycleHookProperty] -> (Key, Value))
-> Maybe [NotebookInstanceLifecycleHookProperty]
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [NotebookInstanceLifecycleHookProperty]
onCreate,
               Key -> [NotebookInstanceLifecycleHookProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"OnStart" ([NotebookInstanceLifecycleHookProperty] -> (Key, Value))
-> Maybe [NotebookInstanceLifecycleHookProperty]
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [NotebookInstanceLifecycleHookProperty]
onStart]))
instance Property "NotebookInstanceLifecycleConfigName" NotebookInstanceLifecycleConfig where
  type PropertyType "NotebookInstanceLifecycleConfigName" NotebookInstanceLifecycleConfig = Value Prelude.Text
  set :: PropertyType
  "NotebookInstanceLifecycleConfigName"
  NotebookInstanceLifecycleConfig
-> NotebookInstanceLifecycleConfig
-> NotebookInstanceLifecycleConfig
set PropertyType
  "NotebookInstanceLifecycleConfigName"
  NotebookInstanceLifecycleConfig
newValue NotebookInstanceLifecycleConfig {Maybe [NotebookInstanceLifecycleHookProperty]
Maybe (Value Text)
()
haddock_workaround_ :: NotebookInstanceLifecycleConfig -> ()
notebookInstanceLifecycleConfigName :: NotebookInstanceLifecycleConfig -> Maybe (Value Text)
onCreate :: NotebookInstanceLifecycleConfig
-> Maybe [NotebookInstanceLifecycleHookProperty]
onStart :: NotebookInstanceLifecycleConfig
-> Maybe [NotebookInstanceLifecycleHookProperty]
haddock_workaround_ :: ()
notebookInstanceLifecycleConfigName :: Maybe (Value Text)
onCreate :: Maybe [NotebookInstanceLifecycleHookProperty]
onStart :: Maybe [NotebookInstanceLifecycleHookProperty]
..}
    = NotebookInstanceLifecycleConfig
        {notebookInstanceLifecycleConfigName :: Maybe (Value Text)
notebookInstanceLifecycleConfigName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "NotebookInstanceLifecycleConfigName"
  NotebookInstanceLifecycleConfig
Value Text
newValue, Maybe [NotebookInstanceLifecycleHookProperty]
()
haddock_workaround_ :: ()
onCreate :: Maybe [NotebookInstanceLifecycleHookProperty]
onStart :: Maybe [NotebookInstanceLifecycleHookProperty]
haddock_workaround_ :: ()
onCreate :: Maybe [NotebookInstanceLifecycleHookProperty]
onStart :: Maybe [NotebookInstanceLifecycleHookProperty]
..}
instance Property "OnCreate" NotebookInstanceLifecycleConfig where
  type PropertyType "OnCreate" NotebookInstanceLifecycleConfig = [NotebookInstanceLifecycleHookProperty]
  set :: PropertyType "OnCreate" NotebookInstanceLifecycleConfig
-> NotebookInstanceLifecycleConfig
-> NotebookInstanceLifecycleConfig
set PropertyType "OnCreate" NotebookInstanceLifecycleConfig
newValue NotebookInstanceLifecycleConfig {Maybe [NotebookInstanceLifecycleHookProperty]
Maybe (Value Text)
()
haddock_workaround_ :: NotebookInstanceLifecycleConfig -> ()
notebookInstanceLifecycleConfigName :: NotebookInstanceLifecycleConfig -> Maybe (Value Text)
onCreate :: NotebookInstanceLifecycleConfig
-> Maybe [NotebookInstanceLifecycleHookProperty]
onStart :: NotebookInstanceLifecycleConfig
-> Maybe [NotebookInstanceLifecycleHookProperty]
haddock_workaround_ :: ()
notebookInstanceLifecycleConfigName :: Maybe (Value Text)
onCreate :: Maybe [NotebookInstanceLifecycleHookProperty]
onStart :: Maybe [NotebookInstanceLifecycleHookProperty]
..}
    = NotebookInstanceLifecycleConfig
        {onCreate :: Maybe [NotebookInstanceLifecycleHookProperty]
onCreate = [NotebookInstanceLifecycleHookProperty]
-> Maybe [NotebookInstanceLifecycleHookProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [NotebookInstanceLifecycleHookProperty]
PropertyType "OnCreate" NotebookInstanceLifecycleConfig
newValue, Maybe [NotebookInstanceLifecycleHookProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
notebookInstanceLifecycleConfigName :: Maybe (Value Text)
onStart :: Maybe [NotebookInstanceLifecycleHookProperty]
haddock_workaround_ :: ()
notebookInstanceLifecycleConfigName :: Maybe (Value Text)
onStart :: Maybe [NotebookInstanceLifecycleHookProperty]
..}
instance Property "OnStart" NotebookInstanceLifecycleConfig where
  type PropertyType "OnStart" NotebookInstanceLifecycleConfig = [NotebookInstanceLifecycleHookProperty]
  set :: PropertyType "OnStart" NotebookInstanceLifecycleConfig
-> NotebookInstanceLifecycleConfig
-> NotebookInstanceLifecycleConfig
set PropertyType "OnStart" NotebookInstanceLifecycleConfig
newValue NotebookInstanceLifecycleConfig {Maybe [NotebookInstanceLifecycleHookProperty]
Maybe (Value Text)
()
haddock_workaround_ :: NotebookInstanceLifecycleConfig -> ()
notebookInstanceLifecycleConfigName :: NotebookInstanceLifecycleConfig -> Maybe (Value Text)
onCreate :: NotebookInstanceLifecycleConfig
-> Maybe [NotebookInstanceLifecycleHookProperty]
onStart :: NotebookInstanceLifecycleConfig
-> Maybe [NotebookInstanceLifecycleHookProperty]
haddock_workaround_ :: ()
notebookInstanceLifecycleConfigName :: Maybe (Value Text)
onCreate :: Maybe [NotebookInstanceLifecycleHookProperty]
onStart :: Maybe [NotebookInstanceLifecycleHookProperty]
..}
    = NotebookInstanceLifecycleConfig
        {onStart :: Maybe [NotebookInstanceLifecycleHookProperty]
onStart = [NotebookInstanceLifecycleHookProperty]
-> Maybe [NotebookInstanceLifecycleHookProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [NotebookInstanceLifecycleHookProperty]
PropertyType "OnStart" NotebookInstanceLifecycleConfig
newValue, Maybe [NotebookInstanceLifecycleHookProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
notebookInstanceLifecycleConfigName :: Maybe (Value Text)
onCreate :: Maybe [NotebookInstanceLifecycleHookProperty]
haddock_workaround_ :: ()
notebookInstanceLifecycleConfigName :: Maybe (Value Text)
onCreate :: Maybe [NotebookInstanceLifecycleHookProperty]
..}