{-# 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.Lens as Lens
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
(CustomPluginDescription -> CustomPluginDescription -> Bool)
-> (CustomPluginDescription -> CustomPluginDescription -> Bool)
-> Eq CustomPluginDescription
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]
(Int -> ReadS CustomPluginDescription)
-> ReadS [CustomPluginDescription]
-> ReadPrec CustomPluginDescription
-> ReadPrec [CustomPluginDescription]
-> Read 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
(Int -> CustomPluginDescription -> ShowS)
-> (CustomPluginDescription -> String)
-> ([CustomPluginDescription] -> ShowS)
-> Show CustomPluginDescription
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.
CustomPluginDescription -> Rep CustomPluginDescription x)
-> (forall x.
Rep CustomPluginDescription x -> CustomPluginDescription)
-> Generic CustomPluginDescription
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' :: Maybe Text -> Maybe Integer -> CustomPluginDescription
CustomPluginDescription'
{ $sel:customPluginArn:CustomPluginDescription' :: Maybe Text
customPluginArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:revision:CustomPluginDescription' :: Maybe Integer
revision = Maybe Integer
forall a. Maybe a
Prelude.Nothing
}
customPluginDescription_customPluginArn :: Lens.Lens' CustomPluginDescription (Prelude.Maybe Prelude.Text)
customPluginDescription_customPluginArn :: (Maybe Text -> f (Maybe Text))
-> CustomPluginDescription -> f CustomPluginDescription
customPluginDescription_customPluginArn = (CustomPluginDescription -> Maybe Text)
-> (CustomPluginDescription
-> Maybe Text -> CustomPluginDescription)
-> Lens
CustomPluginDescription
CustomPluginDescription
(Maybe Text)
(Maybe Text)
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 :: (Maybe Integer -> f (Maybe Integer))
-> CustomPluginDescription -> f CustomPluginDescription
customPluginDescription_revision = (CustomPluginDescription -> Maybe Integer)
-> (CustomPluginDescription
-> Maybe Integer -> CustomPluginDescription)
-> Lens
CustomPluginDescription
CustomPluginDescription
(Maybe Integer)
(Maybe Integer)
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 Core.FromJSON CustomPluginDescription where
parseJSON :: Value -> Parser CustomPluginDescription
parseJSON =
String
-> (Object -> Parser CustomPluginDescription)
-> Value
-> Parser CustomPluginDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"CustomPluginDescription"
( \Object
x ->
Maybe Text -> Maybe Integer -> CustomPluginDescription
CustomPluginDescription'
(Maybe Text -> Maybe Integer -> CustomPluginDescription)
-> Parser (Maybe Text)
-> Parser (Maybe Integer -> CustomPluginDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"customPluginArn")
Parser (Maybe Integer -> CustomPluginDescription)
-> Parser (Maybe Integer) -> Parser CustomPluginDescription
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"revision")
)
instance Prelude.Hashable CustomPluginDescription
instance Prelude.NFData CustomPluginDescription