{-# 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.CustomPlugin where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CustomPlugin = CustomPlugin'
{
CustomPlugin -> Text
customPluginArn :: Prelude.Text,
CustomPlugin -> Natural
revision :: Prelude.Natural
}
deriving (CustomPlugin -> CustomPlugin -> Bool
(CustomPlugin -> CustomPlugin -> Bool)
-> (CustomPlugin -> CustomPlugin -> Bool) -> Eq CustomPlugin
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CustomPlugin -> CustomPlugin -> Bool
$c/= :: CustomPlugin -> CustomPlugin -> Bool
== :: CustomPlugin -> CustomPlugin -> Bool
$c== :: CustomPlugin -> CustomPlugin -> Bool
Prelude.Eq, ReadPrec [CustomPlugin]
ReadPrec CustomPlugin
Int -> ReadS CustomPlugin
ReadS [CustomPlugin]
(Int -> ReadS CustomPlugin)
-> ReadS [CustomPlugin]
-> ReadPrec CustomPlugin
-> ReadPrec [CustomPlugin]
-> Read CustomPlugin
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CustomPlugin]
$creadListPrec :: ReadPrec [CustomPlugin]
readPrec :: ReadPrec CustomPlugin
$creadPrec :: ReadPrec CustomPlugin
readList :: ReadS [CustomPlugin]
$creadList :: ReadS [CustomPlugin]
readsPrec :: Int -> ReadS CustomPlugin
$creadsPrec :: Int -> ReadS CustomPlugin
Prelude.Read, Int -> CustomPlugin -> ShowS
[CustomPlugin] -> ShowS
CustomPlugin -> String
(Int -> CustomPlugin -> ShowS)
-> (CustomPlugin -> String)
-> ([CustomPlugin] -> ShowS)
-> Show CustomPlugin
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CustomPlugin] -> ShowS
$cshowList :: [CustomPlugin] -> ShowS
show :: CustomPlugin -> String
$cshow :: CustomPlugin -> String
showsPrec :: Int -> CustomPlugin -> ShowS
$cshowsPrec :: Int -> CustomPlugin -> ShowS
Prelude.Show, (forall x. CustomPlugin -> Rep CustomPlugin x)
-> (forall x. Rep CustomPlugin x -> CustomPlugin)
-> Generic CustomPlugin
forall x. Rep CustomPlugin x -> CustomPlugin
forall x. CustomPlugin -> Rep CustomPlugin x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CustomPlugin x -> CustomPlugin
$cfrom :: forall x. CustomPlugin -> Rep CustomPlugin x
Prelude.Generic)
newCustomPlugin ::
Prelude.Text ->
Prelude.Natural ->
CustomPlugin
newCustomPlugin :: Text -> Natural -> CustomPlugin
newCustomPlugin Text
pCustomPluginArn_ Natural
pRevision_ =
CustomPlugin' :: Text -> Natural -> CustomPlugin
CustomPlugin'
{ $sel:customPluginArn:CustomPlugin' :: Text
customPluginArn = Text
pCustomPluginArn_,
$sel:revision:CustomPlugin' :: Natural
revision = Natural
pRevision_
}
customPlugin_customPluginArn :: Lens.Lens' CustomPlugin Prelude.Text
customPlugin_customPluginArn :: (Text -> f Text) -> CustomPlugin -> f CustomPlugin
customPlugin_customPluginArn = (CustomPlugin -> Text)
-> (CustomPlugin -> Text -> CustomPlugin)
-> Lens CustomPlugin CustomPlugin Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomPlugin' {Text
customPluginArn :: Text
$sel:customPluginArn:CustomPlugin' :: CustomPlugin -> Text
customPluginArn} -> Text
customPluginArn) (\s :: CustomPlugin
s@CustomPlugin' {} Text
a -> CustomPlugin
s {$sel:customPluginArn:CustomPlugin' :: Text
customPluginArn = Text
a} :: CustomPlugin)
customPlugin_revision :: Lens.Lens' CustomPlugin Prelude.Natural
customPlugin_revision :: (Natural -> f Natural) -> CustomPlugin -> f CustomPlugin
customPlugin_revision = (CustomPlugin -> Natural)
-> (CustomPlugin -> Natural -> CustomPlugin)
-> Lens CustomPlugin CustomPlugin Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomPlugin' {Natural
revision :: Natural
$sel:revision:CustomPlugin' :: CustomPlugin -> Natural
revision} -> Natural
revision) (\s :: CustomPlugin
s@CustomPlugin' {} Natural
a -> CustomPlugin
s {$sel:revision:CustomPlugin' :: Natural
revision = Natural
a} :: CustomPlugin)
instance Prelude.Hashable CustomPlugin
instance Prelude.NFData CustomPlugin
instance Core.ToJSON CustomPlugin where
toJSON :: CustomPlugin -> Value
toJSON CustomPlugin' {Natural
Text
revision :: Natural
customPluginArn :: Text
$sel:revision:CustomPlugin' :: CustomPlugin -> Natural
$sel:customPluginArn:CustomPlugin' :: CustomPlugin -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"customPluginArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
customPluginArn),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"revision" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Natural
revision)
]
)