module Stratosphere.IoT.TopicRule.TimestampProperty (
        TimestampProperty(..), mkTimestampProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TimestampProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-timestamp.html>
    TimestampProperty {TimestampProperty -> ()
haddock_workaround_ :: (),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-timestamp.html#cfn-iot-topicrule-timestamp-unit>
                       TimestampProperty -> Maybe (Value Text)
unit :: (Prelude.Maybe (Value Prelude.Text)),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-timestamp.html#cfn-iot-topicrule-timestamp-value>
                       TimestampProperty -> Value Text
value :: (Value Prelude.Text)}
  deriving stock (TimestampProperty -> TimestampProperty -> Bool
(TimestampProperty -> TimestampProperty -> Bool)
-> (TimestampProperty -> TimestampProperty -> Bool)
-> Eq TimestampProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TimestampProperty -> TimestampProperty -> Bool
== :: TimestampProperty -> TimestampProperty -> Bool
$c/= :: TimestampProperty -> TimestampProperty -> Bool
/= :: TimestampProperty -> TimestampProperty -> Bool
Prelude.Eq, Int -> TimestampProperty -> ShowS
[TimestampProperty] -> ShowS
TimestampProperty -> String
(Int -> TimestampProperty -> ShowS)
-> (TimestampProperty -> String)
-> ([TimestampProperty] -> ShowS)
-> Show TimestampProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TimestampProperty -> ShowS
showsPrec :: Int -> TimestampProperty -> ShowS
$cshow :: TimestampProperty -> String
show :: TimestampProperty -> String
$cshowList :: [TimestampProperty] -> ShowS
showList :: [TimestampProperty] -> ShowS
Prelude.Show)
mkTimestampProperty :: Value Prelude.Text -> TimestampProperty
mkTimestampProperty :: Value Text -> TimestampProperty
mkTimestampProperty Value Text
value
  = TimestampProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), value :: Value Text
value = Value Text
value, unit :: Maybe (Value Text)
unit = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TimestampProperty where
  toResourceProperties :: TimestampProperty -> ResourceProperties
toResourceProperties TimestampProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TimestampProperty -> ()
unit :: TimestampProperty -> Maybe (Value Text)
value :: TimestampProperty -> Value Text
haddock_workaround_ :: ()
unit :: Maybe (Value Text)
value :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::IoT::TopicRule.Timestamp",
         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
"Value" 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
value]
                           ([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
"Unit" (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)
unit]))}
instance JSON.ToJSON TimestampProperty where
  toJSON :: TimestampProperty -> Value
toJSON TimestampProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TimestampProperty -> ()
unit :: TimestampProperty -> Maybe (Value Text)
value :: TimestampProperty -> Value Text
haddock_workaround_ :: ()
unit :: Maybe (Value Text)
value :: Value Text
..}
    = [(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
"Value" 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
value]
              ([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
"Unit" (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)
unit])))
instance Property "Unit" TimestampProperty where
  type PropertyType "Unit" TimestampProperty = Value Prelude.Text
  set :: PropertyType "Unit" TimestampProperty
-> TimestampProperty -> TimestampProperty
set PropertyType "Unit" TimestampProperty
newValue TimestampProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TimestampProperty -> ()
unit :: TimestampProperty -> Maybe (Value Text)
value :: TimestampProperty -> Value Text
haddock_workaround_ :: ()
unit :: Maybe (Value Text)
value :: Value Text
..}
    = TimestampProperty {unit :: Maybe (Value Text)
unit = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Unit" TimestampProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
value :: Value Text
haddock_workaround_ :: ()
value :: Value Text
..}
instance Property "Value" TimestampProperty where
  type PropertyType "Value" TimestampProperty = Value Prelude.Text
  set :: PropertyType "Value" TimestampProperty
-> TimestampProperty -> TimestampProperty
set PropertyType "Value" TimestampProperty
newValue TimestampProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TimestampProperty -> ()
unit :: TimestampProperty -> Maybe (Value Text)
value :: TimestampProperty -> Value Text
haddock_workaround_ :: ()
unit :: Maybe (Value Text)
value :: Value Text
..}
    = TimestampProperty {value :: Value Text
value = PropertyType "Value" TimestampProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
unit :: Maybe (Value Text)
haddock_workaround_ :: ()
unit :: Maybe (Value Text)
..}