{-# 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 qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.KafkaConnect.Types.Vpc
import qualified Amazonka.Prelude as Prelude
data ApacheKafkaCluster = ApacheKafkaCluster'
{
ApacheKafkaCluster -> Text
bootstrapServers :: Prelude.Text,
ApacheKafkaCluster -> Vpc
vpc :: Vpc
}
deriving (ApacheKafkaCluster -> ApacheKafkaCluster -> Bool
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]
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
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. 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'
{ $sel:bootstrapServers:ApacheKafkaCluster' :: Text
bootstrapServers =
Text
pBootstrapServers_,
$sel:vpc:ApacheKafkaCluster' :: Vpc
vpc = Vpc
pVpc_
}
apacheKafkaCluster_bootstrapServers :: Lens.Lens' ApacheKafkaCluster Prelude.Text
apacheKafkaCluster_bootstrapServers :: Lens' ApacheKafkaCluster Text
apacheKafkaCluster_bootstrapServers = 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 :: Lens' ApacheKafkaCluster Vpc
apacheKafkaCluster_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 where
hashWithSalt :: Int -> ApacheKafkaCluster -> Int
hashWithSalt Int
_salt ApacheKafkaCluster' {Text
Vpc
vpc :: Vpc
bootstrapServers :: Text
$sel:vpc:ApacheKafkaCluster' :: ApacheKafkaCluster -> Vpc
$sel:bootstrapServers:ApacheKafkaCluster' :: ApacheKafkaCluster -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
bootstrapServers
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Vpc
vpc
instance Prelude.NFData ApacheKafkaCluster where
rnf :: ApacheKafkaCluster -> ()
rnf ApacheKafkaCluster' {Text
Vpc
vpc :: Vpc
bootstrapServers :: Text
$sel:vpc:ApacheKafkaCluster' :: ApacheKafkaCluster -> Vpc
$sel:bootstrapServers:ApacheKafkaCluster' :: ApacheKafkaCluster -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
bootstrapServers
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Vpc
vpc
instance Data.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
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
(Key
"bootstrapServers" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
bootstrapServers),
forall a. a -> Maybe a
Prelude.Just (Key
"vpc" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Vpc
vpc)
]
)