module Stratosphere.KinesisAnalytics.ApplicationReferenceDataSource.MappingParametersProperty (
module Exports, MappingParametersProperty(..),
mkMappingParametersProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.KinesisAnalytics.ApplicationReferenceDataSource.CSVMappingParametersProperty as Exports
import {-# SOURCE #-} Stratosphere.KinesisAnalytics.ApplicationReferenceDataSource.JSONMappingParametersProperty as Exports
import Stratosphere.ResourceProperties
data MappingParametersProperty
=
MappingParametersProperty {MappingParametersProperty -> ()
haddock_workaround_ :: (),
MappingParametersProperty -> Maybe CSVMappingParametersProperty
cSVMappingParameters :: (Prelude.Maybe CSVMappingParametersProperty),
MappingParametersProperty -> Maybe JSONMappingParametersProperty
jSONMappingParameters :: (Prelude.Maybe JSONMappingParametersProperty)}
deriving stock (MappingParametersProperty -> MappingParametersProperty -> Bool
(MappingParametersProperty -> MappingParametersProperty -> Bool)
-> (MappingParametersProperty -> MappingParametersProperty -> Bool)
-> Eq MappingParametersProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MappingParametersProperty -> MappingParametersProperty -> Bool
== :: MappingParametersProperty -> MappingParametersProperty -> Bool
$c/= :: MappingParametersProperty -> MappingParametersProperty -> Bool
/= :: MappingParametersProperty -> MappingParametersProperty -> Bool
Prelude.Eq, Int -> MappingParametersProperty -> ShowS
[MappingParametersProperty] -> ShowS
MappingParametersProperty -> String
(Int -> MappingParametersProperty -> ShowS)
-> (MappingParametersProperty -> String)
-> ([MappingParametersProperty] -> ShowS)
-> Show MappingParametersProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MappingParametersProperty -> ShowS
showsPrec :: Int -> MappingParametersProperty -> ShowS
$cshow :: MappingParametersProperty -> String
show :: MappingParametersProperty -> String
$cshowList :: [MappingParametersProperty] -> ShowS
showList :: [MappingParametersProperty] -> ShowS
Prelude.Show)
mkMappingParametersProperty :: MappingParametersProperty
mkMappingParametersProperty :: MappingParametersProperty
mkMappingParametersProperty
= MappingParametersProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), cSVMappingParameters :: Maybe CSVMappingParametersProperty
cSVMappingParameters = Maybe CSVMappingParametersProperty
forall a. Maybe a
Prelude.Nothing,
jSONMappingParameters :: Maybe JSONMappingParametersProperty
jSONMappingParameters = Maybe JSONMappingParametersProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties MappingParametersProperty where
toResourceProperties :: MappingParametersProperty -> ResourceProperties
toResourceProperties MappingParametersProperty {Maybe CSVMappingParametersProperty
Maybe JSONMappingParametersProperty
()
haddock_workaround_ :: MappingParametersProperty -> ()
cSVMappingParameters :: MappingParametersProperty -> Maybe CSVMappingParametersProperty
jSONMappingParameters :: MappingParametersProperty -> Maybe JSONMappingParametersProperty
haddock_workaround_ :: ()
cSVMappingParameters :: Maybe CSVMappingParametersProperty
jSONMappingParameters :: Maybe JSONMappingParametersProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::KinesisAnalytics::ApplicationReferenceDataSource.MappingParameters",
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 -> CSVMappingParametersProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CSVMappingParameters" (CSVMappingParametersProperty -> (Key, Value))
-> Maybe CSVMappingParametersProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CSVMappingParametersProperty
cSVMappingParameters,
Key -> JSONMappingParametersProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"JSONMappingParameters"
(JSONMappingParametersProperty -> (Key, Value))
-> Maybe JSONMappingParametersProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe JSONMappingParametersProperty
jSONMappingParameters])}
instance JSON.ToJSON MappingParametersProperty where
toJSON :: MappingParametersProperty -> Value
toJSON MappingParametersProperty {Maybe CSVMappingParametersProperty
Maybe JSONMappingParametersProperty
()
haddock_workaround_ :: MappingParametersProperty -> ()
cSVMappingParameters :: MappingParametersProperty -> Maybe CSVMappingParametersProperty
jSONMappingParameters :: MappingParametersProperty -> Maybe JSONMappingParametersProperty
haddock_workaround_ :: ()
cSVMappingParameters :: Maybe CSVMappingParametersProperty
jSONMappingParameters :: Maybe JSONMappingParametersProperty
..}
= [(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 -> CSVMappingParametersProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CSVMappingParameters" (CSVMappingParametersProperty -> (Key, Value))
-> Maybe CSVMappingParametersProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CSVMappingParametersProperty
cSVMappingParameters,
Key -> JSONMappingParametersProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"JSONMappingParameters"
(JSONMappingParametersProperty -> (Key, Value))
-> Maybe JSONMappingParametersProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe JSONMappingParametersProperty
jSONMappingParameters]))
instance Property "CSVMappingParameters" MappingParametersProperty where
type PropertyType "CSVMappingParameters" MappingParametersProperty = CSVMappingParametersProperty
set :: PropertyType "CSVMappingParameters" MappingParametersProperty
-> MappingParametersProperty -> MappingParametersProperty
set PropertyType "CSVMappingParameters" MappingParametersProperty
newValue MappingParametersProperty {Maybe CSVMappingParametersProperty
Maybe JSONMappingParametersProperty
()
haddock_workaround_ :: MappingParametersProperty -> ()
cSVMappingParameters :: MappingParametersProperty -> Maybe CSVMappingParametersProperty
jSONMappingParameters :: MappingParametersProperty -> Maybe JSONMappingParametersProperty
haddock_workaround_ :: ()
cSVMappingParameters :: Maybe CSVMappingParametersProperty
jSONMappingParameters :: Maybe JSONMappingParametersProperty
..}
= MappingParametersProperty
{cSVMappingParameters :: Maybe CSVMappingParametersProperty
cSVMappingParameters = CSVMappingParametersProperty -> Maybe CSVMappingParametersProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CSVMappingParameters" MappingParametersProperty
CSVMappingParametersProperty
newValue, Maybe JSONMappingParametersProperty
()
haddock_workaround_ :: ()
jSONMappingParameters :: Maybe JSONMappingParametersProperty
haddock_workaround_ :: ()
jSONMappingParameters :: Maybe JSONMappingParametersProperty
..}
instance Property "JSONMappingParameters" MappingParametersProperty where
type PropertyType "JSONMappingParameters" MappingParametersProperty = JSONMappingParametersProperty
set :: PropertyType "JSONMappingParameters" MappingParametersProperty
-> MappingParametersProperty -> MappingParametersProperty
set PropertyType "JSONMappingParameters" MappingParametersProperty
newValue MappingParametersProperty {Maybe CSVMappingParametersProperty
Maybe JSONMappingParametersProperty
()
haddock_workaround_ :: MappingParametersProperty -> ()
cSVMappingParameters :: MappingParametersProperty -> Maybe CSVMappingParametersProperty
jSONMappingParameters :: MappingParametersProperty -> Maybe JSONMappingParametersProperty
haddock_workaround_ :: ()
cSVMappingParameters :: Maybe CSVMappingParametersProperty
jSONMappingParameters :: Maybe JSONMappingParametersProperty
..}
= MappingParametersProperty
{jSONMappingParameters :: Maybe JSONMappingParametersProperty
jSONMappingParameters = JSONMappingParametersProperty
-> Maybe JSONMappingParametersProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "JSONMappingParameters" MappingParametersProperty
JSONMappingParametersProperty
newValue, Maybe CSVMappingParametersProperty
()
haddock_workaround_ :: ()
cSVMappingParameters :: Maybe CSVMappingParametersProperty
haddock_workaround_ :: ()
cSVMappingParameters :: Maybe CSVMappingParametersProperty
..}