module Stratosphere.IoTAnalytics.Datastore.TimestampPartitionProperty (
TimestampPartitionProperty(..), mkTimestampPartitionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TimestampPartitionProperty
=
TimestampPartitionProperty {TimestampPartitionProperty -> ()
haddock_workaround_ :: (),
TimestampPartitionProperty -> Value Text
attributeName :: (Value Prelude.Text),
TimestampPartitionProperty -> Maybe (Value Text)
timestampFormat :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (TimestampPartitionProperty -> TimestampPartitionProperty -> Bool
(TimestampPartitionProperty -> TimestampPartitionProperty -> Bool)
-> (TimestampPartitionProperty
-> TimestampPartitionProperty -> Bool)
-> Eq TimestampPartitionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TimestampPartitionProperty -> TimestampPartitionProperty -> Bool
== :: TimestampPartitionProperty -> TimestampPartitionProperty -> Bool
$c/= :: TimestampPartitionProperty -> TimestampPartitionProperty -> Bool
/= :: TimestampPartitionProperty -> TimestampPartitionProperty -> Bool
Prelude.Eq, Int -> TimestampPartitionProperty -> ShowS
[TimestampPartitionProperty] -> ShowS
TimestampPartitionProperty -> String
(Int -> TimestampPartitionProperty -> ShowS)
-> (TimestampPartitionProperty -> String)
-> ([TimestampPartitionProperty] -> ShowS)
-> Show TimestampPartitionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TimestampPartitionProperty -> ShowS
showsPrec :: Int -> TimestampPartitionProperty -> ShowS
$cshow :: TimestampPartitionProperty -> String
show :: TimestampPartitionProperty -> String
$cshowList :: [TimestampPartitionProperty] -> ShowS
showList :: [TimestampPartitionProperty] -> ShowS
Prelude.Show)
mkTimestampPartitionProperty ::
Value Prelude.Text -> TimestampPartitionProperty
mkTimestampPartitionProperty :: Value Text -> TimestampPartitionProperty
mkTimestampPartitionProperty Value Text
attributeName
= TimestampPartitionProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), attributeName :: Value Text
attributeName = Value Text
attributeName,
timestampFormat :: Maybe (Value Text)
timestampFormat = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TimestampPartitionProperty where
toResourceProperties :: TimestampPartitionProperty -> ResourceProperties
toResourceProperties TimestampPartitionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TimestampPartitionProperty -> ()
attributeName :: TimestampPartitionProperty -> Value Text
timestampFormat :: TimestampPartitionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
attributeName :: Value Text
timestampFormat :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::IoTAnalytics::Datastore.TimestampPartition",
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
"AttributeName" 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
attributeName]
([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]))}
instance JSON.ToJSON TimestampPartitionProperty where
toJSON :: TimestampPartitionProperty -> Value
toJSON TimestampPartitionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TimestampPartitionProperty -> ()
attributeName :: TimestampPartitionProperty -> Value Text
timestampFormat :: TimestampPartitionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
attributeName :: Value Text
timestampFormat :: 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
"AttributeName" 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
attributeName]
([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])))
instance Property "AttributeName" TimestampPartitionProperty where
type PropertyType "AttributeName" TimestampPartitionProperty = Value Prelude.Text
set :: PropertyType "AttributeName" TimestampPartitionProperty
-> TimestampPartitionProperty -> TimestampPartitionProperty
set PropertyType "AttributeName" TimestampPartitionProperty
newValue TimestampPartitionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TimestampPartitionProperty -> ()
attributeName :: TimestampPartitionProperty -> Value Text
timestampFormat :: TimestampPartitionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
attributeName :: Value Text
timestampFormat :: Maybe (Value Text)
..}
= TimestampPartitionProperty {attributeName :: Value Text
attributeName = PropertyType "AttributeName" TimestampPartitionProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
timestampFormat :: Maybe (Value Text)
haddock_workaround_ :: ()
timestampFormat :: Maybe (Value Text)
..}
instance Property "TimestampFormat" TimestampPartitionProperty where
type PropertyType "TimestampFormat" TimestampPartitionProperty = Value Prelude.Text
set :: PropertyType "TimestampFormat" TimestampPartitionProperty
-> TimestampPartitionProperty -> TimestampPartitionProperty
set PropertyType "TimestampFormat" TimestampPartitionProperty
newValue TimestampPartitionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TimestampPartitionProperty -> ()
attributeName :: TimestampPartitionProperty -> Value Text
timestampFormat :: TimestampPartitionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
attributeName :: Value Text
timestampFormat :: Maybe (Value Text)
..}
= TimestampPartitionProperty
{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" TimestampPartitionProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
attributeName :: Value Text
haddock_workaround_ :: ()
attributeName :: Value Text
..}