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