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