module Stratosphere.S3.Bucket.ReplicationConfigurationProperty (
        module Exports, ReplicationConfigurationProperty(..),
        mkReplicationConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.S3.Bucket.ReplicationRuleProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ReplicationConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration.html>
    ReplicationConfigurationProperty {ReplicationConfigurationProperty -> ()
haddock_workaround_ :: (),
                                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration.html#cfn-s3-bucket-replicationconfiguration-role>
                                      ReplicationConfigurationProperty -> Value Text
role :: (Value Prelude.Text),
                                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration.html#cfn-s3-bucket-replicationconfiguration-rules>
                                      ReplicationConfigurationProperty -> [ReplicationRuleProperty]
rules :: [ReplicationRuleProperty]}
  deriving stock (ReplicationConfigurationProperty
-> ReplicationConfigurationProperty -> Bool
(ReplicationConfigurationProperty
 -> ReplicationConfigurationProperty -> Bool)
-> (ReplicationConfigurationProperty
    -> ReplicationConfigurationProperty -> Bool)
-> Eq ReplicationConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ReplicationConfigurationProperty
-> ReplicationConfigurationProperty -> Bool
== :: ReplicationConfigurationProperty
-> ReplicationConfigurationProperty -> Bool
$c/= :: ReplicationConfigurationProperty
-> ReplicationConfigurationProperty -> Bool
/= :: ReplicationConfigurationProperty
-> ReplicationConfigurationProperty -> Bool
Prelude.Eq, Int -> ReplicationConfigurationProperty -> ShowS
[ReplicationConfigurationProperty] -> ShowS
ReplicationConfigurationProperty -> String
(Int -> ReplicationConfigurationProperty -> ShowS)
-> (ReplicationConfigurationProperty -> String)
-> ([ReplicationConfigurationProperty] -> ShowS)
-> Show ReplicationConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ReplicationConfigurationProperty -> ShowS
showsPrec :: Int -> ReplicationConfigurationProperty -> ShowS
$cshow :: ReplicationConfigurationProperty -> String
show :: ReplicationConfigurationProperty -> String
$cshowList :: [ReplicationConfigurationProperty] -> ShowS
showList :: [ReplicationConfigurationProperty] -> ShowS
Prelude.Show)
mkReplicationConfigurationProperty ::
  Value Prelude.Text
  -> [ReplicationRuleProperty] -> ReplicationConfigurationProperty
mkReplicationConfigurationProperty :: Value Text
-> [ReplicationRuleProperty] -> ReplicationConfigurationProperty
mkReplicationConfigurationProperty Value Text
role [ReplicationRuleProperty]
rules
  = ReplicationConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), role :: Value Text
role = Value Text
role, rules :: [ReplicationRuleProperty]
rules = [ReplicationRuleProperty]
rules}
instance ToResourceProperties ReplicationConfigurationProperty where
  toResourceProperties :: ReplicationConfigurationProperty -> ResourceProperties
toResourceProperties ReplicationConfigurationProperty {[ReplicationRuleProperty]
()
Value Text
haddock_workaround_ :: ReplicationConfigurationProperty -> ()
role :: ReplicationConfigurationProperty -> Value Text
rules :: ReplicationConfigurationProperty -> [ReplicationRuleProperty]
haddock_workaround_ :: ()
role :: Value Text
rules :: [ReplicationRuleProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::S3::Bucket.ReplicationConfiguration",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Key
"Role" 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
role, Key
"Rules" Key -> [ReplicationRuleProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [ReplicationRuleProperty]
rules]}
instance JSON.ToJSON ReplicationConfigurationProperty where
  toJSON :: ReplicationConfigurationProperty -> Value
toJSON ReplicationConfigurationProperty {[ReplicationRuleProperty]
()
Value Text
haddock_workaround_ :: ReplicationConfigurationProperty -> ()
role :: ReplicationConfigurationProperty -> Value Text
rules :: ReplicationConfigurationProperty -> [ReplicationRuleProperty]
haddock_workaround_ :: ()
role :: Value Text
rules :: [ReplicationRuleProperty]
..}
    = [(Key, Value)] -> Value
JSON.object [Key
"Role" 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
role, Key
"Rules" Key -> [ReplicationRuleProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [ReplicationRuleProperty]
rules]
instance Property "Role" ReplicationConfigurationProperty where
  type PropertyType "Role" ReplicationConfigurationProperty = Value Prelude.Text
  set :: PropertyType "Role" ReplicationConfigurationProperty
-> ReplicationConfigurationProperty
-> ReplicationConfigurationProperty
set PropertyType "Role" ReplicationConfigurationProperty
newValue ReplicationConfigurationProperty {[ReplicationRuleProperty]
()
Value Text
haddock_workaround_ :: ReplicationConfigurationProperty -> ()
role :: ReplicationConfigurationProperty -> Value Text
rules :: ReplicationConfigurationProperty -> [ReplicationRuleProperty]
haddock_workaround_ :: ()
role :: Value Text
rules :: [ReplicationRuleProperty]
..}
    = ReplicationConfigurationProperty {role :: Value Text
role = PropertyType "Role" ReplicationConfigurationProperty
Value Text
newValue, [ReplicationRuleProperty]
()
haddock_workaround_ :: ()
rules :: [ReplicationRuleProperty]
haddock_workaround_ :: ()
rules :: [ReplicationRuleProperty]
..}
instance Property "Rules" ReplicationConfigurationProperty where
  type PropertyType "Rules" ReplicationConfigurationProperty = [ReplicationRuleProperty]
  set :: PropertyType "Rules" ReplicationConfigurationProperty
-> ReplicationConfigurationProperty
-> ReplicationConfigurationProperty
set PropertyType "Rules" ReplicationConfigurationProperty
newValue ReplicationConfigurationProperty {[ReplicationRuleProperty]
()
Value Text
haddock_workaround_ :: ReplicationConfigurationProperty -> ()
role :: ReplicationConfigurationProperty -> Value Text
rules :: ReplicationConfigurationProperty -> [ReplicationRuleProperty]
haddock_workaround_ :: ()
role :: Value Text
rules :: [ReplicationRuleProperty]
..}
    = ReplicationConfigurationProperty {rules :: [ReplicationRuleProperty]
rules = [ReplicationRuleProperty]
PropertyType "Rules" ReplicationConfigurationProperty
newValue, ()
Value Text
haddock_workaround_ :: ()
role :: Value Text
haddock_workaround_ :: ()
role :: Value Text
..}