module Stratosphere.KinesisAnalytics.Application.InputSchemaProperty (
module Exports, InputSchemaProperty(..), mkInputSchemaProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.KinesisAnalytics.Application.RecordColumnProperty as Exports
import {-# SOURCE #-} Stratosphere.KinesisAnalytics.Application.RecordFormatProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data InputSchemaProperty
=
InputSchemaProperty {InputSchemaProperty -> ()
haddock_workaround_ :: (),
InputSchemaProperty -> [RecordColumnProperty]
recordColumns :: [RecordColumnProperty],
InputSchemaProperty -> Maybe (Value Text)
recordEncoding :: (Prelude.Maybe (Value Prelude.Text)),
InputSchemaProperty -> RecordFormatProperty
recordFormat :: RecordFormatProperty}
deriving stock (InputSchemaProperty -> InputSchemaProperty -> Bool
(InputSchemaProperty -> InputSchemaProperty -> Bool)
-> (InputSchemaProperty -> InputSchemaProperty -> Bool)
-> Eq InputSchemaProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: InputSchemaProperty -> InputSchemaProperty -> Bool
== :: InputSchemaProperty -> InputSchemaProperty -> Bool
$c/= :: InputSchemaProperty -> InputSchemaProperty -> Bool
/= :: InputSchemaProperty -> InputSchemaProperty -> Bool
Prelude.Eq, Int -> InputSchemaProperty -> ShowS
[InputSchemaProperty] -> ShowS
InputSchemaProperty -> String
(Int -> InputSchemaProperty -> ShowS)
-> (InputSchemaProperty -> String)
-> ([InputSchemaProperty] -> ShowS)
-> Show InputSchemaProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> InputSchemaProperty -> ShowS
showsPrec :: Int -> InputSchemaProperty -> ShowS
$cshow :: InputSchemaProperty -> String
show :: InputSchemaProperty -> String
$cshowList :: [InputSchemaProperty] -> ShowS
showList :: [InputSchemaProperty] -> ShowS
Prelude.Show)
mkInputSchemaProperty ::
[RecordColumnProperty]
-> RecordFormatProperty -> InputSchemaProperty
mkInputSchemaProperty :: [RecordColumnProperty]
-> RecordFormatProperty -> InputSchemaProperty
mkInputSchemaProperty [RecordColumnProperty]
recordColumns RecordFormatProperty
recordFormat
= InputSchemaProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), recordColumns :: [RecordColumnProperty]
recordColumns = [RecordColumnProperty]
recordColumns,
recordFormat :: RecordFormatProperty
recordFormat = RecordFormatProperty
recordFormat, recordEncoding :: Maybe (Value Text)
recordEncoding = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties InputSchemaProperty where
toResourceProperties :: InputSchemaProperty -> ResourceProperties
toResourceProperties InputSchemaProperty {[RecordColumnProperty]
Maybe (Value Text)
()
RecordFormatProperty
haddock_workaround_ :: InputSchemaProperty -> ()
recordColumns :: InputSchemaProperty -> [RecordColumnProperty]
recordEncoding :: InputSchemaProperty -> Maybe (Value Text)
recordFormat :: InputSchemaProperty -> RecordFormatProperty
haddock_workaround_ :: ()
recordColumns :: [RecordColumnProperty]
recordEncoding :: Maybe (Value Text)
recordFormat :: RecordFormatProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::KinesisAnalytics::Application.InputSchema",
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
"RecordColumns" Key -> [RecordColumnProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [RecordColumnProperty]
recordColumns,
Key
"RecordFormat" Key -> RecordFormatProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= RecordFormatProperty
recordFormat]
([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
"RecordEncoding" (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)
recordEncoding]))}
instance JSON.ToJSON InputSchemaProperty where
toJSON :: InputSchemaProperty -> Value
toJSON InputSchemaProperty {[RecordColumnProperty]
Maybe (Value Text)
()
RecordFormatProperty
haddock_workaround_ :: InputSchemaProperty -> ()
recordColumns :: InputSchemaProperty -> [RecordColumnProperty]
recordEncoding :: InputSchemaProperty -> Maybe (Value Text)
recordFormat :: InputSchemaProperty -> RecordFormatProperty
haddock_workaround_ :: ()
recordColumns :: [RecordColumnProperty]
recordEncoding :: Maybe (Value Text)
recordFormat :: RecordFormatProperty
..}
= [(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
"RecordColumns" Key -> [RecordColumnProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [RecordColumnProperty]
recordColumns,
Key
"RecordFormat" Key -> RecordFormatProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= RecordFormatProperty
recordFormat]
([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
"RecordEncoding" (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)
recordEncoding])))
instance Property "RecordColumns" InputSchemaProperty where
type PropertyType "RecordColumns" InputSchemaProperty = [RecordColumnProperty]
set :: PropertyType "RecordColumns" InputSchemaProperty
-> InputSchemaProperty -> InputSchemaProperty
set PropertyType "RecordColumns" InputSchemaProperty
newValue InputSchemaProperty {[RecordColumnProperty]
Maybe (Value Text)
()
RecordFormatProperty
haddock_workaround_ :: InputSchemaProperty -> ()
recordColumns :: InputSchemaProperty -> [RecordColumnProperty]
recordEncoding :: InputSchemaProperty -> Maybe (Value Text)
recordFormat :: InputSchemaProperty -> RecordFormatProperty
haddock_workaround_ :: ()
recordColumns :: [RecordColumnProperty]
recordEncoding :: Maybe (Value Text)
recordFormat :: RecordFormatProperty
..}
= InputSchemaProperty {recordColumns :: [RecordColumnProperty]
recordColumns = [RecordColumnProperty]
PropertyType "RecordColumns" InputSchemaProperty
newValue, Maybe (Value Text)
()
RecordFormatProperty
haddock_workaround_ :: ()
recordEncoding :: Maybe (Value Text)
recordFormat :: RecordFormatProperty
haddock_workaround_ :: ()
recordEncoding :: Maybe (Value Text)
recordFormat :: RecordFormatProperty
..}
instance Property "RecordEncoding" InputSchemaProperty where
type PropertyType "RecordEncoding" InputSchemaProperty = Value Prelude.Text
set :: PropertyType "RecordEncoding" InputSchemaProperty
-> InputSchemaProperty -> InputSchemaProperty
set PropertyType "RecordEncoding" InputSchemaProperty
newValue InputSchemaProperty {[RecordColumnProperty]
Maybe (Value Text)
()
RecordFormatProperty
haddock_workaround_ :: InputSchemaProperty -> ()
recordColumns :: InputSchemaProperty -> [RecordColumnProperty]
recordEncoding :: InputSchemaProperty -> Maybe (Value Text)
recordFormat :: InputSchemaProperty -> RecordFormatProperty
haddock_workaround_ :: ()
recordColumns :: [RecordColumnProperty]
recordEncoding :: Maybe (Value Text)
recordFormat :: RecordFormatProperty
..}
= InputSchemaProperty {recordEncoding :: Maybe (Value Text)
recordEncoding = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RecordEncoding" InputSchemaProperty
Value Text
newValue, [RecordColumnProperty]
()
RecordFormatProperty
haddock_workaround_ :: ()
recordColumns :: [RecordColumnProperty]
recordFormat :: RecordFormatProperty
haddock_workaround_ :: ()
recordColumns :: [RecordColumnProperty]
recordFormat :: RecordFormatProperty
..}
instance Property "RecordFormat" InputSchemaProperty where
type PropertyType "RecordFormat" InputSchemaProperty = RecordFormatProperty
set :: PropertyType "RecordFormat" InputSchemaProperty
-> InputSchemaProperty -> InputSchemaProperty
set PropertyType "RecordFormat" InputSchemaProperty
newValue InputSchemaProperty {[RecordColumnProperty]
Maybe (Value Text)
()
RecordFormatProperty
haddock_workaround_ :: InputSchemaProperty -> ()
recordColumns :: InputSchemaProperty -> [RecordColumnProperty]
recordEncoding :: InputSchemaProperty -> Maybe (Value Text)
recordFormat :: InputSchemaProperty -> RecordFormatProperty
haddock_workaround_ :: ()
recordColumns :: [RecordColumnProperty]
recordEncoding :: Maybe (Value Text)
recordFormat :: RecordFormatProperty
..}
= InputSchemaProperty {recordFormat :: RecordFormatProperty
recordFormat = PropertyType "RecordFormat" InputSchemaProperty
RecordFormatProperty
newValue, [RecordColumnProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
recordColumns :: [RecordColumnProperty]
recordEncoding :: Maybe (Value Text)
haddock_workaround_ :: ()
recordColumns :: [RecordColumnProperty]
recordEncoding :: Maybe (Value Text)
..}