module Stratosphere.KinesisFirehose.DeliveryStream.PartitionSpecProperty (
module Exports, PartitionSpecProperty(..), mkPartitionSpecProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.KinesisFirehose.DeliveryStream.PartitionFieldProperty as Exports
import Stratosphere.ResourceProperties
data PartitionSpecProperty
=
PartitionSpecProperty {PartitionSpecProperty -> ()
haddock_workaround_ :: (),
PartitionSpecProperty -> Maybe [PartitionFieldProperty]
identity :: (Prelude.Maybe [PartitionFieldProperty])}
deriving stock (PartitionSpecProperty -> PartitionSpecProperty -> Bool
(PartitionSpecProperty -> PartitionSpecProperty -> Bool)
-> (PartitionSpecProperty -> PartitionSpecProperty -> Bool)
-> Eq PartitionSpecProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PartitionSpecProperty -> PartitionSpecProperty -> Bool
== :: PartitionSpecProperty -> PartitionSpecProperty -> Bool
$c/= :: PartitionSpecProperty -> PartitionSpecProperty -> Bool
/= :: PartitionSpecProperty -> PartitionSpecProperty -> Bool
Prelude.Eq, Int -> PartitionSpecProperty -> ShowS
[PartitionSpecProperty] -> ShowS
PartitionSpecProperty -> String
(Int -> PartitionSpecProperty -> ShowS)
-> (PartitionSpecProperty -> String)
-> ([PartitionSpecProperty] -> ShowS)
-> Show PartitionSpecProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PartitionSpecProperty -> ShowS
showsPrec :: Int -> PartitionSpecProperty -> ShowS
$cshow :: PartitionSpecProperty -> String
show :: PartitionSpecProperty -> String
$cshowList :: [PartitionSpecProperty] -> ShowS
showList :: [PartitionSpecProperty] -> ShowS
Prelude.Show)
mkPartitionSpecProperty :: PartitionSpecProperty
mkPartitionSpecProperty :: PartitionSpecProperty
mkPartitionSpecProperty
= PartitionSpecProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), identity :: Maybe [PartitionFieldProperty]
identity = Maybe [PartitionFieldProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PartitionSpecProperty where
toResourceProperties :: PartitionSpecProperty -> ResourceProperties
toResourceProperties PartitionSpecProperty {Maybe [PartitionFieldProperty]
()
haddock_workaround_ :: PartitionSpecProperty -> ()
identity :: PartitionSpecProperty -> Maybe [PartitionFieldProperty]
haddock_workaround_ :: ()
identity :: Maybe [PartitionFieldProperty]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::KinesisFirehose::DeliveryStream.PartitionSpec",
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 -> [PartitionFieldProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Identity" ([PartitionFieldProperty] -> (Key, Value))
-> Maybe [PartitionFieldProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [PartitionFieldProperty]
identity])}
instance JSON.ToJSON PartitionSpecProperty where
toJSON :: PartitionSpecProperty -> Value
toJSON PartitionSpecProperty {Maybe [PartitionFieldProperty]
()
haddock_workaround_ :: PartitionSpecProperty -> ()
identity :: PartitionSpecProperty -> Maybe [PartitionFieldProperty]
haddock_workaround_ :: ()
identity :: Maybe [PartitionFieldProperty]
..}
= [(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 -> [PartitionFieldProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Identity" ([PartitionFieldProperty] -> (Key, Value))
-> Maybe [PartitionFieldProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [PartitionFieldProperty]
identity]))
instance Property "Identity" PartitionSpecProperty where
type PropertyType "Identity" PartitionSpecProperty = [PartitionFieldProperty]
set :: PropertyType "Identity" PartitionSpecProperty
-> PartitionSpecProperty -> PartitionSpecProperty
set PropertyType "Identity" PartitionSpecProperty
newValue PartitionSpecProperty {Maybe [PartitionFieldProperty]
()
haddock_workaround_ :: PartitionSpecProperty -> ()
identity :: PartitionSpecProperty -> Maybe [PartitionFieldProperty]
haddock_workaround_ :: ()
identity :: Maybe [PartitionFieldProperty]
..}
= PartitionSpecProperty {identity :: Maybe [PartitionFieldProperty]
identity = [PartitionFieldProperty] -> Maybe [PartitionFieldProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [PartitionFieldProperty]
PropertyType "Identity" PartitionSpecProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}