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