module Stratosphere.IoT.AccountAuditConfiguration.AuditNotificationTargetProperty (
AuditNotificationTargetProperty(..),
mkAuditNotificationTargetProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AuditNotificationTargetProperty
=
AuditNotificationTargetProperty {AuditNotificationTargetProperty -> ()
haddock_workaround_ :: (),
AuditNotificationTargetProperty -> Maybe (Value Bool)
enabled :: (Prelude.Maybe (Value Prelude.Bool)),
AuditNotificationTargetProperty -> Maybe (Value Text)
roleArn :: (Prelude.Maybe (Value Prelude.Text)),
AuditNotificationTargetProperty -> Maybe (Value Text)
targetArn :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (AuditNotificationTargetProperty
-> AuditNotificationTargetProperty -> Bool
(AuditNotificationTargetProperty
-> AuditNotificationTargetProperty -> Bool)
-> (AuditNotificationTargetProperty
-> AuditNotificationTargetProperty -> Bool)
-> Eq AuditNotificationTargetProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AuditNotificationTargetProperty
-> AuditNotificationTargetProperty -> Bool
== :: AuditNotificationTargetProperty
-> AuditNotificationTargetProperty -> Bool
$c/= :: AuditNotificationTargetProperty
-> AuditNotificationTargetProperty -> Bool
/= :: AuditNotificationTargetProperty
-> AuditNotificationTargetProperty -> Bool
Prelude.Eq, Int -> AuditNotificationTargetProperty -> ShowS
[AuditNotificationTargetProperty] -> ShowS
AuditNotificationTargetProperty -> String
(Int -> AuditNotificationTargetProperty -> ShowS)
-> (AuditNotificationTargetProperty -> String)
-> ([AuditNotificationTargetProperty] -> ShowS)
-> Show AuditNotificationTargetProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AuditNotificationTargetProperty -> ShowS
showsPrec :: Int -> AuditNotificationTargetProperty -> ShowS
$cshow :: AuditNotificationTargetProperty -> String
show :: AuditNotificationTargetProperty -> String
$cshowList :: [AuditNotificationTargetProperty] -> ShowS
showList :: [AuditNotificationTargetProperty] -> ShowS
Prelude.Show)
mkAuditNotificationTargetProperty ::
AuditNotificationTargetProperty
mkAuditNotificationTargetProperty :: AuditNotificationTargetProperty
mkAuditNotificationTargetProperty
= AuditNotificationTargetProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), enabled :: Maybe (Value Bool)
enabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
roleArn :: Maybe (Value Text)
roleArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, targetArn :: Maybe (Value Text)
targetArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AuditNotificationTargetProperty where
toResourceProperties :: AuditNotificationTargetProperty -> ResourceProperties
toResourceProperties AuditNotificationTargetProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: AuditNotificationTargetProperty -> ()
enabled :: AuditNotificationTargetProperty -> Maybe (Value Bool)
roleArn :: AuditNotificationTargetProperty -> Maybe (Value Text)
targetArn :: AuditNotificationTargetProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
roleArn :: Maybe (Value Text)
targetArn :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::IoT::AccountAuditConfiguration.AuditNotificationTarget",
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
"Enabled" (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)
enabled,
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
"RoleArn" (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)
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..=) Key
"TargetArn" (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)
targetArn])}
instance JSON.ToJSON AuditNotificationTargetProperty where
toJSON :: AuditNotificationTargetProperty -> Value
toJSON AuditNotificationTargetProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: AuditNotificationTargetProperty -> ()
enabled :: AuditNotificationTargetProperty -> Maybe (Value Bool)
roleArn :: AuditNotificationTargetProperty -> Maybe (Value Text)
targetArn :: AuditNotificationTargetProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
roleArn :: Maybe (Value Text)
targetArn :: 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
"Enabled" (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)
enabled,
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
"RoleArn" (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)
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..=) Key
"TargetArn" (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)
targetArn]))
instance Property "Enabled" AuditNotificationTargetProperty where
type PropertyType "Enabled" AuditNotificationTargetProperty = Value Prelude.Bool
set :: PropertyType "Enabled" AuditNotificationTargetProperty
-> AuditNotificationTargetProperty
-> AuditNotificationTargetProperty
set PropertyType "Enabled" AuditNotificationTargetProperty
newValue AuditNotificationTargetProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: AuditNotificationTargetProperty -> ()
enabled :: AuditNotificationTargetProperty -> Maybe (Value Bool)
roleArn :: AuditNotificationTargetProperty -> Maybe (Value Text)
targetArn :: AuditNotificationTargetProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
roleArn :: Maybe (Value Text)
targetArn :: Maybe (Value Text)
..}
= AuditNotificationTargetProperty
{enabled :: Maybe (Value Bool)
enabled = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Enabled" AuditNotificationTargetProperty
Value Bool
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
roleArn :: Maybe (Value Text)
targetArn :: Maybe (Value Text)
haddock_workaround_ :: ()
roleArn :: Maybe (Value Text)
targetArn :: Maybe (Value Text)
..}
instance Property "RoleArn" AuditNotificationTargetProperty where
type PropertyType "RoleArn" AuditNotificationTargetProperty = Value Prelude.Text
set :: PropertyType "RoleArn" AuditNotificationTargetProperty
-> AuditNotificationTargetProperty
-> AuditNotificationTargetProperty
set PropertyType "RoleArn" AuditNotificationTargetProperty
newValue AuditNotificationTargetProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: AuditNotificationTargetProperty -> ()
enabled :: AuditNotificationTargetProperty -> Maybe (Value Bool)
roleArn :: AuditNotificationTargetProperty -> Maybe (Value Text)
targetArn :: AuditNotificationTargetProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
roleArn :: Maybe (Value Text)
targetArn :: Maybe (Value Text)
..}
= AuditNotificationTargetProperty
{roleArn :: Maybe (Value Text)
roleArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RoleArn" AuditNotificationTargetProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
targetArn :: Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
targetArn :: Maybe (Value Text)
..}
instance Property "TargetArn" AuditNotificationTargetProperty where
type PropertyType "TargetArn" AuditNotificationTargetProperty = Value Prelude.Text
set :: PropertyType "TargetArn" AuditNotificationTargetProperty
-> AuditNotificationTargetProperty
-> AuditNotificationTargetProperty
set PropertyType "TargetArn" AuditNotificationTargetProperty
newValue AuditNotificationTargetProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: AuditNotificationTargetProperty -> ()
enabled :: AuditNotificationTargetProperty -> Maybe (Value Bool)
roleArn :: AuditNotificationTargetProperty -> Maybe (Value Text)
targetArn :: AuditNotificationTargetProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
roleArn :: Maybe (Value Text)
targetArn :: Maybe (Value Text)
..}
= AuditNotificationTargetProperty
{targetArn :: Maybe (Value Text)
targetArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TargetArn" AuditNotificationTargetProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
roleArn :: Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
roleArn :: Maybe (Value Text)
..}