module Stratosphere.KinesisFirehose.DeliveryStream.OutputFormatConfigurationProperty (
        module Exports, OutputFormatConfigurationProperty(..),
        mkOutputFormatConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.KinesisFirehose.DeliveryStream.SerializerProperty as Exports
import Stratosphere.ResourceProperties
data OutputFormatConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-outputformatconfiguration.html>
    OutputFormatConfigurationProperty {OutputFormatConfigurationProperty -> ()
haddock_workaround_ :: (),
                                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-outputformatconfiguration.html#cfn-kinesisfirehose-deliverystream-outputformatconfiguration-serializer>
                                       OutputFormatConfigurationProperty -> Maybe SerializerProperty
serializer :: (Prelude.Maybe SerializerProperty)}
  deriving stock (OutputFormatConfigurationProperty
-> OutputFormatConfigurationProperty -> Bool
(OutputFormatConfigurationProperty
 -> OutputFormatConfigurationProperty -> Bool)
-> (OutputFormatConfigurationProperty
    -> OutputFormatConfigurationProperty -> Bool)
-> Eq OutputFormatConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: OutputFormatConfigurationProperty
-> OutputFormatConfigurationProperty -> Bool
== :: OutputFormatConfigurationProperty
-> OutputFormatConfigurationProperty -> Bool
$c/= :: OutputFormatConfigurationProperty
-> OutputFormatConfigurationProperty -> Bool
/= :: OutputFormatConfigurationProperty
-> OutputFormatConfigurationProperty -> Bool
Prelude.Eq, Int -> OutputFormatConfigurationProperty -> ShowS
[OutputFormatConfigurationProperty] -> ShowS
OutputFormatConfigurationProperty -> String
(Int -> OutputFormatConfigurationProperty -> ShowS)
-> (OutputFormatConfigurationProperty -> String)
-> ([OutputFormatConfigurationProperty] -> ShowS)
-> Show OutputFormatConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> OutputFormatConfigurationProperty -> ShowS
showsPrec :: Int -> OutputFormatConfigurationProperty -> ShowS
$cshow :: OutputFormatConfigurationProperty -> String
show :: OutputFormatConfigurationProperty -> String
$cshowList :: [OutputFormatConfigurationProperty] -> ShowS
showList :: [OutputFormatConfigurationProperty] -> ShowS
Prelude.Show)
mkOutputFormatConfigurationProperty ::
  OutputFormatConfigurationProperty
mkOutputFormatConfigurationProperty :: OutputFormatConfigurationProperty
mkOutputFormatConfigurationProperty
  = OutputFormatConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), serializer :: Maybe SerializerProperty
serializer = Maybe SerializerProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties OutputFormatConfigurationProperty where
  toResourceProperties :: OutputFormatConfigurationProperty -> ResourceProperties
toResourceProperties OutputFormatConfigurationProperty {Maybe SerializerProperty
()
haddock_workaround_ :: OutputFormatConfigurationProperty -> ()
serializer :: OutputFormatConfigurationProperty -> Maybe SerializerProperty
haddock_workaround_ :: ()
serializer :: Maybe SerializerProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::KinesisFirehose::DeliveryStream.OutputFormatConfiguration",
         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 -> SerializerProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Serializer" (SerializerProperty -> (Key, Value))
-> Maybe SerializerProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SerializerProperty
serializer])}
instance JSON.ToJSON OutputFormatConfigurationProperty where
  toJSON :: OutputFormatConfigurationProperty -> Value
toJSON OutputFormatConfigurationProperty {Maybe SerializerProperty
()
haddock_workaround_ :: OutputFormatConfigurationProperty -> ()
serializer :: OutputFormatConfigurationProperty -> Maybe SerializerProperty
haddock_workaround_ :: ()
serializer :: Maybe SerializerProperty
..}
    = [(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 -> SerializerProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Serializer" (SerializerProperty -> (Key, Value))
-> Maybe SerializerProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SerializerProperty
serializer]))
instance Property "Serializer" OutputFormatConfigurationProperty where
  type PropertyType "Serializer" OutputFormatConfigurationProperty = SerializerProperty
  set :: PropertyType "Serializer" OutputFormatConfigurationProperty
-> OutputFormatConfigurationProperty
-> OutputFormatConfigurationProperty
set PropertyType "Serializer" OutputFormatConfigurationProperty
newValue OutputFormatConfigurationProperty {Maybe SerializerProperty
()
haddock_workaround_ :: OutputFormatConfigurationProperty -> ()
serializer :: OutputFormatConfigurationProperty -> Maybe SerializerProperty
haddock_workaround_ :: ()
serializer :: Maybe SerializerProperty
..}
    = OutputFormatConfigurationProperty
        {serializer :: Maybe SerializerProperty
serializer = SerializerProperty -> Maybe SerializerProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Serializer" OutputFormatConfigurationProperty
SerializerProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}