module Stratosphere.CustomerProfiles.CalculatedAttributeDefinition.RangeProperty (
        module Exports, RangeProperty(..), mkRangeProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.CustomerProfiles.CalculatedAttributeDefinition.ValueRangeProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data RangeProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-customerprofiles-calculatedattributedefinition-range.html>
    RangeProperty {RangeProperty -> ()
haddock_workaround_ :: (),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-customerprofiles-calculatedattributedefinition-range.html#cfn-customerprofiles-calculatedattributedefinition-range-timestampformat>
                   RangeProperty -> Maybe (Value Text)
timestampFormat :: (Prelude.Maybe (Value Prelude.Text)),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-customerprofiles-calculatedattributedefinition-range.html#cfn-customerprofiles-calculatedattributedefinition-range-timestampsource>
                   RangeProperty -> Maybe (Value Text)
timestampSource :: (Prelude.Maybe (Value Prelude.Text)),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-customerprofiles-calculatedattributedefinition-range.html#cfn-customerprofiles-calculatedattributedefinition-range-unit>
                   RangeProperty -> Value Text
unit :: (Value Prelude.Text),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-customerprofiles-calculatedattributedefinition-range.html#cfn-customerprofiles-calculatedattributedefinition-range-value>
                   RangeProperty -> Maybe (Value Integer)
value :: (Prelude.Maybe (Value Prelude.Integer)),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-customerprofiles-calculatedattributedefinition-range.html#cfn-customerprofiles-calculatedattributedefinition-range-valuerange>
                   RangeProperty -> Maybe ValueRangeProperty
valueRange :: (Prelude.Maybe ValueRangeProperty)}
  deriving stock (RangeProperty -> RangeProperty -> Bool
(RangeProperty -> RangeProperty -> Bool)
-> (RangeProperty -> RangeProperty -> Bool) -> Eq RangeProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RangeProperty -> RangeProperty -> Bool
== :: RangeProperty -> RangeProperty -> Bool
$c/= :: RangeProperty -> RangeProperty -> Bool
/= :: RangeProperty -> RangeProperty -> Bool
Prelude.Eq, Int -> RangeProperty -> ShowS
[RangeProperty] -> ShowS
RangeProperty -> String
(Int -> RangeProperty -> ShowS)
-> (RangeProperty -> String)
-> ([RangeProperty] -> ShowS)
-> Show RangeProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RangeProperty -> ShowS
showsPrec :: Int -> RangeProperty -> ShowS
$cshow :: RangeProperty -> String
show :: RangeProperty -> String
$cshowList :: [RangeProperty] -> ShowS
showList :: [RangeProperty] -> ShowS
Prelude.Show)
mkRangeProperty :: Value Prelude.Text -> RangeProperty
mkRangeProperty :: Value Text -> RangeProperty
mkRangeProperty Value Text
unit
  = RangeProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), unit :: Value Text
unit = Value Text
unit,
       timestampFormat :: Maybe (Value Text)
timestampFormat = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       timestampSource :: Maybe (Value Text)
timestampSource = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, value :: Maybe (Value Integer)
value = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       valueRange :: Maybe ValueRangeProperty
valueRange = Maybe ValueRangeProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RangeProperty where
  toResourceProperties :: RangeProperty -> ResourceProperties
toResourceProperties RangeProperty {Maybe (Value Integer)
Maybe (Value Text)
Maybe ValueRangeProperty
()
Value Text
haddock_workaround_ :: RangeProperty -> ()
timestampFormat :: RangeProperty -> Maybe (Value Text)
timestampSource :: RangeProperty -> Maybe (Value Text)
unit :: RangeProperty -> Value Text
value :: RangeProperty -> Maybe (Value Integer)
valueRange :: RangeProperty -> Maybe ValueRangeProperty
haddock_workaround_ :: ()
timestampFormat :: Maybe (Value Text)
timestampSource :: Maybe (Value Text)
unit :: Value Text
value :: Maybe (Value Integer)
valueRange :: Maybe ValueRangeProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::CustomerProfiles::CalculatedAttributeDefinition.Range",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"Unit" 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..= Value Text
unit]
                           ([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
"TimestampFormat" (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)
timestampFormat,
                               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
"TimestampSource" (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)
timestampSource,
                               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
"Value" (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)
value,
                               Key -> ValueRangeProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ValueRange" (ValueRangeProperty -> (Key, Value))
-> Maybe ValueRangeProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ValueRangeProperty
valueRange]))}
instance JSON.ToJSON RangeProperty where
  toJSON :: RangeProperty -> Value
toJSON RangeProperty {Maybe (Value Integer)
Maybe (Value Text)
Maybe ValueRangeProperty
()
Value Text
haddock_workaround_ :: RangeProperty -> ()
timestampFormat :: RangeProperty -> Maybe (Value Text)
timestampSource :: RangeProperty -> Maybe (Value Text)
unit :: RangeProperty -> Value Text
value :: RangeProperty -> Maybe (Value Integer)
valueRange :: RangeProperty -> Maybe ValueRangeProperty
haddock_workaround_ :: ()
timestampFormat :: Maybe (Value Text)
timestampSource :: Maybe (Value Text)
unit :: Value Text
value :: Maybe (Value Integer)
valueRange :: Maybe ValueRangeProperty
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"Unit" 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..= Value Text
unit]
              ([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
"TimestampFormat" (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)
timestampFormat,
                  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
"TimestampSource" (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)
timestampSource,
                  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
"Value" (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)
value,
                  Key -> ValueRangeProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ValueRange" (ValueRangeProperty -> (Key, Value))
-> Maybe ValueRangeProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ValueRangeProperty
valueRange])))
instance Property "TimestampFormat" RangeProperty where
  type PropertyType "TimestampFormat" RangeProperty = Value Prelude.Text
  set :: PropertyType "TimestampFormat" RangeProperty
-> RangeProperty -> RangeProperty
set PropertyType "TimestampFormat" RangeProperty
newValue RangeProperty {Maybe (Value Integer)
Maybe (Value Text)
Maybe ValueRangeProperty
()
Value Text
haddock_workaround_ :: RangeProperty -> ()
timestampFormat :: RangeProperty -> Maybe (Value Text)
timestampSource :: RangeProperty -> Maybe (Value Text)
unit :: RangeProperty -> Value Text
value :: RangeProperty -> Maybe (Value Integer)
valueRange :: RangeProperty -> Maybe ValueRangeProperty
haddock_workaround_ :: ()
timestampFormat :: Maybe (Value Text)
timestampSource :: Maybe (Value Text)
unit :: Value Text
value :: Maybe (Value Integer)
valueRange :: Maybe ValueRangeProperty
..}
    = RangeProperty {timestampFormat :: Maybe (Value Text)
timestampFormat = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TimestampFormat" RangeProperty
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
Maybe ValueRangeProperty
()
Value Text
haddock_workaround_ :: ()
timestampSource :: Maybe (Value Text)
unit :: Value Text
value :: Maybe (Value Integer)
valueRange :: Maybe ValueRangeProperty
haddock_workaround_ :: ()
timestampSource :: Maybe (Value Text)
unit :: Value Text
value :: Maybe (Value Integer)
valueRange :: Maybe ValueRangeProperty
..}
instance Property "TimestampSource" RangeProperty where
  type PropertyType "TimestampSource" RangeProperty = Value Prelude.Text
  set :: PropertyType "TimestampSource" RangeProperty
-> RangeProperty -> RangeProperty
set PropertyType "TimestampSource" RangeProperty
newValue RangeProperty {Maybe (Value Integer)
Maybe (Value Text)
Maybe ValueRangeProperty
()
Value Text
haddock_workaround_ :: RangeProperty -> ()
timestampFormat :: RangeProperty -> Maybe (Value Text)
timestampSource :: RangeProperty -> Maybe (Value Text)
unit :: RangeProperty -> Value Text
value :: RangeProperty -> Maybe (Value Integer)
valueRange :: RangeProperty -> Maybe ValueRangeProperty
haddock_workaround_ :: ()
timestampFormat :: Maybe (Value Text)
timestampSource :: Maybe (Value Text)
unit :: Value Text
value :: Maybe (Value Integer)
valueRange :: Maybe ValueRangeProperty
..}
    = RangeProperty {timestampSource :: Maybe (Value Text)
timestampSource = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TimestampSource" RangeProperty
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
Maybe ValueRangeProperty
()
Value Text
haddock_workaround_ :: ()
timestampFormat :: Maybe (Value Text)
unit :: Value Text
value :: Maybe (Value Integer)
valueRange :: Maybe ValueRangeProperty
haddock_workaround_ :: ()
timestampFormat :: Maybe (Value Text)
unit :: Value Text
value :: Maybe (Value Integer)
valueRange :: Maybe ValueRangeProperty
..}
instance Property "Unit" RangeProperty where
  type PropertyType "Unit" RangeProperty = Value Prelude.Text
  set :: PropertyType "Unit" RangeProperty -> RangeProperty -> RangeProperty
set PropertyType "Unit" RangeProperty
newValue RangeProperty {Maybe (Value Integer)
Maybe (Value Text)
Maybe ValueRangeProperty
()
Value Text
haddock_workaround_ :: RangeProperty -> ()
timestampFormat :: RangeProperty -> Maybe (Value Text)
timestampSource :: RangeProperty -> Maybe (Value Text)
unit :: RangeProperty -> Value Text
value :: RangeProperty -> Maybe (Value Integer)
valueRange :: RangeProperty -> Maybe ValueRangeProperty
haddock_workaround_ :: ()
timestampFormat :: Maybe (Value Text)
timestampSource :: Maybe (Value Text)
unit :: Value Text
value :: Maybe (Value Integer)
valueRange :: Maybe ValueRangeProperty
..}
    = RangeProperty {unit :: Value Text
unit = PropertyType "Unit" RangeProperty
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
Maybe ValueRangeProperty
()
haddock_workaround_ :: ()
timestampFormat :: Maybe (Value Text)
timestampSource :: Maybe (Value Text)
value :: Maybe (Value Integer)
valueRange :: Maybe ValueRangeProperty
haddock_workaround_ :: ()
timestampFormat :: Maybe (Value Text)
timestampSource :: Maybe (Value Text)
value :: Maybe (Value Integer)
valueRange :: Maybe ValueRangeProperty
..}
instance Property "Value" RangeProperty where
  type PropertyType "Value" RangeProperty = Value Prelude.Integer
  set :: PropertyType "Value" RangeProperty
-> RangeProperty -> RangeProperty
set PropertyType "Value" RangeProperty
newValue RangeProperty {Maybe (Value Integer)
Maybe (Value Text)
Maybe ValueRangeProperty
()
Value Text
haddock_workaround_ :: RangeProperty -> ()
timestampFormat :: RangeProperty -> Maybe (Value Text)
timestampSource :: RangeProperty -> Maybe (Value Text)
unit :: RangeProperty -> Value Text
value :: RangeProperty -> Maybe (Value Integer)
valueRange :: RangeProperty -> Maybe ValueRangeProperty
haddock_workaround_ :: ()
timestampFormat :: Maybe (Value Text)
timestampSource :: Maybe (Value Text)
unit :: Value Text
value :: Maybe (Value Integer)
valueRange :: Maybe ValueRangeProperty
..}
    = RangeProperty {value :: Maybe (Value Integer)
value = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Value" RangeProperty
Value Integer
newValue, Maybe (Value Text)
Maybe ValueRangeProperty
()
Value Text
haddock_workaround_ :: ()
timestampFormat :: Maybe (Value Text)
timestampSource :: Maybe (Value Text)
unit :: Value Text
valueRange :: Maybe ValueRangeProperty
haddock_workaround_ :: ()
timestampFormat :: Maybe (Value Text)
timestampSource :: Maybe (Value Text)
unit :: Value Text
valueRange :: Maybe ValueRangeProperty
..}
instance Property "ValueRange" RangeProperty where
  type PropertyType "ValueRange" RangeProperty = ValueRangeProperty
  set :: PropertyType "ValueRange" RangeProperty
-> RangeProperty -> RangeProperty
set PropertyType "ValueRange" RangeProperty
newValue RangeProperty {Maybe (Value Integer)
Maybe (Value Text)
Maybe ValueRangeProperty
()
Value Text
haddock_workaround_ :: RangeProperty -> ()
timestampFormat :: RangeProperty -> Maybe (Value Text)
timestampSource :: RangeProperty -> Maybe (Value Text)
unit :: RangeProperty -> Value Text
value :: RangeProperty -> Maybe (Value Integer)
valueRange :: RangeProperty -> Maybe ValueRangeProperty
haddock_workaround_ :: ()
timestampFormat :: Maybe (Value Text)
timestampSource :: Maybe (Value Text)
unit :: Value Text
value :: Maybe (Value Integer)
valueRange :: Maybe ValueRangeProperty
..}
    = RangeProperty {valueRange :: Maybe ValueRangeProperty
valueRange = ValueRangeProperty -> Maybe ValueRangeProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ValueRange" RangeProperty
ValueRangeProperty
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
timestampFormat :: Maybe (Value Text)
timestampSource :: Maybe (Value Text)
unit :: Value Text
value :: Maybe (Value Integer)
haddock_workaround_ :: ()
timestampFormat :: Maybe (Value Text)
timestampSource :: Maybe (Value Text)
unit :: Value Text
value :: Maybe (Value Integer)
..}