module Stratosphere.DMS.DataMigration.DataMigrationSettingsProperty (
        DataMigrationSettingsProperty(..), mkDataMigrationSettingsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data DataMigrationSettingsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dms-datamigration-datamigrationsettings.html>
    DataMigrationSettingsProperty {DataMigrationSettingsProperty -> ()
haddock_workaround_ :: (),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dms-datamigration-datamigrationsettings.html#cfn-dms-datamigration-datamigrationsettings-cloudwatchlogsenabled>
                                   DataMigrationSettingsProperty -> Maybe (Value Bool)
cloudwatchLogsEnabled :: (Prelude.Maybe (Value Prelude.Bool)),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dms-datamigration-datamigrationsettings.html#cfn-dms-datamigration-datamigrationsettings-numberofjobs>
                                   DataMigrationSettingsProperty -> Maybe (Value Integer)
numberOfJobs :: (Prelude.Maybe (Value Prelude.Integer)),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dms-datamigration-datamigrationsettings.html#cfn-dms-datamigration-datamigrationsettings-selectionrules>
                                   DataMigrationSettingsProperty -> Maybe (Value Text)
selectionRules :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (DataMigrationSettingsProperty
-> DataMigrationSettingsProperty -> Bool
(DataMigrationSettingsProperty
 -> DataMigrationSettingsProperty -> Bool)
-> (DataMigrationSettingsProperty
    -> DataMigrationSettingsProperty -> Bool)
-> Eq DataMigrationSettingsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DataMigrationSettingsProperty
-> DataMigrationSettingsProperty -> Bool
== :: DataMigrationSettingsProperty
-> DataMigrationSettingsProperty -> Bool
$c/= :: DataMigrationSettingsProperty
-> DataMigrationSettingsProperty -> Bool
/= :: DataMigrationSettingsProperty
-> DataMigrationSettingsProperty -> Bool
Prelude.Eq, Int -> DataMigrationSettingsProperty -> ShowS
[DataMigrationSettingsProperty] -> ShowS
DataMigrationSettingsProperty -> String
(Int -> DataMigrationSettingsProperty -> ShowS)
-> (DataMigrationSettingsProperty -> String)
-> ([DataMigrationSettingsProperty] -> ShowS)
-> Show DataMigrationSettingsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DataMigrationSettingsProperty -> ShowS
showsPrec :: Int -> DataMigrationSettingsProperty -> ShowS
$cshow :: DataMigrationSettingsProperty -> String
show :: DataMigrationSettingsProperty -> String
$cshowList :: [DataMigrationSettingsProperty] -> ShowS
showList :: [DataMigrationSettingsProperty] -> ShowS
Prelude.Show)
mkDataMigrationSettingsProperty :: DataMigrationSettingsProperty
mkDataMigrationSettingsProperty :: DataMigrationSettingsProperty
mkDataMigrationSettingsProperty
  = DataMigrationSettingsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), cloudwatchLogsEnabled :: Maybe (Value Bool)
cloudwatchLogsEnabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
       numberOfJobs :: Maybe (Value Integer)
numberOfJobs = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing, selectionRules :: Maybe (Value Text)
selectionRules = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DataMigrationSettingsProperty where
  toResourceProperties :: DataMigrationSettingsProperty -> ResourceProperties
toResourceProperties DataMigrationSettingsProperty {Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: DataMigrationSettingsProperty -> ()
cloudwatchLogsEnabled :: DataMigrationSettingsProperty -> Maybe (Value Bool)
numberOfJobs :: DataMigrationSettingsProperty -> Maybe (Value Integer)
selectionRules :: DataMigrationSettingsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cloudwatchLogsEnabled :: Maybe (Value Bool)
numberOfJobs :: Maybe (Value Integer)
selectionRules :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::DMS::DataMigration.DataMigrationSettings",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                           [Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CloudwatchLogsEnabled"
                              (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
cloudwatchLogsEnabled,
                            Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"NumberOfJobs" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
numberOfJobs,
                            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
"SelectionRules" (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)
selectionRules])}
instance JSON.ToJSON DataMigrationSettingsProperty where
  toJSON :: DataMigrationSettingsProperty -> Value
toJSON DataMigrationSettingsProperty {Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: DataMigrationSettingsProperty -> ()
cloudwatchLogsEnabled :: DataMigrationSettingsProperty -> Maybe (Value Bool)
numberOfJobs :: DataMigrationSettingsProperty -> Maybe (Value Integer)
selectionRules :: DataMigrationSettingsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cloudwatchLogsEnabled :: Maybe (Value Bool)
numberOfJobs :: Maybe (Value Integer)
selectionRules :: Maybe (Value Text)
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
              [Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CloudwatchLogsEnabled"
                 (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
cloudwatchLogsEnabled,
               Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"NumberOfJobs" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
numberOfJobs,
               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
"SelectionRules" (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)
selectionRules]))
instance Property "CloudwatchLogsEnabled" DataMigrationSettingsProperty where
  type PropertyType "CloudwatchLogsEnabled" DataMigrationSettingsProperty = Value Prelude.Bool
  set :: PropertyType "CloudwatchLogsEnabled" DataMigrationSettingsProperty
-> DataMigrationSettingsProperty -> DataMigrationSettingsProperty
set PropertyType "CloudwatchLogsEnabled" DataMigrationSettingsProperty
newValue DataMigrationSettingsProperty {Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: DataMigrationSettingsProperty -> ()
cloudwatchLogsEnabled :: DataMigrationSettingsProperty -> Maybe (Value Bool)
numberOfJobs :: DataMigrationSettingsProperty -> Maybe (Value Integer)
selectionRules :: DataMigrationSettingsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cloudwatchLogsEnabled :: Maybe (Value Bool)
numberOfJobs :: Maybe (Value Integer)
selectionRules :: Maybe (Value Text)
..}
    = DataMigrationSettingsProperty
        {cloudwatchLogsEnabled :: Maybe (Value Bool)
cloudwatchLogsEnabled = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CloudwatchLogsEnabled" DataMigrationSettingsProperty
Value Bool
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
numberOfJobs :: Maybe (Value Integer)
selectionRules :: Maybe (Value Text)
haddock_workaround_ :: ()
numberOfJobs :: Maybe (Value Integer)
selectionRules :: Maybe (Value Text)
..}
instance Property "NumberOfJobs" DataMigrationSettingsProperty where
  type PropertyType "NumberOfJobs" DataMigrationSettingsProperty = Value Prelude.Integer
  set :: PropertyType "NumberOfJobs" DataMigrationSettingsProperty
-> DataMigrationSettingsProperty -> DataMigrationSettingsProperty
set PropertyType "NumberOfJobs" DataMigrationSettingsProperty
newValue DataMigrationSettingsProperty {Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: DataMigrationSettingsProperty -> ()
cloudwatchLogsEnabled :: DataMigrationSettingsProperty -> Maybe (Value Bool)
numberOfJobs :: DataMigrationSettingsProperty -> Maybe (Value Integer)
selectionRules :: DataMigrationSettingsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cloudwatchLogsEnabled :: Maybe (Value Bool)
numberOfJobs :: Maybe (Value Integer)
selectionRules :: Maybe (Value Text)
..}
    = DataMigrationSettingsProperty
        {numberOfJobs :: Maybe (Value Integer)
numberOfJobs = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "NumberOfJobs" DataMigrationSettingsProperty
Value Integer
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
cloudwatchLogsEnabled :: Maybe (Value Bool)
selectionRules :: Maybe (Value Text)
haddock_workaround_ :: ()
cloudwatchLogsEnabled :: Maybe (Value Bool)
selectionRules :: Maybe (Value Text)
..}
instance Property "SelectionRules" DataMigrationSettingsProperty where
  type PropertyType "SelectionRules" DataMigrationSettingsProperty = Value Prelude.Text
  set :: PropertyType "SelectionRules" DataMigrationSettingsProperty
-> DataMigrationSettingsProperty -> DataMigrationSettingsProperty
set PropertyType "SelectionRules" DataMigrationSettingsProperty
newValue DataMigrationSettingsProperty {Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: DataMigrationSettingsProperty -> ()
cloudwatchLogsEnabled :: DataMigrationSettingsProperty -> Maybe (Value Bool)
numberOfJobs :: DataMigrationSettingsProperty -> Maybe (Value Integer)
selectionRules :: DataMigrationSettingsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cloudwatchLogsEnabled :: Maybe (Value Bool)
numberOfJobs :: Maybe (Value Integer)
selectionRules :: Maybe (Value Text)
..}
    = DataMigrationSettingsProperty
        {selectionRules :: Maybe (Value Text)
selectionRules = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SelectionRules" DataMigrationSettingsProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Integer)
()
haddock_workaround_ :: ()
cloudwatchLogsEnabled :: Maybe (Value Bool)
numberOfJobs :: Maybe (Value Integer)
haddock_workaround_ :: ()
cloudwatchLogsEnabled :: Maybe (Value Bool)
numberOfJobs :: Maybe (Value Integer)
..}