module Stratosphere.QBusiness.Permission (
module Exports, Permission(..), mkPermission
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.QBusiness.Permission.ConditionProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Permission
=
Permission {Permission -> ()
haddock_workaround_ :: (),
Permission -> ValueList Text
actions :: (ValueList Prelude.Text),
Permission -> Value Text
applicationId :: (Value Prelude.Text),
Permission -> Maybe [ConditionProperty]
conditions :: (Prelude.Maybe [ConditionProperty]),
Permission -> Value Text
principal :: (Value Prelude.Text),
Permission -> Value Text
statementId :: (Value Prelude.Text)}
deriving stock (Permission -> Permission -> Bool
(Permission -> Permission -> Bool)
-> (Permission -> Permission -> Bool) -> Eq Permission
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Permission -> Permission -> Bool
== :: Permission -> Permission -> Bool
$c/= :: Permission -> Permission -> Bool
/= :: Permission -> Permission -> Bool
Prelude.Eq, Int -> Permission -> ShowS
[Permission] -> ShowS
Permission -> String
(Int -> Permission -> ShowS)
-> (Permission -> String)
-> ([Permission] -> ShowS)
-> Show Permission
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Permission -> ShowS
showsPrec :: Int -> Permission -> ShowS
$cshow :: Permission -> String
show :: Permission -> String
$cshowList :: [Permission] -> ShowS
showList :: [Permission] -> ShowS
Prelude.Show)
mkPermission ::
ValueList Prelude.Text
-> Value Prelude.Text
-> Value Prelude.Text -> Value Prelude.Text -> Permission
mkPermission :: ValueList Text
-> Value Text -> Value Text -> Value Text -> Permission
mkPermission ValueList Text
actions Value Text
applicationId Value Text
principal Value Text
statementId
= Permission
{haddock_workaround_ :: ()
haddock_workaround_ = (), actions :: ValueList Text
actions = ValueList Text
actions,
applicationId :: Value Text
applicationId = Value Text
applicationId, principal :: Value Text
principal = Value Text
principal,
statementId :: Value Text
statementId = Value Text
statementId, conditions :: Maybe [ConditionProperty]
conditions = Maybe [ConditionProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Permission where
toResourceProperties :: Permission -> ResourceProperties
toResourceProperties Permission {Maybe [ConditionProperty]
()
ValueList Text
Value Text
haddock_workaround_ :: Permission -> ()
actions :: Permission -> ValueList Text
applicationId :: Permission -> Value Text
conditions :: Permission -> Maybe [ConditionProperty]
principal :: Permission -> Value Text
statementId :: Permission -> Value Text
haddock_workaround_ :: ()
actions :: ValueList Text
applicationId :: Value Text
conditions :: Maybe [ConditionProperty]
principal :: Value Text
statementId :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::QBusiness::Permission",
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
"Actions" Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ValueList Text
actions, Key
"ApplicationId" 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
applicationId,
Key
"Principal" 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
principal, Key
"StatementId" 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
statementId]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> [ConditionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Conditions" ([ConditionProperty] -> (Key, Value))
-> Maybe [ConditionProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ConditionProperty]
conditions]))}
instance JSON.ToJSON Permission where
toJSON :: Permission -> Value
toJSON Permission {Maybe [ConditionProperty]
()
ValueList Text
Value Text
haddock_workaround_ :: Permission -> ()
actions :: Permission -> ValueList Text
applicationId :: Permission -> Value Text
conditions :: Permission -> Maybe [ConditionProperty]
principal :: Permission -> Value Text
statementId :: Permission -> Value Text
haddock_workaround_ :: ()
actions :: ValueList Text
applicationId :: Value Text
conditions :: Maybe [ConditionProperty]
principal :: Value Text
statementId :: 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
"Actions" Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ValueList Text
actions, Key
"ApplicationId" 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
applicationId,
Key
"Principal" 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
principal, Key
"StatementId" 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
statementId]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> [ConditionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Conditions" ([ConditionProperty] -> (Key, Value))
-> Maybe [ConditionProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ConditionProperty]
conditions])))
instance Property "Actions" Permission where
type PropertyType "Actions" Permission = ValueList Prelude.Text
set :: PropertyType "Actions" Permission -> Permission -> Permission
set PropertyType "Actions" Permission
newValue Permission {Maybe [ConditionProperty]
()
ValueList Text
Value Text
haddock_workaround_ :: Permission -> ()
actions :: Permission -> ValueList Text
applicationId :: Permission -> Value Text
conditions :: Permission -> Maybe [ConditionProperty]
principal :: Permission -> Value Text
statementId :: Permission -> Value Text
haddock_workaround_ :: ()
actions :: ValueList Text
applicationId :: Value Text
conditions :: Maybe [ConditionProperty]
principal :: Value Text
statementId :: Value Text
..} = Permission {actions :: ValueList Text
actions = PropertyType "Actions" Permission
ValueList Text
newValue, Maybe [ConditionProperty]
()
Value Text
haddock_workaround_ :: ()
applicationId :: Value Text
conditions :: Maybe [ConditionProperty]
principal :: Value Text
statementId :: Value Text
haddock_workaround_ :: ()
applicationId :: Value Text
conditions :: Maybe [ConditionProperty]
principal :: Value Text
statementId :: Value Text
..}
instance Property "ApplicationId" Permission where
type PropertyType "ApplicationId" Permission = Value Prelude.Text
set :: PropertyType "ApplicationId" Permission -> Permission -> Permission
set PropertyType "ApplicationId" Permission
newValue Permission {Maybe [ConditionProperty]
()
ValueList Text
Value Text
haddock_workaround_ :: Permission -> ()
actions :: Permission -> ValueList Text
applicationId :: Permission -> Value Text
conditions :: Permission -> Maybe [ConditionProperty]
principal :: Permission -> Value Text
statementId :: Permission -> Value Text
haddock_workaround_ :: ()
actions :: ValueList Text
applicationId :: Value Text
conditions :: Maybe [ConditionProperty]
principal :: Value Text
statementId :: Value Text
..}
= Permission {applicationId :: Value Text
applicationId = PropertyType "ApplicationId" Permission
Value Text
newValue, Maybe [ConditionProperty]
()
ValueList Text
Value Text
haddock_workaround_ :: ()
actions :: ValueList Text
conditions :: Maybe [ConditionProperty]
principal :: Value Text
statementId :: Value Text
haddock_workaround_ :: ()
actions :: ValueList Text
conditions :: Maybe [ConditionProperty]
principal :: Value Text
statementId :: Value Text
..}
instance Property "Conditions" Permission where
type PropertyType "Conditions" Permission = [ConditionProperty]
set :: PropertyType "Conditions" Permission -> Permission -> Permission
set PropertyType "Conditions" Permission
newValue Permission {Maybe [ConditionProperty]
()
ValueList Text
Value Text
haddock_workaround_ :: Permission -> ()
actions :: Permission -> ValueList Text
applicationId :: Permission -> Value Text
conditions :: Permission -> Maybe [ConditionProperty]
principal :: Permission -> Value Text
statementId :: Permission -> Value Text
haddock_workaround_ :: ()
actions :: ValueList Text
applicationId :: Value Text
conditions :: Maybe [ConditionProperty]
principal :: Value Text
statementId :: Value Text
..}
= Permission {conditions :: Maybe [ConditionProperty]
conditions = [ConditionProperty] -> Maybe [ConditionProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [ConditionProperty]
PropertyType "Conditions" Permission
newValue, ()
ValueList Text
Value Text
haddock_workaround_ :: ()
actions :: ValueList Text
applicationId :: Value Text
principal :: Value Text
statementId :: Value Text
haddock_workaround_ :: ()
actions :: ValueList Text
applicationId :: Value Text
principal :: Value Text
statementId :: Value Text
..}
instance Property "Principal" Permission where
type PropertyType "Principal" Permission = Value Prelude.Text
set :: PropertyType "Principal" Permission -> Permission -> Permission
set PropertyType "Principal" Permission
newValue Permission {Maybe [ConditionProperty]
()
ValueList Text
Value Text
haddock_workaround_ :: Permission -> ()
actions :: Permission -> ValueList Text
applicationId :: Permission -> Value Text
conditions :: Permission -> Maybe [ConditionProperty]
principal :: Permission -> Value Text
statementId :: Permission -> Value Text
haddock_workaround_ :: ()
actions :: ValueList Text
applicationId :: Value Text
conditions :: Maybe [ConditionProperty]
principal :: Value Text
statementId :: Value Text
..}
= Permission {principal :: Value Text
principal = PropertyType "Principal" Permission
Value Text
newValue, Maybe [ConditionProperty]
()
ValueList Text
Value Text
haddock_workaround_ :: ()
actions :: ValueList Text
applicationId :: Value Text
conditions :: Maybe [ConditionProperty]
statementId :: Value Text
haddock_workaround_ :: ()
actions :: ValueList Text
applicationId :: Value Text
conditions :: Maybe [ConditionProperty]
statementId :: Value Text
..}
instance Property "StatementId" Permission where
type PropertyType "StatementId" Permission = Value Prelude.Text
set :: PropertyType "StatementId" Permission -> Permission -> Permission
set PropertyType "StatementId" Permission
newValue Permission {Maybe [ConditionProperty]
()
ValueList Text
Value Text
haddock_workaround_ :: Permission -> ()
actions :: Permission -> ValueList Text
applicationId :: Permission -> Value Text
conditions :: Permission -> Maybe [ConditionProperty]
principal :: Permission -> Value Text
statementId :: Permission -> Value Text
haddock_workaround_ :: ()
actions :: ValueList Text
applicationId :: Value Text
conditions :: Maybe [ConditionProperty]
principal :: Value Text
statementId :: Value Text
..}
= Permission {statementId :: Value Text
statementId = PropertyType "StatementId" Permission
Value Text
newValue, Maybe [ConditionProperty]
()
ValueList Text
Value Text
haddock_workaround_ :: ()
actions :: ValueList Text
applicationId :: Value Text
conditions :: Maybe [ConditionProperty]
principal :: Value Text
haddock_workaround_ :: ()
actions :: ValueList Text
applicationId :: Value Text
conditions :: Maybe [ConditionProperty]
principal :: Value Text
..}