{-# 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.WorkerConfigurationDescription where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data WorkerConfigurationDescription = WorkerConfigurationDescription'
{
WorkerConfigurationDescription -> Maybe Text
workerConfigurationArn :: Prelude.Maybe Prelude.Text,
WorkerConfigurationDescription -> Maybe Integer
revision :: Prelude.Maybe Prelude.Integer
}
deriving (WorkerConfigurationDescription
-> WorkerConfigurationDescription -> Bool
(WorkerConfigurationDescription
-> WorkerConfigurationDescription -> Bool)
-> (WorkerConfigurationDescription
-> WorkerConfigurationDescription -> Bool)
-> Eq WorkerConfigurationDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WorkerConfigurationDescription
-> WorkerConfigurationDescription -> Bool
$c/= :: WorkerConfigurationDescription
-> WorkerConfigurationDescription -> Bool
== :: WorkerConfigurationDescription
-> WorkerConfigurationDescription -> Bool
$c== :: WorkerConfigurationDescription
-> WorkerConfigurationDescription -> Bool
Prelude.Eq, ReadPrec [WorkerConfigurationDescription]
ReadPrec WorkerConfigurationDescription
Int -> ReadS WorkerConfigurationDescription
ReadS [WorkerConfigurationDescription]
(Int -> ReadS WorkerConfigurationDescription)
-> ReadS [WorkerConfigurationDescription]
-> ReadPrec WorkerConfigurationDescription
-> ReadPrec [WorkerConfigurationDescription]
-> Read WorkerConfigurationDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [WorkerConfigurationDescription]
$creadListPrec :: ReadPrec [WorkerConfigurationDescription]
readPrec :: ReadPrec WorkerConfigurationDescription
$creadPrec :: ReadPrec WorkerConfigurationDescription
readList :: ReadS [WorkerConfigurationDescription]
$creadList :: ReadS [WorkerConfigurationDescription]
readsPrec :: Int -> ReadS WorkerConfigurationDescription
$creadsPrec :: Int -> ReadS WorkerConfigurationDescription
Prelude.Read, Int -> WorkerConfigurationDescription -> ShowS
[WorkerConfigurationDescription] -> ShowS
WorkerConfigurationDescription -> String
(Int -> WorkerConfigurationDescription -> ShowS)
-> (WorkerConfigurationDescription -> String)
-> ([WorkerConfigurationDescription] -> ShowS)
-> Show WorkerConfigurationDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WorkerConfigurationDescription] -> ShowS
$cshowList :: [WorkerConfigurationDescription] -> ShowS
show :: WorkerConfigurationDescription -> String
$cshow :: WorkerConfigurationDescription -> String
showsPrec :: Int -> WorkerConfigurationDescription -> ShowS
$cshowsPrec :: Int -> WorkerConfigurationDescription -> ShowS
Prelude.Show, (forall x.
WorkerConfigurationDescription
-> Rep WorkerConfigurationDescription x)
-> (forall x.
Rep WorkerConfigurationDescription x
-> WorkerConfigurationDescription)
-> Generic WorkerConfigurationDescription
forall x.
Rep WorkerConfigurationDescription x
-> WorkerConfigurationDescription
forall x.
WorkerConfigurationDescription
-> Rep WorkerConfigurationDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep WorkerConfigurationDescription x
-> WorkerConfigurationDescription
$cfrom :: forall x.
WorkerConfigurationDescription
-> Rep WorkerConfigurationDescription x
Prelude.Generic)
newWorkerConfigurationDescription ::
WorkerConfigurationDescription
newWorkerConfigurationDescription :: WorkerConfigurationDescription
newWorkerConfigurationDescription =
WorkerConfigurationDescription' :: Maybe Text -> Maybe Integer -> WorkerConfigurationDescription
WorkerConfigurationDescription'
{ $sel:workerConfigurationArn:WorkerConfigurationDescription' :: Maybe Text
workerConfigurationArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:revision:WorkerConfigurationDescription' :: Maybe Integer
revision = Maybe Integer
forall a. Maybe a
Prelude.Nothing
}
workerConfigurationDescription_workerConfigurationArn :: Lens.Lens' WorkerConfigurationDescription (Prelude.Maybe Prelude.Text)
workerConfigurationDescription_workerConfigurationArn :: (Maybe Text -> f (Maybe Text))
-> WorkerConfigurationDescription
-> f WorkerConfigurationDescription
workerConfigurationDescription_workerConfigurationArn = (WorkerConfigurationDescription -> Maybe Text)
-> (WorkerConfigurationDescription
-> Maybe Text -> WorkerConfigurationDescription)
-> Lens
WorkerConfigurationDescription
WorkerConfigurationDescription
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkerConfigurationDescription' {Maybe Text
workerConfigurationArn :: Maybe Text
$sel:workerConfigurationArn:WorkerConfigurationDescription' :: WorkerConfigurationDescription -> Maybe Text
workerConfigurationArn} -> Maybe Text
workerConfigurationArn) (\s :: WorkerConfigurationDescription
s@WorkerConfigurationDescription' {} Maybe Text
a -> WorkerConfigurationDescription
s {$sel:workerConfigurationArn:WorkerConfigurationDescription' :: Maybe Text
workerConfigurationArn = Maybe Text
a} :: WorkerConfigurationDescription)
workerConfigurationDescription_revision :: Lens.Lens' WorkerConfigurationDescription (Prelude.Maybe Prelude.Integer)
workerConfigurationDescription_revision :: (Maybe Integer -> f (Maybe Integer))
-> WorkerConfigurationDescription
-> f WorkerConfigurationDescription
workerConfigurationDescription_revision = (WorkerConfigurationDescription -> Maybe Integer)
-> (WorkerConfigurationDescription
-> Maybe Integer -> WorkerConfigurationDescription)
-> Lens
WorkerConfigurationDescription
WorkerConfigurationDescription
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkerConfigurationDescription' {Maybe Integer
revision :: Maybe Integer
$sel:revision:WorkerConfigurationDescription' :: WorkerConfigurationDescription -> Maybe Integer
revision} -> Maybe Integer
revision) (\s :: WorkerConfigurationDescription
s@WorkerConfigurationDescription' {} Maybe Integer
a -> WorkerConfigurationDescription
s {$sel:revision:WorkerConfigurationDescription' :: Maybe Integer
revision = Maybe Integer
a} :: WorkerConfigurationDescription)
instance Core.FromJSON WorkerConfigurationDescription where
parseJSON :: Value -> Parser WorkerConfigurationDescription
parseJSON =
String
-> (Object -> Parser WorkerConfigurationDescription)
-> Value
-> Parser WorkerConfigurationDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"WorkerConfigurationDescription"
( \Object
x ->
Maybe Text -> Maybe Integer -> WorkerConfigurationDescription
WorkerConfigurationDescription'
(Maybe Text -> Maybe Integer -> WorkerConfigurationDescription)
-> Parser (Maybe Text)
-> Parser (Maybe Integer -> WorkerConfigurationDescription)
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
"workerConfigurationArn")
Parser (Maybe Integer -> WorkerConfigurationDescription)
-> Parser (Maybe Integer) -> Parser WorkerConfigurationDescription
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
WorkerConfigurationDescription
instance
Prelude.NFData
WorkerConfigurationDescription