module Stratosphere.Evidently.Experiment.OnlineAbConfigObjectProperty (
        module Exports, OnlineAbConfigObjectProperty(..),
        mkOnlineAbConfigObjectProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Evidently.Experiment.TreatmentToWeightProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data OnlineAbConfigObjectProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-experiment-onlineabconfigobject.html>
    OnlineAbConfigObjectProperty {OnlineAbConfigObjectProperty -> ()
haddock_workaround_ :: (),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-experiment-onlineabconfigobject.html#cfn-evidently-experiment-onlineabconfigobject-controltreatmentname>
                                  OnlineAbConfigObjectProperty -> Maybe (Value Text)
controlTreatmentName :: (Prelude.Maybe (Value Prelude.Text)),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-experiment-onlineabconfigobject.html#cfn-evidently-experiment-onlineabconfigobject-treatmentweights>
                                  OnlineAbConfigObjectProperty -> Maybe [TreatmentToWeightProperty]
treatmentWeights :: (Prelude.Maybe [TreatmentToWeightProperty])}
  deriving stock (OnlineAbConfigObjectProperty
-> OnlineAbConfigObjectProperty -> Bool
(OnlineAbConfigObjectProperty
 -> OnlineAbConfigObjectProperty -> Bool)
-> (OnlineAbConfigObjectProperty
    -> OnlineAbConfigObjectProperty -> Bool)
-> Eq OnlineAbConfigObjectProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: OnlineAbConfigObjectProperty
-> OnlineAbConfigObjectProperty -> Bool
== :: OnlineAbConfigObjectProperty
-> OnlineAbConfigObjectProperty -> Bool
$c/= :: OnlineAbConfigObjectProperty
-> OnlineAbConfigObjectProperty -> Bool
/= :: OnlineAbConfigObjectProperty
-> OnlineAbConfigObjectProperty -> Bool
Prelude.Eq, Int -> OnlineAbConfigObjectProperty -> ShowS
[OnlineAbConfigObjectProperty] -> ShowS
OnlineAbConfigObjectProperty -> String
(Int -> OnlineAbConfigObjectProperty -> ShowS)
-> (OnlineAbConfigObjectProperty -> String)
-> ([OnlineAbConfigObjectProperty] -> ShowS)
-> Show OnlineAbConfigObjectProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> OnlineAbConfigObjectProperty -> ShowS
showsPrec :: Int -> OnlineAbConfigObjectProperty -> ShowS
$cshow :: OnlineAbConfigObjectProperty -> String
show :: OnlineAbConfigObjectProperty -> String
$cshowList :: [OnlineAbConfigObjectProperty] -> ShowS
showList :: [OnlineAbConfigObjectProperty] -> ShowS
Prelude.Show)
mkOnlineAbConfigObjectProperty :: OnlineAbConfigObjectProperty
mkOnlineAbConfigObjectProperty :: OnlineAbConfigObjectProperty
mkOnlineAbConfigObjectProperty
  = OnlineAbConfigObjectProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), controlTreatmentName :: Maybe (Value Text)
controlTreatmentName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       treatmentWeights :: Maybe [TreatmentToWeightProperty]
treatmentWeights = Maybe [TreatmentToWeightProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties OnlineAbConfigObjectProperty where
  toResourceProperties :: OnlineAbConfigObjectProperty -> ResourceProperties
toResourceProperties OnlineAbConfigObjectProperty {Maybe [TreatmentToWeightProperty]
Maybe (Value Text)
()
haddock_workaround_ :: OnlineAbConfigObjectProperty -> ()
controlTreatmentName :: OnlineAbConfigObjectProperty -> Maybe (Value Text)
treatmentWeights :: OnlineAbConfigObjectProperty -> Maybe [TreatmentToWeightProperty]
haddock_workaround_ :: ()
controlTreatmentName :: Maybe (Value Text)
treatmentWeights :: Maybe [TreatmentToWeightProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Evidently::Experiment.OnlineAbConfigObject",
         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
"ControlTreatmentName" (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)
controlTreatmentName,
                            Key -> [TreatmentToWeightProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TreatmentWeights" ([TreatmentToWeightProperty] -> (Key, Value))
-> Maybe [TreatmentToWeightProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TreatmentToWeightProperty]
treatmentWeights])}
instance JSON.ToJSON OnlineAbConfigObjectProperty where
  toJSON :: OnlineAbConfigObjectProperty -> Value
toJSON OnlineAbConfigObjectProperty {Maybe [TreatmentToWeightProperty]
Maybe (Value Text)
()
haddock_workaround_ :: OnlineAbConfigObjectProperty -> ()
controlTreatmentName :: OnlineAbConfigObjectProperty -> Maybe (Value Text)
treatmentWeights :: OnlineAbConfigObjectProperty -> Maybe [TreatmentToWeightProperty]
haddock_workaround_ :: ()
controlTreatmentName :: Maybe (Value Text)
treatmentWeights :: Maybe [TreatmentToWeightProperty]
..}
    = [(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
"ControlTreatmentName" (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)
controlTreatmentName,
               Key -> [TreatmentToWeightProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TreatmentWeights" ([TreatmentToWeightProperty] -> (Key, Value))
-> Maybe [TreatmentToWeightProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TreatmentToWeightProperty]
treatmentWeights]))
instance Property "ControlTreatmentName" OnlineAbConfigObjectProperty where
  type PropertyType "ControlTreatmentName" OnlineAbConfigObjectProperty = Value Prelude.Text
  set :: PropertyType "ControlTreatmentName" OnlineAbConfigObjectProperty
-> OnlineAbConfigObjectProperty -> OnlineAbConfigObjectProperty
set PropertyType "ControlTreatmentName" OnlineAbConfigObjectProperty
newValue OnlineAbConfigObjectProperty {Maybe [TreatmentToWeightProperty]
Maybe (Value Text)
()
haddock_workaround_ :: OnlineAbConfigObjectProperty -> ()
controlTreatmentName :: OnlineAbConfigObjectProperty -> Maybe (Value Text)
treatmentWeights :: OnlineAbConfigObjectProperty -> Maybe [TreatmentToWeightProperty]
haddock_workaround_ :: ()
controlTreatmentName :: Maybe (Value Text)
treatmentWeights :: Maybe [TreatmentToWeightProperty]
..}
    = OnlineAbConfigObjectProperty
        {controlTreatmentName :: Maybe (Value Text)
controlTreatmentName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ControlTreatmentName" OnlineAbConfigObjectProperty
Value Text
newValue, Maybe [TreatmentToWeightProperty]
()
haddock_workaround_ :: ()
treatmentWeights :: Maybe [TreatmentToWeightProperty]
haddock_workaround_ :: ()
treatmentWeights :: Maybe [TreatmentToWeightProperty]
..}
instance Property "TreatmentWeights" OnlineAbConfigObjectProperty where
  type PropertyType "TreatmentWeights" OnlineAbConfigObjectProperty = [TreatmentToWeightProperty]
  set :: PropertyType "TreatmentWeights" OnlineAbConfigObjectProperty
-> OnlineAbConfigObjectProperty -> OnlineAbConfigObjectProperty
set PropertyType "TreatmentWeights" OnlineAbConfigObjectProperty
newValue OnlineAbConfigObjectProperty {Maybe [TreatmentToWeightProperty]
Maybe (Value Text)
()
haddock_workaround_ :: OnlineAbConfigObjectProperty -> ()
controlTreatmentName :: OnlineAbConfigObjectProperty -> Maybe (Value Text)
treatmentWeights :: OnlineAbConfigObjectProperty -> Maybe [TreatmentToWeightProperty]
haddock_workaround_ :: ()
controlTreatmentName :: Maybe (Value Text)
treatmentWeights :: Maybe [TreatmentToWeightProperty]
..}
    = OnlineAbConfigObjectProperty
        {treatmentWeights :: Maybe [TreatmentToWeightProperty]
treatmentWeights = [TreatmentToWeightProperty] -> Maybe [TreatmentToWeightProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [TreatmentToWeightProperty]
PropertyType "TreatmentWeights" OnlineAbConfigObjectProperty
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
controlTreatmentName :: Maybe (Value Text)
haddock_workaround_ :: ()
controlTreatmentName :: Maybe (Value Text)
..}