module Stratosphere.ResourceProperties.RDSSecurityGroupRule where
import Control.Lens
import Data.Aeson
import Data.Aeson.Types
import Data.Text
import GHC.Generics
import Stratosphere.Values
data RDSSecurityGroupRule =
RDSSecurityGroupRule
{ _rDSSecurityGroupRuleCIDRIP :: Maybe (Val Text)
, _rDSSecurityGroupRuleEC2SecurityGroupId :: Maybe (Val Text)
, _rDSSecurityGroupRuleEC2SecurityGroupName :: Maybe (Val Text)
, _rDSSecurityGroupRuleEC2SecurityGroupOwnerId :: Maybe (Val Text)
} deriving (Show, Generic)
instance ToJSON RDSSecurityGroupRule where
toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 21, omitNothingFields = True }
instance FromJSON RDSSecurityGroupRule where
parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 21, omitNothingFields = True }
rdsSecurityGroupRule
:: RDSSecurityGroupRule
rdsSecurityGroupRule =
RDSSecurityGroupRule
{ _rDSSecurityGroupRuleCIDRIP = Nothing
, _rDSSecurityGroupRuleEC2SecurityGroupId = Nothing
, _rDSSecurityGroupRuleEC2SecurityGroupName = Nothing
, _rDSSecurityGroupRuleEC2SecurityGroupOwnerId = Nothing
}
rdssgrCIDRIP :: Lens' RDSSecurityGroupRule (Maybe (Val Text))
rdssgrCIDRIP = lens _rDSSecurityGroupRuleCIDRIP (\s a -> s { _rDSSecurityGroupRuleCIDRIP = a })
rdssgrEC2SecurityGroupId :: Lens' RDSSecurityGroupRule (Maybe (Val Text))
rdssgrEC2SecurityGroupId = lens _rDSSecurityGroupRuleEC2SecurityGroupId (\s a -> s { _rDSSecurityGroupRuleEC2SecurityGroupId = a })
rdssgrEC2SecurityGroupName :: Lens' RDSSecurityGroupRule (Maybe (Val Text))
rdssgrEC2SecurityGroupName = lens _rDSSecurityGroupRuleEC2SecurityGroupName (\s a -> s { _rDSSecurityGroupRuleEC2SecurityGroupName = a })
rdssgrEC2SecurityGroupOwnerId :: Lens' RDSSecurityGroupRule (Maybe (Val Text))
rdssgrEC2SecurityGroupOwnerId = lens _rDSSecurityGroupRuleEC2SecurityGroupOwnerId (\s a -> s { _rDSSecurityGroupRuleEC2SecurityGroupOwnerId = a })