module Stratosphere.KafkaConnect.WorkerConfiguration (
WorkerConfiguration(..), mkWorkerConfiguration
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data WorkerConfiguration
=
WorkerConfiguration {WorkerConfiguration -> ()
haddock_workaround_ :: (),
WorkerConfiguration -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
WorkerConfiguration -> Value Text
name :: (Value Prelude.Text),
WorkerConfiguration -> Value Text
propertiesFileContent :: (Value Prelude.Text),
WorkerConfiguration -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (WorkerConfiguration -> WorkerConfiguration -> Bool
(WorkerConfiguration -> WorkerConfiguration -> Bool)
-> (WorkerConfiguration -> WorkerConfiguration -> Bool)
-> Eq WorkerConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: WorkerConfiguration -> WorkerConfiguration -> Bool
== :: WorkerConfiguration -> WorkerConfiguration -> Bool
$c/= :: WorkerConfiguration -> WorkerConfiguration -> Bool
/= :: WorkerConfiguration -> WorkerConfiguration -> Bool
Prelude.Eq, 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
$cshowsPrec :: Int -> WorkerConfiguration -> ShowS
showsPrec :: Int -> WorkerConfiguration -> ShowS
$cshow :: WorkerConfiguration -> String
show :: WorkerConfiguration -> String
$cshowList :: [WorkerConfiguration] -> ShowS
showList :: [WorkerConfiguration] -> ShowS
Prelude.Show)
mkWorkerConfiguration ::
Value Prelude.Text -> Value Prelude.Text -> WorkerConfiguration
mkWorkerConfiguration :: Value Text -> Value Text -> WorkerConfiguration
mkWorkerConfiguration Value Text
name Value Text
propertiesFileContent
= WorkerConfiguration
{haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name,
propertiesFileContent :: Value Text
propertiesFileContent = Value Text
propertiesFileContent,
description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties WorkerConfiguration where
toResourceProperties :: WorkerConfiguration -> ResourceProperties
toResourceProperties WorkerConfiguration {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: WorkerConfiguration -> ()
description :: WorkerConfiguration -> Maybe (Value Text)
name :: WorkerConfiguration -> Value Text
propertiesFileContent :: WorkerConfiguration -> Value Text
tags :: WorkerConfiguration -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
propertiesFileContent :: Value Text
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::KafkaConnect::WorkerConfiguration",
supportsTags :: Bool
supportsTags = Bool
Prelude.True,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"Name" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
name,
Key
"PropertiesFileContent" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
propertiesFileContent]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Description" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
description,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON WorkerConfiguration where
toJSON :: WorkerConfiguration -> Value
toJSON WorkerConfiguration {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: WorkerConfiguration -> ()
description :: WorkerConfiguration -> Maybe (Value Text)
name :: WorkerConfiguration -> Value Text
propertiesFileContent :: WorkerConfiguration -> Value Text
tags :: WorkerConfiguration -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
propertiesFileContent :: Value Text
tags :: Maybe [Tag]
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"Name" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
name,
Key
"PropertiesFileContent" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
propertiesFileContent]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Description" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
description,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "Description" WorkerConfiguration where
type PropertyType "Description" WorkerConfiguration = Value Prelude.Text
set :: PropertyType "Description" WorkerConfiguration
-> WorkerConfiguration -> WorkerConfiguration
set PropertyType "Description" WorkerConfiguration
newValue WorkerConfiguration {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: WorkerConfiguration -> ()
description :: WorkerConfiguration -> Maybe (Value Text)
name :: WorkerConfiguration -> Value Text
propertiesFileContent :: WorkerConfiguration -> Value Text
tags :: WorkerConfiguration -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
propertiesFileContent :: Value Text
tags :: Maybe [Tag]
..}
= WorkerConfiguration {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" WorkerConfiguration
Value Text
newValue, Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
name :: Value Text
propertiesFileContent :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
name :: Value Text
propertiesFileContent :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Name" WorkerConfiguration where
type PropertyType "Name" WorkerConfiguration = Value Prelude.Text
set :: PropertyType "Name" WorkerConfiguration
-> WorkerConfiguration -> WorkerConfiguration
set PropertyType "Name" WorkerConfiguration
newValue WorkerConfiguration {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: WorkerConfiguration -> ()
description :: WorkerConfiguration -> Maybe (Value Text)
name :: WorkerConfiguration -> Value Text
propertiesFileContent :: WorkerConfiguration -> Value Text
tags :: WorkerConfiguration -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
propertiesFileContent :: Value Text
tags :: Maybe [Tag]
..}
= WorkerConfiguration {name :: Value Text
name = PropertyType "Name" WorkerConfiguration
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
propertiesFileContent :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
propertiesFileContent :: Value Text
tags :: Maybe [Tag]
..}
instance Property "PropertiesFileContent" WorkerConfiguration where
type PropertyType "PropertiesFileContent" WorkerConfiguration = Value Prelude.Text
set :: PropertyType "PropertiesFileContent" WorkerConfiguration
-> WorkerConfiguration -> WorkerConfiguration
set PropertyType "PropertiesFileContent" WorkerConfiguration
newValue WorkerConfiguration {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: WorkerConfiguration -> ()
description :: WorkerConfiguration -> Maybe (Value Text)
name :: WorkerConfiguration -> Value Text
propertiesFileContent :: WorkerConfiguration -> Value Text
tags :: WorkerConfiguration -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
propertiesFileContent :: Value Text
tags :: Maybe [Tag]
..}
= WorkerConfiguration {propertiesFileContent :: Value Text
propertiesFileContent = PropertyType "PropertiesFileContent" WorkerConfiguration
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Tags" WorkerConfiguration where
type PropertyType "Tags" WorkerConfiguration = [Tag]
set :: PropertyType "Tags" WorkerConfiguration
-> WorkerConfiguration -> WorkerConfiguration
set PropertyType "Tags" WorkerConfiguration
newValue WorkerConfiguration {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: WorkerConfiguration -> ()
description :: WorkerConfiguration -> Maybe (Value Text)
name :: WorkerConfiguration -> Value Text
propertiesFileContent :: WorkerConfiguration -> Value Text
tags :: WorkerConfiguration -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
propertiesFileContent :: Value Text
tags :: Maybe [Tag]
..}
= WorkerConfiguration {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" WorkerConfiguration
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
propertiesFileContent :: Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
propertiesFileContent :: Value Text
..}