module Stratosphere.CustomerProfiles.CalculatedAttributeDefinition.ConditionsProperty (
        module Exports, ConditionsProperty(..), mkConditionsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.CustomerProfiles.CalculatedAttributeDefinition.RangeProperty as Exports
import {-# SOURCE #-} Stratosphere.CustomerProfiles.CalculatedAttributeDefinition.ThresholdProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ConditionsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-customerprofiles-calculatedattributedefinition-conditions.html>
    ConditionsProperty {ConditionsProperty -> ()
haddock_workaround_ :: (),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-customerprofiles-calculatedattributedefinition-conditions.html#cfn-customerprofiles-calculatedattributedefinition-conditions-objectcount>
                        ConditionsProperty -> Maybe (Value Integer)
objectCount :: (Prelude.Maybe (Value Prelude.Integer)),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-customerprofiles-calculatedattributedefinition-conditions.html#cfn-customerprofiles-calculatedattributedefinition-conditions-range>
                        ConditionsProperty -> Maybe RangeProperty
range :: (Prelude.Maybe RangeProperty),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-customerprofiles-calculatedattributedefinition-conditions.html#cfn-customerprofiles-calculatedattributedefinition-conditions-threshold>
                        ConditionsProperty -> Maybe ThresholdProperty
threshold :: (Prelude.Maybe ThresholdProperty)}
  deriving stock (ConditionsProperty -> ConditionsProperty -> Bool
(ConditionsProperty -> ConditionsProperty -> Bool)
-> (ConditionsProperty -> ConditionsProperty -> Bool)
-> Eq ConditionsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ConditionsProperty -> ConditionsProperty -> Bool
== :: ConditionsProperty -> ConditionsProperty -> Bool
$c/= :: ConditionsProperty -> ConditionsProperty -> Bool
/= :: ConditionsProperty -> ConditionsProperty -> Bool
Prelude.Eq, Int -> ConditionsProperty -> ShowS
[ConditionsProperty] -> ShowS
ConditionsProperty -> String
(Int -> ConditionsProperty -> ShowS)
-> (ConditionsProperty -> String)
-> ([ConditionsProperty] -> ShowS)
-> Show ConditionsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ConditionsProperty -> ShowS
showsPrec :: Int -> ConditionsProperty -> ShowS
$cshow :: ConditionsProperty -> String
show :: ConditionsProperty -> String
$cshowList :: [ConditionsProperty] -> ShowS
showList :: [ConditionsProperty] -> ShowS
Prelude.Show)
mkConditionsProperty :: ConditionsProperty
mkConditionsProperty :: ConditionsProperty
mkConditionsProperty
  = ConditionsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), objectCount :: Maybe (Value Integer)
objectCount = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       range :: Maybe RangeProperty
range = Maybe RangeProperty
forall a. Maybe a
Prelude.Nothing, threshold :: Maybe ThresholdProperty
threshold = Maybe ThresholdProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ConditionsProperty where
  toResourceProperties :: ConditionsProperty -> ResourceProperties
toResourceProperties ConditionsProperty {Maybe (Value Integer)
Maybe ThresholdProperty
Maybe RangeProperty
()
haddock_workaround_ :: ConditionsProperty -> ()
objectCount :: ConditionsProperty -> Maybe (Value Integer)
range :: ConditionsProperty -> Maybe RangeProperty
threshold :: ConditionsProperty -> Maybe ThresholdProperty
haddock_workaround_ :: ()
objectCount :: Maybe (Value Integer)
range :: Maybe RangeProperty
threshold :: Maybe ThresholdProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::CustomerProfiles::CalculatedAttributeDefinition.Conditions",
         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 Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ObjectCount" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
objectCount,
                            Key -> RangeProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Range" (RangeProperty -> (Key, Value))
-> Maybe RangeProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RangeProperty
range,
                            Key -> ThresholdProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Threshold" (ThresholdProperty -> (Key, Value))
-> Maybe ThresholdProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ThresholdProperty
threshold])}
instance JSON.ToJSON ConditionsProperty where
  toJSON :: ConditionsProperty -> Value
toJSON ConditionsProperty {Maybe (Value Integer)
Maybe ThresholdProperty
Maybe RangeProperty
()
haddock_workaround_ :: ConditionsProperty -> ()
objectCount :: ConditionsProperty -> Maybe (Value Integer)
range :: ConditionsProperty -> Maybe RangeProperty
threshold :: ConditionsProperty -> Maybe ThresholdProperty
haddock_workaround_ :: ()
objectCount :: Maybe (Value Integer)
range :: Maybe RangeProperty
threshold :: Maybe ThresholdProperty
..}
    = [(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 Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ObjectCount" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
objectCount,
               Key -> RangeProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Range" (RangeProperty -> (Key, Value))
-> Maybe RangeProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RangeProperty
range,
               Key -> ThresholdProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Threshold" (ThresholdProperty -> (Key, Value))
-> Maybe ThresholdProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ThresholdProperty
threshold]))
instance Property "ObjectCount" ConditionsProperty where
  type PropertyType "ObjectCount" ConditionsProperty = Value Prelude.Integer
  set :: PropertyType "ObjectCount" ConditionsProperty
-> ConditionsProperty -> ConditionsProperty
set PropertyType "ObjectCount" ConditionsProperty
newValue ConditionsProperty {Maybe (Value Integer)
Maybe ThresholdProperty
Maybe RangeProperty
()
haddock_workaround_ :: ConditionsProperty -> ()
objectCount :: ConditionsProperty -> Maybe (Value Integer)
range :: ConditionsProperty -> Maybe RangeProperty
threshold :: ConditionsProperty -> Maybe ThresholdProperty
haddock_workaround_ :: ()
objectCount :: Maybe (Value Integer)
range :: Maybe RangeProperty
threshold :: Maybe ThresholdProperty
..}
    = ConditionsProperty {objectCount :: Maybe (Value Integer)
objectCount = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ObjectCount" ConditionsProperty
Value Integer
newValue, Maybe ThresholdProperty
Maybe RangeProperty
()
haddock_workaround_ :: ()
range :: Maybe RangeProperty
threshold :: Maybe ThresholdProperty
haddock_workaround_ :: ()
range :: Maybe RangeProperty
threshold :: Maybe ThresholdProperty
..}
instance Property "Range" ConditionsProperty where
  type PropertyType "Range" ConditionsProperty = RangeProperty
  set :: PropertyType "Range" ConditionsProperty
-> ConditionsProperty -> ConditionsProperty
set PropertyType "Range" ConditionsProperty
newValue ConditionsProperty {Maybe (Value Integer)
Maybe ThresholdProperty
Maybe RangeProperty
()
haddock_workaround_ :: ConditionsProperty -> ()
objectCount :: ConditionsProperty -> Maybe (Value Integer)
range :: ConditionsProperty -> Maybe RangeProperty
threshold :: ConditionsProperty -> Maybe ThresholdProperty
haddock_workaround_ :: ()
objectCount :: Maybe (Value Integer)
range :: Maybe RangeProperty
threshold :: Maybe ThresholdProperty
..}
    = ConditionsProperty {range :: Maybe RangeProperty
range = RangeProperty -> Maybe RangeProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Range" ConditionsProperty
RangeProperty
newValue, Maybe (Value Integer)
Maybe ThresholdProperty
()
haddock_workaround_ :: ()
objectCount :: Maybe (Value Integer)
threshold :: Maybe ThresholdProperty
haddock_workaround_ :: ()
objectCount :: Maybe (Value Integer)
threshold :: Maybe ThresholdProperty
..}
instance Property "Threshold" ConditionsProperty where
  type PropertyType "Threshold" ConditionsProperty = ThresholdProperty
  set :: PropertyType "Threshold" ConditionsProperty
-> ConditionsProperty -> ConditionsProperty
set PropertyType "Threshold" ConditionsProperty
newValue ConditionsProperty {Maybe (Value Integer)
Maybe ThresholdProperty
Maybe RangeProperty
()
haddock_workaround_ :: ConditionsProperty -> ()
objectCount :: ConditionsProperty -> Maybe (Value Integer)
range :: ConditionsProperty -> Maybe RangeProperty
threshold :: ConditionsProperty -> Maybe ThresholdProperty
haddock_workaround_ :: ()
objectCount :: Maybe (Value Integer)
range :: Maybe RangeProperty
threshold :: Maybe ThresholdProperty
..}
    = ConditionsProperty {threshold :: Maybe ThresholdProperty
threshold = ThresholdProperty -> Maybe ThresholdProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Threshold" ConditionsProperty
ThresholdProperty
newValue, Maybe (Value Integer)
Maybe RangeProperty
()
haddock_workaround_ :: ()
objectCount :: Maybe (Value Integer)
range :: Maybe RangeProperty
haddock_workaround_ :: ()
objectCount :: Maybe (Value Integer)
range :: Maybe RangeProperty
..}