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