stratosphere-0.3.0: library-gen/Stratosphere/Resources/EFSMountTarget.hs
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-efs-mounttarget.html
module Stratosphere.Resources.EFSMountTarget where
import Control.Lens
import Data.Aeson
import Data.Aeson.Types
import Data.Text
import GHC.Generics
import Stratosphere.Values
-- | Full data type definition for EFSMountTarget. See 'efsMountTarget' for a
-- | more convenient constructor.
data EFSMountTarget =
EFSMountTarget
{ _eFSMountTargetFileSystemId :: Val Text
, _eFSMountTargetIpAddress :: Maybe (Val Text)
, _eFSMountTargetSecurityGroups :: [Val Text]
, _eFSMountTargetSubnetId :: Val Text
} deriving (Show, Generic)
instance ToJSON EFSMountTarget where
toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 15, omitNothingFields = True }
instance FromJSON EFSMountTarget where
parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 15, omitNothingFields = True }
-- | Constructor for 'EFSMountTarget' containing required fields as arguments.
efsMountTarget
:: Val Text -- ^ 'efsmtFileSystemId'
-> [Val Text] -- ^ 'efsmtSecurityGroups'
-> Val Text -- ^ 'efsmtSubnetId'
-> EFSMountTarget
efsMountTarget fileSystemIdarg securityGroupsarg subnetIdarg =
EFSMountTarget
{ _eFSMountTargetFileSystemId = fileSystemIdarg
, _eFSMountTargetIpAddress = Nothing
, _eFSMountTargetSecurityGroups = securityGroupsarg
, _eFSMountTargetSubnetId = subnetIdarg
}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-efs-mounttarget.html#cfn-efs-mounttarget-filesystemid
efsmtFileSystemId :: Lens' EFSMountTarget (Val Text)
efsmtFileSystemId = lens _eFSMountTargetFileSystemId (\s a -> s { _eFSMountTargetFileSystemId = a })
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-efs-mounttarget.html#cfn-efs-mounttarget-ipaddress
efsmtIpAddress :: Lens' EFSMountTarget (Maybe (Val Text))
efsmtIpAddress = lens _eFSMountTargetIpAddress (\s a -> s { _eFSMountTargetIpAddress = a })
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-efs-mounttarget.html#cfn-efs-mounttarget-securitygroups
efsmtSecurityGroups :: Lens' EFSMountTarget [Val Text]
efsmtSecurityGroups = lens _eFSMountTargetSecurityGroups (\s a -> s { _eFSMountTargetSecurityGroups = a })
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-efs-mounttarget.html#cfn-efs-mounttarget-subnetid
efsmtSubnetId :: Lens' EFSMountTarget (Val Text)
efsmtSubnetId = lens _eFSMountTargetSubnetId (\s a -> s { _eFSMountTargetSubnetId = a })