module Stratosphere.ResourceProperties.IAMPolicies where
import Control.Lens
import Data.Aeson
import Data.Aeson.Types
import Data.Text
import GHC.Generics
import Stratosphere.Values
data IAMPolicies =
IAMPolicies
{ _iAMPoliciesPolicyDocument :: Object
, _iAMPoliciesPolicyName :: Val Text
} deriving (Show, Generic)
instance ToJSON IAMPolicies where
toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 12, omitNothingFields = True }
instance FromJSON IAMPolicies where
parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 12, omitNothingFields = True }
iamPolicies
:: Object
-> Val Text
-> IAMPolicies
iamPolicies policyDocumentarg policyNamearg =
IAMPolicies
{ _iAMPoliciesPolicyDocument = policyDocumentarg
, _iAMPoliciesPolicyName = policyNamearg
}
iampPolicyDocument :: Lens' IAMPolicies Object
iampPolicyDocument = lens _iAMPoliciesPolicyDocument (\s a -> s { _iAMPoliciesPolicyDocument = a })
iampPolicyName :: Lens' IAMPolicies (Val Text)
iampPolicyName = lens _iAMPoliciesPolicyName (\s a -> s { _iAMPoliciesPolicyName = a })