{-# 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.CustomPluginDescription 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 CustomPluginDescription = CustomPluginDescription'
{
CustomPluginDescription -> Maybe Text
customPluginArn :: Prelude.Maybe Prelude.Text,
CustomPluginDescription -> Maybe Integer
revision :: Prelude.Maybe Prelude.Integer
}
deriving (CustomPluginDescription -> CustomPluginDescription -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CustomPluginDescription -> CustomPluginDescription -> Bool
$c/= :: CustomPluginDescription -> CustomPluginDescription -> Bool
== :: CustomPluginDescription -> CustomPluginDescription -> Bool
$c== :: CustomPluginDescription -> CustomPluginDescription -> Bool
Prelude.Eq, ReadPrec [CustomPluginDescription]
ReadPrec CustomPluginDescription
Int -> ReadS CustomPluginDescription
ReadS [CustomPluginDescription]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CustomPluginDescription]
$creadListPrec :: ReadPrec [CustomPluginDescription]
readPrec :: ReadPrec CustomPluginDescription
$creadPrec :: ReadPrec CustomPluginDescription
readList :: ReadS [CustomPluginDescription]
$creadList :: ReadS [CustomPluginDescription]
readsPrec :: Int -> ReadS CustomPluginDescription
$creadsPrec :: Int -> ReadS CustomPluginDescription
Prelude.Read, Int -> CustomPluginDescription -> ShowS
[CustomPluginDescription] -> ShowS
CustomPluginDescription -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CustomPluginDescription] -> ShowS
$cshowList :: [CustomPluginDescription] -> ShowS
show :: CustomPluginDescription -> String
$cshow :: CustomPluginDescription -> String
showsPrec :: Int -> CustomPluginDescription -> ShowS
$cshowsPrec :: Int -> CustomPluginDescription -> ShowS
Prelude.Show, forall x. Rep CustomPluginDescription x -> CustomPluginDescription
forall x. CustomPluginDescription -> Rep CustomPluginDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CustomPluginDescription x -> CustomPluginDescription
$cfrom :: forall x. CustomPluginDescription -> Rep CustomPluginDescription x
Prelude.Generic)
newCustomPluginDescription ::
CustomPluginDescription
newCustomPluginDescription :: CustomPluginDescription
newCustomPluginDescription =
CustomPluginDescription'
{ $sel:customPluginArn:CustomPluginDescription' :: Maybe Text
customPluginArn =
forall a. Maybe a
Prelude.Nothing,
$sel:revision:CustomPluginDescription' :: Maybe Integer
revision = forall a. Maybe a
Prelude.Nothing
}
customPluginDescription_customPluginArn :: Lens.Lens' CustomPluginDescription (Prelude.Maybe Prelude.Text)
customPluginDescription_customPluginArn :: Lens' CustomPluginDescription (Maybe Text)
customPluginDescription_customPluginArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomPluginDescription' {Maybe Text
customPluginArn :: Maybe Text
$sel:customPluginArn:CustomPluginDescription' :: CustomPluginDescription -> Maybe Text
customPluginArn} -> Maybe Text
customPluginArn) (\s :: CustomPluginDescription
s@CustomPluginDescription' {} Maybe Text
a -> CustomPluginDescription
s {$sel:customPluginArn:CustomPluginDescription' :: Maybe Text
customPluginArn = Maybe Text
a} :: CustomPluginDescription)
customPluginDescription_revision :: Lens.Lens' CustomPluginDescription (Prelude.Maybe Prelude.Integer)
customPluginDescription_revision :: Lens' CustomPluginDescription (Maybe Integer)
customPluginDescription_revision = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomPluginDescription' {Maybe Integer
revision :: Maybe Integer
$sel:revision:CustomPluginDescription' :: CustomPluginDescription -> Maybe Integer
revision} -> Maybe Integer
revision) (\s :: CustomPluginDescription
s@CustomPluginDescription' {} Maybe Integer
a -> CustomPluginDescription
s {$sel:revision:CustomPluginDescription' :: Maybe Integer
revision = Maybe Integer
a} :: CustomPluginDescription)
instance Data.FromJSON CustomPluginDescription where
parseJSON :: Value -> Parser CustomPluginDescription
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"CustomPluginDescription"
( \Object
x ->
Maybe Text -> Maybe Integer -> CustomPluginDescription
CustomPluginDescription'
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
"customPluginArn")
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
"revision")
)
instance Prelude.Hashable CustomPluginDescription where
hashWithSalt :: Int -> CustomPluginDescription -> Int
hashWithSalt Int
_salt CustomPluginDescription' {Maybe Integer
Maybe Text
revision :: Maybe Integer
customPluginArn :: Maybe Text
$sel:revision:CustomPluginDescription' :: CustomPluginDescription -> Maybe Integer
$sel:customPluginArn:CustomPluginDescription' :: CustomPluginDescription -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
customPluginArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
revision
instance Prelude.NFData CustomPluginDescription where
rnf :: CustomPluginDescription -> ()
rnf CustomPluginDescription' {Maybe Integer
Maybe Text
revision :: Maybe Integer
customPluginArn :: Maybe Text
$sel:revision:CustomPluginDescription' :: CustomPluginDescription -> Maybe Integer
$sel:customPluginArn:CustomPluginDescription' :: CustomPluginDescription -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
customPluginArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
revision