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
instance NFData AgentConfigurationStatus
data AgentInfo = AgentInfo'
{ _aiHostName :: !(Maybe Text)
, _aiAgentNetworkInfoList :: !(Maybe [AgentNetworkInfo])
, _aiConnectorId :: !(Maybe Text)
, _aiHealth :: !(Maybe AgentStatus)
, _aiAgentId :: !(Maybe Text)
, _aiVersion :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
agentInfo
:: AgentInfo
agentInfo =
AgentInfo'
{ _aiHostName = Nothing
, _aiAgentNetworkInfoList = Nothing
, _aiConnectorId = Nothing
, _aiHealth = Nothing
, _aiAgentId = Nothing
, _aiVersion = Nothing
}
aiHostName :: Lens' AgentInfo (Maybe Text)
aiHostName = lens _aiHostName (\ s a -> s{_aiHostName = 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});
instance FromJSON AgentInfo where
parseJSON
= withObject "AgentInfo"
(\ x ->
AgentInfo' <$>
(x .:? "hostName") <*>
(x .:? "agentNetworkInfoList" .!= mempty)
<*> (x .:? "connectorId")
<*> (x .:? "health")
<*> (x .:? "agentId")
<*> (x .:? "version"))
instance Hashable AgentInfo
instance NFData AgentInfo
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
instance NFData AgentNetworkInfo
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
instance NFData ConfigurationTag
data ExportInfo = ExportInfo'
{ _eiConfigurationsDownloadURL :: !(Maybe Text)
, _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
, _eiExportId = pExportId_
, _eiExportStatus = pExportStatus_
, _eiStatusMessage = pStatusMessage_
, _eiExportRequestTime = _Time # pExportRequestTime_
}
eiConfigurationsDownloadURL :: Lens' ExportInfo (Maybe Text)
eiConfigurationsDownloadURL = lens _eiConfigurationsDownloadURL (\ s a -> s{_eiConfigurationsDownloadURL = 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 .: "exportId")
<*> (x .: "exportStatus")
<*> (x .: "statusMessage")
<*> (x .: "exportRequestTime"))
instance Hashable ExportInfo
instance NFData ExportInfo
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
instance NFData Filter
instance ToJSON Filter where
toJSON Filter'{..}
= object
(catMaybes
[Just ("name" .= _fName),
Just ("values" .= _fValues),
Just ("condition" .= _fCondition)])
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
instance NFData Tag
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
instance NFData TagFilter
instance ToJSON TagFilter where
toJSON TagFilter'{..}
= object
(catMaybes
[Just ("name" .= _tfName),
Just ("values" .= _tfValues)])