module Stratosphere.IoT.AccountAuditConfiguration (
        module Exports, AccountAuditConfiguration(..),
        mkAccountAuditConfiguration
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.IoT.AccountAuditConfiguration.AuditCheckConfigurationsProperty as Exports
import {-# SOURCE #-} Stratosphere.IoT.AccountAuditConfiguration.AuditNotificationTargetConfigurationsProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AccountAuditConfiguration
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-accountauditconfiguration.html>
    AccountAuditConfiguration {AccountAuditConfiguration -> ()
haddock_workaround_ :: (),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-accountauditconfiguration.html#cfn-iot-accountauditconfiguration-accountid>
                               AccountAuditConfiguration -> Value Text
accountId :: (Value Prelude.Text),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-accountauditconfiguration.html#cfn-iot-accountauditconfiguration-auditcheckconfigurations>
                               AccountAuditConfiguration -> AuditCheckConfigurationsProperty
auditCheckConfigurations :: AuditCheckConfigurationsProperty,
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-accountauditconfiguration.html#cfn-iot-accountauditconfiguration-auditnotificationtargetconfigurations>
                               AccountAuditConfiguration
-> Maybe AuditNotificationTargetConfigurationsProperty
auditNotificationTargetConfigurations :: (Prelude.Maybe AuditNotificationTargetConfigurationsProperty),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-accountauditconfiguration.html#cfn-iot-accountauditconfiguration-rolearn>
                               AccountAuditConfiguration -> Value Text
roleArn :: (Value Prelude.Text)}
  deriving stock (AccountAuditConfiguration -> AccountAuditConfiguration -> Bool
(AccountAuditConfiguration -> AccountAuditConfiguration -> Bool)
-> (AccountAuditConfiguration -> AccountAuditConfiguration -> Bool)
-> Eq AccountAuditConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AccountAuditConfiguration -> AccountAuditConfiguration -> Bool
== :: AccountAuditConfiguration -> AccountAuditConfiguration -> Bool
$c/= :: AccountAuditConfiguration -> AccountAuditConfiguration -> Bool
/= :: AccountAuditConfiguration -> AccountAuditConfiguration -> Bool
Prelude.Eq, Int -> AccountAuditConfiguration -> ShowS
[AccountAuditConfiguration] -> ShowS
AccountAuditConfiguration -> String
(Int -> AccountAuditConfiguration -> ShowS)
-> (AccountAuditConfiguration -> String)
-> ([AccountAuditConfiguration] -> ShowS)
-> Show AccountAuditConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AccountAuditConfiguration -> ShowS
showsPrec :: Int -> AccountAuditConfiguration -> ShowS
$cshow :: AccountAuditConfiguration -> String
show :: AccountAuditConfiguration -> String
$cshowList :: [AccountAuditConfiguration] -> ShowS
showList :: [AccountAuditConfiguration] -> ShowS
Prelude.Show)
mkAccountAuditConfiguration ::
  Value Prelude.Text
  -> AuditCheckConfigurationsProperty
     -> Value Prelude.Text -> AccountAuditConfiguration
mkAccountAuditConfiguration :: Value Text
-> AuditCheckConfigurationsProperty
-> Value Text
-> AccountAuditConfiguration
mkAccountAuditConfiguration
  Value Text
accountId
  AuditCheckConfigurationsProperty
auditCheckConfigurations
  Value Text
roleArn
  = AccountAuditConfiguration
      {haddock_workaround_ :: ()
haddock_workaround_ = (), accountId :: Value Text
accountId = Value Text
accountId,
       auditCheckConfigurations :: AuditCheckConfigurationsProperty
auditCheckConfigurations = AuditCheckConfigurationsProperty
auditCheckConfigurations,
       roleArn :: Value Text
roleArn = Value Text
roleArn,
       auditNotificationTargetConfigurations :: Maybe AuditNotificationTargetConfigurationsProperty
auditNotificationTargetConfigurations = Maybe AuditNotificationTargetConfigurationsProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AccountAuditConfiguration where
  toResourceProperties :: AccountAuditConfiguration -> ResourceProperties
toResourceProperties AccountAuditConfiguration {Maybe AuditNotificationTargetConfigurationsProperty
()
Value Text
AuditCheckConfigurationsProperty
haddock_workaround_ :: AccountAuditConfiguration -> ()
accountId :: AccountAuditConfiguration -> Value Text
auditCheckConfigurations :: AccountAuditConfiguration -> AuditCheckConfigurationsProperty
auditNotificationTargetConfigurations :: AccountAuditConfiguration
-> Maybe AuditNotificationTargetConfigurationsProperty
roleArn :: AccountAuditConfiguration -> Value Text
haddock_workaround_ :: ()
accountId :: Value Text
auditCheckConfigurations :: AuditCheckConfigurationsProperty
auditNotificationTargetConfigurations :: Maybe AuditNotificationTargetConfigurationsProperty
roleArn :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::IoT::AccountAuditConfiguration",
         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
"AccountId" 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
accountId,
                            Key
"AuditCheckConfigurations" Key -> AuditCheckConfigurationsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= AuditCheckConfigurationsProperty
auditCheckConfigurations,
                            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
-> AuditNotificationTargetConfigurationsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AuditNotificationTargetConfigurations"
                                 (AuditNotificationTargetConfigurationsProperty -> (Key, Value))
-> Maybe AuditNotificationTargetConfigurationsProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AuditNotificationTargetConfigurationsProperty
auditNotificationTargetConfigurations]))}
instance JSON.ToJSON AccountAuditConfiguration where
  toJSON :: AccountAuditConfiguration -> Value
toJSON AccountAuditConfiguration {Maybe AuditNotificationTargetConfigurationsProperty
()
Value Text
AuditCheckConfigurationsProperty
haddock_workaround_ :: AccountAuditConfiguration -> ()
accountId :: AccountAuditConfiguration -> Value Text
auditCheckConfigurations :: AccountAuditConfiguration -> AuditCheckConfigurationsProperty
auditNotificationTargetConfigurations :: AccountAuditConfiguration
-> Maybe AuditNotificationTargetConfigurationsProperty
roleArn :: AccountAuditConfiguration -> Value Text
haddock_workaround_ :: ()
accountId :: Value Text
auditCheckConfigurations :: AuditCheckConfigurationsProperty
auditNotificationTargetConfigurations :: Maybe AuditNotificationTargetConfigurationsProperty
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
"AccountId" 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
accountId,
               Key
"AuditCheckConfigurations" Key -> AuditCheckConfigurationsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= AuditCheckConfigurationsProperty
auditCheckConfigurations,
               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
-> AuditNotificationTargetConfigurationsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AuditNotificationTargetConfigurations"
                    (AuditNotificationTargetConfigurationsProperty -> (Key, Value))
-> Maybe AuditNotificationTargetConfigurationsProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AuditNotificationTargetConfigurationsProperty
auditNotificationTargetConfigurations])))
instance Property "AccountId" AccountAuditConfiguration where
  type PropertyType "AccountId" AccountAuditConfiguration = Value Prelude.Text
  set :: PropertyType "AccountId" AccountAuditConfiguration
-> AccountAuditConfiguration -> AccountAuditConfiguration
set PropertyType "AccountId" AccountAuditConfiguration
newValue AccountAuditConfiguration {Maybe AuditNotificationTargetConfigurationsProperty
()
Value Text
AuditCheckConfigurationsProperty
haddock_workaround_ :: AccountAuditConfiguration -> ()
accountId :: AccountAuditConfiguration -> Value Text
auditCheckConfigurations :: AccountAuditConfiguration -> AuditCheckConfigurationsProperty
auditNotificationTargetConfigurations :: AccountAuditConfiguration
-> Maybe AuditNotificationTargetConfigurationsProperty
roleArn :: AccountAuditConfiguration -> Value Text
haddock_workaround_ :: ()
accountId :: Value Text
auditCheckConfigurations :: AuditCheckConfigurationsProperty
auditNotificationTargetConfigurations :: Maybe AuditNotificationTargetConfigurationsProperty
roleArn :: Value Text
..}
    = AccountAuditConfiguration {accountId :: Value Text
accountId = PropertyType "AccountId" AccountAuditConfiguration
Value Text
newValue, Maybe AuditNotificationTargetConfigurationsProperty
()
Value Text
AuditCheckConfigurationsProperty
haddock_workaround_ :: ()
auditCheckConfigurations :: AuditCheckConfigurationsProperty
auditNotificationTargetConfigurations :: Maybe AuditNotificationTargetConfigurationsProperty
roleArn :: Value Text
haddock_workaround_ :: ()
auditCheckConfigurations :: AuditCheckConfigurationsProperty
auditNotificationTargetConfigurations :: Maybe AuditNotificationTargetConfigurationsProperty
roleArn :: Value Text
..}
instance Property "AuditCheckConfigurations" AccountAuditConfiguration where
  type PropertyType "AuditCheckConfigurations" AccountAuditConfiguration = AuditCheckConfigurationsProperty
  set :: PropertyType "AuditCheckConfigurations" AccountAuditConfiguration
-> AccountAuditConfiguration -> AccountAuditConfiguration
set PropertyType "AuditCheckConfigurations" AccountAuditConfiguration
newValue AccountAuditConfiguration {Maybe AuditNotificationTargetConfigurationsProperty
()
Value Text
AuditCheckConfigurationsProperty
haddock_workaround_ :: AccountAuditConfiguration -> ()
accountId :: AccountAuditConfiguration -> Value Text
auditCheckConfigurations :: AccountAuditConfiguration -> AuditCheckConfigurationsProperty
auditNotificationTargetConfigurations :: AccountAuditConfiguration
-> Maybe AuditNotificationTargetConfigurationsProperty
roleArn :: AccountAuditConfiguration -> Value Text
haddock_workaround_ :: ()
accountId :: Value Text
auditCheckConfigurations :: AuditCheckConfigurationsProperty
auditNotificationTargetConfigurations :: Maybe AuditNotificationTargetConfigurationsProperty
roleArn :: Value Text
..}
    = AccountAuditConfiguration
        {auditCheckConfigurations :: AuditCheckConfigurationsProperty
auditCheckConfigurations = PropertyType "AuditCheckConfigurations" AccountAuditConfiguration
AuditCheckConfigurationsProperty
newValue, Maybe AuditNotificationTargetConfigurationsProperty
()
Value Text
haddock_workaround_ :: ()
accountId :: Value Text
auditNotificationTargetConfigurations :: Maybe AuditNotificationTargetConfigurationsProperty
roleArn :: Value Text
haddock_workaround_ :: ()
accountId :: Value Text
auditNotificationTargetConfigurations :: Maybe AuditNotificationTargetConfigurationsProperty
roleArn :: Value Text
..}
instance Property "AuditNotificationTargetConfigurations" AccountAuditConfiguration where
  type PropertyType "AuditNotificationTargetConfigurations" AccountAuditConfiguration = AuditNotificationTargetConfigurationsProperty
  set :: PropertyType
  "AuditNotificationTargetConfigurations" AccountAuditConfiguration
-> AccountAuditConfiguration -> AccountAuditConfiguration
set PropertyType
  "AuditNotificationTargetConfigurations" AccountAuditConfiguration
newValue AccountAuditConfiguration {Maybe AuditNotificationTargetConfigurationsProperty
()
Value Text
AuditCheckConfigurationsProperty
haddock_workaround_ :: AccountAuditConfiguration -> ()
accountId :: AccountAuditConfiguration -> Value Text
auditCheckConfigurations :: AccountAuditConfiguration -> AuditCheckConfigurationsProperty
auditNotificationTargetConfigurations :: AccountAuditConfiguration
-> Maybe AuditNotificationTargetConfigurationsProperty
roleArn :: AccountAuditConfiguration -> Value Text
haddock_workaround_ :: ()
accountId :: Value Text
auditCheckConfigurations :: AuditCheckConfigurationsProperty
auditNotificationTargetConfigurations :: Maybe AuditNotificationTargetConfigurationsProperty
roleArn :: Value Text
..}
    = AccountAuditConfiguration
        {auditNotificationTargetConfigurations :: Maybe AuditNotificationTargetConfigurationsProperty
auditNotificationTargetConfigurations = AuditNotificationTargetConfigurationsProperty
-> Maybe AuditNotificationTargetConfigurationsProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "AuditNotificationTargetConfigurations" AccountAuditConfiguration
AuditNotificationTargetConfigurationsProperty
newValue, ()
Value Text
AuditCheckConfigurationsProperty
haddock_workaround_ :: ()
accountId :: Value Text
auditCheckConfigurations :: AuditCheckConfigurationsProperty
roleArn :: Value Text
haddock_workaround_ :: ()
accountId :: Value Text
auditCheckConfigurations :: AuditCheckConfigurationsProperty
roleArn :: Value Text
..}
instance Property "RoleArn" AccountAuditConfiguration where
  type PropertyType "RoleArn" AccountAuditConfiguration = Value Prelude.Text
  set :: PropertyType "RoleArn" AccountAuditConfiguration
-> AccountAuditConfiguration -> AccountAuditConfiguration
set PropertyType "RoleArn" AccountAuditConfiguration
newValue AccountAuditConfiguration {Maybe AuditNotificationTargetConfigurationsProperty
()
Value Text
AuditCheckConfigurationsProperty
haddock_workaround_ :: AccountAuditConfiguration -> ()
accountId :: AccountAuditConfiguration -> Value Text
auditCheckConfigurations :: AccountAuditConfiguration -> AuditCheckConfigurationsProperty
auditNotificationTargetConfigurations :: AccountAuditConfiguration
-> Maybe AuditNotificationTargetConfigurationsProperty
roleArn :: AccountAuditConfiguration -> Value Text
haddock_workaround_ :: ()
accountId :: Value Text
auditCheckConfigurations :: AuditCheckConfigurationsProperty
auditNotificationTargetConfigurations :: Maybe AuditNotificationTargetConfigurationsProperty
roleArn :: Value Text
..}
    = AccountAuditConfiguration {roleArn :: Value Text
roleArn = PropertyType "RoleArn" AccountAuditConfiguration
Value Text
newValue, Maybe AuditNotificationTargetConfigurationsProperty
()
Value Text
AuditCheckConfigurationsProperty
haddock_workaround_ :: ()
accountId :: Value Text
auditCheckConfigurations :: AuditCheckConfigurationsProperty
auditNotificationTargetConfigurations :: Maybe AuditNotificationTargetConfigurationsProperty
haddock_workaround_ :: ()
accountId :: Value Text
auditCheckConfigurations :: AuditCheckConfigurationsProperty
auditNotificationTargetConfigurations :: Maybe AuditNotificationTargetConfigurationsProperty
..}