{-# 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.ConfigurationInfo 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 ConfigurationInfo = ConfigurationInfo'
{
ConfigurationInfo -> Integer
revision :: Prelude.Integer,
ConfigurationInfo -> Text
arn :: Prelude.Text
}
deriving (ConfigurationInfo -> ConfigurationInfo -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConfigurationInfo -> ConfigurationInfo -> Bool
$c/= :: ConfigurationInfo -> ConfigurationInfo -> Bool
== :: ConfigurationInfo -> ConfigurationInfo -> Bool
$c== :: ConfigurationInfo -> ConfigurationInfo -> Bool
Prelude.Eq, ReadPrec [ConfigurationInfo]
ReadPrec ConfigurationInfo
Int -> ReadS ConfigurationInfo
ReadS [ConfigurationInfo]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConfigurationInfo]
$creadListPrec :: ReadPrec [ConfigurationInfo]
readPrec :: ReadPrec ConfigurationInfo
$creadPrec :: ReadPrec ConfigurationInfo
readList :: ReadS [ConfigurationInfo]
$creadList :: ReadS [ConfigurationInfo]
readsPrec :: Int -> ReadS ConfigurationInfo
$creadsPrec :: Int -> ReadS ConfigurationInfo
Prelude.Read, Int -> ConfigurationInfo -> ShowS
[ConfigurationInfo] -> ShowS
ConfigurationInfo -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConfigurationInfo] -> ShowS
$cshowList :: [ConfigurationInfo] -> ShowS
show :: ConfigurationInfo -> String
$cshow :: ConfigurationInfo -> String
showsPrec :: Int -> ConfigurationInfo -> ShowS
$cshowsPrec :: Int -> ConfigurationInfo -> ShowS
Prelude.Show, forall x. Rep ConfigurationInfo x -> ConfigurationInfo
forall x. ConfigurationInfo -> Rep ConfigurationInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ConfigurationInfo x -> ConfigurationInfo
$cfrom :: forall x. ConfigurationInfo -> Rep ConfigurationInfo x
Prelude.Generic)
newConfigurationInfo ::
Prelude.Integer ->
Prelude.Text ->
ConfigurationInfo
newConfigurationInfo :: Integer -> Text -> ConfigurationInfo
newConfigurationInfo Integer
pRevision_ Text
pArn_ =
ConfigurationInfo'
{ $sel:revision:ConfigurationInfo' :: Integer
revision = Integer
pRevision_,
$sel:arn:ConfigurationInfo' :: Text
arn = Text
pArn_
}
configurationInfo_revision :: Lens.Lens' ConfigurationInfo Prelude.Integer
configurationInfo_revision :: Lens' ConfigurationInfo Integer
configurationInfo_revision = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationInfo' {Integer
revision :: Integer
$sel:revision:ConfigurationInfo' :: ConfigurationInfo -> Integer
revision} -> Integer
revision) (\s :: ConfigurationInfo
s@ConfigurationInfo' {} Integer
a -> ConfigurationInfo
s {$sel:revision:ConfigurationInfo' :: Integer
revision = Integer
a} :: ConfigurationInfo)
configurationInfo_arn :: Lens.Lens' ConfigurationInfo Prelude.Text
configurationInfo_arn :: Lens' ConfigurationInfo Text
configurationInfo_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationInfo' {Text
arn :: Text
$sel:arn:ConfigurationInfo' :: ConfigurationInfo -> Text
arn} -> Text
arn) (\s :: ConfigurationInfo
s@ConfigurationInfo' {} Text
a -> ConfigurationInfo
s {$sel:arn:ConfigurationInfo' :: Text
arn = Text
a} :: ConfigurationInfo)
instance Data.FromJSON ConfigurationInfo where
parseJSON :: Value -> Parser ConfigurationInfo
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ConfigurationInfo"
( \Object
x ->
Integer -> Text -> ConfigurationInfo
ConfigurationInfo'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"revision")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"arn")
)
instance Prelude.Hashable ConfigurationInfo where
hashWithSalt :: Int -> ConfigurationInfo -> Int
hashWithSalt Int
_salt ConfigurationInfo' {Integer
Text
arn :: Text
revision :: Integer
$sel:arn:ConfigurationInfo' :: ConfigurationInfo -> Text
$sel:revision:ConfigurationInfo' :: ConfigurationInfo -> Integer
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Integer
revision
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn
instance Prelude.NFData ConfigurationInfo where
rnf :: ConfigurationInfo -> ()
rnf ConfigurationInfo' {Integer
Text
arn :: Text
revision :: Integer
$sel:arn:ConfigurationInfo' :: ConfigurationInfo -> Text
$sel:revision:ConfigurationInfo' :: ConfigurationInfo -> Integer
..} =
forall a. NFData a => a -> ()
Prelude.rnf Integer
revision seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
arn
instance Data.ToJSON ConfigurationInfo where
toJSON :: ConfigurationInfo -> Value
toJSON ConfigurationInfo' {Integer
Text
arn :: Text
revision :: Integer
$sel:arn:ConfigurationInfo' :: ConfigurationInfo -> Text
$sel:revision:ConfigurationInfo' :: ConfigurationInfo -> Integer
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just (Key
"revision" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Integer
revision),
forall a. a -> Maybe a
Prelude.Just (Key
"arn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
arn)
]
)