module Stratosphere.Resources.Group where
import Control.Lens
import Data.Aeson
import Data.Aeson.Types
import Data.Text
import GHC.Generics
import Stratosphere.Values
import Stratosphere.ResourceProperties.IAMPolicies
data Group =
Group
{ _groupManagedPolicyArns :: Maybe [Val Text]
, _groupPath :: Maybe (Val Text)
, _groupPolicies :: Maybe [IAMPolicies]
} deriving (Show, Generic)
instance ToJSON Group where
toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 6, omitNothingFields = True }
instance FromJSON Group where
parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 6, omitNothingFields = True }
group
:: Group
group =
Group
{ _groupManagedPolicyArns = Nothing
, _groupPath = Nothing
, _groupPolicies = Nothing
}
gManagedPolicyArns :: Lens' Group (Maybe [Val Text])
gManagedPolicyArns = lens _groupManagedPolicyArns (\s a -> s { _groupManagedPolicyArns = a })
gPath :: Lens' Group (Maybe (Val Text))
gPath = lens _groupPath (\s a -> s { _groupPath = a })
gPolicies :: Lens' Group (Maybe [IAMPolicies])
gPolicies = lens _groupPolicies (\s a -> s { _groupPolicies = a })