module Stratosphere.Personalize.Solution.AutoMLConfigProperty (
        AutoMLConfigProperty(..), mkAutoMLConfigProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AutoMLConfigProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-personalize-solution-automlconfig.html>
    AutoMLConfigProperty {AutoMLConfigProperty -> ()
haddock_workaround_ :: (),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-personalize-solution-automlconfig.html#cfn-personalize-solution-automlconfig-metricname>
                          AutoMLConfigProperty -> Maybe (Value Text)
metricName :: (Prelude.Maybe (Value Prelude.Text)),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-personalize-solution-automlconfig.html#cfn-personalize-solution-automlconfig-recipelist>
                          AutoMLConfigProperty -> Maybe (ValueList Text)
recipeList :: (Prelude.Maybe (ValueList Prelude.Text))}
  deriving stock (AutoMLConfigProperty -> AutoMLConfigProperty -> Bool
(AutoMLConfigProperty -> AutoMLConfigProperty -> Bool)
-> (AutoMLConfigProperty -> AutoMLConfigProperty -> Bool)
-> Eq AutoMLConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AutoMLConfigProperty -> AutoMLConfigProperty -> Bool
== :: AutoMLConfigProperty -> AutoMLConfigProperty -> Bool
$c/= :: AutoMLConfigProperty -> AutoMLConfigProperty -> Bool
/= :: AutoMLConfigProperty -> AutoMLConfigProperty -> Bool
Prelude.Eq, Int -> AutoMLConfigProperty -> ShowS
[AutoMLConfigProperty] -> ShowS
AutoMLConfigProperty -> String
(Int -> AutoMLConfigProperty -> ShowS)
-> (AutoMLConfigProperty -> String)
-> ([AutoMLConfigProperty] -> ShowS)
-> Show AutoMLConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AutoMLConfigProperty -> ShowS
showsPrec :: Int -> AutoMLConfigProperty -> ShowS
$cshow :: AutoMLConfigProperty -> String
show :: AutoMLConfigProperty -> String
$cshowList :: [AutoMLConfigProperty] -> ShowS
showList :: [AutoMLConfigProperty] -> ShowS
Prelude.Show)
mkAutoMLConfigProperty :: AutoMLConfigProperty
mkAutoMLConfigProperty :: AutoMLConfigProperty
mkAutoMLConfigProperty
  = AutoMLConfigProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), metricName :: Maybe (Value Text)
metricName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       recipeList :: Maybe (ValueList Text)
recipeList = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AutoMLConfigProperty where
  toResourceProperties :: AutoMLConfigProperty -> ResourceProperties
toResourceProperties AutoMLConfigProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: AutoMLConfigProperty -> ()
metricName :: AutoMLConfigProperty -> Maybe (Value Text)
recipeList :: AutoMLConfigProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
metricName :: Maybe (Value Text)
recipeList :: Maybe (ValueList Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Personalize::Solution.AutoMLConfig",
         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
"MetricName" (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)
metricName,
                            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
"RecipeList" (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)
recipeList])}
instance JSON.ToJSON AutoMLConfigProperty where
  toJSON :: AutoMLConfigProperty -> Value
toJSON AutoMLConfigProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: AutoMLConfigProperty -> ()
metricName :: AutoMLConfigProperty -> Maybe (Value Text)
recipeList :: AutoMLConfigProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
metricName :: Maybe (Value Text)
recipeList :: Maybe (ValueList Text)
..}
    = [(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
"MetricName" (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)
metricName,
               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
"RecipeList" (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)
recipeList]))
instance Property "MetricName" AutoMLConfigProperty where
  type PropertyType "MetricName" AutoMLConfigProperty = Value Prelude.Text
  set :: PropertyType "MetricName" AutoMLConfigProperty
-> AutoMLConfigProperty -> AutoMLConfigProperty
set PropertyType "MetricName" AutoMLConfigProperty
newValue AutoMLConfigProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: AutoMLConfigProperty -> ()
metricName :: AutoMLConfigProperty -> Maybe (Value Text)
recipeList :: AutoMLConfigProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
metricName :: Maybe (Value Text)
recipeList :: Maybe (ValueList Text)
..}
    = AutoMLConfigProperty {metricName :: Maybe (Value Text)
metricName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MetricName" AutoMLConfigProperty
Value Text
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
recipeList :: Maybe (ValueList Text)
haddock_workaround_ :: ()
recipeList :: Maybe (ValueList Text)
..}
instance Property "RecipeList" AutoMLConfigProperty where
  type PropertyType "RecipeList" AutoMLConfigProperty = ValueList Prelude.Text
  set :: PropertyType "RecipeList" AutoMLConfigProperty
-> AutoMLConfigProperty -> AutoMLConfigProperty
set PropertyType "RecipeList" AutoMLConfigProperty
newValue AutoMLConfigProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: AutoMLConfigProperty -> ()
metricName :: AutoMLConfigProperty -> Maybe (Value Text)
recipeList :: AutoMLConfigProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
metricName :: Maybe (Value Text)
recipeList :: Maybe (ValueList Text)
..}
    = AutoMLConfigProperty {recipeList :: Maybe (ValueList Text)
recipeList = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RecipeList" AutoMLConfigProperty
ValueList Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
metricName :: Maybe (Value Text)
haddock_workaround_ :: ()
metricName :: Maybe (Value Text)
..}