module Stratosphere.IoTSiteWise.AssetModel.TumblingWindowProperty (
TumblingWindowProperty(..), mkTumblingWindowProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TumblingWindowProperty
=
TumblingWindowProperty {TumblingWindowProperty -> ()
haddock_workaround_ :: (),
TumblingWindowProperty -> Value Text
interval :: (Value Prelude.Text),
TumblingWindowProperty -> Maybe (Value Text)
offset :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (TumblingWindowProperty -> TumblingWindowProperty -> Bool
(TumblingWindowProperty -> TumblingWindowProperty -> Bool)
-> (TumblingWindowProperty -> TumblingWindowProperty -> Bool)
-> Eq TumblingWindowProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TumblingWindowProperty -> TumblingWindowProperty -> Bool
== :: TumblingWindowProperty -> TumblingWindowProperty -> Bool
$c/= :: TumblingWindowProperty -> TumblingWindowProperty -> Bool
/= :: TumblingWindowProperty -> TumblingWindowProperty -> Bool
Prelude.Eq, Int -> TumblingWindowProperty -> ShowS
[TumblingWindowProperty] -> ShowS
TumblingWindowProperty -> String
(Int -> TumblingWindowProperty -> ShowS)
-> (TumblingWindowProperty -> String)
-> ([TumblingWindowProperty] -> ShowS)
-> Show TumblingWindowProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TumblingWindowProperty -> ShowS
showsPrec :: Int -> TumblingWindowProperty -> ShowS
$cshow :: TumblingWindowProperty -> String
show :: TumblingWindowProperty -> String
$cshowList :: [TumblingWindowProperty] -> ShowS
showList :: [TumblingWindowProperty] -> ShowS
Prelude.Show)
mkTumblingWindowProperty ::
Value Prelude.Text -> TumblingWindowProperty
mkTumblingWindowProperty :: Value Text -> TumblingWindowProperty
mkTumblingWindowProperty Value Text
interval
= TumblingWindowProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), interval :: Value Text
interval = Value Text
interval,
offset :: Maybe (Value Text)
offset = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TumblingWindowProperty where
toResourceProperties :: TumblingWindowProperty -> ResourceProperties
toResourceProperties TumblingWindowProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TumblingWindowProperty -> ()
interval :: TumblingWindowProperty -> Value Text
offset :: TumblingWindowProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
interval :: Value Text
offset :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::IoTSiteWise::AssetModel.TumblingWindow",
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
"Interval" 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
interval]
([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
"Offset" (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)
offset]))}
instance JSON.ToJSON TumblingWindowProperty where
toJSON :: TumblingWindowProperty -> Value
toJSON TumblingWindowProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TumblingWindowProperty -> ()
interval :: TumblingWindowProperty -> Value Text
offset :: TumblingWindowProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
interval :: Value Text
offset :: Maybe (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
"Interval" 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
interval]
([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
"Offset" (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)
offset])))
instance Property "Interval" TumblingWindowProperty where
type PropertyType "Interval" TumblingWindowProperty = Value Prelude.Text
set :: PropertyType "Interval" TumblingWindowProperty
-> TumblingWindowProperty -> TumblingWindowProperty
set PropertyType "Interval" TumblingWindowProperty
newValue TumblingWindowProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TumblingWindowProperty -> ()
interval :: TumblingWindowProperty -> Value Text
offset :: TumblingWindowProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
interval :: Value Text
offset :: Maybe (Value Text)
..}
= TumblingWindowProperty {interval :: Value Text
interval = PropertyType "Interval" TumblingWindowProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
offset :: Maybe (Value Text)
haddock_workaround_ :: ()
offset :: Maybe (Value Text)
..}
instance Property "Offset" TumblingWindowProperty where
type PropertyType "Offset" TumblingWindowProperty = Value Prelude.Text
set :: PropertyType "Offset" TumblingWindowProperty
-> TumblingWindowProperty -> TumblingWindowProperty
set PropertyType "Offset" TumblingWindowProperty
newValue TumblingWindowProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TumblingWindowProperty -> ()
interval :: TumblingWindowProperty -> Value Text
offset :: TumblingWindowProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
interval :: Value Text
offset :: Maybe (Value Text)
..}
= TumblingWindowProperty {offset :: Maybe (Value Text)
offset = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Offset" TumblingWindowProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
interval :: Value Text
haddock_workaround_ :: ()
interval :: Value Text
..}