module Stratosphere.KinesisAnalytics.Application.RecordColumnProperty (
        RecordColumnProperty(..), mkRecordColumnProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data RecordColumnProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisanalytics-application-recordcolumn.html>
    RecordColumnProperty {RecordColumnProperty -> ()
haddock_workaround_ :: (),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisanalytics-application-recordcolumn.html#cfn-kinesisanalytics-application-recordcolumn-mapping>
                          RecordColumnProperty -> Maybe (Value Text)
mapping :: (Prelude.Maybe (Value Prelude.Text)),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisanalytics-application-recordcolumn.html#cfn-kinesisanalytics-application-recordcolumn-name>
                          RecordColumnProperty -> Value Text
name :: (Value Prelude.Text),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisanalytics-application-recordcolumn.html#cfn-kinesisanalytics-application-recordcolumn-sqltype>
                          RecordColumnProperty -> Value Text
sqlType :: (Value Prelude.Text)}
  deriving stock (RecordColumnProperty -> RecordColumnProperty -> Bool
(RecordColumnProperty -> RecordColumnProperty -> Bool)
-> (RecordColumnProperty -> RecordColumnProperty -> Bool)
-> Eq RecordColumnProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RecordColumnProperty -> RecordColumnProperty -> Bool
== :: RecordColumnProperty -> RecordColumnProperty -> Bool
$c/= :: RecordColumnProperty -> RecordColumnProperty -> Bool
/= :: RecordColumnProperty -> RecordColumnProperty -> Bool
Prelude.Eq, Int -> RecordColumnProperty -> ShowS
[RecordColumnProperty] -> ShowS
RecordColumnProperty -> String
(Int -> RecordColumnProperty -> ShowS)
-> (RecordColumnProperty -> String)
-> ([RecordColumnProperty] -> ShowS)
-> Show RecordColumnProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RecordColumnProperty -> ShowS
showsPrec :: Int -> RecordColumnProperty -> ShowS
$cshow :: RecordColumnProperty -> String
show :: RecordColumnProperty -> String
$cshowList :: [RecordColumnProperty] -> ShowS
showList :: [RecordColumnProperty] -> ShowS
Prelude.Show)
mkRecordColumnProperty ::
  Value Prelude.Text -> Value Prelude.Text -> RecordColumnProperty
mkRecordColumnProperty :: Value Text -> Value Text -> RecordColumnProperty
mkRecordColumnProperty Value Text
name Value Text
sqlType
  = RecordColumnProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name, sqlType :: Value Text
sqlType = Value Text
sqlType,
       mapping :: Maybe (Value Text)
mapping = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RecordColumnProperty where
  toResourceProperties :: RecordColumnProperty -> ResourceProperties
toResourceProperties RecordColumnProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RecordColumnProperty -> ()
mapping :: RecordColumnProperty -> Maybe (Value Text)
name :: RecordColumnProperty -> Value Text
sqlType :: RecordColumnProperty -> Value Text
haddock_workaround_ :: ()
mapping :: Maybe (Value Text)
name :: Value Text
sqlType :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::KinesisAnalytics::Application.RecordColumn",
         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
"Name" 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
name, Key
"SqlType" 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
sqlType]
                           ([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
"Mapping" (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)
mapping]))}
instance JSON.ToJSON RecordColumnProperty where
  toJSON :: RecordColumnProperty -> Value
toJSON RecordColumnProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RecordColumnProperty -> ()
mapping :: RecordColumnProperty -> Maybe (Value Text)
name :: RecordColumnProperty -> Value Text
sqlType :: RecordColumnProperty -> Value Text
haddock_workaround_ :: ()
mapping :: Maybe (Value Text)
name :: Value Text
sqlType :: 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
"Name" 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
name, Key
"SqlType" 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
sqlType]
              ([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
"Mapping" (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)
mapping])))
instance Property "Mapping" RecordColumnProperty where
  type PropertyType "Mapping" RecordColumnProperty = Value Prelude.Text
  set :: PropertyType "Mapping" RecordColumnProperty
-> RecordColumnProperty -> RecordColumnProperty
set PropertyType "Mapping" RecordColumnProperty
newValue RecordColumnProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RecordColumnProperty -> ()
mapping :: RecordColumnProperty -> Maybe (Value Text)
name :: RecordColumnProperty -> Value Text
sqlType :: RecordColumnProperty -> Value Text
haddock_workaround_ :: ()
mapping :: Maybe (Value Text)
name :: Value Text
sqlType :: Value Text
..}
    = RecordColumnProperty {mapping :: Maybe (Value Text)
mapping = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Mapping" RecordColumnProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
name :: Value Text
sqlType :: Value Text
haddock_workaround_ :: ()
name :: Value Text
sqlType :: Value Text
..}
instance Property "Name" RecordColumnProperty where
  type PropertyType "Name" RecordColumnProperty = Value Prelude.Text
  set :: PropertyType "Name" RecordColumnProperty
-> RecordColumnProperty -> RecordColumnProperty
set PropertyType "Name" RecordColumnProperty
newValue RecordColumnProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RecordColumnProperty -> ()
mapping :: RecordColumnProperty -> Maybe (Value Text)
name :: RecordColumnProperty -> Value Text
sqlType :: RecordColumnProperty -> Value Text
haddock_workaround_ :: ()
mapping :: Maybe (Value Text)
name :: Value Text
sqlType :: Value Text
..}
    = RecordColumnProperty {name :: Value Text
name = PropertyType "Name" RecordColumnProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
mapping :: Maybe (Value Text)
sqlType :: Value Text
haddock_workaround_ :: ()
mapping :: Maybe (Value Text)
sqlType :: Value Text
..}
instance Property "SqlType" RecordColumnProperty where
  type PropertyType "SqlType" RecordColumnProperty = Value Prelude.Text
  set :: PropertyType "SqlType" RecordColumnProperty
-> RecordColumnProperty -> RecordColumnProperty
set PropertyType "SqlType" RecordColumnProperty
newValue RecordColumnProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RecordColumnProperty -> ()
mapping :: RecordColumnProperty -> Maybe (Value Text)
name :: RecordColumnProperty -> Value Text
sqlType :: RecordColumnProperty -> Value Text
haddock_workaround_ :: ()
mapping :: Maybe (Value Text)
name :: Value Text
sqlType :: Value Text
..}
    = RecordColumnProperty {sqlType :: Value Text
sqlType = PropertyType "SqlType" RecordColumnProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
mapping :: Maybe (Value Text)
name :: Value Text
haddock_workaround_ :: ()
mapping :: Maybe (Value Text)
name :: Value Text
..}