module Stratosphere.ResilienceHub.App.PermissionModelProperty (
        PermissionModelProperty(..), mkPermissionModelProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PermissionModelProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resiliencehub-app-permissionmodel.html>
    PermissionModelProperty {PermissionModelProperty -> ()
haddock_workaround_ :: (),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resiliencehub-app-permissionmodel.html#cfn-resiliencehub-app-permissionmodel-crossaccountrolearns>
                             PermissionModelProperty -> Maybe (ValueList Text)
crossAccountRoleArns :: (Prelude.Maybe (ValueList Prelude.Text)),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resiliencehub-app-permissionmodel.html#cfn-resiliencehub-app-permissionmodel-invokerrolename>
                             PermissionModelProperty -> Maybe (Value Text)
invokerRoleName :: (Prelude.Maybe (Value Prelude.Text)),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resiliencehub-app-permissionmodel.html#cfn-resiliencehub-app-permissionmodel-type>
                             PermissionModelProperty -> Value Text
type' :: (Value Prelude.Text)}
  deriving stock (PermissionModelProperty -> PermissionModelProperty -> Bool
(PermissionModelProperty -> PermissionModelProperty -> Bool)
-> (PermissionModelProperty -> PermissionModelProperty -> Bool)
-> Eq PermissionModelProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PermissionModelProperty -> PermissionModelProperty -> Bool
== :: PermissionModelProperty -> PermissionModelProperty -> Bool
$c/= :: PermissionModelProperty -> PermissionModelProperty -> Bool
/= :: PermissionModelProperty -> PermissionModelProperty -> Bool
Prelude.Eq, Int -> PermissionModelProperty -> ShowS
[PermissionModelProperty] -> ShowS
PermissionModelProperty -> String
(Int -> PermissionModelProperty -> ShowS)
-> (PermissionModelProperty -> String)
-> ([PermissionModelProperty] -> ShowS)
-> Show PermissionModelProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PermissionModelProperty -> ShowS
showsPrec :: Int -> PermissionModelProperty -> ShowS
$cshow :: PermissionModelProperty -> String
show :: PermissionModelProperty -> String
$cshowList :: [PermissionModelProperty] -> ShowS
showList :: [PermissionModelProperty] -> ShowS
Prelude.Show)
mkPermissionModelProperty ::
  Value Prelude.Text -> PermissionModelProperty
mkPermissionModelProperty :: Value Text -> PermissionModelProperty
mkPermissionModelProperty Value Text
type'
  = PermissionModelProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), type' :: Value Text
type' = Value Text
type',
       crossAccountRoleArns :: Maybe (ValueList Text)
crossAccountRoleArns = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing,
       invokerRoleName :: Maybe (Value Text)
invokerRoleName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PermissionModelProperty where
  toResourceProperties :: PermissionModelProperty -> ResourceProperties
toResourceProperties PermissionModelProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PermissionModelProperty -> ()
crossAccountRoleArns :: PermissionModelProperty -> Maybe (ValueList Text)
invokerRoleName :: PermissionModelProperty -> Maybe (Value Text)
type' :: PermissionModelProperty -> Value Text
haddock_workaround_ :: ()
crossAccountRoleArns :: Maybe (ValueList Text)
invokerRoleName :: Maybe (Value Text)
type' :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ResilienceHub::App.PermissionModel",
         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
"Type" 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
type']
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [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..=) Key
"CrossAccountRoleArns" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
crossAccountRoleArns,
                               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
"InvokerRoleName" (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)
invokerRoleName]))}
instance JSON.ToJSON PermissionModelProperty where
  toJSON :: PermissionModelProperty -> Value
toJSON PermissionModelProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PermissionModelProperty -> ()
crossAccountRoleArns :: PermissionModelProperty -> Maybe (ValueList Text)
invokerRoleName :: PermissionModelProperty -> Maybe (Value Text)
type' :: PermissionModelProperty -> Value Text
haddock_workaround_ :: ()
crossAccountRoleArns :: Maybe (ValueList Text)
invokerRoleName :: Maybe (Value Text)
type' :: 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
"Type" 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
type']
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [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..=) Key
"CrossAccountRoleArns" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
crossAccountRoleArns,
                  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
"InvokerRoleName" (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)
invokerRoleName])))
instance Property "CrossAccountRoleArns" PermissionModelProperty where
  type PropertyType "CrossAccountRoleArns" PermissionModelProperty = ValueList Prelude.Text
  set :: PropertyType "CrossAccountRoleArns" PermissionModelProperty
-> PermissionModelProperty -> PermissionModelProperty
set PropertyType "CrossAccountRoleArns" PermissionModelProperty
newValue PermissionModelProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PermissionModelProperty -> ()
crossAccountRoleArns :: PermissionModelProperty -> Maybe (ValueList Text)
invokerRoleName :: PermissionModelProperty -> Maybe (Value Text)
type' :: PermissionModelProperty -> Value Text
haddock_workaround_ :: ()
crossAccountRoleArns :: Maybe (ValueList Text)
invokerRoleName :: Maybe (Value Text)
type' :: Value Text
..}
    = PermissionModelProperty
        {crossAccountRoleArns :: Maybe (ValueList Text)
crossAccountRoleArns = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CrossAccountRoleArns" PermissionModelProperty
ValueList Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
invokerRoleName :: Maybe (Value Text)
type' :: Value Text
haddock_workaround_ :: ()
invokerRoleName :: Maybe (Value Text)
type' :: Value Text
..}
instance Property "InvokerRoleName" PermissionModelProperty where
  type PropertyType "InvokerRoleName" PermissionModelProperty = Value Prelude.Text
  set :: PropertyType "InvokerRoleName" PermissionModelProperty
-> PermissionModelProperty -> PermissionModelProperty
set PropertyType "InvokerRoleName" PermissionModelProperty
newValue PermissionModelProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PermissionModelProperty -> ()
crossAccountRoleArns :: PermissionModelProperty -> Maybe (ValueList Text)
invokerRoleName :: PermissionModelProperty -> Maybe (Value Text)
type' :: PermissionModelProperty -> Value Text
haddock_workaround_ :: ()
crossAccountRoleArns :: Maybe (ValueList Text)
invokerRoleName :: Maybe (Value Text)
type' :: Value Text
..}
    = PermissionModelProperty
        {invokerRoleName :: Maybe (Value Text)
invokerRoleName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "InvokerRoleName" PermissionModelProperty
Value Text
newValue, Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ()
crossAccountRoleArns :: Maybe (ValueList Text)
type' :: Value Text
haddock_workaround_ :: ()
crossAccountRoleArns :: Maybe (ValueList Text)
type' :: Value Text
..}
instance Property "Type" PermissionModelProperty where
  type PropertyType "Type" PermissionModelProperty = Value Prelude.Text
  set :: PropertyType "Type" PermissionModelProperty
-> PermissionModelProperty -> PermissionModelProperty
set PropertyType "Type" PermissionModelProperty
newValue PermissionModelProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PermissionModelProperty -> ()
crossAccountRoleArns :: PermissionModelProperty -> Maybe (ValueList Text)
invokerRoleName :: PermissionModelProperty -> Maybe (Value Text)
type' :: PermissionModelProperty -> Value Text
haddock_workaround_ :: ()
crossAccountRoleArns :: Maybe (ValueList Text)
invokerRoleName :: Maybe (Value Text)
type' :: Value Text
..}
    = PermissionModelProperty {type' :: Value Text
type' = PropertyType "Type" PermissionModelProperty
Value Text
newValue, Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ()
crossAccountRoleArns :: Maybe (ValueList Text)
invokerRoleName :: Maybe (Value Text)
haddock_workaround_ :: ()
crossAccountRoleArns :: Maybe (ValueList Text)
invokerRoleName :: Maybe (Value Text)
..}