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