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