{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.KafkaConnect.Types.ProvisionedCapacityDescription where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ProvisionedCapacityDescription = ProvisionedCapacityDescription'
{
ProvisionedCapacityDescription -> Maybe Int
workerCount :: Prelude.Maybe Prelude.Int,
ProvisionedCapacityDescription -> Maybe Int
mcuCount :: Prelude.Maybe Prelude.Int
}
deriving (ProvisionedCapacityDescription
-> ProvisionedCapacityDescription -> Bool
(ProvisionedCapacityDescription
-> ProvisionedCapacityDescription -> Bool)
-> (ProvisionedCapacityDescription
-> ProvisionedCapacityDescription -> Bool)
-> Eq ProvisionedCapacityDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProvisionedCapacityDescription
-> ProvisionedCapacityDescription -> Bool
$c/= :: ProvisionedCapacityDescription
-> ProvisionedCapacityDescription -> Bool
== :: ProvisionedCapacityDescription
-> ProvisionedCapacityDescription -> Bool
$c== :: ProvisionedCapacityDescription
-> ProvisionedCapacityDescription -> Bool
Prelude.Eq, ReadPrec [ProvisionedCapacityDescription]
ReadPrec ProvisionedCapacityDescription
Int -> ReadS ProvisionedCapacityDescription
ReadS [ProvisionedCapacityDescription]
(Int -> ReadS ProvisionedCapacityDescription)
-> ReadS [ProvisionedCapacityDescription]
-> ReadPrec ProvisionedCapacityDescription
-> ReadPrec [ProvisionedCapacityDescription]
-> Read ProvisionedCapacityDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProvisionedCapacityDescription]
$creadListPrec :: ReadPrec [ProvisionedCapacityDescription]
readPrec :: ReadPrec ProvisionedCapacityDescription
$creadPrec :: ReadPrec ProvisionedCapacityDescription
readList :: ReadS [ProvisionedCapacityDescription]
$creadList :: ReadS [ProvisionedCapacityDescription]
readsPrec :: Int -> ReadS ProvisionedCapacityDescription
$creadsPrec :: Int -> ReadS ProvisionedCapacityDescription
Prelude.Read, Int -> ProvisionedCapacityDescription -> ShowS
[ProvisionedCapacityDescription] -> ShowS
ProvisionedCapacityDescription -> String
(Int -> ProvisionedCapacityDescription -> ShowS)
-> (ProvisionedCapacityDescription -> String)
-> ([ProvisionedCapacityDescription] -> ShowS)
-> Show ProvisionedCapacityDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProvisionedCapacityDescription] -> ShowS
$cshowList :: [ProvisionedCapacityDescription] -> ShowS
show :: ProvisionedCapacityDescription -> String
$cshow :: ProvisionedCapacityDescription -> String
showsPrec :: Int -> ProvisionedCapacityDescription -> ShowS
$cshowsPrec :: Int -> ProvisionedCapacityDescription -> ShowS
Prelude.Show, (forall x.
ProvisionedCapacityDescription
-> Rep ProvisionedCapacityDescription x)
-> (forall x.
Rep ProvisionedCapacityDescription x
-> ProvisionedCapacityDescription)
-> Generic ProvisionedCapacityDescription
forall x.
Rep ProvisionedCapacityDescription x
-> ProvisionedCapacityDescription
forall x.
ProvisionedCapacityDescription
-> Rep ProvisionedCapacityDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ProvisionedCapacityDescription x
-> ProvisionedCapacityDescription
$cfrom :: forall x.
ProvisionedCapacityDescription
-> Rep ProvisionedCapacityDescription x
Prelude.Generic)
newProvisionedCapacityDescription ::
ProvisionedCapacityDescription
newProvisionedCapacityDescription :: ProvisionedCapacityDescription
newProvisionedCapacityDescription =
ProvisionedCapacityDescription' :: Maybe Int -> Maybe Int -> ProvisionedCapacityDescription
ProvisionedCapacityDescription'
{ $sel:workerCount:ProvisionedCapacityDescription' :: Maybe Int
workerCount =
Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:mcuCount:ProvisionedCapacityDescription' :: Maybe Int
mcuCount = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
provisionedCapacityDescription_workerCount :: Lens.Lens' ProvisionedCapacityDescription (Prelude.Maybe Prelude.Int)
provisionedCapacityDescription_workerCount :: (Maybe Int -> f (Maybe Int))
-> ProvisionedCapacityDescription
-> f ProvisionedCapacityDescription
provisionedCapacityDescription_workerCount = (ProvisionedCapacityDescription -> Maybe Int)
-> (ProvisionedCapacityDescription
-> Maybe Int -> ProvisionedCapacityDescription)
-> Lens
ProvisionedCapacityDescription
ProvisionedCapacityDescription
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisionedCapacityDescription' {Maybe Int
workerCount :: Maybe Int
$sel:workerCount:ProvisionedCapacityDescription' :: ProvisionedCapacityDescription -> Maybe Int
workerCount} -> Maybe Int
workerCount) (\s :: ProvisionedCapacityDescription
s@ProvisionedCapacityDescription' {} Maybe Int
a -> ProvisionedCapacityDescription
s {$sel:workerCount:ProvisionedCapacityDescription' :: Maybe Int
workerCount = Maybe Int
a} :: ProvisionedCapacityDescription)
provisionedCapacityDescription_mcuCount :: Lens.Lens' ProvisionedCapacityDescription (Prelude.Maybe Prelude.Int)
provisionedCapacityDescription_mcuCount :: (Maybe Int -> f (Maybe Int))
-> ProvisionedCapacityDescription
-> f ProvisionedCapacityDescription
provisionedCapacityDescription_mcuCount = (ProvisionedCapacityDescription -> Maybe Int)
-> (ProvisionedCapacityDescription
-> Maybe Int -> ProvisionedCapacityDescription)
-> Lens
ProvisionedCapacityDescription
ProvisionedCapacityDescription
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisionedCapacityDescription' {Maybe Int
mcuCount :: Maybe Int
$sel:mcuCount:ProvisionedCapacityDescription' :: ProvisionedCapacityDescription -> Maybe Int
mcuCount} -> Maybe Int
mcuCount) (\s :: ProvisionedCapacityDescription
s@ProvisionedCapacityDescription' {} Maybe Int
a -> ProvisionedCapacityDescription
s {$sel:mcuCount:ProvisionedCapacityDescription' :: Maybe Int
mcuCount = Maybe Int
a} :: ProvisionedCapacityDescription)
instance Core.FromJSON ProvisionedCapacityDescription where
parseJSON :: Value -> Parser ProvisionedCapacityDescription
parseJSON =
String
-> (Object -> Parser ProvisionedCapacityDescription)
-> Value
-> Parser ProvisionedCapacityDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ProvisionedCapacityDescription"
( \Object
x ->
Maybe Int -> Maybe Int -> ProvisionedCapacityDescription
ProvisionedCapacityDescription'
(Maybe Int -> Maybe Int -> ProvisionedCapacityDescription)
-> Parser (Maybe Int)
-> Parser (Maybe Int -> ProvisionedCapacityDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"workerCount")
Parser (Maybe Int -> ProvisionedCapacityDescription)
-> Parser (Maybe Int) -> Parser ProvisionedCapacityDescription
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"mcuCount")
)
instance
Prelude.Hashable
ProvisionedCapacityDescription
instance
Prelude.NFData
ProvisionedCapacityDescription