module Stratosphere.LookoutMetrics.AnomalyDetector.TimestampColumnProperty (
        TimestampColumnProperty(..), mkTimestampColumnProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TimestampColumnProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-timestampcolumn.html>
    TimestampColumnProperty {TimestampColumnProperty -> ()
haddock_workaround_ :: (),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-timestampcolumn.html#cfn-lookoutmetrics-anomalydetector-timestampcolumn-columnformat>
                             TimestampColumnProperty -> Maybe (Value Text)
columnFormat :: (Prelude.Maybe (Value Prelude.Text)),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-timestampcolumn.html#cfn-lookoutmetrics-anomalydetector-timestampcolumn-columnname>
                             TimestampColumnProperty -> Maybe (Value Text)
columnName :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (TimestampColumnProperty -> TimestampColumnProperty -> Bool
(TimestampColumnProperty -> TimestampColumnProperty -> Bool)
-> (TimestampColumnProperty -> TimestampColumnProperty -> Bool)
-> Eq TimestampColumnProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TimestampColumnProperty -> TimestampColumnProperty -> Bool
== :: TimestampColumnProperty -> TimestampColumnProperty -> Bool
$c/= :: TimestampColumnProperty -> TimestampColumnProperty -> Bool
/= :: TimestampColumnProperty -> TimestampColumnProperty -> Bool
Prelude.Eq, Int -> TimestampColumnProperty -> ShowS
[TimestampColumnProperty] -> ShowS
TimestampColumnProperty -> String
(Int -> TimestampColumnProperty -> ShowS)
-> (TimestampColumnProperty -> String)
-> ([TimestampColumnProperty] -> ShowS)
-> Show TimestampColumnProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TimestampColumnProperty -> ShowS
showsPrec :: Int -> TimestampColumnProperty -> ShowS
$cshow :: TimestampColumnProperty -> String
show :: TimestampColumnProperty -> String
$cshowList :: [TimestampColumnProperty] -> ShowS
showList :: [TimestampColumnProperty] -> ShowS
Prelude.Show)
mkTimestampColumnProperty :: TimestampColumnProperty
mkTimestampColumnProperty :: TimestampColumnProperty
mkTimestampColumnProperty
  = TimestampColumnProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), columnFormat :: Maybe (Value Text)
columnFormat = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       columnName :: Maybe (Value Text)
columnName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TimestampColumnProperty where
  toResourceProperties :: TimestampColumnProperty -> ResourceProperties
toResourceProperties TimestampColumnProperty {Maybe (Value Text)
()
haddock_workaround_ :: TimestampColumnProperty -> ()
columnFormat :: TimestampColumnProperty -> Maybe (Value Text)
columnName :: TimestampColumnProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
columnFormat :: Maybe (Value Text)
columnName :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::LookoutMetrics::AnomalyDetector.TimestampColumn",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([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
"ColumnFormat" (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)
columnFormat,
                            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
"ColumnName" (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)
columnName])}
instance JSON.ToJSON TimestampColumnProperty where
  toJSON :: TimestampColumnProperty -> Value
toJSON TimestampColumnProperty {Maybe (Value Text)
()
haddock_workaround_ :: TimestampColumnProperty -> ()
columnFormat :: TimestampColumnProperty -> Maybe (Value Text)
columnName :: TimestampColumnProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
columnFormat :: Maybe (Value Text)
columnName :: Maybe (Value Text)
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([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
"ColumnFormat" (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)
columnFormat,
               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
"ColumnName" (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)
columnName]))
instance Property "ColumnFormat" TimestampColumnProperty where
  type PropertyType "ColumnFormat" TimestampColumnProperty = Value Prelude.Text
  set :: PropertyType "ColumnFormat" TimestampColumnProperty
-> TimestampColumnProperty -> TimestampColumnProperty
set PropertyType "ColumnFormat" TimestampColumnProperty
newValue TimestampColumnProperty {Maybe (Value Text)
()
haddock_workaround_ :: TimestampColumnProperty -> ()
columnFormat :: TimestampColumnProperty -> Maybe (Value Text)
columnName :: TimestampColumnProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
columnFormat :: Maybe (Value Text)
columnName :: Maybe (Value Text)
..}
    = TimestampColumnProperty
        {columnFormat :: Maybe (Value Text)
columnFormat = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ColumnFormat" TimestampColumnProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
columnName :: Maybe (Value Text)
haddock_workaround_ :: ()
columnName :: Maybe (Value Text)
..}
instance Property "ColumnName" TimestampColumnProperty where
  type PropertyType "ColumnName" TimestampColumnProperty = Value Prelude.Text
  set :: PropertyType "ColumnName" TimestampColumnProperty
-> TimestampColumnProperty -> TimestampColumnProperty
set PropertyType "ColumnName" TimestampColumnProperty
newValue TimestampColumnProperty {Maybe (Value Text)
()
haddock_workaround_ :: TimestampColumnProperty -> ()
columnFormat :: TimestampColumnProperty -> Maybe (Value Text)
columnName :: TimestampColumnProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
columnFormat :: Maybe (Value Text)
columnName :: Maybe (Value Text)
..}
    = TimestampColumnProperty {columnName :: Maybe (Value Text)
columnName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ColumnName" TimestampColumnProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
columnFormat :: Maybe (Value Text)
haddock_workaround_ :: ()
columnFormat :: Maybe (Value Text)
..}