module Stratosphere.AuditManager.Assessment.ScopeProperty (
module Exports, ScopeProperty(..), mkScopeProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.AuditManager.Assessment.AWSAccountProperty as Exports
import {-# SOURCE #-} Stratosphere.AuditManager.Assessment.AWSServiceProperty as Exports
import Stratosphere.ResourceProperties
data ScopeProperty
=
ScopeProperty {ScopeProperty -> ()
haddock_workaround_ :: (),
ScopeProperty -> Maybe [AWSAccountProperty]
awsAccounts :: (Prelude.Maybe [AWSAccountProperty]),
ScopeProperty -> Maybe [AWSServiceProperty]
awsServices :: (Prelude.Maybe [AWSServiceProperty])}
deriving stock (ScopeProperty -> ScopeProperty -> Bool
(ScopeProperty -> ScopeProperty -> Bool)
-> (ScopeProperty -> ScopeProperty -> Bool) -> Eq ScopeProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ScopeProperty -> ScopeProperty -> Bool
== :: ScopeProperty -> ScopeProperty -> Bool
$c/= :: ScopeProperty -> ScopeProperty -> Bool
/= :: ScopeProperty -> ScopeProperty -> Bool
Prelude.Eq, Int -> ScopeProperty -> ShowS
[ScopeProperty] -> ShowS
ScopeProperty -> String
(Int -> ScopeProperty -> ShowS)
-> (ScopeProperty -> String)
-> ([ScopeProperty] -> ShowS)
-> Show ScopeProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ScopeProperty -> ShowS
showsPrec :: Int -> ScopeProperty -> ShowS
$cshow :: ScopeProperty -> String
show :: ScopeProperty -> String
$cshowList :: [ScopeProperty] -> ShowS
showList :: [ScopeProperty] -> ShowS
Prelude.Show)
mkScopeProperty :: ScopeProperty
mkScopeProperty :: ScopeProperty
mkScopeProperty
= ScopeProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), awsAccounts :: Maybe [AWSAccountProperty]
awsAccounts = Maybe [AWSAccountProperty]
forall a. Maybe a
Prelude.Nothing,
awsServices :: Maybe [AWSServiceProperty]
awsServices = Maybe [AWSServiceProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ScopeProperty where
toResourceProperties :: ScopeProperty -> ResourceProperties
toResourceProperties ScopeProperty {Maybe [AWSAccountProperty]
Maybe [AWSServiceProperty]
()
haddock_workaround_ :: ScopeProperty -> ()
awsAccounts :: ScopeProperty -> Maybe [AWSAccountProperty]
awsServices :: ScopeProperty -> Maybe [AWSServiceProperty]
haddock_workaround_ :: ()
awsAccounts :: Maybe [AWSAccountProperty]
awsServices :: Maybe [AWSServiceProperty]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::AuditManager::Assessment.Scope",
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 -> [AWSAccountProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AwsAccounts" ([AWSAccountProperty] -> (Key, Value))
-> Maybe [AWSAccountProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AWSAccountProperty]
awsAccounts,
Key -> [AWSServiceProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AwsServices" ([AWSServiceProperty] -> (Key, Value))
-> Maybe [AWSServiceProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AWSServiceProperty]
awsServices])}
instance JSON.ToJSON ScopeProperty where
toJSON :: ScopeProperty -> Value
toJSON ScopeProperty {Maybe [AWSAccountProperty]
Maybe [AWSServiceProperty]
()
haddock_workaround_ :: ScopeProperty -> ()
awsAccounts :: ScopeProperty -> Maybe [AWSAccountProperty]
awsServices :: ScopeProperty -> Maybe [AWSServiceProperty]
haddock_workaround_ :: ()
awsAccounts :: Maybe [AWSAccountProperty]
awsServices :: Maybe [AWSServiceProperty]
..}
= [(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 -> [AWSAccountProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AwsAccounts" ([AWSAccountProperty] -> (Key, Value))
-> Maybe [AWSAccountProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AWSAccountProperty]
awsAccounts,
Key -> [AWSServiceProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AwsServices" ([AWSServiceProperty] -> (Key, Value))
-> Maybe [AWSServiceProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AWSServiceProperty]
awsServices]))
instance Property "AwsAccounts" ScopeProperty where
type PropertyType "AwsAccounts" ScopeProperty = [AWSAccountProperty]
set :: PropertyType "AwsAccounts" ScopeProperty
-> ScopeProperty -> ScopeProperty
set PropertyType "AwsAccounts" ScopeProperty
newValue ScopeProperty {Maybe [AWSAccountProperty]
Maybe [AWSServiceProperty]
()
haddock_workaround_ :: ScopeProperty -> ()
awsAccounts :: ScopeProperty -> Maybe [AWSAccountProperty]
awsServices :: ScopeProperty -> Maybe [AWSServiceProperty]
haddock_workaround_ :: ()
awsAccounts :: Maybe [AWSAccountProperty]
awsServices :: Maybe [AWSServiceProperty]
..}
= ScopeProperty {awsAccounts :: Maybe [AWSAccountProperty]
awsAccounts = [AWSAccountProperty] -> Maybe [AWSAccountProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [AWSAccountProperty]
PropertyType "AwsAccounts" ScopeProperty
newValue, Maybe [AWSServiceProperty]
()
haddock_workaround_ :: ()
awsServices :: Maybe [AWSServiceProperty]
haddock_workaround_ :: ()
awsServices :: Maybe [AWSServiceProperty]
..}
instance Property "AwsServices" ScopeProperty where
type PropertyType "AwsServices" ScopeProperty = [AWSServiceProperty]
set :: PropertyType "AwsServices" ScopeProperty
-> ScopeProperty -> ScopeProperty
set PropertyType "AwsServices" ScopeProperty
newValue ScopeProperty {Maybe [AWSAccountProperty]
Maybe [AWSServiceProperty]
()
haddock_workaround_ :: ScopeProperty -> ()
awsAccounts :: ScopeProperty -> Maybe [AWSAccountProperty]
awsServices :: ScopeProperty -> Maybe [AWSServiceProperty]
haddock_workaround_ :: ()
awsAccounts :: Maybe [AWSAccountProperty]
awsServices :: Maybe [AWSServiceProperty]
..}
= ScopeProperty {awsServices :: Maybe [AWSServiceProperty]
awsServices = [AWSServiceProperty] -> Maybe [AWSServiceProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [AWSServiceProperty]
PropertyType "AwsServices" ScopeProperty
newValue, Maybe [AWSAccountProperty]
()
haddock_workaround_ :: ()
awsAccounts :: Maybe [AWSAccountProperty]
haddock_workaround_ :: ()
awsAccounts :: Maybe [AWSAccountProperty]
..}