module Stratosphere.Config.ConfigurationRecorder (
        module Exports, ConfigurationRecorder(..), mkConfigurationRecorder
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Config.ConfigurationRecorder.RecordingGroupProperty as Exports
import {-# SOURCE #-} Stratosphere.Config.ConfigurationRecorder.RecordingModeProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ConfigurationRecorder
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-config-configurationrecorder.html>
    ConfigurationRecorder {ConfigurationRecorder -> ()
haddock_workaround_ :: (),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-config-configurationrecorder.html#cfn-config-configurationrecorder-name>
                           ConfigurationRecorder -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text)),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-config-configurationrecorder.html#cfn-config-configurationrecorder-recordinggroup>
                           ConfigurationRecorder -> Maybe RecordingGroupProperty
recordingGroup :: (Prelude.Maybe RecordingGroupProperty),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-config-configurationrecorder.html#cfn-config-configurationrecorder-recordingmode>
                           ConfigurationRecorder -> Maybe RecordingModeProperty
recordingMode :: (Prelude.Maybe RecordingModeProperty),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-config-configurationrecorder.html#cfn-config-configurationrecorder-rolearn>
                           ConfigurationRecorder -> Value Text
roleARN :: (Value Prelude.Text)}
  deriving stock (ConfigurationRecorder -> ConfigurationRecorder -> Bool
(ConfigurationRecorder -> ConfigurationRecorder -> Bool)
-> (ConfigurationRecorder -> ConfigurationRecorder -> Bool)
-> Eq ConfigurationRecorder
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ConfigurationRecorder -> ConfigurationRecorder -> Bool
== :: ConfigurationRecorder -> ConfigurationRecorder -> Bool
$c/= :: ConfigurationRecorder -> ConfigurationRecorder -> Bool
/= :: ConfigurationRecorder -> ConfigurationRecorder -> Bool
Prelude.Eq, Int -> ConfigurationRecorder -> ShowS
[ConfigurationRecorder] -> ShowS
ConfigurationRecorder -> String
(Int -> ConfigurationRecorder -> ShowS)
-> (ConfigurationRecorder -> String)
-> ([ConfigurationRecorder] -> ShowS)
-> Show ConfigurationRecorder
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ConfigurationRecorder -> ShowS
showsPrec :: Int -> ConfigurationRecorder -> ShowS
$cshow :: ConfigurationRecorder -> String
show :: ConfigurationRecorder -> String
$cshowList :: [ConfigurationRecorder] -> ShowS
showList :: [ConfigurationRecorder] -> ShowS
Prelude.Show)
mkConfigurationRecorder ::
  Value Prelude.Text -> ConfigurationRecorder
mkConfigurationRecorder :: Value Text -> ConfigurationRecorder
mkConfigurationRecorder Value Text
roleARN
  = ConfigurationRecorder
      {haddock_workaround_ :: ()
haddock_workaround_ = (), roleARN :: Value Text
roleARN = Value Text
roleARN,
       name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, recordingGroup :: Maybe RecordingGroupProperty
recordingGroup = Maybe RecordingGroupProperty
forall a. Maybe a
Prelude.Nothing,
       recordingMode :: Maybe RecordingModeProperty
recordingMode = Maybe RecordingModeProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ConfigurationRecorder where
  toResourceProperties :: ConfigurationRecorder -> ResourceProperties
toResourceProperties ConfigurationRecorder {Maybe (Value Text)
Maybe RecordingModeProperty
Maybe RecordingGroupProperty
()
Value Text
haddock_workaround_ :: ConfigurationRecorder -> ()
name :: ConfigurationRecorder -> Maybe (Value Text)
recordingGroup :: ConfigurationRecorder -> Maybe RecordingGroupProperty
recordingMode :: ConfigurationRecorder -> Maybe RecordingModeProperty
roleARN :: ConfigurationRecorder -> Value Text
haddock_workaround_ :: ()
name :: Maybe (Value Text)
recordingGroup :: Maybe RecordingGroupProperty
recordingMode :: Maybe RecordingModeProperty
roleARN :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Config::ConfigurationRecorder",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         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
"RoleARN" 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
roleARN]
                           ([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
"Name" (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)
name,
                               Key -> RecordingGroupProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RecordingGroup" (RecordingGroupProperty -> (Key, Value))
-> Maybe RecordingGroupProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RecordingGroupProperty
recordingGroup,
                               Key -> RecordingModeProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RecordingMode" (RecordingModeProperty -> (Key, Value))
-> Maybe RecordingModeProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RecordingModeProperty
recordingMode]))}
instance JSON.ToJSON ConfigurationRecorder where
  toJSON :: ConfigurationRecorder -> Value
toJSON ConfigurationRecorder {Maybe (Value Text)
Maybe RecordingModeProperty
Maybe RecordingGroupProperty
()
Value Text
haddock_workaround_ :: ConfigurationRecorder -> ()
name :: ConfigurationRecorder -> Maybe (Value Text)
recordingGroup :: ConfigurationRecorder -> Maybe RecordingGroupProperty
recordingMode :: ConfigurationRecorder -> Maybe RecordingModeProperty
roleARN :: ConfigurationRecorder -> Value Text
haddock_workaround_ :: ()
name :: Maybe (Value Text)
recordingGroup :: Maybe RecordingGroupProperty
recordingMode :: Maybe RecordingModeProperty
roleARN :: Value Text
..}
    = [(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
"RoleARN" 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
roleARN]
              ([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
"Name" (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)
name,
                  Key -> RecordingGroupProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RecordingGroup" (RecordingGroupProperty -> (Key, Value))
-> Maybe RecordingGroupProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RecordingGroupProperty
recordingGroup,
                  Key -> RecordingModeProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RecordingMode" (RecordingModeProperty -> (Key, Value))
-> Maybe RecordingModeProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RecordingModeProperty
recordingMode])))
instance Property "Name" ConfigurationRecorder where
  type PropertyType "Name" ConfigurationRecorder = Value Prelude.Text
  set :: PropertyType "Name" ConfigurationRecorder
-> ConfigurationRecorder -> ConfigurationRecorder
set PropertyType "Name" ConfigurationRecorder
newValue ConfigurationRecorder {Maybe (Value Text)
Maybe RecordingModeProperty
Maybe RecordingGroupProperty
()
Value Text
haddock_workaround_ :: ConfigurationRecorder -> ()
name :: ConfigurationRecorder -> Maybe (Value Text)
recordingGroup :: ConfigurationRecorder -> Maybe RecordingGroupProperty
recordingMode :: ConfigurationRecorder -> Maybe RecordingModeProperty
roleARN :: ConfigurationRecorder -> Value Text
haddock_workaround_ :: ()
name :: Maybe (Value Text)
recordingGroup :: Maybe RecordingGroupProperty
recordingMode :: Maybe RecordingModeProperty
roleARN :: Value Text
..}
    = ConfigurationRecorder {name :: Maybe (Value Text)
name = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Name" ConfigurationRecorder
Value Text
newValue, Maybe RecordingModeProperty
Maybe RecordingGroupProperty
()
Value Text
haddock_workaround_ :: ()
recordingGroup :: Maybe RecordingGroupProperty
recordingMode :: Maybe RecordingModeProperty
roleARN :: Value Text
haddock_workaround_ :: ()
recordingGroup :: Maybe RecordingGroupProperty
recordingMode :: Maybe RecordingModeProperty
roleARN :: Value Text
..}
instance Property "RecordingGroup" ConfigurationRecorder where
  type PropertyType "RecordingGroup" ConfigurationRecorder = RecordingGroupProperty
  set :: PropertyType "RecordingGroup" ConfigurationRecorder
-> ConfigurationRecorder -> ConfigurationRecorder
set PropertyType "RecordingGroup" ConfigurationRecorder
newValue ConfigurationRecorder {Maybe (Value Text)
Maybe RecordingModeProperty
Maybe RecordingGroupProperty
()
Value Text
haddock_workaround_ :: ConfigurationRecorder -> ()
name :: ConfigurationRecorder -> Maybe (Value Text)
recordingGroup :: ConfigurationRecorder -> Maybe RecordingGroupProperty
recordingMode :: ConfigurationRecorder -> Maybe RecordingModeProperty
roleARN :: ConfigurationRecorder -> Value Text
haddock_workaround_ :: ()
name :: Maybe (Value Text)
recordingGroup :: Maybe RecordingGroupProperty
recordingMode :: Maybe RecordingModeProperty
roleARN :: Value Text
..}
    = ConfigurationRecorder
        {recordingGroup :: Maybe RecordingGroupProperty
recordingGroup = RecordingGroupProperty -> Maybe RecordingGroupProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RecordingGroup" ConfigurationRecorder
RecordingGroupProperty
newValue, Maybe (Value Text)
Maybe RecordingModeProperty
()
Value Text
haddock_workaround_ :: ()
name :: Maybe (Value Text)
recordingMode :: Maybe RecordingModeProperty
roleARN :: Value Text
haddock_workaround_ :: ()
name :: Maybe (Value Text)
recordingMode :: Maybe RecordingModeProperty
roleARN :: Value Text
..}
instance Property "RecordingMode" ConfigurationRecorder where
  type PropertyType "RecordingMode" ConfigurationRecorder = RecordingModeProperty
  set :: PropertyType "RecordingMode" ConfigurationRecorder
-> ConfigurationRecorder -> ConfigurationRecorder
set PropertyType "RecordingMode" ConfigurationRecorder
newValue ConfigurationRecorder {Maybe (Value Text)
Maybe RecordingModeProperty
Maybe RecordingGroupProperty
()
Value Text
haddock_workaround_ :: ConfigurationRecorder -> ()
name :: ConfigurationRecorder -> Maybe (Value Text)
recordingGroup :: ConfigurationRecorder -> Maybe RecordingGroupProperty
recordingMode :: ConfigurationRecorder -> Maybe RecordingModeProperty
roleARN :: ConfigurationRecorder -> Value Text
haddock_workaround_ :: ()
name :: Maybe (Value Text)
recordingGroup :: Maybe RecordingGroupProperty
recordingMode :: Maybe RecordingModeProperty
roleARN :: Value Text
..}
    = ConfigurationRecorder {recordingMode :: Maybe RecordingModeProperty
recordingMode = RecordingModeProperty -> Maybe RecordingModeProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RecordingMode" ConfigurationRecorder
RecordingModeProperty
newValue, Maybe (Value Text)
Maybe RecordingGroupProperty
()
Value Text
haddock_workaround_ :: ()
name :: Maybe (Value Text)
recordingGroup :: Maybe RecordingGroupProperty
roleARN :: Value Text
haddock_workaround_ :: ()
name :: Maybe (Value Text)
recordingGroup :: Maybe RecordingGroupProperty
roleARN :: Value Text
..}
instance Property "RoleARN" ConfigurationRecorder where
  type PropertyType "RoleARN" ConfigurationRecorder = Value Prelude.Text
  set :: PropertyType "RoleARN" ConfigurationRecorder
-> ConfigurationRecorder -> ConfigurationRecorder
set PropertyType "RoleARN" ConfigurationRecorder
newValue ConfigurationRecorder {Maybe (Value Text)
Maybe RecordingModeProperty
Maybe RecordingGroupProperty
()
Value Text
haddock_workaround_ :: ConfigurationRecorder -> ()
name :: ConfigurationRecorder -> Maybe (Value Text)
recordingGroup :: ConfigurationRecorder -> Maybe RecordingGroupProperty
recordingMode :: ConfigurationRecorder -> Maybe RecordingModeProperty
roleARN :: ConfigurationRecorder -> Value Text
haddock_workaround_ :: ()
name :: Maybe (Value Text)
recordingGroup :: Maybe RecordingGroupProperty
recordingMode :: Maybe RecordingModeProperty
roleARN :: Value Text
..}
    = ConfigurationRecorder {roleARN :: Value Text
roleARN = PropertyType "RoleARN" ConfigurationRecorder
Value Text
newValue, Maybe (Value Text)
Maybe RecordingModeProperty
Maybe RecordingGroupProperty
()
haddock_workaround_ :: ()
name :: Maybe (Value Text)
recordingGroup :: Maybe RecordingGroupProperty
recordingMode :: Maybe RecordingModeProperty
haddock_workaround_ :: ()
name :: Maybe (Value Text)
recordingGroup :: Maybe RecordingGroupProperty
recordingMode :: Maybe RecordingModeProperty
..}