{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.AWS.Support.Types.Product where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Support.Types.Sum
data Attachment = Attachment'
{ _aData :: !(Maybe Base64)
, _aFileName :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
attachment
:: Attachment
attachment = Attachment' {_aData = Nothing, _aFileName = Nothing}
aData :: Lens' Attachment (Maybe ByteString)
aData = lens _aData (\ s a -> s{_aData = a}) . mapping _Base64
aFileName :: Lens' Attachment (Maybe Text)
aFileName = lens _aFileName (\ s a -> s{_aFileName = a})
instance FromJSON Attachment where
parseJSON
= withObject "Attachment"
(\ x ->
Attachment' <$>
(x .:? "data") <*> (x .:? "fileName"))
instance Hashable Attachment where
instance NFData Attachment where
instance ToJSON Attachment where
toJSON Attachment'{..}
= object
(catMaybes
[("data" .=) <$> _aData,
("fileName" .=) <$> _aFileName])
data AttachmentDetails = AttachmentDetails'
{ _adAttachmentId :: !(Maybe Text)
, _adFileName :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
attachmentDetails
:: AttachmentDetails
attachmentDetails =
AttachmentDetails' {_adAttachmentId = Nothing, _adFileName = Nothing}
adAttachmentId :: Lens' AttachmentDetails (Maybe Text)
adAttachmentId = lens _adAttachmentId (\ s a -> s{_adAttachmentId = a})
adFileName :: Lens' AttachmentDetails (Maybe Text)
adFileName = lens _adFileName (\ s a -> s{_adFileName = a})
instance FromJSON AttachmentDetails where
parseJSON
= withObject "AttachmentDetails"
(\ x ->
AttachmentDetails' <$>
(x .:? "attachmentId") <*> (x .:? "fileName"))
instance Hashable AttachmentDetails where
instance NFData AttachmentDetails where
data CaseDetails = CaseDetails'
{ _cdSubject :: !(Maybe Text)
, _cdStatus :: !(Maybe Text)
, _cdRecentCommunications :: !(Maybe RecentCaseCommunications)
, _cdSeverityCode :: !(Maybe Text)
, _cdCaseId :: !(Maybe Text)
, _cdCcEmailAddresses :: !(Maybe [Text])
, _cdDisplayId :: !(Maybe Text)
, _cdSubmittedBy :: !(Maybe Text)
, _cdLanguage :: !(Maybe Text)
, _cdTimeCreated :: !(Maybe Text)
, _cdCategoryCode :: !(Maybe Text)
, _cdServiceCode :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
caseDetails
:: CaseDetails
caseDetails =
CaseDetails'
{ _cdSubject = Nothing
, _cdStatus = Nothing
, _cdRecentCommunications = Nothing
, _cdSeverityCode = Nothing
, _cdCaseId = Nothing
, _cdCcEmailAddresses = Nothing
, _cdDisplayId = Nothing
, _cdSubmittedBy = Nothing
, _cdLanguage = Nothing
, _cdTimeCreated = Nothing
, _cdCategoryCode = Nothing
, _cdServiceCode = Nothing
}
cdSubject :: Lens' CaseDetails (Maybe Text)
cdSubject = lens _cdSubject (\ s a -> s{_cdSubject = a})
cdStatus :: Lens' CaseDetails (Maybe Text)
cdStatus = lens _cdStatus (\ s a -> s{_cdStatus = a})
cdRecentCommunications :: Lens' CaseDetails (Maybe RecentCaseCommunications)
cdRecentCommunications = lens _cdRecentCommunications (\ s a -> s{_cdRecentCommunications = a})
cdSeverityCode :: Lens' CaseDetails (Maybe Text)
cdSeverityCode = lens _cdSeverityCode (\ s a -> s{_cdSeverityCode = a})
cdCaseId :: Lens' CaseDetails (Maybe Text)
cdCaseId = lens _cdCaseId (\ s a -> s{_cdCaseId = a})
cdCcEmailAddresses :: Lens' CaseDetails [Text]
cdCcEmailAddresses = lens _cdCcEmailAddresses (\ s a -> s{_cdCcEmailAddresses = a}) . _Default . _Coerce
cdDisplayId :: Lens' CaseDetails (Maybe Text)
cdDisplayId = lens _cdDisplayId (\ s a -> s{_cdDisplayId = a})
cdSubmittedBy :: Lens' CaseDetails (Maybe Text)
cdSubmittedBy = lens _cdSubmittedBy (\ s a -> s{_cdSubmittedBy = a})
cdLanguage :: Lens' CaseDetails (Maybe Text)
cdLanguage = lens _cdLanguage (\ s a -> s{_cdLanguage = a})
cdTimeCreated :: Lens' CaseDetails (Maybe Text)
cdTimeCreated = lens _cdTimeCreated (\ s a -> s{_cdTimeCreated = a})
cdCategoryCode :: Lens' CaseDetails (Maybe Text)
cdCategoryCode = lens _cdCategoryCode (\ s a -> s{_cdCategoryCode = a})
cdServiceCode :: Lens' CaseDetails (Maybe Text)
cdServiceCode = lens _cdServiceCode (\ s a -> s{_cdServiceCode = a})
instance FromJSON CaseDetails where
parseJSON
= withObject "CaseDetails"
(\ x ->
CaseDetails' <$>
(x .:? "subject") <*> (x .:? "status") <*>
(x .:? "recentCommunications")
<*> (x .:? "severityCode")
<*> (x .:? "caseId")
<*> (x .:? "ccEmailAddresses" .!= mempty)
<*> (x .:? "displayId")
<*> (x .:? "submittedBy")
<*> (x .:? "language")
<*> (x .:? "timeCreated")
<*> (x .:? "categoryCode")
<*> (x .:? "serviceCode"))
instance Hashable CaseDetails where
instance NFData CaseDetails where
data Category = Category'
{ _cName :: !(Maybe Text)
, _cCode :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
category
:: Category
category = Category' {_cName = Nothing, _cCode = Nothing}
cName :: Lens' Category (Maybe Text)
cName = lens _cName (\ s a -> s{_cName = a})
cCode :: Lens' Category (Maybe Text)
cCode = lens _cCode (\ s a -> s{_cCode = a})
instance FromJSON Category where
parseJSON
= withObject "Category"
(\ x ->
Category' <$> (x .:? "name") <*> (x .:? "code"))
instance Hashable Category where
instance NFData Category where
data Communication = Communication'
{ _cBody :: !(Maybe Text)
, _cCaseId :: !(Maybe Text)
, _cSubmittedBy :: !(Maybe Text)
, _cTimeCreated :: !(Maybe Text)
, _cAttachmentSet :: !(Maybe [AttachmentDetails])
} deriving (Eq, Read, Show, Data, Typeable, Generic)
communication
:: Communication
communication =
Communication'
{ _cBody = Nothing
, _cCaseId = Nothing
, _cSubmittedBy = Nothing
, _cTimeCreated = Nothing
, _cAttachmentSet = Nothing
}
cBody :: Lens' Communication (Maybe Text)
cBody = lens _cBody (\ s a -> s{_cBody = a})
cCaseId :: Lens' Communication (Maybe Text)
cCaseId = lens _cCaseId (\ s a -> s{_cCaseId = a})
cSubmittedBy :: Lens' Communication (Maybe Text)
cSubmittedBy = lens _cSubmittedBy (\ s a -> s{_cSubmittedBy = a})
cTimeCreated :: Lens' Communication (Maybe Text)
cTimeCreated = lens _cTimeCreated (\ s a -> s{_cTimeCreated = a})
cAttachmentSet :: Lens' Communication [AttachmentDetails]
cAttachmentSet = lens _cAttachmentSet (\ s a -> s{_cAttachmentSet = a}) . _Default . _Coerce
instance FromJSON Communication where
parseJSON
= withObject "Communication"
(\ x ->
Communication' <$>
(x .:? "body") <*> (x .:? "caseId") <*>
(x .:? "submittedBy")
<*> (x .:? "timeCreated")
<*> (x .:? "attachmentSet" .!= mempty))
instance Hashable Communication where
instance NFData Communication where
data RecentCaseCommunications = RecentCaseCommunications'
{ _rccNextToken :: !(Maybe Text)
, _rccCommunications :: !(Maybe [Communication])
} deriving (Eq, Read, Show, Data, Typeable, Generic)
recentCaseCommunications
:: RecentCaseCommunications
recentCaseCommunications =
RecentCaseCommunications'
{_rccNextToken = Nothing, _rccCommunications = Nothing}
rccNextToken :: Lens' RecentCaseCommunications (Maybe Text)
rccNextToken = lens _rccNextToken (\ s a -> s{_rccNextToken = a})
rccCommunications :: Lens' RecentCaseCommunications [Communication]
rccCommunications = lens _rccCommunications (\ s a -> s{_rccCommunications = a}) . _Default . _Coerce
instance FromJSON RecentCaseCommunications where
parseJSON
= withObject "RecentCaseCommunications"
(\ x ->
RecentCaseCommunications' <$>
(x .:? "nextToken") <*>
(x .:? "communications" .!= mempty))
instance Hashable RecentCaseCommunications where
instance NFData RecentCaseCommunications where
data SeverityLevel = SeverityLevel'
{ _slName :: !(Maybe Text)
, _slCode :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
severityLevel
:: SeverityLevel
severityLevel = SeverityLevel' {_slName = Nothing, _slCode = Nothing}
slName :: Lens' SeverityLevel (Maybe Text)
slName = lens _slName (\ s a -> s{_slName = a})
slCode :: Lens' SeverityLevel (Maybe Text)
slCode = lens _slCode (\ s a -> s{_slCode = a})
instance FromJSON SeverityLevel where
parseJSON
= withObject "SeverityLevel"
(\ x ->
SeverityLevel' <$> (x .:? "name") <*> (x .:? "code"))
instance Hashable SeverityLevel where
instance NFData SeverityLevel where
data SupportService = SupportService'
{ _ssCategories :: !(Maybe [Category])
, _ssName :: !(Maybe Text)
, _ssCode :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
supportService
:: SupportService
supportService =
SupportService'
{_ssCategories = Nothing, _ssName = Nothing, _ssCode = Nothing}
ssCategories :: Lens' SupportService [Category]
ssCategories = lens _ssCategories (\ s a -> s{_ssCategories = a}) . _Default . _Coerce
ssName :: Lens' SupportService (Maybe Text)
ssName = lens _ssName (\ s a -> s{_ssName = a})
ssCode :: Lens' SupportService (Maybe Text)
ssCode = lens _ssCode (\ s a -> s{_ssCode = a})
instance FromJSON SupportService where
parseJSON
= withObject "SupportService"
(\ x ->
SupportService' <$>
(x .:? "categories" .!= mempty) <*> (x .:? "name")
<*> (x .:? "code"))
instance Hashable SupportService where
instance NFData SupportService where
newtype TrustedAdvisorCategorySpecificSummary = TrustedAdvisorCategorySpecificSummary'
{ _tacssCostOptimizing :: Maybe TrustedAdvisorCostOptimizingSummary
} deriving (Eq, Read, Show, Data, Typeable, Generic)
trustedAdvisorCategorySpecificSummary
:: TrustedAdvisorCategorySpecificSummary
trustedAdvisorCategorySpecificSummary =
TrustedAdvisorCategorySpecificSummary' {_tacssCostOptimizing = Nothing}
tacssCostOptimizing :: Lens' TrustedAdvisorCategorySpecificSummary (Maybe TrustedAdvisorCostOptimizingSummary)
tacssCostOptimizing = lens _tacssCostOptimizing (\ s a -> s{_tacssCostOptimizing = a})
instance FromJSON
TrustedAdvisorCategorySpecificSummary
where
parseJSON
= withObject "TrustedAdvisorCategorySpecificSummary"
(\ x ->
TrustedAdvisorCategorySpecificSummary' <$>
(x .:? "costOptimizing"))
instance Hashable
TrustedAdvisorCategorySpecificSummary
where
instance NFData TrustedAdvisorCategorySpecificSummary
where
data TrustedAdvisorCheckDescription = TrustedAdvisorCheckDescription'
{ _tacdId :: !Text
, _tacdName :: !Text
, _tacdDescription :: !Text
, _tacdCategory :: !Text
, _tacdMetadata :: ![Text]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
trustedAdvisorCheckDescription
:: Text
-> Text
-> Text
-> Text
-> TrustedAdvisorCheckDescription
trustedAdvisorCheckDescription pId_ pName_ pDescription_ pCategory_ =
TrustedAdvisorCheckDescription'
{ _tacdId = pId_
, _tacdName = pName_
, _tacdDescription = pDescription_
, _tacdCategory = pCategory_
, _tacdMetadata = mempty
}
tacdId :: Lens' TrustedAdvisorCheckDescription Text
tacdId = lens _tacdId (\ s a -> s{_tacdId = a})
tacdName :: Lens' TrustedAdvisorCheckDescription Text
tacdName = lens _tacdName (\ s a -> s{_tacdName = a})
tacdDescription :: Lens' TrustedAdvisorCheckDescription Text
tacdDescription = lens _tacdDescription (\ s a -> s{_tacdDescription = a})
tacdCategory :: Lens' TrustedAdvisorCheckDescription Text
tacdCategory = lens _tacdCategory (\ s a -> s{_tacdCategory = a})
tacdMetadata :: Lens' TrustedAdvisorCheckDescription [Text]
tacdMetadata = lens _tacdMetadata (\ s a -> s{_tacdMetadata = a}) . _Coerce
instance FromJSON TrustedAdvisorCheckDescription
where
parseJSON
= withObject "TrustedAdvisorCheckDescription"
(\ x ->
TrustedAdvisorCheckDescription' <$>
(x .: "id") <*> (x .: "name") <*>
(x .: "description")
<*> (x .: "category")
<*> (x .:? "metadata" .!= mempty))
instance Hashable TrustedAdvisorCheckDescription
where
instance NFData TrustedAdvisorCheckDescription where
data TrustedAdvisorCheckRefreshStatus = TrustedAdvisorCheckRefreshStatus'
{ _tacrsCheckId :: !Text
, _tacrsStatus :: !Text
, _tacrsMillisUntilNextRefreshable :: !Integer
} deriving (Eq, Read, Show, Data, Typeable, Generic)
trustedAdvisorCheckRefreshStatus
:: Text
-> Text
-> Integer
-> TrustedAdvisorCheckRefreshStatus
trustedAdvisorCheckRefreshStatus pCheckId_ pStatus_ pMillisUntilNextRefreshable_ =
TrustedAdvisorCheckRefreshStatus'
{ _tacrsCheckId = pCheckId_
, _tacrsStatus = pStatus_
, _tacrsMillisUntilNextRefreshable = pMillisUntilNextRefreshable_
}
tacrsCheckId :: Lens' TrustedAdvisorCheckRefreshStatus Text
tacrsCheckId = lens _tacrsCheckId (\ s a -> s{_tacrsCheckId = a})
tacrsStatus :: Lens' TrustedAdvisorCheckRefreshStatus Text
tacrsStatus = lens _tacrsStatus (\ s a -> s{_tacrsStatus = a})
tacrsMillisUntilNextRefreshable :: Lens' TrustedAdvisorCheckRefreshStatus Integer
tacrsMillisUntilNextRefreshable = lens _tacrsMillisUntilNextRefreshable (\ s a -> s{_tacrsMillisUntilNextRefreshable = a})
instance FromJSON TrustedAdvisorCheckRefreshStatus
where
parseJSON
= withObject "TrustedAdvisorCheckRefreshStatus"
(\ x ->
TrustedAdvisorCheckRefreshStatus' <$>
(x .: "checkId") <*> (x .: "status") <*>
(x .: "millisUntilNextRefreshable"))
instance Hashable TrustedAdvisorCheckRefreshStatus
where
instance NFData TrustedAdvisorCheckRefreshStatus
where
data TrustedAdvisorCheckResult = TrustedAdvisorCheckResult'
{ _tacrCheckId :: !Text
, _tacrTimestamp :: !Text
, _tacrStatus :: !Text
, _tacrResourcesSummary :: !TrustedAdvisorResourcesSummary
, _tacrCategorySpecificSummary :: !TrustedAdvisorCategorySpecificSummary
, _tacrFlaggedResources :: ![TrustedAdvisorResourceDetail]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
trustedAdvisorCheckResult
:: Text
-> Text
-> Text
-> TrustedAdvisorResourcesSummary
-> TrustedAdvisorCategorySpecificSummary
-> TrustedAdvisorCheckResult
trustedAdvisorCheckResult pCheckId_ pTimestamp_ pStatus_ pResourcesSummary_ pCategorySpecificSummary_ =
TrustedAdvisorCheckResult'
{ _tacrCheckId = pCheckId_
, _tacrTimestamp = pTimestamp_
, _tacrStatus = pStatus_
, _tacrResourcesSummary = pResourcesSummary_
, _tacrCategorySpecificSummary = pCategorySpecificSummary_
, _tacrFlaggedResources = mempty
}
tacrCheckId :: Lens' TrustedAdvisorCheckResult Text
tacrCheckId = lens _tacrCheckId (\ s a -> s{_tacrCheckId = a})
tacrTimestamp :: Lens' TrustedAdvisorCheckResult Text
tacrTimestamp = lens _tacrTimestamp (\ s a -> s{_tacrTimestamp = a})
tacrStatus :: Lens' TrustedAdvisorCheckResult Text
tacrStatus = lens _tacrStatus (\ s a -> s{_tacrStatus = a})
tacrResourcesSummary :: Lens' TrustedAdvisorCheckResult TrustedAdvisorResourcesSummary
tacrResourcesSummary = lens _tacrResourcesSummary (\ s a -> s{_tacrResourcesSummary = a})
tacrCategorySpecificSummary :: Lens' TrustedAdvisorCheckResult TrustedAdvisorCategorySpecificSummary
tacrCategorySpecificSummary = lens _tacrCategorySpecificSummary (\ s a -> s{_tacrCategorySpecificSummary = a})
tacrFlaggedResources :: Lens' TrustedAdvisorCheckResult [TrustedAdvisorResourceDetail]
tacrFlaggedResources = lens _tacrFlaggedResources (\ s a -> s{_tacrFlaggedResources = a}) . _Coerce
instance FromJSON TrustedAdvisorCheckResult where
parseJSON
= withObject "TrustedAdvisorCheckResult"
(\ x ->
TrustedAdvisorCheckResult' <$>
(x .: "checkId") <*> (x .: "timestamp") <*>
(x .: "status")
<*> (x .: "resourcesSummary")
<*> (x .: "categorySpecificSummary")
<*> (x .:? "flaggedResources" .!= mempty))
instance Hashable TrustedAdvisorCheckResult where
instance NFData TrustedAdvisorCheckResult where
data TrustedAdvisorCheckSummary = TrustedAdvisorCheckSummary'
{ _tacsHasFlaggedResources :: !(Maybe Bool)
, _tacsCheckId :: !Text
, _tacsTimestamp :: !Text
, _tacsStatus :: !Text
, _tacsResourcesSummary :: !TrustedAdvisorResourcesSummary
, _tacsCategorySpecificSummary :: !TrustedAdvisorCategorySpecificSummary
} deriving (Eq, Read, Show, Data, Typeable, Generic)
trustedAdvisorCheckSummary
:: Text
-> Text
-> Text
-> TrustedAdvisorResourcesSummary
-> TrustedAdvisorCategorySpecificSummary
-> TrustedAdvisorCheckSummary
trustedAdvisorCheckSummary pCheckId_ pTimestamp_ pStatus_ pResourcesSummary_ pCategorySpecificSummary_ =
TrustedAdvisorCheckSummary'
{ _tacsHasFlaggedResources = Nothing
, _tacsCheckId = pCheckId_
, _tacsTimestamp = pTimestamp_
, _tacsStatus = pStatus_
, _tacsResourcesSummary = pResourcesSummary_
, _tacsCategorySpecificSummary = pCategorySpecificSummary_
}
tacsHasFlaggedResources :: Lens' TrustedAdvisorCheckSummary (Maybe Bool)
tacsHasFlaggedResources = lens _tacsHasFlaggedResources (\ s a -> s{_tacsHasFlaggedResources = a})
tacsCheckId :: Lens' TrustedAdvisorCheckSummary Text
tacsCheckId = lens _tacsCheckId (\ s a -> s{_tacsCheckId = a})
tacsTimestamp :: Lens' TrustedAdvisorCheckSummary Text
tacsTimestamp = lens _tacsTimestamp (\ s a -> s{_tacsTimestamp = a})
tacsStatus :: Lens' TrustedAdvisorCheckSummary Text
tacsStatus = lens _tacsStatus (\ s a -> s{_tacsStatus = a})
tacsResourcesSummary :: Lens' TrustedAdvisorCheckSummary TrustedAdvisorResourcesSummary
tacsResourcesSummary = lens _tacsResourcesSummary (\ s a -> s{_tacsResourcesSummary = a})
tacsCategorySpecificSummary :: Lens' TrustedAdvisorCheckSummary TrustedAdvisorCategorySpecificSummary
tacsCategorySpecificSummary = lens _tacsCategorySpecificSummary (\ s a -> s{_tacsCategorySpecificSummary = a})
instance FromJSON TrustedAdvisorCheckSummary where
parseJSON
= withObject "TrustedAdvisorCheckSummary"
(\ x ->
TrustedAdvisorCheckSummary' <$>
(x .:? "hasFlaggedResources") <*> (x .: "checkId")
<*> (x .: "timestamp")
<*> (x .: "status")
<*> (x .: "resourcesSummary")
<*> (x .: "categorySpecificSummary"))
instance Hashable TrustedAdvisorCheckSummary where
instance NFData TrustedAdvisorCheckSummary where
data TrustedAdvisorCostOptimizingSummary = TrustedAdvisorCostOptimizingSummary'
{ _tacosEstimatedMonthlySavings :: !Double
, _tacosEstimatedPercentMonthlySavings :: !Double
} deriving (Eq, Read, Show, Data, Typeable, Generic)
trustedAdvisorCostOptimizingSummary
:: Double
-> Double
-> TrustedAdvisorCostOptimizingSummary
trustedAdvisorCostOptimizingSummary pEstimatedMonthlySavings_ pEstimatedPercentMonthlySavings_ =
TrustedAdvisorCostOptimizingSummary'
{ _tacosEstimatedMonthlySavings = pEstimatedMonthlySavings_
, _tacosEstimatedPercentMonthlySavings = pEstimatedPercentMonthlySavings_
}
tacosEstimatedMonthlySavings :: Lens' TrustedAdvisorCostOptimizingSummary Double
tacosEstimatedMonthlySavings = lens _tacosEstimatedMonthlySavings (\ s a -> s{_tacosEstimatedMonthlySavings = a})
tacosEstimatedPercentMonthlySavings :: Lens' TrustedAdvisorCostOptimizingSummary Double
tacosEstimatedPercentMonthlySavings = lens _tacosEstimatedPercentMonthlySavings (\ s a -> s{_tacosEstimatedPercentMonthlySavings = a})
instance FromJSON TrustedAdvisorCostOptimizingSummary
where
parseJSON
= withObject "TrustedAdvisorCostOptimizingSummary"
(\ x ->
TrustedAdvisorCostOptimizingSummary' <$>
(x .: "estimatedMonthlySavings") <*>
(x .: "estimatedPercentMonthlySavings"))
instance Hashable TrustedAdvisorCostOptimizingSummary
where
instance NFData TrustedAdvisorCostOptimizingSummary
where
data TrustedAdvisorResourceDetail = TrustedAdvisorResourceDetail'
{ _tardIsSuppressed :: !(Maybe Bool)
, _tardRegion :: !(Maybe Text)
, _tardStatus :: !Text
, _tardResourceId :: !Text
, _tardMetadata :: ![Text]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
trustedAdvisorResourceDetail
:: Text
-> Text
-> TrustedAdvisorResourceDetail
trustedAdvisorResourceDetail pStatus_ pResourceId_ =
TrustedAdvisorResourceDetail'
{ _tardIsSuppressed = Nothing
, _tardRegion = Nothing
, _tardStatus = pStatus_
, _tardResourceId = pResourceId_
, _tardMetadata = mempty
}
tardIsSuppressed :: Lens' TrustedAdvisorResourceDetail (Maybe Bool)
tardIsSuppressed = lens _tardIsSuppressed (\ s a -> s{_tardIsSuppressed = a})
tardRegion :: Lens' TrustedAdvisorResourceDetail (Maybe Text)
tardRegion = lens _tardRegion (\ s a -> s{_tardRegion = a})
tardStatus :: Lens' TrustedAdvisorResourceDetail Text
tardStatus = lens _tardStatus (\ s a -> s{_tardStatus = a})
tardResourceId :: Lens' TrustedAdvisorResourceDetail Text
tardResourceId = lens _tardResourceId (\ s a -> s{_tardResourceId = a})
tardMetadata :: Lens' TrustedAdvisorResourceDetail [Text]
tardMetadata = lens _tardMetadata (\ s a -> s{_tardMetadata = a}) . _Coerce
instance FromJSON TrustedAdvisorResourceDetail where
parseJSON
= withObject "TrustedAdvisorResourceDetail"
(\ x ->
TrustedAdvisorResourceDetail' <$>
(x .:? "isSuppressed") <*> (x .:? "region") <*>
(x .: "status")
<*> (x .: "resourceId")
<*> (x .:? "metadata" .!= mempty))
instance Hashable TrustedAdvisorResourceDetail where
instance NFData TrustedAdvisorResourceDetail where
data TrustedAdvisorResourcesSummary = TrustedAdvisorResourcesSummary'
{ _tarsResourcesProcessed :: !Integer
, _tarsResourcesFlagged :: !Integer
, _tarsResourcesIgnored :: !Integer
, _tarsResourcesSuppressed :: !Integer
} deriving (Eq, Read, Show, Data, Typeable, Generic)
trustedAdvisorResourcesSummary
:: Integer
-> Integer
-> Integer
-> Integer
-> TrustedAdvisorResourcesSummary
trustedAdvisorResourcesSummary pResourcesProcessed_ pResourcesFlagged_ pResourcesIgnored_ pResourcesSuppressed_ =
TrustedAdvisorResourcesSummary'
{ _tarsResourcesProcessed = pResourcesProcessed_
, _tarsResourcesFlagged = pResourcesFlagged_
, _tarsResourcesIgnored = pResourcesIgnored_
, _tarsResourcesSuppressed = pResourcesSuppressed_
}
tarsResourcesProcessed :: Lens' TrustedAdvisorResourcesSummary Integer
tarsResourcesProcessed = lens _tarsResourcesProcessed (\ s a -> s{_tarsResourcesProcessed = a})
tarsResourcesFlagged :: Lens' TrustedAdvisorResourcesSummary Integer
tarsResourcesFlagged = lens _tarsResourcesFlagged (\ s a -> s{_tarsResourcesFlagged = a})
tarsResourcesIgnored :: Lens' TrustedAdvisorResourcesSummary Integer
tarsResourcesIgnored = lens _tarsResourcesIgnored (\ s a -> s{_tarsResourcesIgnored = a})
tarsResourcesSuppressed :: Lens' TrustedAdvisorResourcesSummary Integer
tarsResourcesSuppressed = lens _tarsResourcesSuppressed (\ s a -> s{_tarsResourcesSuppressed = a})
instance FromJSON TrustedAdvisorResourcesSummary
where
parseJSON
= withObject "TrustedAdvisorResourcesSummary"
(\ x ->
TrustedAdvisorResourcesSummary' <$>
(x .: "resourcesProcessed") <*>
(x .: "resourcesFlagged")
<*> (x .: "resourcesIgnored")
<*> (x .: "resourcesSuppressed"))
instance Hashable TrustedAdvisorResourcesSummary
where
instance NFData TrustedAdvisorResourcesSummary where