module Stratosphere.QLDB.Stream.KinesisConfigurationProperty (
        KinesisConfigurationProperty(..), mkKinesisConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data KinesisConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qldb-stream-kinesisconfiguration.html>
    KinesisConfigurationProperty {KinesisConfigurationProperty -> ()
haddock_workaround_ :: (),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qldb-stream-kinesisconfiguration.html#cfn-qldb-stream-kinesisconfiguration-aggregationenabled>
                                  KinesisConfigurationProperty -> Maybe (Value Bool)
aggregationEnabled :: (Prelude.Maybe (Value Prelude.Bool)),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qldb-stream-kinesisconfiguration.html#cfn-qldb-stream-kinesisconfiguration-streamarn>
                                  KinesisConfigurationProperty -> Maybe (Value Text)
streamArn :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (KinesisConfigurationProperty
-> KinesisConfigurationProperty -> Bool
(KinesisConfigurationProperty
 -> KinesisConfigurationProperty -> Bool)
-> (KinesisConfigurationProperty
    -> KinesisConfigurationProperty -> Bool)
-> Eq KinesisConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: KinesisConfigurationProperty
-> KinesisConfigurationProperty -> Bool
== :: KinesisConfigurationProperty
-> KinesisConfigurationProperty -> Bool
$c/= :: KinesisConfigurationProperty
-> KinesisConfigurationProperty -> Bool
/= :: KinesisConfigurationProperty
-> KinesisConfigurationProperty -> Bool
Prelude.Eq, Int -> KinesisConfigurationProperty -> ShowS
[KinesisConfigurationProperty] -> ShowS
KinesisConfigurationProperty -> String
(Int -> KinesisConfigurationProperty -> ShowS)
-> (KinesisConfigurationProperty -> String)
-> ([KinesisConfigurationProperty] -> ShowS)
-> Show KinesisConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> KinesisConfigurationProperty -> ShowS
showsPrec :: Int -> KinesisConfigurationProperty -> ShowS
$cshow :: KinesisConfigurationProperty -> String
show :: KinesisConfigurationProperty -> String
$cshowList :: [KinesisConfigurationProperty] -> ShowS
showList :: [KinesisConfigurationProperty] -> ShowS
Prelude.Show)
mkKinesisConfigurationProperty :: KinesisConfigurationProperty
mkKinesisConfigurationProperty :: KinesisConfigurationProperty
mkKinesisConfigurationProperty
  = KinesisConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), aggregationEnabled :: Maybe (Value Bool)
aggregationEnabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
       streamArn :: Maybe (Value Text)
streamArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties KinesisConfigurationProperty where
  toResourceProperties :: KinesisConfigurationProperty -> ResourceProperties
toResourceProperties KinesisConfigurationProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: KinesisConfigurationProperty -> ()
aggregationEnabled :: KinesisConfigurationProperty -> Maybe (Value Bool)
streamArn :: KinesisConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
aggregationEnabled :: Maybe (Value Bool)
streamArn :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::QLDB::Stream.KinesisConfiguration",
         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
"AggregationEnabled" (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)
aggregationEnabled,
                            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
"StreamArn" (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)
streamArn])}
instance JSON.ToJSON KinesisConfigurationProperty where
  toJSON :: KinesisConfigurationProperty -> Value
toJSON KinesisConfigurationProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: KinesisConfigurationProperty -> ()
aggregationEnabled :: KinesisConfigurationProperty -> Maybe (Value Bool)
streamArn :: KinesisConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
aggregationEnabled :: Maybe (Value Bool)
streamArn :: Maybe (Value Text)
..}
    = [(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
"AggregationEnabled" (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)
aggregationEnabled,
               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
"StreamArn" (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)
streamArn]))
instance Property "AggregationEnabled" KinesisConfigurationProperty where
  type PropertyType "AggregationEnabled" KinesisConfigurationProperty = Value Prelude.Bool
  set :: PropertyType "AggregationEnabled" KinesisConfigurationProperty
-> KinesisConfigurationProperty -> KinesisConfigurationProperty
set PropertyType "AggregationEnabled" KinesisConfigurationProperty
newValue KinesisConfigurationProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: KinesisConfigurationProperty -> ()
aggregationEnabled :: KinesisConfigurationProperty -> Maybe (Value Bool)
streamArn :: KinesisConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
aggregationEnabled :: Maybe (Value Bool)
streamArn :: Maybe (Value Text)
..}
    = KinesisConfigurationProperty
        {aggregationEnabled :: Maybe (Value Bool)
aggregationEnabled = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AggregationEnabled" KinesisConfigurationProperty
Value Bool
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
streamArn :: Maybe (Value Text)
haddock_workaround_ :: ()
streamArn :: Maybe (Value Text)
..}
instance Property "StreamArn" KinesisConfigurationProperty where
  type PropertyType "StreamArn" KinesisConfigurationProperty = Value Prelude.Text
  set :: PropertyType "StreamArn" KinesisConfigurationProperty
-> KinesisConfigurationProperty -> KinesisConfigurationProperty
set PropertyType "StreamArn" KinesisConfigurationProperty
newValue KinesisConfigurationProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: KinesisConfigurationProperty -> ()
aggregationEnabled :: KinesisConfigurationProperty -> Maybe (Value Bool)
streamArn :: KinesisConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
aggregationEnabled :: Maybe (Value Bool)
streamArn :: Maybe (Value Text)
..}
    = KinesisConfigurationProperty
        {streamArn :: Maybe (Value Text)
streamArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "StreamArn" KinesisConfigurationProperty
Value Text
newValue, Maybe (Value Bool)
()
haddock_workaround_ :: ()
aggregationEnabled :: Maybe (Value Bool)
haddock_workaround_ :: ()
aggregationEnabled :: Maybe (Value Bool)
..}