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