module Stratosphere.IAM.Group (
module Exports, Group(..), mkGroup
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.IAM.Group.PolicyProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Group
=
Group {Group -> ()
haddock_workaround_ :: (),
Group -> Maybe (Value Text)
groupName :: (Prelude.Maybe (Value Prelude.Text)),
Group -> Maybe (ValueList Text)
managedPolicyArns :: (Prelude.Maybe (ValueList Prelude.Text)),
Group -> Maybe (Value Text)
path :: (Prelude.Maybe (Value Prelude.Text)),
Group -> Maybe [PolicyProperty]
policies :: (Prelude.Maybe [PolicyProperty])}
deriving stock (Group -> Group -> Bool
(Group -> Group -> Bool) -> (Group -> Group -> Bool) -> Eq Group
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Group -> Group -> Bool
== :: Group -> Group -> Bool
$c/= :: Group -> Group -> Bool
/= :: Group -> Group -> Bool
Prelude.Eq, Int -> Group -> ShowS
[Group] -> ShowS
Group -> String
(Int -> Group -> ShowS)
-> (Group -> String) -> ([Group] -> ShowS) -> Show Group
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Group -> ShowS
showsPrec :: Int -> Group -> ShowS
$cshow :: Group -> String
show :: Group -> String
$cshowList :: [Group] -> ShowS
showList :: [Group] -> ShowS
Prelude.Show)
mkGroup :: Group
mkGroup :: Group
mkGroup
= Group
{haddock_workaround_ :: ()
haddock_workaround_ = (), groupName :: Maybe (Value Text)
groupName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
managedPolicyArns :: Maybe (ValueList Text)
managedPolicyArns = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing, path :: Maybe (Value Text)
path = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
policies :: Maybe [PolicyProperty]
policies = Maybe [PolicyProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Group where
toResourceProperties :: Group -> ResourceProperties
toResourceProperties Group {Maybe [PolicyProperty]
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: Group -> ()
groupName :: Group -> Maybe (Value Text)
managedPolicyArns :: Group -> Maybe (ValueList Text)
path :: Group -> Maybe (Value Text)
policies :: Group -> Maybe [PolicyProperty]
haddock_workaround_ :: ()
groupName :: Maybe (Value Text)
managedPolicyArns :: Maybe (ValueList Text)
path :: Maybe (Value Text)
policies :: Maybe [PolicyProperty]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::IAM::Group", 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 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
"GroupName" (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)
groupName,
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
"ManagedPolicyArns" (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)
managedPolicyArns,
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
"Path" (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)
path,
Key -> [PolicyProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Policies" ([PolicyProperty] -> (Key, Value))
-> Maybe [PolicyProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [PolicyProperty]
policies])}
instance JSON.ToJSON Group where
toJSON :: Group -> Value
toJSON Group {Maybe [PolicyProperty]
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: Group -> ()
groupName :: Group -> Maybe (Value Text)
managedPolicyArns :: Group -> Maybe (ValueList Text)
path :: Group -> Maybe (Value Text)
policies :: Group -> Maybe [PolicyProperty]
haddock_workaround_ :: ()
groupName :: Maybe (Value Text)
managedPolicyArns :: Maybe (ValueList Text)
path :: Maybe (Value Text)
policies :: Maybe [PolicyProperty]
..}
= [(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 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
"GroupName" (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)
groupName,
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
"ManagedPolicyArns" (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)
managedPolicyArns,
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
"Path" (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)
path,
Key -> [PolicyProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Policies" ([PolicyProperty] -> (Key, Value))
-> Maybe [PolicyProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [PolicyProperty]
policies]))
instance Property "GroupName" Group where
type PropertyType "GroupName" Group = Value Prelude.Text
set :: PropertyType "GroupName" Group -> Group -> Group
set PropertyType "GroupName" Group
newValue Group {Maybe [PolicyProperty]
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: Group -> ()
groupName :: Group -> Maybe (Value Text)
managedPolicyArns :: Group -> Maybe (ValueList Text)
path :: Group -> Maybe (Value Text)
policies :: Group -> Maybe [PolicyProperty]
haddock_workaround_ :: ()
groupName :: Maybe (Value Text)
managedPolicyArns :: Maybe (ValueList Text)
path :: Maybe (Value Text)
policies :: Maybe [PolicyProperty]
..}
= Group {groupName :: Maybe (Value Text)
groupName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "GroupName" Group
Value Text
newValue, Maybe [PolicyProperty]
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ()
managedPolicyArns :: Maybe (ValueList Text)
path :: Maybe (Value Text)
policies :: Maybe [PolicyProperty]
haddock_workaround_ :: ()
managedPolicyArns :: Maybe (ValueList Text)
path :: Maybe (Value Text)
policies :: Maybe [PolicyProperty]
..}
instance Property "ManagedPolicyArns" Group where
type PropertyType "ManagedPolicyArns" Group = ValueList Prelude.Text
set :: PropertyType "ManagedPolicyArns" Group -> Group -> Group
set PropertyType "ManagedPolicyArns" Group
newValue Group {Maybe [PolicyProperty]
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: Group -> ()
groupName :: Group -> Maybe (Value Text)
managedPolicyArns :: Group -> Maybe (ValueList Text)
path :: Group -> Maybe (Value Text)
policies :: Group -> Maybe [PolicyProperty]
haddock_workaround_ :: ()
groupName :: Maybe (Value Text)
managedPolicyArns :: Maybe (ValueList Text)
path :: Maybe (Value Text)
policies :: Maybe [PolicyProperty]
..}
= Group {managedPolicyArns :: Maybe (ValueList Text)
managedPolicyArns = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ManagedPolicyArns" Group
ValueList Text
newValue, Maybe [PolicyProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
groupName :: Maybe (Value Text)
path :: Maybe (Value Text)
policies :: Maybe [PolicyProperty]
haddock_workaround_ :: ()
groupName :: Maybe (Value Text)
path :: Maybe (Value Text)
policies :: Maybe [PolicyProperty]
..}
instance Property "Path" Group where
type PropertyType "Path" Group = Value Prelude.Text
set :: PropertyType "Path" Group -> Group -> Group
set PropertyType "Path" Group
newValue Group {Maybe [PolicyProperty]
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: Group -> ()
groupName :: Group -> Maybe (Value Text)
managedPolicyArns :: Group -> Maybe (ValueList Text)
path :: Group -> Maybe (Value Text)
policies :: Group -> Maybe [PolicyProperty]
haddock_workaround_ :: ()
groupName :: Maybe (Value Text)
managedPolicyArns :: Maybe (ValueList Text)
path :: Maybe (Value Text)
policies :: Maybe [PolicyProperty]
..} = Group {path :: Maybe (Value Text)
path = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Path" Group
Value Text
newValue, Maybe [PolicyProperty]
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ()
groupName :: Maybe (Value Text)
managedPolicyArns :: Maybe (ValueList Text)
policies :: Maybe [PolicyProperty]
haddock_workaround_ :: ()
groupName :: Maybe (Value Text)
managedPolicyArns :: Maybe (ValueList Text)
policies :: Maybe [PolicyProperty]
..}
instance Property "Policies" Group where
type PropertyType "Policies" Group = [PolicyProperty]
set :: PropertyType "Policies" Group -> Group -> Group
set PropertyType "Policies" Group
newValue Group {Maybe [PolicyProperty]
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: Group -> ()
groupName :: Group -> Maybe (Value Text)
managedPolicyArns :: Group -> Maybe (ValueList Text)
path :: Group -> Maybe (Value Text)
policies :: Group -> Maybe [PolicyProperty]
haddock_workaround_ :: ()
groupName :: Maybe (Value Text)
managedPolicyArns :: Maybe (ValueList Text)
path :: Maybe (Value Text)
policies :: Maybe [PolicyProperty]
..}
= Group {policies :: Maybe [PolicyProperty]
policies = [PolicyProperty] -> Maybe [PolicyProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [PolicyProperty]
PropertyType "Policies" Group
newValue, Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ()
groupName :: Maybe (Value Text)
managedPolicyArns :: Maybe (ValueList Text)
path :: Maybe (Value Text)
haddock_workaround_ :: ()
groupName :: Maybe (Value Text)
managedPolicyArns :: Maybe (ValueList Text)
path :: Maybe (Value Text)
..}