{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.AWS.Discovery.Types.Product where
import Network.AWS.Discovery.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
data AgentConfigurationStatus = AgentConfigurationStatus'
{ _acsAgentId :: !(Maybe Text)
, _acsOperationSucceeded :: !(Maybe Bool)
, _acsDescription :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
agentConfigurationStatus
:: AgentConfigurationStatus
agentConfigurationStatus =
AgentConfigurationStatus'
{ _acsAgentId = Nothing
, _acsOperationSucceeded = Nothing
, _acsDescription = Nothing
}
acsAgentId :: Lens' AgentConfigurationStatus (Maybe Text)
acsAgentId = lens _acsAgentId (\ s a -> s{_acsAgentId = a})
acsOperationSucceeded :: Lens' AgentConfigurationStatus (Maybe Bool)
acsOperationSucceeded = lens _acsOperationSucceeded (\ s a -> s{_acsOperationSucceeded = a})
acsDescription :: Lens' AgentConfigurationStatus (Maybe Text)
acsDescription = lens _acsDescription (\ s a -> s{_acsDescription = a})
instance FromJSON AgentConfigurationStatus where
parseJSON
= withObject "AgentConfigurationStatus"
(\ x ->
AgentConfigurationStatus' <$>
(x .:? "agentId") <*> (x .:? "operationSucceeded")
<*> (x .:? "description"))
instance Hashable AgentConfigurationStatus where
instance NFData AgentConfigurationStatus where
data AgentInfo = AgentInfo'
{ _aiHostName :: !(Maybe Text)
, _aiLastHealthPingTime :: !(Maybe Text)
, _aiAgentNetworkInfoList :: !(Maybe [AgentNetworkInfo])
, _aiConnectorId :: !(Maybe Text)
, _aiHealth :: !(Maybe AgentStatus)
, _aiAgentId :: !(Maybe Text)
, _aiVersion :: !(Maybe Text)
, _aiCollectionStatus :: !(Maybe Text)
, _aiRegisteredTime :: !(Maybe Text)
, _aiAgentType :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
agentInfo
:: AgentInfo
agentInfo =
AgentInfo'
{ _aiHostName = Nothing
, _aiLastHealthPingTime = Nothing
, _aiAgentNetworkInfoList = Nothing
, _aiConnectorId = Nothing
, _aiHealth = Nothing
, _aiAgentId = Nothing
, _aiVersion = Nothing
, _aiCollectionStatus = Nothing
, _aiRegisteredTime = Nothing
, _aiAgentType = Nothing
}
aiHostName :: Lens' AgentInfo (Maybe Text)
aiHostName = lens _aiHostName (\ s a -> s{_aiHostName = a})
aiLastHealthPingTime :: Lens' AgentInfo (Maybe Text)
aiLastHealthPingTime = lens _aiLastHealthPingTime (\ s a -> s{_aiLastHealthPingTime = a})
aiAgentNetworkInfoList :: Lens' AgentInfo [AgentNetworkInfo]
aiAgentNetworkInfoList = lens _aiAgentNetworkInfoList (\ s a -> s{_aiAgentNetworkInfoList = a}) . _Default . _Coerce
aiConnectorId :: Lens' AgentInfo (Maybe Text)
aiConnectorId = lens _aiConnectorId (\ s a -> s{_aiConnectorId = a})
aiHealth :: Lens' AgentInfo (Maybe AgentStatus)
aiHealth = lens _aiHealth (\ s a -> s{_aiHealth = a})
aiAgentId :: Lens' AgentInfo (Maybe Text)
aiAgentId = lens _aiAgentId (\ s a -> s{_aiAgentId = a})
aiVersion :: Lens' AgentInfo (Maybe Text)
aiVersion = lens _aiVersion (\ s a -> s{_aiVersion = a})
aiCollectionStatus :: Lens' AgentInfo (Maybe Text)
aiCollectionStatus = lens _aiCollectionStatus (\ s a -> s{_aiCollectionStatus = a})
aiRegisteredTime :: Lens' AgentInfo (Maybe Text)
aiRegisteredTime = lens _aiRegisteredTime (\ s a -> s{_aiRegisteredTime = a})
aiAgentType :: Lens' AgentInfo (Maybe Text)
aiAgentType = lens _aiAgentType (\ s a -> s{_aiAgentType = a})
instance FromJSON AgentInfo where
parseJSON
= withObject "AgentInfo"
(\ x ->
AgentInfo' <$>
(x .:? "hostName") <*> (x .:? "lastHealthPingTime")
<*> (x .:? "agentNetworkInfoList" .!= mempty)
<*> (x .:? "connectorId")
<*> (x .:? "health")
<*> (x .:? "agentId")
<*> (x .:? "version")
<*> (x .:? "collectionStatus")
<*> (x .:? "registeredTime")
<*> (x .:? "agentType"))
instance Hashable AgentInfo where
instance NFData AgentInfo where
data AgentNetworkInfo = AgentNetworkInfo'
{ _aniIpAddress :: !(Maybe Text)
, _aniMacAddress :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
agentNetworkInfo
:: AgentNetworkInfo
agentNetworkInfo =
AgentNetworkInfo' {_aniIpAddress = Nothing, _aniMacAddress = Nothing}
aniIpAddress :: Lens' AgentNetworkInfo (Maybe Text)
aniIpAddress = lens _aniIpAddress (\ s a -> s{_aniIpAddress = a})
aniMacAddress :: Lens' AgentNetworkInfo (Maybe Text)
aniMacAddress = lens _aniMacAddress (\ s a -> s{_aniMacAddress = a})
instance FromJSON AgentNetworkInfo where
parseJSON
= withObject "AgentNetworkInfo"
(\ x ->
AgentNetworkInfo' <$>
(x .:? "ipAddress") <*> (x .:? "macAddress"))
instance Hashable AgentNetworkInfo where
instance NFData AgentNetworkInfo where
data ConfigurationTag = ConfigurationTag'
{ _ctTimeOfCreation :: !(Maybe POSIX)
, _ctConfigurationId :: !(Maybe Text)
, _ctConfigurationType :: !(Maybe ConfigurationItemType)
, _ctValue :: !(Maybe Text)
, _ctKey :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
configurationTag
:: ConfigurationTag
configurationTag =
ConfigurationTag'
{ _ctTimeOfCreation = Nothing
, _ctConfigurationId = Nothing
, _ctConfigurationType = Nothing
, _ctValue = Nothing
, _ctKey = Nothing
}
ctTimeOfCreation :: Lens' ConfigurationTag (Maybe UTCTime)
ctTimeOfCreation = lens _ctTimeOfCreation (\ s a -> s{_ctTimeOfCreation = a}) . mapping _Time
ctConfigurationId :: Lens' ConfigurationTag (Maybe Text)
ctConfigurationId = lens _ctConfigurationId (\ s a -> s{_ctConfigurationId = a})
ctConfigurationType :: Lens' ConfigurationTag (Maybe ConfigurationItemType)
ctConfigurationType = lens _ctConfigurationType (\ s a -> s{_ctConfigurationType = a})
ctValue :: Lens' ConfigurationTag (Maybe Text)
ctValue = lens _ctValue (\ s a -> s{_ctValue = a})
ctKey :: Lens' ConfigurationTag (Maybe Text)
ctKey = lens _ctKey (\ s a -> s{_ctKey = a})
instance FromJSON ConfigurationTag where
parseJSON
= withObject "ConfigurationTag"
(\ x ->
ConfigurationTag' <$>
(x .:? "timeOfCreation") <*>
(x .:? "configurationId")
<*> (x .:? "configurationType")
<*> (x .:? "value")
<*> (x .:? "key"))
instance Hashable ConfigurationTag where
instance NFData ConfigurationTag where
data CustomerAgentInfo = CustomerAgentInfo'
{ _caiActiveAgents :: !Int
, _caiHealthyAgents :: !Int
, _caiBlackListedAgents :: !Int
, _caiShutdownAgents :: !Int
, _caiUnhealthyAgents :: !Int
, _caiTotalAgents :: !Int
, _caiUnknownAgents :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
customerAgentInfo
:: Int
-> Int
-> Int
-> Int
-> Int
-> Int
-> Int
-> CustomerAgentInfo
customerAgentInfo pActiveAgents_ pHealthyAgents_ pBlackListedAgents_ pShutdownAgents_ pUnhealthyAgents_ pTotalAgents_ pUnknownAgents_ =
CustomerAgentInfo'
{ _caiActiveAgents = pActiveAgents_
, _caiHealthyAgents = pHealthyAgents_
, _caiBlackListedAgents = pBlackListedAgents_
, _caiShutdownAgents = pShutdownAgents_
, _caiUnhealthyAgents = pUnhealthyAgents_
, _caiTotalAgents = pTotalAgents_
, _caiUnknownAgents = pUnknownAgents_
}
caiActiveAgents :: Lens' CustomerAgentInfo Int
caiActiveAgents = lens _caiActiveAgents (\ s a -> s{_caiActiveAgents = a})
caiHealthyAgents :: Lens' CustomerAgentInfo Int
caiHealthyAgents = lens _caiHealthyAgents (\ s a -> s{_caiHealthyAgents = a})
caiBlackListedAgents :: Lens' CustomerAgentInfo Int
caiBlackListedAgents = lens _caiBlackListedAgents (\ s a -> s{_caiBlackListedAgents = a})
caiShutdownAgents :: Lens' CustomerAgentInfo Int
caiShutdownAgents = lens _caiShutdownAgents (\ s a -> s{_caiShutdownAgents = a})
caiUnhealthyAgents :: Lens' CustomerAgentInfo Int
caiUnhealthyAgents = lens _caiUnhealthyAgents (\ s a -> s{_caiUnhealthyAgents = a})
caiTotalAgents :: Lens' CustomerAgentInfo Int
caiTotalAgents = lens _caiTotalAgents (\ s a -> s{_caiTotalAgents = a})
caiUnknownAgents :: Lens' CustomerAgentInfo Int
caiUnknownAgents = lens _caiUnknownAgents (\ s a -> s{_caiUnknownAgents = a})
instance FromJSON CustomerAgentInfo where
parseJSON
= withObject "CustomerAgentInfo"
(\ x ->
CustomerAgentInfo' <$>
(x .: "activeAgents") <*> (x .: "healthyAgents") <*>
(x .: "blackListedAgents")
<*> (x .: "shutdownAgents")
<*> (x .: "unhealthyAgents")
<*> (x .: "totalAgents")
<*> (x .: "unknownAgents"))
instance Hashable CustomerAgentInfo where
instance NFData CustomerAgentInfo where
data CustomerConnectorInfo = CustomerConnectorInfo'
{ _cciActiveConnectors :: !Int
, _cciHealthyConnectors :: !Int
, _cciBlackListedConnectors :: !Int
, _cciShutdownConnectors :: !Int
, _cciUnhealthyConnectors :: !Int
, _cciTotalConnectors :: !Int
, _cciUnknownConnectors :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
customerConnectorInfo
:: Int
-> Int
-> Int
-> Int
-> Int
-> Int
-> Int
-> CustomerConnectorInfo
customerConnectorInfo pActiveConnectors_ pHealthyConnectors_ pBlackListedConnectors_ pShutdownConnectors_ pUnhealthyConnectors_ pTotalConnectors_ pUnknownConnectors_ =
CustomerConnectorInfo'
{ _cciActiveConnectors = pActiveConnectors_
, _cciHealthyConnectors = pHealthyConnectors_
, _cciBlackListedConnectors = pBlackListedConnectors_
, _cciShutdownConnectors = pShutdownConnectors_
, _cciUnhealthyConnectors = pUnhealthyConnectors_
, _cciTotalConnectors = pTotalConnectors_
, _cciUnknownConnectors = pUnknownConnectors_
}
cciActiveConnectors :: Lens' CustomerConnectorInfo Int
cciActiveConnectors = lens _cciActiveConnectors (\ s a -> s{_cciActiveConnectors = a})
cciHealthyConnectors :: Lens' CustomerConnectorInfo Int
cciHealthyConnectors = lens _cciHealthyConnectors (\ s a -> s{_cciHealthyConnectors = a})
cciBlackListedConnectors :: Lens' CustomerConnectorInfo Int
cciBlackListedConnectors = lens _cciBlackListedConnectors (\ s a -> s{_cciBlackListedConnectors = a})
cciShutdownConnectors :: Lens' CustomerConnectorInfo Int
cciShutdownConnectors = lens _cciShutdownConnectors (\ s a -> s{_cciShutdownConnectors = a})
cciUnhealthyConnectors :: Lens' CustomerConnectorInfo Int
cciUnhealthyConnectors = lens _cciUnhealthyConnectors (\ s a -> s{_cciUnhealthyConnectors = a})
cciTotalConnectors :: Lens' CustomerConnectorInfo Int
cciTotalConnectors = lens _cciTotalConnectors (\ s a -> s{_cciTotalConnectors = a})
cciUnknownConnectors :: Lens' CustomerConnectorInfo Int
cciUnknownConnectors = lens _cciUnknownConnectors (\ s a -> s{_cciUnknownConnectors = a})
instance FromJSON CustomerConnectorInfo where
parseJSON
= withObject "CustomerConnectorInfo"
(\ x ->
CustomerConnectorInfo' <$>
(x .: "activeConnectors") <*>
(x .: "healthyConnectors")
<*> (x .: "blackListedConnectors")
<*> (x .: "shutdownConnectors")
<*> (x .: "unhealthyConnectors")
<*> (x .: "totalConnectors")
<*> (x .: "unknownConnectors"))
instance Hashable CustomerConnectorInfo where
instance NFData CustomerConnectorInfo where
data ExportFilter = ExportFilter'
{ _efName :: !Text
, _efValues :: ![Text]
, _efCondition :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
exportFilter
:: Text
-> Text
-> ExportFilter
exportFilter pName_ pCondition_ =
ExportFilter'
{_efName = pName_, _efValues = mempty, _efCondition = pCondition_}
efName :: Lens' ExportFilter Text
efName = lens _efName (\ s a -> s{_efName = a})
efValues :: Lens' ExportFilter [Text]
efValues = lens _efValues (\ s a -> s{_efValues = a}) . _Coerce
efCondition :: Lens' ExportFilter Text
efCondition = lens _efCondition (\ s a -> s{_efCondition = a})
instance Hashable ExportFilter where
instance NFData ExportFilter where
instance ToJSON ExportFilter where
toJSON ExportFilter'{..}
= object
(catMaybes
[Just ("name" .= _efName),
Just ("values" .= _efValues),
Just ("condition" .= _efCondition)])
data ExportInfo = ExportInfo'
{ _eiConfigurationsDownloadURL :: !(Maybe Text)
, _eiRequestedStartTime :: !(Maybe POSIX)
, _eiRequestedEndTime :: !(Maybe POSIX)
, _eiIsTruncated :: !(Maybe Bool)
, _eiExportId :: !Text
, _eiExportStatus :: !ExportStatus
, _eiStatusMessage :: !Text
, _eiExportRequestTime :: !POSIX
} deriving (Eq, Read, Show, Data, Typeable, Generic)
exportInfo
:: Text
-> ExportStatus
-> Text
-> UTCTime
-> ExportInfo
exportInfo pExportId_ pExportStatus_ pStatusMessage_ pExportRequestTime_ =
ExportInfo'
{ _eiConfigurationsDownloadURL = Nothing
, _eiRequestedStartTime = Nothing
, _eiRequestedEndTime = Nothing
, _eiIsTruncated = Nothing
, _eiExportId = pExportId_
, _eiExportStatus = pExportStatus_
, _eiStatusMessage = pStatusMessage_
, _eiExportRequestTime = _Time # pExportRequestTime_
}
eiConfigurationsDownloadURL :: Lens' ExportInfo (Maybe Text)
eiConfigurationsDownloadURL = lens _eiConfigurationsDownloadURL (\ s a -> s{_eiConfigurationsDownloadURL = a})
eiRequestedStartTime :: Lens' ExportInfo (Maybe UTCTime)
eiRequestedStartTime = lens _eiRequestedStartTime (\ s a -> s{_eiRequestedStartTime = a}) . mapping _Time
eiRequestedEndTime :: Lens' ExportInfo (Maybe UTCTime)
eiRequestedEndTime = lens _eiRequestedEndTime (\ s a -> s{_eiRequestedEndTime = a}) . mapping _Time
eiIsTruncated :: Lens' ExportInfo (Maybe Bool)
eiIsTruncated = lens _eiIsTruncated (\ s a -> s{_eiIsTruncated = a})
eiExportId :: Lens' ExportInfo Text
eiExportId = lens _eiExportId (\ s a -> s{_eiExportId = a})
eiExportStatus :: Lens' ExportInfo ExportStatus
eiExportStatus = lens _eiExportStatus (\ s a -> s{_eiExportStatus = a})
eiStatusMessage :: Lens' ExportInfo Text
eiStatusMessage = lens _eiStatusMessage (\ s a -> s{_eiStatusMessage = a})
eiExportRequestTime :: Lens' ExportInfo UTCTime
eiExportRequestTime = lens _eiExportRequestTime (\ s a -> s{_eiExportRequestTime = a}) . _Time
instance FromJSON ExportInfo where
parseJSON
= withObject "ExportInfo"
(\ x ->
ExportInfo' <$>
(x .:? "configurationsDownloadUrl") <*>
(x .:? "requestedStartTime")
<*> (x .:? "requestedEndTime")
<*> (x .:? "isTruncated")
<*> (x .: "exportId")
<*> (x .: "exportStatus")
<*> (x .: "statusMessage")
<*> (x .: "exportRequestTime"))
instance Hashable ExportInfo where
instance NFData ExportInfo where
data Filter = Filter'
{ _fName :: !Text
, _fValues :: ![Text]
, _fCondition :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
filter'
:: Text
-> Text
-> Filter
filter' pName_ pCondition_ =
Filter' {_fName = pName_, _fValues = mempty, _fCondition = pCondition_}
fName :: Lens' Filter Text
fName = lens _fName (\ s a -> s{_fName = a})
fValues :: Lens' Filter [Text]
fValues = lens _fValues (\ s a -> s{_fValues = a}) . _Coerce
fCondition :: Lens' Filter Text
fCondition = lens _fCondition (\ s a -> s{_fCondition = a})
instance Hashable Filter where
instance NFData Filter where
instance ToJSON Filter where
toJSON Filter'{..}
= object
(catMaybes
[Just ("name" .= _fName),
Just ("values" .= _fValues),
Just ("condition" .= _fCondition)])
data NeighborConnectionDetail = NeighborConnectionDetail'
{ _ncdTransportProtocol :: !(Maybe Text)
, _ncdDestinationPort :: !(Maybe Int)
, _ncdSourceServerId :: !Text
, _ncdDestinationServerId :: !Text
, _ncdConnectionsCount :: !Integer
} deriving (Eq, Read, Show, Data, Typeable, Generic)
neighborConnectionDetail
:: Text
-> Text
-> Integer
-> NeighborConnectionDetail
neighborConnectionDetail pSourceServerId_ pDestinationServerId_ pConnectionsCount_ =
NeighborConnectionDetail'
{ _ncdTransportProtocol = Nothing
, _ncdDestinationPort = Nothing
, _ncdSourceServerId = pSourceServerId_
, _ncdDestinationServerId = pDestinationServerId_
, _ncdConnectionsCount = pConnectionsCount_
}
ncdTransportProtocol :: Lens' NeighborConnectionDetail (Maybe Text)
ncdTransportProtocol = lens _ncdTransportProtocol (\ s a -> s{_ncdTransportProtocol = a})
ncdDestinationPort :: Lens' NeighborConnectionDetail (Maybe Int)
ncdDestinationPort = lens _ncdDestinationPort (\ s a -> s{_ncdDestinationPort = a})
ncdSourceServerId :: Lens' NeighborConnectionDetail Text
ncdSourceServerId = lens _ncdSourceServerId (\ s a -> s{_ncdSourceServerId = a})
ncdDestinationServerId :: Lens' NeighborConnectionDetail Text
ncdDestinationServerId = lens _ncdDestinationServerId (\ s a -> s{_ncdDestinationServerId = a})
ncdConnectionsCount :: Lens' NeighborConnectionDetail Integer
ncdConnectionsCount = lens _ncdConnectionsCount (\ s a -> s{_ncdConnectionsCount = a})
instance FromJSON NeighborConnectionDetail where
parseJSON
= withObject "NeighborConnectionDetail"
(\ x ->
NeighborConnectionDetail' <$>
(x .:? "transportProtocol") <*>
(x .:? "destinationPort")
<*> (x .: "sourceServerId")
<*> (x .: "destinationServerId")
<*> (x .: "connectionsCount"))
instance Hashable NeighborConnectionDetail where
instance NFData NeighborConnectionDetail where
data OrderByElement = OrderByElement'
{ _obeSortOrder :: !(Maybe OrderString)
, _obeFieldName :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
orderByElement
:: Text
-> OrderByElement
orderByElement pFieldName_ =
OrderByElement' {_obeSortOrder = Nothing, _obeFieldName = pFieldName_}
obeSortOrder :: Lens' OrderByElement (Maybe OrderString)
obeSortOrder = lens _obeSortOrder (\ s a -> s{_obeSortOrder = a})
obeFieldName :: Lens' OrderByElement Text
obeFieldName = lens _obeFieldName (\ s a -> s{_obeFieldName = a})
instance Hashable OrderByElement where
instance NFData OrderByElement where
instance ToJSON OrderByElement where
toJSON OrderByElement'{..}
= object
(catMaybes
[("sortOrder" .=) <$> _obeSortOrder,
Just ("fieldName" .= _obeFieldName)])
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 Hashable Tag where
instance NFData Tag where
instance ToJSON Tag where
toJSON Tag'{..}
= object
(catMaybes
[Just ("key" .= _tagKey),
Just ("value" .= _tagValue)])
data TagFilter = TagFilter'
{ _tfName :: !Text
, _tfValues :: ![Text]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
tagFilter
:: Text
-> TagFilter
tagFilter pName_ = TagFilter' {_tfName = pName_, _tfValues = mempty}
tfName :: Lens' TagFilter Text
tfName = lens _tfName (\ s a -> s{_tfName = a})
tfValues :: Lens' TagFilter [Text]
tfValues = lens _tfValues (\ s a -> s{_tfValues = a}) . _Coerce
instance Hashable TagFilter where
instance NFData TagFilter where
instance ToJSON TagFilter where
toJSON TagFilter'{..}
= object
(catMaybes
[Just ("name" .= _tfName),
Just ("values" .= _tfValues)])