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