module Stratosphere.MSK.Replicator (
        module Exports, Replicator(..), mkReplicator
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.MSK.Replicator.KafkaClusterProperty as Exports
import {-# SOURCE #-} Stratosphere.MSK.Replicator.ReplicationInfoProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data Replicator
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-msk-replicator.html>
    Replicator {Replicator -> ()
haddock_workaround_ :: (),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-msk-replicator.html#cfn-msk-replicator-description>
                Replicator -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-msk-replicator.html#cfn-msk-replicator-kafkaclusters>
                Replicator -> [KafkaClusterProperty]
kafkaClusters :: [KafkaClusterProperty],
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-msk-replicator.html#cfn-msk-replicator-replicationinfolist>
                Replicator -> [ReplicationInfoProperty]
replicationInfoList :: [ReplicationInfoProperty],
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-msk-replicator.html#cfn-msk-replicator-replicatorname>
                Replicator -> Value Text
replicatorName :: (Value Prelude.Text),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-msk-replicator.html#cfn-msk-replicator-serviceexecutionrolearn>
                Replicator -> Value Text
serviceExecutionRoleArn :: (Value Prelude.Text),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-msk-replicator.html#cfn-msk-replicator-tags>
                Replicator -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (Replicator -> Replicator -> Bool
(Replicator -> Replicator -> Bool)
-> (Replicator -> Replicator -> Bool) -> Eq Replicator
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Replicator -> Replicator -> Bool
== :: Replicator -> Replicator -> Bool
$c/= :: Replicator -> Replicator -> Bool
/= :: Replicator -> Replicator -> Bool
Prelude.Eq, Int -> Replicator -> ShowS
[Replicator] -> ShowS
Replicator -> String
(Int -> Replicator -> ShowS)
-> (Replicator -> String)
-> ([Replicator] -> ShowS)
-> Show Replicator
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Replicator -> ShowS
showsPrec :: Int -> Replicator -> ShowS
$cshow :: Replicator -> String
show :: Replicator -> String
$cshowList :: [Replicator] -> ShowS
showList :: [Replicator] -> ShowS
Prelude.Show)
mkReplicator ::
  [KafkaClusterProperty]
  -> [ReplicationInfoProperty]
     -> Value Prelude.Text -> Value Prelude.Text -> Replicator
mkReplicator :: [KafkaClusterProperty]
-> [ReplicationInfoProperty]
-> Value Text
-> Value Text
-> Replicator
mkReplicator
  [KafkaClusterProperty]
kafkaClusters
  [ReplicationInfoProperty]
replicationInfoList
  Value Text
replicatorName
  Value Text
serviceExecutionRoleArn
  = Replicator
      {haddock_workaround_ :: ()
haddock_workaround_ = (), kafkaClusters :: [KafkaClusterProperty]
kafkaClusters = [KafkaClusterProperty]
kafkaClusters,
       replicationInfoList :: [ReplicationInfoProperty]
replicationInfoList = [ReplicationInfoProperty]
replicationInfoList,
       replicatorName :: Value Text
replicatorName = Value Text
replicatorName,
       serviceExecutionRoleArn :: Value Text
serviceExecutionRoleArn = Value Text
serviceExecutionRoleArn,
       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 Replicator where
  toResourceProperties :: Replicator -> ResourceProperties
toResourceProperties Replicator {[KafkaClusterProperty]
[ReplicationInfoProperty]
Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Replicator -> ()
description :: Replicator -> Maybe (Value Text)
kafkaClusters :: Replicator -> [KafkaClusterProperty]
replicationInfoList :: Replicator -> [ReplicationInfoProperty]
replicatorName :: Replicator -> Value Text
serviceExecutionRoleArn :: Replicator -> Value Text
tags :: Replicator -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
kafkaClusters :: [KafkaClusterProperty]
replicationInfoList :: [ReplicationInfoProperty]
replicatorName :: Value Text
serviceExecutionRoleArn :: Value Text
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::MSK::Replicator", 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
"KafkaClusters" Key -> [KafkaClusterProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [KafkaClusterProperty]
kafkaClusters,
                            Key
"ReplicationInfoList" Key -> [ReplicationInfoProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [ReplicationInfoProperty]
replicationInfoList,
                            Key
"ReplicatorName" 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
replicatorName,
                            Key
"ServiceExecutionRoleArn" 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
serviceExecutionRoleArn]
                           ([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 Replicator where
  toJSON :: Replicator -> Value
toJSON Replicator {[KafkaClusterProperty]
[ReplicationInfoProperty]
Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Replicator -> ()
description :: Replicator -> Maybe (Value Text)
kafkaClusters :: Replicator -> [KafkaClusterProperty]
replicationInfoList :: Replicator -> [ReplicationInfoProperty]
replicatorName :: Replicator -> Value Text
serviceExecutionRoleArn :: Replicator -> Value Text
tags :: Replicator -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
kafkaClusters :: [KafkaClusterProperty]
replicationInfoList :: [ReplicationInfoProperty]
replicatorName :: Value Text
serviceExecutionRoleArn :: 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
"KafkaClusters" Key -> [KafkaClusterProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [KafkaClusterProperty]
kafkaClusters,
               Key
"ReplicationInfoList" Key -> [ReplicationInfoProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [ReplicationInfoProperty]
replicationInfoList,
               Key
"ReplicatorName" 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
replicatorName,
               Key
"ServiceExecutionRoleArn" 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
serviceExecutionRoleArn]
              ([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" Replicator where
  type PropertyType "Description" Replicator = Value Prelude.Text
  set :: PropertyType "Description" Replicator -> Replicator -> Replicator
set PropertyType "Description" Replicator
newValue Replicator {[KafkaClusterProperty]
[ReplicationInfoProperty]
Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Replicator -> ()
description :: Replicator -> Maybe (Value Text)
kafkaClusters :: Replicator -> [KafkaClusterProperty]
replicationInfoList :: Replicator -> [ReplicationInfoProperty]
replicatorName :: Replicator -> Value Text
serviceExecutionRoleArn :: Replicator -> Value Text
tags :: Replicator -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
kafkaClusters :: [KafkaClusterProperty]
replicationInfoList :: [ReplicationInfoProperty]
replicatorName :: Value Text
serviceExecutionRoleArn :: Value Text
tags :: Maybe [Tag]
..}
    = Replicator {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" Replicator
Value Text
newValue, [KafkaClusterProperty]
[ReplicationInfoProperty]
Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
kafkaClusters :: [KafkaClusterProperty]
replicationInfoList :: [ReplicationInfoProperty]
replicatorName :: Value Text
serviceExecutionRoleArn :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
kafkaClusters :: [KafkaClusterProperty]
replicationInfoList :: [ReplicationInfoProperty]
replicatorName :: Value Text
serviceExecutionRoleArn :: Value Text
tags :: Maybe [Tag]
..}
instance Property "KafkaClusters" Replicator where
  type PropertyType "KafkaClusters" Replicator = [KafkaClusterProperty]
  set :: PropertyType "KafkaClusters" Replicator -> Replicator -> Replicator
set PropertyType "KafkaClusters" Replicator
newValue Replicator {[KafkaClusterProperty]
[ReplicationInfoProperty]
Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Replicator -> ()
description :: Replicator -> Maybe (Value Text)
kafkaClusters :: Replicator -> [KafkaClusterProperty]
replicationInfoList :: Replicator -> [ReplicationInfoProperty]
replicatorName :: Replicator -> Value Text
serviceExecutionRoleArn :: Replicator -> Value Text
tags :: Replicator -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
kafkaClusters :: [KafkaClusterProperty]
replicationInfoList :: [ReplicationInfoProperty]
replicatorName :: Value Text
serviceExecutionRoleArn :: Value Text
tags :: Maybe [Tag]
..}
    = Replicator {kafkaClusters :: [KafkaClusterProperty]
kafkaClusters = [KafkaClusterProperty]
PropertyType "KafkaClusters" Replicator
newValue, [ReplicationInfoProperty]
Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
replicationInfoList :: [ReplicationInfoProperty]
replicatorName :: Value Text
serviceExecutionRoleArn :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
replicationInfoList :: [ReplicationInfoProperty]
replicatorName :: Value Text
serviceExecutionRoleArn :: Value Text
tags :: Maybe [Tag]
..}
instance Property "ReplicationInfoList" Replicator where
  type PropertyType "ReplicationInfoList" Replicator = [ReplicationInfoProperty]
  set :: PropertyType "ReplicationInfoList" Replicator
-> Replicator -> Replicator
set PropertyType "ReplicationInfoList" Replicator
newValue Replicator {[KafkaClusterProperty]
[ReplicationInfoProperty]
Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Replicator -> ()
description :: Replicator -> Maybe (Value Text)
kafkaClusters :: Replicator -> [KafkaClusterProperty]
replicationInfoList :: Replicator -> [ReplicationInfoProperty]
replicatorName :: Replicator -> Value Text
serviceExecutionRoleArn :: Replicator -> Value Text
tags :: Replicator -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
kafkaClusters :: [KafkaClusterProperty]
replicationInfoList :: [ReplicationInfoProperty]
replicatorName :: Value Text
serviceExecutionRoleArn :: Value Text
tags :: Maybe [Tag]
..}
    = Replicator {replicationInfoList :: [ReplicationInfoProperty]
replicationInfoList = [ReplicationInfoProperty]
PropertyType "ReplicationInfoList" Replicator
newValue, [KafkaClusterProperty]
Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
kafkaClusters :: [KafkaClusterProperty]
replicatorName :: Value Text
serviceExecutionRoleArn :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
kafkaClusters :: [KafkaClusterProperty]
replicatorName :: Value Text
serviceExecutionRoleArn :: Value Text
tags :: Maybe [Tag]
..}
instance Property "ReplicatorName" Replicator where
  type PropertyType "ReplicatorName" Replicator = Value Prelude.Text
  set :: PropertyType "ReplicatorName" Replicator
-> Replicator -> Replicator
set PropertyType "ReplicatorName" Replicator
newValue Replicator {[KafkaClusterProperty]
[ReplicationInfoProperty]
Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Replicator -> ()
description :: Replicator -> Maybe (Value Text)
kafkaClusters :: Replicator -> [KafkaClusterProperty]
replicationInfoList :: Replicator -> [ReplicationInfoProperty]
replicatorName :: Replicator -> Value Text
serviceExecutionRoleArn :: Replicator -> Value Text
tags :: Replicator -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
kafkaClusters :: [KafkaClusterProperty]
replicationInfoList :: [ReplicationInfoProperty]
replicatorName :: Value Text
serviceExecutionRoleArn :: Value Text
tags :: Maybe [Tag]
..}
    = Replicator {replicatorName :: Value Text
replicatorName = PropertyType "ReplicatorName" Replicator
Value Text
newValue, [KafkaClusterProperty]
[ReplicationInfoProperty]
Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
kafkaClusters :: [KafkaClusterProperty]
replicationInfoList :: [ReplicationInfoProperty]
serviceExecutionRoleArn :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
kafkaClusters :: [KafkaClusterProperty]
replicationInfoList :: [ReplicationInfoProperty]
serviceExecutionRoleArn :: Value Text
tags :: Maybe [Tag]
..}
instance Property "ServiceExecutionRoleArn" Replicator where
  type PropertyType "ServiceExecutionRoleArn" Replicator = Value Prelude.Text
  set :: PropertyType "ServiceExecutionRoleArn" Replicator
-> Replicator -> Replicator
set PropertyType "ServiceExecutionRoleArn" Replicator
newValue Replicator {[KafkaClusterProperty]
[ReplicationInfoProperty]
Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Replicator -> ()
description :: Replicator -> Maybe (Value Text)
kafkaClusters :: Replicator -> [KafkaClusterProperty]
replicationInfoList :: Replicator -> [ReplicationInfoProperty]
replicatorName :: Replicator -> Value Text
serviceExecutionRoleArn :: Replicator -> Value Text
tags :: Replicator -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
kafkaClusters :: [KafkaClusterProperty]
replicationInfoList :: [ReplicationInfoProperty]
replicatorName :: Value Text
serviceExecutionRoleArn :: Value Text
tags :: Maybe [Tag]
..}
    = Replicator {serviceExecutionRoleArn :: Value Text
serviceExecutionRoleArn = PropertyType "ServiceExecutionRoleArn" Replicator
Value Text
newValue, [KafkaClusterProperty]
[ReplicationInfoProperty]
Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
kafkaClusters :: [KafkaClusterProperty]
replicationInfoList :: [ReplicationInfoProperty]
replicatorName :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
kafkaClusters :: [KafkaClusterProperty]
replicationInfoList :: [ReplicationInfoProperty]
replicatorName :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Tags" Replicator where
  type PropertyType "Tags" Replicator = [Tag]
  set :: PropertyType "Tags" Replicator -> Replicator -> Replicator
set PropertyType "Tags" Replicator
newValue Replicator {[KafkaClusterProperty]
[ReplicationInfoProperty]
Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Replicator -> ()
description :: Replicator -> Maybe (Value Text)
kafkaClusters :: Replicator -> [KafkaClusterProperty]
replicationInfoList :: Replicator -> [ReplicationInfoProperty]
replicatorName :: Replicator -> Value Text
serviceExecutionRoleArn :: Replicator -> Value Text
tags :: Replicator -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
kafkaClusters :: [KafkaClusterProperty]
replicationInfoList :: [ReplicationInfoProperty]
replicatorName :: Value Text
serviceExecutionRoleArn :: Value Text
tags :: Maybe [Tag]
..}
    = Replicator {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" Replicator
newValue, [KafkaClusterProperty]
[ReplicationInfoProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
kafkaClusters :: [KafkaClusterProperty]
replicationInfoList :: [ReplicationInfoProperty]
replicatorName :: Value Text
serviceExecutionRoleArn :: Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
kafkaClusters :: [KafkaClusterProperty]
replicationInfoList :: [ReplicationInfoProperty]
replicatorName :: Value Text
serviceExecutionRoleArn :: Value Text
..}