module Stratosphere.Timestream.ScheduledQuery.MultiMeasureAttributeMappingProperty (
        MultiMeasureAttributeMappingProperty(..),
        mkMultiMeasureAttributeMappingProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data MultiMeasureAttributeMappingProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-multimeasureattributemapping.html>
    MultiMeasureAttributeMappingProperty {MultiMeasureAttributeMappingProperty -> ()
haddock_workaround_ :: (),
                                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-multimeasureattributemapping.html#cfn-timestream-scheduledquery-multimeasureattributemapping-measurevaluetype>
                                          MultiMeasureAttributeMappingProperty -> Value Text
measureValueType :: (Value Prelude.Text),
                                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-multimeasureattributemapping.html#cfn-timestream-scheduledquery-multimeasureattributemapping-sourcecolumn>
                                          MultiMeasureAttributeMappingProperty -> Value Text
sourceColumn :: (Value Prelude.Text),
                                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-multimeasureattributemapping.html#cfn-timestream-scheduledquery-multimeasureattributemapping-targetmultimeasureattributename>
                                          MultiMeasureAttributeMappingProperty -> Maybe (Value Text)
targetMultiMeasureAttributeName :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (MultiMeasureAttributeMappingProperty
-> MultiMeasureAttributeMappingProperty -> Bool
(MultiMeasureAttributeMappingProperty
 -> MultiMeasureAttributeMappingProperty -> Bool)
-> (MultiMeasureAttributeMappingProperty
    -> MultiMeasureAttributeMappingProperty -> Bool)
-> Eq MultiMeasureAttributeMappingProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MultiMeasureAttributeMappingProperty
-> MultiMeasureAttributeMappingProperty -> Bool
== :: MultiMeasureAttributeMappingProperty
-> MultiMeasureAttributeMappingProperty -> Bool
$c/= :: MultiMeasureAttributeMappingProperty
-> MultiMeasureAttributeMappingProperty -> Bool
/= :: MultiMeasureAttributeMappingProperty
-> MultiMeasureAttributeMappingProperty -> Bool
Prelude.Eq, Int -> MultiMeasureAttributeMappingProperty -> ShowS
[MultiMeasureAttributeMappingProperty] -> ShowS
MultiMeasureAttributeMappingProperty -> String
(Int -> MultiMeasureAttributeMappingProperty -> ShowS)
-> (MultiMeasureAttributeMappingProperty -> String)
-> ([MultiMeasureAttributeMappingProperty] -> ShowS)
-> Show MultiMeasureAttributeMappingProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MultiMeasureAttributeMappingProperty -> ShowS
showsPrec :: Int -> MultiMeasureAttributeMappingProperty -> ShowS
$cshow :: MultiMeasureAttributeMappingProperty -> String
show :: MultiMeasureAttributeMappingProperty -> String
$cshowList :: [MultiMeasureAttributeMappingProperty] -> ShowS
showList :: [MultiMeasureAttributeMappingProperty] -> ShowS
Prelude.Show)
mkMultiMeasureAttributeMappingProperty ::
  Value Prelude.Text
  -> Value Prelude.Text -> MultiMeasureAttributeMappingProperty
mkMultiMeasureAttributeMappingProperty :: Value Text -> Value Text -> MultiMeasureAttributeMappingProperty
mkMultiMeasureAttributeMappingProperty
  Value Text
measureValueType
  Value Text
sourceColumn
  = MultiMeasureAttributeMappingProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), measureValueType :: Value Text
measureValueType = Value Text
measureValueType,
       sourceColumn :: Value Text
sourceColumn = Value Text
sourceColumn,
       targetMultiMeasureAttributeName :: Maybe (Value Text)
targetMultiMeasureAttributeName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties MultiMeasureAttributeMappingProperty where
  toResourceProperties :: MultiMeasureAttributeMappingProperty -> ResourceProperties
toResourceProperties MultiMeasureAttributeMappingProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MultiMeasureAttributeMappingProperty -> ()
measureValueType :: MultiMeasureAttributeMappingProperty -> Value Text
sourceColumn :: MultiMeasureAttributeMappingProperty -> Value Text
targetMultiMeasureAttributeName :: MultiMeasureAttributeMappingProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
measureValueType :: Value Text
sourceColumn :: Value Text
targetMultiMeasureAttributeName :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Timestream::ScheduledQuery.MultiMeasureAttributeMapping",
         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
"MeasureValueType" 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
measureValueType,
                            Key
"SourceColumn" 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
sourceColumn]
                           ([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
"TargetMultiMeasureAttributeName"
                                 (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)
targetMultiMeasureAttributeName]))}
instance JSON.ToJSON MultiMeasureAttributeMappingProperty where
  toJSON :: MultiMeasureAttributeMappingProperty -> Value
toJSON MultiMeasureAttributeMappingProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MultiMeasureAttributeMappingProperty -> ()
measureValueType :: MultiMeasureAttributeMappingProperty -> Value Text
sourceColumn :: MultiMeasureAttributeMappingProperty -> Value Text
targetMultiMeasureAttributeName :: MultiMeasureAttributeMappingProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
measureValueType :: Value Text
sourceColumn :: Value Text
targetMultiMeasureAttributeName :: 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
"MeasureValueType" 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
measureValueType,
               Key
"SourceColumn" 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
sourceColumn]
              ([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
"TargetMultiMeasureAttributeName"
                    (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)
targetMultiMeasureAttributeName])))
instance Property "MeasureValueType" MultiMeasureAttributeMappingProperty where
  type PropertyType "MeasureValueType" MultiMeasureAttributeMappingProperty = Value Prelude.Text
  set :: PropertyType
  "MeasureValueType" MultiMeasureAttributeMappingProperty
-> MultiMeasureAttributeMappingProperty
-> MultiMeasureAttributeMappingProperty
set PropertyType
  "MeasureValueType" MultiMeasureAttributeMappingProperty
newValue MultiMeasureAttributeMappingProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MultiMeasureAttributeMappingProperty -> ()
measureValueType :: MultiMeasureAttributeMappingProperty -> Value Text
sourceColumn :: MultiMeasureAttributeMappingProperty -> Value Text
targetMultiMeasureAttributeName :: MultiMeasureAttributeMappingProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
measureValueType :: Value Text
sourceColumn :: Value Text
targetMultiMeasureAttributeName :: Maybe (Value Text)
..}
    = MultiMeasureAttributeMappingProperty
        {measureValueType :: Value Text
measureValueType = PropertyType
  "MeasureValueType" MultiMeasureAttributeMappingProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
sourceColumn :: Value Text
targetMultiMeasureAttributeName :: Maybe (Value Text)
haddock_workaround_ :: ()
sourceColumn :: Value Text
targetMultiMeasureAttributeName :: Maybe (Value Text)
..}
instance Property "SourceColumn" MultiMeasureAttributeMappingProperty where
  type PropertyType "SourceColumn" MultiMeasureAttributeMappingProperty = Value Prelude.Text
  set :: PropertyType "SourceColumn" MultiMeasureAttributeMappingProperty
-> MultiMeasureAttributeMappingProperty
-> MultiMeasureAttributeMappingProperty
set PropertyType "SourceColumn" MultiMeasureAttributeMappingProperty
newValue MultiMeasureAttributeMappingProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MultiMeasureAttributeMappingProperty -> ()
measureValueType :: MultiMeasureAttributeMappingProperty -> Value Text
sourceColumn :: MultiMeasureAttributeMappingProperty -> Value Text
targetMultiMeasureAttributeName :: MultiMeasureAttributeMappingProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
measureValueType :: Value Text
sourceColumn :: Value Text
targetMultiMeasureAttributeName :: Maybe (Value Text)
..}
    = MultiMeasureAttributeMappingProperty
        {sourceColumn :: Value Text
sourceColumn = PropertyType "SourceColumn" MultiMeasureAttributeMappingProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
measureValueType :: Value Text
targetMultiMeasureAttributeName :: Maybe (Value Text)
haddock_workaround_ :: ()
measureValueType :: Value Text
targetMultiMeasureAttributeName :: Maybe (Value Text)
..}
instance Property "TargetMultiMeasureAttributeName" MultiMeasureAttributeMappingProperty where
  type PropertyType "TargetMultiMeasureAttributeName" MultiMeasureAttributeMappingProperty = Value Prelude.Text
  set :: PropertyType
  "TargetMultiMeasureAttributeName"
  MultiMeasureAttributeMappingProperty
-> MultiMeasureAttributeMappingProperty
-> MultiMeasureAttributeMappingProperty
set PropertyType
  "TargetMultiMeasureAttributeName"
  MultiMeasureAttributeMappingProperty
newValue MultiMeasureAttributeMappingProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MultiMeasureAttributeMappingProperty -> ()
measureValueType :: MultiMeasureAttributeMappingProperty -> Value Text
sourceColumn :: MultiMeasureAttributeMappingProperty -> Value Text
targetMultiMeasureAttributeName :: MultiMeasureAttributeMappingProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
measureValueType :: Value Text
sourceColumn :: Value Text
targetMultiMeasureAttributeName :: Maybe (Value Text)
..}
    = MultiMeasureAttributeMappingProperty
        {targetMultiMeasureAttributeName :: Maybe (Value Text)
targetMultiMeasureAttributeName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "TargetMultiMeasureAttributeName"
  MultiMeasureAttributeMappingProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
measureValueType :: Value Text
sourceColumn :: Value Text
haddock_workaround_ :: ()
measureValueType :: Value Text
sourceColumn :: Value Text
..}