{-# 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.KafkaCluster where
import qualified Amazonka.Core as Core
import Amazonka.KafkaConnect.Types.ApacheKafkaCluster
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data KafkaCluster = KafkaCluster'
{
KafkaCluster -> ApacheKafkaCluster
apacheKafkaCluster :: ApacheKafkaCluster
}
deriving (KafkaCluster -> KafkaCluster -> Bool
(KafkaCluster -> KafkaCluster -> Bool)
-> (KafkaCluster -> KafkaCluster -> Bool) -> Eq KafkaCluster
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: KafkaCluster -> KafkaCluster -> Bool
$c/= :: KafkaCluster -> KafkaCluster -> Bool
== :: KafkaCluster -> KafkaCluster -> Bool
$c== :: KafkaCluster -> KafkaCluster -> Bool
Prelude.Eq, ReadPrec [KafkaCluster]
ReadPrec KafkaCluster
Int -> ReadS KafkaCluster
ReadS [KafkaCluster]
(Int -> ReadS KafkaCluster)
-> ReadS [KafkaCluster]
-> ReadPrec KafkaCluster
-> ReadPrec [KafkaCluster]
-> Read KafkaCluster
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [KafkaCluster]
$creadListPrec :: ReadPrec [KafkaCluster]
readPrec :: ReadPrec KafkaCluster
$creadPrec :: ReadPrec KafkaCluster
readList :: ReadS [KafkaCluster]
$creadList :: ReadS [KafkaCluster]
readsPrec :: Int -> ReadS KafkaCluster
$creadsPrec :: Int -> ReadS KafkaCluster
Prelude.Read, Int -> KafkaCluster -> ShowS
[KafkaCluster] -> ShowS
KafkaCluster -> String
(Int -> KafkaCluster -> ShowS)
-> (KafkaCluster -> String)
-> ([KafkaCluster] -> ShowS)
-> Show KafkaCluster
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [KafkaCluster] -> ShowS
$cshowList :: [KafkaCluster] -> ShowS
show :: KafkaCluster -> String
$cshow :: KafkaCluster -> String
showsPrec :: Int -> KafkaCluster -> ShowS
$cshowsPrec :: Int -> KafkaCluster -> ShowS
Prelude.Show, (forall x. KafkaCluster -> Rep KafkaCluster x)
-> (forall x. Rep KafkaCluster x -> KafkaCluster)
-> Generic KafkaCluster
forall x. Rep KafkaCluster x -> KafkaCluster
forall x. KafkaCluster -> Rep KafkaCluster x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep KafkaCluster x -> KafkaCluster
$cfrom :: forall x. KafkaCluster -> Rep KafkaCluster x
Prelude.Generic)
newKafkaCluster ::
ApacheKafkaCluster ->
KafkaCluster
newKafkaCluster :: ApacheKafkaCluster -> KafkaCluster
newKafkaCluster ApacheKafkaCluster
pApacheKafkaCluster_ =
KafkaCluster' :: ApacheKafkaCluster -> KafkaCluster
KafkaCluster'
{ $sel:apacheKafkaCluster:KafkaCluster' :: ApacheKafkaCluster
apacheKafkaCluster =
ApacheKafkaCluster
pApacheKafkaCluster_
}
kafkaCluster_apacheKafkaCluster :: Lens.Lens' KafkaCluster ApacheKafkaCluster
kafkaCluster_apacheKafkaCluster :: (ApacheKafkaCluster -> f ApacheKafkaCluster)
-> KafkaCluster -> f KafkaCluster
kafkaCluster_apacheKafkaCluster = (KafkaCluster -> ApacheKafkaCluster)
-> (KafkaCluster -> ApacheKafkaCluster -> KafkaCluster)
-> Lens
KafkaCluster KafkaCluster ApacheKafkaCluster ApacheKafkaCluster
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KafkaCluster' {ApacheKafkaCluster
apacheKafkaCluster :: ApacheKafkaCluster
$sel:apacheKafkaCluster:KafkaCluster' :: KafkaCluster -> ApacheKafkaCluster
apacheKafkaCluster} -> ApacheKafkaCluster
apacheKafkaCluster) (\s :: KafkaCluster
s@KafkaCluster' {} ApacheKafkaCluster
a -> KafkaCluster
s {$sel:apacheKafkaCluster:KafkaCluster' :: ApacheKafkaCluster
apacheKafkaCluster = ApacheKafkaCluster
a} :: KafkaCluster)
instance Prelude.Hashable KafkaCluster
instance Prelude.NFData KafkaCluster
instance Core.ToJSON KafkaCluster where
toJSON :: KafkaCluster -> Value
toJSON KafkaCluster' {ApacheKafkaCluster
apacheKafkaCluster :: ApacheKafkaCluster
$sel:apacheKafkaCluster:KafkaCluster' :: KafkaCluster -> ApacheKafkaCluster
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"apacheKafkaCluster" Text -> ApacheKafkaCluster -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ApacheKafkaCluster
apacheKafkaCluster)
]
)