{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data CustomPlugin = CustomPlugin'
{
CustomPlugin -> Text
customPluginArn :: Prelude.Text,
CustomPlugin -> Natural
revision :: Prelude.Natural
}
deriving (CustomPlugin -> CustomPlugin -> Bool
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]
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
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. 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'
{ $sel:customPluginArn:CustomPlugin' :: Text
customPluginArn = Text
pCustomPluginArn_,
$sel:revision:CustomPlugin' :: Natural
revision = Natural
pRevision_
}
customPlugin_customPluginArn :: Lens.Lens' CustomPlugin Prelude.Text
customPlugin_customPluginArn :: Lens' CustomPlugin Text
customPlugin_customPluginArn = 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 :: Lens' CustomPlugin Natural
customPlugin_revision = 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 where
hashWithSalt :: Int -> CustomPlugin -> Int
hashWithSalt Int
_salt CustomPlugin' {Natural
Text
revision :: Natural
customPluginArn :: Text
$sel:revision:CustomPlugin' :: CustomPlugin -> Natural
$sel:customPluginArn:CustomPlugin' :: CustomPlugin -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
customPluginArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
revision
instance Prelude.NFData CustomPlugin where
rnf :: CustomPlugin -> ()
rnf CustomPlugin' {Natural
Text
revision :: Natural
customPluginArn :: Text
$sel:revision:CustomPlugin' :: CustomPlugin -> Natural
$sel:customPluginArn:CustomPlugin' :: CustomPlugin -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
customPluginArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
revision
instance Data.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
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
(Key
"customPluginArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
customPluginArn),
forall a. a -> Maybe a
Prelude.Just (Key
"revision" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Natural
revision)
]
)