module Stratosphere.Resources.VPCEndpoint where
import Control.Lens
import Data.Aeson
import Data.Aeson.Types
import Data.Text
import GHC.Generics
import Stratosphere.Values
data VPCEndpoint =
VPCEndpoint
{ _vPCEndpointPolicyDocument :: Maybe Object
, _vPCEndpointRouteTableIds :: Maybe [Val Text]
, _vPCEndpointServiceName :: Val Text
, _vPCEndpointVpcId :: Val Text
} deriving (Show, Generic)
instance ToJSON VPCEndpoint where
toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 12, omitNothingFields = True }
instance FromJSON VPCEndpoint where
parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 12, omitNothingFields = True }
vpcEndpoint
:: Val Text
-> Val Text
-> VPCEndpoint
vpcEndpoint serviceNamearg vpcIdarg =
VPCEndpoint
{ _vPCEndpointPolicyDocument = Nothing
, _vPCEndpointRouteTableIds = Nothing
, _vPCEndpointServiceName = serviceNamearg
, _vPCEndpointVpcId = vpcIdarg
}
vpcePolicyDocument :: Lens' VPCEndpoint (Maybe Object)
vpcePolicyDocument = lens _vPCEndpointPolicyDocument (\s a -> s { _vPCEndpointPolicyDocument = a })
vpceRouteTableIds :: Lens' VPCEndpoint (Maybe [Val Text])
vpceRouteTableIds = lens _vPCEndpointRouteTableIds (\s a -> s { _vPCEndpointRouteTableIds = a })
vpceServiceName :: Lens' VPCEndpoint (Val Text)
vpceServiceName = lens _vPCEndpointServiceName (\s a -> s { _vPCEndpointServiceName = a })
vpceVpcId :: Lens' VPCEndpoint (Val Text)
vpceVpcId = lens _vPCEndpointVpcId (\s a -> s { _vPCEndpointVpcId = a })