module Stratosphere.SageMaker.AppImageConfig.ContainerConfigProperty (
        module Exports, ContainerConfigProperty(..),
        mkContainerConfigProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.SageMaker.AppImageConfig.CustomImageContainerEnvironmentVariableProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ContainerConfigProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-appimageconfig-containerconfig.html>
    ContainerConfigProperty {ContainerConfigProperty -> ()
haddock_workaround_ :: (),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-appimageconfig-containerconfig.html#cfn-sagemaker-appimageconfig-containerconfig-containerarguments>
                             ContainerConfigProperty -> Maybe (ValueList Text)
containerArguments :: (Prelude.Maybe (ValueList Prelude.Text)),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-appimageconfig-containerconfig.html#cfn-sagemaker-appimageconfig-containerconfig-containerentrypoint>
                             ContainerConfigProperty -> Maybe (ValueList Text)
containerEntrypoint :: (Prelude.Maybe (ValueList Prelude.Text)),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-appimageconfig-containerconfig.html#cfn-sagemaker-appimageconfig-containerconfig-containerenvironmentvariables>
                             ContainerConfigProperty
-> Maybe [CustomImageContainerEnvironmentVariableProperty]
containerEnvironmentVariables :: (Prelude.Maybe [CustomImageContainerEnvironmentVariableProperty])}
  deriving stock (ContainerConfigProperty -> ContainerConfigProperty -> Bool
(ContainerConfigProperty -> ContainerConfigProperty -> Bool)
-> (ContainerConfigProperty -> ContainerConfigProperty -> Bool)
-> Eq ContainerConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ContainerConfigProperty -> ContainerConfigProperty -> Bool
== :: ContainerConfigProperty -> ContainerConfigProperty -> Bool
$c/= :: ContainerConfigProperty -> ContainerConfigProperty -> Bool
/= :: ContainerConfigProperty -> ContainerConfigProperty -> Bool
Prelude.Eq, Int -> ContainerConfigProperty -> ShowS
[ContainerConfigProperty] -> ShowS
ContainerConfigProperty -> String
(Int -> ContainerConfigProperty -> ShowS)
-> (ContainerConfigProperty -> String)
-> ([ContainerConfigProperty] -> ShowS)
-> Show ContainerConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ContainerConfigProperty -> ShowS
showsPrec :: Int -> ContainerConfigProperty -> ShowS
$cshow :: ContainerConfigProperty -> String
show :: ContainerConfigProperty -> String
$cshowList :: [ContainerConfigProperty] -> ShowS
showList :: [ContainerConfigProperty] -> ShowS
Prelude.Show)
mkContainerConfigProperty :: ContainerConfigProperty
mkContainerConfigProperty :: ContainerConfigProperty
mkContainerConfigProperty
  = ContainerConfigProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), containerArguments :: Maybe (ValueList Text)
containerArguments = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing,
       containerEntrypoint :: Maybe (ValueList Text)
containerEntrypoint = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing,
       containerEnvironmentVariables :: Maybe [CustomImageContainerEnvironmentVariableProperty]
containerEnvironmentVariables = Maybe [CustomImageContainerEnvironmentVariableProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ContainerConfigProperty where
  toResourceProperties :: ContainerConfigProperty -> ResourceProperties
toResourceProperties ContainerConfigProperty {Maybe [CustomImageContainerEnvironmentVariableProperty]
Maybe (ValueList Text)
()
haddock_workaround_ :: ContainerConfigProperty -> ()
containerArguments :: ContainerConfigProperty -> Maybe (ValueList Text)
containerEntrypoint :: ContainerConfigProperty -> Maybe (ValueList Text)
containerEnvironmentVariables :: ContainerConfigProperty
-> Maybe [CustomImageContainerEnvironmentVariableProperty]
haddock_workaround_ :: ()
containerArguments :: Maybe (ValueList Text)
containerEntrypoint :: Maybe (ValueList Text)
containerEnvironmentVariables :: Maybe [CustomImageContainerEnvironmentVariableProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SageMaker::AppImageConfig.ContainerConfig",
         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 -> ValueList 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
"ContainerArguments" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
containerArguments,
                            Key -> ValueList 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
"ContainerEntrypoint" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
containerEntrypoint,
                            Key
-> [CustomImageContainerEnvironmentVariableProperty]
-> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ContainerEnvironmentVariables"
                              ([CustomImageContainerEnvironmentVariableProperty] -> (Key, Value))
-> Maybe [CustomImageContainerEnvironmentVariableProperty]
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [CustomImageContainerEnvironmentVariableProperty]
containerEnvironmentVariables])}
instance JSON.ToJSON ContainerConfigProperty where
  toJSON :: ContainerConfigProperty -> Value
toJSON ContainerConfigProperty {Maybe [CustomImageContainerEnvironmentVariableProperty]
Maybe (ValueList Text)
()
haddock_workaround_ :: ContainerConfigProperty -> ()
containerArguments :: ContainerConfigProperty -> Maybe (ValueList Text)
containerEntrypoint :: ContainerConfigProperty -> Maybe (ValueList Text)
containerEnvironmentVariables :: ContainerConfigProperty
-> Maybe [CustomImageContainerEnvironmentVariableProperty]
haddock_workaround_ :: ()
containerArguments :: Maybe (ValueList Text)
containerEntrypoint :: Maybe (ValueList Text)
containerEnvironmentVariables :: Maybe [CustomImageContainerEnvironmentVariableProperty]
..}
    = [(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 -> ValueList 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
"ContainerArguments" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
containerArguments,
               Key -> ValueList 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
"ContainerEntrypoint" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
containerEntrypoint,
               Key
-> [CustomImageContainerEnvironmentVariableProperty]
-> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ContainerEnvironmentVariables"
                 ([CustomImageContainerEnvironmentVariableProperty] -> (Key, Value))
-> Maybe [CustomImageContainerEnvironmentVariableProperty]
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [CustomImageContainerEnvironmentVariableProperty]
containerEnvironmentVariables]))
instance Property "ContainerArguments" ContainerConfigProperty where
  type PropertyType "ContainerArguments" ContainerConfigProperty = ValueList Prelude.Text
  set :: PropertyType "ContainerArguments" ContainerConfigProperty
-> ContainerConfigProperty -> ContainerConfigProperty
set PropertyType "ContainerArguments" ContainerConfigProperty
newValue ContainerConfigProperty {Maybe [CustomImageContainerEnvironmentVariableProperty]
Maybe (ValueList Text)
()
haddock_workaround_ :: ContainerConfigProperty -> ()
containerArguments :: ContainerConfigProperty -> Maybe (ValueList Text)
containerEntrypoint :: ContainerConfigProperty -> Maybe (ValueList Text)
containerEnvironmentVariables :: ContainerConfigProperty
-> Maybe [CustomImageContainerEnvironmentVariableProperty]
haddock_workaround_ :: ()
containerArguments :: Maybe (ValueList Text)
containerEntrypoint :: Maybe (ValueList Text)
containerEnvironmentVariables :: Maybe [CustomImageContainerEnvironmentVariableProperty]
..}
    = ContainerConfigProperty
        {containerArguments :: Maybe (ValueList Text)
containerArguments = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ContainerArguments" ContainerConfigProperty
ValueList Text
newValue, Maybe [CustomImageContainerEnvironmentVariableProperty]
Maybe (ValueList Text)
()
haddock_workaround_ :: ()
containerEntrypoint :: Maybe (ValueList Text)
containerEnvironmentVariables :: Maybe [CustomImageContainerEnvironmentVariableProperty]
haddock_workaround_ :: ()
containerEntrypoint :: Maybe (ValueList Text)
containerEnvironmentVariables :: Maybe [CustomImageContainerEnvironmentVariableProperty]
..}
instance Property "ContainerEntrypoint" ContainerConfigProperty where
  type PropertyType "ContainerEntrypoint" ContainerConfigProperty = ValueList Prelude.Text
  set :: PropertyType "ContainerEntrypoint" ContainerConfigProperty
-> ContainerConfigProperty -> ContainerConfigProperty
set PropertyType "ContainerEntrypoint" ContainerConfigProperty
newValue ContainerConfigProperty {Maybe [CustomImageContainerEnvironmentVariableProperty]
Maybe (ValueList Text)
()
haddock_workaround_ :: ContainerConfigProperty -> ()
containerArguments :: ContainerConfigProperty -> Maybe (ValueList Text)
containerEntrypoint :: ContainerConfigProperty -> Maybe (ValueList Text)
containerEnvironmentVariables :: ContainerConfigProperty
-> Maybe [CustomImageContainerEnvironmentVariableProperty]
haddock_workaround_ :: ()
containerArguments :: Maybe (ValueList Text)
containerEntrypoint :: Maybe (ValueList Text)
containerEnvironmentVariables :: Maybe [CustomImageContainerEnvironmentVariableProperty]
..}
    = ContainerConfigProperty
        {containerEntrypoint :: Maybe (ValueList Text)
containerEntrypoint = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ContainerEntrypoint" ContainerConfigProperty
ValueList Text
newValue, Maybe [CustomImageContainerEnvironmentVariableProperty]
Maybe (ValueList Text)
()
haddock_workaround_ :: ()
containerArguments :: Maybe (ValueList Text)
containerEnvironmentVariables :: Maybe [CustomImageContainerEnvironmentVariableProperty]
haddock_workaround_ :: ()
containerArguments :: Maybe (ValueList Text)
containerEnvironmentVariables :: Maybe [CustomImageContainerEnvironmentVariableProperty]
..}
instance Property "ContainerEnvironmentVariables" ContainerConfigProperty where
  type PropertyType "ContainerEnvironmentVariables" ContainerConfigProperty = [CustomImageContainerEnvironmentVariableProperty]
  set :: PropertyType
  "ContainerEnvironmentVariables" ContainerConfigProperty
-> ContainerConfigProperty -> ContainerConfigProperty
set PropertyType
  "ContainerEnvironmentVariables" ContainerConfigProperty
newValue ContainerConfigProperty {Maybe [CustomImageContainerEnvironmentVariableProperty]
Maybe (ValueList Text)
()
haddock_workaround_ :: ContainerConfigProperty -> ()
containerArguments :: ContainerConfigProperty -> Maybe (ValueList Text)
containerEntrypoint :: ContainerConfigProperty -> Maybe (ValueList Text)
containerEnvironmentVariables :: ContainerConfigProperty
-> Maybe [CustomImageContainerEnvironmentVariableProperty]
haddock_workaround_ :: ()
containerArguments :: Maybe (ValueList Text)
containerEntrypoint :: Maybe (ValueList Text)
containerEnvironmentVariables :: Maybe [CustomImageContainerEnvironmentVariableProperty]
..}
    = ContainerConfigProperty
        {containerEnvironmentVariables :: Maybe [CustomImageContainerEnvironmentVariableProperty]
containerEnvironmentVariables = [CustomImageContainerEnvironmentVariableProperty]
-> Maybe [CustomImageContainerEnvironmentVariableProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [CustomImageContainerEnvironmentVariableProperty]
PropertyType
  "ContainerEnvironmentVariables" ContainerConfigProperty
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
containerArguments :: Maybe (ValueList Text)
containerEntrypoint :: Maybe (ValueList Text)
haddock_workaround_ :: ()
containerArguments :: Maybe (ValueList Text)
containerEntrypoint :: Maybe (ValueList Text)
..}