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