module Stratosphere.Resources.DBSecurityGroupIngress where
import Control.Lens
import Data.Aeson
import Data.Aeson.Types
import Data.Text
import GHC.Generics
import Stratosphere.Values
data DBSecurityGroupIngress =
DBSecurityGroupIngress
{ _dBSecurityGroupIngressCIDRIP :: Maybe (Val Text)
, _dBSecurityGroupIngressDBSecurityGroupName :: Val Text
, _dBSecurityGroupIngressEC2SecurityGroupId :: Maybe (Val Text)
, _dBSecurityGroupIngressEC2SecurityGroupName :: Maybe (Val Text)
, _dBSecurityGroupIngressEC2SecurityGroupOwnerId :: Maybe (Val Text)
} deriving (Show, Generic)
instance ToJSON DBSecurityGroupIngress where
toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 23, omitNothingFields = True }
instance FromJSON DBSecurityGroupIngress where
parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 23, omitNothingFields = True }
dbSecurityGroupIngress
:: Val Text
-> DBSecurityGroupIngress
dbSecurityGroupIngress dBSecurityGroupNamearg =
DBSecurityGroupIngress
{ _dBSecurityGroupIngressCIDRIP = Nothing
, _dBSecurityGroupIngressDBSecurityGroupName = dBSecurityGroupNamearg
, _dBSecurityGroupIngressEC2SecurityGroupId = Nothing
, _dBSecurityGroupIngressEC2SecurityGroupName = Nothing
, _dBSecurityGroupIngressEC2SecurityGroupOwnerId = Nothing
}
dbsgiCIDRIP :: Lens' DBSecurityGroupIngress (Maybe (Val Text))
dbsgiCIDRIP = lens _dBSecurityGroupIngressCIDRIP (\s a -> s { _dBSecurityGroupIngressCIDRIP = a })
dbsgiDBSecurityGroupName :: Lens' DBSecurityGroupIngress (Val Text)
dbsgiDBSecurityGroupName = lens _dBSecurityGroupIngressDBSecurityGroupName (\s a -> s { _dBSecurityGroupIngressDBSecurityGroupName = a })
dbsgiEC2SecurityGroupId :: Lens' DBSecurityGroupIngress (Maybe (Val Text))
dbsgiEC2SecurityGroupId = lens _dBSecurityGroupIngressEC2SecurityGroupId (\s a -> s { _dBSecurityGroupIngressEC2SecurityGroupId = a })
dbsgiEC2SecurityGroupName :: Lens' DBSecurityGroupIngress (Maybe (Val Text))
dbsgiEC2SecurityGroupName = lens _dBSecurityGroupIngressEC2SecurityGroupName (\s a -> s { _dBSecurityGroupIngressEC2SecurityGroupName = a })
dbsgiEC2SecurityGroupOwnerId :: Lens' DBSecurityGroupIngress (Maybe (Val Text))
dbsgiEC2SecurityGroupOwnerId = lens _dBSecurityGroupIngressEC2SecurityGroupOwnerId (\s a -> s { _dBSecurityGroupIngressEC2SecurityGroupOwnerId = a })