{-# 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.Kafka.Types.BrokerSoftwareInfo where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data BrokerSoftwareInfo = BrokerSoftwareInfo'
{
BrokerSoftwareInfo -> Maybe Text
configurationArn :: Prelude.Maybe Prelude.Text,
BrokerSoftwareInfo -> Maybe Integer
configurationRevision :: Prelude.Maybe Prelude.Integer,
BrokerSoftwareInfo -> Maybe Text
kafkaVersion :: Prelude.Maybe Prelude.Text
}
deriving (BrokerSoftwareInfo -> BrokerSoftwareInfo -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BrokerSoftwareInfo -> BrokerSoftwareInfo -> Bool
$c/= :: BrokerSoftwareInfo -> BrokerSoftwareInfo -> Bool
== :: BrokerSoftwareInfo -> BrokerSoftwareInfo -> Bool
$c== :: BrokerSoftwareInfo -> BrokerSoftwareInfo -> Bool
Prelude.Eq, ReadPrec [BrokerSoftwareInfo]
ReadPrec BrokerSoftwareInfo
Int -> ReadS BrokerSoftwareInfo
ReadS [BrokerSoftwareInfo]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BrokerSoftwareInfo]
$creadListPrec :: ReadPrec [BrokerSoftwareInfo]
readPrec :: ReadPrec BrokerSoftwareInfo
$creadPrec :: ReadPrec BrokerSoftwareInfo
readList :: ReadS [BrokerSoftwareInfo]
$creadList :: ReadS [BrokerSoftwareInfo]
readsPrec :: Int -> ReadS BrokerSoftwareInfo
$creadsPrec :: Int -> ReadS BrokerSoftwareInfo
Prelude.Read, Int -> BrokerSoftwareInfo -> ShowS
[BrokerSoftwareInfo] -> ShowS
BrokerSoftwareInfo -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BrokerSoftwareInfo] -> ShowS
$cshowList :: [BrokerSoftwareInfo] -> ShowS
show :: BrokerSoftwareInfo -> String
$cshow :: BrokerSoftwareInfo -> String
showsPrec :: Int -> BrokerSoftwareInfo -> ShowS
$cshowsPrec :: Int -> BrokerSoftwareInfo -> ShowS
Prelude.Show, forall x. Rep BrokerSoftwareInfo x -> BrokerSoftwareInfo
forall x. BrokerSoftwareInfo -> Rep BrokerSoftwareInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BrokerSoftwareInfo x -> BrokerSoftwareInfo
$cfrom :: forall x. BrokerSoftwareInfo -> Rep BrokerSoftwareInfo x
Prelude.Generic)
newBrokerSoftwareInfo ::
BrokerSoftwareInfo
newBrokerSoftwareInfo :: BrokerSoftwareInfo
newBrokerSoftwareInfo =
BrokerSoftwareInfo'
{ $sel:configurationArn:BrokerSoftwareInfo' :: Maybe Text
configurationArn =
forall a. Maybe a
Prelude.Nothing,
$sel:configurationRevision:BrokerSoftwareInfo' :: Maybe Integer
configurationRevision = forall a. Maybe a
Prelude.Nothing,
$sel:kafkaVersion:BrokerSoftwareInfo' :: Maybe Text
kafkaVersion = forall a. Maybe a
Prelude.Nothing
}
brokerSoftwareInfo_configurationArn :: Lens.Lens' BrokerSoftwareInfo (Prelude.Maybe Prelude.Text)
brokerSoftwareInfo_configurationArn :: Lens' BrokerSoftwareInfo (Maybe Text)
brokerSoftwareInfo_configurationArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BrokerSoftwareInfo' {Maybe Text
configurationArn :: Maybe Text
$sel:configurationArn:BrokerSoftwareInfo' :: BrokerSoftwareInfo -> Maybe Text
configurationArn} -> Maybe Text
configurationArn) (\s :: BrokerSoftwareInfo
s@BrokerSoftwareInfo' {} Maybe Text
a -> BrokerSoftwareInfo
s {$sel:configurationArn:BrokerSoftwareInfo' :: Maybe Text
configurationArn = Maybe Text
a} :: BrokerSoftwareInfo)
brokerSoftwareInfo_configurationRevision :: Lens.Lens' BrokerSoftwareInfo (Prelude.Maybe Prelude.Integer)
brokerSoftwareInfo_configurationRevision :: Lens' BrokerSoftwareInfo (Maybe Integer)
brokerSoftwareInfo_configurationRevision = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BrokerSoftwareInfo' {Maybe Integer
configurationRevision :: Maybe Integer
$sel:configurationRevision:BrokerSoftwareInfo' :: BrokerSoftwareInfo -> Maybe Integer
configurationRevision} -> Maybe Integer
configurationRevision) (\s :: BrokerSoftwareInfo
s@BrokerSoftwareInfo' {} Maybe Integer
a -> BrokerSoftwareInfo
s {$sel:configurationRevision:BrokerSoftwareInfo' :: Maybe Integer
configurationRevision = Maybe Integer
a} :: BrokerSoftwareInfo)
brokerSoftwareInfo_kafkaVersion :: Lens.Lens' BrokerSoftwareInfo (Prelude.Maybe Prelude.Text)
brokerSoftwareInfo_kafkaVersion :: Lens' BrokerSoftwareInfo (Maybe Text)
brokerSoftwareInfo_kafkaVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BrokerSoftwareInfo' {Maybe Text
kafkaVersion :: Maybe Text
$sel:kafkaVersion:BrokerSoftwareInfo' :: BrokerSoftwareInfo -> Maybe Text
kafkaVersion} -> Maybe Text
kafkaVersion) (\s :: BrokerSoftwareInfo
s@BrokerSoftwareInfo' {} Maybe Text
a -> BrokerSoftwareInfo
s {$sel:kafkaVersion:BrokerSoftwareInfo' :: Maybe Text
kafkaVersion = Maybe Text
a} :: BrokerSoftwareInfo)
instance Data.FromJSON BrokerSoftwareInfo where
parseJSON :: Value -> Parser BrokerSoftwareInfo
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"BrokerSoftwareInfo"
( \Object
x ->
Maybe Text -> Maybe Integer -> Maybe Text -> BrokerSoftwareInfo
BrokerSoftwareInfo'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"configurationArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"configurationRevision")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"kafkaVersion")
)
instance Prelude.Hashable BrokerSoftwareInfo where
hashWithSalt :: Int -> BrokerSoftwareInfo -> Int
hashWithSalt Int
_salt BrokerSoftwareInfo' {Maybe Integer
Maybe Text
kafkaVersion :: Maybe Text
configurationRevision :: Maybe Integer
configurationArn :: Maybe Text
$sel:kafkaVersion:BrokerSoftwareInfo' :: BrokerSoftwareInfo -> Maybe Text
$sel:configurationRevision:BrokerSoftwareInfo' :: BrokerSoftwareInfo -> Maybe Integer
$sel:configurationArn:BrokerSoftwareInfo' :: BrokerSoftwareInfo -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
configurationArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
configurationRevision
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
kafkaVersion
instance Prelude.NFData BrokerSoftwareInfo where
rnf :: BrokerSoftwareInfo -> ()
rnf BrokerSoftwareInfo' {Maybe Integer
Maybe Text
kafkaVersion :: Maybe Text
configurationRevision :: Maybe Integer
configurationArn :: Maybe Text
$sel:kafkaVersion:BrokerSoftwareInfo' :: BrokerSoftwareInfo -> Maybe Text
$sel:configurationRevision:BrokerSoftwareInfo' :: BrokerSoftwareInfo -> Maybe Integer
$sel:configurationArn:BrokerSoftwareInfo' :: BrokerSoftwareInfo -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
configurationArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
configurationRevision
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
kafkaVersion