module Stratosphere.Budgets.BudgetsAction.IamActionDefinitionProperty (
        IamActionDefinitionProperty(..), mkIamActionDefinitionProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data IamActionDefinitionProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-budgets-budgetsaction-iamactiondefinition.html>
    IamActionDefinitionProperty {IamActionDefinitionProperty -> ()
haddock_workaround_ :: (),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-budgets-budgetsaction-iamactiondefinition.html#cfn-budgets-budgetsaction-iamactiondefinition-groups>
                                 IamActionDefinitionProperty -> Maybe (ValueList Text)
groups :: (Prelude.Maybe (ValueList Prelude.Text)),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-budgets-budgetsaction-iamactiondefinition.html#cfn-budgets-budgetsaction-iamactiondefinition-policyarn>
                                 IamActionDefinitionProperty -> Value Text
policyArn :: (Value Prelude.Text),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-budgets-budgetsaction-iamactiondefinition.html#cfn-budgets-budgetsaction-iamactiondefinition-roles>
                                 IamActionDefinitionProperty -> Maybe (ValueList Text)
roles :: (Prelude.Maybe (ValueList Prelude.Text)),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-budgets-budgetsaction-iamactiondefinition.html#cfn-budgets-budgetsaction-iamactiondefinition-users>
                                 IamActionDefinitionProperty -> Maybe (ValueList Text)
users :: (Prelude.Maybe (ValueList Prelude.Text))}
  deriving stock (IamActionDefinitionProperty -> IamActionDefinitionProperty -> Bool
(IamActionDefinitionProperty
 -> IamActionDefinitionProperty -> Bool)
-> (IamActionDefinitionProperty
    -> IamActionDefinitionProperty -> Bool)
-> Eq IamActionDefinitionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: IamActionDefinitionProperty -> IamActionDefinitionProperty -> Bool
== :: IamActionDefinitionProperty -> IamActionDefinitionProperty -> Bool
$c/= :: IamActionDefinitionProperty -> IamActionDefinitionProperty -> Bool
/= :: IamActionDefinitionProperty -> IamActionDefinitionProperty -> Bool
Prelude.Eq, Int -> IamActionDefinitionProperty -> ShowS
[IamActionDefinitionProperty] -> ShowS
IamActionDefinitionProperty -> String
(Int -> IamActionDefinitionProperty -> ShowS)
-> (IamActionDefinitionProperty -> String)
-> ([IamActionDefinitionProperty] -> ShowS)
-> Show IamActionDefinitionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> IamActionDefinitionProperty -> ShowS
showsPrec :: Int -> IamActionDefinitionProperty -> ShowS
$cshow :: IamActionDefinitionProperty -> String
show :: IamActionDefinitionProperty -> String
$cshowList :: [IamActionDefinitionProperty] -> ShowS
showList :: [IamActionDefinitionProperty] -> ShowS
Prelude.Show)
mkIamActionDefinitionProperty ::
  Value Prelude.Text -> IamActionDefinitionProperty
mkIamActionDefinitionProperty :: Value Text -> IamActionDefinitionProperty
mkIamActionDefinitionProperty Value Text
policyArn
  = IamActionDefinitionProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), policyArn :: Value Text
policyArn = Value Text
policyArn,
       groups :: Maybe (ValueList Text)
groups = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing, roles :: Maybe (ValueList Text)
roles = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing,
       users :: Maybe (ValueList Text)
users = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties IamActionDefinitionProperty where
  toResourceProperties :: IamActionDefinitionProperty -> ResourceProperties
toResourceProperties IamActionDefinitionProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: IamActionDefinitionProperty -> ()
groups :: IamActionDefinitionProperty -> Maybe (ValueList Text)
policyArn :: IamActionDefinitionProperty -> Value Text
roles :: IamActionDefinitionProperty -> Maybe (ValueList Text)
users :: IamActionDefinitionProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
groups :: Maybe (ValueList Text)
policyArn :: Value Text
roles :: Maybe (ValueList Text)
users :: Maybe (ValueList Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Budgets::BudgetsAction.IamActionDefinition",
         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
"PolicyArn" 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
policyArn]
                           ([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
"Groups" (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)
groups,
                               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
"Roles" (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)
roles,
                               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
"Users" (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)
users]))}
instance JSON.ToJSON IamActionDefinitionProperty where
  toJSON :: IamActionDefinitionProperty -> Value
toJSON IamActionDefinitionProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: IamActionDefinitionProperty -> ()
groups :: IamActionDefinitionProperty -> Maybe (ValueList Text)
policyArn :: IamActionDefinitionProperty -> Value Text
roles :: IamActionDefinitionProperty -> Maybe (ValueList Text)
users :: IamActionDefinitionProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
groups :: Maybe (ValueList Text)
policyArn :: Value Text
roles :: Maybe (ValueList Text)
users :: Maybe (ValueList 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
"PolicyArn" 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
policyArn]
              ([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
"Groups" (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)
groups,
                  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
"Roles" (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)
roles,
                  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
"Users" (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)
users])))
instance Property "Groups" IamActionDefinitionProperty where
  type PropertyType "Groups" IamActionDefinitionProperty = ValueList Prelude.Text
  set :: PropertyType "Groups" IamActionDefinitionProperty
-> IamActionDefinitionProperty -> IamActionDefinitionProperty
set PropertyType "Groups" IamActionDefinitionProperty
newValue IamActionDefinitionProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: IamActionDefinitionProperty -> ()
groups :: IamActionDefinitionProperty -> Maybe (ValueList Text)
policyArn :: IamActionDefinitionProperty -> Value Text
roles :: IamActionDefinitionProperty -> Maybe (ValueList Text)
users :: IamActionDefinitionProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
groups :: Maybe (ValueList Text)
policyArn :: Value Text
roles :: Maybe (ValueList Text)
users :: Maybe (ValueList Text)
..}
    = IamActionDefinitionProperty {groups :: Maybe (ValueList Text)
groups = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Groups" IamActionDefinitionProperty
ValueList Text
newValue, Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ()
policyArn :: Value Text
roles :: Maybe (ValueList Text)
users :: Maybe (ValueList Text)
haddock_workaround_ :: ()
policyArn :: Value Text
roles :: Maybe (ValueList Text)
users :: Maybe (ValueList Text)
..}
instance Property "PolicyArn" IamActionDefinitionProperty where
  type PropertyType "PolicyArn" IamActionDefinitionProperty = Value Prelude.Text
  set :: PropertyType "PolicyArn" IamActionDefinitionProperty
-> IamActionDefinitionProperty -> IamActionDefinitionProperty
set PropertyType "PolicyArn" IamActionDefinitionProperty
newValue IamActionDefinitionProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: IamActionDefinitionProperty -> ()
groups :: IamActionDefinitionProperty -> Maybe (ValueList Text)
policyArn :: IamActionDefinitionProperty -> Value Text
roles :: IamActionDefinitionProperty -> Maybe (ValueList Text)
users :: IamActionDefinitionProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
groups :: Maybe (ValueList Text)
policyArn :: Value Text
roles :: Maybe (ValueList Text)
users :: Maybe (ValueList Text)
..}
    = IamActionDefinitionProperty {policyArn :: Value Text
policyArn = PropertyType "PolicyArn" IamActionDefinitionProperty
Value Text
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
groups :: Maybe (ValueList Text)
roles :: Maybe (ValueList Text)
users :: Maybe (ValueList Text)
haddock_workaround_ :: ()
groups :: Maybe (ValueList Text)
roles :: Maybe (ValueList Text)
users :: Maybe (ValueList Text)
..}
instance Property "Roles" IamActionDefinitionProperty where
  type PropertyType "Roles" IamActionDefinitionProperty = ValueList Prelude.Text
  set :: PropertyType "Roles" IamActionDefinitionProperty
-> IamActionDefinitionProperty -> IamActionDefinitionProperty
set PropertyType "Roles" IamActionDefinitionProperty
newValue IamActionDefinitionProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: IamActionDefinitionProperty -> ()
groups :: IamActionDefinitionProperty -> Maybe (ValueList Text)
policyArn :: IamActionDefinitionProperty -> Value Text
roles :: IamActionDefinitionProperty -> Maybe (ValueList Text)
users :: IamActionDefinitionProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
groups :: Maybe (ValueList Text)
policyArn :: Value Text
roles :: Maybe (ValueList Text)
users :: Maybe (ValueList Text)
..}
    = IamActionDefinitionProperty {roles :: Maybe (ValueList Text)
roles = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Roles" IamActionDefinitionProperty
ValueList Text
newValue, Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ()
groups :: Maybe (ValueList Text)
policyArn :: Value Text
users :: Maybe (ValueList Text)
haddock_workaround_ :: ()
groups :: Maybe (ValueList Text)
policyArn :: Value Text
users :: Maybe (ValueList Text)
..}
instance Property "Users" IamActionDefinitionProperty where
  type PropertyType "Users" IamActionDefinitionProperty = ValueList Prelude.Text
  set :: PropertyType "Users" IamActionDefinitionProperty
-> IamActionDefinitionProperty -> IamActionDefinitionProperty
set PropertyType "Users" IamActionDefinitionProperty
newValue IamActionDefinitionProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: IamActionDefinitionProperty -> ()
groups :: IamActionDefinitionProperty -> Maybe (ValueList Text)
policyArn :: IamActionDefinitionProperty -> Value Text
roles :: IamActionDefinitionProperty -> Maybe (ValueList Text)
users :: IamActionDefinitionProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
groups :: Maybe (ValueList Text)
policyArn :: Value Text
roles :: Maybe (ValueList Text)
users :: Maybe (ValueList Text)
..}
    = IamActionDefinitionProperty {users :: Maybe (ValueList Text)
users = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Users" IamActionDefinitionProperty
ValueList Text
newValue, Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ()
groups :: Maybe (ValueList Text)
policyArn :: Value Text
roles :: Maybe (ValueList Text)
haddock_workaround_ :: ()
groups :: Maybe (ValueList Text)
policyArn :: Value Text
roles :: Maybe (ValueList Text)
..}