module Stratosphere.MSK.Cluster.ProvisionedThroughputProperty (
        ProvisionedThroughputProperty(..), mkProvisionedThroughputProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ProvisionedThroughputProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-msk-cluster-provisionedthroughput.html>
    ProvisionedThroughputProperty {ProvisionedThroughputProperty -> ()
haddock_workaround_ :: (),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-msk-cluster-provisionedthroughput.html#cfn-msk-cluster-provisionedthroughput-enabled>
                                   ProvisionedThroughputProperty -> Maybe (Value Bool)
enabled :: (Prelude.Maybe (Value Prelude.Bool)),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-msk-cluster-provisionedthroughput.html#cfn-msk-cluster-provisionedthroughput-volumethroughput>
                                   ProvisionedThroughputProperty -> Maybe (Value Integer)
volumeThroughput :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (ProvisionedThroughputProperty
-> ProvisionedThroughputProperty -> Bool
(ProvisionedThroughputProperty
 -> ProvisionedThroughputProperty -> Bool)
-> (ProvisionedThroughputProperty
    -> ProvisionedThroughputProperty -> Bool)
-> Eq ProvisionedThroughputProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ProvisionedThroughputProperty
-> ProvisionedThroughputProperty -> Bool
== :: ProvisionedThroughputProperty
-> ProvisionedThroughputProperty -> Bool
$c/= :: ProvisionedThroughputProperty
-> ProvisionedThroughputProperty -> Bool
/= :: ProvisionedThroughputProperty
-> ProvisionedThroughputProperty -> Bool
Prelude.Eq, Int -> ProvisionedThroughputProperty -> ShowS
[ProvisionedThroughputProperty] -> ShowS
ProvisionedThroughputProperty -> String
(Int -> ProvisionedThroughputProperty -> ShowS)
-> (ProvisionedThroughputProperty -> String)
-> ([ProvisionedThroughputProperty] -> ShowS)
-> Show ProvisionedThroughputProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ProvisionedThroughputProperty -> ShowS
showsPrec :: Int -> ProvisionedThroughputProperty -> ShowS
$cshow :: ProvisionedThroughputProperty -> String
show :: ProvisionedThroughputProperty -> String
$cshowList :: [ProvisionedThroughputProperty] -> ShowS
showList :: [ProvisionedThroughputProperty] -> ShowS
Prelude.Show)
mkProvisionedThroughputProperty :: ProvisionedThroughputProperty
mkProvisionedThroughputProperty :: ProvisionedThroughputProperty
mkProvisionedThroughputProperty
  = ProvisionedThroughputProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), enabled :: Maybe (Value Bool)
enabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
       volumeThroughput :: Maybe (Value Integer)
volumeThroughput = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ProvisionedThroughputProperty where
  toResourceProperties :: ProvisionedThroughputProperty -> ResourceProperties
toResourceProperties ProvisionedThroughputProperty {Maybe (Value Bool)
Maybe (Value Integer)
()
haddock_workaround_ :: ProvisionedThroughputProperty -> ()
enabled :: ProvisionedThroughputProperty -> Maybe (Value Bool)
volumeThroughput :: ProvisionedThroughputProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
volumeThroughput :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::MSK::Cluster.ProvisionedThroughput",
         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 -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"VolumeThroughput" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
volumeThroughput])}
instance JSON.ToJSON ProvisionedThroughputProperty where
  toJSON :: ProvisionedThroughputProperty -> Value
toJSON ProvisionedThroughputProperty {Maybe (Value Bool)
Maybe (Value Integer)
()
haddock_workaround_ :: ProvisionedThroughputProperty -> ()
enabled :: ProvisionedThroughputProperty -> Maybe (Value Bool)
volumeThroughput :: ProvisionedThroughputProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
volumeThroughput :: Maybe (Value Integer)
..}
    = [(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 -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"VolumeThroughput" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
volumeThroughput]))
instance Property "Enabled" ProvisionedThroughputProperty where
  type PropertyType "Enabled" ProvisionedThroughputProperty = Value Prelude.Bool
  set :: PropertyType "Enabled" ProvisionedThroughputProperty
-> ProvisionedThroughputProperty -> ProvisionedThroughputProperty
set PropertyType "Enabled" ProvisionedThroughputProperty
newValue ProvisionedThroughputProperty {Maybe (Value Bool)
Maybe (Value Integer)
()
haddock_workaround_ :: ProvisionedThroughputProperty -> ()
enabled :: ProvisionedThroughputProperty -> Maybe (Value Bool)
volumeThroughput :: ProvisionedThroughputProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
volumeThroughput :: Maybe (Value Integer)
..}
    = ProvisionedThroughputProperty
        {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" ProvisionedThroughputProperty
Value Bool
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
volumeThroughput :: Maybe (Value Integer)
haddock_workaround_ :: ()
volumeThroughput :: Maybe (Value Integer)
..}
instance Property "VolumeThroughput" ProvisionedThroughputProperty where
  type PropertyType "VolumeThroughput" ProvisionedThroughputProperty = Value Prelude.Integer
  set :: PropertyType "VolumeThroughput" ProvisionedThroughputProperty
-> ProvisionedThroughputProperty -> ProvisionedThroughputProperty
set PropertyType "VolumeThroughput" ProvisionedThroughputProperty
newValue ProvisionedThroughputProperty {Maybe (Value Bool)
Maybe (Value Integer)
()
haddock_workaround_ :: ProvisionedThroughputProperty -> ()
enabled :: ProvisionedThroughputProperty -> Maybe (Value Bool)
volumeThroughput :: ProvisionedThroughputProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
volumeThroughput :: Maybe (Value Integer)
..}
    = ProvisionedThroughputProperty
        {volumeThroughput :: Maybe (Value Integer)
volumeThroughput = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "VolumeThroughput" ProvisionedThroughputProperty
Value Integer
newValue, Maybe (Value Bool)
()
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
..}