{-# 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.CustomPluginSummary where
import qualified Amazonka.Core as Core
import Amazonka.KafkaConnect.Types.CustomPluginRevisionSummary
import Amazonka.KafkaConnect.Types.CustomPluginState
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CustomPluginSummary = CustomPluginSummary'
{
CustomPluginSummary -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
CustomPluginSummary -> Maybe CustomPluginRevisionSummary
latestRevision :: Prelude.Maybe CustomPluginRevisionSummary,
CustomPluginSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
CustomPluginSummary -> Maybe Text
customPluginArn :: Prelude.Maybe Prelude.Text,
CustomPluginSummary -> Maybe CustomPluginState
customPluginState :: Prelude.Maybe CustomPluginState,
CustomPluginSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (CustomPluginSummary -> CustomPluginSummary -> Bool
(CustomPluginSummary -> CustomPluginSummary -> Bool)
-> (CustomPluginSummary -> CustomPluginSummary -> Bool)
-> Eq CustomPluginSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CustomPluginSummary -> CustomPluginSummary -> Bool
$c/= :: CustomPluginSummary -> CustomPluginSummary -> Bool
== :: CustomPluginSummary -> CustomPluginSummary -> Bool
$c== :: CustomPluginSummary -> CustomPluginSummary -> Bool
Prelude.Eq, ReadPrec [CustomPluginSummary]
ReadPrec CustomPluginSummary
Int -> ReadS CustomPluginSummary
ReadS [CustomPluginSummary]
(Int -> ReadS CustomPluginSummary)
-> ReadS [CustomPluginSummary]
-> ReadPrec CustomPluginSummary
-> ReadPrec [CustomPluginSummary]
-> Read CustomPluginSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CustomPluginSummary]
$creadListPrec :: ReadPrec [CustomPluginSummary]
readPrec :: ReadPrec CustomPluginSummary
$creadPrec :: ReadPrec CustomPluginSummary
readList :: ReadS [CustomPluginSummary]
$creadList :: ReadS [CustomPluginSummary]
readsPrec :: Int -> ReadS CustomPluginSummary
$creadsPrec :: Int -> ReadS CustomPluginSummary
Prelude.Read, Int -> CustomPluginSummary -> ShowS
[CustomPluginSummary] -> ShowS
CustomPluginSummary -> String
(Int -> CustomPluginSummary -> ShowS)
-> (CustomPluginSummary -> String)
-> ([CustomPluginSummary] -> ShowS)
-> Show CustomPluginSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CustomPluginSummary] -> ShowS
$cshowList :: [CustomPluginSummary] -> ShowS
show :: CustomPluginSummary -> String
$cshow :: CustomPluginSummary -> String
showsPrec :: Int -> CustomPluginSummary -> ShowS
$cshowsPrec :: Int -> CustomPluginSummary -> ShowS
Prelude.Show, (forall x. CustomPluginSummary -> Rep CustomPluginSummary x)
-> (forall x. Rep CustomPluginSummary x -> CustomPluginSummary)
-> Generic CustomPluginSummary
forall x. Rep CustomPluginSummary x -> CustomPluginSummary
forall x. CustomPluginSummary -> Rep CustomPluginSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CustomPluginSummary x -> CustomPluginSummary
$cfrom :: forall x. CustomPluginSummary -> Rep CustomPluginSummary x
Prelude.Generic)
newCustomPluginSummary ::
CustomPluginSummary
newCustomPluginSummary :: CustomPluginSummary
newCustomPluginSummary =
CustomPluginSummary' :: Maybe POSIX
-> Maybe CustomPluginRevisionSummary
-> Maybe Text
-> Maybe Text
-> Maybe CustomPluginState
-> Maybe Text
-> CustomPluginSummary
CustomPluginSummary'
{ $sel:creationTime:CustomPluginSummary' :: Maybe POSIX
creationTime =
Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:latestRevision:CustomPluginSummary' :: Maybe CustomPluginRevisionSummary
latestRevision = Maybe CustomPluginRevisionSummary
forall a. Maybe a
Prelude.Nothing,
$sel:name:CustomPluginSummary' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:customPluginArn:CustomPluginSummary' :: Maybe Text
customPluginArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:customPluginState:CustomPluginSummary' :: Maybe CustomPluginState
customPluginState = Maybe CustomPluginState
forall a. Maybe a
Prelude.Nothing,
$sel:description:CustomPluginSummary' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
customPluginSummary_creationTime :: Lens.Lens' CustomPluginSummary (Prelude.Maybe Prelude.UTCTime)
customPluginSummary_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CustomPluginSummary -> f CustomPluginSummary
customPluginSummary_creationTime = (CustomPluginSummary -> Maybe POSIX)
-> (CustomPluginSummary -> Maybe POSIX -> CustomPluginSummary)
-> Lens
CustomPluginSummary CustomPluginSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomPluginSummary' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:CustomPluginSummary' :: CustomPluginSummary -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: CustomPluginSummary
s@CustomPluginSummary' {} Maybe POSIX
a -> CustomPluginSummary
s {$sel:creationTime:CustomPluginSummary' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: CustomPluginSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> CustomPluginSummary -> f CustomPluginSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CustomPluginSummary
-> f CustomPluginSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
customPluginSummary_latestRevision :: Lens.Lens' CustomPluginSummary (Prelude.Maybe CustomPluginRevisionSummary)
customPluginSummary_latestRevision :: (Maybe CustomPluginRevisionSummary
-> f (Maybe CustomPluginRevisionSummary))
-> CustomPluginSummary -> f CustomPluginSummary
customPluginSummary_latestRevision = (CustomPluginSummary -> Maybe CustomPluginRevisionSummary)
-> (CustomPluginSummary
-> Maybe CustomPluginRevisionSummary -> CustomPluginSummary)
-> Lens
CustomPluginSummary
CustomPluginSummary
(Maybe CustomPluginRevisionSummary)
(Maybe CustomPluginRevisionSummary)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomPluginSummary' {Maybe CustomPluginRevisionSummary
latestRevision :: Maybe CustomPluginRevisionSummary
$sel:latestRevision:CustomPluginSummary' :: CustomPluginSummary -> Maybe CustomPluginRevisionSummary
latestRevision} -> Maybe CustomPluginRevisionSummary
latestRevision) (\s :: CustomPluginSummary
s@CustomPluginSummary' {} Maybe CustomPluginRevisionSummary
a -> CustomPluginSummary
s {$sel:latestRevision:CustomPluginSummary' :: Maybe CustomPluginRevisionSummary
latestRevision = Maybe CustomPluginRevisionSummary
a} :: CustomPluginSummary)
customPluginSummary_name :: Lens.Lens' CustomPluginSummary (Prelude.Maybe Prelude.Text)
customPluginSummary_name :: (Maybe Text -> f (Maybe Text))
-> CustomPluginSummary -> f CustomPluginSummary
customPluginSummary_name = (CustomPluginSummary -> Maybe Text)
-> (CustomPluginSummary -> Maybe Text -> CustomPluginSummary)
-> Lens
CustomPluginSummary CustomPluginSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomPluginSummary' {Maybe Text
name :: Maybe Text
$sel:name:CustomPluginSummary' :: CustomPluginSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: CustomPluginSummary
s@CustomPluginSummary' {} Maybe Text
a -> CustomPluginSummary
s {$sel:name:CustomPluginSummary' :: Maybe Text
name = Maybe Text
a} :: CustomPluginSummary)
customPluginSummary_customPluginArn :: Lens.Lens' CustomPluginSummary (Prelude.Maybe Prelude.Text)
customPluginSummary_customPluginArn :: (Maybe Text -> f (Maybe Text))
-> CustomPluginSummary -> f CustomPluginSummary
customPluginSummary_customPluginArn = (CustomPluginSummary -> Maybe Text)
-> (CustomPluginSummary -> Maybe Text -> CustomPluginSummary)
-> Lens
CustomPluginSummary CustomPluginSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomPluginSummary' {Maybe Text
customPluginArn :: Maybe Text
$sel:customPluginArn:CustomPluginSummary' :: CustomPluginSummary -> Maybe Text
customPluginArn} -> Maybe Text
customPluginArn) (\s :: CustomPluginSummary
s@CustomPluginSummary' {} Maybe Text
a -> CustomPluginSummary
s {$sel:customPluginArn:CustomPluginSummary' :: Maybe Text
customPluginArn = Maybe Text
a} :: CustomPluginSummary)
customPluginSummary_customPluginState :: Lens.Lens' CustomPluginSummary (Prelude.Maybe CustomPluginState)
customPluginSummary_customPluginState :: (Maybe CustomPluginState -> f (Maybe CustomPluginState))
-> CustomPluginSummary -> f CustomPluginSummary
customPluginSummary_customPluginState = (CustomPluginSummary -> Maybe CustomPluginState)
-> (CustomPluginSummary
-> Maybe CustomPluginState -> CustomPluginSummary)
-> Lens
CustomPluginSummary
CustomPluginSummary
(Maybe CustomPluginState)
(Maybe CustomPluginState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomPluginSummary' {Maybe CustomPluginState
customPluginState :: Maybe CustomPluginState
$sel:customPluginState:CustomPluginSummary' :: CustomPluginSummary -> Maybe CustomPluginState
customPluginState} -> Maybe CustomPluginState
customPluginState) (\s :: CustomPluginSummary
s@CustomPluginSummary' {} Maybe CustomPluginState
a -> CustomPluginSummary
s {$sel:customPluginState:CustomPluginSummary' :: Maybe CustomPluginState
customPluginState = Maybe CustomPluginState
a} :: CustomPluginSummary)
customPluginSummary_description :: Lens.Lens' CustomPluginSummary (Prelude.Maybe Prelude.Text)
customPluginSummary_description :: (Maybe Text -> f (Maybe Text))
-> CustomPluginSummary -> f CustomPluginSummary
customPluginSummary_description = (CustomPluginSummary -> Maybe Text)
-> (CustomPluginSummary -> Maybe Text -> CustomPluginSummary)
-> Lens
CustomPluginSummary CustomPluginSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomPluginSummary' {Maybe Text
description :: Maybe Text
$sel:description:CustomPluginSummary' :: CustomPluginSummary -> Maybe Text
description} -> Maybe Text
description) (\s :: CustomPluginSummary
s@CustomPluginSummary' {} Maybe Text
a -> CustomPluginSummary
s {$sel:description:CustomPluginSummary' :: Maybe Text
description = Maybe Text
a} :: CustomPluginSummary)
instance Core.FromJSON CustomPluginSummary where
parseJSON :: Value -> Parser CustomPluginSummary
parseJSON =
String
-> (Object -> Parser CustomPluginSummary)
-> Value
-> Parser CustomPluginSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"CustomPluginSummary"
( \Object
x ->
Maybe POSIX
-> Maybe CustomPluginRevisionSummary
-> Maybe Text
-> Maybe Text
-> Maybe CustomPluginState
-> Maybe Text
-> CustomPluginSummary
CustomPluginSummary'
(Maybe POSIX
-> Maybe CustomPluginRevisionSummary
-> Maybe Text
-> Maybe Text
-> Maybe CustomPluginState
-> Maybe Text
-> CustomPluginSummary)
-> Parser (Maybe POSIX)
-> Parser
(Maybe CustomPluginRevisionSummary
-> Maybe Text
-> Maybe Text
-> Maybe CustomPluginState
-> Maybe Text
-> CustomPluginSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"creationTime")
Parser
(Maybe CustomPluginRevisionSummary
-> Maybe Text
-> Maybe Text
-> Maybe CustomPluginState
-> Maybe Text
-> CustomPluginSummary)
-> Parser (Maybe CustomPluginRevisionSummary)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe CustomPluginState
-> Maybe Text
-> CustomPluginSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CustomPluginRevisionSummary)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"latestRevision")
Parser
(Maybe Text
-> Maybe Text
-> Maybe CustomPluginState
-> Maybe Text
-> CustomPluginSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe CustomPluginState -> Maybe Text -> CustomPluginSummary)
forall (f :: * -> *) a b. Applicative f => 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
"name")
Parser
(Maybe Text
-> Maybe CustomPluginState -> Maybe Text -> CustomPluginSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe CustomPluginState -> Maybe Text -> CustomPluginSummary)
forall (f :: * -> *) a b. Applicative f => 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 CustomPluginState -> Maybe Text -> CustomPluginSummary)
-> Parser (Maybe CustomPluginState)
-> Parser (Maybe Text -> CustomPluginSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CustomPluginState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"customPluginState")
Parser (Maybe Text -> CustomPluginSummary)
-> Parser (Maybe Text) -> Parser CustomPluginSummary
forall (f :: * -> *) a b. Applicative f => 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
"description")
)
instance Prelude.Hashable CustomPluginSummary
instance Prelude.NFData CustomPluginSummary