module Stratosphere.KafkaConnect.Connector.ProvisionedCapacityProperty (
        ProvisionedCapacityProperty(..), mkProvisionedCapacityProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ProvisionedCapacityProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kafkaconnect-connector-provisionedcapacity.html>
    ProvisionedCapacityProperty {ProvisionedCapacityProperty -> ()
haddock_workaround_ :: (),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kafkaconnect-connector-provisionedcapacity.html#cfn-kafkaconnect-connector-provisionedcapacity-mcucount>
                                 ProvisionedCapacityProperty -> Maybe (Value Integer)
mcuCount :: (Prelude.Maybe (Value Prelude.Integer)),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kafkaconnect-connector-provisionedcapacity.html#cfn-kafkaconnect-connector-provisionedcapacity-workercount>
                                 ProvisionedCapacityProperty -> Value Integer
workerCount :: (Value Prelude.Integer)}
  deriving stock (ProvisionedCapacityProperty -> ProvisionedCapacityProperty -> Bool
(ProvisionedCapacityProperty
 -> ProvisionedCapacityProperty -> Bool)
-> (ProvisionedCapacityProperty
    -> ProvisionedCapacityProperty -> Bool)
-> Eq ProvisionedCapacityProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ProvisionedCapacityProperty -> ProvisionedCapacityProperty -> Bool
== :: ProvisionedCapacityProperty -> ProvisionedCapacityProperty -> Bool
$c/= :: ProvisionedCapacityProperty -> ProvisionedCapacityProperty -> Bool
/= :: ProvisionedCapacityProperty -> ProvisionedCapacityProperty -> Bool
Prelude.Eq, Int -> ProvisionedCapacityProperty -> ShowS
[ProvisionedCapacityProperty] -> ShowS
ProvisionedCapacityProperty -> String
(Int -> ProvisionedCapacityProperty -> ShowS)
-> (ProvisionedCapacityProperty -> String)
-> ([ProvisionedCapacityProperty] -> ShowS)
-> Show ProvisionedCapacityProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ProvisionedCapacityProperty -> ShowS
showsPrec :: Int -> ProvisionedCapacityProperty -> ShowS
$cshow :: ProvisionedCapacityProperty -> String
show :: ProvisionedCapacityProperty -> String
$cshowList :: [ProvisionedCapacityProperty] -> ShowS
showList :: [ProvisionedCapacityProperty] -> ShowS
Prelude.Show)
mkProvisionedCapacityProperty ::
  Value Prelude.Integer -> ProvisionedCapacityProperty
mkProvisionedCapacityProperty :: Value Integer -> ProvisionedCapacityProperty
mkProvisionedCapacityProperty Value Integer
workerCount
  = ProvisionedCapacityProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), workerCount :: Value Integer
workerCount = Value Integer
workerCount,
       mcuCount :: Maybe (Value Integer)
mcuCount = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ProvisionedCapacityProperty where
  toResourceProperties :: ProvisionedCapacityProperty -> ResourceProperties
toResourceProperties ProvisionedCapacityProperty {Maybe (Value Integer)
()
Value Integer
haddock_workaround_ :: ProvisionedCapacityProperty -> ()
mcuCount :: ProvisionedCapacityProperty -> Maybe (Value Integer)
workerCount :: ProvisionedCapacityProperty -> Value Integer
haddock_workaround_ :: ()
mcuCount :: Maybe (Value Integer)
workerCount :: Value Integer
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::KafkaConnect::Connector.ProvisionedCapacity",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"WorkerCount" 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..= Value Integer
workerCount]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [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
"McuCount" (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)
mcuCount]))}
instance JSON.ToJSON ProvisionedCapacityProperty where
  toJSON :: ProvisionedCapacityProperty -> Value
toJSON ProvisionedCapacityProperty {Maybe (Value Integer)
()
Value Integer
haddock_workaround_ :: ProvisionedCapacityProperty -> ()
mcuCount :: ProvisionedCapacityProperty -> Maybe (Value Integer)
workerCount :: ProvisionedCapacityProperty -> Value Integer
haddock_workaround_ :: ()
mcuCount :: Maybe (Value Integer)
workerCount :: Value Integer
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"WorkerCount" 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..= Value Integer
workerCount]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [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
"McuCount" (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)
mcuCount])))
instance Property "McuCount" ProvisionedCapacityProperty where
  type PropertyType "McuCount" ProvisionedCapacityProperty = Value Prelude.Integer
  set :: PropertyType "McuCount" ProvisionedCapacityProperty
-> ProvisionedCapacityProperty -> ProvisionedCapacityProperty
set PropertyType "McuCount" ProvisionedCapacityProperty
newValue ProvisionedCapacityProperty {Maybe (Value Integer)
()
Value Integer
haddock_workaround_ :: ProvisionedCapacityProperty -> ()
mcuCount :: ProvisionedCapacityProperty -> Maybe (Value Integer)
workerCount :: ProvisionedCapacityProperty -> Value Integer
haddock_workaround_ :: ()
mcuCount :: Maybe (Value Integer)
workerCount :: Value Integer
..}
    = ProvisionedCapacityProperty
        {mcuCount :: Maybe (Value Integer)
mcuCount = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "McuCount" ProvisionedCapacityProperty
Value Integer
newValue, ()
Value Integer
haddock_workaround_ :: ()
workerCount :: Value Integer
haddock_workaround_ :: ()
workerCount :: Value Integer
..}
instance Property "WorkerCount" ProvisionedCapacityProperty where
  type PropertyType "WorkerCount" ProvisionedCapacityProperty = Value Prelude.Integer
  set :: PropertyType "WorkerCount" ProvisionedCapacityProperty
-> ProvisionedCapacityProperty -> ProvisionedCapacityProperty
set PropertyType "WorkerCount" ProvisionedCapacityProperty
newValue ProvisionedCapacityProperty {Maybe (Value Integer)
()
Value Integer
haddock_workaround_ :: ProvisionedCapacityProperty -> ()
mcuCount :: ProvisionedCapacityProperty -> Maybe (Value Integer)
workerCount :: ProvisionedCapacityProperty -> Value Integer
haddock_workaround_ :: ()
mcuCount :: Maybe (Value Integer)
workerCount :: Value Integer
..}
    = ProvisionedCapacityProperty {workerCount :: Value Integer
workerCount = PropertyType "WorkerCount" ProvisionedCapacityProperty
Value Integer
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
mcuCount :: Maybe (Value Integer)
haddock_workaround_ :: ()
mcuCount :: Maybe (Value Integer)
..}