module Network.AWS.EFS.Types.Product where
import Network.AWS.EFS.Types.Sum
import Network.AWS.Prelude
data FileSystemDescription = FileSystemDescription'
{ _fsdName :: !(Maybe Text)
, _fsdOwnerId :: !Text
, _fsdCreationToken :: !Text
, _fsdFileSystemId :: !Text
, _fsdCreationTime :: !POSIX
, _fsdLifeCycleState :: !LifeCycleState
, _fsdNumberOfMountTargets :: !Nat
, _fsdSizeInBytes :: !FileSystemSize
} deriving (Eq,Read,Show,Data,Typeable,Generic)
fileSystemDescription
:: Text
-> Text
-> Text
-> UTCTime
-> LifeCycleState
-> Natural
-> FileSystemSize
-> FileSystemDescription
fileSystemDescription pOwnerId_ pCreationToken_ pFileSystemId_ pCreationTime_ pLifeCycleState_ pNumberOfMountTargets_ pSizeInBytes_ =
FileSystemDescription'
{ _fsdName = Nothing
, _fsdOwnerId = pOwnerId_
, _fsdCreationToken = pCreationToken_
, _fsdFileSystemId = pFileSystemId_
, _fsdCreationTime = _Time # pCreationTime_
, _fsdLifeCycleState = pLifeCycleState_
, _fsdNumberOfMountTargets = _Nat # pNumberOfMountTargets_
, _fsdSizeInBytes = pSizeInBytes_
}
fsdName :: Lens' FileSystemDescription (Maybe Text)
fsdName = lens _fsdName (\ s a -> s{_fsdName = a});
fsdOwnerId :: Lens' FileSystemDescription Text
fsdOwnerId = lens _fsdOwnerId (\ s a -> s{_fsdOwnerId = a});
fsdCreationToken :: Lens' FileSystemDescription Text
fsdCreationToken = lens _fsdCreationToken (\ s a -> s{_fsdCreationToken = a});
fsdFileSystemId :: Lens' FileSystemDescription Text
fsdFileSystemId = lens _fsdFileSystemId (\ s a -> s{_fsdFileSystemId = a});
fsdCreationTime :: Lens' FileSystemDescription UTCTime
fsdCreationTime = lens _fsdCreationTime (\ s a -> s{_fsdCreationTime = a}) . _Time;
fsdLifeCycleState :: Lens' FileSystemDescription LifeCycleState
fsdLifeCycleState = lens _fsdLifeCycleState (\ s a -> s{_fsdLifeCycleState = a});
fsdNumberOfMountTargets :: Lens' FileSystemDescription Natural
fsdNumberOfMountTargets = lens _fsdNumberOfMountTargets (\ s a -> s{_fsdNumberOfMountTargets = a}) . _Nat;
fsdSizeInBytes :: Lens' FileSystemDescription FileSystemSize
fsdSizeInBytes = lens _fsdSizeInBytes (\ s a -> s{_fsdSizeInBytes = a});
instance FromJSON FileSystemDescription where
parseJSON
= withObject "FileSystemDescription"
(\ x ->
FileSystemDescription' <$>
(x .:? "Name") <*> (x .: "OwnerId") <*>
(x .: "CreationToken")
<*> (x .: "FileSystemId")
<*> (x .: "CreationTime")
<*> (x .: "LifeCycleState")
<*> (x .: "NumberOfMountTargets")
<*> (x .: "SizeInBytes"))
data FileSystemSize = FileSystemSize'
{ _fssTimestamp :: !(Maybe POSIX)
, _fssValue :: !Nat
} deriving (Eq,Read,Show,Data,Typeable,Generic)
fileSystemSize
:: Natural
-> FileSystemSize
fileSystemSize pValue_ =
FileSystemSize'
{ _fssTimestamp = Nothing
, _fssValue = _Nat # pValue_
}
fssTimestamp :: Lens' FileSystemSize (Maybe UTCTime)
fssTimestamp = lens _fssTimestamp (\ s a -> s{_fssTimestamp = a}) . mapping _Time;
fssValue :: Lens' FileSystemSize Natural
fssValue = lens _fssValue (\ s a -> s{_fssValue = a}) . _Nat;
instance FromJSON FileSystemSize where
parseJSON
= withObject "FileSystemSize"
(\ x ->
FileSystemSize' <$>
(x .:? "Timestamp") <*> (x .: "Value"))
data MountTargetDescription = MountTargetDescription'
{ _mtdIPAddress :: !(Maybe Text)
, _mtdNetworkInterfaceId :: !(Maybe Text)
, _mtdOwnerId :: !(Maybe Text)
, _mtdMountTargetId :: !Text
, _mtdFileSystemId :: !Text
, _mtdSubnetId :: !Text
, _mtdLifeCycleState :: !LifeCycleState
} deriving (Eq,Read,Show,Data,Typeable,Generic)
mountTargetDescription
:: Text
-> Text
-> Text
-> LifeCycleState
-> MountTargetDescription
mountTargetDescription pMountTargetId_ pFileSystemId_ pSubnetId_ pLifeCycleState_ =
MountTargetDescription'
{ _mtdIPAddress = Nothing
, _mtdNetworkInterfaceId = Nothing
, _mtdOwnerId = Nothing
, _mtdMountTargetId = pMountTargetId_
, _mtdFileSystemId = pFileSystemId_
, _mtdSubnetId = pSubnetId_
, _mtdLifeCycleState = pLifeCycleState_
}
mtdIPAddress :: Lens' MountTargetDescription (Maybe Text)
mtdIPAddress = lens _mtdIPAddress (\ s a -> s{_mtdIPAddress = a});
mtdNetworkInterfaceId :: Lens' MountTargetDescription (Maybe Text)
mtdNetworkInterfaceId = lens _mtdNetworkInterfaceId (\ s a -> s{_mtdNetworkInterfaceId = a});
mtdOwnerId :: Lens' MountTargetDescription (Maybe Text)
mtdOwnerId = lens _mtdOwnerId (\ s a -> s{_mtdOwnerId = a});
mtdMountTargetId :: Lens' MountTargetDescription Text
mtdMountTargetId = lens _mtdMountTargetId (\ s a -> s{_mtdMountTargetId = a});
mtdFileSystemId :: Lens' MountTargetDescription Text
mtdFileSystemId = lens _mtdFileSystemId (\ s a -> s{_mtdFileSystemId = a});
mtdSubnetId :: Lens' MountTargetDescription Text
mtdSubnetId = lens _mtdSubnetId (\ s a -> s{_mtdSubnetId = a});
mtdLifeCycleState :: Lens' MountTargetDescription LifeCycleState
mtdLifeCycleState = lens _mtdLifeCycleState (\ s a -> s{_mtdLifeCycleState = a});
instance FromJSON MountTargetDescription where
parseJSON
= withObject "MountTargetDescription"
(\ x ->
MountTargetDescription' <$>
(x .:? "IpAddress") <*> (x .:? "NetworkInterfaceId")
<*> (x .:? "OwnerId")
<*> (x .: "MountTargetId")
<*> (x .: "FileSystemId")
<*> (x .: "SubnetId")
<*> (x .: "LifeCycleState"))
data Tag = Tag'
{ _tagKey :: !Text
, _tagValue :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
tag
:: Text
-> Text
-> Tag
tag pKey_ pValue_ =
Tag'
{ _tagKey = pKey_
, _tagValue = pValue_
}
tagKey :: Lens' Tag Text
tagKey = lens _tagKey (\ s a -> s{_tagKey = a});
tagValue :: Lens' Tag Text
tagValue = lens _tagValue (\ s a -> s{_tagValue = a});
instance FromJSON Tag where
parseJSON
= withObject "Tag"
(\ x -> Tag' <$> (x .: "Key") <*> (x .: "Value"))
instance ToJSON Tag where
toJSON Tag'{..}
= object
(catMaybes
[Just ("Key" .= _tagKey),
Just ("Value" .= _tagValue)])